@seatlayer/core 0.103.0 → 0.104.1

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 (81) hide show
  1. package/dist/{categoryInventory-D_gpkfsq.d.cts → categoryInventory-DYcNVyxN.d.cts} +1 -1
  2. package/dist/{categoryInventory-i-mGCBD3.d.ts → categoryInventory-QTVDRqNG.d.ts} +1 -1
  3. package/dist/{chunk-GPZFVQXV.js → chunk-4522UUXG.js} +1 -1
  4. package/dist/chunk-6YTPIDLM.js +1 -0
  5. package/dist/{chunk-2STEWCI2.js → chunk-BF3XROP5.js} +1 -1
  6. package/dist/{chunk-JRZHC75P.js → chunk-EE2CVYFJ.js} +1 -1
  7. package/dist/{chunk-33SRM2CP.js → chunk-GUNNA5LB.js} +1 -1
  8. package/dist/{chunk-QG7ZFUNX.js → chunk-HIU4MMID.js} +1 -1
  9. package/dist/chunk-HKVCBUON.js +1 -0
  10. package/dist/{chunk-76AUT55N.js → chunk-IEBXXGQC.js} +1 -1
  11. package/dist/{chunk-UEYHH7Y5.js → chunk-KYPY7GWB.js} +1 -1
  12. package/dist/{chunk-FAY7ARLB.js → chunk-O4ZAGGMP.js} +1 -1
  13. package/dist/{chunk-RF4QU72N.js → chunk-P2BTUNG6.js} +1 -1
  14. package/dist/{chunk-NWRHKTMV.js → chunk-P6ASVG3X.js} +1 -1
  15. package/dist/{chunk-WKWXU5QM.js → chunk-PBXGWYB4.js} +1 -1
  16. package/dist/{chunk-B75VUM6L.js → chunk-QFX6XSO6.js} +1 -1
  17. package/dist/chunk-TGHNVDWA.js +1 -0
  18. package/dist/{chunk-WH2EVBIG.js → chunk-UKODEMIM.js} +1 -1
  19. package/dist/{chunk-UEDS3HJ3.js → chunk-URW7MSCJ.js} +1 -1
  20. package/dist/core/cdnAsset.cjs +1 -1
  21. package/dist/core/cdnAsset.d.cts +28 -1
  22. package/dist/core/cdnAsset.d.ts +28 -1
  23. package/dist/core/cdnAsset.js +1 -1
  24. package/dist/core/chart-ops/index.cjs +1 -1
  25. package/dist/core/chart-ops/index.d.cts +4 -4
  26. package/dist/core/chart-ops/index.d.ts +4 -4
  27. package/dist/core/chart-ops/index.js +1 -1
  28. package/dist/core/inventory/index.d.cts +4 -4
  29. package/dist/core/inventory/index.d.ts +4 -4
  30. package/dist/core/inventory/index.js +1 -1
  31. package/dist/core/layout/index.cjs +1 -1
  32. package/dist/core/layout/index.d.cts +6 -72
  33. package/dist/core/layout/index.d.ts +6 -72
  34. package/dist/core/layout/index.js +1 -1
  35. package/dist/core/quality/index.d.cts +3 -3
  36. package/dist/core/quality/index.d.ts +3 -3
  37. package/dist/core/quality/index.js +1 -1
  38. package/dist/core/render-assets/index.d.cts +2 -2
  39. package/dist/core/render-assets/index.d.ts +2 -2
  40. package/dist/core/render-assets/index.js +1 -1
  41. package/dist/core/seatConfidence.d.cts +1 -1
  42. package/dist/core/seatConfidence.d.ts +1 -1
  43. package/dist/core/sections/index.d.cts +5 -5
  44. package/dist/core/sections/index.d.ts +5 -5
  45. package/dist/core/sections/index.js +1 -1
  46. package/dist/{eventConfigurations-C0x_OtjQ.d.cts → eventConfigurations-1sMqxBpq.d.cts} +1 -1
  47. package/dist/{eventConfigurations-CDPqKz_8.d.ts → eventConfigurations-B7vGmmD3.d.ts} +1 -1
  48. package/dist/index.cjs +1 -1
  49. package/dist/index.d.cts +36 -118
  50. package/dist/index.d.ts +36 -118
  51. package/dist/index.js +1 -1
  52. package/dist/{labeling-DW_pEMgl.d.cts → labeling-B-FQz2d2.d.cts} +1 -1
  53. package/dist/{labeling-20iLar-Q.d.ts → labeling-DqyXzIgw.d.ts} +1 -1
  54. package/dist/{renderedQuality-BIWwSRMS.d.cts → renderedQuality-D62MKRV8.d.cts} +1 -1
  55. package/dist/{renderedQuality-CdpKQidA.d.ts → renderedQuality-DZOIkUX_.d.ts} +1 -1
  56. package/dist/{renderer-BurPZ2Io.d.ts → renderer-BIR1jJrt.d.cts} +10 -18
  57. package/dist/{renderer-BSjyHBDK.d.cts → renderer-CiPst9uA.d.ts} +10 -18
  58. package/dist/{seatTypeIcons-BlEzPXFf.d.cts → seatTypeIcons-BTw3K-yP.d.cts} +1 -1
  59. package/dist/{seatTypeIcons-D_T5HfJs.d.ts → seatTypeIcons-qlLxwByo.d.ts} +1 -1
  60. package/dist/{sections-DXUcW0ZT.d.cts → sections-Cr6f5csG.d.cts} +1 -1
  61. package/dist/{sections-BySKMsFE.d.ts → sections-dqlb491l.d.ts} +1 -1
  62. package/dist/{segmentedRowModel-C5qFY6jJ.d.ts → segmentedRowModel-BSXPftwU.d.ts} +1 -1
  63. package/dist/{segmentedRowModel-CyW-LFuI.d.cts → segmentedRowModel-Dy_zNI1E.d.cts} +1 -1
  64. package/dist/{tableSizing-Bos5ueqg.d.cts → tableSizing-BnlXRH_v.d.ts} +39 -8
  65. package/dist/{tableSizing-CAiE_oii.d.ts → tableSizing-DuRJVaJs.d.cts} +39 -8
  66. package/dist/{ticketRestrictions-DKdJWh9u.d.cts → ticketRestrictions-BBZ5mbsi.d.cts} +2 -2
  67. package/dist/{ticketRestrictions-DRDtAVKw.d.ts → ticketRestrictions-BEHxDUyd.d.ts} +2 -2
  68. package/dist/{types-ZviQR7ch.d.ts → types-CB1llwVg.d.cts} +4 -6
  69. package/dist/{types-ZviQR7ch.d.cts → types-CB1llwVg.d.ts} +4 -6
  70. package/dist/view3d/crossfade/panorama.d.cts +1 -1
  71. package/dist/view3d/crossfade/panorama.d.ts +1 -1
  72. package/dist/view3d/index.cjs +2 -2
  73. package/dist/view3d/index.d.cts +8 -3
  74. package/dist/view3d/index.d.ts +8 -3
  75. package/dist/view3d/index.js +5 -5
  76. package/dist/view3d/scene/scene.worker.cjs +1 -1
  77. package/dist/view3d/scene/scene.worker.js +1 -1
  78. package/package.json +1 -1
  79. package/dist/chunk-3W4ZMU4G.js +0 -1
  80. package/dist/chunk-FOYQOIWG.js +0 -1
  81. package/dist/chunk-R2TRYVOY.js +0 -1
@@ -1,4 +1,4 @@
1
- import { C as ChartDoc, R as RowObject, T as TableObject } from './types-ZviQR7ch.cjs';
1
+ import { C as ChartDoc, R as RowObject, T as TableObject } from './types-CB1llwVg.cjs';
2
2
 
