@seatlayer/core 0.104.0 → 0.105.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/{chunk-GUNNA5LB.js → chunk-4LW4TZZR.js} +1 -1
  2. package/dist/{chunk-IEBXXGQC.js → chunk-4SHLBEG5.js} +1 -1
  3. package/dist/{chunk-URW7MSCJ.js → chunk-522ENS2Q.js} +1 -1
  4. package/dist/{chunk-4522UUXG.js → chunk-7Q366RVM.js} +1 -1
  5. package/dist/{chunk-EE2CVYFJ.js → chunk-DDQWZ323.js} +1 -1
  6. package/dist/{chunk-P2BTUNG6.js → chunk-DO545QTN.js} +1 -1
  7. package/dist/{chunk-P6ASVG3X.js → chunk-EYJ5T5JM.js} +1 -1
  8. package/dist/{chunk-KYPY7GWB.js → chunk-GCIZT3CV.js} +1 -1
  9. package/dist/{chunk-HIU4MMID.js → chunk-GZYHULZY.js} +1 -1
  10. package/dist/chunk-TGHNVDWA.js +1 -0
  11. package/dist/chunk-VHFSP53L.js +1 -0
  12. package/dist/{chunk-PBXGWYB4.js → chunk-VSX4JWN7.js} +1 -1
  13. package/dist/core/cdnAsset.cjs +1 -1
  14. package/dist/core/cdnAsset.d.cts +28 -1
  15. package/dist/core/cdnAsset.d.ts +28 -1
  16. package/dist/core/cdnAsset.js +1 -1
  17. package/dist/core/chart-ops/index.cjs +1 -1
  18. package/dist/core/chart-ops/index.d.cts +40 -1
  19. package/dist/core/chart-ops/index.d.ts +40 -1
  20. package/dist/core/chart-ops/index.js +1 -1
  21. package/dist/core/inventory/index.d.cts +2 -2
  22. package/dist/core/inventory/index.d.ts +2 -2
  23. package/dist/core/inventory/index.js +1 -1
  24. package/dist/core/layout/index.cjs +1 -1
  25. package/dist/core/layout/index.d.cts +2 -2
  26. package/dist/core/layout/index.d.ts +2 -2
  27. package/dist/core/layout/index.js +1 -1
  28. package/dist/core/quality/index.d.cts +2 -2
  29. package/dist/core/quality/index.d.ts +2 -2
  30. package/dist/core/quality/index.js +1 -1
  31. package/dist/core/render-assets/index.js +1 -1
  32. package/dist/core/sections/index.d.cts +1 -1
  33. package/dist/core/sections/index.d.ts +1 -1
  34. package/dist/index.cjs +1 -1
  35. package/dist/index.d.cts +10 -12
  36. package/dist/index.d.ts +10 -12
  37. package/dist/index.js +1 -1
  38. package/dist/{renderedQuality-D62MKRV8.d.cts → renderedQuality-C7NrTR19.d.cts} +1 -1
  39. package/dist/{renderedQuality-DZOIkUX_.d.ts → renderedQuality-q5he_9Bt.d.ts} +1 -1
  40. package/dist/{renderer-BIR1jJrt.d.cts → renderer-BZuro9aF.d.cts} +7 -0
  41. package/dist/{renderer-CiPst9uA.d.ts → renderer-DIEE9JhZ.d.ts} +7 -0
  42. package/dist/{tableSizing-BnlXRH_v.d.ts → tableSizing-D-vDBFpb.d.ts} +1 -1
  43. package/dist/{tableSizing-DuRJVaJs.d.cts → tableSizing-saWGNPZM.d.cts} +1 -1
  44. package/dist/{ticketRestrictions-BBZ5mbsi.d.cts → ticketRestrictions-BNemUVPU.d.cts} +1 -1
  45. package/dist/{ticketRestrictions-BEHxDUyd.d.ts → ticketRestrictions-DUuUJygM.d.ts} +1 -1
  46. package/dist/view3d/index.d.cts +1 -1
  47. package/dist/view3d/index.d.ts +1 -1
  48. package/dist/view3d/index.js +1 -1
  49. package/dist/view3d/scene/scene.worker.js +1 -1
  50. package/package.json +1 -1
  51. package/dist/chunk-6YTPIDLM.js +0 -1
  52. package/dist/chunk-FOYQOIWG.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import { P as Point, A as AccessibilityType, C as ChartDoc, R as RowObject } from '../../types-CB1llwVg.cjs';
2
- import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-BIR1jJrt.cjs';
2
+ import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-BZuro9aF.cjs';
3
3
  export { C as CATEGORY_INVENTORY_FAMILIES, a as CategoryInventoryClone, b as CategoryInventoryConflict, c as CategoryInventoryFamily, d as CategoryInventoryFamilyUsage, e as CategoryInventoryObjectType, f as CategoryInventoryReassignment, g as CategoryInventoryRemediationChange, h as CategoryInventoryRemediationResult, i as CategoryInventoryTarget, j as describeCategoryInventoryConflict, k as effectiveSeatOwnerCategoryCounts, l as inspectCategoryInventoryConflicts, r as remediateCategoryInventoryConflicts } from '../../categoryInventory-DYcNVyxN.cjs';
4
- export { C as ClientInventoryModelVersion, a as CompanionSelectionIssue, D as DEFAULT_EVENT_INVENTORY_LIMIT, G as GABoxMode, b as GA_UNIT_LABEL_PREFIX, c as GroupedTableBookingMode, d as GroupedTableInventoryUnit, e as GroupedTableProjectionError, L as LARGE_VENUE_INVENTORY_MODULE, M as MAX_EVENT_INVENTORY, f as MAX_GA_CAPACITY, g as MAX_ONE_PARTY_GUESTS, N as NotForSaleSelectionIssue, O as ONE_PARTY_LIMIT_MESSAGE, R as RestrictionChartDoc, h as RestrictionSeat, T as TicketOptionApplicabilityIssue, i as TicketSelection, j as TicketSelectionIssue, k as TicketSelectionOptions, l as TicketTierResolution, m as applicableTicketTiers, n as companionSelectionIssue, o as eventInventoryLimitFor, p as gaAreasOf, q as gaBoxBounds, r as gaBoxMode, s as gaInventorySegments, t as gaUnitLabel, u as gaUnitLabels, v as gaUnitLabelsForModel, w as gaWheelchairPlaceCount, x as gaWheelchairUnitLabels, y as groupedTableInventory, z as growJoinedGAInventory, A as isFullChartDoc, B as isGaUnitLabel, E as resolveTicketTierForSeat, F as ticketOptionNotApplicableIssue, H as ticketSelectionIssue, I as ticketTierAppliesToSeat, J as validGAInventorySegments } from '../../ticketRestrictions-BBZ5mbsi.cjs';
4
+ export { C as ClientInventoryModelVersion, a as CompanionSelectionIssue, D as DEFAULT_EVENT_INVENTORY_LIMIT, G as GABoxMode, b as GA_UNIT_LABEL_PREFIX, c as GroupedTableBookingMode, d as GroupedTableInventoryUnit, e as GroupedTableProjectionError, L as LARGE_VENUE_INVENTORY_MODULE, M as MAX_EVENT_INVENTORY, f as MAX_GA_CAPACITY, g as MAX_ONE_PARTY_GUESTS, N as NotForSaleSelectionIssue, O as ONE_PARTY_LIMIT_MESSAGE, R as RestrictionChartDoc, h as RestrictionSeat, T as TicketOptionApplicabilityIssue, i as TicketSelection, j as TicketSelectionIssue, k as TicketSelectionOptions, l as TicketTierResolution, m as applicableTicketTiers, n as companionSelectionIssue, o as eventInventoryLimitFor, p as gaAreasOf, q as gaBoxBounds, r as gaBoxMode, s as gaInventorySegments, t as gaUnitLabel, u as gaUnitLabels, v as gaUnitLabelsForModel, w as gaWheelchairPlaceCount, x as gaWheelchairUnitLabels, y as groupedTableInventory, z as growJoinedGAInventory, A as isFullChartDoc, B as isGaUnitLabel, E as resolveTicketTierForSeat, F as ticketOptionNotApplicableIssue, H as ticketSelectionIssue, I as ticketTierAppliesToSeat, J as validGAInventorySegments } from '../../ticketRestrictions-BNemUVPU.cjs';
5
5
 