3
3
  /**
4
4
  * A category is a commercial definition for exactly one kind of inventory.
@@ -1,4 +1,4 @@
1
- import { C as ChartDoc, R as RowObject, T as TableObject } from './types-ZviQR7ch.js';
1
+ import { C as ChartDoc, R as RowObject, T as TableObject } from './types-CB1llwVg.js';
2
2
 
3
3
  /**
4
4
  * A category is a commercial definition for exactly one kind of inventory.
@@ -1 +1 @@
1
- import{l as V,n as H,z as m}from"./chunk-JRZHC75P.js";var ie=3,k=4.5,T=3,$=24,re=20;function A(t){return t.filter(a=>a.visible&&!!a.screenBox)}function y(t,a){return t.x<a.x+a.width&&t.x+t.width>a.x&&t.y<a.y+a.height&&t.y+t.height>a.y}function p(t){return t.length?Math.round(Math.min(...t)*100)/100:null}function o(t,a,s){return s.length?{code:t,message:a,count:s.length,samples:s.slice(0,re)}:null}function B(t,a,s){return{primaryId:t.seatId,primaryLabel:t.label,...a==null?{}:{measured:Math.round(a*100)/100},...s==null?{}:{minimum:s}}}function F(t,a,s){return{primaryId:t.id,primaryLabel:t.label,...a==null?{}:{measured:Math.round(a*100)/100},...s==null?{}:{minimum:s}}}function D(t,a,s){return{primaryId:t.objectId,primaryLabel:t.text,...a==null?{}:{measured:Math.round(a*100)/100},...s==null?{}:{minimum:s}}}function g(t,a,s,l){return{primaryId:t,primaryLabel:a,secondaryId:s,secondaryLabel:l}}function ae(t,a="overview",s=null){let l=A(t.labels),c=A(t.hierarchyLabels),d=A(t.freeTextLabels),f=A(t.rowLabels),C=t.gaAreas.filter(e=>e.visible),W=l.map(e=>m(e.ink,e.fill)??0),X=c.map(e=>m(e.ink,e.fill)??0),Y=d.map(e=>m(e.ink,e.background)??0),q=C.map(e=>m(e.effectiveBackground,t.canvasBackground)??0),u=s?t.labels.filter(e=>e.categoryKey===s):t.labels,v=s?t.gaAreas.filter(e=>e.categoryKey===s):t.gaAreas,h=u.filter(e=>e.selected),x=u.filter(e=>e.status==="held"),w=u.filter(e=>e.status==="booked"),R=u.filter(e=>e.pointerTarget.active),M=new Set([...t.labels.filter(e=>e.visible&&(e.opacity>.25||e.selected||e.status!=="free")).map(e=>e.categoryKey),...t.gaAreas.filter(e=>e.visible&&e.opacity>.1).map(e=>e.categoryKey)]),S=h.length?p(h.map(e=>m(e.selectionRingColor??t.selectionRingColor,e.fill)??0)):null,n=[],I=(e,i)=>Array.from({length:e},(b,L)=>({primaryId:`overview:${L+1}`,primaryLabel:i}));a==="overview"&&t.rung==="sections"&&(n.push(o("overview-section-category-paint","Section overview shells must use the neutral hierarchy palette, not category paint",I(t.overviewStyle.categoryPaintedSectionShells,"category-painted section shell"))),n.push(o("overview-category-detail-visible","Category-tinted section detail must wait until section focus or seat zoom",I(t.overviewStyle.visibleCategoryDetailOutlines,"category detail outline"))),n.push(o("overview-row-hints-visible","Row and seat patterns must not clutter the section overview",I(t.overviewStyle.visibleSectionRowHints,"section row hint"))),n.push(o("overview-availability-clutter","Live availability counts belong in focused detail, not on section overview shells",I(t.overviewStyle.visibleSectionAvailabilityLabels,"section availability label"))),n.push(o("overview-ga-detail-visible","Section-contained standing paint belongs in focused detail, not on section overview shells",I(t.overviewStyle.visibleSectionGADetails,"section-contained GA detail")))),n.push(o("bookable-label-undersized","Visible bookable labels must meet the rendered small-text size floor",l.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>B(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),n.push(o("bookable-label-viewport-clipped","Visible interaction labels must remain fully inside the buyer viewport",a==="interaction"?l.filter(e=>e.screenBox.x<0||e.screenBox.y<0||e.screenBox.x+e.screenBox.width>t.viewport.width||e.screenBox.y+e.screenBox.height>t.viewport.height).map(e=>B(e)):[])),n.push(o("row-label-viewport-clipped","Visible interaction row labels must remain fully inside the buyer viewport",a==="interaction"?f.flatMap((e,i)=>{let b=e.screenBox;return b.x<0||b.y<0||b.x+b.width>t.viewport.width||b.y+b.height>t.viewport.height?[{primaryId:`row-label-${i}`,primaryLabel:e.text}]:[]}):[]));let _=[];if(a==="interaction")for(let e=0;e<f.length;e+=1)for(let i=0;i<e;i+=1)y(f[e].screenBox,f[i].screenBox)&&_.push(g(`row-label-${i}`,f[i].text,`row-label-${e}`,f[e].text));if(n.push(o("row-label-collision","Visible interaction row labels must not overlap",_)),a==="interaction"){let e=u.length>0,i=v.length>0,b=e||i,L=v.filter(r=>r.visible),J=new Set([...u.flatMap(r=>r.sectionId?[r.sectionId]:[]),...v.flatMap(r=>r.sectionId?[r.sectionId]:[])]),Z=new Set([...t.labels.map(r=>r.categoryKey),...t.gaAreas.map(r=>r.categoryKey)]),P=r=>r.screenCenter.x>=0&&r.screenCenter.x<=t.viewport.width&&r.screenCenter.y>=0&&r.screenCenter.y<=t.viewport.height;n.push(o("detail-rung-missing","Interaction evidence with bookable inventory must render the seat-detail rung",b&&t.rung!=="seats"?[{primaryId:"renderer",primaryLabel:t.rung}]:[])),n.push(o("detail-inventory-not-visible","Interaction evidence must frame at least one real bookable unit",b&&!u.some(P)&&!L.length?[{primaryId:"renderer",primaryLabel:"no target inventory in viewport"}]:[])),n.push(o("pointer-target-inactive","Interaction evidence must expose a live production pointer target",e&&!R.some(P)||!e&&i&&!L.some(r=>r.interactive)?[{primaryId:"renderer",primaryLabel:"no active pointer target in viewport"}]:[])),n.push(o("pointer-target-undersized","Every active production pointer target must reach at least 24 CSS pixels",R.filter(r=>P(r)&&r.pointerTarget.effectiveMinimumPx<$).map(r=>B(r,r.pointerTarget.effectiveMinimumPx,$)))),n.push(o("selected-state-missing","Interaction evidence must paint a selected unit and its renderer-owned ring",e&&(!h.length||!h.some(r=>t.selectionRingSeatIds.includes(r.seatId)))?[{primaryId:"renderer",primaryLabel:"selected state"}]:[])),n.push(o("selected-state-contrast-low","The selected-state ring must maintain 3:1 graphical contrast with the seat paint",h.length&&(S??0)<T?[{primaryId:h[0].seatId,primaryLabel:h[0].label,measured:Math.round((S??0)*100)/100,minimum:T}]:[])),n.push(o("held-state-missing","Interaction evidence must paint a held state when the floor has at least two status-managed units",u.length>=2&&!x.length?[{primaryId:"renderer",primaryLabel:"held state"}]:[])),n.push(o("booked-state-missing","Interaction evidence must paint a taken state when the floor has at least three status-managed units",u.length>=3&&!w.length?[{primaryId:"renderer",primaryLabel:"booked state"}]:[]));let ee=new Set(x.map(r=>`${r.fill.toLowerCase()}:${r.opacity}`)),te=new Set(w.map(r=>`${r.fill.toLowerCase()}:${r.opacity}`));n.push(o("status-state-indistinct","Held and taken evidence must resolve to distinct renderer paint",x.length&&w.length&&[...ee].some(r=>te.has(r))?[{primaryId:x[0].seatId,primaryLabel:x[0].label,secondaryId:w[0].seatId,secondaryLabel:w[0].label}]:[])),n.push(o("section-focus-missing","Interaction evidence must exercise section focus and its backdrop when section membership exists",J.size&&(!t.focusedSectionId||!t.focusBackdropVisible)?[{primaryId:"renderer",primaryLabel:"section focus"}]:[])),n.push(o("category-filter-missing","Interaction evidence must exercise a category filter when multiple categories exist",Z.size>=2&&(!t.categoryFilterKeys||!t.categoryFilterKeys.length)?[{primaryId:"renderer",primaryLabel:"category filter"}]:[]));let E=t.labels.filter(r=>r.status==="free"&&!r.selected&&t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(r.categoryKey)),Q=t.gaAreas.filter(r=>t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(r.categoryKey));n.push(o("category-filter-ineffective","The active category filter must visibly dim excluded free inventory",(E.length||Q.length)&&!E.some(r=>r.opacity<=.25)&&!Q.some(r=>r.opacity<=.1)?[...E.map(r=>B(r,r.opacity)),...Q.map(r=>({primaryId:r.areaId,primaryLabel:r.label,measured:r.opacity}))]:[])),n.push(o("target-category-not-visible","A category-specific interaction scene must visibly paint its exact target category",s&&!M.has(s)?[{primaryId:s,primaryLabel:s}]:[])),n.push(o("target-category-filter-mismatch","A category-specific interaction scene must bind its filter to only the exact target category",s&&(t.categoryFilterKeys?.length!==1||t.categoryFilterKeys[0]!==s)?[{primaryId:s,primaryLabel:s}]:[]))}n.push(o("bookable-label-contrast-low","Visible bookable labels must meet 4.5:1 contrast against their actual paint",l.flatMap(e=>{let i=m(e.ink,e.fill)??0;return i<k?[B(e,i,k)]:[]})));let z=[];for(let e=0;e<l.length;e+=1)for(let i=0;i<e;i+=1)y(l[e].screenBox,l[i].screenBox)&&z.push(g(l[i].seatId,l[i].label,l[e].seatId,l[e].label));n.push(o("bookable-label-collision","Visible bookable labels must not overlap",z)),n.push(o("hierarchy-label-undersized","Visible section and zone labels must meet the rendered small-text size floor",c.filter(e=>e.renderedFontPx<(e.sizeFloorPx??V)).map(e=>F(e,e.renderedFontPx,e.sizeFloorPx??V)))),n.push(o("hierarchy-label-contrast-low","Visible section and zone labels must meet 4.5:1 contrast against their backing paint",c.flatMap(e=>{let i=m(e.ink,e.fill)??0,b=e.kind==="section"&&e.role==="name"?H:k;return i<b?[F(e,i,b)]:[]}))),n.push(o("hierarchy-label-viewport-clipped","Visible overview hierarchy labels must remain fully inside the buyer viewport",a==="overview"?c.filter(e=>e.screenBox.x<0||e.screenBox.y<0||e.screenBox.x+e.screenBox.width>t.viewport.width||e.screenBox.y+e.screenBox.height>t.viewport.height).map(e=>F(e)):[])),n.push(o("hierarchy-label-outside-section","Visible section labels must remain inside the filled section surface and outside holes",c.filter(e=>e.kind==="section"&&e.fitsContainer===!1).map(e=>F(e))));let K=[];for(let e=0;e<c.length;e+=1)for(let i=0;i<e;i+=1)y(c[e].screenBox,c[i].screenBox)&&K.push(g(c[i].id,c[i].label,c[e].id,c[e].label));n.push(o("hierarchy-label-collision","Visible hierarchy labels must not overlap each other",K));let N=[];for(let e of c)for(let i of l)y(e.screenBox,i.screenBox)&&N.push(g(e.id,e.label,i.seatId,i.label));n.push(o("hierarchy-bookable-collision","Visible hierarchy labels must not overlap bookable labels",N)),n.push(o("free-text-undersized","Visible chart text must meet the rendered small-text size floor",d.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>D(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),n.push(o("free-text-contrast-low","Visible chart text must meet 4.5:1 contrast against its measured background",d.flatMap(e=>{let i=m(e.ink,e.background)??0;return i<k?[D(e,i,k)]:[]})));let G=[];for(let e=0;e<d.length;e+=1)for(let i=0;i<e;i+=1)y(d[e].screenBox,d[i].screenBox)&&G.push(g(d[i].objectId,d[i].text,d[e].objectId,d[e].text));n.push(o("free-text-collision","Visible chart text labels must not overlap each other",G));let O=[];for(let e of d)for(let i of l)y(e.screenBox,i.screenBox)&&O.push(g(e.objectId,e.text,i.seatId,i.label));n.push(o("free-text-bookable-collision","Visible chart text must not overlap bookable labels",O));let U=[];for(let e of d)for(let i of c)y(e.screenBox,i.screenBox)&&U.push(g(e.objectId,e.text,i.id,i.label));n.push(o("free-text-hierarchy-collision","Visible chart text must not overlap hierarchy labels",U)),n.push(o("ga-contrast-low","Visible GA surfaces must maintain 3:1 graphical contrast with the canvas",C.flatMap(e=>{let i=m(e.effectiveBackground,t.canvasBackground)??0;return i<T?[{primaryId:e.areaId,primaryLabel:e.label,measured:Math.round(i*100)/100,minimum:T}]:[]})));let j=n.filter(e=>!!e);return{version:ie,passed:j.length===0,state:a,targetCategoryKey:s,resolvedRules:["rendered-overview-label-size","rendered-overview-label-contrast","rendered-overview-label-collision","rendered-overview-hierarchy-viewport","rendered-overview-hierarchy-containment","rendered-overview-section-first-style","rendered-overview-ga-contrast",...a==="interaction"?["rendered-detail-label-viewport","rendered-detail-inventory","rendered-pointer-target","rendered-selected-held-taken-states","rendered-section-focus","rendered-category-filter"]:[]],viewport:t.viewport,canvasBackground:t.canvasBackground,effectiveScale:t.effectiveScale,rung:t.rung,inventory:{totalBookableUnits:t.totalBookableUnits,totalLabelledBookableUnits:t.totalLabelledBookableUnits,visibleBookableLabels:l.length,hiddenBookableLabels:t.hiddenLabels,visibleHierarchyLabels:c.length,visibleFreeTextLabels:d.length,visibleGAAreas:C.length},overviewStyle:t.overviewStyle,composition:{hierarchy:t.hierarchyLabels.filter(e=>e.role==="name").map(e=>({id:e.id,kind:e.kind,label:e.label,visible:e.visible})).sort((e,i)=>e.kind.localeCompare(i.kind)||e.id.localeCompare(i.id)),labelledObjects:t.freeTextLabels.map(e=>({objectId:e.objectId,kind:e.kind,text:e.text,visible:e.visible})).sort((e,i)=>e.objectId.localeCompare(i.objectId)||e.kind.localeCompare(i.kind)),gaAreas:t.gaAreas.map(e=>({areaId:e.areaId,label:e.label,categoryKey:e.categoryKey,...e.sectionId?{sectionId:e.sectionId}:{},visible:e.visible})).sort((e,i)=>e.areaId.localeCompare(i.areaId)),bookableSectionIds:[...new Set(t.labels.flatMap(e=>e.sectionId?[e.sectionId]:[]))].sort(),categoryKeys:[...new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)])].sort(),activeCategoryKeys:[...M].sort()},metrics:{minimumRenderedBookableLabelPx:p(l.map(e=>e.renderedFontPx)),minimumBookableLabelContrast:p(W),minimumRenderedHierarchyLabelPx:p(c.map(e=>e.renderedFontPx)),minimumHierarchyLabelContrast:p(X),minimumRenderedFreeTextPx:p(d.map(e=>e.renderedFontPx)),minimumFreeTextContrast:p(Y),minimumGAContrast:p(q),minimumEffectivePointerTargetPx:p(R.map(e=>e.pointerTarget.effectiveMinimumPx)),selectedRingContrast:S==null?null:Math.round(S*100)/100},interaction:{applicable:{detail:u.length>0||v.length>0,pointer:u.length>0||v.length>0,held:u.length>=2,booked:u.length>=3,sectionFocus:u.some(e=>!!e.sectionId)||v.some(e=>!!e.sectionId),categoryFilter:new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)]).size>=2},selectedUnits:h.length,heldUnits:x.length,bookedUnits:w.length,activePointerTargets:R.length,focusedSectionId:t.focusedSectionId,focusBackdropVisible:t.focusBackdropVisible,categoryFilterKeys:t.categoryFilterKeys},findings:j}}export{ie as a,$ as b,ae as c};
1
+ import{l as V,n as H,z as m}from"./chunk-EE2CVYFJ.js";var ie=3,k=4.5,T=3,$=24,re=20;function A(t){return t.filter(a=>a.visible&&!!a.screenBox)}function y(t,a){return t.x<a.x+a.width&&t.x+t.width>a.x&&t.y<a.y+a.height&&t.y+t.height>a.y}function p(t){return t.length?Math.round(Math.min(...t)*100)/100:null}function o(t,a,s){return s.length?{code:t,message:a,count:s.length,samples:s.slice(0,re)}:null}function B(t,a,s){return{primaryId:t.seatId,primaryLabel:t.label,...a==null?{}:{measured:Math.round(a*100)/100},...s==null?{}:{minimum:s}}}function F(t,a,s){return{primaryId:t.id,primaryLabel:t.label,...a==null?{}:{measured:Math.round(a*100)/100},...s==null?{}:{minimum:s}}}function D(t,a,s){return{primaryId:t.objectId,primaryLabel:t.text,...a==null?{}:{measured:Math.round(a*100)/100},...s==null?{}:{minimum:s}}}function g(t,a,s,l){return{primaryId:t,primaryLabel:a,secondaryId:s,secondaryLabel:l}}function ae(t,a="overview",s=null){let l=A(t.labels),c=A(t.hierarchyLabels),d=A(t.freeTextLabels),f=A(t.rowLabels),C=t.gaAreas.filter(e=>e.visible),W=l.map(e=>m(e.ink,e.fill)??0),X=c.map(e=>m(e.ink,e.fill)??0),Y=d.map(e=>m(e.ink,e.background)??0),q=C.map(e=>m(e.effectiveBackground,t.canvasBackground)??0),u=s?t.labels.filter(e=>e.categoryKey===s):t.labels,v=s?t.gaAreas.filter(e=>e.categoryKey===s):t.gaAreas,h=u.filter(e=>e.selected),x=u.filter(e=>e.status==="held"),w=u.filter(e=>e.status==="booked"),R=u.filter(e=>e.pointerTarget.active),M=new Set([...t.labels.filter(e=>e.visible&&(e.opacity>.25||e.selected||e.status!=="free")).map(e=>e.categoryKey),...t.gaAreas.filter(e=>e.visible&&e.opacity>.1).map(e=>e.categoryKey)]),S=h.length?p(h.map(e=>m(e.selectionRingColor??t.selectionRingColor,e.fill)??0)):null,n=[],I=(e,i)=>Array.from({length:e},(b,L)=>({primaryId:`overview:${L+1}`,primaryLabel:i}));a==="overview"&&t.rung==="sections"&&(n.push(o("overview-section-category-paint","Section overview shells must use the neutral hierarchy palette, not category paint",I(t.overviewStyle.categoryPaintedSectionShells,"category-painted section shell"))),n.push(o("overview-category-detail-visible","Category-tinted section detail must wait until section focus or seat zoom",I(t.overviewStyle.visibleCategoryDetailOutlines,"category detail outline"))),n.push(o("overview-row-hints-visible","Row and seat patterns must not clutter the section overview",I(t.overviewStyle.visibleSectionRowHints,"section row hint"))),n.push(o("overview-availability-clutter","Live availability counts belong in focused detail, not on section overview shells",I(t.overviewStyle.visibleSectionAvailabilityLabels,"section availability label"))),n.push(o("overview-ga-detail-visible","Section-contained standing paint belongs in focused detail, not on section overview shells",I(t.overviewStyle.visibleSectionGADetails,"section-contained GA detail")))),n.push(o("bookable-label-undersized","Visible bookable labels must meet the rendered small-text size floor",l.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>B(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),n.push(o("bookable-label-viewport-clipped","Visible interaction labels must remain fully inside the buyer viewport",a==="interaction"?l.filter(e=>e.screenBox.x<0||e.screenBox.y<0||e.screenBox.x+e.screenBox.width>t.viewport.width||e.screenBox.y+e.screenBox.height>t.viewport.height).map(e=>B(e)):[])),n.push(o("row-label-viewport-clipped","Visible interaction row labels must remain fully inside the buyer viewport",a==="interaction"?f.flatMap((e,i)=>{let b=e.screenBox;return b.x<0||b.y<0||b.x+b.width>t.viewport.width||b.y+b.height>t.viewport.height?[{primaryId:`row-label-${i}`,primaryLabel:e.text}]:[]}):[]));let _=[];if(a==="interaction")for(let e=0;e<f.length;e+=1)for(let i=0;i<e;i+=1)y(f[e].screenBox,f[i].screenBox)&&_.push(g(`row-label-${i}`,f[i].text,`row-label-${e}`,f[e].text));if(n.push(o("row-label-collision","Visible interaction row labels must not overlap",_)),a==="interaction"){let e=u.length>0,i=v.length>0,b=e||i,L=v.filter(r=>r.visible),J=new Set([...u.flatMap(r=>r.sectionId?[r.sectionId]:[]),...v.flatMap(r=>r.sectionId?[r.sectionId]:[])]),Z=new Set([...t.labels.map(r=>r.categoryKey),...t.gaAreas.map(r=>r.categoryKey)]),P=r=>r.screenCenter.x>=0&&r.screenCenter.x<=t.viewport.width&&r.screenCenter.y>=0&&r.screenCenter.y<=t.viewport.height;n.push(o("detail-rung-missing","Interaction evidence with bookable inventory must render the seat-detail rung",b&&t.rung!=="seats"?[{primaryId:"renderer",primaryLabel:t.rung}]:[])),n.push(o("detail-inventory-not-visible","Interaction evidence must frame at least one real bookable unit",b&&!u.some(P)&&!L.length?[{primaryId:"renderer",primaryLabel:"no target inventory in viewport"}]:[])),n.push(o("pointer-target-inactive","Interaction evidence must expose a live production pointer target",e&&!R.some(P)||!e&&i&&!L.some(r=>r.interactive)?[{primaryId:"renderer",primaryLabel:"no active pointer target in viewport"}]:[])),n.push(o("pointer-target-undersized","Every active production pointer target must reach at least 24 CSS pixels",R.filter(r=>P(r)&&r.pointerTarget.effectiveMinimumPx<$).map(r=>B(r,r.pointerTarget.effectiveMinimumPx,$)))),n.push(o("selected-state-missing","Interaction evidence must paint a selected unit and its renderer-owned ring",e&&(!h.length||!h.some(r=>t.selectionRingSeatIds.includes(r.seatId)))?[{primaryId:"renderer",primaryLabel:"selected state"}]:[])),n.push(o("selected-state-contrast-low","The selected-state ring must maintain 3:1 graphical contrast with the seat paint",h.length&&(S??0)<T?[{primaryId:h[0].seatId,primaryLabel:h[0].label,measured:Math.round((S??0)*100)/100,minimum:T}]:[])),n.push(o("held-state-missing","Interaction evidence must paint a held state when the floor has at least two status-managed units",u.length>=2&&!x.length?[{primaryId:"renderer",primaryLabel:"held state"}]:[])),n.push(o("booked-state-missing","Interaction evidence must paint a taken state when the floor has at least three status-managed units",u.length>=3&&!w.length?[{primaryId:"renderer",primaryLabel:"booked state"}]:[]));let ee=new Set(x.map(r=>`${r.fill.toLowerCase()}:${r.opacity}`)),te=new Set(w.map(r=>`${r.fill.toLowerCase()}:${r.opacity}`));n.push(o("status-state-indistinct","Held and taken evidence must resolve to distinct renderer paint",x.length&&w.length&&[...ee].some(r=>te.has(r))?[{primaryId:x[0].seatId,primaryLabel:x[0].label,secondaryId:w[0].seatId,secondaryLabel:w[0].label}]:[])),n.push(o("section-focus-missing","Interaction evidence must exercise section focus and its backdrop when section membership exists",J.size&&(!t.focusedSectionId||!t.focusBackdropVisible)?[{primaryId:"renderer",primaryLabel:"section focus"}]:[])),n.push(o("category-filter-missing","Interaction evidence must exercise a category filter when multiple categories exist",Z.size>=2&&(!t.categoryFilterKeys||!t.categoryFilterKeys.length)?[{primaryId:"renderer",primaryLabel:"category filter"}]:[]));let E=t.labels.filter(r=>r.status==="free"&&!r.selected&&t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(r.categoryKey)),Q=t.gaAreas.filter(r=>t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(r.categoryKey));n.push(o("category-filter-ineffective","The active category filter must visibly dim excluded free inventory",(E.length||Q.length)&&!E.some(r=>r.opacity<=.25)&&!Q.some(r=>r.opacity<=.1)?[...E.map(r=>B(r,r.opacity)),...Q.map(r=>({primaryId:r.areaId,primaryLabel:r.label,measured:r.opacity}))]:[])),n.push(o("target-category-not-visible","A category-specific interaction scene must visibly paint its exact target category",s&&!M.has(s)?[{primaryId:s,primaryLabel:s}]:[])),n.push(o("target-category-filter-mismatch","A category-specific interaction scene must bind its filter to only the exact target category",s&&(t.categoryFilterKeys?.length!==1||t.categoryFilterKeys[0]!==s)?[{primaryId:s,primaryLabel:s}]:[]))}n.push(o("bookable-label-contrast-low","Visible bookable labels must meet 4.5:1 contrast against their actual paint",l.flatMap(e=>{let i=m(e.ink,e.fill)??0;return i<k?[B(e,i,k)]:[]})));let z=[];for(let e=0;e<l.length;e+=1)for(let i=0;i<e;i+=1)y(l[e].screenBox,l[i].screenBox)&&z.push(g(l[i].seatId,l[i].label,l[e].seatId,l[e].label));n.push(o("bookable-label-collision","Visible bookable labels must not overlap",z)),n.push(o("hierarchy-label-undersized","Visible section and zone labels must meet the rendered small-text size floor",c.filter(e=>e.renderedFontPx<(e.sizeFloorPx??V)).map(e=>F(e,e.renderedFontPx,e.sizeFloorPx??V)))),n.push(o("hierarchy-label-contrast-low","Visible section and zone labels must meet 4.5:1 contrast against their backing paint",c.flatMap(e=>{let i=m(e.ink,e.fill)??0,b=e.kind==="section"&&e.role==="name"?H:k;return i<b?[F(e,i,b)]:[]}))),n.push(o("hierarchy-label-viewport-clipped","Visible overview hierarchy labels must remain fully inside the buyer viewport",a==="overview"?c.filter(e=>e.screenBox.x<0||e.screenBox.y<0||e.screenBox.x+e.screenBox.width>t.viewport.width||e.screenBox.y+e.screenBox.height>t.viewport.height).map(e=>F(e)):[])),n.push(o("hierarchy-label-outside-section","Visible section labels must remain inside the filled section surface and outside holes",c.filter(e=>e.kind==="section"&&e.fitsContainer===!1).map(e=>F(e))));let K=[];for(let e=0;e<c.length;e+=1)for(let i=0;i<e;i+=1)y(c[e].screenBox,c[i].screenBox)&&K.push(g(c[i].id,c[i].label,c[e].id,c[e].label));n.push(o("hierarchy-label-collision","Visible hierarchy labels must not overlap each other",K));let N=[];for(let e of c)for(let i of l)y(e.screenBox,i.screenBox)&&N.push(g(e.id,e.label,i.seatId,i.label));n.push(o("hierarchy-bookable-collision","Visible hierarchy labels must not overlap bookable labels",N)),n.push(o("free-text-undersized","Visible chart text must meet the rendered small-text size floor",d.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>D(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),n.push(o("free-text-contrast-low","Visible chart text must meet 4.5:1 contrast against its measured background",d.flatMap(e=>{let i=m(e.ink,e.background)??0;return i<k?[D(e,i,k)]:[]})));let G=[];for(let e=0;e<d.length;e+=1)for(let i=0;i<e;i+=1)y(d[e].screenBox,d[i].screenBox)&&G.push(g(d[i].objectId,d[i].text,d[e].objectId,d[e].text));n.push(o("free-text-collision","Visible chart text labels must not overlap each other",G));let O=[];for(let e of d)for(let i of l)y(e.screenBox,i.screenBox)&&O.push(g(e.objectId,e.text,i.seatId,i.label));n.push(o("free-text-bookable-collision","Visible chart text must not overlap bookable labels",O));let U=[];for(let e of d)for(let i of c)y(e.screenBox,i.screenBox)&&U.push(g(e.objectId,e.text,i.id,i.label));n.push(o("free-text-hierarchy-collision","Visible chart text must not overlap hierarchy labels",U)),n.push(o("ga-contrast-low","Visible GA surfaces must maintain 3:1 graphical contrast with the canvas",C.flatMap(e=>{let i=m(e.effectiveBackground,t.canvasBackground)??0;return i<T?[{primaryId:e.areaId,primaryLabel:e.label,measured:Math.round(i*100)/100,minimum:T}]:[]})));let j=n.filter(e=>!!e);return{version:ie,passed:j.length===0,state:a,targetCategoryKey:s,resolvedRules:["rendered-overview-label-size","rendered-overview-label-contrast","rendered-overview-label-collision","rendered-overview-hierarchy-viewport","rendered-overview-hierarchy-containment","rendered-overview-section-first-style","rendered-overview-ga-contrast",...a==="interaction"?["rendered-detail-label-viewport","rendered-detail-inventory","rendered-pointer-target","rendered-selected-held-taken-states","rendered-section-focus","rendered-category-filter"]:[]],viewport:t.viewport,canvasBackground:t.canvasBackground,effectiveScale:t.effectiveScale,rung:t.rung,inventory:{totalBookableUnits:t.totalBookableUnits,totalLabelledBookableUnits:t.totalLabelledBookableUnits,visibleBookableLabels:l.length,hiddenBookableLabels:t.hiddenLabels,visibleHierarchyLabels:c.length,visibleFreeTextLabels:d.length,visibleGAAreas:C.length},overviewStyle:t.overviewStyle,composition:{hierarchy:t.hierarchyLabels.filter(e=>e.role==="name").map(e=>({id:e.id,kind:e.kind,label:e.label,visible:e.visible})).sort((e,i)=>e.kind.localeCompare(i.kind)||e.id.localeCompare(i.id)),labelledObjects:t.freeTextLabels.map(e=>({objectId:e.objectId,kind:e.kind,text:e.text,visible:e.visible})).sort((e,i)=>e.objectId.localeCompare(i.objectId)||e.kind.localeCompare(i.kind)),gaAreas:t.gaAreas.map(e=>({areaId:e.areaId,label:e.label,categoryKey:e.categoryKey,...e.sectionId?{sectionId:e.sectionId}:{},visible:e.visible})).sort((e,i)=>e.areaId.localeCompare(i.areaId)),bookableSectionIds:[...new Set(t.labels.flatMap(e=>e.sectionId?[e.sectionId]:[]))].sort(),categoryKeys:[...new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)])].sort(),activeCategoryKeys:[...M].sort()},metrics:{minimumRenderedBookableLabelPx:p(l.map(e=>e.renderedFontPx)),minimumBookableLabelContrast:p(W),minimumRenderedHierarchyLabelPx:p(c.map(e=>e.renderedFontPx)),minimumHierarchyLabelContrast:p(X),minimumRenderedFreeTextPx:p(d.map(e=>e.renderedFontPx)),minimumFreeTextContrast:p(Y),minimumGAContrast:p(q),minimumEffectivePointerTargetPx:p(R.map(e=>e.pointerTarget.effectiveMinimumPx)),selectedRingContrast:S==null?null:Math.round(S*100)/100},interaction:{applicable:{detail:u.length>0||v.length>0,pointer:u.length>0||v.length>0,held:u.length>=2,booked:u.length>=3,sectionFocus:u.some(e=>!!e.sectionId)||v.some(e=>!!e.sectionId),categoryFilter:new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)]).size>=2},selectedUnits:h.length,heldUnits:x.length,bookedUnits:w.length,activePointerTargets:R.length,focusedSectionId:t.focusedSectionId,focusBackdropVisible:t.focusBackdropVisible,categoryFilterKeys:t.categoryFilterKeys},findings:j}}export{ie as a,$ as b,ae as c};
@@ -0,0 +1 @@
1
+ import{l as X}from"./chunk-TFYAMLCK.js";import{O as v,Xa as L,Ya as j,cb as $,eb as B,fb as D}from"./chunk-HKVCBUON.js";var W=.08,U=.045;function Y(t){return`__floor__:${encodeURIComponent(t)}`}function R(t,n,r){return{...t,objects:n,floors:void 0,...r?{focalPoint:r}:{},referenceImage:void 0,backgroundImage:void 0}}function N(t,n,r){let s=t.focalPoint??n.focalPoint;return s?s.x:r.x+r.width/2}function V(t){let n=t.floors??[];if(!n.length)return[];let r=n.map(e=>D(R(t,e.objects,e.focalPoint),{freeText:"exclude"})),c=Math.max(1,...r.map(e=>e.width))*W,o=0;return n.map((e,a)=>{let i=r[a],l=o-(i.y+i.height);return o-=i.height+c,{floorId:e.id,label:e.name??e.id,level:a,levelBadge:a===0?"G":String(a),translation:{x:-N(e,t,i),y:l},bounds:i}})}function Z(t,n,r,s){let c=n==="name"?t.label:t.levelBadge;if(!c)return[];let o=Math.max(1,r*U),e=t.bounds.x+t.translation.x-o*2.4,a=t.bounds.y+t.translation.y+o*.4,i=`floor-level-${t.floorId}`,l={type:"text",id:`${i}-text`,text:c,position:{x:e,y:a},fontSize:o,rotation:0,color:s,bold:!0};if(n==="name")return[l];let h=o*.95;return[{type:"shape",id:`${i}-badge`,kind:"ellipse",x:e-h*.35,y:a-h*.3,width:h*2,height:h*2,fill:"transparent",stroke:{color:s,width:Math.max(1,o*.09)},opacity:.8},l]}function at(t,n={}){let r=t.floors;if(!r||r.length<2)return t;let s=V(t),c=[];r.forEach((l,h)=>{let{x:p,y:x}=s[h].translation;for(let b of l.objects)h>0&&b.type==="shape"&&b.role==="stage"||c.push($(b,p,x))});let o={...t,objects:c,floors:void 0},e=D(o,{freeText:"exclude"}),a=Math.max(1,e.width,e.height),i=t.theme?.textColor??"#94a3b8";for(let l of s)c.push(...Z(l,n.labelStyle??"number",a,i));return{...o,objects:c,referenceImage:void 0,backgroundImage:void 0}}function it(t){if(!t.floors||t.floors.length<2)return t;let n=!t.zones?.length,r=new Set,s=t.floors.flatMap(o=>o.objects.flatMap(e=>{if(e.type==="shape"&&e.role==="stage"){let a=JSON.stringify([e.kind,e.x,e.y,e.width,e.height,e.points,e.rotation??0,e.label,e.heightM,e.eventConfigurationIds]);if(r.has(a))return[];r.add(a)}return n&&e.type==="section"?[{...e,zone:Y(o.id)}]:[e]})),c=n?t.floors.map(o=>({id:Y(o.id),label:o.name,focalPoint:{...o.focalPoint}})):t.zones;return{...t,objects:s,zones:c,floors:void 0,referenceImage:void 0,backgroundImage:X(t)}}function q(t){return t.floorOverview==="combined"?"combined":"separated"}function ct(t){if((t.floors??[]).length<2)return"separated";let r=z.get(t);if(r)return r;let s=H(t)?"separated":"combined";return z.set(t,s),s}var G=.1,E=18,z=new WeakMap;function H(t){let n=t.floors??[],r=(o,e)=>`${Math.floor(o/E)}:${Math.floor(e/E)}`,s=n.map(o=>{let e=B(R(t,o.objects,o.focalPoint)).map(i=>({x:i.x,y:i.y})),a={areas:[],seats:new Map};for(let i of o.objects)i.type==="section"&&i.outline?.length>=3&&a.areas.push({outer:i.outline,holes:i.holes}),i.type==="gaArea"&&i.points?.length>=3&&a.areas.push({outer:i.points,holes:i.holes});for(let i of e){let l=r(i.x,i.y),h=a.seats.get(l);h?h.push(i):a.seats.set(l,[i])}return{seats:e,footprint:a}}),c=(o,e)=>{let a=Math.floor(o.x/E),i=Math.floor(o.y/E);for(let l=-1;l<=1;l+=1)for(let h=-1;h<=1;h+=1)for(let p of e.seats.get(`${a+l}:${i+h}`)??[])if(Math.hypot(p.x-o.x,p.y-o.y)<E)return!0;return!1};return s.some((o,e)=>{if(!o.seats.length)return!1;let a=s.filter((l,h)=>h!==e).map(l=>l.footprint),i=0;for(let l of o.seats)a.some(h=>h.areas.some(p=>L(l,p.outer,p.holes))||c(l,h))&&(i+=1);return i/o.seats.length>G})}var T="level-context:";function lt(t,n){let r=t.floors??[];if(r.length<2||q(t)!=="combined")return[];let s="#8a93a6",c=[],o=r.find(a=>a.id===n),e=o?D(R(t,o.objects,o.focalPoint),{freeText:"exclude"}):null;for(let a of r){if(a.id===n)continue;let i=0;for(let x of a.objects){let b=x.type==="section"?x.outline:x.type==="gaArea"?x.points:null;if(!b||b.length<3)continue;let d={type:"shape",id:`${T}${a.id}:${i++}`,kind:"polygon",label:"",points:b.map(m=>({...m})),fill:"transparent",stroke:{color:s,width:1.5},opacity:.35};c.push(d)}let l=D(R(t,a.objects,a.focalPoint),{freeText:"exclude"});if(!i||!e||!K(l,e))continue;let h=c.filter(x=>x.type==="shape"&&x.id.startsWith(`${T}${a.id}:`)&&!!x.points),p=h.reduce((x,b)=>Q(b.points)>Q(x.points)?b:x,h[0]);c.push({type:"text",id:`${T}${a.id}:name`,text:a.name??a.id,position:j(p.points,void 0),fontSize:Math.max(1,Math.max(e.width,e.height)*.024),rotation:0,color:s,opacity:.6})}return c}function K(t,n){return t.x>=n.x&&t.y>=n.y&&t.x+t.width<=n.x+n.width&&t.y+t.height<=n.y+n.height}function Q(t){let n=t.map(s=>s.x),r=t.map(s=>s.y);return(Math.max(...n)-Math.min(...n))*(Math.max(...r)-Math.min(...r))}function ht(t){let n=t.floors;if(!n?.length)return null;let r=n.find(o=>o.objects.some(e=>e.type==="shape"&&e.role==="stage"));if(r)return r.id;let s=n[0],c=-1;for(let o of n){let e=D(R(t,o.objects,o.focalPoint),{freeText:"exclude"}),a=e.width*e.height;a>c&&(c=a,s=o)}return s.id}var ft=640;function ut(t,n){return(t.floors?.length??0)<2?null:"all"}var J=9;function tt(t){if(t.kind==="circle")return{hx:t.r,hy:t.r};let n=t.width/2,r=t.height/2,s=t.rotation??0;if(!s)return{hx:n,hy:r};let c=s*Math.PI/180,o=Math.abs(Math.cos(c)),e=Math.abs(Math.sin(c));return{hx:n*o+r*e,hy:n*e+r*o}}function et(t,n,r){let s=n-t.seat.x,c=r-t.seat.y;if(t.shape.kind==="circle")return s*s+c*c<=t.shape.r*t.shape.r;let o=t.shape.rotation??0,e=s,a=c;if(o){let i=-o*Math.PI/180,l=Math.cos(i),h=Math.sin(i);e=s*l-c*h,a=s*h+c*l}return Math.abs(e)<=t.shape.width/2&&Math.abs(a)<=t.shape.height/2}function nt(t,n,r,s,c){if(t.shape.kind==="circle"){let d=Math.min(Math.max(t.seat.x,n),s),m=Math.min(Math.max(t.seat.y,r),c),y=t.seat.x-d,g=t.seat.y-m;return y*y+g*g<=t.shape.r*t.shape.r}let o=t.shape.rotation??0;if(!o)return t.seat.x-t.hx<=s&&t.seat.x+t.hx>=n&&t.seat.y-t.hy<=c&&t.seat.y+t.hy>=r;let e=o*Math.PI/180,a=Math.cos(e),i=Math.sin(e),l=t.shape.width/2,h=t.shape.height/2,p=[[-l,-h],[l,-h],[l,h],[-l,h]].map(([d,m])=>[t.seat.x+d*a-m*i,t.seat.y+d*i+m*a]),x=[[n,r],[s,r],[s,c],[n,c]],b=[[1,0],[0,1],[a,i],[-i,a]];for(let[d,m]of b){let y=1/0,g=-1/0;for(let[O,k]of p){let f=O*d+k*m;f<y&&(y=f),f>g&&(g=f)}let S=1/0,w=-1/0;for(let[O,k]of x){let f=O*d+k*m;f<S&&(S=f),f>w&&(w=f)}if(g<S||w<y)return!1}return!0}function xt(t,n={}){let r=n.seatRadius??J,s=t.length,c=new Array(s),o=1/0,e=1/0,a=-1/0,i=-1/0,l=0;for(let f=0;f<s;f++){let u=t[f],F=n.shapeOf?.(u)??{kind:"circle",r},{hx:I,hy:M}=tt(F);c[f]={seat:u,shape:F,hx:I,hy:M},u.x-I<o&&(o=u.x-I),u.y-M<e&&(e=u.y-M),u.x+I>a&&(a=u.x+I),u.y+M>i&&(i=u.y+M),I>l&&(l=I),M>l&&(l=M)}s===0&&(o=0,e=0,a=0,i=0);let h=l>0?l*4:1,p=Math.max(a-o,0),x=Math.max(i-e,0),b=Math.max(64,n.maxCells??s*4),d=h,m=Math.max(1,Math.ceil(p/d)||1),y=Math.max(1,Math.ceil(x/d)||1);for(;m*y>b&&(m>1||y>1);)d*=2,m=Math.max(1,Math.ceil(p/d)||1),y=Math.max(1,Math.ceil(x/d)||1);let g=m*y,S=new Int32Array(g+1),w=0;for(let f=0;f<s;f++){let u=c[f],F=v(Math.floor((u.seat.x-u.hx-o)/d),0,m-1),I=v(Math.floor((u.seat.x+u.hx-o)/d),0,m-1),M=v(Math.floor((u.seat.y-u.hy-e)/d),0,y-1),_=v(Math.floor((u.seat.y+u.hy-e)/d),0,y-1);for(let P=M;P<=_;P++)for(let C=F;C<=I;C++)S[P*m+C+1]++,w++}for(let f=0;f<g;f++)S[f+1]+=S[f];let O=new Int32Array(w),k=S.slice(0,g);for(let f=0;f<s;f++){let u=c[f],F=v(Math.floor((u.seat.x-u.hx-o)/d),0,m-1),I=v(Math.floor((u.seat.x+u.hx-o)/d),0,m-1),M=v(Math.floor((u.seat.y-u.hy-e)/d),0,y-1),_=v(Math.floor((u.seat.y+u.hy-e)/d),0,y-1);for(let P=M;P<=_;P++)for(let C=F;C<=I;C++){let A=P*m+C;O[k[A]++]=f}}return{seats:t,entries:c,minX:o,minY:e,cell:d,cols:m,rows:y,cellStart:S,items:O,stamp:new Int32Array(s),epoch:0}}function yt(t,n,r={}){let{cols:s,rows:c,cell:o,minX:e,minY:a,cellStart:i,items:l,entries:h}=t,p=Math.floor((n.x-e)/o),x=Math.floor((n.y-a)/o);if(p<0||x<0||p>=s||x>=c)return null;let b=x*s+p,d=i[b+1],m=-1,y=1/0;for(let g=i[b];g<d;g++){let S=l[g],w=h[S];if(r.filter&&!r.filter(w.seat.id,w.seat)||!et(w,n.x,n.y))continue;let O=n.x-w.seat.x,k=n.y-w.seat.y,f=O*O+k*k;(f<y||f===y&&S<m)&&(y=f,m=S)}return m<0?null:h[m].seat.id}function pt(t,n,r,s={}){if(!(r>0))return null;let{cols:c,rows:o,cell:e,minX:a,minY:i,cellStart:l,items:h,entries:p}=t,x=Math.max(0,Math.floor((n.x-r-a)/e)),b=Math.min(c-1,Math.floor((n.x+r-a)/e)),d=Math.max(0,Math.floor((n.y-r-i)/e)),m=Math.min(o-1,Math.floor((n.y+r-i)/e));if(x>b||d>m)return null;let y=-1,g=r*r,S=t.stamp,w=++t.epoch;for(let O=d;O<=m;O++){let k=O*c;for(let f=x;f<=b;f++){let u=k+f,F=l[u+1];for(let I=l[u];I<F;I++){let M=h[I];if(S[M]===w)continue;S[M]=w;let _=p[M];if(s.filter&&!s.filter(_.seat.id,_.seat))continue;let P=n.x-_.seat.x,C=n.y-_.seat.y,A=P*P+C*C;(A<g||A===g&&M<y)&&(g=A,y=M)}}}return y<0?null:p[y].seat.id}function bt(t,n,r={}){let s=Math.min(n.x,n.x+n.width),c=Math.max(n.x,n.x+n.width),o=Math.min(n.y,n.y+n.height),e=Math.max(n.y,n.y+n.height),a=r.mode??"center",{cols:i,rows:l,cell:h,minX:p,minY:x,cellStart:b,items:d,entries:m}=t,y=Math.max(0,Math.floor((s-p)/h)),g=Math.min(i-1,Math.floor((c-p)/h)),S=Math.max(0,Math.floor((o-x)/h)),w=Math.min(l-1,Math.floor((e-x)/h));if(y>g||S>w)return[];let O=[],k=t.stamp,f=++t.epoch;for(let u=S;u<=w;u++){let F=u*i;for(let I=y;I<=g;I++){let M=F+I,_=b[M+1];for(let P=b[M];P<_;P++){let C=d[P];if(k[C]===f)continue;k[C]=f;let A=m[C];if(r.filter&&!r.filter(A.seat.id,A.seat))continue;(a==="center"?A.seat.x>=s&&A.seat.x<=c&&A.seat.y>=o&&A.seat.y<=e:nt(A,s,o,c,e))&&O.push(C)}}}return O.sort((u,F)=>u-F),O.map(u=>m[u].seat.id)}function gt(t){let n=t.cols*t.rows,r=0,s=0;for(let o=0;o<n;o++){let e=t.cellStart[o+1]-t.cellStart[o];e>0&&r++,e>s&&(s=e)}let c=t.items.length;return{cell:t.cell,cols:t.cols,rows:t.rows,cells:n,occupiedCells:r,refs:c,maxPerCell:s,meanPerOccupiedCell:r?c/r:0}}export{W as a,Y as b,V as c,at as d,it as e,q as f,ct as g,G as h,T as i,lt as j,ht as k,ft as l,ut as m,J as n,xt as o,yt as p,pt as q,bt as r,gt as s};
@@ -1 +1 @@
1
- import{Ta as K,cb as F,fb as j}from"./chunk-3W4ZMU4G.js";function C(t){let o=Number(t.slice(t.lastIndexOf(":")+1));return Number.isFinite(o)?o:-1}function se(t,o,n){let e=new Map;for(let s of t){if(s.kind==="booth")continue;let r=e.get(s.rowId);r?r.push(s):e.set(s.rowId,[s])}let c=s=>n.has(s.id)||o(s.id)!=="free",a=[];for(let s of e.values())if(!(s.length<3)){s.sort((r,l)=>C(r.id)-C(l.id));for(let r=1;r<s.length-1;r++){let l=s[r];if(c(l))continue;let g=s[r-1],m=s[r+1];C(l.id)-C(g.id)!==1||C(m.id)-C(l.id)!==1||!c(g)||!c(m)||!n.has(g.id)&&!n.has(m.id)||a.push(l)}}return a}function X(t){return Array.isArray(t.objects)}function z(t,o){if(o.seatsByLabel)return o.seatsByLabel;if(!X(t))throw new Error("ticketRestrictions: a categories-only chart document requires options.seatsByLabel");return new Map(j(t,{resolveEyeHeights:!1}).map(n=>[n.label,n]))}function Z(t){return{code:"ticket_option_not_applicable",labels:t,message:"That ticket choice is not available for the selected seat."}}function D(t,o){let n=t.applicability;return n?!(n.seatLabels?.length&&!n.seatLabels.includes(o.label)||n.accessibility?.length&&!n.accessibility.some(e=>o.accessibility?.includes(e))):!0}function de(t,o){return(t.categories.find(n=>n.key===o.categoryKey)?.tiers??[]).filter(n=>D(n,o))}function G(t,o,n){let e=t.categories.find(a=>a.key===o.categoryKey)?.tiers;if(!e?.length)return{kind:"none"};let c=n==null?e.find(a=>D(a,o)):e.find(a=>a.id===n&&D(a,o));return c?{kind:"resolved",tier:c}:{kind:"invalid"}}function ee(t,o){return(t.logicalRowId??t.rowId)===(o.logicalRowId??o.rowId)}function q(t){if(Number.isInteger(t.logicalSeatIndex))return t.logicalSeatIndex;let o=t.id.slice(t.id.lastIndexOf(":")+1),n=Number(o);return Number.isInteger(n)?n:void 0}function te(t,o){if(!ee(t,o))return!1;let n=q(t),e=q(o);return n!=null&&e!=null&&Math.abs(n-e)===1}function ne(t,o,n={}){if(!o.length)return null;let e=z(t,n),c=o.flatMap(r=>{let l=e.get(r.label);return l?[{selection:r,seat:l}]:[]}),a=c.map(({seat:r})=>r).filter(r=>r.accessibility?.includes("wheelchair")),s=[];for(let{selection:r,seat:l}of c){let g=G(t,l,r.tierId),m=g.kind==="resolved"?g.tier:void 0;(l.accessibility?.includes("companion")||m?.restriction==="companion")&&!a.some(x=>x.id!==l.id&&te(l,x))&&s.push(l.label)}return s.length?{code:"companion_pair_required",labels:s,message:"Select the adjacent wheelchair place with each companion ticket."}:null}function ue(t,o,n={}){if(!o.length)return null;let e=z(t,n),c=new Set(t.categories.filter(r=>r.notForSale).map(r=>r.key)),a=[],s=[];for(let r of o){let l=e.get(r.label);if(!l)continue;if(c.has(l.categoryKey)){a.push(l.label);continue}G(t,l,r.tierId).kind==="invalid"&&s.push(l.label)}return a.length?{code:"not_for_sale",labels:a,message:"These seats are not for sale."}:s.length?Z(s):ne(t,o,{seatsByLabel:e})}function $(t){return t.sectionId?`s:${t.sectionId}`:`r:${t.logicalRowId??t.rowId}`}function ie(t,o){let n=new Set,e=new Map;for(let c of t){let a=c.focalPoint??o,s=`${a.x},${a.y}`,r=e.get(s);r||(r={focal:a,seats:[]},e.set(s,r)),r.seats.push(c)}for(let{focal:c,seats:a}of e.values()){let s=E(a),r=s.x-c.x,l=s.y-c.y,g=Math.hypot(r,l),m=0;for(let y of a)m=Math.max(m,Math.abs(y.x-c.x),Math.abs(y.y-c.y));let u=Math.max(m,1)*1e-6;if(!(g>u))continue;let x=0,T=new Set;for(let y of a)((y.x-c.x)*r+(y.y-c.y)*l)/g<-u&&(x+=1,T.add($(y)));if(!T.size||x*10>a.length)continue;let w=a.filter(y=>T.has($(y)));if(!(w.length*4>a.length))for(let y of w)n.add(y.label)}return n}function O(t,o){if(Number.isInteger(t.logicalSeatIndex))return t.logicalSeatIndex;let n=t.id.lastIndexOf(":");if(n<0)return o;let e=Number(t.id.slice(n+1));return Number.isFinite(e)?e:o}function A(t,o){let n=t.x-o.x,e=t.y-o.y;return n*n+e*e}function E(t){let o=0,n=0;for(let e of t)o+=e.x,n+=e.y;return{x:o/t.length,y:n/t.length}}function U(t,o){return t.find(n=>n.focalPoint)?.focalPoint??o}function M(t){return t.commercial?.premium===!0}function oe(t,o,n){let e=Math.floor(n.qty);if(!Number.isFinite(e)||e<=0)return{labels:[],reason:"sold_out"};let{categoryKey:c,zoneId:a,focal:s,preferPremium:r,preferNearest:l,preferredRowIds:g,accessibility:m,requireContiguous:u}=n,x=n.preferAisle&&n.aisleLabels?.size?n.aisleLabels:null,T=i=>x&&!i.some(d=>x.has(d.label))?1:0,w=new Map,y=[];if(t.forEach((i,d)=>{let b=o.has(i.label)&&(!c||i.categoryKey===c)&&(!a||i.zoneId===a)&&(!m||m.some(S=>i.accessibility?.includes(S))),h=i.logicalRowId??i.rowId,f=w.get(h);f||(f=[],w.set(h,f)),f.push({seat:i,index:O(i,d),elig:b}),b&&y.push(i)}),y.length===0)return{labels:[],reason:"sold_out"};let v=!c&&!a&&!l?ie(t,s):new Set,V=i=>v.size?i.reduce((d,b)=>d+(v.has(b.label)?1:0),0):0,_=new Map([...w].map(([i,d])=>[i,E(d.map(b=>b.seat))])),L=(g??[]).map(i=>_.get(i)).filter(i=>!!i),N=i=>{let d=_.get(i);return!d||!L.length?0:Math.min(...L.map(b=>A(d,b)))},p=null,W=i=>{if(!p)return!0;if(r&&i.nonPremium!==p.nonPremium)return i.nonPremium<p.nonPremium;if(l&&i.rowD2!==p.rowD2)return i.rowD2<p.rowD2;if(l&&i.d2!==p.d2)return i.d2<p.d2;if(i.behind!==p.behind)return i.behind<p.behind;if(i.noAisle!==p.noAisle)return i.noAisle<p.noAisle;if(i.orphan!==p.orphan)return i.orphan<p.orphan;if(i.d2!==p.d2)return i.d2<p.d2;let d=i.rowId.localeCompare(p.rowId);return d!==0?d<0:i.startIndex<p.startIndex};for(let[i,d]of w){let b=[...d].sort((f,S)=>f.index-S.index),h=0;for(;h<b.length;){if(!b[h].elig){h++;continue}let f=h;for(;f<b.length&&b[f].elig&&(f===h||b[f].index===b[f-1].index+1);)f++;let S=f-h;for(let I=0;I+e<=S;I++){let H=I,Y=S-(I+e),J=H===1||Y===1?1:0,k=b.slice(h+I,h+I+e).map(R=>R.seat),B={labels:k.map(R=>R.label),seats:k,rowId:i,startIndex:b[h+I].index,orphan:J,nonPremium:r?k.reduce((R,Q)=>R+(M(Q)?0:1),0):0,behind:V(k),noAisle:T(k),rowD2:N(i),d2:A(E(k),l?s:U(k,s))};W(B)&&(p=B)}h=f}}return p?{labels:p.labels}:u?{labels:[],reason:y.length?"not_enough_together":"sold_out"}:y.length<e?{labels:[],reason:"not_enough_together"}:{labels:y.map((i,d)=>({seat:i,i:d,rowD2:N(i.logicalRowId??i.rowId),d2:A(i,l?s:i.focalPoint??s)})).sort((i,d)=>{if(r){let S=M(i.seat)?0:1,I=M(d.seat)?0:1;if(S!==I)return S-I}if(l&&i.rowD2!==d.rowD2)return i.rowD2-d.rowD2;let b=v.has(i.seat.label)?1:0,h=v.has(d.seat.label)?1:0;if(b!==h)return b-h;if(x){let S=x.has(i.seat.label)?0:1,I=x.has(d.seat.label)?0:1;if(S!==I)return S-I}if(i.d2!==d.d2)return i.d2-d.d2;let f=(i.seat.logicalRowId??i.seat.rowId).localeCompare(d.seat.logicalRowId??d.seat.rowId);return f!==0?f:O(i.seat,i.i)-O(d.seat,d.i)}).slice(0,e).map(i=>i.seat.label)}}function be(t,o,n,e){let c=Math.floor(e.qty),a=oe(t,n,e),r=o.filter(u=>u.bookingMode==="whole"&&u.capacity===c&&n.has(u.label)&&(!e.categoryKey||u.categoryKey===e.categoryKey)&&(!e.zoneId||u.zoneId===e.zoneId)&&!e.accessibility).map(u=>({table:u,d2:A(u.center,e.preferNearest?e.focal:u.focalPoint??e.focal)})).sort((u,x)=>u.d2-x.d2||u.table.label.localeCompare(x.table.label))[0];if(!r)return a;if(!a.labels.length)return{labels:[r.table.label]};if(e.preferAisle&&e.aisleLabels&&a.labels.some(u=>e.aisleLabels.has(u)))return a;let l=new Map(t.map(u=>[u.label,u])),g=a.labels.map(u=>l.get(u)).filter(u=>!!u),m=g.length?A(E(g),U(g,e.focal)):Number.POSITIVE_INFINITY;return r.d2<m?{labels:[r.table.label]}:a}var P=class extends Error{constructor(n,e){super(e);this.objectId=n;this.name="GroupedTableProjectionError"}};function re(t){let o=t.minOccupancy,n=t.maxOccupancy;if(!Number.isInteger(o)||!Number.isInteger(n)||o<1||n<o||n>t.seatCount)throw new P(t.id,`Table "${t.label}" has invalid variable-occupancy bounds`);return{min:o,max:n}}function ye(t,o){if(o!==2)return[];let n=[];for(let e of F(t)){if(e.type!=="table"||!e.bookAsWhole&&!e.variableOccupancy)continue;if(e.bookAsWhole&&e.variableOccupancy)throw new P(e.id,`Table "${e.label}" cannot be whole-table and variable-occupancy inventory`);if(!Number.isInteger(e.seatCount)||e.seatCount<1||!e.label.trim())throw new P(e.id,"Grouped tables require a label and at least one chair");let c=e.variableOccupancy?"variable":"whole",a=c==="variable"?re(e):{min:e.seatCount,max:e.seatCount};n.push({objectId:e.id,label:e.label,...e.displayLabel?{displayLabel:e.displayLabel}:{},...e.displayType?{displayType:e.displayType}:{},categoryKey:e.categoryKey,mode:c,capacity:e.seatCount,minOccupancy:a.min,maxOccupancy:a.max,chairs:K(e)})}return n}export{se as a,X as b,Z as c,D as d,de as e,G as f,ne as g,ue as h,ie as i,oe as j,be as k,P as l,ye as m};
1
+ import{Sa as K,bb as F,eb as j}from"./chunk-HKVCBUON.js";function C(t){let o=Number(t.slice(t.lastIndexOf(":")+1));return Number.isFinite(o)?o:-1}function se(t,o,n){let e=new Map;for(let s of t){if(s.kind==="booth")continue;let r=e.get(s.rowId);r?r.push(s):e.set(s.rowId,[s])}let c=s=>n.has(s.id)||o(s.id)!=="free",a=[];for(let s of e.values())if(!(s.length<3)){s.sort((r,l)=>C(r.id)-C(l.id));for(let r=1;r<s.length-1;r++){let l=s[r];if(c(l))continue;let g=s[r-1],m=s[r+1];C(l.id)-C(g.id)!==1||C(m.id)-C(l.id)!==1||!c(g)||!c(m)||!n.has(g.id)&&!n.has(m.id)||a.push(l)}}return a}function X(t){return Array.isArray(t.objects)}function z(t,o){if(o.seatsByLabel)return o.seatsByLabel;if(!X(t))throw new Error("ticketRestrictions: a categories-only chart document requires options.seatsByLabel");return new Map(j(t,{resolveEyeHeights:!1}).map(n=>[n.label,n]))}function Z(t){return{code:"ticket_option_not_applicable",labels:t,message:"That ticket choice is not available for the selected seat."}}function D(t,o){let n=t.applicability;return n?!(n.seatLabels?.length&&!n.seatLabels.includes(o.label)||n.accessibility?.length&&!n.accessibility.some(e=>o.accessibility?.includes(e))):!0}function de(t,o){return(t.categories.find(n=>n.key===o.categoryKey)?.tiers??[]).filter(n=>D(n,o))}function G(t,o,n){let e=t.categories.find(a=>a.key===o.categoryKey)?.tiers;if(!e?.length)return{kind:"none"};let c=n==null?e.find(a=>D(a,o)):e.find(a=>a.id===n&&D(a,o));return c?{kind:"resolved",tier:c}:{kind:"invalid"}}function ee(t,o){return(t.logicalRowId??t.rowId)===(o.logicalRowId??o.rowId)}function q(t){if(Number.isInteger(t.logicalSeatIndex))return t.logicalSeatIndex;let o=t.id.slice(t.id.lastIndexOf(":")+1),n=Number(o);return Number.isInteger(n)?n:void 0}function te(t,o){if(!ee(t,o))return!1;let n=q(t),e=q(o);return n!=null&&e!=null&&Math.abs(n-e)===1}function ne(t,o,n={}){if(!o.length)return null;let e=z(t,n),c=o.flatMap(r=>{let l=e.get(r.label);return l?[{selection:r,seat:l}]:[]}),a=c.map(({seat:r})=>r).filter(r=>r.accessibility?.includes("wheelchair")),s=[];for(let{selection:r,seat:l}of c){let g=G(t,l,r.tierId),m=g.kind==="resolved"?g.tier:void 0;(l.accessibility?.includes("companion")||m?.restriction==="companion")&&!a.some(x=>x.id!==l.id&&te(l,x))&&s.push(l.label)}return s.length?{code:"companion_pair_required",labels:s,message:"Select the adjacent wheelchair place with each companion ticket."}:null}function ue(t,o,n={}){if(!o.length)return null;let e=z(t,n),c=new Set(t.categories.filter(r=>r.notForSale).map(r=>r.key)),a=[],s=[];for(let r of o){let l=e.get(r.label);if(!l)continue;if(c.has(l.categoryKey)){a.push(l.label);continue}G(t,l,r.tierId).kind==="invalid"&&s.push(l.label)}return a.length?{code:"not_for_sale",labels:a,message:"These seats are not for sale."}:s.length?Z(s):ne(t,o,{seatsByLabel:e})}function $(t){return t.sectionId?`s:${t.sectionId}`:`r:${t.logicalRowId??t.rowId}`}function ie(t,o){let n=new Set,e=new Map;for(let c of t){let a=c.focalPoint??o,s=`${a.x},${a.y}`,r=e.get(s);r||(r={focal:a,seats:[]},e.set(s,r)),r.seats.push(c)}for(let{focal:c,seats:a}of e.values()){let s=E(a),r=s.x-c.x,l=s.y-c.y,g=Math.hypot(r,l),m=0;for(let y of a)m=Math.max(m,Math.abs(y.x-c.x),Math.abs(y.y-c.y));let u=Math.max(m,1)*1e-6;if(!(g>u))continue;let x=0,T=new Set;for(let y of a)((y.x-c.x)*r+(y.y-c.y)*l)/g<-u&&(x+=1,T.add($(y)));if(!T.size||x*10>a.length)continue;let w=a.filter(y=>T.has($(y)));if(!(w.length*4>a.length))for(let y of w)n.add(y.label)}return n}function O(t,o){if(Number.isInteger(t.logicalSeatIndex))return t.logicalSeatIndex;let n=t.id.lastIndexOf(":");if(n<0)return o;let e=Number(t.id.slice(n+1));return Number.isFinite(e)?e:o}function A(t,o){let n=t.x-o.x,e=t.y-o.y;return n*n+e*e}function E(t){let o=0,n=0;for(let e of t)o+=e.x,n+=e.y;return{x:o/t.length,y:n/t.length}}function U(t,o){return t.find(n=>n.focalPoint)?.focalPoint??o}function M(t){return t.commercial?.premium===!0}function oe(t,o,n){let e=Math.floor(n.qty);if(!Number.isFinite(e)||e<=0)return{labels:[],reason:"sold_out"};let{categoryKey:c,zoneId:a,focal:s,preferPremium:r,preferNearest:l,preferredRowIds:g,accessibility:m,requireContiguous:u}=n,x=n.preferAisle&&n.aisleLabels?.size?n.aisleLabels:null,T=i=>x&&!i.some(d=>x.has(d.label))?1:0,w=new Map,y=[];if(t.forEach((i,d)=>{let b=o.has(i.label)&&(!c||i.categoryKey===c)&&(!a||i.zoneId===a)&&(!m||m.some(S=>i.accessibility?.includes(S))),h=i.logicalRowId??i.rowId,f=w.get(h);f||(f=[],w.set(h,f)),f.push({seat:i,index:O(i,d),elig:b}),b&&y.push(i)}),y.length===0)return{labels:[],reason:"sold_out"};let v=!c&&!a&&!l?ie(t,s):new Set,V=i=>v.size?i.reduce((d,b)=>d+(v.has(b.label)?1:0),0):0,_=new Map([...w].map(([i,d])=>[i,E(d.map(b=>b.seat))])),L=(g??[]).map(i=>_.get(i)).filter(i=>!!i),N=i=>{let d=_.get(i);return!d||!L.length?0:Math.min(...L.map(b=>A(d,b)))},p=null,W=i=>{if(!p)return!0;if(r&&i.nonPremium!==p.nonPremium)return i.nonPremium<p.nonPremium;if(l&&i.rowD2!==p.rowD2)return i.rowD2<p.rowD2;if(l&&i.d2!==p.d2)return i.d2<p.d2;if(i.behind!==p.behind)return i.behind<p.behind;if(i.noAisle!==p.noAisle)return i.noAisle<p.noAisle;if(i.orphan!==p.orphan)return i.orphan<p.orphan;if(i.d2!==p.d2)return i.d2<p.d2;let d=i.rowId.localeCompare(p.rowId);return d!==0?d<0:i.startIndex<p.startIndex};for(let[i,d]of w){let b=[...d].sort((f,S)=>f.index-S.index),h=0;for(;h<b.length;){if(!b[h].elig){h++;continue}let f=h;for(;f<b.length&&b[f].elig&&(f===h||b[f].index===b[f-1].index+1);)f++;let S=f-h;for(let I=0;I+e<=S;I++){let H=I,Y=S-(I+e),J=H===1||Y===1?1:0,k=b.slice(h+I,h+I+e).map(R=>R.seat),B={labels:k.map(R=>R.label),seats:k,rowId:i,startIndex:b[h+I].index,orphan:J,nonPremium:r?k.reduce((R,Q)=>R+(M(Q)?0:1),0):0,behind:V(k),noAisle:T(k),rowD2:N(i),d2:A(E(k),l?s:U(k,s))};W(B)&&(p=B)}h=f}}return p?{labels:p.labels}:u?{labels:[],reason:y.length?"not_enough_together":"sold_out"}:y.length<e?{labels:[],reason:"not_enough_together"}:{labels:y.map((i,d)=>({seat:i,i:d,rowD2:N(i.logicalRowId??i.rowId),d2:A(i,l?s:i.focalPoint??s)})).sort((i,d)=>{if(r){let S=M(i.seat)?0:1,I=M(d.seat)?0:1;if(S!==I)return S-I}if(l&&i.rowD2!==d.rowD2)return i.rowD2-d.rowD2;let b=v.has(i.seat.label)?1:0,h=v.has(d.seat.label)?1:0;if(b!==h)return b-h;if(x){let S=x.has(i.seat.label)?0:1,I=x.has(d.seat.label)?0:1;if(S!==I)return S-I}if(i.d2!==d.d2)return i.d2-d.d2;let f=(i.seat.logicalRowId??i.seat.rowId).localeCompare(d.seat.logicalRowId??d.seat.rowId);return f!==0?f:O(i.seat,i.i)-O(d.seat,d.i)}).slice(0,e).map(i=>i.seat.label)}}function be(t,o,n,e){let c=Math.floor(e.qty),a=oe(t,n,e),r=o.filter(u=>u.bookingMode==="whole"&&u.capacity===c&&n.has(u.label)&&(!e.categoryKey||u.categoryKey===e.categoryKey)&&(!e.zoneId||u.zoneId===e.zoneId)&&!e.accessibility).map(u=>({table:u,d2:A(u.center,e.preferNearest?e.focal:u.focalPoint??e.focal)})).sort((u,x)=>u.d2-x.d2||u.table.label.localeCompare(x.table.label))[0];if(!r)return a;if(!a.labels.length)return{labels:[r.table.label]};if(e.preferAisle&&e.aisleLabels&&a.labels.some(u=>e.aisleLabels.has(u)))return a;let l=new Map(t.map(u=>[u.label,u])),g=a.labels.map(u=>l.get(u)).filter(u=>!!u),m=g.length?A(E(g),U(g,e.focal)):Number.POSITIVE_INFINITY;return r.d2<m?{labels:[r.table.label]}:a}var P=class extends Error{constructor(n,e){super(e);this.objectId=n;this.name="GroupedTableProjectionError"}};function re(t){let o=t.minOccupancy,n=t.maxOccupancy;if(!Number.isInteger(o)||!Number.isInteger(n)||o<1||n<o||n>t.seatCount)throw new P(t.id,`Table "${t.label}" has invalid variable-occupancy bounds`);return{min:o,max:n}}function ye(t,o){if(o!==2)return[];let n=[];for(let e of F(t)){if(e.type!=="table"||!e.bookAsWhole&&!e.variableOccupancy)continue;if(e.bookAsWhole&&e.variableOccupancy)throw new P(e.id,`Table "${e.label}" cannot be whole-table and variable-occupancy inventory`);if(!Number.isInteger(e.seatCount)||e.seatCount<1||!e.label.trim())throw new P(e.id,"Grouped tables require a label and at least one chair");let c=e.variableOccupancy?"variable":"whole",a=c==="variable"?re(e):{min:e.seatCount,max:e.seatCount};n.push({objectId:e.id,label:e.label,...e.displayLabel?{displayLabel:e.displayLabel}:{},...e.displayType?{displayType:e.displayType}:{},categoryKey:e.categoryKey,mode:c,capacity:e.seatCount,minOccupancy:a.min,maxOccupancy:a.max,chairs:K(e)})}return n}export{se as a,X as b,Z as c,D as d,de as e,G as f,ne as g,ue as h,ie as i,oe as j,be as k,P as l,ye as m};
@@ -1 +1 @@
1
- import{h as g}from"./chunk-UEDS3HJ3.js";import{c as M,k as A,n as m,t as _}from"./chunk-JBOTRSMY.js";var F=7,G=10,x=10,h=.39,d=.8,I=.62;function v(t){let n=Math.min(Math.abs(t.width),Math.abs(t.height));if(!(n>0))return x;let e=Math.max(1,t.text.length),r=Math.abs(t.width)*d/(e*I);return Math.max(x,Math.min(n*h,r))}var w=15,K=11,X=12;function Y(t){return t.labelPresentation?.visible!==!1}function D(t){let n=t.labelPresentation?.labelStyle?.size;return typeof n=="number"&&Number.isFinite(n)?n:void 0}var U=.85,O=12,l=4.5,V=3,S=3,o="#000000",i="#ffffff",Z=24,B=18.67;function W(t,n=400){return t>=Z||n>=700&&t>=B?S:l}function $(t,n){return t*n>=O}var j=24,C={wheelchair:"M7.8 4.5a2.2 2.2 0 1 0 4.4 0a2.2 2.2 0 1 0 -4.4 0zM8 7L10.5 7L10.5 15L8 15ZM8 12.5L18 12.5L18 15L8 15ZM16 15L18 15L18 18L16 18ZM5.5 16a5.5 5.5 0 1 0 11 0a5.5 5.5 0 1 0 -11 0zM8 16a3 3 0 1 1 6 0a3 3 0 1 1 -6 0z",companion:"M5.5 6.5a3 3 0 1 0 6 0a3 3 0 1 0 -6 0zM4.5 18.5L6 11.5L11 11.5L12.5 18.5ZM12.5 7.5a3 3 0 1 0 6 0a3 3 0 1 0 -6 0zM11.5 19L13 12.5L18 12.5L19.5 19Z","semi-ambulatory":"M8.3 3.8a2.2 2.2 0 1 0 4.4 0a2.2 2.2 0 1 0 -4.4 0zM9 6.2L12 6.6L11 13.5L8.6 13L9 6.2ZM8.6 13L11 13L9.5 21L7 21ZM10.4 13L12.6 13L13.6 21L11.2 21ZM11.2 7.2L14 8L14.6 9.6L11.9 8.9ZM14.4 6.8L15.9 6.8L16.4 21L14.8 21Z","designated-aisle":"M3 5L6 5L6 14L3 14ZM3 12L13 12L13 15L3 15ZM5 15L7 15L7 20L5 20ZM11 15L13 15L13 20L11 20ZM13 7L20 7L17 4L19 4L23 8.5L19 13L17 13L20 10L13 10Z","step-free":"M4 4.5a2.2 2.2 0 1 0 4.4 0a2.2 2.2 0 1 0 -4.4 0zM4.4 7L7.5 7L7.5 13L11 15L9.5 17L5 14L4.4 7ZM2 19L8 19L17 10L22 10L22 13L18 13L10 21L2 21Z",hearing:"M15.5 3.5C9 2.2 5.5 6 5.5 11.5C5.5 16 8 19.5 10.5 21C13.2 22.6 16.4 20.8 15.4 18C14.8 16.4 12.9 16.1 13 14C13.1 11.9 15.8 11.4 15.8 8.5C15.8 5.4 13 4 15.5 3.5Z",cart:"M5.5 6L18.5 6a2.5 2.5 0 0 1 2.5 2.5L21 15.5a2.5 2.5 0 0 1 -2.5 2.5L11 18L7 20.5L7.5 18L5.5 18a2.5 2.5 0 0 1 -2.5 -2.5L3 8.5a2.5 2.5 0 0 1 2.5 -2.5zM6.5 11L17.5 11L17.5 12.6L6.5 12.6zM6.5 14L17.5 14L17.5 15.6L6.5 15.6z","sign-language":"M7 11L17 11L17 18a2 2 0 0 1 -2 2L9 20a2 2 0 0 1 -2 -2zM7.6 5L9.4 5L9.4 12L7.6 12zM9.9 3.5L11.7 3.5L11.7 12L9.9 12zM12.3 3.5L14.1 3.5L14.1 12L12.3 12zM14.6 5L16.4 5L16.4 12L14.6 12zM7.2 12.5L5 10.2L6.4 8.9L8.6 11.2Z","low-vision":"M2.5 12C6 6 18 6 21.5 12C18 18 6 18 2.5 12ZM9 12a3 3 0 1 0 6 0a3 3 0 1 0 -6 0zM17.5 3L19 3L19 6L17.5 6ZM19 4L22 4L22 5.5L19 5.5Z","sensory-friendly":"M4 11C4 5 7 2.5 12 2.5S20 5 20 11L17 11C17 7 15.5 5.5 12 5.5S7 7 7 11ZM3 10L8 10L8 19L5 19a2 2 0 0 1 -2 -2ZM16 10L21 10L21 17a2 2 0 0 1 -2 2L16 19ZM9 12L15 12L15 14L9 14ZM10 16L14 16L14 18L10 18Z","plus-size":"M9.4 4.3a2.6 2.6 0 1 0 5.2 0a2.6 2.6 0 1 0 -5.2 0zM5 20L4 13C4 10.5 7 9.5 12 9.5C17 9.5 20 10.5 20 13L19 20Z","lift-armrest":"M5 6L8 6L8 19L5 19zM5 16L18 16L18 19L5 19zM8 12L17 12L17 14.5L8 14.5zM14 7L16 7L16 12L14 12zM12 7L18 7L15 3Z"},Q=C.wheelchair;function q(t){if(!t?.length)return null;let n=t.includes("wheelchair")?"wheelchair":t[0];return C[n]??null}function J(t,n){return n.colorblind?N(n.canvasBackground):g(t)}function t1(t){return/-(\d{1,5})$/.exec(t)?.[1]??t}var s=m;function n1(t,n,e){let r=M(t),a=M(n);if(!r||!a)return n;let L=Math.max(0,Math.min(1,e));return`#${r.map((c,p)=>Math.round(c*L+a[p]*(1-L))).map(c=>c.toString(16).padStart(2,"0")).join("")}`}var e1=3;function r1(t){let n=s(i,t)??0,e=s(o,t)??0;return n>=l?i:e>=l&&_(t)||_(t)?o:i}function N(t){return _(t)?o:i}function E(t,n,e=l){let r=s(n,t);if(r!=null&&r>=e)return n;let a=s(o,t)??0,L=s(i,t)??0;return a===0&&L===0?n:a>=L?o:i}function L1(t,n,e,r=l){return n??E(t,e,r)}var z=3;function o1(t){let n=s("#ffffff",t);if(n!=null&&n>=z)return"#ffffff";let e=s(o,t)??0,r=s(i,t)??0;return e===0&&r===0?"#ffffff":e>=r?o:i}var T=/^#[0-9a-f]{6}$/i;function k(t){let n=M(t);return n!=null&&A(n)>.5}var y="#e5e7eb",R="#273142";function i1(t){return k(t)?y:R}function s1(t,n,e=l){let r=T.test(t.trim()),a=t.trim().toLowerCase(),L=0,u=0,c=null;for(let b of n){if(!r||!T.test(b.trim()))continue;L+=1;let f=E(b,t,e);f.toLowerCase()!==a&&(u+=1,c=f)}return{total:L,overridden:u,status:L===0?"none":u===0?"applies":u===L?"overridden":"mixed",overrideInk:c}}export{F as a,G as b,x as c,h as d,v as e,w as f,K as g,X as h,Y as i,D as j,U as k,O as l,l as m,V as n,S as o,o as p,i as q,W as r,$ as s,j as t,C as u,Q as v,q as w,J as x,t1 as y,s as z,n1 as A,e1 as B,r1 as C,N as D,E,L1 as F,o1 as G,k as H,y as I,R as J,i1 as K,s1 as L};
1
+ import{h as g}from"./chunk-URW7MSCJ.js";import{c as M,k as A,n as m,t as _}from"./chunk-JBOTRSMY.js";var F=7,G=10,x=10,h=.39,d=.8,I=.62;function v(t){let n=Math.min(Math.abs(t.width),Math.abs(t.height));if(!(n>0))return x;let e=Math.max(1,t.text.length),r=Math.abs(t.width)*d/(e*I);return Math.max(x,Math.min(n*h,r))}var w=15,K=11,X=12;function Y(t){return t.labelPresentation?.visible!==!1}function D(t){let n=t.labelPresentation?.labelStyle?.size;return typeof n=="number"&&Number.isFinite(n)?n:void 0}var U=.85,O=12,l=4.5,V=3,S=3,o="#000000",i="#ffffff",Z=24,B=18.67;function W(t,n=400){return t>=Z||n>=700&&t>=B?S:l}function $(t,n){return t*n>=O}var j=24,C={wheelchair:"M7.8 4.5a2.2 2.2 0 1 0 4.4 0a2.2 2.2 0 1 0 -4.4 0zM8 7L10.5 7L10.5 15L8 15ZM8 12.5L18 12.5L18 15L8 15ZM16 15L18 15L18 18L16 18ZM5.5 16a5.5 5.5 0 1 0 11 0a5.5 5.5 0 1 0 -11 0zM8 16a3 3 0 1 1 6 0a3 3 0 1 1 -6 0z",companion:"M5.5 6.5a3 3 0 1 0 6 0a3 3 0 1 0 -6 0zM4.5 18.5L6 11.5L11 11.5L12.5 18.5ZM12.5 7.5a3 3 0 1 0 6 0a3 3 0 1 0 -6 0zM11.5 19L13 12.5L18 12.5L19.5 19Z","semi-ambulatory":"M8.3 3.8a2.2 2.2 0 1 0 4.4 0a2.2 2.2 0 1 0 -4.4 0zM9 6.2L12 6.6L11 13.5L8.6 13L9 6.2ZM8.6 13L11 13L9.5 21L7 21ZM10.4 13L12.6 13L13.6 21L11.2 21ZM11.2 7.2L14 8L14.6 9.6L11.9 8.9ZM14.4 6.8L15.9 6.8L16.4 21L14.8 21Z","designated-aisle":"M3 5L6 5L6 14L3 14ZM3 12L13 12L13 15L3 15ZM5 15L7 15L7 20L5 20ZM11 15L13 15L13 20L11 20ZM13 7L20 7L17 4L19 4L23 8.5L19 13L17 13L20 10L13 10Z","step-free":"M4 4.5a2.2 2.2 0 1 0 4.4 0a2.2 2.2 0 1 0 -4.4 0zM4.4 7L7.5 7L7.5 13L11 15L9.5 17L5 14L4.4 7ZM2 19L8 19L17 10L22 10L22 13L18 13L10 21L2 21Z",hearing:"M15.5 3.5C9 2.2 5.5 6 5.5 11.5C5.5 16 8 19.5 10.5 21C13.2 22.6 16.4 20.8 15.4 18C14.8 16.4 12.9 16.1 13 14C13.1 11.9 15.8 11.4 15.8 8.5C15.8 5.4 13 4 15.5 3.5Z",cart:"M5.5 6L18.5 6a2.5 2.5 0 0 1 2.5 2.5L21 15.5a2.5 2.5 0 0 1 -2.5 2.5L11 18L7 20.5L7.5 18L5.5 18a2.5 2.5 0 0 1 -2.5 -2.5L3 8.5a2.5 2.5 0 0 1 2.5 -2.5zM6.5 11L17.5 11L17.5 12.6L6.5 12.6zM6.5 14L17.5 14L17.5 15.6L6.5 15.6z","sign-language":"M7 11L17 11L17 18a2 2 0 0 1 -2 2L9 20a2 2 0 0 1 -2 -2zM7.6 5L9.4 5L9.4 12L7.6 12zM9.9 3.5L11.7 3.5L11.7 12L9.9 12zM12.3 3.5L14.1 3.5L14.1 12L12.3 12zM14.6 5L16.4 5L16.4 12L14.6 12zM7.2 12.5L5 10.2L6.4 8.9L8.6 11.2Z","low-vision":"M2.5 12C6 6 18 6 21.5 12C18 18 6 18 2.5 12ZM9 12a3 3 0 1 0 6 0a3 3 0 1 0 -6 0zM17.5 3L19 3L19 6L17.5 6ZM19 4L22 4L22 5.5L19 5.5Z","sensory-friendly":"M4 11C4 5 7 2.5 12 2.5S20 5 20 11L17 11C17 7 15.5 5.5 12 5.5S7 7 7 11ZM3 10L8 10L8 19L5 19a2 2 0 0 1 -2 -2ZM16 10L21 10L21 17a2 2 0 0 1 -2 2L16 19ZM9 12L15 12L15 14L9 14ZM10 16L14 16L14 18L10 18Z","plus-size":"M9.4 4.3a2.6 2.6 0 1 0 5.2 0a2.6 2.6 0 1 0 -5.2 0zM5 20L4 13C4 10.5 7 9.5 12 9.5C17 9.5 20 10.5 20 13L19 20Z","lift-armrest":"M5 6L8 6L8 19L5 19zM5 16L18 16L18 19L5 19zM8 12L17 12L17 14.5L8 14.5zM14 7L16 7L16 12L14 12zM12 7L18 7L15 3Z"},Q=C.wheelchair;function q(t){if(!t?.length)return null;let n=t.includes("wheelchair")?"wheelchair":t[0];return C[n]??null}function J(t,n){return n.colorblind?N(n.canvasBackground):g(t)}function t1(t){return/-(\d{1,5})$/.exec(t)?.[1]??t}var s=m;function n1(t,n,e){let r=M(t),a=M(n);if(!r||!a)return n;let L=Math.max(0,Math.min(1,e));return`#${r.map((c,p)=>Math.round(c*L+a[p]*(1-L))).map(c=>c.toString(16).padStart(2,"0")).join("")}`}var e1=3;function r1(t){let n=s(i,t)??0,e=s(o,t)??0;return n>=l?i:e>=l&&_(t)||_(t)?o:i}function N(t){return _(t)?o:i}function E(t,n,e=l){let r=s(n,t);if(r!=null&&r>=e)return n;let a=s(o,t)??0,L=s(i,t)??0;return a===0&&L===0?n:a>=L?o:i}function L1(t,n,e,r=l){return n??E(t,e,r)}var z=3;function o1(t){let n=s("#ffffff",t);if(n!=null&&n>=z)return"#ffffff";let e=s(o,t)??0,r=s(i,t)??0;return e===0&&r===0?"#ffffff":e>=r?o:i}var T=/^#[0-9a-f]{6}$/i;function k(t){let n=M(t);return n!=null&&A(n)>.5}var y="#e5e7eb",R="#273142";function i1(t){return k(t)?y:R}function s1(t,n,e=l){let r=T.test(t.trim()),a=t.trim().toLowerCase(),L=0,u=0,c=null;for(let b of n){if(!r||!T.test(b.trim()))continue;L+=1;let f=E(b,t,e);f.toLowerCase()!==a&&(u+=1,c=f)}return{total:L,overridden:u,status:L===0?"none":u===0?"applies":u===L?"overridden":"mixed",overrideInk:c}}export{F as a,G as b,x as c,h as d,v as e,w as f,K as g,X as h,Y as i,D as j,U as k,O as l,l as m,V as n,S as o,o as p,i as q,W as r,$ as s,j as t,C as u,Q as v,q as w,J as x,t1 as y,s as z,n1 as A,e1 as B,r1 as C,N as D,E,L1 as F,o1 as G,k as H,y as I,R as J,i1 as K,s1 as L};
@@ -1 +1 @@
1
- import{q as N}from"./chunk-JRZHC75P.js";var I=["#e69f00","#56b4e9","#009e73","#f0e442","#0072b2","#d55e00","#cc79a7"],R="#a4508b";var q={facilities:R,"food-drink":I[5],navigation:I[2],accessibility:I[4]},Q=N,K={minDiameterPx:12,glyphScale:.66,ringRatio:1/14,largeFromPx:24};function X(e,n){return n>=K.largeFromPx&&e.solidLarge?e.solidLarge:e.solid}var p=e=>{let n=Math.round(e*100)/100;return Object.is(n,-0)?"0":String(n)},y=e=>`${p(e[0])} ${p(e[1])}`,S=(e,n,o,t)=>[e+o*Math.cos(t*Math.PI/180),n+o*Math.sin(t*Math.PI/180)];function W(e){let n=`M${y(e.from)}`;for(let o of e.segs)n+=o.arc?`A${p(o.arc.r)} ${p(o.arc.r)} 0 ${o.arc.large} ${o.arc.sweep} ${y(o.to)}`:`L${y(o.to)}`;return`${n}Z`}function u(e){let n=[e.from,...e.segs.map(t=>t.to)],o=[];for(let t=e.segs.length-1;t>=0;t--){let i=e.segs[t].arc;o.push({to:n[t],arc:i&&{...i,sweep:i.sweep?0:1}})}return{from:n[n.length-1],segs:o}}function g(e,n,o){let t={r:o,large:0,sweep:1};return{from:[e-o,n],segs:[{to:[e+o,n],arc:t},{to:[e-o,n],arc:t}]}}function a(e,n,o,t,i){let s=Math.min(i,o/2,t/2),c={r:s,large:0,sweep:1};return s<=0?M([[e,n],[e+o,n],[e+o,n+t],[e,n+t]]):{from:[e+s,n],segs:[{to:[e+o-s,n]},{to:[e+o,n+s],arc:c},{to:[e+o,n+t-s]},{to:[e+o-s,n+t],arc:c},{to:[e+s,n+t]},{to:[e,n+t-s],arc:c},{to:[e,n+s]},{to:[e+s,n],arc:c}]}}function M(e){let n=0;for(let t=0;t<e.length;t++){let[i,s]=e[t],[c,m]=e[(t+1)%e.length];n+=i*m-c*s}let o=n>0?e:[...e].reverse();return{from:o[0],segs:[...o.slice(1).map(t=>({to:t})),{to:o[0]}]}}function l(e,n,o){let t=o/2,i=n[0]-e[0],s=n[1]-e[1],c=Math.hypot(i,s);if(c<1e-6)return g(e[0],e[1],t);let m=[s/c*t,-i/c*t],v={r:t,large:0,sweep:1},E=[e[0]+m[0],e[1]+m[1]];return{from:E,segs:[{to:[n[0]+m[0],n[1]+m[1]]},{to:[n[0]-m[0],n[1]-m[1]],arc:v},{to:[e[0]-m[0],e[1]-m[1]]},{to:E,arc:v}]}}function h(e,n,o=!1){let t=[],i=o?e.length:e.length-1;for(let s=0;s<i;s++)t.push(l(e[s],e[(s+1)%e.length],n));return t}function b(e,n,o,t,i,s){let c=s/2,m=i-t>180?1:0,v={r:c,large:0,sweep:1},E=S(e,n,o+c,t);return{from:E,segs:[{to:S(e,n,o+c,i),arc:{r:o+c,large:m,sweep:1}},{to:S(e,n,o-c,i),arc:v},{to:S(e,n,o-c,t),arc:{r:o-c,large:m,sweep:0}},{to:E,arc:v}]}}var r=(...e)=>e.flat().map(W).join(" "),d=(e,n,o)=>`M${p(e-o)} ${p(n)}a${p(o)} ${p(o)} 0 1 0 ${p(2*o)} 0a${p(o)} ${p(o)} 0 1 0 ${p(-2*o)} 0`,f=(e,n,o,t,i)=>W(a(e,n,o,t,i)),A=e=>`M${e.map(y).join("L")}`,O=(e,n,o,t,i)=>`M${y(S(e,n,o,t))}A${p(o)} ${p(o)} 0 ${i-t>180?1:0} 1 ${y(S(e,n,o,i))}`;function P(e,n,o,t=1){let i=s=>[s[0]*t+n,s[1]*t+o];return{head:[e.head[0]*t+n,e.head[1]*t+o,e.head[2]*t],limbs:e.limbs.map(s=>s.map(i)),arcs:e.arcs?.map(([s,c,m,v,E])=>[s*t+n,c*t+o,m*t,v,E])}}function _(e){return[d(e.head[0],e.head[1],e.head[2]),...e.limbs.map(A),...(e.arcs??[]).map(([n,o,t,i,s])=>O(n,o,t,i,s))].join(" ")}function k(e,n=2.6){return[g(e.head[0],e.head[1],e.head[2]+1),...e.limbs.flatMap(o=>h(o,n)),...(e.arcs??[]).map(([o,t,i,s,c])=>b(o,t,i,s,c,n-.2))]}var L={head:[10,4,2],limbs:[[[10,8.2],[10,14],[15.5,14],[18,19.5],[20.5,19.5]],[[10,10.6],[14.5,10.6]]],arcs:[[9.5,16,5.5,35,235]]},C={head:[10.6,3.9,1.9],limbs:[[[9.6,7.8],[7.6,12]],[[5.4,8.2],[9.4,8.4],[12.8,10]],[[4,15.6],[7.6,12],[11,13.6],[10.6,16.4]]]},$={cx:12,hr:1.9,arm:5,leg:3,r:2},G={cx:12,hr:1.9,sh:2.2,hem:6,leg:3},j={cx:6.2,hr:1.8,arm:3.6,leg:2.2,r:1.4},H={cx:17.8,hr:1.8,sh:1.4,hem:4.1,leg:2.2};function D({cx:e,hr:n,arm:o,leg:t,r:i}){return[d(e,2+n,n),`M${p(e-o+i)} 8.5H${p(e+o-i)}a${i} ${i} 0 0 1 ${i} ${i}V15H${p(e+t)}V22H${p(e-t)}V15H${p(e-o)}V${p(8.5+i)}a${i} ${i} 0 0 1 ${i} ${-i}Z`,`M${p(e)} 15V22`].join(" ")}function Z({cx:e,hr:n,arm:o,leg:t,r:i}){return[g(e,2+n,n+1),a(e-o-.5,7.8,2*o+1,7.7,i+.5),a(e-t-.5,13,t,9.5,1),a(e+.5,13,t,9.5,1)]}function T({cx:e,hr:n,sh:o,hem:t,leg:i}){return[d(e,2+n,n),A([[e-o,8.5],[e+o,8.5],[e+t,16],[e+i,16],[e+i,22],[e-i,22],[e-i,16],[e-t,16]])+"Z",`M${p(e)} 16V22`].join(" ")}function w({cx:e,hr:n,sh:o,hem:t,leg:i}){return[g(e,2+n,n+1),M([[e-o-.6,7.8],[e+o+.6,7.8],[e+t+.9,16.8],[e-t-.9,16.8]]),a(e-i-.1,15,i-.4,7.5,.9),a(e+.5,15,i-.4,7.5,.9)]}var z=[[14.6,1.5],[5.2,13.6],[11,13.6],[9.4,22.5],[18.8,10.4],[13,10.4]],e1="M8.5 3.5 4 5.5l-1.5 5 3 1 1-2v11h11v-11l1 2 3-1-1.5-5-4.5-2c-.5 1.5-1.8 2.5-3.5 2.5s-3-1-3.5-2.5Z",o1="M12 2.5S5 9.5 5 14.5a7 7 0 0 0 14 0c0-5-7-12-7-12Z",n1="M2.5 21.5h19V3h-6v6.2H9.2v6.2H2.5Z",B=[[9,3],[15,3],[15,9],[21,9],[21,15],[15,15],[15,21],[9,21],[9,15],[3,15],[3,9],[9,9]],t1={from:[3.8,5.2],segs:[{to:[20.2,5.2]},{to:[22,7],arc:{r:1.8,large:0,sweep:1}},{to:[22,9.7]},{to:[22,14.3],arc:{r:2.3,large:0,sweep:0}},{to:[22,17]},{to:[20.2,18.8],arc:{r:1.8,large:0,sweep:1}},{to:[3.8,18.8]},{to:[2,17],arc:{r:1.8,large:0,sweep:1}},{to:[2,14.3]},{to:[2,9.7],arc:{r:2.3,large:0,sweep:0}},{to:[2,7]},{to:[3.8,5.2],arc:{r:1.8,large:0,sweep:1}}]},i1={from:[12,1.6],segs:[{to:[20.4,4.9]},{to:[20.4,11.2]},{to:[12,22.4],arc:{r:13,large:0,sweep:1}},{to:[3.6,11.2],arc:{r:13,large:0,sweep:1}},{to:[3.6,4.9]},{to:[12,1.6]}]};function F(e,n,o){return{from:[e-o,n],segs:[{to:[e+o,n],arc:{r:o,large:0,sweep:1}},{to:[e-o,n]}]}}var U={head:[13.2,4.3,2.2],limbs:[[[12.6,8.6],[11.2,15],[17.8,18.4],[9.4,18.4]],[[12.4,9.8],[16,14.4]]]},a1=[[6,10.5],[15,10.5],[16.5,7],[18.5,5.5],[20,6.5],[21.5,8.5],[19.5,10],[18,12],[18,19],[16.5,19],[15.5,14],[9.5,14],[8.5,19],[7,19],[6.5,13]],r1=[[5.4,9.8],[14.6,9.8],[16.1,6.4],[18.4,4.6],[20.5,5.9],[22.4,8.6],[19.9,10.6],[18.8,12.3],[18.8,19.8],[15.8,19.8],[15,14.8],[10.1,14.8],[9.2,19.8],[6.2,19.8],[5.6,13.2]],V=[{key:"restroom-men",label:"Men's restroom",group:"facilities",path:D($),solid:r(Z($))},{key:"restroom-women",label:"Women's restroom",group:"facilities",path:T(G),solid:r(w(G))},{key:"restroom-accessible",label:"Accessible restroom",group:"facilities",path:[f(2.5,2.5,19,19,3.5),_(P(L,4.6,4.3,.66))].join(" "),solid:r(k(L)),solidLarge:r(a(1.5,1.5,21,21,4.5),u(a(3.9,3.9,16.2,16.2,2.6)),k(P(L,4.9,4.7,.62),2.2))},{key:"first-aid",label:"First aid",group:"facilities",path:A(B)+"Z",solid:r(M(B.map(([e,n])=>[e+(e-12)*.08,n+(n-12)*.08])))},{key:"coat-check",label:"Coat check",group:"facilities",path:"M10 6.5a2 2 0 1 1 2 2V10 M12 10 3.4 16.9a1.4 1.4 0 0 0 .9 2.6h15.4a1.4 1.4 0 0 0 .9-2.6Z",solid:r(b(12,6.2,2.2,180,450,2.3),l([12,8.4],[12,10.5],2.3),h([[12,10.2],[3.2,18.8],[20.8,18.8]],2.8,!0))},{key:"atm",label:"ATM / cash",group:"facilities",path:[f(2,6,20,12,2),d(12,12,2.75),"M6 12h.01 M18 12h.01"].join(" "),solid:r(a(1.5,5.5,21,13,2.4),u(g(12,12,3.2)))},{key:"info",label:"Info point",group:"facilities",path:[d(12,12,9.5),"M10.8 11H12v5.8 M12 7.6h.01"].join(" "),solid:r(g(12,4.9,2.4),a(10.3,9.2,3.4,12.3,1),a(8.2,9.2,4,3,1),a(8.2,18.5,7.6,3,1))},{key:"lost-found",label:"Lost & found",group:"facilities",path:[d(10.5,10.5,7.5),"M16 16l5.5 5.5","M8.4 8.4a2.1 2.1 0 1 1 3 1.9c-.6.4-.9.8-.9 1.6 M10.5 14.6h.01"].join(" "),solid:r(b(12,7.6,4.2,180,405,3.4),h([[14.97,10.57],[12,13],[12,15]],3.4),g(12,20,2.1))},{key:"restrooms",label:"Toilets",group:"facilities",path:[D(j),T(H)].join(" "),solid:r(Z(j),w(H))},{key:"charging",label:"Charging point",group:"facilities",path:[f(6,2,12,20,2.5),"M13.2 6.2 9.6 12h4.8l-3.6 5.8"].join(" "),solid:r(M(z))},{key:"smoking",label:"Smoking area",group:"facilities",path:[f(2,14.5,14.5,4,1),"M6.5 14.5v4","M15.5 11.5c0-1.4 1.5-1.9 1.5-3.4s-1.5-2-1.5-3.4 M19 11.5c0-1.4 1.5-1.9 1.5-3.4s-1.5-2-1.5-3.4"].join(" "),solid:r(a(1.5,14,4.2,5,1.2),a(6.8,14,10.4,5,1.2),h([[15.9,11.4],[17.3,8.9],[15.9,6.4],[17.1,3.9]],2.2),h([[19.6,11.4],[21,8.9],[19.6,6.4],[20.8,3.9]],2.2))},{key:"no-smoking",label:"No smoking",group:"facilities",path:[d(12,12,9.5),"M5.3 5.3l13.4 13.4","M5.5 10.5h13v3h-13Z"].join(" "),solid:r(g(12,12,10.6),u(g(12,12,8)),l([6,6],[18,18],2.8),a(5,10.4,3,3.2,.6),a(16,10.4,3,3.2,.6))},{key:"food",label:"Food",group:"food-drink",path:"M5 2.5V8a2.5 2.5 0 0 0 5 0V2.5 M7.5 2.5v19 M18.5 13.5h-2c-1.3 0-2-1-2-2.5 0-4 1.5-7 4-8.5v19",solid:r(h([[4.9,2.6],[4.9,8]],2.2),h([[10.1,2.6],[10.1,8]],2.2),h([[7.5,2.6],[7.5,8]],2.2),b(7.5,8,2.6,0,180,2.2),l([7.5,10],[7.5,21.4],3),M([[19.4,2.2],[19.4,14.2],[16.2,14.2],[14.1,12],[14.1,9.4],[15.2,5.8],[17.3,3.3]]),l([18,13],[18,21.4],3))},{key:"bar",label:"Bar",group:"food-drink",path:"M3.5 3.5h17L12 13Z M6.2 6.5h11.6 M12 13v7.5 M8 20.5h8",solid:r(M([[2.8,3],[21.2,3],[12,13.6]]),l([12,12],[12,20.6],2.8),l([7.4,21],[16.6,21],2.8))},{key:"coffee",label:"Caf\xE9 / coffee",group:"food-drink",path:"M4 9h12v4.5a5.5 5.5 0 0 1-5.5 5.5h-1A5.5 5.5 0 0 1 4 13.5Z M16 10.5h1.2a2.75 2.75 0 0 1 0 5.5H16 M8 3v3 M12 3v3 M3 21.5h14",solid:r({from:[3.4,8.4],segs:[{to:[16.6,8.4]},{to:[16.6,13.4]},{to:[11,19.4],arc:{r:5.8,large:0,sweep:1}},{to:[9,19.4]},{to:[3.4,13.4],arc:{r:5.8,large:0,sweep:1}},{to:[3.4,8.4]}]},b(17.2,13.25,2.5,270,450,2.4),l([7.8,2.6],[7.8,5.6],2.4),l([12.2,2.6],[12.2,5.6],2.4),l([2.6,21.6],[17.4,21.6],2.6))},{key:"water",label:"Water / drinks",group:"food-drink",path:o1,solid:"M12 1.2S4 8.9 4 14.5a8 8 0 0 0 16 0c0-5.6-8-13.3-8-13.3Z"},{key:"merch",label:"Merch / shop",group:"food-drink",path:e1,solid:"M8.4 2.8 3.5 5l-1.9 6 4.2 1.4.4-.8v9.4h11.6v-9.4l.4.8 4.2-1.4-1.9-6-4.9-2.2c-.4 1.5-1.8 2.6-3.6 2.6s-3.2-1.1-3.6-2.6Z"},{key:"screen",label:"Screen",group:"facilities",path:[f(2,3.5,20,13.5,2),"M12 17v3.5 M8 20.5h8","M10 7.8v5.9l5-2.95Z"].join(" "),solid:r(a(1.5,3,21,14.4,2.4),u(M([[9.6,6.7],[16,10.2],[9.6,13.7]])),a(10.6,16.5,2.8,4,0),l([7.4,21],[16.6,21],2.8))},{key:"sound-booth",label:"Sound booth",group:"facilities",path:["M6 3v9 M6 16v5 M12 3v3 M12 10v11 M18 3v10 M18 17v4",d(6,14,2),d(12,8,2),d(18,15,2)].join(" "),solid:r(l([6,2.8],[6,21.2],1.8),l([12,2.8],[12,21.2],1.8),l([18,2.8],[18,21.2],1.8),a(3.2,11.6,5.6,4.8,1.4),a(9.2,5.6,5.6,4.8,1.4),a(15.2,12.6,5.6,4.8,1.4))},{key:"entrance",label:"Entrance",group:"navigation",path:"M11 7V3.5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v17a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1V17 M2.5 12h13.5 M12.5 8.5 16 12l-3.5 3.5",solid:r(h([[11,6.5],[11,2.6],[21,2.6],[21,21.4],[11,21.4],[11,17.5]],2.6),l([2.8,12],[13.5,12],3.2),M([[12.6,7.8],[18,12],[12.6,16.2]]))},{key:"exit",label:"Exit",group:"navigation",path:"M13 7V3.5a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v17a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V17 M8 12h13.5 M18 8.5l3.5 3.5-3.5 3.5",solid:r(h([[13,6.5],[13,2.6],[3,2.6],[3,21.4],[13,21.4],[13,17.5]],2.6),l([7.2,12],[17,12],3.2),M([[16.2,7.8],[21.6,12],[16.2,16.2]]))},{key:"emergency-exit",label:"Emergency exit",group:"navigation",path:[_(P(C,-2,1.4,1.15)),"M15.5 13h6 M19 10.5l2.5 2.5-2.5 2.5"].join(" "),solid:r(k(P(C,-2,1.4,1.15),2.7),l([15.6,13],[19.5,13],2.8),M([[18.4,9.4],[22.4,13],[18.4,16.6]]))},{key:"stairs",label:"Stairs",group:"navigation",path:n1,solid:"M1.5 22.5h21V2h-7.8v6.4H8.4v6.4H1.5Z"},{key:"elevator",label:"Elevator",group:"navigation",path:[f(3.5,2.5,17,19,2.5),"M8.5 9.5 12 5.5l3.5 4Z M8.5 14.5l3.5 4 3.5-4Z"].join(" "),solid:r(M([[12,1.6],[19.6,10.2],[4.4,10.2]]),M([[4.4,13.8],[19.6,13.8],[12,22.4]]))},{key:"parking",label:"Parking",group:"navigation",path:[f(3,3,18,18,3),"M9.5 17V7h3.75a3 3 0 0 1 0 6H9.5"].join(" "),solid:"M6.5 21V3H12a5.5 5.5 0 0 1 0 11h-1.9v7Z M10.1 6.6v3.8H12a1.9 1.9 0 0 0 0-3.8Z"},{key:"wheelchair",label:"Wheelchair access",group:"accessibility",path:_(L),solid:r(k(L))},{key:"hearing",label:"Hearing assistance",group:"accessibility",path:["M4 9a6 6 0 1 1 12 0c0 3-1.8 4.3-3 5.2-1.1.8-1.6 1.7-1.6 3.1a3.6 3.6 0 0 1-6.2 2.1","M7.5 9a2.5 2.5 0 0 1 5 0c0 1.2-.7 1.9-1.6 2.5","M18.5 5.5a6.5 6.5 0 0 1 0 8"].join(" "),solid:r(b(10,9,6,180,380,3),h([[15.64,11.05],[12.8,14.3],[11.5,17.2]],3),b(8.2,17.2,3.3,0,150,3),b(10,9,2.2,180,400,2.4),b(13.38,9.5,6.5,322,398,2.6))},{key:"box-office",label:"Box office / tickets",group:"navigation",path:"M3 7.5A1.5 1.5 0 0 1 4.5 6h15A1.5 1.5 0 0 1 21 7.5V10a2 2 0 0 0 0 4v2.5a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 16.5V14a2 2 0 0 0 0-4Z M15 6v2 M15 11v2 M15 16v2",solid:r(t1,u(a(14.1,7,1.8,2.2,.9)),u(a(14.1,10.9,1.8,2.2,.9)),u(a(14.1,14.8,1.8,2.2,.9)))},{key:"escalator",label:"Escalator",group:"navigation",path:"M2.5 17H7l9-9h5.5v4h-4l-9 9h-6Z M11 4.5h.01 M11 8.2v3.3",solid:r(M([[2,16.4],[6.8,16.4],[15.8,7.4],[22,7.4],[22,12.6],[17.8,12.6],[8.8,21.6],[2,21.6]]),g(11,4.3,2.3),l([11,8],[11,11],2.6))},{key:"ramp",label:"Ramp",group:"navigation",path:"M2.5 19.5h19v-10Z M4.5 13.2 14 8.2 M10.53 7.76 14 8.2l-1.6 3.11",solid:r(M([[1.6,20.4],[22.4,20.4],[22.4,8.6]]),l([4.2,13.4],[13.2,8.6],2.6),M([[15.4,7.5],[13.16,11.84],[10.56,6.88]]))},{key:"taxi",label:"Taxi / rideshare",group:"navigation",path:["M9.5 2.5h5V5h-5Z M6.5 11 8 7h8l1.5 4",f(3.5,11,17,6,2),"M6.5 17v2.5 M17.5 17v2.5 M7 14h.01 M17 14h.01"].join(" "),solid:r(a(9,1.8,6,3.4,.8),M([[6,11.4],[7.6,6.4],[16.4,6.4],[18,11.4]]),a(2.8,10.6,18.4,7,2.2),u(g(6.8,14,1.3)),u(g(17.2,14,1.3)),a(4.8,16,3.6,5.2,1.2),a(15.6,16,3.6,5.2,1.2))},{key:"transit",label:"Bus / transit",group:"navigation",path:[f(4.5,2.5,15,16,3),"M4.5 10.5h15 M9 5.5h6 M7.5 18.5V21 M16.5 18.5V21 M8 14.5h.01 M16 14.5h.01"].join(" "),solid:r(a(4,2,16,17,3.2),u(a(6.2,5.8,11.6,5,1)),u(g(8,14.5,1.3)),u(g(16,14.5,1.3)),a(6,17,3.4,5,1.2),a(14.6,17,3.4,5,1.2))},{key:"bike-parking",label:"Bike parking",group:"navigation",path:[d(6,14.5,4),d(18,14.5,4),"M6 14.5 9 7.5h6.5L18 14.5 M9 7.5l2.5 7H6 M11.5 14.5l4-7 M7.5 6h3 M15.5 7.5 15 5.5h2"].join(" "),solid:r(g(6,14.5,4.9),u(g(6,14.5,2.7)),g(18,14.5,4.9),u(g(18,14.5,2.7)),h([[6,14.5],[9,7.5],[15.5,7.5],[18,14.5]],2.2),h([[9,7.5],[11.5,14.5],[15.5,7.5]],2.2),l([6,14.5],[11.5,14.5],2.2),l([7.2,5.8],[10.6,5.8],2.2),h([[15.4,7.3],[15,5.4],[17.2,5.4]],2.2))},{key:"meeting-point",label:"Meeting point",group:"navigation",path:["M9.5 2.5 12 5l2.5-2.5 M9.5 21.5 12 19l2.5 2.5 M2.5 9.5 5 12l-2.5 2.5 M21.5 9.5 19 12l2.5 2.5",d(10,9.6,1.5),d(14,9.6,1.5),"M7.5 15.5a2.5 2.5 0 0 1 5 0 M11.5 15.5a2.5 2.5 0 0 1 5 0"].join(" "),solid:r(h([[9.4,2.4],[12,5],[14.6,2.4]],2.6),h([[9.4,21.6],[12,19],[14.6,21.6]],2.6),h([[2.4,9.4],[5,12],[2.4,14.6]],2.6),h([[21.6,9.4],[19,12],[21.6,14.6]],2.6),g(9.7,9.3,2.2),g(14.3,9.3,2.2),F(9.7,16,3),F(14.3,16,3))},{key:"security",label:"Security / bag check",group:"facilities",path:"M12 2.5 19.5 5.5v6c0 4.6-3.2 8.4-7.5 10-4.3-1.6-7.5-5.4-7.5-10v-6Z M8.5 12l2.5 2.5 4.5-5",solid:r(i1,u(M([[7.4,12.2],[9,10.6],[10.9,12.5],[15,8.4],[16.6,10],[10.9,15.7]])))},{key:"lockers",label:"Lockers",group:"facilities",path:[f(3.5,2.5,17,19,1.5),"M12 2.5v19 M6 6h3 M15 6h3 M9.5 11.5v2.5 M14.5 11.5v2.5"].join(" "),solid:r(a(3,2,8.4,20,1.4),u(a(5,5,4.4,1.7,.8)),u(a(8.6,10.8,1.5,3.8,.7)),a(12.6,2,8.4,20,1.4),u(a(14.6,5,4.4,1.7,.8)),u(a(13.9,10.8,1.5,3.8,.7)))},{key:"baby-change",label:"Baby change",group:"facilities",path:"M10 6.5l.8-3.3a1.2 1.2 0 0 1 2.4 0l.8 3.3 M8.5 6.5h7 M9.5 6.5l-.9 2.2a3 3 0 0 0-.1.9V19a2.5 2.5 0 0 0 2.5 2.5h2a2.5 2.5 0 0 0 2.5-2.5V9.6a3 3 0 0 0-.1-.9l-.9-2.2 M8.5 12.5h3 M8.5 16h3",solid:r(M([[9.6,6.2],[10.6,1.8],[13.4,1.8],[14.4,6.2]]),a(7.6,5.4,8.8,2.6,1),a(7.8,7.4,8.4,15,2.6),u(a(7.8,11.8,3.4,1.5,0)),u(a(7.8,15.4,3.4,1.5,0)))},{key:"prayer-room",label:"Prayer room",group:"facilities",path:[_(U),"M3 21.5h18"].join(" "),solid:r(k(U),a(2.4,20.2,19.2,2.6,1.3))},{key:"quiet-room",label:"Quiet room",group:"facilities",path:"M4 9h3.5l5-4v14l-5-4H4Z M15.5 9.5l5 5 M20.5 9.5l-5 5",solid:r(M([[2.6,8.4],[7.2,8.4],[13,3.6],[13,20.4],[7.2,15.6],[2.6,15.6]]),l([15.4,9.2],[20.8,14.8],2.8),l([20.8,9.2],[15.4,14.8],2.8))},{key:"wifi",label:"Wi-Fi",group:"facilities",path:[O(12,19,11.5,218,322),O(12,19,7.5,218,322),O(12,19,3.5,218,322),"M12 19h.01"].join(" "),solid:r(b(12,19.2,11,218,322,2.8),b(12,19.2,6.9,218,322,2.8),g(12,19.2,2.2))},{key:"vip-lounge",label:"VIP lounge",group:"facilities",path:["M6.5 11V7a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v4","M3.5 11.5a1.5 1.5 0 0 1 3 0V14h11v-2.5a1.5 1.5 0 0 1 3 0v6h-17Z","M5.5 17.5V20 M18.5 17.5V20"].join(" "),solid:r(a(6,4,12,8.5,2.2),a(2.4,9.6,4.6,9,2.2),a(17,9.6,4.6,9,2.2),a(6,13.2,12,5.4,.6),l([5,18],[5,20.6],2.4),l([19,18],[19,20.6],2.4))},{key:"accessible-entrance",label:"Accessible entrance",group:"accessibility",path:[_(P(L,.3,5,.62)),"M12.5 3.5H20a1 1 0 0 1 1 1v15a1 1 0 0 1-1 1h-7.5"].join(" "),solid:r(k(P(L,.3,5,.62),2.2),h([[13,2.8],[21.2,2.8],[21.2,21.2],[13,21.2]],2.6))},{key:"assistance-dog",label:"Assistance-dog area",group:"accessibility",path:[A(a1)+"Z","M6 10.8 3.5 7.5","M10.5 10.5V6h4.5l1 2.5"].join(" "),solid:r(M(r1),l([6.2,11],[3.2,7.2],2.4),h([[10.5,11],[10.5,5.6],[15.2,5.6],[16.2,8.2]],2.2))}],s1=new Map(V.map(e=>[e.key,e]));function m1(e){return e?s1.get(e):void 0}var f1=24,v1=2,E1={facilities:"Facilities","food-drink":"Food & drink",navigation:"Getting around",accessibility:"Accessibility"},L1=["facilities","food-drink","navigation","accessibility"],x=V,P1="#8b93a7",k1={wall:"M3 5h18v14H3V5Z M3 9.7h18 M3 14.3h18 M9 5v4.7 M15 5v4.7 M6 9.7v4.6 M12 9.7v4.6 M18 9.7v4.6 M9 14.3v4.7 M15 14.3v4.7",rail:"M3 7h18 M4 17h16 M6 7v10 M10 7v10 M14 7v10 M18 7v10",suite:"M3 4h18v16H3V4Z M6 17v-5h12v5 M8 12V9h8v3",obstruction:"M8 3h8l-1 4v10l1 4H8l1-4V7L8 3Z M9 7h6 M9 17h6"},J=new Map(x.map(e=>[e.key,e]));function l1(e){return e?J.get(e):void 0}function S1(e){return l1(e)?.path}function y1(e){return typeof e=="string"&&J.has(e)}var _1=x.map(e=>e.key);var A1=["butt","round","square"],V1=["miter","round","bevel"],N1=["none","arrow"],c1="round",p1="round",Y="none";function u1(e){return e==="line"||e==="polyline"}function R1(e){return e==="polygon"||u1(e)}function C1(e){return{lineCap:e.lineCap??c1,lineJoin:e.lineJoin??p1,startEnding:e.startEnding??Y,endEnding:e.endEnding??Y}}function $1(e){return{pointerLength:Math.min(48,Math.max(8,e*3)),pointerWidth:Math.min(40,Math.max(8,e*2.25))}}export{I as a,q as b,Q as c,K as d,X as e,m1 as f,f1 as g,v1 as h,E1 as i,L1 as j,x as k,P1 as l,k1 as m,l1 as n,S1 as o,y1 as p,_1 as q,A1 as r,V1 as s,N1 as t,c1 as u,p1 as v,Y as w,u1 as x,R1 as y,C1 as z,$1 as A};
1
+ import{q as N}from"./chunk-EE2CVYFJ.js";var I=["#e69f00","#56b4e9","#009e73","#f0e442","#0072b2","#d55e00","#cc79a7"],R="#a4508b";var q={facilities:R,"food-drink":I[5],navigation:I[2],accessibility:I[4]},Q=N,K={minDiameterPx:12,glyphScale:.66,ringRatio:1/14,largeFromPx:24};function X(e,n){return n>=K.largeFromPx&&e.solidLarge?e.solidLarge:e.solid}var p=e=>{let n=Math.round(e*100)/100;return Object.is(n,-0)?"0":String(n)},y=e=>`${p(e[0])} ${p(e[1])}`,S=(e,n,o,t)=>[e+o*Math.cos(t*Math.PI/180),n+o*Math.sin(t*Math.PI/180)];function W(e){let n=`M${y(e.from)}`;for(let o of e.segs)n+=o.arc?`A${p(o.arc.r)} ${p(o.arc.r)} 0 ${o.arc.large} ${o.arc.sweep} ${y(o.to)}`:`L${y(o.to)}`;return`${n}Z`}function u(e){let n=[e.from,...e.segs.map(t=>t.to)],o=[];for(let t=e.segs.length-1;t>=0;t--){let i=e.segs[t].arc;o.push({to:n[t],arc:i&&{...i,sweep:i.sweep?0:1}})}return{from:n[n.length-1],segs:o}}function g(e,n,o){let t={r:o,large:0,sweep:1};return{from:[e-o,n],segs:[{to:[e+o,n],arc:t},{to:[e-o,n],arc:t}]}}function a(e,n,o,t,i){let s=Math.min(i,o/2,t/2),c={r:s,large:0,sweep:1};return s<=0?M([[e,n],[e+o,n],[e+o,n+t],[e,n+t]]):{from:[e+s,n],segs:[{to:[e+o-s,n]},{to:[e+o,n+s],arc:c},{to:[e+o,n+t-s]},{to:[e+o-s,n+t],arc:c},{to:[e+s,n+t]},{to:[e,n+t-s],arc:c},{to:[e,n+s]},{to:[e+s,n],arc:c}]}}function M(e){let n=0;for(let t=0;t<e.length;t++){let[i,s]=e[t],[c,m]=e[(t+1)%e.length];n+=i*m-c*s}let o=n>0?e:[...e].reverse();return{from:o[0],segs:[...o.slice(1).map(t=>({to:t})),{to:o[0]}]}}function l(e,n,o){let t=o/2,i=n[0]-e[0],s=n[1]-e[1],c=Math.hypot(i,s);if(c<1e-6)return g(e[0],e[1],t);let m=[s/c*t,-i/c*t],v={r:t,large:0,sweep:1},E=[e[0]+m[0],e[1]+m[1]];return{from:E,segs:[{to:[n[0]+m[0],n[1]+m[1]]},{to:[n[0]-m[0],n[1]-m[1]],arc:v},{to:[e[0]-m[0],e[1]-m[1]]},{to:E,arc:v}]}}function h(e,n,o=!1){let t=[],i=o?e.length:e.length-1;for(let s=0;s<i;s++)t.push(l(e[s],e[(s+1)%e.length],n));return t}function b(e,n,o,t,i,s){let c=s/2,m=i-t>180?1:0,v={r:c,large:0,sweep:1},E=S(e,n,o+c,t);return{from:E,segs:[{to:S(e,n,o+c,i),arc:{r:o+c,large:m,sweep:1}},{to:S(e,n,o-c,i),arc:v},{to:S(e,n,o-c,t),arc:{r:o-c,large:m,sweep:0}},{to:E,arc:v}]}}var r=(...e)=>e.flat().map(W).join(" "),d=(e,n,o)=>`M${p(e-o)} ${p(n)}a${p(o)} ${p(o)} 0 1 0 ${p(2*o)} 0a${p(o)} ${p(o)} 0 1 0 ${p(-2*o)} 0`,f=(e,n,o,t,i)=>W(a(e,n,o,t,i)),A=e=>`M${e.map(y).join("L")}`,O=(e,n,o,t,i)=>`M${y(S(e,n,o,t))}A${p(o)} ${p(o)} 0 ${i-t>180?1:0} 1 ${y(S(e,n,o,i))}`;function P(e,n,o,t=1){let i=s=>[s[0]*t+n,s[1]*t+o];return{head:[e.head[0]*t+n,e.head[1]*t+o,e.head[2]*t],limbs:e.limbs.map(s=>s.map(i)),arcs:e.arcs?.map(([s,c,m,v,E])=>[s*t+n,c*t+o,m*t,v,E])}}function _(e){return[d(e.head[0],e.head[1],e.head[2]),...e.limbs.map(A),...(e.arcs??[]).map(([n,o,t,i,s])=>O(n,o,t,i,s))].join(" ")}function k(e,n=2.6){return[g(e.head[0],e.head[1],e.head[2]+1),...e.limbs.flatMap(o=>h(o,n)),...(e.arcs??[]).map(([o,t,i,s,c])=>b(o,t,i,s,c,n-.2))]}var L={head:[10,4,2],limbs:[[[10,8.2],[10,14],[15.5,14],[18,19.5],[20.5,19.5]],[[10,10.6],[14.5,10.6]]],arcs:[[9.5,16,5.5,35,235]]},C={head:[10.6,3.9,1.9],limbs:[[[9.6,7.8],[7.6,12]],[[5.4,8.2],[9.4,8.4],[12.8,10]],[[4,15.6],[7.6,12],[11,13.6],[10.6,16.4]]]},$={cx:12,hr:1.9,arm:5,leg:3,r:2},G={cx:12,hr:1.9,sh:2.2,hem:6,leg:3},j={cx:6.2,hr:1.8,arm:3.6,leg:2.2,r:1.4},H={cx:17.8,hr:1.8,sh:1.4,hem:4.1,leg:2.2};function D({cx:e,hr:n,arm:o,leg:t,r:i}){return[d(e,2+n,n),`M${p(e-o+i)} 8.5H${p(e+o-i)}a${i} ${i} 0 0 1 ${i} ${i}V15H${p(e+t)}V22H${p(e-t)}V15H${p(e-o)}V${p(8.5+i)}a${i} ${i} 0 0 1 ${i} ${-i}Z`,`M${p(e)} 15V22`].join(" ")}function Z({cx:e,hr:n,arm:o,leg:t,r:i}){return[g(e,2+n,n+1),a(e-o-.5,7.8,2*o+1,7.7,i+.5),a(e-t-.5,13,t,9.5,1),a(e+.5,13,t,9.5,1)]}function T({cx:e,hr:n,sh:o,hem:t,leg:i}){return[d(e,2+n,n),A([[e-o,8.5],[e+o,8.5],[e+t,16],[e+i,16],[e+i,22],[e-i,22],[e-i,16],[e-t,16]])+"Z",`M${p(e)} 16V22`].join(" ")}function w({cx:e,hr:n,sh:o,hem:t,leg:i}){return[g(e,2+n,n+1),M([[e-o-.6,7.8],[e+o+.6,7.8],[e+t+.9,16.8],[e-t-.9,16.8]]),a(e-i-.1,15,i-.4,7.5,.9),a(e+.5,15,i-.4,7.5,.9)]}var z=[[14.6,1.5],[5.2,13.6],[11,13.6],[9.4,22.5],[18.8,10.4],[13,10.4]],e1="M8.5 3.5 4 5.5l-1.5 5 3 1 1-2v11h11v-11l1 2 3-1-1.5-5-4.5-2c-.5 1.5-1.8 2.5-3.5 2.5s-3-1-3.5-2.5Z",o1="M12 2.5S5 9.5 5 14.5a7 7 0 0 0 14 0c0-5-7-12-7-12Z",n1="M2.5 21.5h19V3h-6v6.2H9.2v6.2H2.5Z",B=[[9,3],[15,3],[15,9],[21,9],[21,15],[15,15],[15,21],[9,21],[9,15],[3,15],[3,9],[9,9]],t1={from:[3.8,5.2],segs:[{to:[20.2,5.2]},{to:[22,7],arc:{r:1.8,large:0,sweep:1}},{to:[22,9.7]},{to:[22,14.3],arc:{r:2.3,large:0,sweep:0}},{to:[22,17]},{to:[20.2,18.8],arc:{r:1.8,large:0,sweep:1}},{to:[3.8,18.8]},{to:[2,17],arc:{r:1.8,large:0,sweep:1}},{to:[2,14.3]},{to:[2,9.7],arc:{r:2.3,large:0,sweep:0}},{to:[2,7]},{to:[3.8,5.2],arc:{r:1.8,large:0,sweep:1}}]},i1={from:[12,1.6],segs:[{to:[20.4,4.9]},{to:[20.4,11.2]},{to:[12,22.4],arc:{r:13,large:0,sweep:1}},{to:[3.6,11.2],arc:{r:13,large:0,sweep:1}},{to:[3.6,4.9]},{to:[12,1.6]}]};function F(e,n,o){return{from:[e-o,n],segs:[{to:[e+o,n],arc:{r:o,large:0,sweep:1}},{to:[e-o,n]}]}}var U={head:[13.2,4.3,2.2],limbs:[[[12.6,8.6],[11.2,15],[17.8,18.4],[9.4,18.4]],[[12.4,9.8],[16,14.4]]]},a1=[[6,10.5],[15,10.5],[16.5,7],[18.5,5.5],[20,6.5],[21.5,8.5],[19.5,10],[18,12],[18,19],[16.5,19],[15.5,14],[9.5,14],[8.5,19],[7,19],[6.5,13]],r1=[[5.4,9.8],[14.6,9.8],[16.1,6.4],[18.4,4.6],[20.5,5.9],[22.4,8.6],[19.9,10.6],[18.8,12.3],[18.8,19.8],[15.8,19.8],[15,14.8],[10.1,14.8],[9.2,19.8],[6.2,19.8],[5.6,13.2]],V=[{key:"restroom-men",label:"Men's restroom",group:"facilities",path:D($),solid:r(Z($))},{key:"restroom-women",label:"Women's restroom",group:"facilities",path:T(G),solid:r(w(G))},{key:"restroom-accessible",label:"Accessible restroom",group:"facilities",path:[f(2.5,2.5,19,19,3.5),_(P(L,4.6,4.3,.66))].join(" "),solid:r(k(L)),solidLarge:r(a(1.5,1.5,21,21,4.5),u(a(3.9,3.9,16.2,16.2,2.6)),k(P(L,4.9,4.7,.62),2.2))},{key:"first-aid",label:"First aid",group:"facilities",path:A(B)+"Z",solid:r(M(B.map(([e,n])=>[e+(e-12)*.08,n+(n-12)*.08])))},{key:"coat-check",label:"Coat check",group:"facilities",path:"M10 6.5a2 2 0 1 1 2 2V10 M12 10 3.4 16.9a1.4 1.4 0 0 0 .9 2.6h15.4a1.4 1.4 0 0 0 .9-2.6Z",solid:r(b(12,6.2,2.2,180,450,2.3),l([12,8.4],[12,10.5],2.3),h([[12,10.2],[3.2,18.8],[20.8,18.8]],2.8,!0))},{key:"atm",label:"ATM / cash",group:"facilities",path:[f(2,6,20,12,2),d(12,12,2.75),"M6 12h.01 M18 12h.01"].join(" "),solid:r(a(1.5,5.5,21,13,2.4),u(g(12,12,3.2)))},{key:"info",label:"Info point",group:"facilities",path:[d(12,12,9.5),"M10.8 11H12v5.8 M12 7.6h.01"].join(" "),solid:r(g(12,4.9,2.4),a(10.3,9.2,3.4,12.3,1),a(8.2,9.2,4,3,1),a(8.2,18.5,7.6,3,1))},{key:"lost-found",label:"Lost & found",group:"facilities",path:[d(10.5,10.5,7.5),"M16 16l5.5 5.5","M8.4 8.4a2.1 2.1 0 1 1 3 1.9c-.6.4-.9.8-.9 1.6 M10.5 14.6h.01"].join(" "),solid:r(b(12,7.6,4.2,180,405,3.4),h([[14.97,10.57],[12,13],[12,15]],3.4),g(12,20,2.1))},{key:"restrooms",label:"Toilets",group:"facilities",path:[D(j),T(H)].join(" "),solid:r(Z(j),w(H))},{key:"charging",label:"Charging point",group:"facilities",path:[f(6,2,12,20,2.5),"M13.2 6.2 9.6 12h4.8l-3.6 5.8"].join(" "),solid:r(M(z))},{key:"smoking",label:"Smoking area",group:"facilities",path:[f(2,14.5,14.5,4,1),"M6.5 14.5v4","M15.5 11.5c0-1.4 1.5-1.9 1.5-3.4s-1.5-2-1.5-3.4 M19 11.5c0-1.4 1.5-1.9 1.5-3.4s-1.5-2-1.5-3.4"].join(" "),solid:r(a(1.5,14,4.2,5,1.2),a(6.8,14,10.4,5,1.2),h([[15.9,11.4],[17.3,8.9],[15.9,6.4],[17.1,3.9]],2.2),h([[19.6,11.4],[21,8.9],[19.6,6.4],[20.8,3.9]],2.2))},{key:"no-smoking",label:"No smoking",group:"facilities",path:[d(12,12,9.5),"M5.3 5.3l13.4 13.4","M5.5 10.5h13v3h-13Z"].join(" "),solid:r(g(12,12,10.6),u(g(12,12,8)),l([6,6],[18,18],2.8),a(5,10.4,3,3.2,.6),a(16,10.4,3,3.2,.6))},{key:"food",label:"Food",group:"food-drink",path:"M5 2.5V8a2.5 2.5 0 0 0 5 0V2.5 M7.5 2.5v19 M18.5 13.5h-2c-1.3 0-2-1-2-2.5 0-4 1.5-7 4-8.5v19",solid:r(h([[4.9,2.6],[4.9,8]],2.2),h([[10.1,2.6],[10.1,8]],2.2),h([[7.5,2.6],[7.5,8]],2.2),b(7.5,8,2.6,0,180,2.2),l([7.5,10],[7.5,21.4],3),M([[19.4,2.2],[19.4,14.2],[16.2,14.2],[14.1,12],[14.1,9.4],[15.2,5.8],[17.3,3.3]]),l([18,13],[18,21.4],3))},{key:"bar",label:"Bar",group:"food-drink",path:"M3.5 3.5h17L12 13Z M6.2 6.5h11.6 M12 13v7.5 M8 20.5h8",solid:r(M([[2.8,3],[21.2,3],[12,13.6]]),l([12,12],[12,20.6],2.8),l([7.4,21],[16.6,21],2.8))},{key:"coffee",label:"Caf\xE9 / coffee",group:"food-drink",path:"M4 9h12v4.5a5.5 5.5 0 0 1-5.5 5.5h-1A5.5 5.5 0 0 1 4 13.5Z M16 10.5h1.2a2.75 2.75 0 0 1 0 5.5H16 M8 3v3 M12 3v3 M3 21.5h14",solid:r({from:[3.4,8.4],segs:[{to:[16.6,8.4]},{to:[16.6,13.4]},{to:[11,19.4],arc:{r:5.8,large:0,sweep:1}},{to:[9,19.4]},{to:[3.4,13.4],arc:{r:5.8,large:0,sweep:1}},{to:[3.4,8.4]}]},b(17.2,13.25,2.5,270,450,2.4),l([7.8,2.6],[7.8,5.6],2.4),l([12.2,2.6],[12.2,5.6],2.4),l([2.6,21.6],[17.4,21.6],2.6))},{key:"water",label:"Water / drinks",group:"food-drink",path:o1,solid:"M12 1.2S4 8.9 4 14.5a8 8 0 0 0 16 0c0-5.6-8-13.3-8-13.3Z"},{key:"merch",label:"Merch / shop",group:"food-drink",path:e1,solid:"M8.4 2.8 3.5 5l-1.9 6 4.2 1.4.4-.8v9.4h11.6v-9.4l.4.8 4.2-1.4-1.9-6-4.9-2.2c-.4 1.5-1.8 2.6-3.6 2.6s-3.2-1.1-3.6-2.6Z"},{key:"screen",label:"Screen",group:"facilities",path:[f(2,3.5,20,13.5,2),"M12 17v3.5 M8 20.5h8","M10 7.8v5.9l5-2.95Z"].join(" "),solid:r(a(1.5,3,21,14.4,2.4),u(M([[9.6,6.7],[16,10.2],[9.6,13.7]])),a(10.6,16.5,2.8,4,0),l([7.4,21],[16.6,21],2.8))},{key:"sound-booth",label:"Sound booth",group:"facilities",path:["M6 3v9 M6 16v5 M12 3v3 M12 10v11 M18 3v10 M18 17v4",d(6,14,2),d(12,8,2),d(18,15,2)].join(" "),solid:r(l([6,2.8],[6,21.2],1.8),l([12,2.8],[12,21.2],1.8),l([18,2.8],[18,21.2],1.8),a(3.2,11.6,5.6,4.8,1.4),a(9.2,5.6,5.6,4.8,1.4),a(15.2,12.6,5.6,4.8,1.4))},{key:"entrance",label:"Entrance",group:"navigation",path:"M11 7V3.5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v17a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1V17 M2.5 12h13.5 M12.5 8.5 16 12l-3.5 3.5",solid:r(h([[11,6.5],[11,2.6],[21,2.6],[21,21.4],[11,21.4],[11,17.5]],2.6),l([2.8,12],[13.5,12],3.2),M([[12.6,7.8],[18,12],[12.6,16.2]]))},{key:"exit",label:"Exit",group:"navigation",path:"M13 7V3.5a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v17a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V17 M8 12h13.5 M18 8.5l3.5 3.5-3.5 3.5",solid:r(h([[13,6.5],[13,2.6],[3,2.6],[3,21.4],[13,21.4],[13,17.5]],2.6),l([7.2,12],[17,12],3.2),M([[16.2,7.8],[21.6,12],[16.2,16.2]]))},{key:"emergency-exit",label:"Emergency exit",group:"navigation",path:[_(P(C,-2,1.4,1.15)),"M15.5 13h6 M19 10.5l2.5 2.5-2.5 2.5"].join(" "),solid:r(k(P(C,-2,1.4,1.15),2.7),l([15.6,13],[19.5,13],2.8),M([[18.4,9.4],[22.4,13],[18.4,16.6]]))},{key:"stairs",label:"Stairs",group:"navigation",path:n1,solid:"M1.5 22.5h21V2h-7.8v6.4H8.4v6.4H1.5Z"},{key:"elevator",label:"Elevator",group:"navigation",path:[f(3.5,2.5,17,19,2.5),"M8.5 9.5 12 5.5l3.5 4Z M8.5 14.5l3.5 4 3.5-4Z"].join(" "),solid:r(M([[12,1.6],[19.6,10.2],[4.4,10.2]]),M([[4.4,13.8],[19.6,13.8],[12,22.4]]))},{key:"parking",label:"Parking",group:"navigation",path:[f(3,3,18,18,3),"M9.5 17V7h3.75a3 3 0 0 1 0 6H9.5"].join(" "),solid:"M6.5 21V3H12a5.5 5.5 0 0 1 0 11h-1.9v7Z M10.1 6.6v3.8H12a1.9 1.9 0 0 0 0-3.8Z"},{key:"wheelchair",label:"Wheelchair access",group:"accessibility",path:_(L),solid:r(k(L))},{key:"hearing",label:"Hearing assistance",group:"accessibility",path:["M4 9a6 6 0 1 1 12 0c0 3-1.8 4.3-3 5.2-1.1.8-1.6 1.7-1.6 3.1a3.6 3.6 0 0 1-6.2 2.1","M7.5 9a2.5 2.5 0 0 1 5 0c0 1.2-.7 1.9-1.6 2.5","M18.5 5.5a6.5 6.5 0 0 1 0 8"].join(" "),solid:r(b(10,9,6,180,380,3),h([[15.64,11.05],[12.8,14.3],[11.5,17.2]],3),b(8.2,17.2,3.3,0,150,3),b(10,9,2.2,180,400,2.4),b(13.38,9.5,6.5,322,398,2.6))},{key:"box-office",label:"Box office / tickets",group:"navigation",path:"M3 7.5A1.5 1.5 0 0 1 4.5 6h15A1.5 1.5 0 0 1 21 7.5V10a2 2 0 0 0 0 4v2.5a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 16.5V14a2 2 0 0 0 0-4Z M15 6v2 M15 11v2 M15 16v2",solid:r(t1,u(a(14.1,7,1.8,2.2,.9)),u(a(14.1,10.9,1.8,2.2,.9)),u(a(14.1,14.8,1.8,2.2,.9)))},{key:"escalator",label:"Escalator",group:"navigation",path:"M2.5 17H7l9-9h5.5v4h-4l-9 9h-6Z M11 4.5h.01 M11 8.2v3.3",solid:r(M([[2,16.4],[6.8,16.4],[15.8,7.4],[22,7.4],[22,12.6],[17.8,12.6],[8.8,21.6],[2,21.6]]),g(11,4.3,2.3),l([11,8],[11,11],2.6))},{key:"ramp",label:"Ramp",group:"navigation",path:"M2.5 19.5h19v-10Z M4.5 13.2 14 8.2 M10.53 7.76 14 8.2l-1.6 3.11",solid:r(M([[1.6,20.4],[22.4,20.4],[22.4,8.6]]),l([4.2,13.4],[13.2,8.6],2.6),M([[15.4,7.5],[13.16,11.84],[10.56,6.88]]))},{key:"taxi",label:"Taxi / rideshare",group:"navigation",path:["M9.5 2.5h5V5h-5Z M6.5 11 8 7h8l1.5 4",f(3.5,11,17,6,2),"M6.5 17v2.5 M17.5 17v2.5 M7 14h.01 M17 14h.01"].join(" "),solid:r(a(9,1.8,6,3.4,.8),M([[6,11.4],[7.6,6.4],[16.4,6.4],[18,11.4]]),a(2.8,10.6,18.4,7,2.2),u(g(6.8,14,1.3)),u(g(17.2,14,1.3)),a(4.8,16,3.6,5.2,1.2),a(15.6,16,3.6,5.2,1.2))},{key:"transit",label:"Bus / transit",group:"navigation",path:[f(4.5,2.5,15,16,3),"M4.5 10.5h15 M9 5.5h6 M7.5 18.5V21 M16.5 18.5V21 M8 14.5h.01 M16 14.5h.01"].join(" "),solid:r(a(4,2,16,17,3.2),u(a(6.2,5.8,11.6,5,1)),u(g(8,14.5,1.3)),u(g(16,14.5,1.3)),a(6,17,3.4,5,1.2),a(14.6,17,3.4,5,1.2))},{key:"bike-parking",label:"Bike parking",group:"navigation",path:[d(6,14.5,4),d(18,14.5,4),"M6 14.5 9 7.5h6.5L18 14.5 M9 7.5l2.5 7H6 M11.5 14.5l4-7 M7.5 6h3 M15.5 7.5 15 5.5h2"].join(" "),solid:r(g(6,14.5,4.9),u(g(6,14.5,2.7)),g(18,14.5,4.9),u(g(18,14.5,2.7)),h([[6,14.5],[9,7.5],[15.5,7.5],[18,14.5]],2.2),h([[9,7.5],[11.5,14.5],[15.5,7.5]],2.2),l([6,14.5],[11.5,14.5],2.2),l([7.2,5.8],[10.6,5.8],2.2),h([[15.4,7.3],[15,5.4],[17.2,5.4]],2.2))},{key:"meeting-point",label:"Meeting point",group:"navigation",path:["M9.5 2.5 12 5l2.5-2.5 M9.5 21.5 12 19l2.5 2.5 M2.5 9.5 5 12l-2.5 2.5 M21.5 9.5 19 12l2.5 2.5",d(10,9.6,1.5),d(14,9.6,1.5),"M7.5 15.5a2.5 2.5 0 0 1 5 0 M11.5 15.5a2.5 2.5 0 0 1 5 0"].join(" "),solid:r(h([[9.4,2.4],[12,5],[14.6,2.4]],2.6),h([[9.4,21.6],[12,19],[14.6,21.6]],2.6),h([[2.4,9.4],[5,12],[2.4,14.6]],2.6),h([[21.6,9.4],[19,12],[21.6,14.6]],2.6),g(9.7,9.3,2.2),g(14.3,9.3,2.2),F(9.7,16,3),F(14.3,16,3))},{key:"security",label:"Security / bag check",group:"facilities",path:"M12 2.5 19.5 5.5v6c0 4.6-3.2 8.4-7.5 10-4.3-1.6-7.5-5.4-7.5-10v-6Z M8.5 12l2.5 2.5 4.5-5",solid:r(i1,u(M([[7.4,12.2],[9,10.6],[10.9,12.5],[15,8.4],[16.6,10],[10.9,15.7]])))},{key:"lockers",label:"Lockers",group:"facilities",path:[f(3.5,2.5,17,19,1.5),"M12 2.5v19 M6 6h3 M15 6h3 M9.5 11.5v2.5 M14.5 11.5v2.5"].join(" "),solid:r(a(3,2,8.4,20,1.4),u(a(5,5,4.4,1.7,.8)),u(a(8.6,10.8,1.5,3.8,.7)),a(12.6,2,8.4,20,1.4),u(a(14.6,5,4.4,1.7,.8)),u(a(13.9,10.8,1.5,3.8,.7)))},{key:"baby-change",label:"Baby change",group:"facilities",path:"M10 6.5l.8-3.3a1.2 1.2 0 0 1 2.4 0l.8 3.3 M8.5 6.5h7 M9.5 6.5l-.9 2.2a3 3 0 0 0-.1.9V19a2.5 2.5 0 0 0 2.5 2.5h2a2.5 2.5 0 0 0 2.5-2.5V9.6a3 3 0 0 0-.1-.9l-.9-2.2 M8.5 12.5h3 M8.5 16h3",solid:r(M([[9.6,6.2],[10.6,1.8],[13.4,1.8],[14.4,6.2]]),a(7.6,5.4,8.8,2.6,1),a(7.8,7.4,8.4,15,2.6),u(a(7.8,11.8,3.4,1.5,0)),u(a(7.8,15.4,3.4,1.5,0)))},{key:"prayer-room",label:"Prayer room",group:"facilities",path:[_(U),"M3 21.5h18"].join(" "),solid:r(k(U),a(2.4,20.2,19.2,2.6,1.3))},{key:"quiet-room",label:"Quiet room",group:"facilities",path:"M4 9h3.5l5-4v14l-5-4H4Z M15.5 9.5l5 5 M20.5 9.5l-5 5",solid:r(M([[2.6,8.4],[7.2,8.4],[13,3.6],[13,20.4],[7.2,15.6],[2.6,15.6]]),l([15.4,9.2],[20.8,14.8],2.8),l([20.8,9.2],[15.4,14.8],2.8))},{key:"wifi",label:"Wi-Fi",group:"facilities",path:[O(12,19,11.5,218,322),O(12,19,7.5,218,322),O(12,19,3.5,218,322),"M12 19h.01"].join(" "),solid:r(b(12,19.2,11,218,322,2.8),b(12,19.2,6.9,218,322,2.8),g(12,19.2,2.2))},{key:"vip-lounge",label:"VIP lounge",group:"facilities",path:["M6.5 11V7a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v4","M3.5 11.5a1.5 1.5 0 0 1 3 0V14h11v-2.5a1.5 1.5 0 0 1 3 0v6h-17Z","M5.5 17.5V20 M18.5 17.5V20"].join(" "),solid:r(a(6,4,12,8.5,2.2),a(2.4,9.6,4.6,9,2.2),a(17,9.6,4.6,9,2.2),a(6,13.2,12,5.4,.6),l([5,18],[5,20.6],2.4),l([19,18],[19,20.6],2.4))},{key:"accessible-entrance",label:"Accessible entrance",group:"accessibility",path:[_(P(L,.3,5,.62)),"M12.5 3.5H20a1 1 0 0 1 1 1v15a1 1 0 0 1-1 1h-7.5"].join(" "),solid:r(k(P(L,.3,5,.62),2.2),h([[13,2.8],[21.2,2.8],[21.2,21.2],[13,21.2]],2.6))},{key:"assistance-dog",label:"Assistance-dog area",group:"accessibility",path:[A(a1)+"Z","M6 10.8 3.5 7.5","M10.5 10.5V6h4.5l1 2.5"].join(" "),solid:r(M(r1),l([6.2,11],[3.2,7.2],2.4),h([[10.5,11],[10.5,5.6],[15.2,5.6],[16.2,8.2]],2.2))}],s1=new Map(V.map(e=>[e.key,e]));function m1(e){return e?s1.get(e):void 0}var f1=24,v1=2,E1={facilities:"Facilities","food-drink":"Food & drink",navigation:"Getting around",accessibility:"Accessibility"},L1=["facilities","food-drink","navigation","accessibility"],x=V,P1="#8b93a7",k1={wall:"M3 5h18v14H3V5Z M3 9.7h18 M3 14.3h18 M9 5v4.7 M15 5v4.7 M6 9.7v4.6 M12 9.7v4.6 M18 9.7v4.6 M9 14.3v4.7 M15 14.3v4.7",rail:"M3 7h18 M4 17h16 M6 7v10 M10 7v10 M14 7v10 M18 7v10",suite:"M3 4h18v16H3V4Z M6 17v-5h12v5 M8 12V9h8v3",obstruction:"M8 3h8l-1 4v10l1 4H8l1-4V7L8 3Z M9 7h6 M9 17h6"},J=new Map(x.map(e=>[e.key,e]));function l1(e){return e?J.get(e):void 0}function S1(e){return l1(e)?.path}function y1(e){return typeof e=="string"&&J.has(e)}var _1=x.map(e=>e.key);var A1=["butt","round","square"],V1=["miter","round","bevel"],N1=["none","arrow"],c1="round",p1="round",Y="none";function u1(e){return e==="line"||e==="polyline"}function R1(e){return e==="polygon"||u1(e)}function C1(e){return{lineCap:e.lineCap??c1,lineJoin:e.lineJoin??p1,startEnding:e.startEnding??Y,endEnding:e.endEnding??Y}}function $1(e){return{pointerLength:Math.min(48,Math.max(8,e*3)),pointerWidth:Math.min(40,Math.max(8,e*2.25))}}export{I as a,q as b,Q as c,K as d,X as e,m1 as f,f1 as g,v1 as h,E1 as i,L1 as j,x as k,P1 as l,k1 as m,l1 as n,S1 as o,y1 as p,_1 as q,A1 as r,V1 as s,N1 as t,c1 as u,p1 as v,Y as w,u1 as x,R1 as y,C1 as z,$1 as A};
@@ -1 +1 @@
1
- import{k as c,l as u}from"./chunk-UEDS3HJ3.js";import{Pa as h,Ta as b,ab as s}from"./chunk-3W4ZMU4G.js";var l=class extends Error{constructor(n,t,r={}){super(t);this.code=n;this.details=r;this.name="ChartOperationError"}};function P(e,o){let n=s(e),t=o?n.find(r=>r.id===o):n[0];if(!t)throw new l("floor_not_found",`Unknown chart floor: ${o}`,{floorId:o});return{floorId:t.id,objects:t.objects}}function D(e,o){if(!e.categories.some(n=>n.key===o))throw new l("category_not_found",`Unknown chart category: ${o}. Call get_chart to list valid category keys.`,{categoryKey:o})}function y(e,o,n,t){let r=new Set([...t,...e.categories.map(i=>i.key),...e.zones?.map(i=>i.id)??[],...e.floors?.map(i=>i.id)??[],...e.floors?.length?e.floors.flatMap(i=>i.objects.map(a=>a.id)):e.objects.map(i=>i.id)]);for(let i=0;i<100;i++){let a=n(o);if(a&&!r.has(a))return t.add(a),a}throw new l("id_generation_failed",`Unable to allocate a unique ${o} id`)}function L(e){let o=e.slice().sort((i,a)=>i.x-a.x||i.y-a.y);if(o.length<3)return o;let n=(i,a,f)=>(a.x-i.x)*(f.y-i.y)-(a.y-i.y)*(f.x-i.x),t=[];for(let i of o){for(;t.length>=2&&n(t[t.length-2],t[t.length-1],i)<=0;)t.pop();t.push(i)}let r=[];for(let i=o.length-1;i>=0;i--){let a=o[i];for(;r.length>=2&&n(r[r.length-2],r[r.length-1],a)<=0;)r.pop();r.push(a)}return t.pop(),r.pop(),t.concat(r)}function C(e,o){if(!e.length)return e;let n={x:e.reduce((t,r)=>t+r.x,0)/e.length,y:e.reduce((t,r)=>t+r.y,0)/e.length};return e.map(t=>{let r=t.x-n.x,i=t.y-n.y,a=Math.hypot(r,i)||1;return{x:t.x+r/a*o,y:t.y+i/a*o}})}function O(e){let o=[];for(let t of e)t.type==="row"?o.push(...h(t).map(r=>({x:r.x,y:r.y}))):t.type==="table"?o.push(...b(t).map(r=>({x:r.x,y:r.y}))):t.type==="gaArea"?o.push(...t.points):t.type==="booth"&&o.push(t.center);if(o.length<3)return null;let n=C(L(o),22);return n.length>=3?n:null}function z(e,o){let n=P(e,o),t=s(e).find(r=>r.id===n.floorId);return{...e,objects:n.objects,floors:void 0,focalPoint:t.focalPoint,referenceImage:t.referenceImage,backgroundImage:t.backgroundImage}}var p=24,m=80;function v(e,o){let n=e.normalize("NFKC").trim();if(n.length>p)throw new l("invalid_operation",`${o} displayed type must be at most ${p} characters`);return n}function H(e,o){if(e.displayType===void 0)return!1;let n=v(e.displayType,o);return n?(e.displayType=n,!1):(delete e.displayType,!0)}function A(e,o){if(e.displayLabel===void 0)return!1;let n=e.displayLabel.normalize("NFKC").trim();if(n.length>m)throw new l("invalid_operation",`${o} displayed label must be at most ${m} characters`);return n?(e.displayLabel=n,!1):(delete e.displayLabel,!0)}function d(e,o){let n=e.trim().toLowerCase();if(!/^#[0-9a-f]{6}$/.test(n))throw new l("invalid_operation",`${o} must use a six-digit hex color`);return n}function x(e,o){if(!Number.isFinite(e)||e<c||e>u)throw new l("invalid_operation",`${o} label size must be from ${c} to ${u}`)}function $(e,o){e.size!==void 0&&e.size!==null&&x(e.size,o),e.color!==void 0&&e.color!==null&&d(e.color,`${o} label color`)}function k(e,o){if(e?.positionPreset!==void 0&&!["start","end","both","none"].includes(e.positionPreset))throw new l("invalid_operation",`${o} label positionPreset must be one of start, end, both, none`);let n=e?.labelStyle;n&&(n.size!==void 0&&x(n.size,o),n.color!==void 0&&d(n.color,`${o} label color`))}function E(e,o){let n=e?structuredClone(e):{},t=n.labelStyle?{...n.labelStyle}:{};return o.size===null?delete t.size:o.size!==void 0&&(t.size=o.size),o.color===null?delete t.color:o.color!==void 0&&(t.color=d(o.color,"Label color")),t.size===void 0&&t.color===void 0?delete n.labelStyle:n.labelStyle=t,o.visible!==void 0&&(n.visible=o.visible),Object.keys(n).length?n:void 0}function T(e,o,n){let t=o.normalize("NFKC").trim();if(!t||t.length>80)throw new l("invalid_operation","Zone labels must contain 1 to 80 characters");if((e.zones??[]).some(r=>r.id!==n&&r.label.normalize("NFKC").trim().toLocaleLowerCase("en")===t.toLocaleLowerCase("en")))throw new l("invalid_operation",`Zone label already exists: ${t}`);return t}function N(e,o){if(!Number.isFinite(e?.x)||!Number.isFinite(e?.y))throw new l("invalid_operation",`${o} must contain finite x and y values`);return{x:e.x,y:e.y}}function U(e,o,n){return(o.x-e.x)*(n.y-e.y)-(o.y-e.y)*(n.x-e.x)}var B=Math.PI/180,Z=Math.PI/180;function K(e){return e.type==="row"||e.type==="table"?e.seatCount:e.type==="gaArea"?Math.max(0,Math.floor(e.capacity)):e.type==="booth"?1:0}function _(e){if(e.floors?.length){let o=e.floors[0];e.objects=o.objects,e.focalPoint=o.focalPoint,e.referenceImage=o.referenceImage,e.backgroundImage=o.backgroundImage}return e}var S=0,g=120,w=4;function F(e){if(!Number.isFinite(e)||e<S||e>g)throw new l("invalid_operation","Floor base height must be a number from 0 to 120 metres")}function X(e,o){let n=s(e);if(n.length>=5)throw new l("invalid_operation","A chart can contain at most five physical floors");let t=(o.name??String(n.length+1)).normalize("NFKC").trim();if(!t||t.length>80)throw new l("invalid_operation","Floor names must contain 1 to 80 characters");if(n.some(I=>I.name.toLocaleLowerCase("en")===t.toLocaleLowerCase("en")))throw new l("invalid_operation",`Floor name already exists: ${t}`);e.floors?.length||(e.floors=[{id:"floor-0",name:"1",objects:e.objects,baseHeightM:0,focalPoint:e.focalPoint,referenceImage:e.referenceImage,backgroundImage:e.backgroundImage}]);let i=e.floors[e.floors.length-1].baseHeightM??Math.min(g,(e.floors.length-1)*w),a=Math.min(g,i+w),f=y(e,"floor",o.idFactory,new Set);return e.floors.push({id:f,name:t,baseHeightM:a,objects:[],focalPoint:{...e.focalPoint}}),_(e),{changed:!0,floorId:f,floorCount:e.floors.length,baseHeightM:a}}function q(e,o){let n=s(e),t=n.find(a=>a.id===o.floorId);if(!t)throw new l("floor_not_found",`Unknown chart floor: ${o.floorId}`,{floorId:o.floorId});let r=o.name.normalize("NFKC").trim();if(!r||r.length>80)throw new l("invalid_operation","Floor names must contain 1 to 80 characters");if(n.some(a=>a.id!==t.id&&a.name.toLocaleLowerCase("en")===r.toLocaleLowerCase("en")))throw new l("invalid_operation",`Floor name already exists: ${r}`);let i=t.name!==r;return i&&(t.name=r),{changed:i,floorId:t.id,floorName:r}}function V(e,o){if(!e.floors?.length)throw new l("invalid_operation","A single-floor chart has an implicit base height of 0 metres");let n=e.floors.find(r=>r.id===o.floorId);if(!n)throw new l("floor_not_found",`Unknown chart floor: ${o.floorId}`,{floorId:o.floorId});F(o.baseHeightM);let t=n.baseHeightM!==o.baseHeightM;return t&&(n.baseHeightM=o.baseHeightM,n.physical3dProvenance={...n.physical3dProvenance,baseHeightM:{status:"confirmed",source:"user-review",note:"Physical floor height reviewed through the shared Designer/Copilot operation."}}),{changed:t,floorId:n.id,baseHeightM:o.baseHeightM}}function W(e,o){if(!e.floors?.length)throw new l("invalid_operation","A single-floor chart cannot remove its only floor");let n=e.floors.findIndex(r=>r.id===o.floorId);if(n<0)throw new l("floor_not_found",`Unknown chart floor: ${o.floorId}`,{floorId:o.floorId});let[t]=e.floors.splice(n,1);if(e.floors.length===1){let[r]=e.floors;e.objects=r.objects,e.focalPoint=r.focalPoint,e.referenceImage=r.referenceImage,e.backgroundImage=r.backgroundImage,e.floors=void 0}else _(e);return{changed:!0,floorId:t.id,removedObjects:t.objects.length,floorCount:s(e).length}}export{l as a,P as b,D as c,y as d,O as e,z as f,v as g,H as h,A as i,d as j,$ as k,k as l,E as m,T as n,N as o,U as p,B as q,Z as r,K as s,_ as t,g as u,w as v,X as w,q as x,V as y,W as z};
1
+ import{k as c,l as u}from"./chunk-URW7MSCJ.js";import{$a as s,Oa as h,Sa as b}from"./chunk-HKVCBUON.js";var l=class extends Error{constructor(n,t,r={}){super(t);this.code=n;this.details=r;this.name="ChartOperationError"}};function P(e,o){let n=s(e),t=o?n.find(r=>r.id===o):n[0];if(!t)throw new l("floor_not_found",`Unknown chart floor: ${o}`,{floorId:o});return{floorId:t.id,objects:t.objects}}function D(e,o){if(!e.categories.some(n=>n.key===o))throw new l("category_not_found",`Unknown chart category: ${o}. Call get_chart to list valid category keys.`,{categoryKey:o})}function y(e,o,n,t){let r=new Set([...t,...e.categories.map(i=>i.key),...e.zones?.map(i=>i.id)??[],...e.floors?.map(i=>i.id)??[],...e.floors?.length?e.floors.flatMap(i=>i.objects.map(a=>a.id)):e.objects.map(i=>i.id)]);for(let i=0;i<100;i++){let a=n(o);if(a&&!r.has(a))return t.add(a),a}throw new l("id_generation_failed",`Unable to allocate a unique ${o} id`)}function L(e){let o=e.slice().sort((i,a)=>i.x-a.x||i.y-a.y);if(o.length<3)return o;let n=(i,a,f)=>(a.x-i.x)*(f.y-i.y)-(a.y-i.y)*(f.x-i.x),t=[];for(let i of o){for(;t.length>=2&&n(t[t.length-2],t[t.length-1],i)<=0;)t.pop();t.push(i)}let r=[];for(let i=o.length-1;i>=0;i--){let a=o[i];for(;r.length>=2&&n(r[r.length-2],r[r.length-1],a)<=0;)r.pop();r.push(a)}return t.pop(),r.pop(),t.concat(r)}function C(e,o){if(!e.length)return e;let n={x:e.reduce((t,r)=>t+r.x,0)/e.length,y:e.reduce((t,r)=>t+r.y,0)/e.length};return e.map(t=>{let r=t.x-n.x,i=t.y-n.y,a=Math.hypot(r,i)||1;return{x:t.x+r/a*o,y:t.y+i/a*o}})}function O(e){let o=[];for(let t of e)t.type==="row"?o.push(...h(t).map(r=>({x:r.x,y:r.y}))):t.type==="table"?o.push(...b(t).map(r=>({x:r.x,y:r.y}))):t.type==="gaArea"?o.push(...t.points):t.type==="booth"&&o.push(t.center);if(o.length<3)return null;let n=C(L(o),22);return n.length>=3?n:null}function z(e,o){let n=P(e,o),t=s(e).find(r=>r.id===n.floorId);return{...e,objects:n.objects,floors:void 0,focalPoint:t.focalPoint,referenceImage:t.referenceImage,backgroundImage:t.backgroundImage}}var p=24,m=80;function v(e,o){let n=e.normalize("NFKC").trim();if(n.length>p)throw new l("invalid_operation",`${o} displayed type must be at most ${p} characters`);return n}function H(e,o){if(e.displayType===void 0)return!1;let n=v(e.displayType,o);return n?(e.displayType=n,!1):(delete e.displayType,!0)}function A(e,o){if(e.displayLabel===void 0)return!1;let n=e.displayLabel.normalize("NFKC").trim();if(n.length>m)throw new l("invalid_operation",`${o} displayed label must be at most ${m} characters`);return n?(e.displayLabel=n,!1):(delete e.displayLabel,!0)}function d(e,o){let n=e.trim().toLowerCase();if(!/^#[0-9a-f]{6}$/.test(n))throw new l("invalid_operation",`${o} must use a six-digit hex color`);return n}function x(e,o){if(!Number.isFinite(e)||e<c||e>u)throw new l("invalid_operation",`${o} label size must be from ${c} to ${u}`)}function $(e,o){e.size!==void 0&&e.size!==null&&x(e.size,o),e.color!==void 0&&e.color!==null&&d(e.color,`${o} label color`)}function k(e,o){if(e?.positionPreset!==void 0&&!["start","end","both","none"].includes(e.positionPreset))throw new l("invalid_operation",`${o} label positionPreset must be one of start, end, both, none`);let n=e?.labelStyle;n&&(n.size!==void 0&&x(n.size,o),n.color!==void 0&&d(n.color,`${o} label color`))}function E(e,o){let n=e?structuredClone(e):{},t=n.labelStyle?{...n.labelStyle}:{};return o.size===null?delete t.size:o.size!==void 0&&(t.size=o.size),o.color===null?delete t.color:o.color!==void 0&&(t.color=d(o.color,"Label color")),t.size===void 0&&t.color===void 0?delete n.labelStyle:n.labelStyle=t,o.visible!==void 0&&(n.visible=o.visible),Object.keys(n).length?n:void 0}function T(e,o,n){let t=o.normalize("NFKC").trim();if(!t||t.length>80)throw new l("invalid_operation","Zone labels must contain 1 to 80 characters");if((e.zones??[]).some(r=>r.id!==n&&r.label.normalize("NFKC").trim().toLocaleLowerCase("en")===t.toLocaleLowerCase("en")))throw new l("invalid_operation",`Zone label already exists: ${t}`);return t}function N(e,o){if(!Number.isFinite(e?.x)||!Number.isFinite(e?.y))throw new l("invalid_operation",`${o} must contain finite x and y values`);return{x:e.x,y:e.y}}function U(e,o,n){return(o.x-e.x)*(n.y-e.y)-(o.y-e.y)*(n.x-e.x)}var B=Math.PI/180,Z=Math.PI/180;function K(e){return e.type==="row"||e.type==="table"?e.seatCount:e.type==="gaArea"?Math.max(0,Math.floor(e.capacity)):e.type==="booth"?1:0}function _(e){if(e.floors?.length){let o=e.floors[0];e.objects=o.objects,e.focalPoint=o.focalPoint,e.referenceImage=o.referenceImage,e.backgroundImage=o.backgroundImage}return e}var S=0,g=120,w=4;function F(e){if(!Number.isFinite(e)||e<S||e>g)throw new l("invalid_operation","Floor base height must be a number from 0 to 120 metres")}function X(e,o){let n=s(e);if(n.length>=5)throw new l("invalid_operation","A chart can contain at most five physical floors");let t=(o.name??String(n.length+1)).normalize("NFKC").trim();if(!t||t.length>80)throw new l("invalid_operation","Floor names must contain 1 to 80 characters");if(n.some(I=>I.name.toLocaleLowerCase("en")===t.toLocaleLowerCase("en")))throw new l("invalid_operation",`Floor name already exists: ${t}`);e.floors?.length||(e.floors=[{id:"floor-0",name:"1",objects:e.objects,baseHeightM:0,focalPoint:e.focalPoint,referenceImage:e.referenceImage,backgroundImage:e.backgroundImage}]);let i=e.floors[e.floors.length-1].baseHeightM??Math.min(g,(e.floors.length-1)*w),a=Math.min(g,i+w),f=y(e,"floor",o.idFactory,new Set);return e.floors.push({id:f,name:t,baseHeightM:a,objects:[],focalPoint:{...e.focalPoint}}),_(e),{changed:!0,floorId:f,floorCount:e.floors.length,baseHeightM:a}}function q(e,o){let n=s(e),t=n.find(a=>a.id===o.floorId);if(!t)throw new l("floor_not_found",`Unknown chart floor: ${o.floorId}`,{floorId:o.floorId});let r=o.name.normalize("NFKC").trim();if(!r||r.length>80)throw new l("invalid_operation","Floor names must contain 1 to 80 characters");if(n.some(a=>a.id!==t.id&&a.name.toLocaleLowerCase("en")===r.toLocaleLowerCase("en")))throw new l("invalid_operation",`Floor name already exists: ${r}`);let i=t.name!==r;return i&&(t.name=r),{changed:i,floorId:t.id,floorName:r}}function V(e,o){if(!e.floors?.length)throw new l("invalid_operation","A single-floor chart has an implicit base height of 0 metres");let n=e.floors.find(r=>r.id===o.floorId);if(!n)throw new l("floor_not_found",`Unknown chart floor: ${o.floorId}`,{floorId:o.floorId});F(o.baseHeightM);let t=n.baseHeightM!==o.baseHeightM;return t&&(n.baseHeightM=o.baseHeightM,n.physical3dProvenance={...n.physical3dProvenance,baseHeightM:{status:"confirmed",source:"user-review",note:"Physical floor height reviewed through the shared Designer/Copilot operation."}}),{changed:t,floorId:n.id,baseHeightM:o.baseHeightM}}function W(e,o){if(!e.floors?.length)throw new l("invalid_operation","A single-floor chart cannot remove its only floor");let n=e.floors.findIndex(r=>r.id===o.floorId);if(n<0)throw new l("floor_not_found",`Unknown chart floor: ${o.floorId}`,{floorId:o.floorId});let[t]=e.floors.splice(n,1);if(e.floors.length===1){let[r]=e.floors;e.objects=r.objects,e.focalPoint=r.focalPoint,e.referenceImage=r.referenceImage,e.backgroundImage=r.backgroundImage,e.floors=void 0}else _(e);return{changed:!0,floorId:t.id,removedObjects:t.objects.length,floorCount:s(e).length}}export{l as a,P as b,D as c,y as d,O as e,z as f,v as g,H as h,A as i,d as j,$ as k,k as l,E as m,T as n,N as o,U as p,B as q,Z as r,K as s,_ as t,g as u,w as v,X as w,q as x,V as y,W as z};
@@ -0,0 +1 @@
1
+ import{h as Ae,i as he,m as Ne,o as Le}from"./chunk-KTMZ3QAO.js";import{c as je}from"./chunk-CRCGO52K.js";var lo=2e6,Tt=/^data:image\/(?:png|jpe?g|webp|gif|avif);base64,[a-z0-9+/]+={0,2}$/i,At=/[\s"'<>`\\]/;function Nt(e){if(typeof e!="string"||!e||e.length>2e6||e!==e.trim())return!1;if(e.startsWith("data:"))return Tt.test(e);if(At.test(e))return!1;try{let t=new URL(e);return t.protocol==="https:"&&!t.username&&!t.password}catch{return!1}}function Fe(e){let t=e.trim();return Nt(t)?t:null}var Lt=2e5,fo=1e5,jt="large_venue_inventory";function ho(e){return e?.includes(jt)?2e5:1e5}var te="seatlayer.event-configuration/1",me="seatlayer.event-configuration-export/1",G=100,Ft=120,Dt=2e5,Vt=1e4,Ve=/^[a-f0-9]{64}$/,Ht=new Set(["stage","screen","barrier","camera_platform","sound_desk","rigging_truss"]);function z(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function H(e,t){return typeof e=="string"&&e.length>=1&&e.length<=t&&e.normalize("NFKC").trim()===e}function He(e){return typeof e=="number"&&Number.isInteger(e)&&e>0}function De(e){return!Array.isArray(e)||e.length>Dt||!e.every(t=>H(t,G))?null:[...new Set(e)].sort()}function Ue(e){return!z(e)||!H(e.chartId,G)||!H(e.version,G)||e.sha256!==void 0&&(typeof e.sha256!="string"||!Ve.test(e.sha256))?null:{chartId:e.chartId,version:e.version,...typeof e.sha256=="string"?{sha256:e.sha256}:{}}}function pe(e,t,n){return typeof e=="number"&&Number.isFinite(e)&&e>=t&&e<=n}function Ut(e){return z(e)?e.mode==="none"||e.mode==="opaque"?e.opacity===void 0?{mode:e.mode}:null:e.mode==="partial"&&pe(e.opacity,.01,.99)?{mode:"partial",opacity:e.opacity}:null:null}function Gt(e,t){if(e===void 0)return;if(!Array.isArray(e)||e.length>Vt)return null;let n=new Set(t),i=new Set,o=new Set,r=0,s=[];for(let l of e){if(!z(l)||!H(l.id,G)||!H(l.objectId,G)||!n.has(l.objectId)||!Ht.has(String(l.kind))||!pe(l.heightM,.05,50)||l.baseElevationM!==void 0&&!pe(l.baseElevationM,-10,100))return null;let h=Ut(l.occlusion);if(!h||i.has(l.id)||o.has(l.objectId))return null;let a=l.contentImageUrl===void 0?void 0:typeof l.contentImageUrl=="string"?Fe(l.contentImageUrl):null;if(l.contentImageUrl!==void 0&&(!a||l.kind!=="screen"||++r>1))return null;i.add(l.id),o.add(l.objectId),s.push({id:l.id,objectId:l.objectId,kind:l.kind,heightM:l.heightM,...l.baseElevationM!==void 0?{baseElevationM:l.baseElevationM}:{},occlusion:h,...a?{contentImageUrl:a}:{}})}return s.sort((l,h)=>l.id.localeCompare(h.id))}function Ge(e){let t=[];if(!z(e))return{issues:[{code:"invalid_export",path:"configuration",message:"Configuration must be an object"}]};e.schema!==te&&t.push({code:"unsupported_schema",path:"configuration.schema",message:`Configuration schema must be ${te}`}),H(e.id,G)||t.push({code:"invalid_id",path:"configuration.id",message:"Configuration id must contain 1 to 100 normalized characters"}),H(e.label,Ft)||t.push({code:"invalid_label",path:"configuration.label",message:"Configuration label must contain 1 to 120 normalized characters"}),He(e.version)||t.push({code:"invalid_version",path:"configuration.version",message:"Configuration version must be a positive integer"});let n=Ue(e.baseVenue);n||t.push({code:"invalid_base_venue",path:"configuration.baseVenue",message:"Base venue must identify one normalized chart id and exact version"});let i=z(e.overlay)?e.overlay:null,o=De(i?.objectIds),r=De(i?.productionKillSeatIds),s=o?Gt(i?.productionElements,o):null;return(!i||!o||!r)&&t.push({code:"invalid_overlay",path:"configuration.overlay",message:"Overlay ids must be bounded arrays of normalized stable ids"}),s===null&&t.push({code:"invalid_production_element",path:"configuration.overlay.productionElements",message:"Production elements must be unique, bounded semantics over referenced base-venue objects"}),t.length||!n||!o||!r||s===null?{issues:t}:{issues:t,value:{schema:te,id:e.id,label:e.label,version:e.version,baseVenue:n,overlay:{objectIds:o,productionKillSeatIds:r,...s!==void 0?{productionElements:s}:{}}}}}function yo(e){let t=Ge(e);return t.value?{ok:!0,value:t.value}:{ok:!1,issues:t.issues}}function bo(e){if(!z(e))return{ok:!1,issues:[{code:"invalid_export",path:"",message:"Export must be an object"}]};let t=[];e.schema!==me&&t.push({code:"unsupported_schema",path:"schema",message:`Export schema must be ${me}`}),(typeof e.contentSha256!="string"||!Ve.test(e.contentSha256))&&t.push({code:"invalid_checksum",path:"contentSha256",message:"Export checksum must be a lowercase SHA-256 digest"});let n=Ge(e.configuration);return t.push(...n.issues),t.length||!n.value||typeof e.contentSha256!="string"?{ok:!1,issues:t}:{ok:!0,value:{schema:me,configuration:n.value,contentSha256:e.contentSha256}}}function go(e){return JSON.stringify({schema:te,id:e.id,label:e.label,version:e.version,baseVenue:{chartId:e.baseVenue.chartId,version:e.baseVenue.version,...e.baseVenue.sha256?{sha256:e.baseVenue.sha256}:{}},overlay:{objectIds:[...new Set(e.overlay.objectIds)].sort(),productionKillSeatIds:[...new Set(e.overlay.productionKillSeatIds)].sort(),...e.overlay.productionElements!==void 0?{productionElements:[...e.overlay.productionElements].sort((t,n)=>t.id.localeCompare(n.id)).map(t=>({id:t.id,objectId:t.objectId,kind:t.kind,heightM:t.heightM,...t.baseElevationM!==void 0?{baseElevationM:t.baseElevationM}:{},occlusion:t.occlusion,...t.contentImageUrl?{contentImageUrl:t.contentImageUrl}:{}}))}:{}}})}function xo(e,t){let n=[];e.baseVenue.chartId!==t.chartId&&n.push({code:"base_venue_mismatch",message:"Configuration belongs to a different base venue"}),e.baseVenue.version!==t.version&&n.push({code:"base_venue_version_mismatch",message:"Configuration was authored against a different venue version"}),e.baseVenue.sha256&&!t.sha256?n.push({code:"base_venue_checksum_missing",message:"Venue checksum is required for this configuration"}):e.baseVenue.sha256&&e.baseVenue.sha256!==t.sha256&&n.push({code:"base_venue_checksum_mismatch",message:"Venue bytes do not match the configuration base"});let i=new Set(t.objectIds);for(let r of e.overlay.objectIds)i.has(r)||n.push({code:"overlay_object_missing",message:`Production object ${r} is missing from the base venue`,targetId:r});if(t.objectTypes)for(let r of e.overlay.productionElements??[])t.objectTypes.get(r.objectId)!=="shape"&&n.push({code:"production_element_not_shape",message:`Production element ${r.id} must reference base-venue shape geometry`,targetId:r.objectId});let o=new Set(t.seatIds);for(let r of e.overlay.productionKillSeatIds)o.has(r)||n.push({code:"production_kill_seat_missing",message:`Production-kill seat ${r} is missing from the base venue`,targetId:r});return{compatible:n.length===0,issues:n}}var Xt={draft:new Set(["review","archived"]),review:new Set(["draft","approved","archived"]),approved:new Set(["published","archived"]),published:new Set(["archived"]),archived:new Set};function So(e,t){return e===t||Xt[e].has(t)}function Mo(e,t,n){return!He(n)||n>=t.version?null:e.find(i=>i.id===t.id&&i.version===n&&i.status==="published")??null}function Kt(e){return e.floors?.length?e.floors.flatMap(t=>t.objects):e.objects}function ye(e,t,n){if(!(!e||typeof e!="object")){if(Array.isArray(e)){for(let i of e)ye(i,t,n);return}for(let[i,o]of Object.entries(e)){if(i==="eventConfigurationId"){H(o,G)?t.add(o):o!==void 0&&n.add(String(o));continue}if(i==="eventConfigurationIds"){if(!Array.isArray(o))n.add(String(o));else for(let r of o)H(r,G)?t.add(r):n.add(String(r));continue}ye(o,t,n)}}}function Po(e,t){let n=Ue(t);if(!n)return{ok:!1,invalidIds:["baseVenue"]};let i=new Set,o=new Set;if(ye(e,i,o),o.size)return{ok:!1,invalidIds:[...o].sort()};let r=Kt(e);return{ok:!0,configurations:[...i].sort().map(s=>({schema:te,id:s,label:s,version:1,baseVenue:n,overlay:{objectIds:r.filter(l=>l.type==="shape"&&l.eventConfigurationIds?.includes(s)).map(l=>l.id).sort(),productionKillSeatIds:[]}}))}}var Eo=40,Io=1200,wo=.8,Co=3,_o=-2,Oo=20,ko=.1,Ro=40,To=40,Xe=e=>Math.max(1,e.fontSize*.6+(e.letterSpacing??0));function Bt(e,t){let n=e.text.split(/\r?\n/);if(!e.width)return Math.max(1,n.length);let i=Math.max(1,Math.floor(t/Xe(e))),o=0;for(let r of n){if(!r.length){o+=1;continue}let s=0;for(let l of r.split(/\s+/)){let h=l.length;s&&s+1+h<=i?s+=1+h:(o+=Math.max(1,Math.ceil(h/i)),s=h%i)}}return Math.max(1,o)}function Ke(e){let t=e.background?.padding??0,n=e.text.split(/\r?\n/),i=Math.max(1,...n.map(l=>l.length))*Xe(e),o=e.width??i+t*2,r=Math.max(1,o-t*2),s=Bt(e,r);return{width:o,height:s*e.fontSize*(e.lineHeight??1.2)+t*2,lineCount:s,padding:t}}var Be=Math.PI/180;function R(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function Ye(e,t,n){let i=Math.cos(n),o=Math.sin(n),r=e.x-t.x,s=e.y-t.y;return{x:t.x+r*i-s*o,y:t.y+r*o+s*i}}function No(e,t,n){return n?Ye(e,t,n*Be):e}function Lo(e,t){return Ye(e,{x:0,y:0},t*Be)}function j(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function Yt(e){let t=0,n=0;for(let o of e)t+=o.x,n+=o.y;let i=e.length||1;return{x:t/i,y:n/i}}function jo(e){return e.length?Yt(e):null}function be(e,t){let n=1-t,i=n*n*n,o=3*n*n*t,r=3*n*t*t,s=t*t*t;return{x:i*e.start.x+o*e.control1.x+r*e.control2.x+s*e.end.x,y:i*e.start.y+o*e.control1.y+r*e.control2.y+s*e.end.y}}function Vo(e,t,n){let i={x:(e.x+t.x)/2,y:(e.y+t.y)/2},o={x:(n.x-i.x)*4/3,y:(n.y-i.y)*4/3};return{start:{...e},control1:{x:e.x+(t.x-e.x)/3+o.x,y:e.y+(t.y-e.y)/3+o.y},control2:{x:e.x+(t.x-e.x)*2/3+o.x,y:e.y+(t.y-e.y)*2/3+o.y},end:{...t}}}function $e(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[be(e,.5)];let i=Array.from({length:n+1},(h,a)=>be(e,a/n)),o=new Float64Array(i.length);for(let h=1;h<i.length;h+=1){let a=i[h].x-i[h-1].x,c=i[h].y-i[h-1].y;o[h]=o[h-1]+Math.hypot(a,c)}let r=o[o.length-1];if(r<=1e-9)return Array.from({length:t},()=>({...e.start}));let s=[],l=1;for(let h=0;h<t;h+=1){let a=r*h/(t-1);for(;l<o.length-1&&o[l]<a;)l+=1;let c=o[l-1],u=o[l],m=u===c?0:(a-c)/(u-c);s.push({x:i[l-1].x+(i[l].x-i[l-1].x)*m,y:i[l-1].y+(i[l].y-i[l-1].y)*m})}return s}function F(e,t){return{x:e.x+t.x,y:e.y+t.y}}function ne(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,i)=>be(e,i/(t-1)))}function ze(e,t){let n=Math.max(0,Math.min(1,t))*(e.length-1),i=Math.min(e.length-2,Math.floor(n));return j(e[i],e[i+1],n-i)}function We(e,t,n){let i=Math.max(0,Math.min(1,t)),o=Math.max(i,Math.min(1,n)),r=[ze(e,i)];for(let s=1;s<e.length-1;s+=1){let l=s/(e.length-1);l>i+1e-9&&l<o-1e-9&&r.push(e[s])}return r.push(ze(e,o)),r}function qe(e,t){let n=[[0,1],[1,2],[2,3],[3,0]],i=0,o=Number.POSITIVE_INFINITY;n.forEach(([m,d],y)=>{let f=R(j(e[m],e[d],.5),t);f<o&&(o=f,i=y)});let r=e[i],s=e[(i+1)%4],l=e[(i+2)%4],h=e[(i+3)%4],a=j(r,s,.5),c=ne(t,a),u=Math.max(1e-9,Math.hypot(c.x,c.y));return{p0:r,p1:s,p2:l,p3:h,normal:D(c,1/u),depth:(R(r,h)+R(s,l))/2}}function Qe(e){let{p0:t,p1:n,p2:i,p3:o,normal:r,depth:s}=e,l=ne(n,t),h=ne(i,o),a=s*.22,c=s*.12;return{nearPath:{start:t,control1:F(F(t,D(l,1/3)),D(r,a)),control2:F(F(t,D(l,2/3)),D(r,a)),end:n},farPath:{start:i,control1:F(F(o,D(h,2/3)),D(r,c)),control2:F(F(o,D(h,1/3)),D(r,c)),end:o}}}function Ho(e,t,n){if(e.length!==4)throw new Error("A section shell requires four mapped bounds corners");let i=e.reduce((y,f)=>F(y,f),{x:0,y:0});i.x/=4,i.y/=4;let o=R(e[0],e[1]),r=R(e[0],e[3]),s=n==="auto"?o>r*1.25&&R(i,t)>r?"bezier":"tapered":n;if(s==="rectangle")return{mode:s,outline:e.map(y=>({...y}))};let l=qe(e,t),{p0:h,p1:a,p2:c,p3:u}=l;if(s==="tapered")return{mode:s,outline:[F(h,D(ne(a,h),.14)),F(h,D(ne(a,h),1-.14)),c,u]};let{nearPath:m,farPath:d}=Qe(l);return{mode:s,outline:[...se(m),...se(d).slice(1)]}}function Uo(e,t,n,i){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 o=qe(e,t),{p0:r,p1:s,p2:l,p3:h}=o,a=i==="bezier"?Qe(o):null,c=a?se(a.nearPath):null,u=a?se(a.farPath).reverse():null,m=Math.min(.055,.18/(n+1));return Array.from({length:n},(d,y)=>{let f=(y+1)/(n+1),g=f-m/2,v=f+m/2;return c&&u?[...We(c,g,v),...We(u,g,v).reverse()]:[j(r,s,g),j(r,s,v),j(h,l,v),j(h,l,g)]})}function zt(e,t,n){let i=n.x-t.x,o=n.y-t.y,r=i*i+o*o,s=r?Math.max(0,Math.min(1,((e.x-t.x)*i+(e.y-t.y)*o)/r)):0;return Math.hypot(e.x-(t.x+s*i),e.y-(t.y+s*o))}function Wt(e,t){let n=1/0;for(let i of t)if(!(i.length<2))for(let o=0,r=i.length-1;o<i.length;r=o++){let s=zt(e,i[r],i[o]);s<n&&(n=s)}return n}function Je(e,t){let n=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){let r=t[i].x,s=t[i].y,l=t[o].x,h=t[o].y;s>e.y!=h>e.y&&e.x<(l-r)*(e.y-s)/(h-s)+r&&(n=!n)}return n}function et(e){return Array.isArray(e)?e.filter(t=>Array.isArray(t)&&t.length>=3):[]}function $t(e,t,n){let i=Je(e,t)&&!n.some(r=>Je(e,r)),o=Wt(e,[t,...n]);return i?o:-o}function W(e,t,n,i,o){let r=$t({x:e,y:t},i,o);return{x:e,y:t,h:n,d:r,max:r+n*Math.SQRT2}}var ge=class{constructor(){this.items=[]}get size(){return this.items.length}push(t){let n=this.items;n.push(t);let i=n.length-1;for(;i>0;){let o=i-1>>1;if(n[o].max>=n[i].max)break;[n[o],n[i]]=[n[i],n[o]],i=o}}pop(){let t=this.items,n=t[0],i=t.pop();if(t.length&&i){t[0]=i;let o=0;for(;;){let r=o*2+1,s=r+1,l=o;if(r<t.length&&t[r].max>t[l].max&&(l=r),s<t.length&&t[s].max>t[l].max&&(l=s),l===o)break;[t[l],t[o]]=[t[o],t[l]],o=l}}return n}};function Ze(e){if(e.length<3)return 0;let t=0;for(let n=0,i=e.length-1;n<e.length;i=n++)t+=(e[i].x+e[n].x)*(e[i].y-e[n].y);return Math.abs(t)/2}function Xo(e,t){return Math.max(0,Ze(e)-et(t).reduce((n,i)=>n+Ze(i),0))}function tt(e,t){let n=et(t);if(!e.length)return{point:{x:0,y:0},radius:0};if(e.length<3){let f=e.reduce((v,E)=>v+E.x,0)/e.length,g=e.reduce((v,E)=>v+E.y,0)/e.length;return{point:{x:f,y:g},radius:0}}let i=1/0,o=1/0,r=-1/0,s=-1/0;for(let f of e)f.x<i&&(i=f.x),f.y<o&&(o=f.y),f.x>r&&(r=f.x),f.y>s&&(s=f.y);let l=r-i,h=s-o,a=Math.min(l,h);if(!(a>0))return{point:{x:(i+r)/2,y:(o+s)/2},radius:0};let c=Math.max(l,h)/150,u=new ge,m=a/2;for(let f=i;f<r;f+=a)for(let g=o;g<s;g+=a)u.push(W(f+m,g+m,m,e,n));let d=W(i+l/2,o+h/2,0,e,n),y=0;for(;u.size;){let f=u.pop();if(!f)break;f.d>d.d&&(d=f),!(f.max-d.d<=c)&&(y>=4e3||(y+=1,m=f.h/2,u.push(W(f.x-m,f.y-m,m,e,n)),u.push(W(f.x+m,f.y-m,m,e,n)),u.push(W(f.x-m,f.y+m,m,e,n)),u.push(W(f.x+m,f.y+m,m,e,n))))}return{point:{x:d.x,y:d.y},radius:Math.max(0,d.d)}}function qt(e,t,n){return Math.max(t,Math.min(n,e))}function Bo(e,t,n){return e<t?t:e>n?n:e}function Qt(e){return qt(e,0,1)}function nt(e){let t=Qt(e);return t*t*(3-2*t)}var $=Math.PI*2;function q(e){return Number.isFinite(e.x)&&Number.isFinite(e.y)}function Jt(e,t,n){let i=t-e;if(n){for(;i<0;)i+=$;for(;i>=$;)i-=$}else{for(;i>0;)i-=$;for(;i<=-$;)i+=$}return i}function $o(e){return e.end}function rt(e){if(e.version!==1||e.closed!==!0||!q(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||!q(n.end))return!1;if(n.kind==="line"){if(R(t,n.end)<=1e-9)return!1}else if(n.kind==="bezier"){if(!q(n.control1)||!q(n.control2)||R(t,n.end)<=1e-9)return!1}else if(n.kind==="arc"){if(!q(n.center)||!Number.isFinite(n.radius)||n.radius<=1e-6||Math.abs(R(t,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||Math.abs(R(n.end,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||R(t,n.end)<=1e-9)return!1}else return!1;t=n.end}return R(t,e.start)<=1e-4}function Zt(e,t,n){let i=1-n;return{x:i**3*e.x+3*i**2*n*t.control1.x+3*i*n**2*t.control2.x+n**3*t.end.x,y:i**3*e.y+3*i**2*n*t.control1.y+3*i*n**2*t.control2.y+n**3*t.end.y}}function st(e,t=2){if(!rt(e))throw new Error("Section outline path is invalid");let n=Math.max(.25,t),i=[{...e.start}],o=e.start;for(let r of e.segments){if(r.kind==="line")i.push({...r.end});else if(r.kind==="arc"){let s=Math.atan2(o.y-r.center.y,o.x-r.center.x),l=Math.atan2(r.end.y-r.center.y,r.end.x-r.center.x),h=Jt(s,l,r.clockwise),a=Math.max(2,Math.ceil(Math.abs(h)*r.radius/n));for(let c=1;c<=a;c+=1){let u=s+h*c/a;i.push({x:r.center.x+Math.cos(u)*r.radius,y:r.center.y+Math.sin(u)*r.radius})}}else{let s=R(o,r.control1)+R(r.control1,r.control2)+R(r.control2,r.end),l=Math.max(2,Math.ceil(s/n));for(let h=1;h<=l;h+=1)i.push(Zt(o,r,h/l))}o=r.end}return R(i[i.length-1],i[0])<=1e-4&&i.pop(),i}function at(e,t,n){return en(e,o=>({x:o.x+t,y:o.y+n}))}function en(e,t,n=1,i=!1){return{...e,start:t(e.start),segments:e.segments.map(o=>o.kind==="line"?{...o,end:t(o.end)}:o.kind==="arc"?{...o,center:t(o.center),radius:o.radius*Math.abs(n),clockwise:i?!o.clockwise:o.clockwise,end:t(o.end)}:{...o,control1:t(o.control1),control2:t(o.control2),end:t(o.end)})}}function qo(e){return e.map(t=>t===0?0:-t)}var tn=45,xe=150,nn=60;function on(e){let t=tn/100;if(e<=t)return xe;let n=Math.min(1,(e-t)/(1-t));return xe-n*(xe-nn)}var ot=.5523;function it(e,t){return Math.abs(e.x-t.x)<=1e-6&&Math.abs(e.y-t.y)<=1e-6}function rn(e){let t=[],n=[];for(e.forEach((i,o)=>{q(i)&&(t.length&&it(t[t.length-1],i)||(t.push({x:i.x,y:i.y}),n.push(o)))});t.length>1&&it(t[0],t[t.length-1]);)t.pop(),n.pop();return{points:t,sourceIndex:n}}function Qo(e,t,n){return Se(e,{cornerSmoothing:t,...n})}var sn=.5,an=4/3;function cn(e,t,n){let i=t.x-e.x,o=t.y-e.y,r=Math.hypot(i,o);if(r<=1e-9)return{kind:"line",end:{...t}};let s=-o/r,l=i/r,h=n*an;return{kind:"bezier",control1:{x:e.x+i/3+s*h,y:e.y+o/3+l*h},control2:{x:e.x+i*2/3+s*h,y:e.y+o*2/3+l*h},end:{...t}}}function Se(e,t){let{points:n,sourceIndex:i}=rn(e),o=n.length;if(o<3)return null;let r=Math.min(100,Math.max(0,t.cornerSmoothing??0))/100,s=t.edgeCurvature,l=new Array(o).fill(0);if(s?.length)for(let x=0;x<o;x+=1){let S=s[i[x]];l[x]=Number.isFinite(S)?Math.min(100,Math.max(-100,S))/100:0}let h=l.some(x=>Math.abs(x)>1e-6);if(r<=0&&!h)return null;let a=t.wideAngleThresholdDeg??on(r),c=[];for(let x=0;x<o;x+=1)c[x]=R(n[x],n[(x+1)%o]);let u=new Array(o).fill(0);for(let x=0;x<o;x+=1){let S=n[(x-1+o)%o],p=n[x],b=n[(x+1)%o],P={x:S.x-p.x,y:S.y-p.y},M={x:b.x-p.x,y:b.y-p.y},C=Math.hypot(P.x,P.y),T=Math.hypot(M.x,M.y);if(C<=1e-9||T<=1e-9)continue;let I=Math.min(1,Math.max(-1,(P.x*M.x+P.y*M.y)/(C*T))),_=Math.acos(I)*180/Math.PI;if(_<a)continue;let O=nt((_-a)/(180-a));u[x]=r*O*.5*Math.min(C,T)}for(let x=0;x<o;x+=1){let S=(x+1)%o,p=u[x]+u[S];if(p>c[x]&&p>1e-9){let b=c[x]/p;u[x]*=b,u[S]*=b}}let m=new Array(o),d=new Array(o);for(let x=0;x<o;x+=1){let S=n[(x-1+o)%o],p=n[x],b=n[(x+1)%o];if(u[x]<=1e-6){m[x]={...p},d[x]={...p};continue}let P=R(p,S)||1,M=R(p,b)||1;m[x]={x:p.x+(S.x-p.x)/P*u[x],y:p.y+(S.y-p.y)/P*u[x]},d[x]={x:p.x+(b.x-p.x)/M*u[x],y:p.y+(b.y-p.y)/M*u[x]}}if(u.every(x=>x<=1e-6)&&!h)return null;let y=[],f={...d[0]},g=f,v=(x,S)=>{if(R(g,x)<=1e-9)return;let p=l[S];Math.abs(p)>1e-6?y.push(cn(g,x,p*sn*c[S])):y.push({kind:"line",end:{...x}}),g=x};for(let x=1;x<=o;x+=1){let S=x%o,p=n[S];v(m[S],(x-1)%o),u[S]>1e-6&&R(m[S],d[S])>1e-9&&(y.push({kind:"bezier",control1:j(m[S],p,ot),control2:j(d[S],p,ot),end:{...d[S]}}),g=d[S])}if(!y.length)return null;let E=y[y.length-1];R(E.end,f)>1e-9&&(E.kind==="line"?E.end={...f}:y.push({kind:"line",end:{...f}}));let w={version:1,closed:!0,start:f,segments:y};return rt(w)?w:null}function Jo(e){let t=[],n=e.start;for(let o of e.segments)t.push(n),n=o.end;let i=[];for(let o=e.segments.length-1;o>=0;o-=1){let r=e.segments[o],s=t[o];r.kind==="line"?i.push({kind:"line",end:{...s}}):r.kind==="arc"?i.push({kind:"arc",center:{...r.center},radius:r.radius,clockwise:!r.clockwise,end:{...s}}):i.push({kind:"bezier",control1:{...r.control2},control2:{...r.control1},end:{...s}})}return{version:1,closed:!0,start:{...e.start},segments:i}}function ei(e,t,n){let i=[];for(let o=0;o<e.length-1;o+=1){let r=e[o],s=e[o+1],l=Math.hypot(s.x-r.x,s.y-r.y);if(l<=0)continue;let h=Math.max(1,Math.round(l/n)),a=l/h,c=Math.atan2(s.y-r.y,s.x-r.x),u=o===0,d=(o>0?t[o-1]:void 0)==="break"?2:1,y=u?{...r}:{x:r.x+Math.cos(c)*a*d,y:r.y+Math.sin(c)*a*d},f=u?h+1:Math.max(1,h-(d-1));i.push({origin:y,rotation:c*180/Math.PI,seatCount:f,seatSpacing:a})}return i}function ti(e){let t=e.rotation*Math.PI/180,n={x:Math.cos(t),y:Math.sin(t)};return Array.from({length:e.seatCount},(i,o)=>({x:e.origin.x+n.x*o*e.seatSpacing,y:e.origin.y+n.y*o*e.seatSpacing}))}function ni(e){return e.reduce((t,n)=>t+n.seatCount,0)}function ct(e){let t=new Map,n=new Map;for(let i of e){if(i.type!=="row"||!i.segmentedRow)continue;let o=n.get(i.segmentedRow.groupId)??[];o.push(i),n.set(i.segmentedRow.groupId,o)}for(let[i,o]of n){let r=o.slice().sort((m,d)=>m.segmentedRow.componentIndex-d.segmentedRow.componentIndex),s=r[0]?.segmentedRow?.componentCount??0,l=r[0]?.segmentedRow;if(!l||!(s>=2&&r.length===s&&l?.boundaryBefore==="start"&&r.every((m,d)=>m.segmentedRow?.kind==="segmented-row-v1"&&m.segmentedRow.groupId===i&&m.segmentedRow.componentCount===s&&m.segmentedRow.componentIndex===d&&m.segmentedRow.repeatLabelOnComponents===l.repeatLabelOnComponents&&(d===0?m.segmentedRow.boundaryBefore==="start":m.segmentedRow.boundaryBefore!=="start")&&m.segmentedRow.displayLabel===l.displayLabel)))continue;let a=r.reduce((m,d)=>m+d.seatCount,0),c=0,u=0;for(let m of r)m.segmentedRow.boundaryBefore==="break"&&(c+=1),t.set(m.id,{groupId:i,adjacencyOffset:c,displayOffset:u,displayLabel:l.displayLabel,totalSeats:a,canonical:r[0],viewFromSeatUrl:l.viewFromSeatUrl,viewFromSeatMeta:l.viewFromSeatMeta,confidenceEvidence:l.confidenceEvidence}),c+=m.seatCount,u+=m.seatCount}return t}var Q=.02291666666666667,ve=1/Q,ln=58,un=ln*Q,ii=0,dn=3,lt=0,Me=120,fn=0,hn=45,mn=7,J=1.2;function Pe(e,t,n,i){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):i}function pn(e){return!Number.isFinite(e)||!Number.isInteger(e)||e<0?0:e<=mn?e:dn}function ut(e,t={}){let n=Pe(t.floorBaseHeightM,lt,Me,0),i=Math.min(Me,n+pn(e.elevation)*un),o=e.height===void 0?i:Pe(e.height,lt,Me,i),r=Pe(e.rake,fn,hn,0);return{height:o,rake:r}}function dt(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 ft(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 i=1/0;for(let o=0;o+1<e.length;o++){let r=e[o],s=e[o+1],l=s.x-r.x,h=s.y-r.y,a=l*l+h*h,c=a>1e-12?((t-r.x)*l+(n-r.y)*h)/a:0;c<0?c=0:c>1&&(c=1);let u=t-(r.x+c*l),m=n-(r.y+c*h);if(Math.abs(u)>=i||Math.abs(m)>=i)continue;let d=Math.hypot(u,m);d<i&&(i=d)}return i}function yn(e){let t=0,n=0;for(let r of e)t+=r.x,n+=r.y;let i=e.length||1;t/=i,n/=i;let o=0;for(let r of e){let s=Math.hypot(r.x-t,r.y-n);s>o&&(o=s)}return{cx:t,cy:n,r:o}}function ht(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 i of dt(e)){let o=ft(t,i.x,i.y);o<n&&(n=o)}for(let i of dt(t)){let o=ft(e,i.x,i.y);o<n&&(n=o)}return n}function bn(e,t){if(e.length<3)return{pts:e,seatIndices:t};let n=0,i=0;for(let c of e)n+=c.x,i+=c.y;n/=e.length,i/=e.length;let o=-1,r=e[0];for(let c of e){let u=Math.hypot(c.x-n,c.y-i);u>o&&(o=u,r=c)}let s=r.x-n,l=r.y-i,h=Math.hypot(s,l);h>1e-9?(s/=h,l/=h):(s=1,l=0);let a=e.map((c,u)=>({p:c,i:u,t:(c.x-n)*s+(c.y-i)*l})).sort((c,u)=>c.t-u.t);return{pts:a.map(c=>c.p),seatIndices:a.map(c=>t[c.i])}}function gn(e){let t=e.length;if(t<3)return null;let n=0,i=0;for(let E of e)n+=E.x,i+=E.y;n/=t,i/=t;let o=0,r=0,s=0,l=0,h=0,a=0,c=0;for(let E of e){let w=E.x-n,x=E.y-i;o+=w*w,s+=x*x,r+=w*x,l+=w*w*w,h+=x*x*x,a+=w*x*x,c+=x*w*w}let u=o*s-r*r;if(Math.abs(u)<1e-9)return null;let m=(l+a)/2,d=(h+c)/2,y=(m*s-d*r)/u,f=(d*o-m*r)/u,g=y+n,v=f+i;return!Number.isFinite(g)||!Number.isFinite(v)?null:{cx:g,cy:v}}var xn=.15;function Sn(e){if(e.length<2)return null;let t=e.map(S=>{let p=0,b=0;for(let P of S.pts)p+=P.x,b+=P.y;return{x:p/S.pts.length,y:b/S.pts.length}}),n=0,i=0;for(let S of t)n+=S.x,i+=S.y;n/=t.length,i/=t.length;let o=0,r=0,s=0;for(let S of t){let p=S.x-n,b=S.y-i;o+=p*p,r+=p*b,s+=b*b}let l=o+s,h=o*s-r*r,a=l/2+Math.sqrt(Math.max(0,l*l/4-h)),c,u;Math.abs(r)>1e-12?(c=a-s,u=r):o>=s?(c=1,u=0):(c=0,u=1);let m=Math.hypot(c,u);if(!(m>1e-12))return null;c/=m,u/=m;let d=0,y=0,f=0;for(let S of e){if(S.pts.length<2)continue;let p=S.pts[0],b=S.pts[S.pts.length-1],P=b.x-p.x,M=b.y-p.y,C=Math.hypot(P,M);if(!(C>1e-9))continue;let T=P/C,I=M/C;d+=(T*T-I*I)*C,y+=2*T*I*C,f+=C}if(f>0&&Math.hypot(d,y)>=Pn*f){let S=Math.atan2(y,d)/2,p=Math.cos(S),b=Math.sin(S);Math.abs(c*p+u*b)>vn&&(c=-b,u=p)}let g=1/0,v=-1/0,E=[];for(let S of e){let p=1/0,b=-1/0;for(let P of S.pts){let M=P.x*c+P.y*u;M<p&&(p=M),M>b&&(b=M),M<g&&(g=M),M>v&&(v=M)}E.push(b-p)}let w=v-g;return w>1e-9?(E.sort((S,p)=>S-p),E[Math.min(E.length-1,Math.floor(E.length*.9))]/w<=Mn?{x:c,y:u}:null):null}var Mn=.35,Pn=.8,vn=.7;function mt(e,t,n,i){let o=new Map;for(let p of n){let b=t[p],P=b.rowId||`__seat-${p}`,M=o.get(P);M||(M={pts:[],idx:[]},o.set(P,M)),M.pts.push({x:b.x,y:b.y}),M.idx.push(p)}if(!o.size)return{sectionId:e,rows:[],blockCount:0};let r=[];for(let[p,b]of o){let P=bn(b.pts,b.idx),M=0;for(let C of P.pts)M+=Math.hypot(C.x-i.x,C.y-i.y);r.push({id:p,pts:P.pts,seatIndices:P.seatIndices,blockId:-1,ordinal:0,blockDepth:0,focalDistance:M/P.pts.length})}let s=r.map(p=>yn(p.pts)),l=r.length<=256?r.length*(r.length-1)/2:0,h=l?new Float64Array(l):null;h?.fill(Number.NaN);let a=h?new Map(r.map((p,b)=>[p,b])):null,c=(p,b)=>(p>b&&([p,b]=[b,p]),p*(2*r.length-p-1)/2+(b-p-1)),u=(p,b)=>{if(!h)return Ee(r[p].pts,r[b].pts);let P=c(p,b),M=h[P];if(!Number.isNaN(M))return M;let C=Ee(r[p].pts,r[b].pts);return h[P]=C,C},m=(p,b)=>a?u(a.get(p),a.get(b)):Ee(p.pts,b.pts),d=[];for(let p=0;p<r.length;p++){let b=1/0;for(let P=0;P<r.length;P++){if(p===P||ht(s[p],s[P])>=b)continue;let M=u(p,P);M<b&&(b=M)}Number.isFinite(b)&&d.push(b)}d.sort((p,b)=>p-b);let y=d.length?d[Math.floor(d.length/2)]:1,f=Math.max(y*1.8,1e-6),g=r.map(()=>[]);for(let p=0;p<r.length;p++)for(let b=p+1;b<r.length;b++)ht(s[p],s[b])>f||u(p,b)<=f&&(g[p].push(b),g[b].push(p));let v=0;for(let p=0;p<r.length;p++){if(r[p].blockId!==-1)continue;let b=v++,P=[p];for(r[p].blockId=b;P.length;){let M=P.pop();for(let C of g[M])r[C].blockId===-1&&(r[C].blockId=b,P.push(C))}}let E=new Map;for(let p of r){let b=E.get(p.blockId)??[];b.push(p),E.set(p.blockId,b)}let w=[];for(let p of r){if(p.pts.length<4)continue;let b=gn(p.pts);b&&(!Number.isFinite(b.cx)||!Number.isFinite(b.cy)||w.push({x:b.cx,y:b.cy}))}let x=w.length>=2?(()=>{let p=w.map(M=>M.x).sort((M,C)=>M-C),b=w.map(M=>M.y).sort((M,C)=>M-C),P=Math.floor(w.length/2);return{cx:p[P],cy:b[P]}})():null;if(x){let p=I=>Math.hypot(I.x-x.cx,I.y-x.cy),b=1/0,P=-1/0,M=[];for(let I of r){let _=1/0,O=-1/0;for(let N of I.pts){let A=p(N);A<_&&(_=A),A>O&&(O=A)}M.push(O-_),_<b&&(b=_),O>P&&(P=O)}let C=P-b;M.sort((I,_)=>I-_);let T=M[Math.min(M.length-1,Math.floor(M.length*.9))];if(C>1e-9&&T/C<=xn){let I=r.map(k=>{let re=0;for(let Rt of k.pts)re+=p(Rt);return{row:k,radius:re/k.pts.length}}),_=0,O=0;for(let k of I)_+=k.radius,O+=k.row.focalDistance;_/=I.length,O/=I.length;let N=0;for(let k of I)N+=(k.radius-_)*(k.row.focalDistance-O);if(N<0)for(let k of I)k.radius=-k.radius;let L=1/0;for(let k of I)k.radius<L&&(L=k.radius);I.sort((k,re)=>k.radius-re.radius);let V=-1,Y=-1/0,kt=C/Math.max(1,I.length)*.5,Te=[];for(let k of I)k.radius-Y>kt&&(V++,Y=k.radius),k.row.ordinal=V,k.row.blockDepth=k.radius-L,Te.push(k.row);return{sectionId:e,rows:Te,blockCount:v}}}let S=[];for(let[,p]of E){let b=Sn(p);if(b){let P=I=>{let _=0;for(let O of I.pts)_+=O.x*b.x+O.y*b.y;return _/I.pts.length};p.sort((I,_)=>P(I)-P(_)),p.length>=2&&p[0].focalDistance>p[p.length-1].focalDistance&&p.reverse();let M=[],C=y*.5;for(let I of p){let _=M[M.length-1];_&&Math.abs(P(I)-P(_[0]))<C?_.push(I):M.push([I])}let T=0;for(let I=0;I<M.length;I++){if(I>0){let _=1/0;for(let O of M[I-1])for(let N of M[I])_=Math.min(_,m(O,N));T+=_}for(let _ of M[I])_.ordinal=I,_.blockDepth=T,S.push(_)}}else{let P=1/0;for(let M of p)M.focalDistance<P&&(P=M.focalDistance);p.sort((M,C)=>M.focalDistance-C.focalDistance);for(let M=0;M<p.length;M++)p[M].ordinal=M,p[M].blockDepth=Math.max(0,p[M].focalDistance-P),S.push(p[M])}}return{sectionId:e,rows:S,blockCount:v}}function En(e,t){return Math.abs(e.x-t.x)<=1e-7&&Math.abs(e.y-t.y)<=1e-7}function oe(e,t,n){return(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x)}function ae(e,t,n){let i=oe(t,n,e);return Math.abs(i)>1e-7?!1:e.x>=Math.min(t.x,n.x)-1e-7&&e.x<=Math.max(t.x,n.x)+1e-7&&e.y>=Math.min(t.y,n.y)-1e-7&&e.y<=Math.max(t.y,n.y)+1e-7}function In(e,t,n,i){let o=oe(e,t,n),r=oe(e,t,i),s=oe(n,i,e),l=oe(n,i,t);return(o>1e-7&&r<-1e-7||o<-1e-7&&r>1e-7)&&(s>1e-7&&l<-1e-7||s<-1e-7&&l>1e-7)?!0:Math.abs(o)<=1e-7&&ae(n,e,t)||Math.abs(r)<=1e-7&&ae(i,e,t)||Math.abs(s)<=1e-7&&ae(e,n,i)||Math.abs(l)<=1e-7&&ae(t,n,i)}function wn(e){return e.reduce((t,n,i)=>{let o=e[(i+1)%e.length];return t+n.x*o.y-o.x*n.y},0)}function Cn(e){for(let t=0;t<e.length;t+=1){let n=(t+1)%e.length;for(let i=t+1;i<e.length;i+=1){let o=(i+1)%e.length;if(!(t===i||n===i||o===t)&&In(e[t],e[n],e[i],e[o]))return!0}}return!1}function ai(e){return e.length<3?{ok:!1,code:"too_few_vertices",message:"Add at least three vertices to create a polygon."}:e.length>256?{ok:!1,code:"too_many_vertices",message:"A polygon can contain at most 256 vertices."}:e.some(t=>!Number.isFinite(t.x)||!Number.isFinite(t.y)||Math.abs(t.x)>1e7||Math.abs(t.y)>1e7)?{ok:!1,code:"invalid_coordinate",message:"Every polygon vertex must use a finite coordinate inside the safe chart range."}:e.some((t,n)=>En(t,e[(n+1)%e.length]))?{ok:!1,code:"duplicate_vertex",message:"Move or remove duplicate neighbouring vertices."}:Math.abs(wn(e))<2?{ok:!1,code:"degenerate_polygon",message:"The polygon needs a visible enclosed area."}:Cn(e)?{ok:!1,code:"self_intersection",message:"Polygon edges cannot cross or touch each other."}:{ok:!0}}var di=64;function _n(e){let t=e.points??[];if(e.kind!=="polygon"||t.length<3||!Array.isArray(e.edgeCurvature))return[];let n=t.map((i,o)=>{let r=e.edgeCurvature[o];return Number.isFinite(r)?Math.min(100,Math.max(-100,r)):0});return n.some(i=>Math.abs(i)>.5)?n:[]}function On(e){let t=_n(e);return t.length?Se(e.points,{edgeCurvature:t}):null}function ie(e,t=2){let n=On(e);return n?st(n,t):e.points??[]}function fi(e){return e.kind==="polygon"?X(e.holes):[]}function hi(e,t){let n=ie(e);return n.length<3||t.length<3||!t.flatMap((o,r)=>{let s=t[(r+1)%t.length];return[o,{x:(o.x+s.x)/2,y:(o.y+s.y)/2}]}).every(o=>Z(o,n)||Ie(o,n))?!1:!t.some((o,r)=>{let s=t[(r+1)%t.length];return n.some((l,h)=>pt(o,s,l,n[(h+1)%n.length]))})}function pt(e,t,n,i){let o=(a,c,u)=>(c.x-a.x)*(u.y-a.y)-(c.y-a.y)*(u.x-a.x),r=o(e,t,n),s=o(e,t,i),l=o(n,i,e),h=o(n,i,t);return r*s<-1e-9&&l*h<-1e-9}function mi(e,t){return Z(e[0],t)||Z(t[0],e)?!0:e.some((n,i)=>{let o=e[(i+1)%e.length];return t.some((r,s)=>pt(n,o,r,t[(s+1)%t.length]))})}var bi=[{key:"rect",label:"Flat stage",blurb:"Classic proscenium box."},{key:"rounded",label:"Rounded",blurb:"Softened corners."},{key:"arc",label:"Curved front",blurb:"Front edge bows toward the audience."},{key:"thrust",label:"Thrust (T)",blurb:"Central tongue projects into the crowd."},{key:"runway",label:"Runway",blurb:"Long catwalk into the audience."},{key:"round",label:"In the round",blurb:"Central platform, audience all around."},{key:"pitch-football",label:"Football pitch",blurb:"105 \xD7 68 m pitch with centre circle and penalty boxes."},{key:"rink-hockey",label:"Hockey rink",blurb:"60 \xD7 30 m ice rink with blue lines and faceoff circles."},{key:"track-athletics",label:"Athletics track",blurb:"400 m track: two straights, two semicircles, eight lanes."},{key:"oval-cricket",label:"Cricket oval",blurb:"~150 \xD7 140 m oval with boundary rope and pitch strip."},{key:"pitch-rugby",label:"Rugby pitch",blurb:"100 \xD7 70 m field of play with in-goal areas, 22 m and 10 m lines."},{key:"diamond-baseball",label:"Baseball field",blurb:"Diamond, infield, mound and foul lines out to 99 m poles."},{key:"court-basketball",label:"Basketball court",blurb:"28 \xD7 15 m court with keys and three-point lines."},{key:"court-tennis",label:"Tennis court",blurb:"23.77 \xD7 10.97 m doubles court with run-off and net."},{key:"ring-boxing",label:"Boxing ring",blurb:"Raised ring, 6.1 m inside the ropes, coloured corners."}],kn=new Set(["pitch-football","rink-hockey","track-athletics","oval-cricket","pitch-rugby","diamond-baseball","court-basketball","court-tennis","ring-boxing"]),Rn=new Set(["pitch-football","track-athletics","oval-cricket","pitch-rugby","diamond-baseball"]);function Tn(e){return!!e&&kn.has(e)}function gi(e){return!!e&&Rn.has(e)}var Ce=1.1;function xi(e){return ce(e)?e==="ring-boxing"?Ce:.06:1}var yt={round:{width:6,height:6},"pitch-football":{width:105,height:68},"rink-hockey":{width:60,height:30},"track-athletics":{width:176.9,height:92.5},"oval-cricket":{width:150,height:140},"pitch-rugby":{width:120,height:70},"diamond-baseball":{width:140,height:140},"court-basketball":{width:32,height:19},"court-tennis":{width:36.57,height:18.29},"ring-boxing":{width:7.8,height:7.8}},bt={"pitch-football":"#2f7d4f","rink-hockey":"#e8f1f8","track-athletics":"#a4472f","oval-cricket":"#3d8a53","pitch-rugby":"#2f7d4f","diamond-baseball":"#2f7d4f","court-basketball":"#c8894f","court-tennis":"#3f7a5a","ring-boxing":"#2a4d8f"};function Si(e){let t=yt[e];return t?{width:t.width*ve,height:t.height*ve}:{width:300,height:70}}var An="#232c40",gt=Math.PI*2;function xt(e,t,n,i,o,r){return{x:o+e*n-t*i,y:r+e*i+t*n}}function Nn(e){let{kind:t,cx:n,cy:i,width:o,height:r}=e,s=(e.rotation??0)*Math.PI/180,l=Math.cos(s),h=Math.sin(s),a=o/2,c=r/2,u=[],m=(d,y)=>{u.push({x:d,y})};switch(t){case"rect":{m(-a,-c),m(a,-c),m(a,c),m(-a,c);break}case"rounded":{let d=Math.min(o,r)*.18,y=5,f=(g,v,E)=>{for(let w=0;w<=y;w++){let x=E+w/y*(Math.PI/2);m(g+d*Math.cos(x),v+d*Math.sin(x))}};f(a-d,-c+d,-Math.PI/2),f(a-d,c-d,0),f(-a+d,c-d,Math.PI/2),f(-a+d,-c+d,Math.PI);break}case"arc":{let d=r*.45;m(-a,-c),m(a,-c);let y=24;for(let f=0;f<=y;f++){let g=f/y,v=a-g*o,E=c+d*(1-Math.pow(2*v/o,2));m(v,E)}break}case"thrust":{let d=o*.18,y=r*1.1;m(-a,-c),m(a,-c),m(a,c),m(d,c),m(d,c+y),m(-d,c+y),m(-d,c),m(-a,c);break}case"runway":{let d=o*.1,y=r*3;m(-a,-c),m(a,-c),m(a,c),m(d,c),m(d,c+y),m(-d,c+y),m(-d,c),m(-a,c);break}case"round":case"oval-cricket":{for(let y=0;y<40;y++){let f=y/40*gt;m(a*Math.cos(f),c*Math.sin(f))}break}case"pitch-football":case"pitch-rugby":case"court-basketball":case"court-tennis":case"ring-boxing":{m(-a,-c),m(a,-c),m(a,c),m(-a,c);break}case"diamond-baseball":{for(let d of jn(a,c))m(d.x,d.y);break}case"rink-hockey":{for(let d of Ln(a,c,a*(8.5/60),c*(8.5/30)))m(d.x,d.y);break}case"track-athletics":{for(let d of we(a,c))m(d.x,d.y);break}}return u.map(d=>xt(d.x,d.y,l,h,n,i))}function Mi(e,t="stage"){return{type:"shape",id:t,kind:"polygon",points:Nn(e),fill:e.fill??bt[e.kind]??An,label:e.label??"STAGE",role:"stage",stageKind:e.kind}}function Ln(e,t,n,i){let o=[],s=(l,h,a)=>{for(let c=0;c<=8;c++){let u=a+c/8*(Math.PI/2);o.push({x:l+n*Math.cos(u),y:h+i*Math.sin(u)})}};return s(e-n,-t+i,-Math.PI/2),s(e-n,t-i,0),s(-e+n,t-i,Math.PI/2),s(-e+n,-t+i,Math.PI),o}function we(e,t){let n=Math.max(0,e-t),i=[],o=20;for(let r=0;r<=o;r++){let s=-Math.PI/2+r/o*Math.PI;i.push({x:n+t*Math.cos(s),y:t*Math.sin(s)})}for(let r=0;r<=o;r++){let s=Math.PI/2+r/o*Math.PI;i.push({x:-n+t*Math.cos(s),y:t*Math.sin(s)})}return i}var B=(()=>{let t={x:0,y:52},n=25,i={x:70,y:t.y-70},o=(i.x*i.x+i.y*i.y-4900)/(2*(i.y+70)),r=o+70,s=[],l=Math.atan2(i.y-o,i.x),h=Math.atan2(i.y-o,-i.x);for(let a=0;a<=24;a++){let c=l+(h-l)*a/24;s.push({x:r*Math.cos(c),y:o+r*Math.sin(c)})}return{half:70,home:t,backstop:n,fence:s}})();function jn(e,t){let n=e/B.half,i=t/B.half;return[{x:-B.backstop*n,y:t},{x:B.backstop*n,y:t},...B.fence.map(o=>({x:o.x*n,y:o.y*i}))]}var Fn="#f1f5f9";function Pi(e){switch(e){case"pitch-football":return"PITCH";case"rink-hockey":return"RINK";case"track-athletics":return"TRACK";case"oval-cricket":return"OVAL";case"pitch-rugby":return"PITCH";case"diamond-baseball":return"FIELD";case"court-basketball":case"court-tennis":return"COURT";case"ring-boxing":return"RING";default:return"STAGE"}}function ce(e){return Tn(e)}function K(e,t,n,i,o=32){let r=[];for(let s=0;s<o;s++){let l=s/o*gt;r.push({x:e+n*Math.cos(l),y:t+i*Math.sin(l)})}return r}function U(e,t,n,i){return[{x:e-n,y:t-i},{x:e+n,y:t-i},{x:e+n,y:t+i},{x:e-n,y:t+i}]}function Dn(e){let{kind:t,cx:n,cy:i,width:o,height:r}=e,s=(e.rotation??0)*Math.PI/180,l=Math.cos(s),h=Math.sin(s),a=o/2,c=r/2,u=[],m=yt[t],d=f=>m?f/m.width*o:0,y=f=>m?f/m.height*r:0;switch(t){case"pitch-football":{u.push({points:[{x:0,y:-c},{x:0,y:c}],closed:!1}),u.push({points:K(0,0,d(9.15),y(9.15)),closed:!0});for(let f of[-1,1])u.push({points:U(f*(a-d(16.5)/2),0,d(16.5)/2,y(40.32)/2),closed:!0}),u.push({points:U(f*(a-d(5.5)/2),0,d(5.5)/2,y(18.32)/2),closed:!0});break}case"rink-hockey":{u.push({points:[{x:0,y:-c},{x:0,y:c}],closed:!1,ink:"#d63b3b"});for(let f of[-1,1]){u.push({points:[{x:f*d(7.5),y:-c},{x:f*d(7.5),y:c}],closed:!1,ink:"#2f6ecb"}),u.push({points:[{x:f*(a-d(4)),y:-y(11)},{x:f*(a-d(4)),y:y(11)}],closed:!1,ink:"#d63b3b"});for(let g of[-1,1])u.push({points:K(f*d(20.5),g*y(7),d(4.5),y(4.5)),closed:!0,ink:"#2f6ecb"})}u.push({points:K(0,0,d(4.5),y(4.5)),closed:!0,ink:"#2f6ecb"});break}case"track-athletics":{let g=c-y(1.22)*8;g>0&&u.push({points:we(a-d(1.22)*8,g),closed:!0,fill:"#2f7d4f"});for(let v=1;v<8;v++){let E=y(1.22)*v,w=c-E;if(w<=0)break;u.push({points:we(a-d(1.22)*v,w),closed:!0})}break}case"oval-cricket":{u.push({points:K(0,0,d(27.4),y(27.4+20.12/2),40),closed:!0}),u.push({points:U(0,0,d(3.05)/2,y(20.12)/2),closed:!0,ink:"#d8cfae"});break}case"pitch-rugby":{let f=g=>({points:[{x:d(g),y:-c},{x:d(g),y:c}],closed:!1});u.push(f(0));for(let g of[-1,1]){u.push(f(g*50),f(g*28));for(let v=-35;v<35;v+=4)u.push({points:[{x:d(g*10),y:y(v)},{x:d(g*10),y:y(Math.min(35,v+2))}],closed:!1})}break}case"diamond-baseball":{let f=(A,L)=>({x:d(A),y:y(L)}),{home:g}=B,v=27.43,E=v/Math.SQRT2,w={x:g.x+E,y:g.y-E},x={x:g.x,y:g.y-2*E},S={x:g.x-E,y:g.y-E},p={x:g.x,y:g.y-18.44},b="#b98a59",P=bt["diamond-baseball"],M=38.94,C=[f(g.x,g.y)],T=Math.atan2(g.y-M/Math.SQRT2-p.y,M/Math.SQRT2),I=Math.PI-T;for(let A=0;A<=16;A++){let L=T-(T+Math.PI*2-I)%(Math.PI*2)*(A/16);C.push(f(p.x+29*Math.cos(L),p.y+29*Math.sin(L)))}u.push({points:C,closed:!0,fill:b,ink:b});let _={x:g.x,y:g.y-E},O=[{x:g.x,y:g.y},w,x,S].map(A=>f(_.x+(A.x-_.x)*.84,_.y+(A.y-_.y)*.84));u.push({points:O,closed:!0,fill:P,ink:P}),u.push({points:K(d(p.x),y(p.y),d(2.74),y(2.74),20),closed:!0,fill:b,ink:b}),u.push({points:K(d(g.x),y(g.y),d(3.96),y(3.96),20),closed:!0,fill:b,ink:b});let N=B.fence;u.push({points:[f(g.x,g.y),f(N[0].x,N[0].y)],closed:!1}),u.push({points:[f(g.x,g.y),f(N[N.length-1].x,N[N.length-1].y)],closed:!1});for(let A of[w,x,S])u.push({points:U(d(A.x),y(A.y),d(.3),y(.3)),closed:!0,fill:Fn});break}case"court-basketball":{u.push({points:U(0,0,d(14),y(7.5)),closed:!0}),u.push({points:[{x:0,y:-y(7.5)},{x:0,y:y(7.5)}],closed:!1}),u.push({points:K(0,0,d(1.8),y(1.8),24),closed:!0});for(let f of[-1,1]){let g=f*14,v=f*(14-5.8),E=f*(14-1.575);u.push({points:U(d((g+v)/2),0,d(2.9),y(2.45)),closed:!0,fill:"#2f5d8a"}),u.push({points:K(d(v),0,d(1.8),y(1.8),24),closed:!0});let w=Math.sqrt(6.75*6.75-6.6*6.6),x=[{x:d(g),y:-y(6.6)}],S=Math.atan2(-6.6,-f*w),p=2*Math.atan2(6.6,w);for(let b=0;b<=16;b++){let P=S-f*p*(b/16);x.push({x:d(E+6.75*Math.cos(P)),y:y(6.75*Math.sin(P))})}x.push({x:d(g),y:y(6.6)}),u.push({points:x,closed:!1})}break}case"court-tennis":{u.push({points:U(0,0,d(11.885),y(5.485)),closed:!0,fill:"#2b5f99"});for(let f of[-1,1])u.push({points:[{x:-d(11.885),y:f*y(4.115)},{x:d(11.885),y:f*y(4.115)}],closed:!1}),u.push({points:[{x:f*d(6.4),y:-y(4.115)},{x:f*d(6.4),y:y(4.115)}],closed:!1});u.push({points:[{x:-d(6.4),y:0},{x:d(6.4),y:0}],closed:!1}),u.push({points:[{x:0,y:-y(6.4)},{x:0,y:y(6.4)}],closed:!1,ink:"#d1d5db"});break}case"ring-boxing":{u.push({points:U(0,0,d(3.05),y(3.05)),closed:!0});let v=[[-1,-1,"#c53030"],[1,1,"#2b6cb0"],[1,-1,"#e2e8f0"],[-1,1,"#e2e8f0"]];for(let[E,w,x]of v)u.push({points:U(E*d(3.05),w*y(3.05),d(.3),y(.3)),closed:!0,fill:x,ink:x});break}default:return[]}return u.map(f=>({...f,points:f.points.map(g=>xt(g.x,g.y,l,h,n,i))}))}function vi(e){if(e.role!=="stage"||!ce(e.stageKind))return[];let t=null;if(e.x!=null&&e.y!=null&&e.width!=null&&e.height!=null&&e.width>0&&e.height>0&&[e.x,e.y,e.width,e.height].every(Number.isFinite))t={cx:e.x+e.width/2,cy:e.y+e.height/2,width:e.width,height:e.height};else if(e.points&&e.points.length>=3&&e.points.every(n=>Number.isFinite(n.x)&&Number.isFinite(n.y))){let n=e.points.map(c=>c.x),i=e.points.map(c=>c.y),o=Math.min(...n),r=Math.max(...n),s=Math.min(...i),l=Math.max(...i),h=Math.max(1,r-o),a=Math.max(1,l-s);t={cx:o+h/2,cy:s+a/2,width:h,height:a}}return t?Dn({kind:e.stageKind,...t}):[]}function Vn(e){if((e.kind==="polygon"||e.kind==="polyline"||e.kind==="line")&&e.points&&e.points.length>=2)return e.kind==="polygon"?ie(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,i=e.width,o=e.height;return[{x:t,y:n},{x:t+i,y:n},{x:t+i,y:n+o},{x:t,y:n+o}]}function Hn(e,t,n){let i=n*Math.PI/180,o=Math.cos(i),r=Math.sin(i),s=e.x-t.x,l=e.y-t.y;return{x:t.x+s*o-l*r,y:t.y+s*r+l*o}}function St(e){let t=Vn(e);if(!t||t.length<2)return null;let n=e.rotation??0,i=Math.abs(n)<1e-6?t:t.map(h=>Hn(h,{x:t.reduce((a,c)=>a+c.x,0)/t.length,y:t.reduce((a,c)=>a+c.y,0)/t.length},n)),o=1/0,r=1/0,s=-1/0,l=-1/0;for(let h of i)o=Math.min(o,h.x),r=Math.min(r,h.y),s=Math.max(s,h.x),l=Math.max(l,h.y);return!Number.isFinite(o)||s-o<1e-6||l-r<1e-6?null:{minX:o,minY:r,maxX:s,maxY:l}}var Un=5,Gn=3,Xn=.92,Kn=1.9,Bn=2,Yn=.6,zn=1,Wn=.06;function $n(e){return e.heightM!==void 0?e.heightM:e.stageKind==="ring-boxing"?Ce:ce(e.stageKind)?Wn:zn}function Mt(e){let t=1/0,n=1/0,i=-1/0,o=-1/0,r=-1/0;for(let s of _e(e)){let l=s.baseHeightM??0;for(let h of s.objects){if(h.type!=="shape"||h.role!=="stage")continue;let a=St(h);a&&(t=Math.min(t,a.minX),n=Math.min(n,a.minY),i=Math.max(i,a.maxX),o=Math.max(o,a.maxY),r=Math.max(r,l+$n(h)))}}return!Number.isFinite(t)||!Number.isFinite(r)?null:{minX:t,minY:n,maxX:i,maxY:o,deckTopM:r}}function qn(e,t,n,i){let o=1/0,r=1/0,s=-1/0,l=-1/0;for(let d of e)Number.isFinite(d.eyeHeightM)&&(o=Math.min(o,d.x),s=Math.max(s,d.x),r=Math.min(r,d.y),l=Math.max(l,d.y));if(!Number.isFinite(o))return null;let h=o*t,a=r*t,c=Math.max(1,Math.ceil((s-o)*t/n)+1),u=Math.max(1,Math.ceil((l-r)*t/n)+1),m=new Float64Array(c*u).fill(-1/0);for(let d of e){if(!Number.isFinite(d.eyeHeightM))continue;let y=d.eyeHeightM-J,f=Math.min(c-1,Math.max(0,Math.floor((d.x*t-h)/n))),v=Math.min(u-1,Math.max(0,Math.floor((d.y*t-a)/n)))*c+f,E=y+i;E>m[v]&&(m[v]=E)}return{cellM:n,minX:h,minY:a,cols:c,rows:u,top:m}}function Qn(e,t,n){let i=Math.floor((t-e.minX)/e.cellM),o=Math.floor((n-e.minY)/e.cellM);return i<0||o<0||i>=e.cols||o>=e.rows?-1/0:e.top[o*e.cols+i]}function Pt(e,t,n={}){let i=new Map;if(!t||!e.length)return i;let o=n.metresPerChartUnit??Q,r=n.cellM??Yn,s=n.chairBackM??Xn,l=n.selfRowSkipM??Bn,h=n.clearThreshold??.9,a=n.partialThreshold??.25,c=Math.max(1,n.columns??Un),u=Math.max(1,n.rows??Gn),m=qn(e,o,r,s);if(!m)return i;let d=(t.maxX-t.minX)*o,y=(t.maxY-t.minY)*o,f=d>=y,g=(t.minX+t.maxX)/2*o,v=(t.minY+t.maxY)/2*o,E=[];for(let x=0;x<c;x++){let S=(x+.5)/c-.5,p=f?g+S*d:g,b=f?v:v+S*y;for(let P=0;P<u;P++){let M=t.deckTopM+(u===1?0:P/(u-1)*Kn);E.push({x:p,y:b,z:M})}}let w=r/2;for(let x of e){if(!Number.isFinite(x.eyeHeightM))continue;let S=x.x*o,p=x.y*o,b=x.eyeHeightM,P=0,M=1/0;for(let T of E){let I=T.x-S,_=T.y-p,O=Math.hypot(I,_);if(!(O>l)){P++;continue}let N=I/O,A=_/O,L=0;for(let V=l;V<O;V+=w){let Y=Qn(m,S+N*V,p+A*V);if(!(!Number.isFinite(Y)||Y>=b)&&Y>b+(T.z-b)*V/O){L=V;break}}L?M=Math.min(M,L):P++}let C=P/E.length;C>=h||i.set(x.id,{seatId:x.id,mark:C<a?"obstructedView":"restrictedView",visibleFraction:C,totalRays:E.length,atDistanceM:Number.isFinite(M)?M:0})}return i}function vt(e,t){if(!t.size)return 0;let n=0;for(let i of e){let o=t.get(i.id);if(!o)continue;let r=i.commercial;r?.restrictedView!==void 0||r?.obstructedView!==void 0||(i.commercial={...r,[o.mark]:!0},n++)}return n}function Oe(e){return e?e.accessibility?.length?e.wheelchairSpaceType&&!e.accessibility.includes("wheelchair")?["wheelchair",...e.accessibility]:e.accessibility:e.wheelchairSpaceType?["wheelchair"]:e.accessible?["wheelchair"]:[]:[]}var de=Math.PI/180,Jn=9,ee=16;function ke(e,t,n,i){let o=n*de,r=Math.cos(o),s=Math.sin(o);return{x:i.x+e*r-t*s,y:i.y+e*s+t*r}}function Re(e){let{seatCount:t,seatSpacing:n,curve:i,rotation:o,origin:r}=e,s=[];if(e.path)return $e(e.path,t);if(t<=1)return t===1&&s.push({x:r.x,y:r.y}),s;if(i===0){for(let a=0;a<t;a++)s.push(ke(a*n,0,o,r));return s}let l=i/(t-1)*de,h=n/(2*Math.sin(Math.abs(l)/2));for(let a=0;a<t;a++){let c=a*l,u=h*Math.sin(c),m=-h+h*Math.cos(c);s.push(ke(u,m,o,r))}return s}function Ct(e){let t=new Map;if(e.overrides)for(let n of e.overrides)t.set(n.index,n);return t}function Wi(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 Zn(e,t){let n=Ct(e);return Re(e).map((i,o)=>{let r=n.get(o),s=Oe(r),l=Ae(e,o,r),h={...e.commercial,...r?.commercial};return{index:o,x:i.x+(r?.dx??0),y:i.y+(r?.dy??0),label:l,displayLabel:he(e,o,t,r),categoryKey:r?.categoryKey??e.categoryKey,skipped:!!r?.skip,accessible:s.length>0,accessibility:s,wheelchairSpaceType:r?.wheelchairSpaceType,commercial:Object.values(h).some(a=>a!==void 0&&a!==!1&&a!=="")?h:void 0,glyph:r?.glyph,viewUrl:r?.viewFromSeatUrl??e.viewFromSeatUrl,viewMeta:r?.viewFromSeatUrl?r.viewFromSeatMeta:e.viewFromSeatMeta,labelStyle:r?.labelStyle??e.seatLabelStyle}})}function eo(e){let t=[];for(let n of Zn(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 to(e){if(e.seatCountsBySide)return{...e.seatCountsBySide};let t=e.sides&&e.sides.length?e.sides:["top","bottom"],n=["top","bottom","left","right"].filter(r=>t.includes(r)),i={top:0,bottom:0,left:0,right:0};if(!n.length)return i;let o=Math.max(0,Math.round(e.seatCount));for(let r=0;r<o;r++)i[n[r%n.length]]+=1;return i}function _t(e){let t=[],n=Math.max(0,Math.round(e.seatCount));if(n===0)return t;let i=new Map((e.overrides??[]).map(c=>[c.index,c])),o=(c,u,m,d)=>{let y=i.get(c),f=Oe(y),g=y?.label??Ne(e,c);return{index:c,label:g,displayLabel:y?.displayLabel??Le(e,c),x:u+(y?.dx??0),y:m+(y?.dy??0),categoryKey:y?.categoryKey??e.categoryKey,skipped:!!y?.skip,accessible:f.length>0,accessibility:f,wheelchairSpaceType:y?.wheelchairSpaceType,commercial:y?.commercial,glyph:y?.glyph,viewUrl:y?.viewFromSeatUrl,viewMeta:y?.viewFromSeatUrl?y.viewFromSeatMeta:void 0,labelStyle:y?.labelStyle,...d?{side:d}:{}}};if(e.shape==="round"){let c=(e.radius??40)+ee,u=e.rotation*de,m=Math.max(0,Math.min(360,e.seatArc??360));if(m>=360||n===1){for(let g=0;g<n;g++){let v=u+g/n*2*Math.PI;t.push(o(g,e.center.x+c*Math.cos(v),e.center.y+c*Math.sin(v)))}return t}let d=m*de,y=(2*Math.PI-d)/2,f=u+y;for(let g=0;g<n;g++){let v=f+g/(n-1)*d;t.push(o(g,e.center.x+c*Math.cos(v),e.center.y+c*Math.sin(v)))}return t}let r=e.width??80,s=e.height??50,l=to(e),h=["top","bottom","left","right"],a=0;for(let c of h){let u=l[c];for(let m=0;m<u;m++){let d,y;c==="top"?(d=-r/2+(m+.5)*r/u,y=-s/2-ee):c==="bottom"?(d=-r/2+(m+.5)*r/u,y=s/2+ee):c==="left"?(d=-r/2-ee,y=-s/2+(m+.5)*s/u):(d=r/2+ee,y=-s/2+(m+.5)*s/u);let f=ke(d,y,e.rotation,e.center);t.push(o(a++,f.x,f.y,c))}}return t}function $i(e){return e.bookAsWhole||e.variableOccupancy?Math.max(0,Math.round(e.seatCount)):_t(e).filter(t=>!t.skipped).length}function no(e){return _t(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 oo(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 Z(e,t){let n=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){let r=t[i].x,s=t[i].y,l=t[o].x,h=t[o].y;s>e.y!=h>e.y&&e.x<(l-r)*(e.y-s)/(h-s)+r&&(n=!n)}return n}function Ie(e,t){return t.some((n,i)=>{let o=t[(i+1)%t.length],r=(e.y-n.y)*(o.x-n.x)-(e.x-n.x)*(o.y-n.y);if(Math.abs(r)>1e-7)return!1;let s=(e.x-n.x)*(o.x-n.x)+(e.y-n.y)*(o.y-n.y),l=(o.x-n.x)**2+(o.y-n.y)**2;return s>=-1e-7&&s<=l+1e-7})}function X(e){return Array.isArray(e)?e.filter(t=>Array.isArray(t)&&t.length>=3):[]}function fe(e,t,n){return Z(e,t)&&!X(n).some(i=>Z(e,i)||Ie(e,i))}function qi(e,t){return tt(e,t).point}function ue(e){if(!e.length)return{x:0,y:0};let t=0,n=0;for(let i of e)t+=i.x,n+=i.y;return{x:t/e.length,y:n/e.length}}function Ot(e){switch(e.type){case"row":{let t=Re(e),n=Ct(e),i=0,o=0,r=0;for(let s=0;s<t.length;s++){let l=n.get(s);l?.skip||(i+=t[s].x+(l?.dx??0),o+=t[s].y+(l?.dy??0),r++)}return r?{x:i/r,y:o/r}:{x:e.origin.x,y:e.origin.y}}case"table":case"booth":return{x:e.center.x,y:e.center.y};case"gaArea":return ue(e.points);case"section":return ue(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?ue(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 Et(e,t){return e.length===t.length&&e.every((n,i)=>n.x===t[i].x&&n.y===t[i].y)}function io(e,t){if(e.type!=="gaArea"||!Et(e.points,t.outline))return!1;let n=X(e.holes),i=X(t.holes);return n.length===i.length&&n.every((o,r)=>Et(o,i[r]))}function ro(e,t,n=e.filter(o=>o.type==="section"),i=Ot(t)){let o="referenceInventorySource"in t?t.referenceInventorySource?.logicalSectionId:void 0;return(o?n.find(s=>(s.logicalSectionId??s.id)===o&&(io(t,s)||fe(i,s.outline,s.holes))):void 0)??n.find(s=>fe(i,s.outline,s.holes))}function _e(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 Qi(e,t){let n=_e(e);return(t?n.find(i=>i.id===t):n[0])?.objects??[]}function so(e){return e.floors&&e.floors.length?e.floors.flatMap(t=>t.objects):e.objects}function ao(e,t,n){let i=r=>({x:r.x+t,y:r.y+n}),o=r=>r.map(i);switch(e.type){case"row":return{...e,origin:i(e.origin)};case"table":case"booth":return{...e,center:i(e.center)};case"gaArea":return{...e,points:o(e.points),...e.holes?{holes:X(e.holes).map(o)}:{}};case"section":return{...e,outline:o(e.outline),...e.outlinePath?{outlinePath:at(e.outlinePath,t,n)}:{},...e.holes?{holes:X(e.holes).map(o)}:{}};case"text":return{...e,position:i(e.position)};case"shape":return{...e,...e.points?{points:o(e.points)}:{},...e.holes?{holes:X(e.holes).map(o)}:{},...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 Ji(e,t=900){if(!e.floors||e.floors.length<2)return e;let n=[];return e.floors.forEach((i,o)=>{let r=-o*t;for(let s of i.objects)n.push(r===0?s:ao(s,0,r))}),{...e,objects:n,floors:void 0}}function It(e,t,n,i,o,r,s,l,h){let a=[],c=e.filter(f=>f.type==="section"),u=ct(e),m=f=>!f?.eventConfigurationId||f.eventConfigurationId===i&&(f.eventConfigurationVersion===void 0||f.eventConfigurationVersion===h),d=f=>je(f,{activeConfigurationId:i,activeConfigurationVersion:h,activeBasisSha256:o,now:l}),y=(f,g)=>d(f)?{...f,coverage:g}:void 0;for(let f of e){let g=[];if(f.type==="row"?g=eo(f):f.type==="table"?g=no(f):f.type==="booth"&&(g=oo(f)),!g.length)continue;for(let S of g)S.viewUrl&&!m(S.viewMeta)&&(S.viewUrl=void 0,S.viewMeta=void 0);if(f.type==="row"){let S=u.get(f.id);if(S){let p=new Map((f.overrides??[]).map(b=>[b.index,b]));for(let b of g){let P=Number(b.id.slice(b.id.lastIndexOf(":")+1));if(!Number.isInteger(P))continue;b.logicalRowId=S.groupId,b.logicalSeatIndex=S.adjacencyOffset+P,p.get(P)?.displayLabel||(b.displayLabel=he(f,P,S)),!b.viewUrl&&S.viewFromSeatUrl&&m(S.viewFromSeatMeta)&&(b.viewUrl=S.viewFromSeatUrl,b.viewMeta=S.viewFromSeatMeta);let M=p.get(P)?.confidenceEvidence;b.confidenceEvidence=y(M,"exact-seat")??y(f.confidenceEvidence,"row-representative")??y(S.confidenceEvidence,"row-representative")}}}let v=ro(e,f,c,f.type==="row"?ue(g):Ot(f)),E=v?.viewFromSeatUrl,x=(v?.zone?t?.find(S=>S.id===v.zone):void 0)?.focalPoint??n;for(let S of g){if(!S.confidenceEvidence){let p=Number(S.id.slice(S.id.lastIndexOf(":")+1)),b=(f.type==="row"||f.type==="table")&&Number.isInteger(p)?f.overrides?.find(P=>P.index===p)?.confidenceEvidence:void 0;S.confidenceEvidence=y(b,"exact-seat")??(f.type==="row"?y(f.confidenceEvidence,"row-representative"):void 0)}S.confidenceEvidence??=y(v?.confidenceEvidence,"section-representative")??(s?y(s.evidence,s.coverage):void 0),!S.viewUrl&&E&&m(v?.viewFromSeatMeta)&&(S.viewUrl=E,S.viewMeta=v?.viewFromSeatMeta),!S.viewUrl&&r&&m(r.meta)&&(S.viewUrl=r.url,S.viewMeta=r.meta),v&&(S.sectionId=v.logicalSectionId??v.id),v?.zone&&(S.zoneId=v.zone),x&&(S.focalPoint={...x})}a.push(...g)}return a}function Zi(e,t={}){if(e.floors?.length){let i=[];for(let o of e.floors){let r=o.focalPoint??e.focalPoint,s=o.viewFromSeatUrl?{url:o.viewFromSeatUrl,meta:o.viewFromSeatMeta}:e.viewFromSeatUrl?{url:e.viewFromSeatUrl,meta:e.viewFromSeatMeta}:void 0,l=o.confidenceEvidence?{evidence:o.confidenceEvidence,coverage:"floor-representative"}:e.confidenceEvidence?{evidence:e.confidenceEvidence,coverage:"venue-representative"}:void 0,h=It(o.objects,e.zones,r,e.eventConfigurationId,e.confidenceBasisSha256,s,l,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);t.resolveEyeHeights!==!1&&wt(o.objects,o.focalPoint??e.focalPoint,o.baseHeightM??0,h);for(let a of h)a.floorId=o.id;for(let a of h)i.push(a)}return i}let n=It(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&&wt(e.objects,e.focalPoint,t.floorBaseHeightM??0,n),co(e,n,t)}function co(e,t,n){return!n.deriveRestrictedView||e.derivedRestrictedView===!1||n.resolveEyeHeights===!1||vt(t,Pt(t,Mt(e))),t}function wt(e,t,n,i){let o=e.filter(u=>u.type==="section"),r=n>0||o.some(u=>u.height!==void 0||u.rake!==void 0||(u.elevation??0)>0);if(!o.length||!r||!t){for(let u of i)u.eyeHeightM=n+J;return}let s=new Array(i.length),l=new Map;for(let u of o)l.has(u.id)||l.set(u.id,u);let h=new Map,a=new Map;for(let u=0;u<i.length;u++){let m=i[u],y=(m.sectionId?l.get(m.sectionId)??o.find(g=>g.logicalSectionId===m.sectionId&&fe({x:m.x,y:m.y},g.outline,g.holes)):void 0)??o.find(g=>fe({x:m.x,y:m.y},g.outline,g.holes))??null;if(s[u]=y,!y)continue;h.has(y.id)||h.set(y.id,ut(y,{floorBaseHeightM:n}));let f=a.get(y.id);f?f.push(u):a.set(y.id,[u])}let c=new Array(i.length).fill(void 0);for(let[u,m]of a){let d=h.get(u);if(!d)continue;let y=d.rake>0?Math.tan(d.rake*Math.PI/180):0,f=mt(u,i,m,t);for(let g of f.rows){let v=g.blockDepth*Q*y,E=d.height+v;for(let w of g.seatIndices)c[w]=E}}for(let u=0;u<i.length;u++){let m=i[u],d=s[u];if(!d){m.eyeHeightM=n+J;continue}let y=h.get(d.id);m.eyeHeightM=(c[u]??y.height)+J}}var le=40;function er(e,t){let n=t?.freeText==="exclude",i=1/0,o=1/0,r=-1/0,s=-1/0,l=(a,c)=>{a<i&&(i=a),c<o&&(o=c),a>r&&(r=a),c>s&&(s=c)},h=a=>{if(Array.isArray(a))for(let c of a)!c||typeof c!="object"||l(c.x,c.y)};for(let a of so(e))if(a.type==="row"){let c=new Map((a.overrides??[]).map(u=>[u.index,u]));Re(a).forEach((u,m)=>{let d=c.get(m);d?.skip||l(u.x+(d?.dx??0),u.y+(d?.dy??0))})}else if(a.type==="gaArea")h(a.points);else if(a.type==="section")h(a.outline);else if(a.type==="decorImage")l(a.x,a.y),l(a.x+a.width,a.y+a.height);else if(a.type==="shape")a.points&&a.points.length?h(ie(a)):a.x!=null&&a.y!=null&&a.width!=null&&a.height!=null&&(l(a.x,a.y),l(a.x+a.width,a.y+a.height));else if(a.type==="table"){let c=ee+Jn,u=a.shape==="round"?(a.radius??40)+c:Math.max((a.width??80)/2,(a.height??50)/2)+c;l(a.center.x-u,a.center.y-u),l(a.center.x+u,a.center.y+u)}else if(a.type==="booth"){let c=Math.max(a.width,a.height)/2;l(a.center.x-c,a.center.y-c),l(a.center.x+c,a.center.y+c)}else if(a.type==="text"){if(n)continue;let c=Ke(a);l(a.position.x,a.position.y),l(a.position.x+c.width,a.position.y+c.height)}for(let a of[e.referenceImage,e.backgroundImage]){if(!a)continue;let{center:c,width:u}=a;if(!c||!Number.isFinite(c.x)||!Number.isFinite(c.y)||!Number.isFinite(u))continue;let m=u*3/4;l(c.x-u/2,c.y-m/2),l(c.x+u/2,c.y+m/2)}if(!isFinite(i)){let a=e.focalPoint??{x:0,y:0};return{x:a.x-200,y:a.y-200,width:400,height:400}}return{x:i-le,y:o-le,width:r-i+le*2,height:s-o+le*2}}export{lo as a,Nt as b,Fe as c,Lt as d,fo as e,jt as f,ho as g,te as h,me as i,yo as j,bo as k,go as l,xo as m,So as n,Mo as o,Po as p,Eo as q,Io as r,wo as s,Co as t,_o as u,Oo as v,ko as w,Ro as x,To as y,Ke as z,No as A,Lo as B,Yt as C,jo as D,be as E,Vo as F,$e as G,Ho as H,Uo as I,Wt as J,Ze as K,Xo as L,tt as M,qt as N,Bo as O,$o as P,rt as Q,st as R,at as S,en as T,qo as U,tn as V,on as W,Qo as X,sn as Y,Se as Z,Jo as _,ai as $,di as aa,On as ba,ie as ca,fi as da,hi as ea,mi as fa,ei as ga,ti as ha,ni as ia,ct as ja,Q as ka,ve as la,un as ma,ii as na,dn as oa,lt as pa,Me as qa,fn as ra,hn as sa,mn as ta,J as ua,ut as va,ft as wa,gn as xa,mt as ya,bi as za,Tn as Aa,gi as Ba,xi as Ca,Si as Da,Nn as Ea,Mi as Fa,Fn as Ga,Pi as Ha,vi as Ia,Oe as Ja,ee as Ka,Re as La,Wi as Ma,Zn as Na,eo as Oa,to as Pa,_t as Qa,$i as Ra,no as Sa,oo as Ta,Z as Ua,Ie as Va,X as Wa,fe as Xa,qi as Ya,Ot as Za,ro as _a,_e as $a,Qi as ab,so as bb,ao as cb,Ji as db,Zi as eb,er as fb};