6
6
  /**
7
7
  * Best-available seat selection — a PURE, fully unit-testable ranking function.
@@ -1,7 +1,7 @@
1
1
  import { P as Point, A as AccessibilityType, C as ChartDoc, R as RowObject } from '../../types-CB1llwVg.js';
2
- import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-CiPst9uA.js';
2
+ import { E as ExpandedSeat, S as SeatStatus } from '../../renderer-DIEE9JhZ.js';
3
3
  export { C as CATEGORY_INVENTORY_FAMILIES, a as CategoryInventoryClone, b as CategoryInventoryConflict, c as CategoryInventoryFamily, d as CategoryInventoryFamilyUsage, e as CategoryInventoryObjectType, f as CategoryInventoryReassignment, g as CategoryInventoryRemediationChange, h as CategoryInventoryRemediationResult, i as CategoryInventoryTarget, j as describeCategoryInventoryConflict, k as effectiveSeatOwnerCategoryCounts, l as inspectCategoryInventoryConflicts, r as remediateCategoryInventoryConflicts } from '../../categoryInventory-QTVDRqNG.js';
4
- export { C as ClientInventoryModelVersion, a as CompanionSelectionIssue, D as DEFAULT_EVENT_INVENTORY_LIMIT, G as GABoxMode, b as GA_UNIT_LABEL_PREFIX, c as GroupedTableBookingMode, d as GroupedTableInventoryUnit, e as GroupedTableProjectionError, L as LARGE_VENUE_INVENTORY_MODULE, M as MAX_EVENT_INVENTORY, f as MAX_GA_CAPACITY, g as MAX_ONE_PARTY_GUESTS, N as NotForSaleSelectionIssue, O as ONE_PARTY_LIMIT_MESSAGE, R as RestrictionChartDoc, h as RestrictionSeat, T as TicketOptionApplicabilityIssue, i as TicketSelection, j as TicketSelectionIssue, k as TicketSelectionOptions, l as TicketTierResolution, m as applicableTicketTiers, n as companionSelectionIssue, o as eventInventoryLimitFor, p as gaAreasOf, q as gaBoxBounds, r as gaBoxMode, s as gaInventorySegments, t as gaUnitLabel, u as gaUnitLabels, v as gaUnitLabelsForModel, w as gaWheelchairPlaceCount, x as gaWheelchairUnitLabels, y as groupedTableInventory, z as growJoinedGAInventory, A as isFullChartDoc, B as isGaUnitLabel, E as resolveTicketTierForSeat, F as ticketOptionNotApplicableIssue, H as ticketSelectionIssue, I as ticketTierAppliesToSeat, J as validGAInventorySegments } from '../../ticketRestrictions-BEHxDUyd.js';
4
+ export { C as ClientInventoryModelVersion, a as CompanionSelectionIssue, D as DEFAULT_EVENT_INVENTORY_LIMIT, G as GABoxMode, b as GA_UNIT_LABEL_PREFIX, c as GroupedTableBookingMode, d as GroupedTableInventoryUnit, e as GroupedTableProjectionError, L as LARGE_VENUE_INVENTORY_MODULE, M as MAX_EVENT_INVENTORY, f as MAX_GA_CAPACITY, g as MAX_ONE_PARTY_GUESTS, N as NotForSaleSelectionIssue, O as ONE_PARTY_LIMIT_MESSAGE, R as RestrictionChartDoc, h as RestrictionSeat, T as TicketOptionApplicabilityIssue, i as TicketSelection, j as TicketSelectionIssue, k as TicketSelectionOptions, l as TicketTierResolution, m as applicableTicketTiers, n as companionSelectionIssue, o as eventInventoryLimitFor, p as gaAreasOf, q as gaBoxBounds, r as gaBoxMode, s as gaInventorySegments, t as gaUnitLabel, u as gaUnitLabels, v as gaUnitLabelsForModel, w as gaWheelchairPlaceCount, x as gaWheelchairUnitLabels, y as groupedTableInventory, z as growJoinedGAInventory, A as isFullChartDoc, B as isGaUnitLabel, E as resolveTicketTierForSeat, F as ticketOptionNotApplicableIssue, H as ticketSelectionIssue, I as ticketTierAppliesToSeat, J as validGAInventorySegments } from '../../ticketRestrictions-DUuUJygM.js';
5
5
 
6
6
  /**
7
7
  * Best-available seat selection — a PURE, fully unit-testable ranking function.
@@ -1 +1 @@
1
- import{a as D,b as Y,c as $,d as q,e as H,f as Q,g as U,h as V,i as Z,j as tt,k as nt,l as ot,m as et}from"../../chunk-BF3XROP5.js";import{a as ut,b as lt,c as pt,d as ft}from"../../chunk-KYPY7GWB.js";import{a as m}from"../../chunk-TZBJCAXH.js";import{a as rt,b as it,c as at,d as ct,e as st}from"../../chunk-IEBXXGQC.js";import"../../chunk-QFX6XSO6.js";import"../../chunk-P2BTUNG6.js";import"../../chunk-GUNNA5LB.js";import"../../chunk-TFYAMLCK.js";import"../../chunk-EE2CVYFJ.js";import"../../chunk-URW7MSCJ.js";import{a as C,b as N,c as g,d as k,e as G,f as B,g as W,h as A,i as E,j as F,k as T,l as L,m as X,n as K,o as J,p as z}from"../../chunk-UKODEMIM.js";import{Za as f,d as _,e as v,f as I,g as j}from"../../chunk-HKVCBUON.js";import"../../chunk-KTMZ3QAO.js";import"../../chunk-JBOTRSMY.js";import"../../chunk-CRCGO52K.js";var b=1,d=100;function w(t,n){if(!Number.isInteger(n)||n<b||n>d)return null;let e=t.rotation*Math.PI/180,i={x:Math.cos(e),y:Math.sin(e)},o={x:-i.y,y:i.x};return Array.from({length:n},(r,a)=>{let c=t.style==="intertwined"&&a%2===1?t.seatSpacing/2:0;return{type:"row",id:`__block_preview_${a}`,label:"",origin:{x:t.origin.x+o.x*a*t.rowGap+i.x*c,y:t.origin.y+o.y*a*t.rowGap+i.y*c},rotation:t.rotation,curve:t.curve,seatCount:t.seatsPerRow,seatSpacing:t.seatSpacing,categoryKey:"__preview__"}})}function x(t,n=t.rowCount){let e=w(t,n);return e?.length?f(e[e.length-1]):null}function xt(t,n){if(!Number.isFinite(n.x)||!Number.isFinite(n.y)||t.rowGap<=0)return null;let e=x(t,1);if(!e)return null;let i=t.rotation*Math.PI/180,o={x:-Math.sin(i),y:Math.cos(i)},r=(n.x-e.x)*o.x+(n.y-e.y)*o.y,a=Math.max(b,Math.min(d,Math.round(r/t.rowGap)+1)),c=x(t,a);return c?{rowCount:a,edgePoint:c}:null}function bt(t,n){return t.length!==n.rowCount?!1:[...t].sort((i,o)=>(i.rowBlockGeneration?.rowIndex??1/0)-(o.rowBlockGeneration?.rowIndex??1/0)).every((i,o)=>{let r=i.rowBlockGeneration;return r?.kind==="row-block-v1"&&r.groupId===n.groupId&&r.rowIndex===o&&r.signature===n.signature&&JSON.stringify(r)===JSON.stringify({...n,rowIndex:o})})}var s=1,u=300,y=330;function l(t){return t.seatCount>1?t.curve/(t.seatCount-1):0}function h(t,n){let e=t.rotation*Math.PI/180,i=l(t)*Math.PI/180,o,r;if(Math.abs(i)<1e-9)o=n*t.seatSpacing,r=0;else{let a=t.seatSpacing/(2*Math.sin(Math.abs(i)/2)),c=i*n;o=a*Math.sin(c),r=-a+a*Math.cos(c)}return{x:t.origin.x+o*Math.cos(e)-r*Math.sin(e),y:t.origin.y+o*Math.sin(e)+r*Math.cos(e)}}function M(t,n,e){let i=(t??[]).map(o=>({...o,index:o.index+n})).filter(o=>o.index>=0&&o.index<e);return i.length?i:void 0}function R(t,n){if(t.path||!Number.isInteger(n)||n<s||n>u)return null;let e=l(t);return{...t,seatCount:n,curve:e*(n-1)}}function O(t,n){if(t.path||!Number.isInteger(n)||n<s||n>u)return null;let e=l(t),i=t.seatCount-n,o=-i;return{...t,origin:h(t,i),rotation:m(t.rotation-e*i),seatCount:n,curve:e*(n-1),overrides:M(t.overrides,o,n)}}function P(t,n=t.seatCount){let e=R(t,n);return e?h(e,n-1):null}function S(t,n=t.seatCount){return O(t,n)?.origin??null}function ht(t,n){if(t.path||!Number.isFinite(n.x)||!Number.isFinite(n.y))return null;let e=l(t),i=Math.abs(e)<1e-9?u:Math.min(u,Math.floor(y/Math.abs(e))+1),o=null;for(let r=s;r<=Math.max(s,i);r+=1){let a=P(t,r);if(!a)continue;let c=Math.hypot(a.x-n.x,a.y-n.y),p=e*(r-1);(!o||c<o.distance||c===o.distance&&r<o.seatCount)&&(o={seatCount:r,curve:p,endpoint:a,distance:c})}return o}function wt(t,n){if(t.path||!Number.isFinite(n.x)||!Number.isFinite(n.y))return null;let e=l(t),i=Math.abs(e)<1e-9?u:Math.min(u,Math.floor(y/Math.abs(e))+1),o=null;for(let r=s;r<=Math.max(s,i);r+=1){let a=S(t,r);if(!a)continue;let c=Math.hypot(a.x-n.x,a.y-n.y),p=e*(r-1);(!o||c<o.distance||c===o.distance&&r<o.seatCount)&&(o={seatCount:r,curve:p,endpoint:a,distance:c})}return o}export{rt as CATEGORY_INVENTORY_FAMILIES,v as DEFAULT_EVENT_INVENTORY_LIMIT,C as GA_UNIT_LABEL_PREFIX,ot as GroupedTableProjectionError,I as LARGE_VENUE_INVENTORY_MODULE,y as MAX_DIRECT_ROW_SWEEP,_ as MAX_EVENT_INVENTORY,g as MAX_GA_CAPACITY,W as MAX_ONE_PARTY_GUESTS,d as MAX_ROW_BLOCK_ROWS,u as MAX_ROW_SEATS,b as MIN_ROW_BLOCK_ROWS,s as MIN_ROW_SEATS,A as ONE_PARTY_LIMIT_MESSAGE,H as applicableTicketTiers,Z as behindStageLabels,pt as capacityControl,lt as categoryCapacity,ut as chartCapacity,U as companionSelectionIssue,ct as describeCategoryInventoryConflict,it as effectiveSeatOwnerCategoryCounts,j as eventInventoryLimitFor,z as gaAreasOf,F as gaBoxBounds,E as gaBoxMode,B as gaInventorySegments,k as gaUnitLabel,T as gaUnitLabels,L as gaUnitLabelsForModel,X as gaWheelchairPlaceCount,K as gaWheelchairUnitLabels,et as groupedTableInventory,J as growJoinedGAInventory,at as inspectCategoryInventoryConflicts,bt as intactRowBlockMembers,Y as isFullChartDoc,N as isGaUnitLabel,tt as pickBestAvailable,nt as pickBestAvailableInventory,st as remediateCategoryInventoryConflicts,ft as resizeChartCapacity,xt as resolveRowBlockCount,wt as resolveRowStartCapacity,ht as resolveRowTerminalCapacity,Q as resolveTicketTierForSeat,x as rowBlockEdgePoint,w as rowBlockPreviewRows,S as rowStartEndpoint,P as rowTerminalEndpoint,O as rowWithStartCapacity,R as rowWithTerminalCapacity,D as strandedSingles,$ as ticketOptionNotApplicableIssue,V as ticketSelectionIssue,q as ticketTierAppliesToSeat,G as validGAInventorySegments};
1
+ import{a as D,b as Y,c as $,d as q,e as H,f as Q,g as U,h as V,i as Z,j as tt,k as nt,l as ot,m as et}from"../../chunk-BF3XROP5.js";import{a as ut,b as lt,c as pt,d as ft}from"../../chunk-GCIZT3CV.js";import{a as m}from"../../chunk-TZBJCAXH.js";import{a as rt,b as it,c as at,d as ct,e as st}from"../../chunk-4SHLBEG5.js";import"../../chunk-QFX6XSO6.js";import"../../chunk-DO545QTN.js";import"../../chunk-4LW4TZZR.js";import"../../chunk-TFYAMLCK.js";import"../../chunk-DDQWZ323.js";import"../../chunk-522ENS2Q.js";import{a as C,b as N,c as g,d as k,e as G,f as B,g as W,h as A,i as E,j as F,k as T,l as L,m as X,n as K,o as J,p as z}from"../../chunk-UKODEMIM.js";import{Za as f,d as _,e as v,f as I,g as j}from"../../chunk-HKVCBUON.js";import"../../chunk-KTMZ3QAO.js";import"../../chunk-JBOTRSMY.js";import"../../chunk-CRCGO52K.js";var b=1,d=100;function w(t,n){if(!Number.isInteger(n)||n<b||n>d)return null;let e=t.rotation*Math.PI/180,i={x:Math.cos(e),y:Math.sin(e)},o={x:-i.y,y:i.x};return Array.from({length:n},(r,a)=>{let c=t.style==="intertwined"&&a%2===1?t.seatSpacing/2:0;return{type:"row",id:`__block_preview_${a}`,label:"",origin:{x:t.origin.x+o.x*a*t.rowGap+i.x*c,y:t.origin.y+o.y*a*t.rowGap+i.y*c},rotation:t.rotation,curve:t.curve,seatCount:t.seatsPerRow,seatSpacing:t.seatSpacing,categoryKey:"__preview__"}})}function x(t,n=t.rowCount){let e=w(t,n);return e?.length?f(e[e.length-1]):null}function xt(t,n){if(!Number.isFinite(n.x)||!Number.isFinite(n.y)||t.rowGap<=0)return null;let e=x(t,1);if(!e)return null;let i=t.rotation*Math.PI/180,o={x:-Math.sin(i),y:Math.cos(i)},r=(n.x-e.x)*o.x+(n.y-e.y)*o.y,a=Math.max(b,Math.min(d,Math.round(r/t.rowGap)+1)),c=x(t,a);return c?{rowCount:a,edgePoint:c}:null}function bt(t,n){return t.length!==n.rowCount?!1:[...t].sort((i,o)=>(i.rowBlockGeneration?.rowIndex??1/0)-(o.rowBlockGeneration?.rowIndex??1/0)).every((i,o)=>{let r=i.rowBlockGeneration;return r?.kind==="row-block-v1"&&r.groupId===n.groupId&&r.rowIndex===o&&r.signature===n.signature&&JSON.stringify(r)===JSON.stringify({...n,rowIndex:o})})}var s=1,u=300,y=330;function l(t){return t.seatCount>1?t.curve/(t.seatCount-1):0}function h(t,n){let e=t.rotation*Math.PI/180,i=l(t)*Math.PI/180,o,r;if(Math.abs(i)<1e-9)o=n*t.seatSpacing,r=0;else{let a=t.seatSpacing/(2*Math.sin(Math.abs(i)/2)),c=i*n;o=a*Math.sin(c),r=-a+a*Math.cos(c)}return{x:t.origin.x+o*Math.cos(e)-r*Math.sin(e),y:t.origin.y+o*Math.sin(e)+r*Math.cos(e)}}function M(t,n,e){let i=(t??[]).map(o=>({...o,index:o.index+n})).filter(o=>o.index>=0&&o.index<e);return i.length?i:void 0}function R(t,n){if(t.path||!Number.isInteger(n)||n<s||n>u)return null;let e=l(t);return{...t,seatCount:n,curve:e*(n-1)}}function O(t,n){if(t.path||!Number.isInteger(n)||n<s||n>u)return null;let e=l(t),i=t.seatCount-n,o=-i;return{...t,origin:h(t,i),rotation:m(t.rotation-e*i),seatCount:n,curve:e*(n-1),overrides:M(t.overrides,o,n)}}function P(t,n=t.seatCount){let e=R(t,n);return e?h(e,n-1):null}function S(t,n=t.seatCount){return O(t,n)?.origin??null}function ht(t,n){if(t.path||!Number.isFinite(n.x)||!Number.isFinite(n.y))return null;let e=l(t),i=Math.abs(e)<1e-9?u:Math.min(u,Math.floor(y/Math.abs(e))+1),o=null;for(let r=s;r<=Math.max(s,i);r+=1){let a=P(t,r);if(!a)continue;let c=Math.hypot(a.x-n.x,a.y-n.y),p=e*(r-1);(!o||c<o.distance||c===o.distance&&r<o.seatCount)&&(o={seatCount:r,curve:p,endpoint:a,distance:c})}return o}function wt(t,n){if(t.path||!Number.isFinite(n.x)||!Number.isFinite(n.y))return null;let e=l(t),i=Math.abs(e)<1e-9?u:Math.min(u,Math.floor(y/Math.abs(e))+1),o=null;for(let r=s;r<=Math.max(s,i);r+=1){let a=S(t,r);if(!a)continue;let c=Math.hypot(a.x-n.x,a.y-n.y),p=e*(r-1);(!o||c<o.distance||c===o.distance&&r<o.seatCount)&&(o={seatCount:r,curve:p,endpoint:a,distance:c})}return o}export{rt as CATEGORY_INVENTORY_FAMILIES,v as DEFAULT_EVENT_INVENTORY_LIMIT,C as GA_UNIT_LABEL_PREFIX,ot as GroupedTableProjectionError,I as LARGE_VENUE_INVENTORY_MODULE,y as MAX_DIRECT_ROW_SWEEP,_ as MAX_EVENT_INVENTORY,g as MAX_GA_CAPACITY,W as MAX_ONE_PARTY_GUESTS,d as MAX_ROW_BLOCK_ROWS,u as MAX_ROW_SEATS,b as MIN_ROW_BLOCK_ROWS,s as MIN_ROW_SEATS,A as ONE_PARTY_LIMIT_MESSAGE,H as applicableTicketTiers,Z as behindStageLabels,pt as capacityControl,lt as categoryCapacity,ut as chartCapacity,U as companionSelectionIssue,ct as describeCategoryInventoryConflict,it as effectiveSeatOwnerCategoryCounts,j as eventInventoryLimitFor,z as gaAreasOf,F as gaBoxBounds,E as gaBoxMode,B as gaInventorySegments,k as gaUnitLabel,T as gaUnitLabels,L as gaUnitLabelsForModel,X as gaWheelchairPlaceCount,K as gaWheelchairUnitLabels,et as groupedTableInventory,J as growJoinedGAInventory,at as inspectCategoryInventoryConflicts,bt as intactRowBlockMembers,Y as isFullChartDoc,N as isGaUnitLabel,tt as pickBestAvailable,nt as pickBestAvailableInventory,st as remediateCategoryInventoryConflicts,ft as resizeChartCapacity,xt as resolveRowBlockCount,wt as resolveRowStartCapacity,ht as resolveRowTerminalCapacity,Q as resolveTicketTierForSeat,x as rowBlockEdgePoint,w as rowBlockPreviewRows,S as rowStartEndpoint,P as rowTerminalEndpoint,O as rowWithStartCapacity,R as rowWithTerminalCapacity,D as strandedSingles,$ as ticketOptionNotApplicableIssue,V as ticketSelectionIssue,q as ticketTierAppliesToSeat,G as validGAInventorySegments};
@@ -1 +1 @@
1
- "use strict";var ye=Object.defineProperty;var Wt=Object.getOwnPropertyDescriptor;var qt=Object.getOwnPropertyNames;var Qt=Object.prototype.hasOwnProperty;var Zt=(e,t)=>{for(var n in t)ye(e,n,{get:t[n],enumerable:!0})},Jt=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of qt(t))!Qt.call(e,r)&&r!==n&&ye(e,r,{get:()=>t[r],enumerable:!(o=Wt(t,r))||o.enumerable});return e};var en=e=>Jt(ye({},"__esModule",{value:!0}),e);var Zo={};Zt(Zo,{AUTOMATIC_ROUND_TABLE_RADIUS_MAX:()=>pt,AUTOMATIC_ROUND_TABLE_RADIUS_MIN:()=>bt,CHAIR_NUMBERING_DIRECTIONS:()=>it,CHAIR_NUMBERING_FORMATS:()=>at,CHAIR_NUMBERING_START_MAX:()=>Ie,DEFAULT_SEAT_RADIUS:()=>Vt,FLOOR_COVER_LIMIT:()=>Gt,FLOOR_STACK_GAP_RATIO:()=>Nt,FLOOR_STACK_MIN_SURFACE_PX:()=>Do,LEVEL_CONTEXT_PREFIX:()=>be,TABLE_SEAT_OFFSET:()=>G,TEXT_BACKGROUND_PADDING_MAX:()=>dr,TEXT_BACKGROUND_RADIUS_MAX:()=>fr,TEXT_LETTER_SPACING_MAX:()=>lr,TEXT_LETTER_SPACING_MIN:()=>cr,TEXT_LINE_HEIGHT_MAX:()=>sr,TEXT_LINE_HEIGHT_MIN:()=>ar,TEXT_OPACITY_MIN:()=>ur,TEXT_WIDTH_MAX:()=>ir,TEXT_WIDTH_MIN:()=>rr,aisleSeatIds:()=>Yt,allObjects:()=>_t,automaticRoundTableRadius:()=>to,buildAisleHoles:()=>on,buildSeatIndex:()=>Ho,buildSectionShell:()=>nn,chairNumberingProblem:()=>Tn,chartBounds:()=>X,combinedFloorZoneId:()=>Ne,compactChairNumbering:()=>Ln,cubicPoint:()=>ae,distanceToRings:()=>$e,distributeAlongCubic:()=>ge,effectiveFloorOverview:()=>Ht,expandBooth:()=>At,expandChart:()=>Fe,expandRow:()=>Rt,expandRowSlots:()=>kt,expandTable:()=>Et,expandTableSlots:()=>_e,floorObjects:()=>wo,floorStackPlacements:()=>Bt,floorsOf:()=>Q,gridStats:()=>Xo,hitTest:()=>Go,initialFloorMode:()=>jo,isAisleSeat:()=>Wo,isRowAisleSeats:()=>Z,layoutCombinedFloorPlan:()=>Oo,layoutFloorStack:()=>Ro,levelContextOutlines:()=>To,mainFloorId:()=>_o,mergeRowAisleSeats:()=>Qo,nearestWithin:()=>Vo,objectCenter:()=>je,owningSectionForObject:()=>Lt,pointInPolygon:()=>Le,pointInPolygonWithHoles:()=>U,pointOnPolygonBoundary:()=>Tt,polygonArea:()=>Me,polygonInscribedAnchor:()=>we,polygonLabelPoint:()=>De,polygonNetArea:()=>cn,queryRect:()=>Uo,resolveRowAisleSeats:()=>$o,resolveSegmentedRowGroups:()=>te,rowInventoryCount:()=>xo,rowSeatPositions:()=>me,segmentedRowComponentSeats:()=>vn,segmentedRowComponents:()=>wn,segmentedRowSeatTotal:()=>Pn,smoothCubicThroughMiddle:()=>tn,splitRowAisleSeats:()=>qo,stackFloors:()=>vo,suggestedFloorOverview:()=>Eo,tableChairBookingLabel:()=>Ce,tableChairDisplayLabel:()=>ke,tableChairToken:()=>st,tableInventoryCount:()=>So,tableSeatCountsBySide:()=>Ot,textLayoutMetrics:()=>xe,translateObject:()=>he,usableHoles:()=>V});module.exports=en(Zo);var er=Math.PI/180;function T(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function L(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function ae(e,t){let n=1-t,o=n*n*n,r=3*n*n*t,i=3*n*t*t,a=t*t*t;return{x:o*e.start.x+r*e.control1.x+i*e.control2.x+a*e.end.x,y:o*e.start.y+r*e.control1.y+i*e.control2.y+a*e.end.y}}function tn(e,t,n){let o={x:(e.x+t.x)/2,y:(e.y+t.y)/2},r={x:(n.x-o.x)*4/3,y:(n.y-o.y)*4/3};return{start:{...e},control1:{x:e.x+(t.x-e.x)/3+r.x,y:e.y+(t.y-e.y)/3+r.y},control2:{x:e.x+(t.x-e.x)*2/3+r.x,y:e.y+(t.y-e.y)*2/3+r.y},end:{...t}}}function ge(e,t,n=192){if(!Number.isInteger(t)||t<1)throw new Error("Path point count must be a positive integer");if(t===1)return[ae(e,.5)];let o=Array.from({length:n+1},(u,c)=>ae(e,c/n)),r=new Float64Array(o.length);for(let u=1;u<o.length;u+=1){let c=o[u].x-o[u-1].x,l=o[u].y-o[u-1].y;r[u]=r[u-1]+Math.hypot(c,l)}let i=r[r.length-1];if(i<=1e-9)return Array.from({length:t},()=>({...e.start}));let a=[],s=1;for(let u=0;u<t;u+=1){let c=i*u/(t-1);for(;s<r.length-1&&r[s]<c;)s+=1;let l=r[s-1],d=r[s],m=d===l?0:(c-l)/(d-l);a.push({x:o[s-1].x+(o[s].x-o[s-1].x)*m,y:o[s-1].y+(o[s].y-o[s-1].y)*m})}return a}function _(e,t){return{x:e.x+t.x,y:e.y+t.y}}function J(e,t){return{x:e.x-t.x,y:e.y-t.y}}function D(e,t){return{x:e.x*t,y:e.y*t}}function se(e,t=13){return Array.from({length:t},(n,o)=>ae(e,o/(t-1)))}function Ve(e,t){let n=Math.max(0,Math.min(1,t))*(e.length-1),o=Math.min(e.length-2,Math.floor(n));return L(e[o],e[o+1],n-o)}function Ue(e,t,n){let o=Math.max(0,Math.min(1,t)),r=Math.max(o,Math.min(1,n)),i=[Ve(e,o)];for(let a=1;a<e.length-1;a+=1){let s=a/(e.length-1);s>o+1e-9&&s<r-1e-9&&i.push(e[a])}return i.push(Ve(e,r)),i}function Xe(e,t){let n=[[0,1],[1,2],[2,3],[3,0]],o=0,r=Number.POSITIVE_INFINITY;n.forEach(([m,p],y)=>{let b=T(L(e[m],e[p],.5),t);b<r&&(r=b,o=y)});let i=e[o],a=e[(o+1)%4],s=e[(o+2)%4],u=e[(o+3)%4],c=L(i,a,.5),l=J(t,c),d=Math.max(1e-9,Math.hypot(l.x,l.y));return{p0:i,p1:a,p2:s,p3:u,normal:D(l,1/d),depth:(T(i,u)+T(a,s))/2}}function Ke(e){let{p0:t,p1:n,p2:o,p3:r,normal:i,depth:a}=e,s=J(n,t),u=J(o,r),c=a*.22,l=a*.12;return{nearPath:{start:t,control1:_(_(t,D(s,1/3)),D(i,c)),control2:_(_(t,D(s,2/3)),D(i,c)),end:n},farPath:{start:o,control1:_(_(r,D(u,2/3)),D(i,l)),control2:_(_(r,D(u,1/3)),D(i,l)),end:r}}}function nn(e,t,n){if(e.length!==4)throw new Error("A section shell requires four mapped bounds corners");let o=e.reduce((y,b)=>_(y,b),{x:0,y:0});o.x/=4,o.y/=4;let r=T(e[0],e[1]),i=T(e[0],e[3]),a=n==="auto"?r>i*1.25&&T(o,t)>i?"bezier":"tapered":n;if(a==="rectangle")return{mode:a,outline:e.map(y=>({...y}))};let s=Xe(e,t),{p0:u,p1:c,p2:l,p3:d}=s;if(a==="tapered")return{mode:a,outline:[_(u,D(J(c,u),.14)),_(u,D(J(c,u),1-.14)),l,d]};let{nearPath:m,farPath:p}=Ke(s);return{mode:a,outline:[...se(m),...se(p).slice(1)]}}function on(e,t,n,o){if(e.length!==4)throw new Error("Aisle generation requires four mapped bounds corners");if(!Number.isInteger(n)||n<0||n>3)throw new Error("Aisle count must be an integer from 0 to 3");if(n===0)return[];let r=Xe(e,t),{p0:i,p1:a,p2:s,p3:u}=r,c=o==="bezier"?Ke(r):null,l=c?se(c.nearPath):null,d=c?se(c.farPath).reverse():null,m=Math.min(.055,.18/(n+1));return Array.from({length:n},(p,y)=>{let b=(y+1)/(n+1),M=b-m/2,v=b+m/2;return l&&d?[...Ue(l,M,v),...Ue(d,M,v).reverse()]:[L(i,a,M),L(i,a,v),L(u,s,v),L(u,s,M)]})}var rr=40,ir=1200,ar=.8,sr=3,cr=-2,lr=20,ur=.1,dr=40,fr=40,Ye=e=>Math.max(1,e.fontSize*.6+(e.letterSpacing??0));function rn(e,t){let n=e.text.split(/\r?\n/);if(!e.width)return Math.max(1,n.length);let o=Math.max(1,Math.floor(t/Ye(e))),r=0;for(let i of n){if(!i.length){r+=1;continue}let a=0;for(let s of i.split(/\s+/)){let u=s.length;a&&a+1+u<=o?a+=1+u:(r+=Math.max(1,Math.ceil(u/o)),a=u%o)}}return Math.max(1,r)}function xe(e){let t=e.background?.padding??0,n=e.text.split(/\r?\n/),o=Math.max(1,...n.map(s=>s.length))*Ye(e),r=e.width??o+t*2,i=Math.max(1,r-t*2),a=rn(e,i);return{width:r,height:a*e.fontSize*(e.lineHeight??1.2)+t*2,lineCount:a,padding:t}}function an(e,t,n){let o=n.x-t.x,r=n.y-t.y,i=o*o+r*r,a=i?Math.max(0,Math.min(1,((e.x-t.x)*o+(e.y-t.y)*r)/i)):0;return Math.hypot(e.x-(t.x+a*o),e.y-(t.y+a*r))}function $e(e,t){let n=1/0;for(let o of t)if(!(o.length<2))for(let r=0,i=o.length-1;r<o.length;i=r++){let a=an(e,o[i],o[r]);a<n&&(n=a)}return n}function ze(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,a=t[o].y,s=t[r].x,u=t[r].y;a>e.y!=u>e.y&&e.x<(s-i)*(e.y-a)/(u-a)+i&&(n=!n)}return n}function We(e){return Array.isArray(e)?e.filter(t=>Array.isArray(t)&&t.length>=3):[]}function sn(e,t,n){let o=ze(e,t)&&!n.some(i=>ze(e,i)),r=$e(e,[t,...n]);return o?r:-r}function Y(e,t,n,o,r){let i=sn({x:e,y:t},o,r);return{x:e,y:t,h:n,d:i,max:i+n*Math.SQRT2}}var Se=class{constructor(){this.items=[]}get size(){return this.items.length}push(t){let n=this.items;n.push(t);let o=n.length-1;for(;o>0;){let r=o-1>>1;if(n[r].max>=n[o].max)break;[n[r],n[o]]=[n[o],n[r]],o=r}}pop(){let t=this.items,n=t[0],o=t.pop();if(t.length&&o){t[0]=o;let r=0;for(;;){let i=r*2+1,a=i+1,s=r;if(i<t.length&&t[i].max>t[s].max&&(s=i),a<t.length&&t[a].max>t[s].max&&(s=a),s===r)break;[t[s],t[r]]=[t[r],t[s]],r=s}}return n}};function Me(e){if(e.length<3)return 0;let t=0;for(let n=0,o=e.length-1;n<e.length;o=n++)t+=(e[o].x+e[n].x)*(e[o].y-e[n].y);return Math.abs(t)/2}function cn(e,t){return Math.max(0,Me(e)-We(t).reduce((n,o)=>n+Me(o),0))}function we(e,t){let n=We(t);if(!e.length)return{point:{x:0,y:0},radius:0};if(e.length<3){let b=e.reduce((v,C)=>v+C.x,0)/e.length,M=e.reduce((v,C)=>v+C.y,0)/e.length;return{point:{x:b,y:M},radius:0}}let o=1/0,r=1/0,i=-1/0,a=-1/0;for(let b of e)b.x<o&&(o=b.x),b.y<r&&(r=b.y),b.x>i&&(i=b.x),b.y>a&&(a=b.y);let s=i-o,u=a-r,c=Math.min(s,u);if(!(c>0))return{point:{x:(o+i)/2,y:(r+a)/2},radius:0};let l=Math.max(s,u)/150,d=new Se,m=c/2;for(let b=o;b<i;b+=c)for(let M=r;M<a;M+=c)d.push(Y(b+m,M+m,m,e,n));let p=Y(o+s/2,r+u/2,0,e,n),y=0;for(;d.size;){let b=d.pop();if(!b)break;b.d>p.d&&(p=b),!(b.max-p.d<=l)&&(y>=4e3||(y+=1,m=b.h/2,d.push(Y(b.x-m,b.y-m,m,e,n)),d.push(Y(b.x+m,b.y-m,m,e,n)),d.push(Y(b.x-m,b.y+m,m,e,n)),d.push(Y(b.x+m,b.y+m,m,e,n))))}return{point:{x:p.x,y:p.y},radius:Math.max(0,p.d)}}function ee(e,t,n){return Math.max(t,Math.min(n,e))}function N(e,t,n){return e<t?t:e>n?n:e}function ln(e){return ee(e,0,1)}function qe(e){let t=ln(e);return t*t*(3-2*t)}var z=Math.PI*2;function $(e){return Number.isFinite(e.x)&&Number.isFinite(e.y)}function un(e,t,n){let o=t-e;if(n){for(;o<0;)o+=z;for(;o>=z;)o-=z}else{for(;o>0;)o-=z;for(;o<=-z;)o+=z}return o}function Je(e){if(e.version!==1||e.closed!==!0||!$(e.start)||!Array.isArray(e.segments)||e.segments.length<2||e.segments.length>512)return!1;let t=e.start;for(let n of e.segments){if(!n||!$(n.end))return!1;if(n.kind==="line"){if(T(t,n.end)<=1e-9)return!1}else if(n.kind==="bezier"){if(!$(n.control1)||!$(n.control2)||T(t,n.end)<=1e-9)return!1}else if(n.kind==="arc"){if(!$(n.center)||!Number.isFinite(n.radius)||n.radius<=1e-6||Math.abs(T(t,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||Math.abs(T(n.end,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||T(t,n.end)<=1e-9)return!1}else return!1;t=n.end}return T(t,e.start)<=1e-4}function dn(e,t,n){let o=1-n;return{x:o**3*e.x+3*o**2*n*t.control1.x+3*o*n**2*t.control2.x+n**3*t.end.x,y:o**3*e.y+3*o**2*n*t.control1.y+3*o*n**2*t.control2.y+n**3*t.end.y}}function et(e,t=2){if(!Je(e))throw new Error("Section outline path is invalid");let n=Math.max(.25,t),o=[{...e.start}],r=e.start;for(let i of e.segments){if(i.kind==="line")o.push({...i.end});else if(i.kind==="arc"){let a=Math.atan2(r.y-i.center.y,r.x-i.center.x),s=Math.atan2(i.end.y-i.center.y,i.end.x-i.center.x),u=un(a,s,i.clockwise),c=Math.max(2,Math.ceil(Math.abs(u)*i.radius/n));for(let l=1;l<=c;l+=1){let d=a+u*l/c;o.push({x:i.center.x+Math.cos(d)*i.radius,y:i.center.y+Math.sin(d)*i.radius})}}else{let a=T(r,i.control1)+T(i.control1,i.control2)+T(i.control2,i.end),s=Math.max(2,Math.ceil(a/n));for(let u=1;u<=s;u+=1)o.push(dn(r,i,u/s))}r=i.end}return T(o[o.length-1],o[0])<=1e-4&&o.pop(),o}function tt(e,t,n){return fn(e,r=>({x:r.x+t,y:r.y+n}))}function fn(e,t,n=1,o=!1){return{...e,start:t(e.start),segments:e.segments.map(r=>r.kind==="line"?{...r,end:t(r.end)}:r.kind==="arc"?{...r,center:t(r.center),radius:r.radius*Math.abs(n),clockwise:o?!r.clockwise:r.clockwise,end:t(r.end)}:{...r,control1:t(r.control1),control2:t(r.control2),end:t(r.end)})}}var mn=45,ve=150,hn=60;function bn(e){let t=mn/100;if(e<=t)return ve;let n=Math.min(1,(e-t)/(1-t));return ve-n*(ve-hn)}var Qe=.5523;function Ze(e,t){return Math.abs(e.x-t.x)<=1e-6&&Math.abs(e.y-t.y)<=1e-6}function pn(e){let t=[],n=[];for(e.forEach((o,r)=>{$(o)&&(t.length&&Ze(t[t.length-1],o)||(t.push({x:o.x,y:o.y}),n.push(r)))});t.length>1&&Ze(t[0],t[t.length-1]);)t.pop(),n.pop();return{points:t,sourceIndex:n}}var yn=.5,gn=4/3;function xn(e,t,n){let o=t.x-e.x,r=t.y-e.y,i=Math.hypot(o,r);if(i<=1e-9)return{kind:"line",end:{...t}};let a=-r/i,s=o/i,u=n*gn;return{kind:"bezier",control1:{x:e.x+o/3+a*u,y:e.y+r/3+s*u},control2:{x:e.x+o*2/3+a*u,y:e.y+r*2/3+s*u},end:{...t}}}function nt(e,t){let{points:n,sourceIndex:o}=pn(e),r=n.length;if(r<3)return null;let i=Math.min(100,Math.max(0,t.cornerSmoothing??0))/100,a=t.edgeCurvature,s=new Array(r).fill(0);if(a?.length)for(let x=0;x<r;x+=1){let g=a[o[x]];s[x]=Number.isFinite(g)?Math.min(100,Math.max(-100,g))/100:0}let u=s.some(x=>Math.abs(x)>1e-6);if(i<=0&&!u)return null;let c=t.wideAngleThresholdDeg??bn(i),l=[];for(let x=0;x<r;x+=1)l[x]=T(n[x],n[(x+1)%r]);let d=new Array(r).fill(0);for(let x=0;x<r;x+=1){let g=n[(x-1+r)%r],f=n[x],h=n[(x+1)%r],w={x:g.x-f.x,y:g.y-f.y},S={x:h.x-f.x,y:h.y-f.y},P=Math.hypot(w.x,w.y),E=Math.hypot(S.x,S.y);if(P<=1e-9||E<=1e-9)continue;let I=Math.min(1,Math.max(-1,(w.x*S.x+w.y*S.y)/(P*E))),k=Math.acos(I)*180/Math.PI;if(k<c)continue;let O=qe((k-c)/(180-c));d[x]=i*O*.5*Math.min(P,E)}for(let x=0;x<r;x+=1){let g=(x+1)%r,f=d[x]+d[g];if(f>l[x]&&f>1e-9){let h=l[x]/f;d[x]*=h,d[g]*=h}}let m=new Array(r),p=new Array(r);for(let x=0;x<r;x+=1){let g=n[(x-1+r)%r],f=n[x],h=n[(x+1)%r];if(d[x]<=1e-6){m[x]={...f},p[x]={...f};continue}let w=T(f,g)||1,S=T(f,h)||1;m[x]={x:f.x+(g.x-f.x)/w*d[x],y:f.y+(g.y-f.y)/w*d[x]},p[x]={x:f.x+(h.x-f.x)/S*d[x],y:f.y+(h.y-f.y)/S*d[x]}}if(d.every(x=>x<=1e-6)&&!u)return null;let y=[],b={...p[0]},M=b,v=(x,g)=>{if(T(M,x)<=1e-9)return;let f=s[g];Math.abs(f)>1e-6?y.push(xn(M,x,f*yn*l[g])):y.push({kind:"line",end:{...x}}),M=x};for(let x=1;x<=r;x+=1){let g=x%r,f=n[g];v(m[g],(x-1)%r),d[g]>1e-6&&T(m[g],p[g])>1e-9&&(y.push({kind:"bezier",control1:L(m[g],f,Qe),control2:L(p[g],f,Qe),end:{...p[g]}}),M=p[g])}if(!y.length)return null;let C=y[y.length-1];T(C.end,b)>1e-9&&(C.kind==="line"?C.end={...b}:y.push({kind:"line",end:{...b}}));let R={version:1,closed:!0,start:b,segments:y};return Je(R)?R:null}function Sn(e){let t=e.points??[];if(e.kind!=="polygon"||t.length<3||!Array.isArray(e.edgeCurvature))return[];let n=t.map((o,r)=>{let i=e.edgeCurvature[r];return Number.isFinite(i)?Math.min(100,Math.max(-100,i)):0});return n.some(o=>Math.abs(o)>.5)?n:[]}function Mn(e){let t=Sn(e);return t.length?nt(e.points,{edgeCurvature:t}):null}function ce(e,t=2){let n=Mn(e);return n?et(n,t):e.points??[]}function wn(e,t,n){let o=[];for(let r=0;r<e.length-1;r+=1){let i=e[r],a=e[r+1],s=Math.hypot(a.x-i.x,a.y-i.y);if(s<=0)continue;let u=Math.max(1,Math.round(s/n)),c=s/u,l=Math.atan2(a.y-i.y,a.x-i.x),d=r===0,p=(r>0?t[r-1]:void 0)==="break"?2:1,y=d?{...i}:{x:i.x+Math.cos(l)*c*p,y:i.y+Math.sin(l)*c*p},b=d?u+1:Math.max(1,u-(p-1));o.push({origin:y,rotation:l*180/Math.PI,seatCount:b,seatSpacing:c})}return o}function vn(e){let t=e.rotation*Math.PI/180,n={x:Math.cos(t),y:Math.sin(t)};return Array.from({length:e.seatCount},(o,r)=>({x:e.origin.x+n.x*r*e.seatSpacing,y:e.origin.y+n.y*r*e.seatSpacing}))}function Pn(e){return e.reduce((t,n)=>t+n.seatCount,0)}function te(e){let t=new Map,n=new Map;for(let o of e){if(o.type!=="row"||!o.segmentedRow)continue;let r=n.get(o.segmentedRow.groupId)??[];r.push(o),n.set(o.segmentedRow.groupId,r)}for(let[o,r]of n){let i=r.slice().sort((m,p)=>m.segmentedRow.componentIndex-p.segmentedRow.componentIndex),a=i[0]?.segmentedRow?.componentCount??0,s=i[0]?.segmentedRow;if(!s||!(a>=2&&i.length===a&&s?.boundaryBefore==="start"&&i.every((m,p)=>m.segmentedRow?.kind==="segmented-row-v1"&&m.segmentedRow.groupId===o&&m.segmentedRow.componentCount===a&&m.segmentedRow.componentIndex===p&&m.segmentedRow.repeatLabelOnComponents===s.repeatLabelOnComponents&&(p===0?m.segmentedRow.boundaryBefore==="start":m.segmentedRow.boundaryBefore!=="start")&&m.segmentedRow.displayLabel===s.displayLabel)))continue;let c=i.reduce((m,p)=>m+p.seatCount,0),l=0,d=0;for(let m of i)m.segmentedRow.boundaryBefore==="break"&&(l+=1),t.set(m.id,{groupId:o,adjacencyOffset:l,displayOffset:d,displayLabel:s.displayLabel,totalSeats:c,canonical:i[0],viewFromSeatUrl:s.viewFromSeatUrl,viewFromSeatMeta:s.viewFromSeatMeta,confidenceEvidence:s.confidenceEvidence}),l+=m.seatCount,d+=m.seatCount}return t}var In="ABCDEFGHIJKLMNOPQRSTUVWXYZ";var Cn="abcdefghijklmnopqrstuvwxyz";function kn(e,t){let n=t.length,o=e+1,r="";for(;o>0;){o-=1;let i=o%n;r=t[i]+r,o=Math.floor(o/n)}return r}function ne(e,t=!1){let n=t?Cn:In;return kn(Math.max(0,Math.floor(e)-1),n)}var Rn=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]];function ot(e){if(!Number.isFinite(e)||e<=0)return String(e);let t=Math.floor(e),n="";for(let[o,r]of Rn)for(;t>=o;)n+=r,t-=o;return n}function On(e){let t=new Array(e);return Array.from({length:e},(n,o)=>o).sort((n,o)=>Math.abs(2*n-(e-1))-Math.abs(2*o-(e-1))||n-o).forEach((n,o)=>t[n]=o),t}function le(e,t){let n=e.seatLabelStart??1,o=e.seatNumbering?.direction??"ltr",r=e.seatNumbering?.step??1,i=e.seatNumbering?.scheme??"decimal",a=e.seatNumbering?.prefix??"",s=e.seatNumbering?.endAt,u=e.seatCount;if(i==="updown"||i==="updown-descending"){let p=Math.ceil(u/2),y=i==="updown"?t<p?n+2*t:n-1+2*(u-t):t<p?n+2*(p-1-t):n+1+2*(t-p);return`${a}${y}`}let c=i==="odd"||i==="even"?2:r,l=s!=null&&Number.isFinite(s)?s-(u-1)*c:n,d=o==="center"?On(u)[t]:o==="rtl"?u-1-t:t,m;switch(i){case"odd":{let p=l%2===1?l:l+1;m=String(p+d*2);break}case"even":{let p=l%2===0?l:l+1;m=String(p+d*2);break}case"roman":m=ot(l+d*r);break;case"letters-upper":m=ne(l+d*r,!1);break;case"letters-lower":m=ne(l+d*r,!0);break;default:m=String(l+d*r);break}return`${a}${m}`}function En(e){return{...e.canonical,seatCount:e.totalSeats,label:e.displayLabel,displayLabel:e.displayLabel}}function rt(e,t,n){return n?.label??`${e.seatLabelBase??e.label}-${le(e,t)}`}function Pe(e,t,n,o){if(o?.displayLabel)return o.displayLabel;if(e.seatDisplayLabelMode==="number")return le(e,t);if(!n)return`${e.displayLabel||e.label}-${le(e,t)}`;let r=En(n),i=n.displayOffset+t;return`${n.displayLabel}-${le(r,i)}`}var Ie=999,it=["clockwise","anticlockwise"],at=["table-number","number","letter"];function Ce(e,t){return`${e.label}-${t+1}`}function An(e,t,n){return e?.direction==="anticlockwise"?Math.max(0,t-1-n):n}function st(e,t){let n=e.chairNumbering,o=n?.start??1,r=An(n,Math.max(0,Math.round(e.seatCount)),t);return n?.format==="letter"?ne(Math.max(1,o)+r):String(o+r)}function ke(e,t){let n=st(e,t);return(e.chairNumbering?.format??"table-number")==="table-number"?`${e.displayLabel??e.label}-${n}`:n}function Tn(e){if(e===void 0)return null;if(!e||typeof e!="object"||Array.isArray(e))return"chairNumbering must be an object";let t=e,n=Object.keys(t).filter(o=>!["start","direction","format"].includes(o));return n.length?`chairNumbering has unsupported field(s): ${n.join(", ")}`:t.start!==void 0&&(!Number.isInteger(t.start)||t.start<0||t.start>Ie)?`chairNumbering.start must be a whole number from 0 to ${Ie}`:t.direction!==void 0&&!it.includes(t.direction)?"chairNumbering.direction must be clockwise or anticlockwise":t.format!==void 0&&!at.includes(t.format)?"chairNumbering.format must be table-number, number or letter":null}function Ln(e){let t={};return e.start!==void 0&&e.start!==1&&(t.start=e.start),e.direction==="anticlockwise"&&(t.direction="anticlockwise"),e.format&&e.format!=="table-number"&&(t.format=e.format),Object.keys(t).length?t:void 0}var W=.02291666666666667,kr=1/W,_n=58,Dn=_n*W;var jn=3,ct=0,Re=120,Fn=0,Nn=45,Bn=7,q=1.2;function Oe(e,t,n,o){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):o}function Hn(e){return!Number.isFinite(e)||!Number.isInteger(e)||e<0?0:e<=Bn?e:jn}function lt(e,t={}){let n=Oe(t.floorBaseHeightM,ct,Re,0),o=Math.min(Re,n+Hn(e.elevation)*Dn),r=e.height===void 0?o:Oe(e.height,ct,Re,o),i=Oe(e.rake,Fn,Nn,0);return{height:r,rake:i}}function ut(e){let t=e.length;return t<=3?[...e]:[e[Math.floor(t*.25)],e[Math.floor(t*.5)],e[Math.floor(t*.75)]]}function dt(e,t,n){if(!e.length)return 1/0;if(e.length===1)return Math.hypot(t-e[0].x,n-e[0].y);let o=1/0;for(let r=0;r+1<e.length;r++){let i=e[r],a=e[r+1],s=a.x-i.x,u=a.y-i.y,c=s*s+u*u,l=c>1e-12?((t-i.x)*s+(n-i.y)*u)/c:0;l<0?l=0:l>1&&(l=1);let d=t-(i.x+l*s),m=n-(i.y+l*u);if(Math.abs(d)>=o||Math.abs(m)>=o)continue;let p=Math.hypot(d,m);p<o&&(o=p)}return o}function Gn(e){let t=0,n=0;for(let i of e)t+=i.x,n+=i.y;let o=e.length||1;t/=o,n/=o;let r=0;for(let i of e){let a=Math.hypot(i.x-t,i.y-n);a>r&&(r=a)}return{cx:t,cy:n,r}}function ft(e,t){return Math.hypot(e.cx-t.cx,e.cy-t.cy)-e.r-t.r}function Ee(e,t){let n=1/0;for(let o of ut(e)){let r=dt(t,o.x,o.y);r<n&&(n=r)}for(let o of ut(t)){let r=dt(e,o.x,o.y);r<n&&(n=r)}return n}function Vn(e,t){if(e.length<3)return{pts:e,seatIndices:t};let n=0,o=0;for(let l of e)n+=l.x,o+=l.y;n/=e.length,o/=e.length;let r=-1,i=e[0];for(let l of e){let d=Math.hypot(l.x-n,l.y-o);d>r&&(r=d,i=l)}let a=i.x-n,s=i.y-o,u=Math.hypot(a,s);u>1e-9?(a/=u,s/=u):(a=1,s=0);let c=e.map((l,d)=>({p:l,i:d,t:(l.x-n)*a+(l.y-o)*s})).sort((l,d)=>l.t-d.t);return{pts:c.map(l=>l.p),seatIndices:c.map(l=>t[l.i])}}function Un(e){let t=e.length;if(t<3)return null;let n=0,o=0;for(let C of e)n+=C.x,o+=C.y;n/=t,o/=t;let r=0,i=0,a=0,s=0,u=0,c=0,l=0;for(let C of e){let R=C.x-n,x=C.y-o;r+=R*R,a+=x*x,i+=R*x,s+=R*R*R,u+=x*x*x,c+=R*x*x,l+=x*R*R}let d=r*a-i*i;if(Math.abs(d)<1e-9)return null;let m=(s+c)/2,p=(u+l)/2,y=(m*a-p*i)/d,b=(p*r-m*i)/d,M=y+n,v=b+o;return!Number.isFinite(M)||!Number.isFinite(v)?null:{cx:M,cy:v}}var Xn=.15;function Kn(e){if(e.length<2)return null;let t=e.map(g=>{let f=0,h=0;for(let w of g.pts)f+=w.x,h+=w.y;return{x:f/g.pts.length,y:h/g.pts.length}}),n=0,o=0;for(let g of t)n+=g.x,o+=g.y;n/=t.length,o/=t.length;let r=0,i=0,a=0;for(let g of t){let f=g.x-n,h=g.y-o;r+=f*f,i+=f*h,a+=h*h}let s=r+a,u=r*a-i*i,c=s/2+Math.sqrt(Math.max(0,s*s/4-u)),l,d;Math.abs(i)>1e-12?(l=c-a,d=i):r>=a?(l=1,d=0):(l=0,d=1);let m=Math.hypot(l,d);if(!(m>1e-12))return null;l/=m,d/=m;let p=0,y=0,b=0;for(let g of e){if(g.pts.length<2)continue;let f=g.pts[0],h=g.pts[g.pts.length-1],w=h.x-f.x,S=h.y-f.y,P=Math.hypot(w,S);if(!(P>1e-9))continue;let E=w/P,I=S/P;p+=(E*E-I*I)*P,y+=2*E*I*P,b+=P}if(b>0&&Math.hypot(p,y)>=zn*b){let g=Math.atan2(y,p)/2,f=Math.cos(g),h=Math.sin(g);Math.abs(l*f+d*h)>$n&&(l=-h,d=f)}let M=1/0,v=-1/0,C=[];for(let g of e){let f=1/0,h=-1/0;for(let w of g.pts){let S=w.x*l+w.y*d;S<f&&(f=S),S>h&&(h=S),S<M&&(M=S),S>v&&(v=S)}C.push(h-f)}let R=v-M;return R>1e-9?(C.sort((g,f)=>g-f),C[Math.min(C.length-1,Math.floor(C.length*.9))]/R<=Yn?{x:l,y:d}:null):null}var Yn=.35,zn=.8,$n=.7;function mt(e,t,n,o){let r=new Map;for(let f of n){let h=t[f],w=h.rowId||`__seat-${f}`,S=r.get(w);S||(S={pts:[],idx:[]},r.set(w,S)),S.pts.push({x:h.x,y:h.y}),S.idx.push(f)}if(!r.size)return{sectionId:e,rows:[],blockCount:0};let i=[];for(let[f,h]of r){let w=Vn(h.pts,h.idx),S=0;for(let P of w.pts)S+=Math.hypot(P.x-o.x,P.y-o.y);i.push({id:f,pts:w.pts,seatIndices:w.seatIndices,blockId:-1,ordinal:0,blockDepth:0,focalDistance:S/w.pts.length})}let a=i.map(f=>Gn(f.pts)),s=i.length<=256?i.length*(i.length-1)/2:0,u=s?new Float64Array(s):null;u?.fill(Number.NaN);let c=u?new Map(i.map((f,h)=>[f,h])):null,l=(f,h)=>(f>h&&([f,h]=[h,f]),f*(2*i.length-f-1)/2+(h-f-1)),d=(f,h)=>{if(!u)return Ee(i[f].pts,i[h].pts);let w=l(f,h),S=u[w];if(!Number.isNaN(S))return S;let P=Ee(i[f].pts,i[h].pts);return u[w]=P,P},m=(f,h)=>c?d(c.get(f),c.get(h)):Ee(f.pts,h.pts),p=[];for(let f=0;f<i.length;f++){let h=1/0;for(let w=0;w<i.length;w++){if(f===w||ft(a[f],a[w])>=h)continue;let S=d(f,w);S<h&&(h=S)}Number.isFinite(h)&&p.push(h)}p.sort((f,h)=>f-h);let y=p.length?p[Math.floor(p.length/2)]:1,b=Math.max(y*1.8,1e-6),M=i.map(()=>[]);for(let f=0;f<i.length;f++)for(let h=f+1;h<i.length;h++)ft(a[f],a[h])>b||d(f,h)<=b&&(M[f].push(h),M[h].push(f));let v=0;for(let f=0;f<i.length;f++){if(i[f].blockId!==-1)continue;let h=v++,w=[f];for(i[f].blockId=h;w.length;){let S=w.pop();for(let P of M[S])i[P].blockId===-1&&(i[P].blockId=h,w.push(P))}}let C=new Map;for(let f of i){let h=C.get(f.blockId)??[];h.push(f),C.set(f.blockId,h)}let R=[];for(let f of i){if(f.pts.length<4)continue;let h=Un(f.pts);h&&(!Number.isFinite(h.cx)||!Number.isFinite(h.cy)||R.push({x:h.cx,y:h.cy}))}let x=R.length>=2?(()=>{let f=R.map(S=>S.x).sort((S,P)=>S-P),h=R.map(S=>S.y).sort((S,P)=>S-P),w=Math.floor(R.length/2);return{cx:f[w],cy:h[w]}})():null;if(x){let f=I=>Math.hypot(I.x-x.cx,I.y-x.cy),h=1/0,w=-1/0,S=[];for(let I of i){let k=1/0,O=-1/0;for(let j of I.pts){let B=f(j);B<k&&(k=B),B>O&&(O=B)}S.push(O-k),k<h&&(h=k),O>w&&(w=O)}let P=w-h;S.sort((I,k)=>I-k);let E=S[Math.min(S.length-1,Math.floor(S.length*.9))];if(P>1e-9&&E/P<=Xn){let I=i.map(A=>{let ie=0;for(let $t of A.pts)ie+=f($t);return{row:A,radius:ie/A.pts.length}}),k=0,O=0;for(let A of I)k+=A.radius,O+=A.row.focalDistance;k/=I.length,O/=I.length;let j=0;for(let A of I)j+=(A.radius-k)*(A.row.focalDistance-O);if(j<0)for(let A of I)A.radius=-A.radius;let H=1/0;for(let A of I)A.radius<H&&(H=A.radius);I.sort((A,ie)=>A.radius-ie.radius);let F=-1,K=-1/0,zt=P/Math.max(1,I.length)*.5,Ge=[];for(let A of I)A.radius-K>zt&&(F++,K=A.radius),A.row.ordinal=F,A.row.blockDepth=A.radius-H,Ge.push(A.row);return{sectionId:e,rows:Ge,blockCount:v}}}let g=[];for(let[,f]of C){let h=Kn(f);if(h){let w=I=>{let k=0;for(let O of I.pts)k+=O.x*h.x+O.y*h.y;return k/I.pts.length};f.sort((I,k)=>w(I)-w(k)),f.length>=2&&f[0].focalDistance>f[f.length-1].focalDistance&&f.reverse();let S=[],P=y*.5;for(let I of f){let k=S[S.length-1];k&&Math.abs(w(I)-w(k[0]))<P?k.push(I):S.push([I])}let E=0;for(let I=0;I<S.length;I++){if(I>0){let k=1/0;for(let O of S[I-1])for(let j of S[I])k=Math.min(k,m(O,j));E+=k}for(let k of S[I])k.ordinal=I,k.blockDepth=E,g.push(k)}}else{let w=1/0;for(let S of f)S.focalDistance<w&&(w=S.focalDistance);f.sort((S,P)=>S.focalDistance-P.focalDistance);for(let S=0;S<f.length;S++)f[S].ordinal=S,f[S].blockDepth=Math.max(0,f[S].focalDistance-w),g.push(f[S])}}return{sectionId:e,rows:g,blockCount:v}}var Wn=/^\d{4}-\d{2}-\d{2}$/;function qn(e){let t=Date.parse(e);return Number.isFinite(t)?Wn.test(e)?t+864e5:t:null}function Qn(e,t=Date.now()){if(e.validUntil===void 0){if(e.status!=="approved")return!0;let o=e.assessedAt?Date.parse(e.assessedAt):Number.NaN;return Number.isFinite(o)&&(t instanceof Date?t.getTime():t)<=o+366*864e5}let n=qn(e.validUntil);return n===null?!1:(t instanceof Date?t.getTime():t)<n}function Zn(e,t,n){return!(e.eventConfigurationId&&e.eventConfigurationId!==t||e.eventConfigurationVersion!==void 0&&e.eventConfigurationVersion!==n)}function Jn(e){return e.status!=="draft"&&e.status!=="retracted"}function eo(e,t){return e.status===void 0?t===void 0:e.status!=="approved"?!0:typeof t=="string"&&typeof e.basisSha256=="string"&&e.basisSha256===t}function ht(e,t={}){return!!e&&Jn(e)&&Zn(e,t.activeConfigurationId,t.activeConfigurationVersion)&&eo(e,t.activeBasisSha256)&&Qn(e,t.now)}var bt=36,pt=160;function to(e,t=360){let n=ee(Math.round(Number.isFinite(e)?e:1),1,40),o=ee(Number.isFinite(t)?t:360,120,360);return Math.round(ee(n*4*(360/o),bt,pt))}var no=new Set(["pitch-football","rink-hockey","track-athletics","oval-cricket","pitch-rugby","diamond-baseball","court-basketball","court-tennis","ring-boxing"]);function oo(e){return!!e&&no.has(e)}var yt=1.1;var Lr=Math.PI*2;var _r=(()=>{let t={x:0,y:52},n=25,o={x:70,y:t.y-70},r=(o.x*o.x+o.y*o.y-4900)/(2*(o.y+70)),i=r+70,a=[],s=Math.atan2(o.y-r,o.x),u=Math.atan2(o.y-r,-o.x);for(let c=0;c<=24;c++){let l=s+(u-s)*c/24;a.push({x:i*Math.cos(l),y:r+i*Math.sin(l)})}return{half:70,home:t,backstop:n,fence:a}})();function gt(e){return oo(e)}function ro(e){if((e.kind==="polygon"||e.kind==="polyline"||e.kind==="line")&&e.points&&e.points.length>=2)return e.kind==="polygon"?ce(e,6):e.points;if(e.x==null||e.y==null||e.width==null||e.height==null)return null;let t=e.x,n=e.y,o=e.width,r=e.height;return[{x:t,y:n},{x:t+o,y:n},{x:t+o,y:n+r},{x:t,y:n+r}]}function io(e,t,n){let o=n*Math.PI/180,r=Math.cos(o),i=Math.sin(o),a=e.x-t.x,s=e.y-t.y;return{x:t.x+a*r-s*i,y:t.y+a*i+s*r}}function xt(e){let t=ro(e);if(!t||t.length<2)return null;let n=e.rotation??0,o=Math.abs(n)<1e-6?t:t.map(u=>io(u,{x:t.reduce((c,l)=>c+l.x,0)/t.length,y:t.reduce((c,l)=>c+l.y,0)/t.length},n)),r=1/0,i=1/0,a=-1/0,s=-1/0;for(let u of o)r=Math.min(r,u.x),i=Math.min(i,u.y),a=Math.max(a,u.x),s=Math.max(s,u.y);return!Number.isFinite(r)||a-r<1e-6||s-i<1e-6?null:{minX:r,minY:i,maxX:a,maxY:s}}var ao=5,so=3,co=.92,lo=1.9,uo=2,fo=.6,mo=1,ho=.06;function bo(e){return e.heightM!==void 0?e.heightM:e.stageKind==="ring-boxing"?yt:gt(e.stageKind)?ho:mo}function St(e){let t=1/0,n=1/0,o=-1/0,r=-1/0,i=-1/0;for(let a of Q(e)){let s=a.baseHeightM??0;for(let u of a.objects){if(u.type!=="shape"||u.role!=="stage")continue;let c=xt(u);c&&(t=Math.min(t,c.minX),n=Math.min(n,c.minY),o=Math.max(o,c.maxX),r=Math.max(r,c.maxY),i=Math.max(i,s+bo(u)))}}return!Number.isFinite(t)||!Number.isFinite(i)?null:{minX:t,minY:n,maxX:o,maxY:r,deckTopM:i}}function po(e,t,n,o){let r=1/0,i=1/0,a=-1/0,s=-1/0;for(let p of e)Number.isFinite(p.eyeHeightM)&&(r=Math.min(r,p.x),a=Math.max(a,p.x),i=Math.min(i,p.y),s=Math.max(s,p.y));if(!Number.isFinite(r))return null;let u=r*t,c=i*t,l=Math.max(1,Math.ceil((a-r)*t/n)+1),d=Math.max(1,Math.ceil((s-i)*t/n)+1),m=new Float64Array(l*d).fill(-1/0);for(let p of e){if(!Number.isFinite(p.eyeHeightM))continue;let y=p.eyeHeightM-q,b=Math.min(l-1,Math.max(0,Math.floor((p.x*t-u)/n))),v=Math.min(d-1,Math.max(0,Math.floor((p.y*t-c)/n)))*l+b,C=y+o;C>m[v]&&(m[v]=C)}return{cellM:n,minX:u,minY:c,cols:l,rows:d,top:m}}function yo(e,t,n){let o=Math.floor((t-e.minX)/e.cellM),r=Math.floor((n-e.minY)/e.cellM);return o<0||r<0||o>=e.cols||r>=e.rows?-1/0:e.top[r*e.cols+o]}function Mt(e,t,n={}){let o=new Map;if(!t||!e.length)return o;let r=n.metresPerChartUnit??W,i=n.cellM??fo,a=n.chairBackM??co,s=n.selfRowSkipM??uo,u=n.clearThreshold??.9,c=n.partialThreshold??.25,l=Math.max(1,n.columns??ao),d=Math.max(1,n.rows??so),m=po(e,r,i,a);if(!m)return o;let p=(t.maxX-t.minX)*r,y=(t.maxY-t.minY)*r,b=p>=y,M=(t.minX+t.maxX)/2*r,v=(t.minY+t.maxY)/2*r,C=[];for(let x=0;x<l;x++){let g=(x+.5)/l-.5,f=b?M+g*p:M,h=b?v:v+g*y;for(let w=0;w<d;w++){let S=t.deckTopM+(d===1?0:w/(d-1)*lo);C.push({x:f,y:h,z:S})}}let R=i/2;for(let x of e){if(!Number.isFinite(x.eyeHeightM))continue;let g=x.x*r,f=x.y*r,h=x.eyeHeightM,w=0,S=1/0;for(let E of C){let I=E.x-g,k=E.y-f,O=Math.hypot(I,k);if(!(O>s)){w++;continue}let j=I/O,B=k/O,H=0;for(let F=s;F<O;F+=R){let K=yo(m,g+j*F,f+B*F);if(!(!Number.isFinite(K)||K>=h)&&K>h+(E.z-h)*F/O){H=F;break}}H?S=Math.min(S,H):w++}let P=w/C.length;P>=u||o.set(x.id,{seatId:x.id,mark:P<c?"obstructedView":"restrictedView",visibleFraction:P,totalRays:C.length,atDistanceM:Number.isFinite(S)?S:0})}return o}function wt(e,t){if(!t.size)return 0;let n=0;for(let o of e){let r=t.get(o.id);if(!r)continue;let i=o.commercial;i?.restrictedView!==void 0||i?.obstructedView!==void 0||(o.commercial={...i,[r.mark]:!0},n++)}return n}function Ae(e){return e?e.accessibility?.length?e.wheelchairSpaceType&&!e.accessibility.includes("wheelchair")?["wheelchair",...e.accessibility]:e.accessibility:e.wheelchairSpaceType?["wheelchair"]:e.accessible?["wheelchair"]:[]:[]}var fe=Math.PI/180,go=9,G=16;function Te(e,t,n,o){let r=n*fe,i=Math.cos(r),a=Math.sin(r);return{x:o.x+e*i-t*a,y:o.y+e*a+t*i}}function me(e){let{seatCount:t,seatSpacing:n,curve:o,rotation:r,origin:i}=e,a=[];if(e.path)return ge(e.path,t);if(t<=1)return t===1&&a.push({x:i.x,y:i.y}),a;if(o===0){for(let c=0;c<t;c++)a.push(Te(c*n,0,r,i));return a}let s=o/(t-1)*fe,u=n/(2*Math.sin(Math.abs(s)/2));for(let c=0;c<t;c++){let l=c*s,d=u*Math.sin(l),m=-u+u*Math.cos(l);a.push(Te(d,m,r,i))}return a}function Ct(e){let t=new Map;if(e.overrides)for(let n of e.overrides)t.set(n.index,n);return t}function xo(e){let t=new Set((e.overrides??[]).filter(n=>n.skip&&Number.isInteger(n.index)&&n.index>=0&&n.index<e.seatCount).map(n=>n.index));return Math.max(0,e.seatCount-t.size)}function kt(e,t){let n=Ct(e);return me(e).map((o,r)=>{let i=n.get(r),a=Ae(i),s=rt(e,r,i),u={...e.commercial,...i?.commercial};return{index:r,x:o.x+(i?.dx??0),y:o.y+(i?.dy??0),label:s,displayLabel:Pe(e,r,t,i),categoryKey:i?.categoryKey??e.categoryKey,skipped:!!i?.skip,accessible:a.length>0,accessibility:a,wheelchairSpaceType:i?.wheelchairSpaceType,commercial:Object.values(u).some(c=>c!==void 0&&c!==!1&&c!=="")?u:void 0,glyph:i?.glyph,viewUrl:i?.viewFromSeatUrl??e.viewFromSeatUrl,viewMeta:i?.viewFromSeatUrl?i.viewFromSeatMeta:e.viewFromSeatMeta,labelStyle:i?.labelStyle??e.seatLabelStyle}})}function Rt(e){let t=[];for(let n of kt(e))n.skipped||t.push({id:`${e.id}:${n.index}`,label:n.label,displayLabel:n.displayLabel===n.label?void 0:n.displayLabel,x:n.x,y:n.y,rowId:e.id,categoryKey:n.categoryKey,accessible:n.accessible||void 0,accessibility:n.accessibility.length?n.accessibility:void 0,wheelchairSpaceType:n.wheelchairSpaceType,commercial:n.commercial,glyph:n.glyph,viewUrl:n.viewUrl,viewMeta:n.viewMeta,labelStyle:n.labelStyle});return t}function Ot(e){if(e.seatCountsBySide)return{...e.seatCountsBySide};let t=e.sides&&e.sides.length?e.sides:["top","bottom"],n=["top","bottom","left","right"].filter(i=>t.includes(i)),o={top:0,bottom:0,left:0,right:0};if(!n.length)return o;let r=Math.max(0,Math.round(e.seatCount));for(let i=0;i<r;i++)o[n[i%n.length]]+=1;return o}function _e(e){let t=[],n=Math.max(0,Math.round(e.seatCount));if(n===0)return t;let o=new Map((e.overrides??[]).map(l=>[l.index,l])),r=(l,d,m,p)=>{let y=o.get(l),b=Ae(y),M=y?.label??Ce(e,l);return{index:l,label:M,displayLabel:y?.displayLabel??ke(e,l),x:d+(y?.dx??0),y:m+(y?.dy??0),categoryKey:y?.categoryKey??e.categoryKey,skipped:!!y?.skip,accessible:b.length>0,accessibility:b,wheelchairSpaceType:y?.wheelchairSpaceType,commercial:y?.commercial,glyph:y?.glyph,viewUrl:y?.viewFromSeatUrl,viewMeta:y?.viewFromSeatUrl?y.viewFromSeatMeta:void 0,labelStyle:y?.labelStyle,...p?{side:p}:{}}};if(e.shape==="round"){let l=(e.radius??40)+G,d=e.rotation*fe,m=Math.max(0,Math.min(360,e.seatArc??360));if(m>=360||n===1){for(let M=0;M<n;M++){let v=d+M/n*2*Math.PI;t.push(r(M,e.center.x+l*Math.cos(v),e.center.y+l*Math.sin(v)))}return t}let p=m*fe,y=(2*Math.PI-p)/2,b=d+y;for(let M=0;M<n;M++){let v=b+M/(n-1)*p;t.push(r(M,e.center.x+l*Math.cos(v),e.center.y+l*Math.sin(v)))}return t}let i=e.width??80,a=e.height??50,s=Ot(e),u=["top","bottom","left","right"],c=0;for(let l of u){let d=s[l];for(let m=0;m<d;m++){let p,y;l==="top"?(p=-i/2+(m+.5)*i/d,y=-a/2-G):l==="bottom"?(p=-i/2+(m+.5)*i/d,y=a/2+G):l==="left"?(p=-i/2-G,y=-a/2+(m+.5)*a/d):(p=i/2+G,y=-a/2+(m+.5)*a/d);let b=Te(p,y,e.rotation,e.center);t.push(r(c++,b.x,b.y,l))}}return t}function So(e){return e.bookAsWhole||e.variableOccupancy?Math.max(0,Math.round(e.seatCount)):_e(e).filter(t=>!t.skipped).length}function Et(e){return _e(e).filter(t=>!t.skipped).map(t=>({id:`${e.id}:${t.index}`,label:t.label,...t.displayLabel!==t.label?{displayLabel:t.displayLabel}:{},x:t.x,y:t.y,rowId:e.id,categoryKey:t.categoryKey,...t.accessible?{accessible:!0}:{},...t.accessibility.length?{accessibility:t.accessibility}:{},...t.wheelchairSpaceType?{wheelchairSpaceType:t.wheelchairSpaceType}:{},...t.commercial?{commercial:t.commercial}:{},...t.glyph?{glyph:t.glyph}:{},...t.viewUrl?{viewUrl:t.viewUrl}:{},...t.viewUrl&&t.viewMeta?{viewMeta:t.viewMeta}:{},...t.labelStyle?{labelStyle:t.labelStyle}:{}}))}function At(e){return[{id:`${e.id}:0`,label:e.label,...e.displayLabel&&e.displayLabel!==e.label?{displayLabel:e.displayLabel}:{},x:e.center.x,y:e.center.y,rowId:e.id,categoryKey:e.categoryKey,kind:"booth",...e.commercial?.note?{commercial:{note:e.commercial.note}}:{}}]}function Le(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,a=t[o].y,s=t[r].x,u=t[r].y;a>e.y!=u>e.y&&e.x<(s-i)*(e.y-a)/(u-a)+i&&(n=!n)}return n}function Tt(e,t){return t.some((n,o)=>{let r=t[(o+1)%t.length],i=(e.y-n.y)*(r.x-n.x)-(e.x-n.x)*(r.y-n.y);if(Math.abs(i)>1e-7)return!1;let a=(e.x-n.x)*(r.x-n.x)+(e.y-n.y)*(r.y-n.y),s=(r.x-n.x)**2+(r.y-n.y)**2;return a>=-1e-7&&a<=s+1e-7})}function V(e){return Array.isArray(e)?e.filter(t=>Array.isArray(t)&&t.length>=3):[]}function U(e,t,n){return Le(e,t)&&!V(n).some(o=>Le(e,o)||Tt(e,o))}function De(e,t){return we(e,t).point}function de(e){if(!e.length)return{x:0,y:0};let t=0,n=0;for(let o of e)t+=o.x,n+=o.y;return{x:t/e.length,y:n/e.length}}function je(e){switch(e.type){case"row":{let t=me(e),n=Ct(e),o=0,r=0,i=0;for(let a=0;a<t.length;a++){let s=n.get(a);s?.skip||(o+=t[a].x+(s?.dx??0),r+=t[a].y+(s?.dy??0),i++)}return i?{x:o/i,y:r/i}:{x:e.origin.x,y:e.origin.y}}case"table":case"booth":return{x:e.center.x,y:e.center.y};case"gaArea":return de(e.points);case"section":return de(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?de(e.points):e.x!=null&&e.y!=null&&e.width!=null&&e.height!=null?{x:e.x+e.width/2,y:e.y+e.height/2}:{x:e.x??0,y:e.y??0};case"decorImage":return{x:e.x+e.width/2,y:e.y+e.height/2}}}function vt(e,t){return e.length===t.length&&e.every((n,o)=>n.x===t[o].x&&n.y===t[o].y)}function Mo(e,t){if(e.type!=="gaArea"||!vt(e.points,t.outline))return!1;let n=V(e.holes),o=V(t.holes);return n.length===o.length&&n.every((r,i)=>vt(r,o[i]))}function Lt(e,t,n=e.filter(r=>r.type==="section"),o=je(t)){let r="referenceInventorySource"in t?t.referenceInventorySource?.logicalSectionId:void 0;return(r?n.find(a=>(a.logicalSectionId??a.id)===r&&(Mo(t,a)||U(o,a.outline,a.holes))):void 0)??n.find(a=>U(o,a.outline,a.holes))}function Q(e){return e.floors&&e.floors.length?e.floors:[{id:"floor-0",name:"Main",objects:e.objects,focalPoint:e.focalPoint,referenceImage:e.referenceImage,backgroundImage:e.backgroundImage}]}function wo(e,t){let n=Q(e);return(t?n.find(o=>o.id===t):n[0])?.objects??[]}function _t(e){return e.floors&&e.floors.length?e.floors.flatMap(t=>t.objects):e.objects}function he(e,t,n){let o=i=>({x:i.x+t,y:i.y+n}),r=i=>i.map(o);switch(e.type){case"row":return{...e,origin:o(e.origin)};case"table":case"booth":return{...e,center:o(e.center)};case"gaArea":return{...e,points:r(e.points),...e.holes?{holes:V(e.holes).map(r)}:{}};case"section":return{...e,outline:r(e.outline),...e.outlinePath?{outlinePath:tt(e.outlinePath,t,n)}:{},...e.holes?{holes:V(e.holes).map(r)}:{}};case"text":return{...e,position:o(e.position)};case"shape":return{...e,...e.points?{points:r(e.points)}:{},...e.holes?{holes:V(e.holes).map(r)}:{},...e.x!=null?{x:e.x+t}:{},...e.y!=null?{y:e.y+n}:{}};case"decorImage":return{...e,x:e.x+t,y:e.y+n}}}function vo(e,t=900){if(!e.floors||e.floors.length<2)return e;let n=[];return e.floors.forEach((o,r)=>{let i=-r*t;for(let a of o.objects)n.push(i===0?a:he(a,0,i))}),{...e,objects:n,floors:void 0}}function Pt(e,t,n,o,r,i,a,s,u){let c=[],l=e.filter(b=>b.type==="section"),d=te(e),m=b=>!b?.eventConfigurationId||b.eventConfigurationId===o&&(b.eventConfigurationVersion===void 0||b.eventConfigurationVersion===u),p=b=>ht(b,{activeConfigurationId:o,activeConfigurationVersion:u,activeBasisSha256:r,now:s}),y=(b,M)=>p(b)?{...b,coverage:M}:void 0;for(let b of e){let M=[];if(b.type==="row"?M=Rt(b):b.type==="table"?M=Et(b):b.type==="booth"&&(M=At(b)),!M.length)continue;for(let g of M)g.viewUrl&&!m(g.viewMeta)&&(g.viewUrl=void 0,g.viewMeta=void 0);if(b.type==="row"){let g=d.get(b.id);if(g){let f=new Map((b.overrides??[]).map(h=>[h.index,h]));for(let h of M){let w=Number(h.id.slice(h.id.lastIndexOf(":")+1));if(!Number.isInteger(w))continue;h.logicalRowId=g.groupId,h.logicalSeatIndex=g.adjacencyOffset+w,f.get(w)?.displayLabel||(h.displayLabel=Pe(b,w,g)),!h.viewUrl&&g.viewFromSeatUrl&&m(g.viewFromSeatMeta)&&(h.viewUrl=g.viewFromSeatUrl,h.viewMeta=g.viewFromSeatMeta);let S=f.get(w)?.confidenceEvidence;h.confidenceEvidence=y(S,"exact-seat")??y(b.confidenceEvidence,"row-representative")??y(g.confidenceEvidence,"row-representative")}}}let v=Lt(e,b,l,b.type==="row"?de(M):je(b)),C=v?.viewFromSeatUrl,x=(v?.zone?t?.find(g=>g.id===v.zone):void 0)?.focalPoint??n;for(let g of M){if(!g.confidenceEvidence){let f=Number(g.id.slice(g.id.lastIndexOf(":")+1)),h=(b.type==="row"||b.type==="table")&&Number.isInteger(f)?b.overrides?.find(w=>w.index===f)?.confidenceEvidence:void 0;g.confidenceEvidence=y(h,"exact-seat")??(b.type==="row"?y(b.confidenceEvidence,"row-representative"):void 0)}g.confidenceEvidence??=y(v?.confidenceEvidence,"section-representative")??(a?y(a.evidence,a.coverage):void 0),!g.viewUrl&&C&&m(v?.viewFromSeatMeta)&&(g.viewUrl=C,g.viewMeta=v?.viewFromSeatMeta),!g.viewUrl&&i&&m(i.meta)&&(g.viewUrl=i.url,g.viewMeta=i.meta),v&&(g.sectionId=v.logicalSectionId??v.id),v?.zone&&(g.zoneId=v.zone),x&&(g.focalPoint={...x})}c.push(...M)}return c}function Fe(e,t={}){if(e.floors?.length){let o=[];for(let r of e.floors){let i=r.focalPoint??e.focalPoint,a=r.viewFromSeatUrl?{url:r.viewFromSeatUrl,meta:r.viewFromSeatMeta}:e.viewFromSeatUrl?{url:e.viewFromSeatUrl,meta:e.viewFromSeatMeta}:void 0,s=r.confidenceEvidence?{evidence:r.confidenceEvidence,coverage:"floor-representative"}:e.confidenceEvidence?{evidence:e.confidenceEvidence,coverage:"venue-representative"}:void 0,u=Pt(r.objects,e.zones,i,e.eventConfigurationId,e.confidenceBasisSha256,a,s,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);t.resolveEyeHeights!==!1&&It(r.objects,r.focalPoint??e.focalPoint,r.baseHeightM??0,u);for(let c of u)c.floorId=r.id;for(let c of u)o.push(c)}return o}let n=Pt(e.objects,e.zones,e.focalPoint,e.eventConfigurationId,e.confidenceBasisSha256,e.viewFromSeatUrl?{url:e.viewFromSeatUrl,meta:e.viewFromSeatMeta}:void 0,e.confidenceEvidence?{evidence:e.confidenceEvidence,coverage:"venue-representative"}:void 0,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);return t.resolveEyeHeights!==!1&&It(e.objects,e.focalPoint,t.floorBaseHeightM??0,n),Po(e,n,t)}function Po(e,t,n){return!n.deriveRestrictedView||e.derivedRestrictedView===!1||n.resolveEyeHeights===!1||wt(t,Mt(t,St(e))),t}function It(e,t,n,o){let r=e.filter(d=>d.type==="section"),i=n>0||r.some(d=>d.height!==void 0||d.rake!==void 0||(d.elevation??0)>0);if(!r.length||!i||!t){for(let d of o)d.eyeHeightM=n+q;return}let a=new Array(o.length),s=new Map;for(let d of r)s.has(d.id)||s.set(d.id,d);let u=new Map,c=new Map;for(let d=0;d<o.length;d++){let m=o[d],y=(m.sectionId?s.get(m.sectionId)??r.find(M=>M.logicalSectionId===m.sectionId&&U({x:m.x,y:m.y},M.outline,M.holes)):void 0)??r.find(M=>U({x:m.x,y:m.y},M.outline,M.holes))??null;if(a[d]=y,!y)continue;u.has(y.id)||u.set(y.id,lt(y,{floorBaseHeightM:n}));let b=c.get(y.id);b?b.push(d):c.set(y.id,[d])}let l=new Array(o.length).fill(void 0);for(let[d,m]of c){let p=u.get(d);if(!p)continue;let y=p.rake>0?Math.tan(p.rake*Math.PI/180):0,b=mt(d,o,m,t);for(let M of b.rows){let v=M.blockDepth*W*y,C=p.height+v;for(let R of M.seatIndices)l[R]=C}}for(let d=0;d<o.length;d++){let m=o[d],p=a[d];if(!p){m.eyeHeightM=n+q;continue}let y=u.get(p.id);m.eyeHeightM=(l[d]??y.height)+q}}var ue=40;function X(e,t){let n=t?.freeText==="exclude",o=1/0,r=1/0,i=-1/0,a=-1/0,s=(c,l)=>{c<o&&(o=c),l<r&&(r=l),c>i&&(i=c),l>a&&(a=l)},u=c=>{if(Array.isArray(c))for(let l of c)!l||typeof l!="object"||s(l.x,l.y)};for(let c of _t(e))if(c.type==="row"){let l=new Map((c.overrides??[]).map(d=>[d.index,d]));me(c).forEach((d,m)=>{let p=l.get(m);p?.skip||s(d.x+(p?.dx??0),d.y+(p?.dy??0))})}else if(c.type==="gaArea")u(c.points);else if(c.type==="section")u(c.outline);else if(c.type==="decorImage")s(c.x,c.y),s(c.x+c.width,c.y+c.height);else if(c.type==="shape")c.points&&c.points.length?u(ce(c)):c.x!=null&&c.y!=null&&c.width!=null&&c.height!=null&&(s(c.x,c.y),s(c.x+c.width,c.y+c.height));else if(c.type==="table"){let l=G+go,d=c.shape==="round"?(c.radius??40)+l:Math.max((c.width??80)/2,(c.height??50)/2)+l;s(c.center.x-d,c.center.y-d),s(c.center.x+d,c.center.y+d)}else if(c.type==="booth"){let l=Math.max(c.width,c.height)/2;s(c.center.x-l,c.center.y-l),s(c.center.x+l,c.center.y+l)}else if(c.type==="text"){if(n)continue;let l=xe(c);s(c.position.x,c.position.y),s(c.position.x+l.width,c.position.y+l.height)}for(let c of[e.referenceImage,e.backgroundImage]){if(!c)continue;let{center:l,width:d}=c;if(!l||!Number.isFinite(l.x)||!Number.isFinite(l.y)||!Number.isFinite(d))continue;let m=d*3/4;s(l.x-d/2,l.y-m/2),s(l.x+d/2,l.y+m/2)}if(!isFinite(o)){let c=e.focalPoint??{x:0,y:0};return{x:c.x-200,y:c.y-200,width:400,height:400}}return{x:o-ue,y:r-ue,width:i-o+ue*2,height:a-r+ue*2}}function Dt(e){let t=e.backgroundImage;return t?.url&&!t.assetId?t:void 0}var Nt=.08,Io=.045;function Ne(e){return`__floor__:${encodeURIComponent(e)}`}function re(e,t,n){return{...e,objects:t,floors:void 0,...n?{focalPoint:n}:{},referenceImage:void 0,backgroundImage:void 0}}function Co(e,t,n){let o=e.focalPoint??t.focalPoint;return o?o.x:n.x+n.width/2}function Bt(e){let t=e.floors??[];if(!t.length)return[];let n=t.map(a=>X(re(e,a.objects,a.focalPoint),{freeText:"exclude"})),r=Math.max(1,...n.map(a=>a.width))*Nt,i=0;return t.map((a,s)=>{let u=n[s],c=i-(u.y+u.height);return i-=u.height+r,{floorId:a.id,label:a.name??a.id,level:s,levelBadge:s===0?"G":String(s),translation:{x:-Co(a,e,u),y:c},bounds:u}})}function ko(e,t,n,o){let r=t==="name"?e.label:e.levelBadge;if(!r)return[];let i=Math.max(1,n*Io),a=e.bounds.x+e.translation.x-i*2.4,s=e.bounds.y+e.translation.y+i*.4,u=`floor-level-${e.floorId}`,c={type:"text",id:`${u}-text`,text:r,position:{x:a,y:s},fontSize:i,rotation:0,color:o,bold:!0};if(t==="name")return[c];let l=i*.95;return[{type:"shape",id:`${u}-badge`,kind:"ellipse",x:a-l*.35,y:s-l*.3,width:l*2,height:l*2,fill:"transparent",stroke:{color:o,width:Math.max(1,i*.09)},opacity:.8},c]}function Ro(e,t={}){let n=e.floors;if(!n||n.length<2)return e;let o=Bt(e),r=[];n.forEach((c,l)=>{let{x:d,y:m}=o[l].translation;for(let p of c.objects)l>0&&p.type==="shape"&&p.role==="stage"||r.push(he(p,d,m))});let i={...e,objects:r,floors:void 0},a=X(i,{freeText:"exclude"}),s=Math.max(1,a.width,a.height),u=e.theme?.textColor??"#94a3b8";for(let c of o)r.push(...ko(c,t.labelStyle??"number",s,u));return{...i,objects:r,referenceImage:void 0,backgroundImage:void 0}}function Oo(e){if(!e.floors||e.floors.length<2)return e;let t=!e.zones?.length,n=new Set,o=e.floors.flatMap(i=>i.objects.flatMap(a=>{if(a.type==="shape"&&a.role==="stage"){let s=JSON.stringify([a.kind,a.x,a.y,a.width,a.height,a.points,a.rotation??0,a.label,a.heightM,a.eventConfigurationIds]);if(n.has(s))return[];n.add(s)}return t&&a.type==="section"?[{...a,zone:Ne(i.id)}]:[a]})),r=t?e.floors.map(i=>({id:Ne(i.id),label:i.name,focalPoint:{...i.focalPoint}})):e.zones;return{...e,objects:o,zones:r,floors:void 0,referenceImage:void 0,backgroundImage:Dt(e)}}function Ht(e){return e.floorOverview==="combined"?"combined":"separated"}function Eo(e){if((e.floors??[]).length<2)return"separated";let n=jt.get(e);if(n)return n;let o=Ao(e)?"separated":"combined";return jt.set(e,o),o}var Gt=.1,oe=18,jt=new WeakMap;function Ao(e){let t=e.floors??[],n=(i,a)=>`${Math.floor(i/oe)}:${Math.floor(a/oe)}`,o=t.map(i=>{let a=Fe(re(e,i.objects,i.focalPoint)).map(u=>({x:u.x,y:u.y})),s={areas:[],seats:new Map};for(let u of i.objects)u.type==="section"&&u.outline?.length>=3&&s.areas.push({outer:u.outline,holes:u.holes}),u.type==="gaArea"&&u.points?.length>=3&&s.areas.push({outer:u.points,holes:u.holes});for(let u of a){let c=n(u.x,u.y),l=s.seats.get(c);l?l.push(u):s.seats.set(c,[u])}return{seats:a,footprint:s}}),r=(i,a)=>{let s=Math.floor(i.x/oe),u=Math.floor(i.y/oe);for(let c=-1;c<=1;c+=1)for(let l=-1;l<=1;l+=1)for(let d of a.seats.get(`${s+c}:${u+l}`)??[])if(Math.hypot(d.x-i.x,d.y-i.y)<oe)return!0;return!1};return o.some((i,a)=>{if(!i.seats.length)return!1;let s=o.filter((c,l)=>l!==a).map(c=>c.footprint),u=0;for(let c of i.seats)s.some(l=>l.areas.some(d=>U(c,d.outer,d.holes))||r(c,l))&&(u+=1);return u/i.seats.length>Gt})}var be="level-context:";function To(e,t){let n=e.floors??[];if(n.length<2||Ht(e)!=="combined")return[];let o="#8a93a6",r=[],i=n.find(s=>s.id===t),a=i?X(re(e,i.objects,i.focalPoint),{freeText:"exclude"}):null;for(let s of n){if(s.id===t)continue;let u=0;for(let m of s.objects){let p=m.type==="section"?m.outline:m.type==="gaArea"?m.points:null;if(!p||p.length<3)continue;let y={type:"shape",id:`${be}${s.id}:${u++}`,kind:"polygon",label:"",points:p.map(b=>({...b})),fill:"transparent",stroke:{color:o,width:1.5},opacity:.35};r.push(y)}let c=X(re(e,s.objects,s.focalPoint),{freeText:"exclude"});if(!u||!a||!Lo(c,a))continue;let l=r.filter(m=>m.type==="shape"&&m.id.startsWith(`${be}${s.id}:`)&&!!m.points),d=l.reduce((m,p)=>Ft(p.points)>Ft(m.points)?p:m,l[0]);r.push({type:"text",id:`${be}${s.id}:name`,text:s.name??s.id,position:De(d.points,void 0),fontSize:Math.max(1,Math.max(a.width,a.height)*.024),rotation:0,color:o,opacity:.6})}return r}function Lo(e,t){return e.x>=t.x&&e.y>=t.y&&e.x+e.width<=t.x+t.width&&e.y+e.height<=t.y+t.height}function Ft(e){let t=e.map(o=>o.x),n=e.map(o=>o.y);return(Math.max(...t)-Math.min(...t))*(Math.max(...n)-Math.min(...n))}function _o(e){let t=e.floors;if(!t?.length)return null;let n=t.find(i=>i.objects.some(a=>a.type==="shape"&&a.role==="stage"));if(n)return n.id;let o=t[0],r=-1;for(let i of t){let a=X(re(e,i.objects,i.focalPoint),{freeText:"exclude"}),s=a.width*a.height;s>r&&(r=s,o=i)}return o.id}var Do=640;function jo(e,t){return(e.floors?.length??0)<2?null:"all"}var Vt=9;function Fo(e){if(e.kind==="circle")return{hx:e.r,hy:e.r};let t=e.width/2,n=e.height/2,o=e.rotation??0;if(!o)return{hx:t,hy:n};let r=o*Math.PI/180,i=Math.abs(Math.cos(r)),a=Math.abs(Math.sin(r));return{hx:t*i+n*a,hy:t*a+n*i}}function No(e,t,n){let o=t-e.seat.x,r=n-e.seat.y;if(e.shape.kind==="circle")return o*o+r*r<=e.shape.r*e.shape.r;let i=e.shape.rotation??0,a=o,s=r;if(i){let u=-i*Math.PI/180,c=Math.cos(u),l=Math.sin(u);a=o*c-r*l,s=o*l+r*c}return Math.abs(a)<=e.shape.width/2&&Math.abs(s)<=e.shape.height/2}function Bo(e,t,n,o,r){if(e.shape.kind==="circle"){let y=Math.min(Math.max(e.seat.x,t),o),b=Math.min(Math.max(e.seat.y,n),r),M=e.seat.x-y,v=e.seat.y-b;return M*M+v*v<=e.shape.r*e.shape.r}let i=e.shape.rotation??0;if(!i)return e.seat.x-e.hx<=o&&e.seat.x+e.hx>=t&&e.seat.y-e.hy<=r&&e.seat.y+e.hy>=n;let a=i*Math.PI/180,s=Math.cos(a),u=Math.sin(a),c=e.shape.width/2,l=e.shape.height/2,d=[[-c,-l],[c,-l],[c,l],[-c,l]].map(([y,b])=>[e.seat.x+y*s-b*u,e.seat.y+y*u+b*s]),m=[[t,n],[o,n],[o,r],[t,r]],p=[[1,0],[0,1],[s,u],[-u,s]];for(let[y,b]of p){let M=1/0,v=-1/0;for(let[x,g]of d){let f=x*y+g*b;f<M&&(M=f),f>v&&(v=f)}let C=1/0,R=-1/0;for(let[x,g]of m){let f=x*y+g*b;f<C&&(C=f),f>R&&(R=f)}if(v<C||R<M)return!1}return!0}function Ho(e,t={}){let n=t.seatRadius??Vt,o=e.length,r=new Array(o),i=1/0,a=1/0,s=-1/0,u=-1/0,c=0;for(let f=0;f<o;f++){let h=e[f],w=t.shapeOf?.(h)??{kind:"circle",r:n},{hx:S,hy:P}=Fo(w);r[f]={seat:h,shape:w,hx:S,hy:P},h.x-S<i&&(i=h.x-S),h.y-P<a&&(a=h.y-P),h.x+S>s&&(s=h.x+S),h.y+P>u&&(u=h.y+P),S>c&&(c=S),P>c&&(c=P)}o===0&&(i=0,a=0,s=0,u=0);let l=c>0?c*4:1,d=Math.max(s-i,0),m=Math.max(u-a,0),p=Math.max(64,t.maxCells??o*4),y=l,b=Math.max(1,Math.ceil(d/y)||1),M=Math.max(1,Math.ceil(m/y)||1);for(;b*M>p&&(b>1||M>1);)y*=2,b=Math.max(1,Math.ceil(d/y)||1),M=Math.max(1,Math.ceil(m/y)||1);let v=b*M,C=new Int32Array(v+1),R=0;for(let f=0;f<o;f++){let h=r[f],w=N(Math.floor((h.seat.x-h.hx-i)/y),0,b-1),S=N(Math.floor((h.seat.x+h.hx-i)/y),0,b-1),P=N(Math.floor((h.seat.y-h.hy-a)/y),0,M-1),E=N(Math.floor((h.seat.y+h.hy-a)/y),0,M-1);for(let I=P;I<=E;I++)for(let k=w;k<=S;k++)C[I*b+k+1]++,R++}for(let f=0;f<v;f++)C[f+1]+=C[f];let x=new Int32Array(R),g=C.slice(0,v);for(let f=0;f<o;f++){let h=r[f],w=N(Math.floor((h.seat.x-h.hx-i)/y),0,b-1),S=N(Math.floor((h.seat.x+h.hx-i)/y),0,b-1),P=N(Math.floor((h.seat.y-h.hy-a)/y),0,M-1),E=N(Math.floor((h.seat.y+h.hy-a)/y),0,M-1);for(let I=P;I<=E;I++)for(let k=w;k<=S;k++){let O=I*b+k;x[g[O]++]=f}}return{seats:e,entries:r,minX:i,minY:a,cell:y,cols:b,rows:M,cellStart:C,items:x,stamp:new Int32Array(o),epoch:0}}function Go(e,t,n={}){let{cols:o,rows:r,cell:i,minX:a,minY:s,cellStart:u,items:c,entries:l}=e,d=Math.floor((t.x-a)/i),m=Math.floor((t.y-s)/i);if(d<0||m<0||d>=o||m>=r)return null;let p=m*o+d,y=u[p+1],b=-1,M=1/0;for(let v=u[p];v<y;v++){let C=c[v],R=l[C];if(n.filter&&!n.filter(R.seat.id,R.seat)||!No(R,t.x,t.y))continue;let x=t.x-R.seat.x,g=t.y-R.seat.y,f=x*x+g*g;(f<M||f===M&&C<b)&&(M=f,b=C)}return b<0?null:l[b].seat.id}function Vo(e,t,n,o={}){if(!(n>0))return null;let{cols:r,rows:i,cell:a,minX:s,minY:u,cellStart:c,items:l,entries:d}=e,m=Math.max(0,Math.floor((t.x-n-s)/a)),p=Math.min(r-1,Math.floor((t.x+n-s)/a)),y=Math.max(0,Math.floor((t.y-n-u)/a)),b=Math.min(i-1,Math.floor((t.y+n-u)/a));if(m>p||y>b)return null;let M=-1,v=n*n,C=e.stamp,R=++e.epoch;for(let x=y;x<=b;x++){let g=x*r;for(let f=m;f<=p;f++){let h=g+f,w=c[h+1];for(let S=c[h];S<w;S++){let P=l[S];if(C[P]===R)continue;C[P]=R;let E=d[P];if(o.filter&&!o.filter(E.seat.id,E.seat))continue;let I=t.x-E.seat.x,k=t.y-E.seat.y,O=I*I+k*k;(O<v||O===v&&P<M)&&(v=O,M=P)}}}return M<0?null:d[M].seat.id}function Uo(e,t,n={}){let o=Math.min(t.x,t.x+t.width),r=Math.max(t.x,t.x+t.width),i=Math.min(t.y,t.y+t.height),a=Math.max(t.y,t.y+t.height),s=n.mode??"center",{cols:u,rows:c,cell:l,minX:d,minY:m,cellStart:p,items:y,entries:b}=e,M=Math.max(0,Math.floor((o-d)/l)),v=Math.min(u-1,Math.floor((r-d)/l)),C=Math.max(0,Math.floor((i-m)/l)),R=Math.min(c-1,Math.floor((a-m)/l));if(M>v||C>R)return[];let x=[],g=e.stamp,f=++e.epoch;for(let h=C;h<=R;h++){let w=h*u;for(let S=M;S<=v;S++){let P=w+S,E=p[P+1];for(let I=p[P];I<E;I++){let k=y[I];if(g[k]===f)continue;g[k]=f;let O=b[k];if(n.filter&&!n.filter(O.seat.id,O.seat))continue;(s==="center"?O.seat.x>=o&&O.seat.x<=r&&O.seat.y>=i&&O.seat.y<=a:Bo(O,o,i,r,a))&&x.push(k)}}}return x.sort((h,w)=>h-w),x.map(h=>b[h].seat.id)}function Xo(e){let t=e.cols*e.rows,n=0,o=0;for(let i=0;i<t;i++){let a=e.cellStart[i+1]-e.cellStart[i];a>0&&n++,a>o&&(o=a)}let r=e.items.length;return{cell:e.cell,cols:e.cols,rows:e.rows,cells:t,occupiedCells:n,refs:r,maxPerCell:o,meanPerOccupiedCell:n?r/n:0}}var Ko=[{key:"wheelchair",label:"Wheelchair space",short:"Wheelchair",icon:"\u267F"},{key:"companion",label:"Companion seat",short:"Companion",icon:"\u{1F9D1}\u200D\u{1F91D}\u200D\u{1F9D1}"},{key:"semi-ambulatory",label:"Semi-ambulatory (limited mobility)",short:"Limited mobility",icon:"\u{1F9AF}"},{key:"designated-aisle",label:"Designated aisle / transfer seat",short:"Aisle transfer",icon:"AS"},{key:"step-free",label:"Step-free accessible seat",short:"Step-free",icon:"SF"},{key:"hearing",label:"Assistive listening",short:"Hearing",icon:"\u{1F9BB}"},{key:"cart",label:"CART live-caption view",short:"CART captions",icon:"CC"},{key:"sign-language",label:"Sign-language view",short:"Sign language",icon:"\u{1F91F}"},{key:"low-vision",label:"Blind / low-vision viewing",short:"Low vision",icon:"LV"},{key:"sensory-friendly",label:"Quiet / sensory-friendly seating",short:"Sensory-friendly",icon:"QS"},{key:"plus-size",label:"Plus-size seat",short:"Plus-size",icon:"\u{1F4BA}"},{key:"lift-armrest",label:"Lift-up armrest",short:"Lift armrest",icon:"\u2195\uFE0F"}],fi=new Map(Ko.map(e=>[e.key,e]));var Yo=[{key:"obstructedView",label:"Obstructed view",short:"Obstructed",icon:"\u26D4"},{key:"restrictedView",label:"Restricted view",short:"Restricted",icon:"\u{1F441}"},{key:"premium",label:"Premium seat",short:"Premium",icon:"\u2605"}],mi=new Map(Yo.map(e=>[e.key,e]));var Ut=["start","end","both","none"];var zo=["reference-focal","bar","entrance","exit","restroom","screen","sound","concession","coat","wall","rail","suite","obstruction"],hi=new Set(zo);function Z(e){return typeof e=="string"&&Ut.includes(e)}function pe(e,t){return e&&t?"both":e?"start":t?"end":"none"}function Xt(e){let t=new Map,n=te(e);if(!n.size)return t;let o=new Map;for(let r of e){if(r.type!=="row"||!n.has(r.id))continue;let i=r.segmentedRow.groupId,a=o.get(i)??[];a.push(r),o.set(i,a)}for(let r of o.values())r.sort((i,a)=>i.segmentedRow.componentIndex-a.segmentedRow.componentIndex),r.forEach((i,a)=>{let s=r[a+1];t.set(i.id,{start:a>0&&i.segmentedRow.boundaryBefore==="continuous",end:!!s&&s.segmentedRow.boundaryBefore==="continuous"})});return t}function Kt(e,t){let n=Number.isInteger(e.seatCount)&&e.seatCount>0?e.seatCount:0,o=new Set;for(let d of e.overrides??[])d.skip&&o.add(d.index);let r=d=>d>=0&&d<n&&!o.has(d),i=pe(!t?.start,!t?.end),a=Z(e.aisleSeats)?e.aisleSeats:void 0,s=a??i,u=-1,c=-1;for(let d=0;d<n;d+=1)r(d)&&(u<0&&(u=d),c=d);let l=new Set;if(u>=0){(s==="start"||s==="both")&&l.add(u),(s==="end"||s==="both")&&l.add(c);for(let d of o)r(d-1)&&l.add(d-1),r(d+1)&&l.add(d+1)}return{...a?{override:a}:{},automatic:i,slots:[...l].sort((d,m)=>d-m)}}function $o(e,t=[e]){return Kt(e,e.segmentedRow?Xt(t).get(e.id):void 0)}function Yt(e){let t=new Set;for(let n of Q(e)){let o=Xt(n.objects);for(let r of n.objects)if(r.type==="row")for(let i of Kt(r,o.get(r.id)).slots)t.add(`${r.id}:${i}`)}return t}function Wo(e,t,n){return Yt(e).has(`${t}:${n}`)}function Be(e){let t=Z(e.aisleSeats)?e.aisleSeats:"both";return{start:t==="start"||t==="both",end:t==="end"||t==="both"}}function He(e,t){t==="both"?delete e.aisleSeats:e.aisleSeats=t}function qo(e,t,n){if(!Z(e.aisleSeats)){delete t.aisleSeats,delete n.aisleSeats;return}let o=Be(e);He(t,pe(o.start,!0)),He(n,pe(!0,o.end))}function Qo(e,t){let n=e[0],o=e[e.length-1];if(!n||!o||!Z(n.aisleSeats)&&!Z(o.aisleSeats)){delete t.aisleSeats;return}He(t,pe(Be(n).start,Be(o).end))}0&&(module.exports={AUTOMATIC_ROUND_TABLE_RADIUS_MAX,AUTOMATIC_ROUND_TABLE_RADIUS_MIN,CHAIR_NUMBERING_DIRECTIONS,CHAIR_NUMBERING_FORMATS,CHAIR_NUMBERING_START_MAX,DEFAULT_SEAT_RADIUS,FLOOR_COVER_LIMIT,FLOOR_STACK_GAP_RATIO,FLOOR_STACK_MIN_SURFACE_PX,LEVEL_CONTEXT_PREFIX,TABLE_SEAT_OFFSET,TEXT_BACKGROUND_PADDING_MAX,TEXT_BACKGROUND_RADIUS_MAX,TEXT_LETTER_SPACING_MAX,TEXT_LETTER_SPACING_MIN,TEXT_LINE_HEIGHT_MAX,TEXT_LINE_HEIGHT_MIN,TEXT_OPACITY_MIN,TEXT_WIDTH_MAX,TEXT_WIDTH_MIN,aisleSeatIds,allObjects,automaticRoundTableRadius,buildAisleHoles,buildSeatIndex,buildSectionShell,chairNumberingProblem,chartBounds,combinedFloorZoneId,compactChairNumbering,cubicPoint,distanceToRings,distributeAlongCubic,effectiveFloorOverview,expandBooth,expandChart,expandRow,expandRowSlots,expandTable,expandTableSlots,floorObjects,floorStackPlacements,floorsOf,gridStats,hitTest,initialFloorMode,isAisleSeat,isRowAisleSeats,layoutCombinedFloorPlan,layoutFloorStack,levelContextOutlines,mainFloorId,mergeRowAisleSeats,nearestWithin,objectCenter,owningSectionForObject,pointInPolygon,pointInPolygonWithHoles,pointOnPolygonBoundary,polygonArea,polygonInscribedAnchor,polygonLabelPoint,polygonNetArea,queryRect,resolveRowAisleSeats,resolveSegmentedRowGroups,rowInventoryCount,rowSeatPositions,segmentedRowComponentSeats,segmentedRowComponents,segmentedRowSeatTotal,smoothCubicThroughMiddle,splitRowAisleSeats,stackFloors,suggestedFloorOverview,tableChairBookingLabel,tableChairDisplayLabel,tableChairToken,tableInventoryCount,tableSeatCountsBySide,textLayoutMetrics,translateObject,usableHoles});
1
+ "use strict";var ye=Object.defineProperty;var Wt=Object.getOwnPropertyDescriptor;var qt=Object.getOwnPropertyNames;var Qt=Object.prototype.hasOwnProperty;var Zt=(e,t)=>{for(var n in t)ye(e,n,{get:t[n],enumerable:!0})},Jt=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of qt(t))!Qt.call(e,r)&&r!==n&&ye(e,r,{get:()=>t[r],enumerable:!(o=Wt(t,r))||o.enumerable});return e};var en=e=>Jt(ye({},"__esModule",{value:!0}),e);var Jo={};Zt(Jo,{AUTOMATIC_ROUND_TABLE_RADIUS_MAX:()=>pt,AUTOMATIC_ROUND_TABLE_RADIUS_MIN:()=>bt,CHAIR_NUMBERING_DIRECTIONS:()=>it,CHAIR_NUMBERING_FORMATS:()=>at,CHAIR_NUMBERING_START_MAX:()=>Ie,DEFAULT_SEAT_RADIUS:()=>Vt,FLOOR_COVER_LIMIT:()=>Gt,FLOOR_STACK_GAP_RATIO:()=>Nt,FLOOR_STACK_MIN_SURFACE_PX:()=>jo,LEVEL_CONTEXT_PREFIX:()=>be,TABLE_SEAT_OFFSET:()=>G,TEXT_BACKGROUND_PADDING_MAX:()=>fr,TEXT_BACKGROUND_RADIUS_MAX:()=>mr,TEXT_LETTER_SPACING_MAX:()=>ur,TEXT_LETTER_SPACING_MIN:()=>lr,TEXT_LINE_HEIGHT_MAX:()=>cr,TEXT_LINE_HEIGHT_MIN:()=>sr,TEXT_OPACITY_MIN:()=>dr,TEXT_WIDTH_MAX:()=>ar,TEXT_WIDTH_MIN:()=>ir,aisleSeatIds:()=>Yt,allObjects:()=>_t,automaticRoundTableRadius:()=>to,buildAisleHoles:()=>on,buildSeatIndex:()=>Go,buildSectionShell:()=>nn,chairNumberingProblem:()=>Tn,chartBounds:()=>X,combinedFloorZoneId:()=>Ne,compactChairNumbering:()=>Ln,cubicPoint:()=>ae,distanceToRings:()=>$e,distributeAlongCubic:()=>ge,effectiveFloorOverview:()=>Ht,expandBooth:()=>At,expandChart:()=>Fe,expandRow:()=>Rt,expandRowSlots:()=>kt,expandTable:()=>Et,expandTableSlots:()=>_e,floorObjects:()=>wo,floorStackPlacements:()=>Bt,floorsOf:()=>Q,gridStats:()=>Ko,hitTest:()=>Vo,initialFloorMode:()=>Fo,isAisleSeat:()=>qo,isRowAisleSeats:()=>Z,layoutCombinedFloorPlan:()=>Oo,layoutFloorStack:()=>Ro,levelContextOutlines:()=>Lo,mainFloorId:()=>Do,mergeRowAisleSeats:()=>Zo,nearestWithin:()=>Uo,objectCenter:()=>je,owningSectionForObject:()=>Lt,pointInPolygon:()=>Le,pointInPolygonWithHoles:()=>U,pointOnPolygonBoundary:()=>Tt,polygonArea:()=>Me,polygonInscribedAnchor:()=>we,polygonLabelPoint:()=>De,polygonNetArea:()=>cn,queryRect:()=>Xo,resolveRowAisleSeats:()=>Wo,resolveSegmentedRowGroups:()=>te,rowInventoryCount:()=>xo,rowSeatPositions:()=>me,segmentedRowComponentSeats:()=>vn,segmentedRowComponents:()=>wn,segmentedRowSeatTotal:()=>Pn,smoothCubicThroughMiddle:()=>tn,splitRowAisleSeats:()=>Qo,stackFloors:()=>vo,suggestedFloorOverview:()=>Eo,tableChairBookingLabel:()=>Ce,tableChairDisplayLabel:()=>ke,tableChairToken:()=>st,tableInventoryCount:()=>So,tableSeatCountsBySide:()=>Ot,textLayoutMetrics:()=>xe,translateObject:()=>he,usableHoles:()=>V});module.exports=en(Jo);var tr=Math.PI/180;function T(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function L(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function ae(e,t){let n=1-t,o=n*n*n,r=3*n*n*t,i=3*n*t*t,a=t*t*t;return{x:o*e.start.x+r*e.control1.x+i*e.control2.x+a*e.end.x,y:o*e.start.y+r*e.control1.y+i*e.control2.y+a*e.end.y}}function tn(e,t,n){let o={x:(e.x+t.x)/2,y:(e.y+t.y)/2},r={x:(n.x-o.x)*4/3,y:(n.y-o.y)*4/3};return{start:{...e},control1:{x:e.x+(t.x-e.x)/3+r.x,y:e.y+(t.y-e.y)/3+r.y},control2:{x:e.x+(t.x-e.x)*2/3+r.x,y:e.y+(t.y-e.y)*2/3+r.y},end:{...t}}}function ge(e,t,n=192){if(!Number.isInteger(t)||t<1)throw new Error("Path point count must be a positive integer");if(t===1)return[ae(e,.5)];let o=Array.from({length:n+1},(u,c)=>ae(e,c/n)),r=new Float64Array(o.length);for(let u=1;u<o.length;u+=1){let c=o[u].x-o[u-1].x,l=o[u].y-o[u-1].y;r[u]=r[u-1]+Math.hypot(c,l)}let i=r[r.length-1];if(i<=1e-9)return Array.from({length:t},()=>({...e.start}));let a=[],s=1;for(let u=0;u<t;u+=1){let c=i*u/(t-1);for(;s<r.length-1&&r[s]<c;)s+=1;let l=r[s-1],d=r[s],m=d===l?0:(c-l)/(d-l);a.push({x:o[s-1].x+(o[s].x-o[s-1].x)*m,y:o[s-1].y+(o[s].y-o[s-1].y)*m})}return a}function _(e,t){return{x:e.x+t.x,y:e.y+t.y}}function J(e,t){return{x:e.x-t.x,y:e.y-t.y}}function D(e,t){return{x:e.x*t,y:e.y*t}}function se(e,t=13){return Array.from({length:t},(n,o)=>ae(e,o/(t-1)))}function Ve(e,t){let n=Math.max(0,Math.min(1,t))*(e.length-1),o=Math.min(e.length-2,Math.floor(n));return L(e[o],e[o+1],n-o)}function Ue(e,t,n){let o=Math.max(0,Math.min(1,t)),r=Math.max(o,Math.min(1,n)),i=[Ve(e,o)];for(let a=1;a<e.length-1;a+=1){let s=a/(e.length-1);s>o+1e-9&&s<r-1e-9&&i.push(e[a])}return i.push(Ve(e,r)),i}function Xe(e,t){let n=[[0,1],[1,2],[2,3],[3,0]],o=0,r=Number.POSITIVE_INFINITY;n.forEach(([m,p],y)=>{let b=T(L(e[m],e[p],.5),t);b<r&&(r=b,o=y)});let i=e[o],a=e[(o+1)%4],s=e[(o+2)%4],u=e[(o+3)%4],c=L(i,a,.5),l=J(t,c),d=Math.max(1e-9,Math.hypot(l.x,l.y));return{p0:i,p1:a,p2:s,p3:u,normal:D(l,1/d),depth:(T(i,u)+T(a,s))/2}}function Ke(e){let{p0:t,p1:n,p2:o,p3:r,normal:i,depth:a}=e,s=J(n,t),u=J(o,r),c=a*.22,l=a*.12;return{nearPath:{start:t,control1:_(_(t,D(s,1/3)),D(i,c)),control2:_(_(t,D(s,2/3)),D(i,c)),end:n},farPath:{start:o,control1:_(_(r,D(u,2/3)),D(i,l)),control2:_(_(r,D(u,1/3)),D(i,l)),end:r}}}function nn(e,t,n){if(e.length!==4)throw new Error("A section shell requires four mapped bounds corners");let o=e.reduce((y,b)=>_(y,b),{x:0,y:0});o.x/=4,o.y/=4;let r=T(e[0],e[1]),i=T(e[0],e[3]),a=n==="auto"?r>i*1.25&&T(o,t)>i?"bezier":"tapered":n;if(a==="rectangle")return{mode:a,outline:e.map(y=>({...y}))};let s=Xe(e,t),{p0:u,p1:c,p2:l,p3:d}=s;if(a==="tapered")return{mode:a,outline:[_(u,D(J(c,u),.14)),_(u,D(J(c,u),1-.14)),l,d]};let{nearPath:m,farPath:p}=Ke(s);return{mode:a,outline:[...se(m),...se(p).slice(1)]}}function on(e,t,n,o){if(e.length!==4)throw new Error("Aisle generation requires four mapped bounds corners");if(!Number.isInteger(n)||n<0||n>3)throw new Error("Aisle count must be an integer from 0 to 3");if(n===0)return[];let r=Xe(e,t),{p0:i,p1:a,p2:s,p3:u}=r,c=o==="bezier"?Ke(r):null,l=c?se(c.nearPath):null,d=c?se(c.farPath).reverse():null,m=Math.min(.055,.18/(n+1));return Array.from({length:n},(p,y)=>{let b=(y+1)/(n+1),M=b-m/2,v=b+m/2;return l&&d?[...Ue(l,M,v),...Ue(d,M,v).reverse()]:[L(i,a,M),L(i,a,v),L(u,s,v),L(u,s,M)]})}var ir=40,ar=1200,sr=.8,cr=3,lr=-2,ur=20,dr=.1,fr=40,mr=40,Ye=e=>Math.max(1,e.fontSize*.6+(e.letterSpacing??0));function rn(e,t){let n=e.text.split(/\r?\n/);if(!e.width)return Math.max(1,n.length);let o=Math.max(1,Math.floor(t/Ye(e))),r=0;for(let i of n){if(!i.length){r+=1;continue}let a=0;for(let s of i.split(/\s+/)){let u=s.length;a&&a+1+u<=o?a+=1+u:(r+=Math.max(1,Math.ceil(u/o)),a=u%o)}}return Math.max(1,r)}function xe(e){let t=e.background?.padding??0,n=e.text.split(/\r?\n/),o=Math.max(1,...n.map(s=>s.length))*Ye(e),r=e.width??o+t*2,i=Math.max(1,r-t*2),a=rn(e,i);return{width:r,height:a*e.fontSize*(e.lineHeight??1.2)+t*2,lineCount:a,padding:t}}function an(e,t,n){let o=n.x-t.x,r=n.y-t.y,i=o*o+r*r,a=i?Math.max(0,Math.min(1,((e.x-t.x)*o+(e.y-t.y)*r)/i)):0;return Math.hypot(e.x-(t.x+a*o),e.y-(t.y+a*r))}function $e(e,t){let n=1/0;for(let o of t)if(!(o.length<2))for(let r=0,i=o.length-1;r<o.length;i=r++){let a=an(e,o[i],o[r]);a<n&&(n=a)}return n}function ze(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,a=t[o].y,s=t[r].x,u=t[r].y;a>e.y!=u>e.y&&e.x<(s-i)*(e.y-a)/(u-a)+i&&(n=!n)}return n}function We(e){return Array.isArray(e)?e.filter(t=>Array.isArray(t)&&t.length>=3):[]}function sn(e,t,n){let o=ze(e,t)&&!n.some(i=>ze(e,i)),r=$e(e,[t,...n]);return o?r:-r}function Y(e,t,n,o,r){let i=sn({x:e,y:t},o,r);return{x:e,y:t,h:n,d:i,max:i+n*Math.SQRT2}}var Se=class{constructor(){this.items=[]}get size(){return this.items.length}push(t){let n=this.items;n.push(t);let o=n.length-1;for(;o>0;){let r=o-1>>1;if(n[r].max>=n[o].max)break;[n[r],n[o]]=[n[o],n[r]],o=r}}pop(){let t=this.items,n=t[0],o=t.pop();if(t.length&&o){t[0]=o;let r=0;for(;;){let i=r*2+1,a=i+1,s=r;if(i<t.length&&t[i].max>t[s].max&&(s=i),a<t.length&&t[a].max>t[s].max&&(s=a),s===r)break;[t[s],t[r]]=[t[r],t[s]],r=s}}return n}};function Me(e){if(e.length<3)return 0;let t=0;for(let n=0,o=e.length-1;n<e.length;o=n++)t+=(e[o].x+e[n].x)*(e[o].y-e[n].y);return Math.abs(t)/2}function cn(e,t){return Math.max(0,Me(e)-We(t).reduce((n,o)=>n+Me(o),0))}function we(e,t){let n=We(t);if(!e.length)return{point:{x:0,y:0},radius:0};if(e.length<3){let b=e.reduce((v,C)=>v+C.x,0)/e.length,M=e.reduce((v,C)=>v+C.y,0)/e.length;return{point:{x:b,y:M},radius:0}}let o=1/0,r=1/0,i=-1/0,a=-1/0;for(let b of e)b.x<o&&(o=b.x),b.y<r&&(r=b.y),b.x>i&&(i=b.x),b.y>a&&(a=b.y);let s=i-o,u=a-r,c=Math.min(s,u);if(!(c>0))return{point:{x:(o+i)/2,y:(r+a)/2},radius:0};let l=Math.max(s,u)/150,d=new Se,m=c/2;for(let b=o;b<i;b+=c)for(let M=r;M<a;M+=c)d.push(Y(b+m,M+m,m,e,n));let p=Y(o+s/2,r+u/2,0,e,n),y=0;for(;d.size;){let b=d.pop();if(!b)break;b.d>p.d&&(p=b),!(b.max-p.d<=l)&&(y>=4e3||(y+=1,m=b.h/2,d.push(Y(b.x-m,b.y-m,m,e,n)),d.push(Y(b.x+m,b.y-m,m,e,n)),d.push(Y(b.x-m,b.y+m,m,e,n)),d.push(Y(b.x+m,b.y+m,m,e,n))))}return{point:{x:p.x,y:p.y},radius:Math.max(0,p.d)}}function ee(e,t,n){return Math.max(t,Math.min(n,e))}function N(e,t,n){return e<t?t:e>n?n:e}function ln(e){return ee(e,0,1)}function qe(e){let t=ln(e);return t*t*(3-2*t)}var z=Math.PI*2;function $(e){return Number.isFinite(e.x)&&Number.isFinite(e.y)}function un(e,t,n){let o=t-e;if(n){for(;o<0;)o+=z;for(;o>=z;)o-=z}else{for(;o>0;)o-=z;for(;o<=-z;)o+=z}return o}function Je(e){if(e.version!==1||e.closed!==!0||!$(e.start)||!Array.isArray(e.segments)||e.segments.length<2||e.segments.length>512)return!1;let t=e.start;for(let n of e.segments){if(!n||!$(n.end))return!1;if(n.kind==="line"){if(T(t,n.end)<=1e-9)return!1}else if(n.kind==="bezier"){if(!$(n.control1)||!$(n.control2)||T(t,n.end)<=1e-9)return!1}else if(n.kind==="arc"){if(!$(n.center)||!Number.isFinite(n.radius)||n.radius<=1e-6||Math.abs(T(t,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||Math.abs(T(n.end,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||T(t,n.end)<=1e-9)return!1}else return!1;t=n.end}return T(t,e.start)<=1e-4}function dn(e,t,n){let o=1-n;return{x:o**3*e.x+3*o**2*n*t.control1.x+3*o*n**2*t.control2.x+n**3*t.end.x,y:o**3*e.y+3*o**2*n*t.control1.y+3*o*n**2*t.control2.y+n**3*t.end.y}}function et(e,t=2){if(!Je(e))throw new Error("Section outline path is invalid");let n=Math.max(.25,t),o=[{...e.start}],r=e.start;for(let i of e.segments){if(i.kind==="line")o.push({...i.end});else if(i.kind==="arc"){let a=Math.atan2(r.y-i.center.y,r.x-i.center.x),s=Math.atan2(i.end.y-i.center.y,i.end.x-i.center.x),u=un(a,s,i.clockwise),c=Math.max(2,Math.ceil(Math.abs(u)*i.radius/n));for(let l=1;l<=c;l+=1){let d=a+u*l/c;o.push({x:i.center.x+Math.cos(d)*i.radius,y:i.center.y+Math.sin(d)*i.radius})}}else{let a=T(r,i.control1)+T(i.control1,i.control2)+T(i.control2,i.end),s=Math.max(2,Math.ceil(a/n));for(let u=1;u<=s;u+=1)o.push(dn(r,i,u/s))}r=i.end}return T(o[o.length-1],o[0])<=1e-4&&o.pop(),o}function tt(e,t,n){return fn(e,r=>({x:r.x+t,y:r.y+n}))}function fn(e,t,n=1,o=!1){return{...e,start:t(e.start),segments:e.segments.map(r=>r.kind==="line"?{...r,end:t(r.end)}:r.kind==="arc"?{...r,center:t(r.center),radius:r.radius*Math.abs(n),clockwise:o?!r.clockwise:r.clockwise,end:t(r.end)}:{...r,control1:t(r.control1),control2:t(r.control2),end:t(r.end)})}}var mn=45,ve=150,hn=60;function bn(e){let t=mn/100;if(e<=t)return ve;let n=Math.min(1,(e-t)/(1-t));return ve-n*(ve-hn)}var Qe=.5523;function Ze(e,t){return Math.abs(e.x-t.x)<=1e-6&&Math.abs(e.y-t.y)<=1e-6}function pn(e){let t=[],n=[];for(e.forEach((o,r)=>{$(o)&&(t.length&&Ze(t[t.length-1],o)||(t.push({x:o.x,y:o.y}),n.push(r)))});t.length>1&&Ze(t[0],t[t.length-1]);)t.pop(),n.pop();return{points:t,sourceIndex:n}}var yn=.5,gn=4/3;function xn(e,t,n){let o=t.x-e.x,r=t.y-e.y,i=Math.hypot(o,r);if(i<=1e-9)return{kind:"line",end:{...t}};let a=-r/i,s=o/i,u=n*gn;return{kind:"bezier",control1:{x:e.x+o/3+a*u,y:e.y+r/3+s*u},control2:{x:e.x+o*2/3+a*u,y:e.y+r*2/3+s*u},end:{...t}}}function nt(e,t){let{points:n,sourceIndex:o}=pn(e),r=n.length;if(r<3)return null;let i=Math.min(100,Math.max(0,t.cornerSmoothing??0))/100,a=t.edgeCurvature,s=new Array(r).fill(0);if(a?.length)for(let x=0;x<r;x+=1){let g=a[o[x]];s[x]=Number.isFinite(g)?Math.min(100,Math.max(-100,g))/100:0}let u=s.some(x=>Math.abs(x)>1e-6);if(i<=0&&!u)return null;let c=t.wideAngleThresholdDeg??bn(i),l=[];for(let x=0;x<r;x+=1)l[x]=T(n[x],n[(x+1)%r]);let d=new Array(r).fill(0);for(let x=0;x<r;x+=1){let g=n[(x-1+r)%r],f=n[x],h=n[(x+1)%r],w={x:g.x-f.x,y:g.y-f.y},S={x:h.x-f.x,y:h.y-f.y},P=Math.hypot(w.x,w.y),E=Math.hypot(S.x,S.y);if(P<=1e-9||E<=1e-9)continue;let I=Math.min(1,Math.max(-1,(w.x*S.x+w.y*S.y)/(P*E))),k=Math.acos(I)*180/Math.PI;if(k<c)continue;let O=qe((k-c)/(180-c));d[x]=i*O*.5*Math.min(P,E)}for(let x=0;x<r;x+=1){let g=(x+1)%r,f=d[x]+d[g];if(f>l[x]&&f>1e-9){let h=l[x]/f;d[x]*=h,d[g]*=h}}let m=new Array(r),p=new Array(r);for(let x=0;x<r;x+=1){let g=n[(x-1+r)%r],f=n[x],h=n[(x+1)%r];if(d[x]<=1e-6){m[x]={...f},p[x]={...f};continue}let w=T(f,g)||1,S=T(f,h)||1;m[x]={x:f.x+(g.x-f.x)/w*d[x],y:f.y+(g.y-f.y)/w*d[x]},p[x]={x:f.x+(h.x-f.x)/S*d[x],y:f.y+(h.y-f.y)/S*d[x]}}if(d.every(x=>x<=1e-6)&&!u)return null;let y=[],b={...p[0]},M=b,v=(x,g)=>{if(T(M,x)<=1e-9)return;let f=s[g];Math.abs(f)>1e-6?y.push(xn(M,x,f*yn*l[g])):y.push({kind:"line",end:{...x}}),M=x};for(let x=1;x<=r;x+=1){let g=x%r,f=n[g];v(m[g],(x-1)%r),d[g]>1e-6&&T(m[g],p[g])>1e-9&&(y.push({kind:"bezier",control1:L(m[g],f,Qe),control2:L(p[g],f,Qe),end:{...p[g]}}),M=p[g])}if(!y.length)return null;let C=y[y.length-1];T(C.end,b)>1e-9&&(C.kind==="line"?C.end={...b}:y.push({kind:"line",end:{...b}}));let R={version:1,closed:!0,start:b,segments:y};return Je(R)?R:null}function Sn(e){let t=e.points??[];if(e.kind!=="polygon"||t.length<3||!Array.isArray(e.edgeCurvature))return[];let n=t.map((o,r)=>{let i=e.edgeCurvature[r];return Number.isFinite(i)?Math.min(100,Math.max(-100,i)):0});return n.some(o=>Math.abs(o)>.5)?n:[]}function Mn(e){let t=Sn(e);return t.length?nt(e.points,{edgeCurvature:t}):null}function ce(e,t=2){let n=Mn(e);return n?et(n,t):e.points??[]}function wn(e,t,n){let o=[];for(let r=0;r<e.length-1;r+=1){let i=e[r],a=e[r+1],s=Math.hypot(a.x-i.x,a.y-i.y);if(s<=0)continue;let u=Math.max(1,Math.round(s/n)),c=s/u,l=Math.atan2(a.y-i.y,a.x-i.x),d=r===0,p=(r>0?t[r-1]:void 0)==="break"?2:1,y=d?{...i}:{x:i.x+Math.cos(l)*c*p,y:i.y+Math.sin(l)*c*p},b=d?u+1:Math.max(1,u-(p-1));o.push({origin:y,rotation:l*180/Math.PI,seatCount:b,seatSpacing:c})}return o}function vn(e){let t=e.rotation*Math.PI/180,n={x:Math.cos(t),y:Math.sin(t)};return Array.from({length:e.seatCount},(o,r)=>({x:e.origin.x+n.x*r*e.seatSpacing,y:e.origin.y+n.y*r*e.seatSpacing}))}function Pn(e){return e.reduce((t,n)=>t+n.seatCount,0)}function te(e){let t=new Map,n=new Map;for(let o of e){if(o.type!=="row"||!o.segmentedRow)continue;let r=n.get(o.segmentedRow.groupId)??[];r.push(o),n.set(o.segmentedRow.groupId,r)}for(let[o,r]of n){let i=r.slice().sort((m,p)=>m.segmentedRow.componentIndex-p.segmentedRow.componentIndex),a=i[0]?.segmentedRow?.componentCount??0,s=i[0]?.segmentedRow;if(!s||!(a>=2&&i.length===a&&s?.boundaryBefore==="start"&&i.every((m,p)=>m.segmentedRow?.kind==="segmented-row-v1"&&m.segmentedRow.groupId===o&&m.segmentedRow.componentCount===a&&m.segmentedRow.componentIndex===p&&m.segmentedRow.repeatLabelOnComponents===s.repeatLabelOnComponents&&(p===0?m.segmentedRow.boundaryBefore==="start":m.segmentedRow.boundaryBefore!=="start")&&m.segmentedRow.displayLabel===s.displayLabel)))continue;let c=i.reduce((m,p)=>m+p.seatCount,0),l=0,d=0;for(let m of i)m.segmentedRow.boundaryBefore==="break"&&(l+=1),t.set(m.id,{groupId:o,adjacencyOffset:l,displayOffset:d,displayLabel:s.displayLabel,totalSeats:c,canonical:i[0],viewFromSeatUrl:s.viewFromSeatUrl,viewFromSeatMeta:s.viewFromSeatMeta,confidenceEvidence:s.confidenceEvidence}),l+=m.seatCount,d+=m.seatCount}return t}var In="ABCDEFGHIJKLMNOPQRSTUVWXYZ";var Cn="abcdefghijklmnopqrstuvwxyz";function kn(e,t){let n=t.length,o=e+1,r="";for(;o>0;){o-=1;let i=o%n;r=t[i]+r,o=Math.floor(o/n)}return r}function ne(e,t=!1){let n=t?Cn:In;return kn(Math.max(0,Math.floor(e)-1),n)}var Rn=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]];function ot(e){if(!Number.isFinite(e)||e<=0)return String(e);let t=Math.floor(e),n="";for(let[o,r]of Rn)for(;t>=o;)n+=r,t-=o;return n}function On(e){let t=new Array(e);return Array.from({length:e},(n,o)=>o).sort((n,o)=>Math.abs(2*n-(e-1))-Math.abs(2*o-(e-1))||n-o).forEach((n,o)=>t[n]=o),t}function le(e,t){let n=e.seatLabelStart??1,o=e.seatNumbering?.direction??"ltr",r=e.seatNumbering?.step??1,i=e.seatNumbering?.scheme??"decimal",a=e.seatNumbering?.prefix??"",s=e.seatNumbering?.endAt,u=e.seatCount;if(i==="updown"||i==="updown-descending"){let p=Math.ceil(u/2),y=i==="updown"?t<p?n+2*t:n-1+2*(u-t):t<p?n+2*(p-1-t):n+1+2*(t-p);return`${a}${y}`}let c=i==="odd"||i==="even"?2:r,l=s!=null&&Number.isFinite(s)?s-(u-1)*c:n,d=o==="center"?On(u)[t]:o==="rtl"?u-1-t:t,m;switch(i){case"odd":{let p=l%2===1?l:l+1;m=String(p+d*2);break}case"even":{let p=l%2===0?l:l+1;m=String(p+d*2);break}case"roman":m=ot(l+d*r);break;case"letters-upper":m=ne(l+d*r,!1);break;case"letters-lower":m=ne(l+d*r,!0);break;default:m=String(l+d*r);break}return`${a}${m}`}function En(e){return{...e.canonical,seatCount:e.totalSeats,label:e.displayLabel,displayLabel:e.displayLabel}}function rt(e,t,n){return n?.label??`${e.seatLabelBase??e.label}-${le(e,t)}`}function Pe(e,t,n,o){if(o?.displayLabel)return o.displayLabel;if(e.seatDisplayLabelMode==="number")return le(e,t);if(!n)return`${e.displayLabel||e.label}-${le(e,t)}`;let r=En(n),i=n.displayOffset+t;return`${n.displayLabel}-${le(r,i)}`}var Ie=999,it=["clockwise","anticlockwise"],at=["table-number","number","letter"];function Ce(e,t){return`${e.label}-${t+1}`}function An(e,t,n){return e?.direction==="anticlockwise"?Math.max(0,t-1-n):n}function st(e,t){let n=e.chairNumbering,o=n?.start??1,r=An(n,Math.max(0,Math.round(e.seatCount)),t);return n?.format==="letter"?ne(Math.max(1,o)+r):String(o+r)}function ke(e,t){let n=st(e,t);return(e.chairNumbering?.format??"table-number")==="table-number"?`${e.displayLabel??e.label}-${n}`:n}function Tn(e){if(e===void 0)return null;if(!e||typeof e!="object"||Array.isArray(e))return"chairNumbering must be an object";let t=e,n=Object.keys(t).filter(o=>!["start","direction","format"].includes(o));return n.length?`chairNumbering has unsupported field(s): ${n.join(", ")}`:t.start!==void 0&&(!Number.isInteger(t.start)||t.start<0||t.start>Ie)?`chairNumbering.start must be a whole number from 0 to ${Ie}`:t.direction!==void 0&&!it.includes(t.direction)?"chairNumbering.direction must be clockwise or anticlockwise":t.format!==void 0&&!at.includes(t.format)?"chairNumbering.format must be table-number, number or letter":null}function Ln(e){let t={};return e.start!==void 0&&e.start!==1&&(t.start=e.start),e.direction==="anticlockwise"&&(t.direction="anticlockwise"),e.format&&e.format!=="table-number"&&(t.format=e.format),Object.keys(t).length?t:void 0}var W=.02291666666666667,Rr=1/W,_n=58,Dn=_n*W;var jn=3,ct=0,Re=120,Fn=0,Nn=45,Bn=7,q=1.2;function Oe(e,t,n,o){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):o}function Hn(e){return!Number.isFinite(e)||!Number.isInteger(e)||e<0?0:e<=Bn?e:jn}function lt(e,t={}){let n=Oe(t.floorBaseHeightM,ct,Re,0),o=Math.min(Re,n+Hn(e.elevation)*Dn),r=e.height===void 0?o:Oe(e.height,ct,Re,o),i=Oe(e.rake,Fn,Nn,0);return{height:r,rake:i}}function ut(e){let t=e.length;return t<=3?[...e]:[e[Math.floor(t*.25)],e[Math.floor(t*.5)],e[Math.floor(t*.75)]]}function dt(e,t,n){if(!e.length)return 1/0;if(e.length===1)return Math.hypot(t-e[0].x,n-e[0].y);let o=1/0;for(let r=0;r+1<e.length;r++){let i=e[r],a=e[r+1],s=a.x-i.x,u=a.y-i.y,c=s*s+u*u,l=c>1e-12?((t-i.x)*s+(n-i.y)*u)/c:0;l<0?l=0:l>1&&(l=1);let d=t-(i.x+l*s),m=n-(i.y+l*u);if(Math.abs(d)>=o||Math.abs(m)>=o)continue;let p=Math.hypot(d,m);p<o&&(o=p)}return o}function Gn(e){let t=0,n=0;for(let i of e)t+=i.x,n+=i.y;let o=e.length||1;t/=o,n/=o;let r=0;for(let i of e){let a=Math.hypot(i.x-t,i.y-n);a>r&&(r=a)}return{cx:t,cy:n,r}}function ft(e,t){return Math.hypot(e.cx-t.cx,e.cy-t.cy)-e.r-t.r}function Ee(e,t){let n=1/0;for(let o of ut(e)){let r=dt(t,o.x,o.y);r<n&&(n=r)}for(let o of ut(t)){let r=dt(e,o.x,o.y);r<n&&(n=r)}return n}function Vn(e,t){if(e.length<3)return{pts:e,seatIndices:t};let n=0,o=0;for(let l of e)n+=l.x,o+=l.y;n/=e.length,o/=e.length;let r=-1,i=e[0];for(let l of e){let d=Math.hypot(l.x-n,l.y-o);d>r&&(r=d,i=l)}let a=i.x-n,s=i.y-o,u=Math.hypot(a,s);u>1e-9?(a/=u,s/=u):(a=1,s=0);let c=e.map((l,d)=>({p:l,i:d,t:(l.x-n)*a+(l.y-o)*s})).sort((l,d)=>l.t-d.t);return{pts:c.map(l=>l.p),seatIndices:c.map(l=>t[l.i])}}function Un(e){let t=e.length;if(t<3)return null;let n=0,o=0;for(let C of e)n+=C.x,o+=C.y;n/=t,o/=t;let r=0,i=0,a=0,s=0,u=0,c=0,l=0;for(let C of e){let R=C.x-n,x=C.y-o;r+=R*R,a+=x*x,i+=R*x,s+=R*R*R,u+=x*x*x,c+=R*x*x,l+=x*R*R}let d=r*a-i*i;if(Math.abs(d)<1e-9)return null;let m=(s+c)/2,p=(u+l)/2,y=(m*a-p*i)/d,b=(p*r-m*i)/d,M=y+n,v=b+o;return!Number.isFinite(M)||!Number.isFinite(v)?null:{cx:M,cy:v}}var Xn=.15;function Kn(e){if(e.length<2)return null;let t=e.map(g=>{let f=0,h=0;for(let w of g.pts)f+=w.x,h+=w.y;return{x:f/g.pts.length,y:h/g.pts.length}}),n=0,o=0;for(let g of t)n+=g.x,o+=g.y;n/=t.length,o/=t.length;let r=0,i=0,a=0;for(let g of t){let f=g.x-n,h=g.y-o;r+=f*f,i+=f*h,a+=h*h}let s=r+a,u=r*a-i*i,c=s/2+Math.sqrt(Math.max(0,s*s/4-u)),l,d;Math.abs(i)>1e-12?(l=c-a,d=i):r>=a?(l=1,d=0):(l=0,d=1);let m=Math.hypot(l,d);if(!(m>1e-12))return null;l/=m,d/=m;let p=0,y=0,b=0;for(let g of e){if(g.pts.length<2)continue;let f=g.pts[0],h=g.pts[g.pts.length-1],w=h.x-f.x,S=h.y-f.y,P=Math.hypot(w,S);if(!(P>1e-9))continue;let E=w/P,I=S/P;p+=(E*E-I*I)*P,y+=2*E*I*P,b+=P}if(b>0&&Math.hypot(p,y)>=zn*b){let g=Math.atan2(y,p)/2,f=Math.cos(g),h=Math.sin(g);Math.abs(l*f+d*h)>$n&&(l=-h,d=f)}let M=1/0,v=-1/0,C=[];for(let g of e){let f=1/0,h=-1/0;for(let w of g.pts){let S=w.x*l+w.y*d;S<f&&(f=S),S>h&&(h=S),S<M&&(M=S),S>v&&(v=S)}C.push(h-f)}let R=v-M;return R>1e-9?(C.sort((g,f)=>g-f),C[Math.min(C.length-1,Math.floor(C.length*.9))]/R<=Yn?{x:l,y:d}:null):null}var Yn=.35,zn=.8,$n=.7;function mt(e,t,n,o){let r=new Map;for(let f of n){let h=t[f],w=h.rowId||`__seat-${f}`,S=r.get(w);S||(S={pts:[],idx:[]},r.set(w,S)),S.pts.push({x:h.x,y:h.y}),S.idx.push(f)}if(!r.size)return{sectionId:e,rows:[],blockCount:0};let i=[];for(let[f,h]of r){let w=Vn(h.pts,h.idx),S=0;for(let P of w.pts)S+=Math.hypot(P.x-o.x,P.y-o.y);i.push({id:f,pts:w.pts,seatIndices:w.seatIndices,blockId:-1,ordinal:0,blockDepth:0,focalDistance:S/w.pts.length})}let a=i.map(f=>Gn(f.pts)),s=i.length<=256?i.length*(i.length-1)/2:0,u=s?new Float64Array(s):null;u?.fill(Number.NaN);let c=u?new Map(i.map((f,h)=>[f,h])):null,l=(f,h)=>(f>h&&([f,h]=[h,f]),f*(2*i.length-f-1)/2+(h-f-1)),d=(f,h)=>{if(!u)return Ee(i[f].pts,i[h].pts);let w=l(f,h),S=u[w];if(!Number.isNaN(S))return S;let P=Ee(i[f].pts,i[h].pts);return u[w]=P,P},m=(f,h)=>c?d(c.get(f),c.get(h)):Ee(f.pts,h.pts),p=[];for(let f=0;f<i.length;f++){let h=1/0;for(let w=0;w<i.length;w++){if(f===w||ft(a[f],a[w])>=h)continue;let S=d(f,w);S<h&&(h=S)}Number.isFinite(h)&&p.push(h)}p.sort((f,h)=>f-h);let y=p.length?p[Math.floor(p.length/2)]:1,b=Math.max(y*1.8,1e-6),M=i.map(()=>[]);for(let f=0;f<i.length;f++)for(let h=f+1;h<i.length;h++)ft(a[f],a[h])>b||d(f,h)<=b&&(M[f].push(h),M[h].push(f));let v=0;for(let f=0;f<i.length;f++){if(i[f].blockId!==-1)continue;let h=v++,w=[f];for(i[f].blockId=h;w.length;){let S=w.pop();for(let P of M[S])i[P].blockId===-1&&(i[P].blockId=h,w.push(P))}}let C=new Map;for(let f of i){let h=C.get(f.blockId)??[];h.push(f),C.set(f.blockId,h)}let R=[];for(let f of i){if(f.pts.length<4)continue;let h=Un(f.pts);h&&(!Number.isFinite(h.cx)||!Number.isFinite(h.cy)||R.push({x:h.cx,y:h.cy}))}let x=R.length>=2?(()=>{let f=R.map(S=>S.x).sort((S,P)=>S-P),h=R.map(S=>S.y).sort((S,P)=>S-P),w=Math.floor(R.length/2);return{cx:f[w],cy:h[w]}})():null;if(x){let f=I=>Math.hypot(I.x-x.cx,I.y-x.cy),h=1/0,w=-1/0,S=[];for(let I of i){let k=1/0,O=-1/0;for(let j of I.pts){let B=f(j);B<k&&(k=B),B>O&&(O=B)}S.push(O-k),k<h&&(h=k),O>w&&(w=O)}let P=w-h;S.sort((I,k)=>I-k);let E=S[Math.min(S.length-1,Math.floor(S.length*.9))];if(P>1e-9&&E/P<=Xn){let I=i.map(A=>{let ie=0;for(let $t of A.pts)ie+=f($t);return{row:A,radius:ie/A.pts.length}}),k=0,O=0;for(let A of I)k+=A.radius,O+=A.row.focalDistance;k/=I.length,O/=I.length;let j=0;for(let A of I)j+=(A.radius-k)*(A.row.focalDistance-O);if(j<0)for(let A of I)A.radius=-A.radius;let H=1/0;for(let A of I)A.radius<H&&(H=A.radius);I.sort((A,ie)=>A.radius-ie.radius);let F=-1,K=-1/0,zt=P/Math.max(1,I.length)*.5,Ge=[];for(let A of I)A.radius-K>zt&&(F++,K=A.radius),A.row.ordinal=F,A.row.blockDepth=A.radius-H,Ge.push(A.row);return{sectionId:e,rows:Ge,blockCount:v}}}let g=[];for(let[,f]of C){let h=Kn(f);if(h){let w=I=>{let k=0;for(let O of I.pts)k+=O.x*h.x+O.y*h.y;return k/I.pts.length};f.sort((I,k)=>w(I)-w(k)),f.length>=2&&f[0].focalDistance>f[f.length-1].focalDistance&&f.reverse();let S=[],P=y*.5;for(let I of f){let k=S[S.length-1];k&&Math.abs(w(I)-w(k[0]))<P?k.push(I):S.push([I])}let E=0;for(let I=0;I<S.length;I++){if(I>0){let k=1/0;for(let O of S[I-1])for(let j of S[I])k=Math.min(k,m(O,j));E+=k}for(let k of S[I])k.ordinal=I,k.blockDepth=E,g.push(k)}}else{let w=1/0;for(let S of f)S.focalDistance<w&&(w=S.focalDistance);f.sort((S,P)=>S.focalDistance-P.focalDistance);for(let S=0;S<f.length;S++)f[S].ordinal=S,f[S].blockDepth=Math.max(0,f[S].focalDistance-w),g.push(f[S])}}return{sectionId:e,rows:g,blockCount:v}}var Wn=/^\d{4}-\d{2}-\d{2}$/;function qn(e){let t=Date.parse(e);return Number.isFinite(t)?Wn.test(e)?t+864e5:t:null}function Qn(e,t=Date.now()){if(e.validUntil===void 0){if(e.status!=="approved")return!0;let o=e.assessedAt?Date.parse(e.assessedAt):Number.NaN;return Number.isFinite(o)&&(t instanceof Date?t.getTime():t)<=o+366*864e5}let n=qn(e.validUntil);return n===null?!1:(t instanceof Date?t.getTime():t)<n}function Zn(e,t,n){return!(e.eventConfigurationId&&e.eventConfigurationId!==t||e.eventConfigurationVersion!==void 0&&e.eventConfigurationVersion!==n)}function Jn(e){return e.status!=="draft"&&e.status!=="retracted"}function eo(e,t){return e.status===void 0?t===void 0:e.status!=="approved"?!0:typeof t=="string"&&typeof e.basisSha256=="string"&&e.basisSha256===t}function ht(e,t={}){return!!e&&Jn(e)&&Zn(e,t.activeConfigurationId,t.activeConfigurationVersion)&&eo(e,t.activeBasisSha256)&&Qn(e,t.now)}var bt=36,pt=160;function to(e,t=360){let n=ee(Math.round(Number.isFinite(e)?e:1),1,40),o=ee(Number.isFinite(t)?t:360,120,360);return Math.round(ee(n*4*(360/o),bt,pt))}var no=new Set(["pitch-football","rink-hockey","track-athletics","oval-cricket","pitch-rugby","diamond-baseball","court-basketball","court-tennis","ring-boxing"]);function oo(e){return!!e&&no.has(e)}var yt=1.1;var _r=Math.PI*2;var Dr=(()=>{let t={x:0,y:52},n=25,o={x:70,y:t.y-70},r=(o.x*o.x+o.y*o.y-4900)/(2*(o.y+70)),i=r+70,a=[],s=Math.atan2(o.y-r,o.x),u=Math.atan2(o.y-r,-o.x);for(let c=0;c<=24;c++){let l=s+(u-s)*c/24;a.push({x:i*Math.cos(l),y:r+i*Math.sin(l)})}return{half:70,home:t,backstop:n,fence:a}})();function gt(e){return oo(e)}function ro(e){if((e.kind==="polygon"||e.kind==="polyline"||e.kind==="line")&&e.points&&e.points.length>=2)return e.kind==="polygon"?ce(e,6):e.points;if(e.x==null||e.y==null||e.width==null||e.height==null)return null;let t=e.x,n=e.y,o=e.width,r=e.height;return[{x:t,y:n},{x:t+o,y:n},{x:t+o,y:n+r},{x:t,y:n+r}]}function io(e,t,n){let o=n*Math.PI/180,r=Math.cos(o),i=Math.sin(o),a=e.x-t.x,s=e.y-t.y;return{x:t.x+a*r-s*i,y:t.y+a*i+s*r}}function xt(e){let t=ro(e);if(!t||t.length<2)return null;let n=e.rotation??0,o=Math.abs(n)<1e-6?t:t.map(u=>io(u,{x:t.reduce((c,l)=>c+l.x,0)/t.length,y:t.reduce((c,l)=>c+l.y,0)/t.length},n)),r=1/0,i=1/0,a=-1/0,s=-1/0;for(let u of o)r=Math.min(r,u.x),i=Math.min(i,u.y),a=Math.max(a,u.x),s=Math.max(s,u.y);return!Number.isFinite(r)||a-r<1e-6||s-i<1e-6?null:{minX:r,minY:i,maxX:a,maxY:s}}var ao=5,so=3,co=.92,lo=1.9,uo=2,fo=.6,mo=1,ho=.06;function bo(e){return e.heightM!==void 0?e.heightM:e.stageKind==="ring-boxing"?yt:gt(e.stageKind)?ho:mo}function St(e){let t=1/0,n=1/0,o=-1/0,r=-1/0,i=-1/0;for(let a of Q(e)){let s=a.baseHeightM??0;for(let u of a.objects){if(u.type!=="shape"||u.role!=="stage")continue;let c=xt(u);c&&(t=Math.min(t,c.minX),n=Math.min(n,c.minY),o=Math.max(o,c.maxX),r=Math.max(r,c.maxY),i=Math.max(i,s+bo(u)))}}return!Number.isFinite(t)||!Number.isFinite(i)?null:{minX:t,minY:n,maxX:o,maxY:r,deckTopM:i}}function po(e,t,n,o){let r=1/0,i=1/0,a=-1/0,s=-1/0;for(let p of e)Number.isFinite(p.eyeHeightM)&&(r=Math.min(r,p.x),a=Math.max(a,p.x),i=Math.min(i,p.y),s=Math.max(s,p.y));if(!Number.isFinite(r))return null;let u=r*t,c=i*t,l=Math.max(1,Math.ceil((a-r)*t/n)+1),d=Math.max(1,Math.ceil((s-i)*t/n)+1),m=new Float64Array(l*d).fill(-1/0);for(let p of e){if(!Number.isFinite(p.eyeHeightM))continue;let y=p.eyeHeightM-q,b=Math.min(l-1,Math.max(0,Math.floor((p.x*t-u)/n))),v=Math.min(d-1,Math.max(0,Math.floor((p.y*t-c)/n)))*l+b,C=y+o;C>m[v]&&(m[v]=C)}return{cellM:n,minX:u,minY:c,cols:l,rows:d,top:m}}function yo(e,t,n){let o=Math.floor((t-e.minX)/e.cellM),r=Math.floor((n-e.minY)/e.cellM);return o<0||r<0||o>=e.cols||r>=e.rows?-1/0:e.top[r*e.cols+o]}function Mt(e,t,n={}){let o=new Map;if(!t||!e.length)return o;let r=n.metresPerChartUnit??W,i=n.cellM??fo,a=n.chairBackM??co,s=n.selfRowSkipM??uo,u=n.clearThreshold??.9,c=n.partialThreshold??.25,l=Math.max(1,n.columns??ao),d=Math.max(1,n.rows??so),m=po(e,r,i,a);if(!m)return o;let p=(t.maxX-t.minX)*r,y=(t.maxY-t.minY)*r,b=p>=y,M=(t.minX+t.maxX)/2*r,v=(t.minY+t.maxY)/2*r,C=[];for(let x=0;x<l;x++){let g=(x+.5)/l-.5,f=b?M+g*p:M,h=b?v:v+g*y;for(let w=0;w<d;w++){let S=t.deckTopM+(d===1?0:w/(d-1)*lo);C.push({x:f,y:h,z:S})}}let R=i/2;for(let x of e){if(!Number.isFinite(x.eyeHeightM))continue;let g=x.x*r,f=x.y*r,h=x.eyeHeightM,w=0,S=1/0;for(let E of C){let I=E.x-g,k=E.y-f,O=Math.hypot(I,k);if(!(O>s)){w++;continue}let j=I/O,B=k/O,H=0;for(let F=s;F<O;F+=R){let K=yo(m,g+j*F,f+B*F);if(!(!Number.isFinite(K)||K>=h)&&K>h+(E.z-h)*F/O){H=F;break}}H?S=Math.min(S,H):w++}let P=w/C.length;P>=u||o.set(x.id,{seatId:x.id,mark:P<c?"obstructedView":"restrictedView",visibleFraction:P,totalRays:C.length,atDistanceM:Number.isFinite(S)?S:0})}return o}function wt(e,t){if(!t.size)return 0;let n=0;for(let o of e){let r=t.get(o.id);if(!r)continue;let i=o.commercial;i?.restrictedView!==void 0||i?.obstructedView!==void 0||(o.commercial={...i,[r.mark]:!0},n++)}return n}function Ae(e){return e?e.accessibility?.length?e.wheelchairSpaceType&&!e.accessibility.includes("wheelchair")?["wheelchair",...e.accessibility]:e.accessibility:e.wheelchairSpaceType?["wheelchair"]:e.accessible?["wheelchair"]:[]:[]}var fe=Math.PI/180,go=9,G=16;function Te(e,t,n,o){let r=n*fe,i=Math.cos(r),a=Math.sin(r);return{x:o.x+e*i-t*a,y:o.y+e*a+t*i}}function me(e){let{seatCount:t,seatSpacing:n,curve:o,rotation:r,origin:i}=e,a=[];if(e.path)return ge(e.path,t);if(t<=1)return t===1&&a.push({x:i.x,y:i.y}),a;if(o===0){for(let c=0;c<t;c++)a.push(Te(c*n,0,r,i));return a}let s=o/(t-1)*fe,u=n/(2*Math.sin(Math.abs(s)/2));for(let c=0;c<t;c++){let l=c*s,d=u*Math.sin(l),m=-u+u*Math.cos(l);a.push(Te(d,m,r,i))}return a}function Ct(e){let t=new Map;if(e.overrides)for(let n of e.overrides)t.set(n.index,n);return t}function xo(e){let t=new Set((e.overrides??[]).filter(n=>n.skip&&Number.isInteger(n.index)&&n.index>=0&&n.index<e.seatCount).map(n=>n.index));return Math.max(0,e.seatCount-t.size)}function kt(e,t){let n=Ct(e);return me(e).map((o,r)=>{let i=n.get(r),a=Ae(i),s=rt(e,r,i),u={...e.commercial,...i?.commercial};return{index:r,x:o.x+(i?.dx??0),y:o.y+(i?.dy??0),label:s,displayLabel:Pe(e,r,t,i),categoryKey:i?.categoryKey??e.categoryKey,skipped:!!i?.skip,accessible:a.length>0,accessibility:a,wheelchairSpaceType:i?.wheelchairSpaceType,commercial:Object.values(u).some(c=>c!==void 0&&c!==!1&&c!=="")?u:void 0,glyph:i?.glyph,viewUrl:i?.viewFromSeatUrl??e.viewFromSeatUrl,viewMeta:i?.viewFromSeatUrl?i.viewFromSeatMeta:e.viewFromSeatMeta,labelStyle:i?.labelStyle??e.seatLabelStyle}})}function Rt(e){let t=[];for(let n of kt(e))n.skipped||t.push({id:`${e.id}:${n.index}`,label:n.label,displayLabel:n.displayLabel===n.label?void 0:n.displayLabel,x:n.x,y:n.y,rowId:e.id,categoryKey:n.categoryKey,accessible:n.accessible||void 0,accessibility:n.accessibility.length?n.accessibility:void 0,wheelchairSpaceType:n.wheelchairSpaceType,commercial:n.commercial,glyph:n.glyph,viewUrl:n.viewUrl,viewMeta:n.viewMeta,labelStyle:n.labelStyle});return t}function Ot(e){if(e.seatCountsBySide)return{...e.seatCountsBySide};let t=e.sides&&e.sides.length?e.sides:["top","bottom"],n=["top","bottom","left","right"].filter(i=>t.includes(i)),o={top:0,bottom:0,left:0,right:0};if(!n.length)return o;let r=Math.max(0,Math.round(e.seatCount));for(let i=0;i<r;i++)o[n[i%n.length]]+=1;return o}function _e(e){let t=[],n=Math.max(0,Math.round(e.seatCount));if(n===0)return t;let o=new Map((e.overrides??[]).map(l=>[l.index,l])),r=(l,d,m,p)=>{let y=o.get(l),b=Ae(y),M=y?.label??Ce(e,l);return{index:l,label:M,displayLabel:y?.displayLabel??ke(e,l),x:d+(y?.dx??0),y:m+(y?.dy??0),categoryKey:y?.categoryKey??e.categoryKey,skipped:!!y?.skip,accessible:b.length>0,accessibility:b,wheelchairSpaceType:y?.wheelchairSpaceType,commercial:y?.commercial,glyph:y?.glyph,viewUrl:y?.viewFromSeatUrl,viewMeta:y?.viewFromSeatUrl?y.viewFromSeatMeta:void 0,labelStyle:y?.labelStyle,...p?{side:p}:{}}};if(e.shape==="round"){let l=(e.radius??40)+G,d=e.rotation*fe,m=Math.max(0,Math.min(360,e.seatArc??360));if(m>=360||n===1){for(let M=0;M<n;M++){let v=d+M/n*2*Math.PI;t.push(r(M,e.center.x+l*Math.cos(v),e.center.y+l*Math.sin(v)))}return t}let p=m*fe,y=(2*Math.PI-p)/2,b=d+y;for(let M=0;M<n;M++){let v=b+M/(n-1)*p;t.push(r(M,e.center.x+l*Math.cos(v),e.center.y+l*Math.sin(v)))}return t}let i=e.width??80,a=e.height??50,s=Ot(e),u=["top","bottom","left","right"],c=0;for(let l of u){let d=s[l];for(let m=0;m<d;m++){let p,y;l==="top"?(p=-i/2+(m+.5)*i/d,y=-a/2-G):l==="bottom"?(p=-i/2+(m+.5)*i/d,y=a/2+G):l==="left"?(p=-i/2-G,y=-a/2+(m+.5)*a/d):(p=i/2+G,y=-a/2+(m+.5)*a/d);let b=Te(p,y,e.rotation,e.center);t.push(r(c++,b.x,b.y,l))}}return t}function So(e){return e.bookAsWhole||e.variableOccupancy?Math.max(0,Math.round(e.seatCount)):_e(e).filter(t=>!t.skipped).length}function Et(e){return _e(e).filter(t=>!t.skipped).map(t=>({id:`${e.id}:${t.index}`,label:t.label,...t.displayLabel!==t.label?{displayLabel:t.displayLabel}:{},x:t.x,y:t.y,rowId:e.id,categoryKey:t.categoryKey,...t.accessible?{accessible:!0}:{},...t.accessibility.length?{accessibility:t.accessibility}:{},...t.wheelchairSpaceType?{wheelchairSpaceType:t.wheelchairSpaceType}:{},...t.commercial?{commercial:t.commercial}:{},...t.glyph?{glyph:t.glyph}:{},...t.viewUrl?{viewUrl:t.viewUrl}:{},...t.viewUrl&&t.viewMeta?{viewMeta:t.viewMeta}:{},...t.labelStyle?{labelStyle:t.labelStyle}:{}}))}function At(e){return[{id:`${e.id}:0`,label:e.label,...e.displayLabel&&e.displayLabel!==e.label?{displayLabel:e.displayLabel}:{},x:e.center.x,y:e.center.y,rowId:e.id,categoryKey:e.categoryKey,kind:"booth",...e.commercial?.note?{commercial:{note:e.commercial.note}}:{}}]}function Le(e,t){let n=!1;for(let o=0,r=t.length-1;o<t.length;r=o++){let i=t[o].x,a=t[o].y,s=t[r].x,u=t[r].y;a>e.y!=u>e.y&&e.x<(s-i)*(e.y-a)/(u-a)+i&&(n=!n)}return n}function Tt(e,t){return t.some((n,o)=>{let r=t[(o+1)%t.length],i=(e.y-n.y)*(r.x-n.x)-(e.x-n.x)*(r.y-n.y);if(Math.abs(i)>1e-7)return!1;let a=(e.x-n.x)*(r.x-n.x)+(e.y-n.y)*(r.y-n.y),s=(r.x-n.x)**2+(r.y-n.y)**2;return a>=-1e-7&&a<=s+1e-7})}function V(e){return Array.isArray(e)?e.filter(t=>Array.isArray(t)&&t.length>=3):[]}function U(e,t,n){return Le(e,t)&&!V(n).some(o=>Le(e,o)||Tt(e,o))}function De(e,t){return we(e,t).point}function de(e){if(!e.length)return{x:0,y:0};let t=0,n=0;for(let o of e)t+=o.x,n+=o.y;return{x:t/e.length,y:n/e.length}}function je(e){switch(e.type){case"row":{let t=me(e),n=Ct(e),o=0,r=0,i=0;for(let a=0;a<t.length;a++){let s=n.get(a);s?.skip||(o+=t[a].x+(s?.dx??0),r+=t[a].y+(s?.dy??0),i++)}return i?{x:o/i,y:r/i}:{x:e.origin.x,y:e.origin.y}}case"table":case"booth":return{x:e.center.x,y:e.center.y};case"gaArea":return de(e.points);case"section":return de(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?de(e.points):e.x!=null&&e.y!=null&&e.width!=null&&e.height!=null?{x:e.x+e.width/2,y:e.y+e.height/2}:{x:e.x??0,y:e.y??0};case"decorImage":return{x:e.x+e.width/2,y:e.y+e.height/2}}}function vt(e,t){return e.length===t.length&&e.every((n,o)=>n.x===t[o].x&&n.y===t[o].y)}function Mo(e,t){if(e.type!=="gaArea"||!vt(e.points,t.outline))return!1;let n=V(e.holes),o=V(t.holes);return n.length===o.length&&n.every((r,i)=>vt(r,o[i]))}function Lt(e,t,n=e.filter(r=>r.type==="section"),o=je(t)){let r="referenceInventorySource"in t?t.referenceInventorySource?.logicalSectionId:void 0;return(r?n.find(a=>(a.logicalSectionId??a.id)===r&&(Mo(t,a)||U(o,a.outline,a.holes))):void 0)??n.find(a=>U(o,a.outline,a.holes))}function Q(e){return e.floors&&e.floors.length?e.floors:[{id:"floor-0",name:"Main",objects:e.objects,focalPoint:e.focalPoint,referenceImage:e.referenceImage,backgroundImage:e.backgroundImage}]}function wo(e,t){let n=Q(e);return(t?n.find(o=>o.id===t):n[0])?.objects??[]}function _t(e){return e.floors&&e.floors.length?e.floors.flatMap(t=>t.objects):e.objects}function he(e,t,n){let o=i=>({x:i.x+t,y:i.y+n}),r=i=>i.map(o);switch(e.type){case"row":return{...e,origin:o(e.origin)};case"table":case"booth":return{...e,center:o(e.center)};case"gaArea":return{...e,points:r(e.points),...e.holes?{holes:V(e.holes).map(r)}:{}};case"section":return{...e,outline:r(e.outline),...e.outlinePath?{outlinePath:tt(e.outlinePath,t,n)}:{},...e.holes?{holes:V(e.holes).map(r)}:{}};case"text":return{...e,position:o(e.position)};case"shape":return{...e,...e.points?{points:r(e.points)}:{},...e.holes?{holes:V(e.holes).map(r)}:{},...e.x!=null?{x:e.x+t}:{},...e.y!=null?{y:e.y+n}:{}};case"decorImage":return{...e,x:e.x+t,y:e.y+n}}}function vo(e,t=900){if(!e.floors||e.floors.length<2)return e;let n=[];return e.floors.forEach((o,r)=>{let i=-r*t;for(let a of o.objects)n.push(i===0?a:he(a,0,i))}),{...e,objects:n,floors:void 0}}function Pt(e,t,n,o,r,i,a,s,u){let c=[],l=e.filter(b=>b.type==="section"),d=te(e),m=b=>!b?.eventConfigurationId||b.eventConfigurationId===o&&(b.eventConfigurationVersion===void 0||b.eventConfigurationVersion===u),p=b=>ht(b,{activeConfigurationId:o,activeConfigurationVersion:u,activeBasisSha256:r,now:s}),y=(b,M)=>p(b)?{...b,coverage:M}:void 0;for(let b of e){let M=[];if(b.type==="row"?M=Rt(b):b.type==="table"?M=Et(b):b.type==="booth"&&(M=At(b)),!M.length)continue;for(let g of M)g.viewUrl&&!m(g.viewMeta)&&(g.viewUrl=void 0,g.viewMeta=void 0);if(b.type==="row"){let g=d.get(b.id);if(g){let f=new Map((b.overrides??[]).map(h=>[h.index,h]));for(let h of M){let w=Number(h.id.slice(h.id.lastIndexOf(":")+1));if(!Number.isInteger(w))continue;h.logicalRowId=g.groupId,h.logicalSeatIndex=g.adjacencyOffset+w,f.get(w)?.displayLabel||(h.displayLabel=Pe(b,w,g)),!h.viewUrl&&g.viewFromSeatUrl&&m(g.viewFromSeatMeta)&&(h.viewUrl=g.viewFromSeatUrl,h.viewMeta=g.viewFromSeatMeta);let S=f.get(w)?.confidenceEvidence;h.confidenceEvidence=y(S,"exact-seat")??y(b.confidenceEvidence,"row-representative")??y(g.confidenceEvidence,"row-representative")}}}let v=Lt(e,b,l,b.type==="row"?de(M):je(b)),C=v?.viewFromSeatUrl,x=(v?.zone?t?.find(g=>g.id===v.zone):void 0)?.focalPoint??n;for(let g of M){if(!g.confidenceEvidence){let f=Number(g.id.slice(g.id.lastIndexOf(":")+1)),h=(b.type==="row"||b.type==="table")&&Number.isInteger(f)?b.overrides?.find(w=>w.index===f)?.confidenceEvidence:void 0;g.confidenceEvidence=y(h,"exact-seat")??(b.type==="row"?y(b.confidenceEvidence,"row-representative"):void 0)}g.confidenceEvidence??=y(v?.confidenceEvidence,"section-representative")??(a?y(a.evidence,a.coverage):void 0),!g.viewUrl&&C&&m(v?.viewFromSeatMeta)&&(g.viewUrl=C,g.viewMeta=v?.viewFromSeatMeta),!g.viewUrl&&i&&m(i.meta)&&(g.viewUrl=i.url,g.viewMeta=i.meta),v&&(g.sectionId=v.logicalSectionId??v.id),v?.zone&&(g.zoneId=v.zone),x&&(g.focalPoint={...x})}c.push(...M)}return c}function Fe(e,t={}){if(e.floors?.length){let o=[];for(let r of e.floors){let i=r.focalPoint??e.focalPoint,a=r.viewFromSeatUrl?{url:r.viewFromSeatUrl,meta:r.viewFromSeatMeta}:e.viewFromSeatUrl?{url:e.viewFromSeatUrl,meta:e.viewFromSeatMeta}:void 0,s=r.confidenceEvidence?{evidence:r.confidenceEvidence,coverage:"floor-representative"}:e.confidenceEvidence?{evidence:e.confidenceEvidence,coverage:"venue-representative"}:void 0,u=Pt(r.objects,e.zones,i,e.eventConfigurationId,e.confidenceBasisSha256,a,s,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);t.resolveEyeHeights!==!1&&It(r.objects,r.focalPoint??e.focalPoint,r.baseHeightM??0,u);for(let c of u)c.floorId=r.id;for(let c of u)o.push(c)}return o}let n=Pt(e.objects,e.zones,e.focalPoint,e.eventConfigurationId,e.confidenceBasisSha256,e.viewFromSeatUrl?{url:e.viewFromSeatUrl,meta:e.viewFromSeatMeta}:void 0,e.confidenceEvidence?{evidence:e.confidenceEvidence,coverage:"venue-representative"}:void 0,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);return t.resolveEyeHeights!==!1&&It(e.objects,e.focalPoint,t.floorBaseHeightM??0,n),Po(e,n,t)}function Po(e,t,n){return!n.deriveRestrictedView||e.derivedRestrictedView===!1||n.resolveEyeHeights===!1||wt(t,Mt(t,St(e))),t}function It(e,t,n,o){let r=e.filter(d=>d.type==="section"),i=n>0||r.some(d=>d.height!==void 0||d.rake!==void 0||(d.elevation??0)>0);if(!r.length||!i||!t){for(let d of o)d.eyeHeightM=n+q;return}let a=new Array(o.length),s=new Map;for(let d of r)s.has(d.id)||s.set(d.id,d);let u=new Map,c=new Map;for(let d=0;d<o.length;d++){let m=o[d],y=(m.sectionId?s.get(m.sectionId)??r.find(M=>M.logicalSectionId===m.sectionId&&U({x:m.x,y:m.y},M.outline,M.holes)):void 0)??r.find(M=>U({x:m.x,y:m.y},M.outline,M.holes))??null;if(a[d]=y,!y)continue;u.has(y.id)||u.set(y.id,lt(y,{floorBaseHeightM:n}));let b=c.get(y.id);b?b.push(d):c.set(y.id,[d])}let l=new Array(o.length).fill(void 0);for(let[d,m]of c){let p=u.get(d);if(!p)continue;let y=p.rake>0?Math.tan(p.rake*Math.PI/180):0,b=mt(d,o,m,t);for(let M of b.rows){let v=M.blockDepth*W*y,C=p.height+v;for(let R of M.seatIndices)l[R]=C}}for(let d=0;d<o.length;d++){let m=o[d],p=a[d];if(!p){m.eyeHeightM=n+q;continue}let y=u.get(p.id);m.eyeHeightM=(l[d]??y.height)+q}}var ue=40;function X(e,t){let n=t?.freeText==="exclude",o=1/0,r=1/0,i=-1/0,a=-1/0,s=(c,l)=>{c<o&&(o=c),l<r&&(r=l),c>i&&(i=c),l>a&&(a=l)},u=c=>{if(Array.isArray(c))for(let l of c)!l||typeof l!="object"||s(l.x,l.y)};for(let c of _t(e))if(c.type==="row"){let l=new Map((c.overrides??[]).map(d=>[d.index,d]));me(c).forEach((d,m)=>{let p=l.get(m);p?.skip||s(d.x+(p?.dx??0),d.y+(p?.dy??0))})}else if(c.type==="gaArea")u(c.points);else if(c.type==="section")u(c.outline);else if(c.type==="decorImage")s(c.x,c.y),s(c.x+c.width,c.y+c.height);else if(c.type==="shape")c.points&&c.points.length?u(ce(c)):c.x!=null&&c.y!=null&&c.width!=null&&c.height!=null&&(s(c.x,c.y),s(c.x+c.width,c.y+c.height));else if(c.type==="table"){let l=G+go,d=c.shape==="round"?(c.radius??40)+l:Math.max((c.width??80)/2,(c.height??50)/2)+l;s(c.center.x-d,c.center.y-d),s(c.center.x+d,c.center.y+d)}else if(c.type==="booth"){let l=Math.max(c.width,c.height)/2;s(c.center.x-l,c.center.y-l),s(c.center.x+l,c.center.y+l)}else if(c.type==="text"){if(n)continue;let l=xe(c);s(c.position.x,c.position.y),s(c.position.x+l.width,c.position.y+l.height)}for(let c of[e.referenceImage,e.backgroundImage]){if(!c)continue;let{center:l,width:d}=c;if(!l||!Number.isFinite(l.x)||!Number.isFinite(l.y)||!Number.isFinite(d))continue;let m=d*3/4;s(l.x-d/2,l.y-m/2),s(l.x+d/2,l.y+m/2)}if(!isFinite(o)){let c=e.focalPoint??{x:0,y:0};return{x:c.x-200,y:c.y-200,width:400,height:400}}return{x:o-ue,y:r-ue,width:i-o+ue*2,height:a-r+ue*2}}function Dt(e){let t=e.backgroundImage;return t?.url&&!t.assetId?t:void 0}var Nt=.08,Io=.045;function Ne(e){return`__floor__:${encodeURIComponent(e)}`}function re(e,t,n){return{...e,objects:t,floors:void 0,...n?{focalPoint:n}:{},referenceImage:void 0,backgroundImage:void 0}}function Co(e,t,n){let o=e.focalPoint??t.focalPoint;return o?o.x:n.x+n.width/2}function Bt(e){let t=e.floors??[];if(!t.length)return[];let n=t.map(a=>X(re(e,a.objects,a.focalPoint),{freeText:"exclude"})),r=Math.max(1,...n.map(a=>a.width))*Nt,i=0;return t.map((a,s)=>{let u=n[s],c=i-(u.y+u.height);return i-=u.height+r,{floorId:a.id,label:a.name??a.id,level:s,levelBadge:s===0?"G":String(s),translation:{x:-Co(a,e,u),y:c},bounds:u}})}function ko(e,t,n,o){let r=t==="name"?e.label:e.levelBadge;if(!r)return[];let i=Math.max(1,n*Io),a=e.bounds.x+e.translation.x-i*2.4,s=e.bounds.y+e.translation.y+i*.4,u=`floor-level-${e.floorId}`;if(t==="name")return[{type:"text",id:`${u}-text`,text:r,position:{x:a,y:s},fontSize:i,rotation:0,color:o,bold:!0}];let c=i*.95,l={type:"shape",id:`${u}-badge`,kind:"ellipse",x:a-c*.35,y:s-c*.3,width:c*2,height:c*2,fill:"transparent",stroke:{color:o,width:Math.max(1,i*.09)},opacity:.8},d={type:"text",id:`${u}-text`,text:r,position:{x:l.x,y:l.y+c-i/2},width:c*2,align:"center",lineHeight:1,fontSize:i,rotation:0,color:o,bold:!0};return[l,d]}function Ro(e,t={}){let n=e.floors;if(!n||n.length<2)return e;let o=Bt(e),r=[];n.forEach((c,l)=>{let{x:d,y:m}=o[l].translation;for(let p of c.objects)l>0&&p.type==="shape"&&p.role==="stage"||r.push(he(p,d,m))});let i={...e,objects:r,floors:void 0},a=X(i,{freeText:"exclude"}),s=Math.max(1,a.width,a.height),u=e.theme?.textColor??"#94a3b8";for(let c of o)r.push(...ko(c,t.labelStyle??"number",s,u));return{...i,objects:r,referenceImage:void 0,backgroundImage:void 0}}function Oo(e){if(!e.floors||e.floors.length<2)return e;let t=!e.zones?.length,n=new Set,o=e.floors.flatMap(i=>i.objects.flatMap(a=>{if(a.type==="shape"&&a.role==="stage"){let s=JSON.stringify([a.kind,a.x,a.y,a.width,a.height,a.points,a.rotation??0,a.label,a.heightM,a.eventConfigurationIds]);if(n.has(s))return[];n.add(s)}return t&&a.type==="section"?[{...a,zone:Ne(i.id)}]:[a]})),r=t?e.floors.map(i=>({id:Ne(i.id),label:i.name,focalPoint:{...i.focalPoint}})):e.zones;return{...e,objects:o,zones:r,floors:void 0,referenceImage:void 0,backgroundImage:Dt(e)}}function Ht(e){return e.floorOverview==="combined"?"combined":"separated"}function Eo(e){let t=e.floors??[];if(t.length<2||t.some(r=>!r.objects.some(i=>Ao.has(i.type))))return"separated";let n=jt.get(e);if(n)return n;let o=To(e)?"separated":"combined";return jt.set(e,o),o}var Ao=new Set(["row","table","booth","gaArea","section"]),Gt=.1,oe=18,jt=new WeakMap;function To(e){let t=e.floors??[],n=(i,a)=>`${Math.floor(i/oe)}:${Math.floor(a/oe)}`,o=t.map(i=>{let a=Fe(re(e,i.objects,i.focalPoint)).map(u=>({x:u.x,y:u.y})),s={areas:[],seats:new Map};for(let u of i.objects)u.type==="section"&&u.outline?.length>=3&&s.areas.push({outer:u.outline,holes:u.holes}),u.type==="gaArea"&&u.points?.length>=3&&s.areas.push({outer:u.points,holes:u.holes});for(let u of a){let c=n(u.x,u.y),l=s.seats.get(c);l?l.push(u):s.seats.set(c,[u])}return{seats:a,footprint:s}}),r=(i,a)=>{let s=Math.floor(i.x/oe),u=Math.floor(i.y/oe);for(let c=-1;c<=1;c+=1)for(let l=-1;l<=1;l+=1)for(let d of a.seats.get(`${s+c}:${u+l}`)??[])if(Math.hypot(d.x-i.x,d.y-i.y)<oe)return!0;return!1};return o.some((i,a)=>{if(!i.seats.length)return!1;let s=o.filter((c,l)=>l!==a).map(c=>c.footprint),u=0;for(let c of i.seats)s.some(l=>l.areas.some(d=>U(c,d.outer,d.holes))||r(c,l))&&(u+=1);return u/i.seats.length>Gt})}var be="level-context:";function Lo(e,t){let n=e.floors??[];if(n.length<2||Ht(e)!=="combined")return[];let o="#8a93a6",r=[],i=n.find(s=>s.id===t),a=i?X(re(e,i.objects,i.focalPoint),{freeText:"exclude"}):null;for(let s of n){if(s.id===t)continue;let u=0;for(let m of s.objects){let p=m.type==="section"?m.outline:m.type==="gaArea"?m.points:null;if(!p||p.length<3)continue;let y={type:"shape",id:`${be}${s.id}:${u++}`,kind:"polygon",label:"",points:p.map(b=>({...b})),fill:"transparent",stroke:{color:o,width:1.5},opacity:.35};r.push(y)}let c=X(re(e,s.objects,s.focalPoint),{freeText:"exclude"});if(!u||!a||!_o(c,a))continue;let l=r.filter(m=>m.type==="shape"&&m.id.startsWith(`${be}${s.id}:`)&&!!m.points),d=l.reduce((m,p)=>Ft(p.points)>Ft(m.points)?p:m,l[0]);r.push({type:"text",id:`${be}${s.id}:name`,text:s.name??s.id,position:De(d.points,void 0),fontSize:Math.max(1,Math.max(a.width,a.height)*.024),rotation:0,color:o,opacity:.6})}return r}function _o(e,t){return e.x>=t.x&&e.y>=t.y&&e.x+e.width<=t.x+t.width&&e.y+e.height<=t.y+t.height}function Ft(e){let t=e.map(o=>o.x),n=e.map(o=>o.y);return(Math.max(...t)-Math.min(...t))*(Math.max(...n)-Math.min(...n))}function Do(e){let t=e.floors;if(!t?.length)return null;let n=t.find(i=>i.objects.some(a=>a.type==="shape"&&a.role==="stage"));if(n)return n.id;let o=t[0],r=-1;for(let i of t){let a=X(re(e,i.objects,i.focalPoint),{freeText:"exclude"}),s=a.width*a.height;s>r&&(r=s,o=i)}return o.id}var jo=640;function Fo(e,t){return(e.floors?.length??0)<2?null:"all"}var Vt=9;function No(e){if(e.kind==="circle")return{hx:e.r,hy:e.r};let t=e.width/2,n=e.height/2,o=e.rotation??0;if(!o)return{hx:t,hy:n};let r=o*Math.PI/180,i=Math.abs(Math.cos(r)),a=Math.abs(Math.sin(r));return{hx:t*i+n*a,hy:t*a+n*i}}function Bo(e,t,n){let o=t-e.seat.x,r=n-e.seat.y;if(e.shape.kind==="circle")return o*o+r*r<=e.shape.r*e.shape.r;let i=e.shape.rotation??0,a=o,s=r;if(i){let u=-i*Math.PI/180,c=Math.cos(u),l=Math.sin(u);a=o*c-r*l,s=o*l+r*c}return Math.abs(a)<=e.shape.width/2&&Math.abs(s)<=e.shape.height/2}function Ho(e,t,n,o,r){if(e.shape.kind==="circle"){let y=Math.min(Math.max(e.seat.x,t),o),b=Math.min(Math.max(e.seat.y,n),r),M=e.seat.x-y,v=e.seat.y-b;return M*M+v*v<=e.shape.r*e.shape.r}let i=e.shape.rotation??0;if(!i)return e.seat.x-e.hx<=o&&e.seat.x+e.hx>=t&&e.seat.y-e.hy<=r&&e.seat.y+e.hy>=n;let a=i*Math.PI/180,s=Math.cos(a),u=Math.sin(a),c=e.shape.width/2,l=e.shape.height/2,d=[[-c,-l],[c,-l],[c,l],[-c,l]].map(([y,b])=>[e.seat.x+y*s-b*u,e.seat.y+y*u+b*s]),m=[[t,n],[o,n],[o,r],[t,r]],p=[[1,0],[0,1],[s,u],[-u,s]];for(let[y,b]of p){let M=1/0,v=-1/0;for(let[x,g]of d){let f=x*y+g*b;f<M&&(M=f),f>v&&(v=f)}let C=1/0,R=-1/0;for(let[x,g]of m){let f=x*y+g*b;f<C&&(C=f),f>R&&(R=f)}if(v<C||R<M)return!1}return!0}function Go(e,t={}){let n=t.seatRadius??Vt,o=e.length,r=new Array(o),i=1/0,a=1/0,s=-1/0,u=-1/0,c=0;for(let f=0;f<o;f++){let h=e[f],w=t.shapeOf?.(h)??{kind:"circle",r:n},{hx:S,hy:P}=No(w);r[f]={seat:h,shape:w,hx:S,hy:P},h.x-S<i&&(i=h.x-S),h.y-P<a&&(a=h.y-P),h.x+S>s&&(s=h.x+S),h.y+P>u&&(u=h.y+P),S>c&&(c=S),P>c&&(c=P)}o===0&&(i=0,a=0,s=0,u=0);let l=c>0?c*4:1,d=Math.max(s-i,0),m=Math.max(u-a,0),p=Math.max(64,t.maxCells??o*4),y=l,b=Math.max(1,Math.ceil(d/y)||1),M=Math.max(1,Math.ceil(m/y)||1);for(;b*M>p&&(b>1||M>1);)y*=2,b=Math.max(1,Math.ceil(d/y)||1),M=Math.max(1,Math.ceil(m/y)||1);let v=b*M,C=new Int32Array(v+1),R=0;for(let f=0;f<o;f++){let h=r[f],w=N(Math.floor((h.seat.x-h.hx-i)/y),0,b-1),S=N(Math.floor((h.seat.x+h.hx-i)/y),0,b-1),P=N(Math.floor((h.seat.y-h.hy-a)/y),0,M-1),E=N(Math.floor((h.seat.y+h.hy-a)/y),0,M-1);for(let I=P;I<=E;I++)for(let k=w;k<=S;k++)C[I*b+k+1]++,R++}for(let f=0;f<v;f++)C[f+1]+=C[f];let x=new Int32Array(R),g=C.slice(0,v);for(let f=0;f<o;f++){let h=r[f],w=N(Math.floor((h.seat.x-h.hx-i)/y),0,b-1),S=N(Math.floor((h.seat.x+h.hx-i)/y),0,b-1),P=N(Math.floor((h.seat.y-h.hy-a)/y),0,M-1),E=N(Math.floor((h.seat.y+h.hy-a)/y),0,M-1);for(let I=P;I<=E;I++)for(let k=w;k<=S;k++){let O=I*b+k;x[g[O]++]=f}}return{seats:e,entries:r,minX:i,minY:a,cell:y,cols:b,rows:M,cellStart:C,items:x,stamp:new Int32Array(o),epoch:0}}function Vo(e,t,n={}){let{cols:o,rows:r,cell:i,minX:a,minY:s,cellStart:u,items:c,entries:l}=e,d=Math.floor((t.x-a)/i),m=Math.floor((t.y-s)/i);if(d<0||m<0||d>=o||m>=r)return null;let p=m*o+d,y=u[p+1],b=-1,M=1/0;for(let v=u[p];v<y;v++){let C=c[v],R=l[C];if(n.filter&&!n.filter(R.seat.id,R.seat)||!Bo(R,t.x,t.y))continue;let x=t.x-R.seat.x,g=t.y-R.seat.y,f=x*x+g*g;(f<M||f===M&&C<b)&&(M=f,b=C)}return b<0?null:l[b].seat.id}function Uo(e,t,n,o={}){if(!(n>0))return null;let{cols:r,rows:i,cell:a,minX:s,minY:u,cellStart:c,items:l,entries:d}=e,m=Math.max(0,Math.floor((t.x-n-s)/a)),p=Math.min(r-1,Math.floor((t.x+n-s)/a)),y=Math.max(0,Math.floor((t.y-n-u)/a)),b=Math.min(i-1,Math.floor((t.y+n-u)/a));if(m>p||y>b)return null;let M=-1,v=n*n,C=e.stamp,R=++e.epoch;for(let x=y;x<=b;x++){let g=x*r;for(let f=m;f<=p;f++){let h=g+f,w=c[h+1];for(let S=c[h];S<w;S++){let P=l[S];if(C[P]===R)continue;C[P]=R;let E=d[P];if(o.filter&&!o.filter(E.seat.id,E.seat))continue;let I=t.x-E.seat.x,k=t.y-E.seat.y,O=I*I+k*k;(O<v||O===v&&P<M)&&(v=O,M=P)}}}return M<0?null:d[M].seat.id}function Xo(e,t,n={}){let o=Math.min(t.x,t.x+t.width),r=Math.max(t.x,t.x+t.width),i=Math.min(t.y,t.y+t.height),a=Math.max(t.y,t.y+t.height),s=n.mode??"center",{cols:u,rows:c,cell:l,minX:d,minY:m,cellStart:p,items:y,entries:b}=e,M=Math.max(0,Math.floor((o-d)/l)),v=Math.min(u-1,Math.floor((r-d)/l)),C=Math.max(0,Math.floor((i-m)/l)),R=Math.min(c-1,Math.floor((a-m)/l));if(M>v||C>R)return[];let x=[],g=e.stamp,f=++e.epoch;for(let h=C;h<=R;h++){let w=h*u;for(let S=M;S<=v;S++){let P=w+S,E=p[P+1];for(let I=p[P];I<E;I++){let k=y[I];if(g[k]===f)continue;g[k]=f;let O=b[k];if(n.filter&&!n.filter(O.seat.id,O.seat))continue;(s==="center"?O.seat.x>=o&&O.seat.x<=r&&O.seat.y>=i&&O.seat.y<=a:Ho(O,o,i,r,a))&&x.push(k)}}}return x.sort((h,w)=>h-w),x.map(h=>b[h].seat.id)}function Ko(e){let t=e.cols*e.rows,n=0,o=0;for(let i=0;i<t;i++){let a=e.cellStart[i+1]-e.cellStart[i];a>0&&n++,a>o&&(o=a)}let r=e.items.length;return{cell:e.cell,cols:e.cols,rows:e.rows,cells:t,occupiedCells:n,refs:r,maxPerCell:o,meanPerOccupiedCell:n?r/n:0}}var Yo=[{key:"wheelchair",label:"Wheelchair space",short:"Wheelchair",icon:"\u267F"},{key:"companion",label:"Companion seat",short:"Companion",icon:"\u{1F9D1}\u200D\u{1F91D}\u200D\u{1F9D1}"},{key:"semi-ambulatory",label:"Semi-ambulatory (limited mobility)",short:"Limited mobility",icon:"\u{1F9AF}"},{key:"designated-aisle",label:"Designated aisle / transfer seat",short:"Aisle transfer",icon:"AS"},{key:"step-free",label:"Step-free accessible seat",short:"Step-free",icon:"SF"},{key:"hearing",label:"Assistive listening",short:"Hearing",icon:"\u{1F9BB}"},{key:"cart",label:"CART live-caption view",short:"CART captions",icon:"CC"},{key:"sign-language",label:"Sign-language view",short:"Sign language",icon:"\u{1F91F}"},{key:"low-vision",label:"Blind / low-vision viewing",short:"Low vision",icon:"LV"},{key:"sensory-friendly",label:"Quiet / sensory-friendly seating",short:"Sensory-friendly",icon:"QS"},{key:"plus-size",label:"Plus-size seat",short:"Plus-size",icon:"\u{1F4BA}"},{key:"lift-armrest",label:"Lift-up armrest",short:"Lift armrest",icon:"\u2195\uFE0F"}],mi=new Map(Yo.map(e=>[e.key,e]));var zo=[{key:"obstructedView",label:"Obstructed view",short:"Obstructed",icon:"\u26D4"},{key:"restrictedView",label:"Restricted view",short:"Restricted",icon:"\u{1F441}"},{key:"premium",label:"Premium seat",short:"Premium",icon:"\u2605"}],hi=new Map(zo.map(e=>[e.key,e]));var Ut=["start","end","both","none"];var $o=["reference-focal","bar","entrance","exit","restroom","screen","sound","concession","coat","wall","rail","suite","obstruction"],bi=new Set($o);function Z(e){return typeof e=="string"&&Ut.includes(e)}function pe(e,t){return e&&t?"both":e?"start":t?"end":"none"}function Xt(e){let t=new Map,n=te(e);if(!n.size)return t;let o=new Map;for(let r of e){if(r.type!=="row"||!n.has(r.id))continue;let i=r.segmentedRow.groupId,a=o.get(i)??[];a.push(r),o.set(i,a)}for(let r of o.values())r.sort((i,a)=>i.segmentedRow.componentIndex-a.segmentedRow.componentIndex),r.forEach((i,a)=>{let s=r[a+1];t.set(i.id,{start:a>0&&i.segmentedRow.boundaryBefore==="continuous",end:!!s&&s.segmentedRow.boundaryBefore==="continuous"})});return t}function Kt(e,t){let n=Number.isInteger(e.seatCount)&&e.seatCount>0?e.seatCount:0,o=new Set;for(let d of e.overrides??[])d.skip&&o.add(d.index);let r=d=>d>=0&&d<n&&!o.has(d),i=pe(!t?.start,!t?.end),a=Z(e.aisleSeats)?e.aisleSeats:void 0,s=a??i,u=-1,c=-1;for(let d=0;d<n;d+=1)r(d)&&(u<0&&(u=d),c=d);let l=new Set;if(u>=0){(s==="start"||s==="both")&&l.add(u),(s==="end"||s==="both")&&l.add(c);for(let d of o)r(d-1)&&l.add(d-1),r(d+1)&&l.add(d+1)}return{...a?{override:a}:{},automatic:i,slots:[...l].sort((d,m)=>d-m)}}function Wo(e,t=[e]){return Kt(e,e.segmentedRow?Xt(t).get(e.id):void 0)}function Yt(e){let t=new Set;for(let n of Q(e)){let o=Xt(n.objects);for(let r of n.objects)if(r.type==="row")for(let i of Kt(r,o.get(r.id)).slots)t.add(`${r.id}:${i}`)}return t}function qo(e,t,n){return Yt(e).has(`${t}:${n}`)}function Be(e){let t=Z(e.aisleSeats)?e.aisleSeats:"both";return{start:t==="start"||t==="both",end:t==="end"||t==="both"}}function He(e,t){t==="both"?delete e.aisleSeats:e.aisleSeats=t}function Qo(e,t,n){if(!Z(e.aisleSeats)){delete t.aisleSeats,delete n.aisleSeats;return}let o=Be(e);He(t,pe(o.start,!0)),He(n,pe(!0,o.end))}function Zo(e,t){let n=e[0],o=e[e.length-1];if(!n||!o||!Z(n.aisleSeats)&&!Z(o.aisleSeats)){delete t.aisleSeats;return}He(t,pe(Be(n).start,Be(o).end))}0&&(module.exports={AUTOMATIC_ROUND_TABLE_RADIUS_MAX,AUTOMATIC_ROUND_TABLE_RADIUS_MIN,CHAIR_NUMBERING_DIRECTIONS,CHAIR_NUMBERING_FORMATS,CHAIR_NUMBERING_START_MAX,DEFAULT_SEAT_RADIUS,FLOOR_COVER_LIMIT,FLOOR_STACK_GAP_RATIO,FLOOR_STACK_MIN_SURFACE_PX,LEVEL_CONTEXT_PREFIX,TABLE_SEAT_OFFSET,TEXT_BACKGROUND_PADDING_MAX,TEXT_BACKGROUND_RADIUS_MAX,TEXT_LETTER_SPACING_MAX,TEXT_LETTER_SPACING_MIN,TEXT_LINE_HEIGHT_MAX,TEXT_LINE_HEIGHT_MIN,TEXT_OPACITY_MIN,TEXT_WIDTH_MAX,TEXT_WIDTH_MIN,aisleSeatIds,allObjects,automaticRoundTableRadius,buildAisleHoles,buildSeatIndex,buildSectionShell,chairNumberingProblem,chartBounds,combinedFloorZoneId,compactChairNumbering,cubicPoint,distanceToRings,distributeAlongCubic,effectiveFloorOverview,expandBooth,expandChart,expandRow,expandRowSlots,expandTable,expandTableSlots,floorObjects,floorStackPlacements,floorsOf,gridStats,hitTest,initialFloorMode,isAisleSeat,isRowAisleSeats,layoutCombinedFloorPlan,layoutFloorStack,levelContextOutlines,mainFloorId,mergeRowAisleSeats,nearestWithin,objectCenter,owningSectionForObject,pointInPolygon,pointInPolygonWithHoles,pointOnPolygonBoundary,polygonArea,polygonInscribedAnchor,polygonLabelPoint,polygonNetArea,queryRect,resolveRowAisleSeats,resolveSegmentedRowGroups,rowInventoryCount,rowSeatPositions,segmentedRowComponentSeats,segmentedRowComponents,segmentedRowSeatTotal,smoothCubicThroughMiddle,splitRowAisleSeats,stackFloors,suggestedFloorOverview,tableChairBookingLabel,tableChairDisplayLabel,tableChairToken,tableInventoryCount,tableSeatCountsBySide,textLayoutMetrics,translateObject,usableHoles});
@@ -1,8 +1,8 @@
1
1
  import { P as Point, v as CubicPath, w as TextObject, x as TableChairNumbering, T as TableObject, y as RowAisleSeats, C as ChartDoc, R as RowObject, a as ChartObject } from '../../types-CB1llwVg.cjs';
2
2
  export { F as FloorLabelStyle } from '../../types-CB1llwVg.cjs';
3
- export { A as AUTOMATIC_ROUND_TABLE_RADIUS_MAX, a as AUTOMATIC_ROUND_TABLE_RADIUS_MIN, C as ChartBoundsOptions, E as ExpandChartOptions, F as FLOOR_COVER_LIMIT, b as FLOOR_STACK_GAP_RATIO, c as FLOOR_STACK_MIN_SURFACE_PX, d as FloorStackOptions, e as FloorStackPlacement, L as LEVEL_CONTEXT_PREFIX, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, f as TableSeatSlot, g as allObjects, h as automaticRoundTableRadius, i as chartBounds, j as combinedFloorZoneId, k as effectiveFloorOverview, l as expandBooth, m as expandChart, n as expandRow, o as expandRowSlots, p as expandTable, q as expandTableSlots, r as floorObjects, s as floorStackPlacements, t as floorsOf, u as initialFloorMode, v as layoutCombinedFloorPlan, w as layoutFloorStack, x as levelContextOutlines, y as mainFloorId, z as objectCenter, B as owningSectionForObject, D as pointInPolygon, G as pointInPolygonWithHoles, H as pointOnPolygonBoundary, I as polygonLabelPoint, J as rowInventoryCount, K as rowSeatPositions, M as stackFloors, N as suggestedFloorOverview, O as tableInventoryCount, P as tableSeatCountsBySide, Q as translateObject, S as usableHoles } from '../../tableSizing-DuRJVaJs.cjs';
3
+ export { A as AUTOMATIC_ROUND_TABLE_RADIUS_MAX, a as AUTOMATIC_ROUND_TABLE_RADIUS_MIN, C as ChartBoundsOptions, E as ExpandChartOptions, F as FLOOR_COVER_LIMIT, b as FLOOR_STACK_GAP_RATIO, c as FLOOR_STACK_MIN_SURFACE_PX, d as FloorStackOptions, e as FloorStackPlacement, L as LEVEL_CONTEXT_PREFIX, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, f as TableSeatSlot, g as allObjects, h as automaticRoundTableRadius, i as chartBounds, j as combinedFloorZoneId, k as effectiveFloorOverview, l as expandBooth, m as expandChart, n as expandRow, o as expandRowSlots, p as expandTable, q as expandTableSlots, r as floorObjects, s as floorStackPlacements, t as floorsOf, u as initialFloorMode, v as layoutCombinedFloorPlan, w as layoutFloorStack, x as levelContextOutlines, y as mainFloorId, z as objectCenter, B as owningSectionForObject, D as pointInPolygon, G as pointInPolygonWithHoles, H as pointOnPolygonBoundary, I as polygonLabelPoint, J as rowInventoryCount, K as rowSeatPositions, M as stackFloors, N as suggestedFloorOverview, O as tableInventoryCount, P as tableSeatCountsBySide, Q as translateObject, S as usableHoles } from '../../tableSizing-saWGNPZM.cjs';
4
4
  export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-Dy_zNI1E.cjs';
5
- import { E as ExpandedSeat } from '../../renderer-BIR1jJrt.cjs';
5
+ import { E as ExpandedSeat } from '../../renderer-BZuro9aF.cjs';
6
6
 
7
7
  type SectionShellMode = 'auto' | 'rectangle' | 'tapered' | 'bezier';
8
8
  declare function cubicPoint(path: CubicPath, t: number): Point;
@@ -1,8 +1,8 @@
1
1
  import { P as Point, v as CubicPath, w as TextObject, x as TableChairNumbering, T as TableObject, y as RowAisleSeats, C as ChartDoc, R as RowObject, a as ChartObject } from '../../types-CB1llwVg.js';
2
2
  export { F as FloorLabelStyle } from '../../types-CB1llwVg.js';
3
- export { A as AUTOMATIC_ROUND_TABLE_RADIUS_MAX, a as AUTOMATIC_ROUND_TABLE_RADIUS_MIN, C as ChartBoundsOptions, E as ExpandChartOptions, F as FLOOR_COVER_LIMIT, b as FLOOR_STACK_GAP_RATIO, c as FLOOR_STACK_MIN_SURFACE_PX, d as FloorStackOptions, e as FloorStackPlacement, L as LEVEL_CONTEXT_PREFIX, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, f as TableSeatSlot, g as allObjects, h as automaticRoundTableRadius, i as chartBounds, j as combinedFloorZoneId, k as effectiveFloorOverview, l as expandBooth, m as expandChart, n as expandRow, o as expandRowSlots, p as expandTable, q as expandTableSlots, r as floorObjects, s as floorStackPlacements, t as floorsOf, u as initialFloorMode, v as layoutCombinedFloorPlan, w as layoutFloorStack, x as levelContextOutlines, y as mainFloorId, z as objectCenter, B as owningSectionForObject, D as pointInPolygon, G as pointInPolygonWithHoles, H as pointOnPolygonBoundary, I as polygonLabelPoint, J as rowInventoryCount, K as rowSeatPositions, M as stackFloors, N as suggestedFloorOverview, O as tableInventoryCount, P as tableSeatCountsBySide, Q as translateObject, S as usableHoles } from '../../tableSizing-BnlXRH_v.js';
3
+ export { A as AUTOMATIC_ROUND_TABLE_RADIUS_MAX, a as AUTOMATIC_ROUND_TABLE_RADIUS_MIN, C as ChartBoundsOptions, E as ExpandChartOptions, F as FLOOR_COVER_LIMIT, b as FLOOR_STACK_GAP_RATIO, c as FLOOR_STACK_MIN_SURFACE_PX, d as FloorStackOptions, e as FloorStackPlacement, L as LEVEL_CONTEXT_PREFIX, R as RowSeatSlot, T as TABLE_SEAT_OFFSET, f as TableSeatSlot, g as allObjects, h as automaticRoundTableRadius, i as chartBounds, j as combinedFloorZoneId, k as effectiveFloorOverview, l as expandBooth, m as expandChart, n as expandRow, o as expandRowSlots, p as expandTable, q as expandTableSlots, r as floorObjects, s as floorStackPlacements, t as floorsOf, u as initialFloorMode, v as layoutCombinedFloorPlan, w as layoutFloorStack, x as levelContextOutlines, y as mainFloorId, z as objectCenter, B as owningSectionForObject, D as pointInPolygon, G as pointInPolygonWithHoles, H as pointOnPolygonBoundary, I as polygonLabelPoint, J as rowInventoryCount, K as rowSeatPositions, M as stackFloors, N as suggestedFloorOverview, O as tableInventoryCount, P as tableSeatCountsBySide, Q as translateObject, S as usableHoles } from '../../tableSizing-D-vDBFpb.js';
4
4
  export { a as SegmentedRowComponent, S as SegmentedRowPlacement, r as resolveSegmentedRowGroups, s as segmentedRowComponentSeats, b as segmentedRowComponents, c as segmentedRowSeatTotal } from '../../segmentedRowModel-BSXPftwU.js';
5
- import { E as ExpandedSeat } from '../../renderer-CiPst9uA.js';
5
+ import { E as ExpandedSeat } from '../../renderer-DIEE9JhZ.js';
6
6
 
7
7
  type SectionShellMode = 'auto' | 'rectangle' | 'tapered' | 'bezier';
8
8
  declare function cubicPoint(path: CubicPath, t: number): Point;
@@ -1 +1 @@
1
- import{a as ro,b as eo,c as fo,d as mo,e as po,f as to,g as xo,h as ao,i as bo,j as co,k as go,l as ho,m as io,n as yo,o as zo,p as Ao,q as Bo,r as Co,s as Do}from"../../chunk-6YTPIDLM.js";import{a as jo,b as ko,c as lo,d as no,e as qo,f as so,g as uo,h as vo,i as wo}from"../../chunk-P2BTUNG6.js";import"../../chunk-TFYAMLCK.js";import"../../chunk-URW7MSCJ.js";import{$a as W,E as c,F as d,G as g,H as h,I as i,J as j,K as k,Ka as F,L as l,La as G,M as n,Ma as H,Na as I,Oa as J,Pa as K,Qa as L,Ra as M,Sa as N,Ta as O,Ua as P,Va as Q,Wa as R,Xa as S,Ya as T,Za as U,_a as V,ab as X,bb as Y,cb as Z,db as _,eb as $,fb as oo,ga as q,ha as s,ia as u,ja as v,q as o,r,s as e,t as f,u as m,v as p,w as t,x,y as a,z as b}from"../../chunk-HKVCBUON.js";import{j as w,k as y,l as z,m as A,n as B,o as C,p as D,q as E}from"../../chunk-KTMZ3QAO.js";import"../../chunk-CRCGO52K.js";export{ko as AUTOMATIC_ROUND_TABLE_RADIUS_MAX,jo as AUTOMATIC_ROUND_TABLE_RADIUS_MIN,y as CHAIR_NUMBERING_DIRECTIONS,z as CHAIR_NUMBERING_FORMATS,w as CHAIR_NUMBERING_START_MAX,yo as DEFAULT_SEAT_RADIUS,ao as FLOOR_COVER_LIMIT,ro as FLOOR_STACK_GAP_RATIO,ho as FLOOR_STACK_MIN_SURFACE_PX,bo as LEVEL_CONTEXT_PREFIX,F as TABLE_SEAT_OFFSET,x as TEXT_BACKGROUND_PADDING_MAX,a as TEXT_BACKGROUND_RADIUS_MAX,p as TEXT_LETTER_SPACING_MAX,m as TEXT_LETTER_SPACING_MIN,f as TEXT_LINE_HEIGHT_MAX,e as TEXT_LINE_HEIGHT_MIN,t as TEXT_OPACITY_MIN,r as TEXT_WIDTH_MAX,o as TEXT_WIDTH_MIN,so as aisleSeatIds,Y as allObjects,lo as automaticRoundTableRadius,i as buildAisleHoles,zo as buildSeatIndex,h as buildSectionShell,D as chairNumberingProblem,oo as chartBounds,eo as combinedFloorZoneId,E as compactChairNumbering,c as cubicPoint,j as distanceToRings,g as distributeAlongCubic,to as effectiveFloorOverview,O as expandBooth,$ as expandChart,J as expandRow,I as expandRowSlots,N as expandTable,L as expandTableSlots,X as floorObjects,fo as floorStackPlacements,W as floorsOf,Do as gridStats,Ao as hitTest,io as initialFloorMode,uo as isAisleSeat,no as isRowAisleSeats,po as layoutCombinedFloorPlan,mo as layoutFloorStack,co as levelContextOutlines,go as mainFloorId,wo as mergeRowAisleSeats,Bo as nearestWithin,U as objectCenter,V as owningSectionForObject,P as pointInPolygon,S as pointInPolygonWithHoles,Q as pointOnPolygonBoundary,k as polygonArea,n as polygonInscribedAnchor,T as polygonLabelPoint,l as polygonNetArea,Co as queryRect,qo as resolveRowAisleSeats,v as resolveSegmentedRowGroups,H as rowInventoryCount,G as rowSeatPositions,s as segmentedRowComponentSeats,q as segmentedRowComponents,u as segmentedRowSeatTotal,d as smoothCubicThroughMiddle,vo as splitRowAisleSeats,_ as stackFloors,xo as suggestedFloorOverview,A as tableChairBookingLabel,C as tableChairDisplayLabel,B as tableChairToken,M as tableInventoryCount,K as tableSeatCountsBySide,b as textLayoutMetrics,Z as translateObject,R as usableHoles};
1
+ import{a as ro,b as eo,c as fo,d as mo,e as po,f as to,g as xo,h as ao,i as bo,j as co,k as go,l as ho,m as io,n as yo,o as zo,p as Ao,q as Bo,r as Co,s as Do}from"../../chunk-VHFSP53L.js";import{a as jo,b as ko,c as lo,d as no,e as qo,f as so,g as uo,h as vo,i as wo}from"../../chunk-DO545QTN.js";import"../../chunk-TFYAMLCK.js";import"../../chunk-522ENS2Q.js";import{$a as W,E as c,F as d,G as g,H as h,I as i,J as j,K as k,Ka as F,L as l,La as G,M as n,Ma as H,Na as I,Oa as J,Pa as K,Qa as L,Ra as M,Sa as N,Ta as O,Ua as P,Va as Q,Wa as R,Xa as S,Ya as T,Za as U,_a as V,ab as X,bb as Y,cb as Z,db as _,eb as $,fb as oo,ga as q,ha as s,ia as u,ja as v,q as o,r,s as e,t as f,u as m,v as p,w as t,x,y as a,z as b}from"../../chunk-HKVCBUON.js";import{j as w,k as y,l as z,m as A,n as B,o as C,p as D,q as E}from"../../chunk-KTMZ3QAO.js";import"../../chunk-CRCGO52K.js";export{ko as AUTOMATIC_ROUND_TABLE_RADIUS_MAX,jo as AUTOMATIC_ROUND_TABLE_RADIUS_MIN,y as CHAIR_NUMBERING_DIRECTIONS,z as CHAIR_NUMBERING_FORMATS,w as CHAIR_NUMBERING_START_MAX,yo as DEFAULT_SEAT_RADIUS,ao as FLOOR_COVER_LIMIT,ro as FLOOR_STACK_GAP_RATIO,ho as FLOOR_STACK_MIN_SURFACE_PX,bo as LEVEL_CONTEXT_PREFIX,F as TABLE_SEAT_OFFSET,x as TEXT_BACKGROUND_PADDING_MAX,a as TEXT_BACKGROUND_RADIUS_MAX,p as TEXT_LETTER_SPACING_MAX,m as TEXT_LETTER_SPACING_MIN,f as TEXT_LINE_HEIGHT_MAX,e as TEXT_LINE_HEIGHT_MIN,t as TEXT_OPACITY_MIN,r as TEXT_WIDTH_MAX,o as TEXT_WIDTH_MIN,so as aisleSeatIds,Y as allObjects,lo as automaticRoundTableRadius,i as buildAisleHoles,zo as buildSeatIndex,h as buildSectionShell,D as chairNumberingProblem,oo as chartBounds,eo as combinedFloorZoneId,E as compactChairNumbering,c as cubicPoint,j as distanceToRings,g as distributeAlongCubic,to as effectiveFloorOverview,O as expandBooth,$ as expandChart,J as expandRow,I as expandRowSlots,N as expandTable,L as expandTableSlots,X as floorObjects,fo as floorStackPlacements,W as floorsOf,Do as gridStats,Ao as hitTest,io as initialFloorMode,uo as isAisleSeat,no as isRowAisleSeats,po as layoutCombinedFloorPlan,mo as layoutFloorStack,co as levelContextOutlines,go as mainFloorId,wo as mergeRowAisleSeats,Bo as nearestWithin,U as objectCenter,V as owningSectionForObject,P as pointInPolygon,S as pointInPolygonWithHoles,Q as pointOnPolygonBoundary,k as polygonArea,n as polygonInscribedAnchor,T as polygonLabelPoint,l as polygonNetArea,Co as queryRect,qo as resolveRowAisleSeats,v as resolveSegmentedRowGroups,H as rowInventoryCount,G as rowSeatPositions,s as segmentedRowComponentSeats,q as segmentedRowComponents,u as segmentedRowSeatTotal,d as smoothCubicThroughMiddle,vo as splitRowAisleSeats,_ as stackFloors,xo as suggestedFloorOverview,A as tableChairBookingLabel,C as tableChairDisplayLabel,B as tableChairToken,M as tableInventoryCount,K as tableSeatCountsBySide,b as textLayoutMetrics,Z as translateObject,R as usableHoles};
@@ -1,7 +1,7 @@
1
1
  import { A as AccessibilityType } from '../../types-CB1llwVg.cjs';
2
2
  import { contrastRatioOrNull } from '../color.cjs';
3
- export { M as MIN_POINTER_TARGET_PX, R as RENDERED_QUALITY_REPORT_VERSION, a as RenderedEvidenceState, b as RenderedQualityFinding, c as RenderedQualityFindingCode, d as RenderedQualityReport, e as RenderedQualitySample, i as inspectRenderedQualityEvidence } from '../../renderedQuality-D62MKRV8.cjs';
4
- import '../../renderer-BIR1jJrt.cjs';
3
+ export { M as MIN_POINTER_TARGET_PX, R as RENDERED_QUALITY_REPORT_VERSION, a as RenderedEvidenceState, b as RenderedQualityFinding, c as RenderedQualityFindingCode, d as RenderedQualityReport, e as RenderedQualitySample, i as inspectRenderedQualityEvidence } from '../../renderedQuality-C7NrTR19.cjs';
4
+ import '../../renderer-BZuro9aF.cjs';
5
5
 
6
6
  /**
7
7
  * Rendering constants that quality inspection must agree with.
@@ -1,7 +1,7 @@
1
1
  import { A as AccessibilityType } from '../../types-CB1llwVg.js';
2
2
  import { contrastRatioOrNull } from '../color.js';
3
- export { M as MIN_POINTER_TARGET_PX, R as RENDERED_QUALITY_REPORT_VERSION, a as RenderedEvidenceState, b as RenderedQualityFinding, c as RenderedQualityFindingCode, d as RenderedQualityReport, e as RenderedQualitySample, i as inspectRenderedQualityEvidence } from '../../renderedQuality-DZOIkUX_.js';
4
- import '../../renderer-CiPst9uA.js';
3
+ export { M as MIN_POINTER_TARGET_PX, R as RENDERED_QUALITY_REPORT_VERSION, a as RenderedEvidenceState, b as RenderedQualityFinding, c as RenderedQualityFindingCode, d as RenderedQualityReport, e as RenderedQualitySample, i as inspectRenderedQualityEvidence } from '../../renderedQuality-q5he_9Bt.js';
4
+ import '../../renderer-DIEE9JhZ.js';
5
5
 
6
6
  /**
7
7
  * Rendering constants that quality inspection must agree with.
@@ -1 +1 @@
1
- import{a as M,b as N,c as O}from"../../chunk-4522UUXG.js";import{A,B,C,D,E,F,G,H,I,J,K,L,a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,k as c,l as d,m as g,n as h,o as i,p as j,q as k,r as l,s as n,t as q,u as s,v as u,w as v,x as w,y,z}from"../../chunk-EE2CVYFJ.js";import"../../chunk-URW7MSCJ.js";import"../../chunk-JBOTRSMY.js";export{u as ACCESS_GLYPH_PATH,q as ACCESS_GLYPH_VIEWBOX,s as ACCESS_TYPE_GLYPH_PATHS,B as AUTHORED_LABEL_MIN_CONTRAST,f as BLOCK_LABEL_FILL_RATIO,e as BOOTH_LABEL_FONT_SIZE,j as DARK_BOOKABLE_LABEL_INK,J as DARK_NEUTRAL_SECTION_FILL,t as GA_CAPACITY_LABEL_FONT_SIZE,c as GA_FILL_OPACITY,p as GA_LABEL_FONT_SIZE,i as LARGE_TEXT_CONTRAST,k as LIGHT_BOOKABLE_LABEL_INK,I as LIGHT_NEUTRAL_SECTION_FILL,N as MIN_POINTER_TARGET_PX,d as MIN_VISIBLE_BOOKABLE_LABEL_PX,M as RENDERED_QUALITY_REPORT_VERSION,r as ROW_LABEL_FONT_SIZE,o as SEAT_LABEL_FONT_SIZE,h as SECTION_NAME_CONTRAST,g as SMALL_TEXT_CONTRAST,x as TABLE_NAME_FONT_SIZE,G as accessGlyphInk,v as accessGlyphPath,w as accessibilityRingInk,m as blockLabelFontSize,y as bookableMarkerLabel,b as bookableNameSize,a as bookableNameVisible,C as categoryBandInk,A as compositeHexOver,F as explicitOrStateAwareLabelInk,O as inspectRenderedQualityEvidence,n as isBookableLabelLegibleAtScale,H as isLightFill,D as mapSeparatingInk,l as minimumTextContrast,K as neutralSectionFill,z as renderedTextContrast,E as stateAwareBookableLabelInk,L as summarizeLabelInkContrast};
1
+ import{a as M,b as N,c as O}from"../../chunk-7Q366RVM.js";import{A,B,C,D,E,F,G,H,I,J,K,L,a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b,k as c,l as d,m as g,n as h,o as i,p as j,q as k,r as l,s as n,t as q,u as s,v as u,w as v,x as w,y,z}from"../../chunk-DDQWZ323.js";import"../../chunk-522ENS2Q.js";import"../../chunk-JBOTRSMY.js";export{u as ACCESS_GLYPH_PATH,q as ACCESS_GLYPH_VIEWBOX,s as ACCESS_TYPE_GLYPH_PATHS,B as AUTHORED_LABEL_MIN_CONTRAST,f as BLOCK_LABEL_FILL_RATIO,e as BOOTH_LABEL_FONT_SIZE,j as DARK_BOOKABLE_LABEL_INK,J as DARK_NEUTRAL_SECTION_FILL,t as GA_CAPACITY_LABEL_FONT_SIZE,c as GA_FILL_OPACITY,p as GA_LABEL_FONT_SIZE,i as LARGE_TEXT_CONTRAST,k as LIGHT_BOOKABLE_LABEL_INK,I as LIGHT_NEUTRAL_SECTION_FILL,N as MIN_POINTER_TARGET_PX,d as MIN_VISIBLE_BOOKABLE_LABEL_PX,M as RENDERED_QUALITY_REPORT_VERSION,r as ROW_LABEL_FONT_SIZE,o as SEAT_LABEL_FONT_SIZE,h as SECTION_NAME_CONTRAST,g as SMALL_TEXT_CONTRAST,x as TABLE_NAME_FONT_SIZE,G as accessGlyphInk,v as accessGlyphPath,w as accessibilityRingInk,m as blockLabelFontSize,y as bookableMarkerLabel,b as bookableNameSize,a as bookableNameVisible,C as categoryBandInk,A as compositeHexOver,F as explicitOrStateAwareLabelInk,O as inspectRenderedQualityEvidence,n as isBookableLabelLegibleAtScale,H as isLightFill,D as mapSeparatingInk,l as minimumTextContrast,K as neutralSectionFill,z as renderedTextContrast,E as stateAwareBookableLabelInk,L as summarizeLabelInkContrast};
@@ -1 +1 @@
1
- import{a as p,b as t,c as x,d as a}from"../../chunk-YPVYZYMH.js";import{a as b,b as c,c as d,d as g,e as h,f as i,g as j,h as k,i as l,j as n,k as q,l as s}from"../../chunk-4N5CHKHD.js";import{A as T,b as u,c as v,d as w,e as y,g as z,h as A,i as B,j as C,k as D,l as E,m as F,n as G,o as H,p as I,q as J,r as K,s as L,t as M,u as N,v as O,w as P,x as Q,y as R,z as S}from"../../chunk-GUNNA5LB.js";import{k as o,l as r,m as e,n as f,o as m}from"../../chunk-TFYAMLCK.js";import"../../chunk-EE2CVYFJ.js";import"../../chunk-URW7MSCJ.js";import"../../chunk-KTMZ3QAO.js";import"../../chunk-JBOTRSMY.js";export{F as DECOR_STAMP_ICON_PATHS,N as DEFAULT_SHAPE_LINE_CAP,P as DEFAULT_SHAPE_LINE_ENDING,O as DEFAULT_SHAPE_LINE_JOIN,g as SEAT_GLYPHS,c as SEAT_GLYPH_DETAIL_MIN_PX,d as SEAT_GLYPH_INSET,h as SEAT_GLYPH_ORDER,b as SEAT_GLYPH_VIEWBOX,t as SEAT_TYPE_ICON_BODY,p as SEAT_TYPE_ICON_VIEWBOX,K as SHAPE_LINE_CAPS,M as SHAPE_LINE_ENDINGS,L as SHAPE_LINE_JOINS,D as VENUE_ICONS,w as VENUE_ICON_BADGE,v as VENUE_ICON_BADGE_INK,u as VENUE_ICON_GROUP_COLORS,B as VENUE_ICON_GROUP_LABELS,C as VENUE_ICON_GROUP_ORDER,J as VENUE_ICON_KEYS,E as VENUE_ICON_LEGACY_DEFAULT_INK,A as VENUE_ICON_STROKE,z as VENUE_ICON_VIEWBOX,r as buyerBackgroundImage,f as buyerFacingChartDoc,m as hasConflictingLegacyTrace,Q as isOpenShapeKind,R as isPointShapeKind,q as isSeatGlyphKind,I as isVenueIconKey,e as migrateLegacyBackgroundLayersInPlace,s as resolveSeatGlyph,S as resolvedShapeLineStyle,i as seatGlyph,l as seatGlyphFit,j as seatGlyphLabel,n as seatGlyphMarkOnSeat,k as seatGlyphPath,x as seatTypeIconBody,a as seatTypeIconSvg,T as shapeArrowMetrics,o as traceReferenceImage,G as venueIcon,y as venueIconBadgeGlyph,H as venueIconPath};
1
+ import{a as p,b as t,c as x,d as a}from"../../chunk-YPVYZYMH.js";import{a as b,b as c,c as d,d as g,e as h,f as i,g as j,h as k,i as l,j as n,k as q,l as s}from"../../chunk-4N5CHKHD.js";import{A as T,b as u,c as v,d as w,e as y,g as z,h as A,i as B,j as C,k as D,l as E,m as F,n as G,o as H,p as I,q as J,r as K,s as L,t as M,u as N,v as O,w as P,x as Q,y as R,z as S}from"../../chunk-4LW4TZZR.js";import{k as o,l as r,m as e,n as f,o as m}from"../../chunk-TFYAMLCK.js";import"../../chunk-DDQWZ323.js";import"../../chunk-522ENS2Q.js";import"../../chunk-KTMZ3QAO.js";import"../../chunk-JBOTRSMY.js";export{F as DECOR_STAMP_ICON_PATHS,N as DEFAULT_SHAPE_LINE_CAP,P as DEFAULT_SHAPE_LINE_ENDING,O as DEFAULT_SHAPE_LINE_JOIN,g as SEAT_GLYPHS,c as SEAT_GLYPH_DETAIL_MIN_PX,d as SEAT_GLYPH_INSET,h as SEAT_GLYPH_ORDER,b as SEAT_GLYPH_VIEWBOX,t as SEAT_TYPE_ICON_BODY,p as SEAT_TYPE_ICON_VIEWBOX,K as SHAPE_LINE_CAPS,M as SHAPE_LINE_ENDINGS,L as SHAPE_LINE_JOINS,D as VENUE_ICONS,w as VENUE_ICON_BADGE,v as VENUE_ICON_BADGE_INK,u as VENUE_ICON_GROUP_COLORS,B as VENUE_ICON_GROUP_LABELS,C as VENUE_ICON_GROUP_ORDER,J as VENUE_ICON_KEYS,E as VENUE_ICON_LEGACY_DEFAULT_INK,A as VENUE_ICON_STROKE,z as VENUE_ICON_VIEWBOX,r as buyerBackgroundImage,f as buyerFacingChartDoc,m as hasConflictingLegacyTrace,Q as isOpenShapeKind,R as isPointShapeKind,q as isSeatGlyphKind,I as isVenueIconKey,e as migrateLegacyBackgroundLayersInPlace,s as resolveSeatGlyph,S as resolvedShapeLineStyle,i as seatGlyph,l as seatGlyphFit,j as seatGlyphLabel,n as seatGlyphMarkOnSeat,k as seatGlyphPath,x as seatTypeIconBody,a as seatTypeIconSvg,T as shapeArrowMetrics,o as traceReferenceImage,G as venueIcon,y as venueIconBadgeGlyph,H as venueIconPath};
@@ -3,7 +3,7 @@ export { D as DEFAULT_SECTION_CORNER_SMOOTHING, M as MAX_EDGE_SAGITTA_RATIO, R a
3
3
  export { SeatConfidenceDisclosure, seatConfidenceDisclosure } from '../seatConfidence.cjs';
4
4
  import { S as SegmentedRowPlacement } from '../../segmentedRowModel-Dy_zNI1E.cjs';
5
5
  export { A as AvailabilityRule, S as SectionIdentity, a as SectionMembership, b as SectionNode, T as TIER_HEIGHT_M, U as UNGROUPED_ID, c as applyHidden, d as computeSections, e as computeSectionsPerFloor, h as hiddenObjectIds, i as isSectionHidden, s as sectionEntrancesById, f as sectionGeometry, g as sectionIdentitiesById, j as sectionLabelsById, k as sectionOwnersByObject } from '../../sections-Cr6f5csG.cjs';
6
- import { E as ExpandedSeat } from '../../renderer-BIR1jJrt.cjs';
6
+ import { E as ExpandedSeat } from '../../renderer-BZuro9aF.cjs';
7
7
 
8
8
  /**
9
9
  * THE bowl resolver — whether a floor's stands wrap a centre, and the smooth
@@ -3,7 +3,7 @@ export { D as DEFAULT_SECTION_CORNER_SMOOTHING, M as MAX_EDGE_SAGITTA_RATIO, R a
3
3
  export { SeatConfidenceDisclosure, seatConfidenceDisclosure } from '../seatConfidence.js';
4
4
  import { S as SegmentedRowPlacement } from '../../segmentedRowModel-BSXPftwU.js';
5
5
  export { A as AvailabilityRule, S as SectionIdentity, a as SectionMembership, b as SectionNode, T as TIER_HEIGHT_M, U as UNGROUPED_ID, c as applyHidden, d as computeSections, e as computeSectionsPerFloor, h as hiddenObjectIds, i as isSectionHidden, s as sectionEntrancesById, f as sectionGeometry, g as sectionIdentitiesById, j as sectionLabelsById, k as sectionOwnersByObject } from '../../sections-dqlb491l.js';
6
- import { E as ExpandedSeat } from '../../renderer-CiPst9uA.js';
6
+ import { E as ExpandedSeat } from '../../renderer-DIEE9JhZ.js';
7
7
 
8
8
  /**
9
9
  * THE bowl resolver — whether a floor's stands wrap a centre, and the smooth