@seatlayer/core 0.54.0 → 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{categoryInventory-B4xo7hE2.d.ts → categoryInventory-BwarniiK.d.ts} +1 -1
- package/dist/{categoryInventory-lRtu3VjD.d.cts → categoryInventory-D3qPwfKz.d.cts} +1 -1
- package/dist/chunk-6XJN4REG.js +1 -0
- package/dist/{chunk-3QLFGEQY.js → chunk-DNGP2HDT.js} +1 -1
- package/dist/{chunk-QUKWJQLR.js → chunk-HHM3PB66.js} +1 -1
- package/dist/{chunk-EYROIZGQ.js → chunk-PXWKSYCK.js} +1 -1
- package/dist/chunk-VI2CLV3Y.js +1 -0
- package/dist/core/chart-ops/index.cjs +1 -1
- package/dist/core/chart-ops/index.d.cts +4 -4
- package/dist/core/chart-ops/index.d.ts +4 -4
- package/dist/core/chart-ops/index.js +1 -1
- package/dist/core/inventory/index.cjs +1 -1
- package/dist/core/inventory/index.d.cts +4 -4
- package/dist/core/inventory/index.d.ts +4 -4
- package/dist/core/inventory/index.js +1 -1
- package/dist/core/layout/index.d.cts +4 -4
- package/dist/core/layout/index.d.ts +4 -4
- package/dist/core/quality/index.cjs +1 -1
- package/dist/core/quality/index.d.cts +3 -3
- package/dist/core/quality/index.d.ts +3 -3
- package/dist/core/quality/index.js +1 -1
- package/dist/core/render-assets/index.cjs +1 -1
- package/dist/core/render-assets/index.d.cts +1 -1
- package/dist/core/render-assets/index.d.ts +1 -1
- package/dist/core/render-assets/index.js +1 -1
- package/dist/core/seatConfidence.d.cts +1 -1
- package/dist/core/seatConfidence.d.ts +1 -1
- package/dist/core/sections/index.d.cts +5 -5
- package/dist/core/sections/index.d.ts +5 -5
- package/dist/{de-75NWRKC5.js → de-WPX4D3SY.js} +1 -1
- package/dist/{es-BM7EJ7PW.js → es-6KAJQVVX.js} +1 -1
- package/dist/{fr-HPXQHIB4.js → fr-5DTMRBN5.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +57 -12
- package/dist/index.d.ts +57 -12
- package/dist/index.js +1 -1
- package/dist/{labeling-w8bl86cb.d.ts → labeling-BmCzW50y.d.ts} +1 -1
- package/dist/{labeling-CsPt1mC_.d.cts → labeling-VfJBEOn0.d.cts} +1 -1
- package/dist/{layout-B5UYbwnv.d.ts → layout-ClQkmixY.d.ts} +3 -3
- package/dist/{layout-YFmuxw_M.d.cts → layout-Dlv5bIf2.d.cts} +3 -3
- package/dist/{renderedQuality-DbZM034G.d.ts → renderedQuality-B3jgdgPO.d.ts} +1 -1
- package/dist/{renderedQuality-CugJarFp.d.cts → renderedQuality-bDkUOyBL.d.cts} +1 -1
- package/dist/{renderer-IBi9YKWR.d.ts → renderer-B_g-W_QB.d.ts} +4 -1
- package/dist/{renderer-DhUHFtsI.d.cts → renderer-DySMcKAR.d.cts} +4 -1
- package/dist/{sections-mLOZrGrI.d.ts → sections-DIzgtDjF.d.ts} +1 -1
- package/dist/{sections-B7cDF0Nq.d.cts → sections-Dna1nZgR.d.cts} +1 -1
- package/dist/{segmentedRowModel-CGoH684F.d.cts → segmentedRowModel-BNXEUeHp.d.cts} +1 -1
- package/dist/{segmentedRowModel-BPTnJ7Tz.d.ts → segmentedRowModel-COXw4GCh.d.ts} +1 -1
- package/dist/{ticketRestrictions-BwAebpSK.d.cts → ticketRestrictions-CzchbX_o.d.cts} +2 -2
- package/dist/{ticketRestrictions-ChHJwvTq.d.ts → ticketRestrictions-DaYOCpEw.d.ts} +2 -2
- package/dist/{types-COfJorq_.d.cts → types-DTSG6_Hq.d.cts} +5 -4
- package/dist/{types-COfJorq_.d.ts → types-DTSG6_Hq.d.ts} +5 -4
- package/dist/view3d/crossfade/panorama.d.cts +1 -1
- package/dist/view3d/crossfade/panorama.d.ts +1 -1
- package/dist/view3d/index.cjs +27 -27
- package/dist/view3d/index.d.cts +109 -3
- package/dist/view3d/index.d.ts +109 -3
- package/dist/view3d/index.js +27 -27
- package/package.json +1 -1
- package/dist/chunk-6LIPQU4G.js +0 -1
- package/dist/chunk-DDE7IOFT.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var S="seatmap.chart";var c=[{key:"wheelchair",label:"Wheelchair space",short:"Wheelchair",icon:"\u267F"},{key:"companion",label:"Companion seat",short:"Companion",icon:"\u{1F9D1}\u200D\u{1F91D}\u200D\u{1F9D1}"},{key:"semi-ambulatory",label:"Semi-ambulatory (limited mobility)",short:"Limited mobility",icon:"\u{1F9AF}"},{key:"designated-aisle",label:"Designated aisle / transfer seat",short:"Aisle transfer",icon:"AS"},{key:"step-free",label:"Step-free accessible seat",short:"Step-free",icon:"SF"},{key:"hearing",label:"Assistive listening",short:"Hearing",icon:"\u{1F9BB}"},{key:"cart",label:"CART live-caption view",short:"CART captions",icon:"CC"},{key:"sign-language",label:"Sign-language view",short:"Sign language",icon:"\u{1F91F}"},{key:"low-vision",label:"Blind / low-vision viewing",short:"Low vision",icon:"LV"},{key:"sensory-friendly",label:"Quiet / sensory-friendly seating",short:"Sensory-friendly",icon:"QS"},{key:"plus-size",label:"Plus-size seat",short:"Plus-size",icon:"\u{1F4BA}"},{key:"lift-armrest",label:"Lift-up armrest",short:"Lift armrest",icon:"\u2195\uFE0F"}],l=new Map(c.map(e=>[e.key,e]));function h(e){return l.get(e)}var d={wheelchair:"#3b82f6",companion:"#8b5cf6","semi-ambulatory":"#0ea5e9","designated-aisle":"#0284c7","step-free":"#16a34a",hearing:"#14b8a6",cart:"#7c3aed","sign-language":"#f59e0b","low-vision":"#d97706","sensory-friendly":"#6366f1","plus-size":"#ec4899","lift-armrest":"#22c55e"};function x(e){let t=e?.[0];return t&&d[t]||"#3b82f6"}var u=[{key:"obstructedView",label:"Obstructed view",short:"Obstructed",icon:"\u26D4"},{key:"restrictedView",label:"Restricted view",short:"Restricted",icon:"\u{1F441}"},{key:"premium",label:"Premium seat",short:"Premium",icon:"\u2605"}],b=new Map(u.map(e=>[e.key,e]));function C(e){return b.get(e)}var w=8,R=24,g=["reference-focal","bar","entrance","exit","restroom","screen","sound","concession","coat","wall","rail","suite","obstruction"],m=new Set(g);function I(e){switch(e.type){case"row":case"table":case"gaArea":case"booth":case"section":return"interactive";case"decorImage":return e.layer==="foreground"?"foreground":"background";case"shape":return e.role&&m.has(e.role)?"surroundings":"background";case"text":return"background";default:return"interactive"}}function p(e){let t=0;for(let r=0,i=e.length;r<i;r+=1){let o=e[r],a=e[(r+1)%i];t+=o.x*a.y-a.x*o.y}return t/2}function M(e){return p(e)*2}function T(e,t,r){let i=!1;for(let o=0,a=e.length-1;o<e.length;a=o++){let n=e[o],s=e[a];n.y>r!=s.y>r&&t<(s.x-n.x)*(r-n.y)/(s.y-n.y)+n.x&&(i=!i)}return i}function y(e){let t=1/0,r=1/0,i=-1/0,o=-1/0,a=!1;for(let n of e)!Number.isFinite(n.x)||!Number.isFinite(n.y)||(a=!0,n.x<t&&(t=n.x),n.y<r&&(r=n.y),n.x>i&&(i=n.x),n.y>o&&(o=n.y));return a?{minX:t,minY:r,maxX:i,maxY:o}:null}function F(e){let t=y(e);return t?f(t):null}function f(e){return{x:e.minX,y:e.minY,width:e.maxX-e.minX,height:e.maxY-e.minY}}function D(e,t){return e.minX<=t.maxX&&t.minX<=e.maxX&&e.minY<=t.maxY&&t.minY<=e.maxY}export{S as a,c as b,h as c,d,x as e,u as f,C as g,w as h,R as i,g as j,I as k,p as l,M as m,T as n,y as o,F as p,D as q};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function k(e){return e.referenceImage??(e.backgroundImage?.assetId?e.backgroundImage:void 0)}function
|
|
1
|
+
function k(e){return e.referenceImage??(e.backgroundImage?.assetId?e.backgroundImage:void 0)}function g(e){let n=e.backgroundImage;return n?.url&&!n.assetId?n:void 0}function t(e){let n=g(e);if(!n?.url)return;let{calibration:a,derivedScale:r,assetId:b,...u}=n;return u}function v(e){let n=a=>{let r=a.backgroundImage;r?.assetId&&(a.referenceImage||(a.referenceImage=r,a.backgroundImage=void 0))};n(e);for(let a of e.floors??[])n(a);return e}function o(e){let n={...e};return delete n.referenceScan,delete n.referenceInventorySource,delete n.referenceSource,delete n.referenceInventoryExclusion,delete n.editor,n}function p(e){let n={...e};return delete n.referenceCategorySource,n}function y(e){let n=t(e),a=e.floors?.map(r=>({...r,objects:r.objects.map(o),referenceImage:void 0,backgroundImage:t(r)}));return{...e,categories:e.categories.map(p),objects:e.objects.map(o),referenceImage:void 0,backgroundImage:n,...a?{floors:a}:{}}}function I(e){return!!e.referenceImage?.assetId&&!!e.backgroundImage?.assetId&&e.referenceImage.assetId!==e.backgroundImage.assetId}var E=24,S=2,C={facilities:"Facilities","food-drink":"Food & drink",navigation:"Getting around",accessibility:"Accessibility"},V=["facilities","food-drink","navigation","accessibility"],i="M13 4.6a1.6 1.6 0 1 0-3.2 0 1.6 1.6 0 0 0 3.2 0 M11 6.5V13h5l2.4 6 M15 16.4A5 5 0 1 1 9 11.3",c=[{key:"restroom-men",label:"Men's restroom",group:"facilities",path:"M16 7a4 4 0 1 0-8 0 4 4 0 0 0 8 0 M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"},{key:"restroom-women",label:"Women's restroom",group:"facilities",path:"M15 5a3 3 0 1 0-6 0 3 3 0 0 0 6 0 M12 8l-4 10h8l-4-10 M10 18v4 M14 18v4"},{key:"restroom-accessible",label:"Accessible restroom",group:"facilities",path:i},{key:"first-aid",label:"First aid",group:"facilities",path:"M5 4h14a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Z M12 8v8 M8 12h8"},{key:"coat-check",label:"Coat check",group:"facilities",path:"M12 6a2 2 0 0 1 0-4 2 2 0 0 1 1.6 3.2L21 13H3l8.4-7.8 M3 13h18"},{key:"atm",label:"ATM / cash",group:"facilities",path:"M2 6h20v12H2V6Z M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0 M6 9h.01 M18 15h.01"},{key:"info",label:"Info point",group:"facilities",path:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18 M12 11v5 M12 8h.01"},{key:"lost-found",label:"Lost & found",group:"facilities",path:"M11 4a7 7 0 1 0 0 14 7 7 0 0 0 0-14 M16 16l5 5 M9 8.5a2 2 0 1 1 3 1.7c-.8.5-1 .8-1 1.8 M11 15h.01"},{key:"restrooms",label:"Restrooms",group:"facilities",path:"M6 3h12a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z M12 8a2 2 0 1 0 0 4 2 2 0 0 0 0-4 M9 18v-3.5a3 3 0 0 1 6 0V18"},{key:"charging",label:"Charging point",group:"facilities",path:"M3 8h13v8H3V8Z M16 10h3v4h-3 M9.6 9l-2 3.5h2.5l-1.5 3"},{key:"smoking",label:"Smoking area",group:"facilities",path:"M2 15h13v3H2v-3Z M18 16h2 M19 8c0 1 1 1.5 1 2.5S19 12 19 13"},{key:"no-smoking",label:"No smoking",group:"facilities",path:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18 M5.6 5.6l12.8 12.8 M7 13h6v2H7v-2Z"},{key:"food",label:"Food",group:"food-drink",path:"M7 3v6a2 2 0 0 0 4 0V3 M9 11v10 M17 3c-1.6 1-2.2 3-2.2 6 0 2 .9 3.2 2.2 3.6V21"},{key:"bar",label:"Bar",group:"food-drink",path:"M4 5h16l-8 8-8-8Z M12 13v6 M8 20h8"},{key:"coffee",label:"Caf\xE9 / coffee",group:"food-drink",path:"M4 8h13v4a5 5 0 0 1-5 5H9a5 5 0 0 1-5-5V8Z M17 9h2a2 2 0 0 1 0 4h-2 M8 2v2 M11 2v2 M4 21h14"},{key:"water",label:"Water / drinks",group:"food-drink",path:"M12 22a7 7 0 0 1-7-7c0-5 7-12 7-12s7 7 7 12a7 7 0 0 1-7 7Z"},{key:"merch",label:"Merch / shop",group:"food-drink",path:"M6 8h12l-1 12H7L6 8Z M9 8V6a3 3 0 0 1 6 0v2"},{key:"screen",label:"Screen",group:"facilities",path:"M3 4h18v12H3V4Z M9 20h6 M12 16v4 M10 8l4 2-4 2V8Z"},{key:"sound-booth",label:"Sound booth",group:"facilities",path:"M6 4v16 M6 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4 M12 4v16 M12 8a2 2 0 1 0 0 4 2 2 0 0 0 0-4 M18 4v16 M18 12a2 2 0 1 0 0 4 2 2 0 0 0 0-4"},{key:"entrance",label:"Entrance",group:"navigation",path:"M14 3h5a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-5 M3 12h11 M10 8l4 4-4 4"},{key:"exit",label:"Exit",group:"navigation",path:"M10 3H5a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h5 M14 12h7 M17 8l4 4-4 4"},{key:"emergency-exit",label:"Emergency exit",group:"navigation",path:"M14 4.6a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0 M12.5 8l-3.5 2 1.6 3.6-2 4.4 M12.5 10l3.5 1.5 M9 10.5l-3.5 1 M15 12h6 M18 9l3 3-3 3"},{key:"stairs",label:"Stairs",group:"navigation",path:"M3 20v-4h4v-4h4v-4h4V4h5"},{key:"elevator",label:"Elevator",group:"navigation",path:"M5 3h14a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z M8 11l1.5-2 1.5 2 M8 14l1.5 2 1.5-2 M15 8v8"},{key:"parking",label:"Parking",group:"navigation",path:"M5 3h14a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z M9 17V7h4a3 3 0 0 1 0 6H9"},{key:"wheelchair",label:"Wheelchair access",group:"accessibility",path:i},{key:"hearing",label:"Hearing assistance",group:"accessibility",path:"M8 20a4 4 0 0 1-2-3c0-1 .5-2 .5-3a4.5 4.5 0 1 1 9 0c0 1.4-1 2-2 2.4-1.2.5-1.5 1-1.5 2.2 M17 6a5 5 0 0 1 1 6 M19.5 4a8 8 0 0 1 1.2 9"}],_={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"},s=new Map(c.map(e=>[e.key,e]));function h(e){return e?s.get(e):void 0}function x(e){return h(e)?.path}function L(e){return typeof e=="string"&&s.has(e)}var O=c.map(e=>e.key);var N=["butt","round","square"],A=["miter","round","bevel"],P=["none","arrow"],d="round",M="round",l="none";function f(e){return e==="line"||e==="polyline"}function Z(e){return e==="polygon"||f(e)}function R(e){return{lineCap:e.lineCap??d,lineJoin:e.lineJoin??M,startEnding:e.startEnding??l,endEnding:e.endEnding??l}}function j(e){return{pointerLength:Math.min(48,Math.max(8,e*3)),pointerWidth:Math.min(40,Math.max(8,e*2.25))}}export{k as a,g as b,v as c,y as d,I as e,E as f,S as g,C as h,V as i,c as j,_ as k,h as l,x as m,L as n,O as o,N as p,A as q,P as r,d as s,M as t,l as u,f as v,Z as w,R as x,j as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as P,r as b}from"./chunk-6LIPQU4G.js";var Z=3,f=4.5,S=3,j=24,ee=20;function E(t){return t.filter(s=>s.visible&&!!s.screenBox)}function v(t,s){return t.x<s.x+s.width&&t.x+t.width>s.x&&t.y<s.y+s.height&&t.y+t.height>s.y}function m(t){return t.length?Math.round(Math.min(...t)*100)/100:null}function o(t,s,a){return a.length?{code:t,message:s,count:a.length,samples:a.slice(0,ee)}:null}function L(t,s,a){return{primaryId:t.seatId,primaryLabel:t.label,...s==null?{}:{measured:Math.round(s*100)/100},...a==null?{}:{minimum:a}}}function Q(t,s,a){return{primaryId:t.id,primaryLabel:t.label,...s==null?{}:{measured:Math.round(s*100)/100},...a==null?{}:{minimum:a}}}function H(t,s,a){return{primaryId:t.objectId,primaryLabel:t.text,...s==null?{}:{measured:Math.round(s*100)/100},...a==null?{}:{minimum:a}}}function x(t,s,a,l){return{primaryId:t,primaryLabel:s,secondaryId:a,secondaryLabel:l}}function ie(t,s="overview",a=null){let l=E(t.labels),c=E(t.hierarchyLabels),d=E(t.freeTextLabels),B=t.gaAreas.filter(e=>e.visible),O=l.map(e=>b(e.ink,e.fill)??0),D=c.map(e=>b(e.ink,e.fill)??0),$=d.map(e=>b(e.ink,e.background)??0),W=B.map(e=>b(e.effectiveBackground,t.canvasBackground)??0),u=a?t.labels.filter(e=>e.categoryKey===a):t.labels,y=a?t.gaAreas.filter(e=>e.categoryKey===a):t.gaAreas,p=u.filter(e=>e.selected),h=u.filter(e=>e.status==="held"),g=u.filter(e=>e.status==="booked"),k=u.filter(e=>e.pointerTarget.active),V=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)]),w=p.length?m(p.flatMap(e=>[b(t.selectionRingColor,t.canvasBackground)??0,b(t.selectionRingColor,e.fill)??0])):null,n=[],I=(e,i)=>Array.from({length:e},(T,R)=>({primaryId:`overview:${R+1}`,primaryLabel:i}));if(s==="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=>L(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),s==="interaction"){let e=u.length>0,i=y.length>0,T=e||i,R=y.filter(r=>r.visible),X=new Set([...u.flatMap(r=>r.sectionId?[r.sectionId]:[]),...y.flatMap(r=>r.sectionId?[r.sectionId]:[])]),Y=new Set([...t.labels.map(r=>r.categoryKey),...t.gaAreas.map(r=>r.categoryKey)]),A=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",T&&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",T&&!u.some(A)&&!R.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&&!k.some(A)||!e&&i&&!R.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",k.filter(r=>A(r)&&r.pointerTarget.effectiveMinimumPx<j).map(r=>L(r,r.pointerTarget.effectiveMinimumPx,j)))),n.push(o("selected-state-missing","Interaction evidence must paint a selected unit and its renderer-owned ring",e&&(!p.length||!p.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 canvas",p.length&&(w??0)<S?[{primaryId:p[0].seatId,primaryLabel:p[0].label,measured:Math.round((w??0)*100)/100,minimum:S}]:[])),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&&!h.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&&!g.length?[{primaryId:"renderer",primaryLabel:"booked state"}]:[]));let q=new Set(h.map(r=>`${r.fill.toLowerCase()}:${r.opacity}`)),J=new Set(g.map(r=>`${r.fill.toLowerCase()}:${r.opacity}`));n.push(o("status-state-indistinct","Held and taken evidence must resolve to distinct renderer paint",h.length&&g.length&&[...q].some(r=>J.has(r))?[{primaryId:h[0].seatId,primaryLabel:h[0].label,secondaryId:g[0].seatId,secondaryLabel:g[0].label}]:[])),n.push(o("section-focus-missing","Interaction evidence must exercise section focus and its backdrop when section membership exists",X.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",Y.size>=2&&(!t.categoryFilterKeys||!t.categoryFilterKeys.length)?[{primaryId:"renderer",primaryLabel:"category filter"}]:[]));let F=t.labels.filter(r=>r.status==="free"&&!r.selected&&t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(r.categoryKey)),C=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",(F.length||C.length)&&!F.some(r=>r.opacity<=.25)&&!C.some(r=>r.opacity<=.1)?[...F.map(r=>L(r,r.opacity)),...C.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",a&&!V.has(a)?[{primaryId:a,primaryLabel:a}]:[])),n.push(o("target-category-filter-mismatch","A category-specific interaction scene must bind its filter to only the exact target category",a&&(t.categoryFilterKeys?.length!==1||t.categoryFilterKeys[0]!==a)?[{primaryId:a,primaryLabel:a}]:[]))}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=b(e.ink,e.fill)??0;return i<f?[L(e,i,f)]:[]})));let M=[];for(let e=0;e<l.length;e+=1)for(let i=0;i<e;i+=1)v(l[e].screenBox,l[i].screenBox)&&M.push(x(l[i].seatId,l[i].label,l[e].seatId,l[e].label));n.push(o("bookable-label-collision","Visible bookable labels must not overlap",M)),n.push(o("hierarchy-label-undersized","Visible section and zone labels must meet the rendered small-text size floor",c.filter(e=>e.renderedFontPx<P).map(e=>Q(e,e.renderedFontPx,P)))),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=b(e.ink,e.fill)??0;return i<f?[Q(e,i,f)]:[]}))),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=>Q(e))));let K=[];for(let e=0;e<c.length;e+=1)for(let i=0;i<e;i+=1)v(c[e].screenBox,c[i].screenBox)&&K.push(x(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 _=[];for(let e of c)for(let i of l)v(e.screenBox,i.screenBox)&&_.push(x(e.id,e.label,i.seatId,i.label));n.push(o("hierarchy-bookable-collision","Visible hierarchy labels must not overlap bookable labels",_)),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=>H(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=b(e.ink,e.background)??0;return i<f?[H(e,i,f)]:[]})));let z=[];for(let e=0;e<d.length;e+=1)for(let i=0;i<e;i+=1)v(d[e].screenBox,d[i].screenBox)&&z.push(x(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",z));let G=[];for(let e of d)for(let i of l)v(e.screenBox,i.screenBox)&&G.push(x(e.objectId,e.text,i.seatId,i.label));n.push(o("free-text-bookable-collision","Visible chart text must not overlap bookable labels",G));let U=[];for(let e of d)for(let i of c)v(e.screenBox,i.screenBox)&&U.push(x(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",B.flatMap(e=>{let i=b(e.effectiveBackground,t.canvasBackground)??0;return i<S?[{primaryId:e.areaId,primaryLabel:e.label,measured:Math.round(i*100)/100,minimum:S}]:[]})));let N=n.filter(e=>!!e);return{version:Z,passed:N.length===0,state:s,targetCategoryKey:a,resolvedRules:["rendered-overview-label-size","rendered-overview-label-contrast","rendered-overview-label-collision","rendered-overview-hierarchy-containment","rendered-overview-section-first-style","rendered-overview-ga-contrast",...s==="interaction"?["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:B.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:[...V].sort()},metrics:{minimumRenderedBookableLabelPx:m(l.map(e=>e.renderedFontPx)),minimumBookableLabelContrast:m(O),minimumRenderedHierarchyLabelPx:m(c.map(e=>e.renderedFontPx)),minimumHierarchyLabelContrast:m(D),minimumRenderedFreeTextPx:m(d.map(e=>e.renderedFontPx)),minimumFreeTextContrast:m($),minimumGAContrast:m(W),minimumEffectivePointerTargetPx:m(k.map(e=>e.pointerTarget.effectiveMinimumPx)),selectedRingContrast:w==null?null:Math.round(w*100)/100},interaction:{applicable:{detail:u.length>0||y.length>0,pointer:u.length>0||y.length>0,held:u.length>=2,booked:u.length>=3,sectionFocus:u.some(e=>!!e.sectionId)||y.some(e=>!!e.sectionId),categoryFilter:new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)]).size>=2},selectedUnits:p.length,heldUnits:h.length,bookedUnits:g.length,activePointerTargets:k.length,focusedSectionId:t.focusedSectionId,focusBackdropVisible:t.focusBackdropVisible,categoryFilterKeys:t.categoryFilterKeys},findings:N}}export{Z as a,ie as b};
|
|
1
|
+
import{f as P,r as b}from"./chunk-VI2CLV3Y.js";var Z=3,f=4.5,S=3,j=24,ee=20;function E(t){return t.filter(s=>s.visible&&!!s.screenBox)}function v(t,s){return t.x<s.x+s.width&&t.x+t.width>s.x&&t.y<s.y+s.height&&t.y+t.height>s.y}function m(t){return t.length?Math.round(Math.min(...t)*100)/100:null}function o(t,s,a){return a.length?{code:t,message:s,count:a.length,samples:a.slice(0,ee)}:null}function L(t,s,a){return{primaryId:t.seatId,primaryLabel:t.label,...s==null?{}:{measured:Math.round(s*100)/100},...a==null?{}:{minimum:a}}}function Q(t,s,a){return{primaryId:t.id,primaryLabel:t.label,...s==null?{}:{measured:Math.round(s*100)/100},...a==null?{}:{minimum:a}}}function H(t,s,a){return{primaryId:t.objectId,primaryLabel:t.text,...s==null?{}:{measured:Math.round(s*100)/100},...a==null?{}:{minimum:a}}}function x(t,s,a,l){return{primaryId:t,primaryLabel:s,secondaryId:a,secondaryLabel:l}}function ie(t,s="overview",a=null){let l=E(t.labels),c=E(t.hierarchyLabels),d=E(t.freeTextLabels),B=t.gaAreas.filter(e=>e.visible),O=l.map(e=>b(e.ink,e.fill)??0),D=c.map(e=>b(e.ink,e.fill)??0),$=d.map(e=>b(e.ink,e.background)??0),W=B.map(e=>b(e.effectiveBackground,t.canvasBackground)??0),u=a?t.labels.filter(e=>e.categoryKey===a):t.labels,y=a?t.gaAreas.filter(e=>e.categoryKey===a):t.gaAreas,p=u.filter(e=>e.selected),h=u.filter(e=>e.status==="held"),g=u.filter(e=>e.status==="booked"),k=u.filter(e=>e.pointerTarget.active),V=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)]),w=p.length?m(p.flatMap(e=>[b(t.selectionRingColor,t.canvasBackground)??0,b(t.selectionRingColor,e.fill)??0])):null,n=[],I=(e,i)=>Array.from({length:e},(T,R)=>({primaryId:`overview:${R+1}`,primaryLabel:i}));if(s==="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=>L(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),s==="interaction"){let e=u.length>0,i=y.length>0,T=e||i,R=y.filter(r=>r.visible),X=new Set([...u.flatMap(r=>r.sectionId?[r.sectionId]:[]),...y.flatMap(r=>r.sectionId?[r.sectionId]:[])]),Y=new Set([...t.labels.map(r=>r.categoryKey),...t.gaAreas.map(r=>r.categoryKey)]),A=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",T&&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",T&&!u.some(A)&&!R.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&&!k.some(A)||!e&&i&&!R.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",k.filter(r=>A(r)&&r.pointerTarget.effectiveMinimumPx<j).map(r=>L(r,r.pointerTarget.effectiveMinimumPx,j)))),n.push(o("selected-state-missing","Interaction evidence must paint a selected unit and its renderer-owned ring",e&&(!p.length||!p.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 canvas",p.length&&(w??0)<S?[{primaryId:p[0].seatId,primaryLabel:p[0].label,measured:Math.round((w??0)*100)/100,minimum:S}]:[])),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&&!h.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&&!g.length?[{primaryId:"renderer",primaryLabel:"booked state"}]:[]));let q=new Set(h.map(r=>`${r.fill.toLowerCase()}:${r.opacity}`)),J=new Set(g.map(r=>`${r.fill.toLowerCase()}:${r.opacity}`));n.push(o("status-state-indistinct","Held and taken evidence must resolve to distinct renderer paint",h.length&&g.length&&[...q].some(r=>J.has(r))?[{primaryId:h[0].seatId,primaryLabel:h[0].label,secondaryId:g[0].seatId,secondaryLabel:g[0].label}]:[])),n.push(o("section-focus-missing","Interaction evidence must exercise section focus and its backdrop when section membership exists",X.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",Y.size>=2&&(!t.categoryFilterKeys||!t.categoryFilterKeys.length)?[{primaryId:"renderer",primaryLabel:"category filter"}]:[]));let F=t.labels.filter(r=>r.status==="free"&&!r.selected&&t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(r.categoryKey)),C=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",(F.length||C.length)&&!F.some(r=>r.opacity<=.25)&&!C.some(r=>r.opacity<=.1)?[...F.map(r=>L(r,r.opacity)),...C.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",a&&!V.has(a)?[{primaryId:a,primaryLabel:a}]:[])),n.push(o("target-category-filter-mismatch","A category-specific interaction scene must bind its filter to only the exact target category",a&&(t.categoryFilterKeys?.length!==1||t.categoryFilterKeys[0]!==a)?[{primaryId:a,primaryLabel:a}]:[]))}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=b(e.ink,e.fill)??0;return i<f?[L(e,i,f)]:[]})));let M=[];for(let e=0;e<l.length;e+=1)for(let i=0;i<e;i+=1)v(l[e].screenBox,l[i].screenBox)&&M.push(x(l[i].seatId,l[i].label,l[e].seatId,l[e].label));n.push(o("bookable-label-collision","Visible bookable labels must not overlap",M)),n.push(o("hierarchy-label-undersized","Visible section and zone labels must meet the rendered small-text size floor",c.filter(e=>e.renderedFontPx<P).map(e=>Q(e,e.renderedFontPx,P)))),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=b(e.ink,e.fill)??0;return i<f?[Q(e,i,f)]:[]}))),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=>Q(e))));let K=[];for(let e=0;e<c.length;e+=1)for(let i=0;i<e;i+=1)v(c[e].screenBox,c[i].screenBox)&&K.push(x(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 _=[];for(let e of c)for(let i of l)v(e.screenBox,i.screenBox)&&_.push(x(e.id,e.label,i.seatId,i.label));n.push(o("hierarchy-bookable-collision","Visible hierarchy labels must not overlap bookable labels",_)),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=>H(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=b(e.ink,e.background)??0;return i<f?[H(e,i,f)]:[]})));let z=[];for(let e=0;e<d.length;e+=1)for(let i=0;i<e;i+=1)v(d[e].screenBox,d[i].screenBox)&&z.push(x(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",z));let G=[];for(let e of d)for(let i of l)v(e.screenBox,i.screenBox)&&G.push(x(e.objectId,e.text,i.seatId,i.label));n.push(o("free-text-bookable-collision","Visible chart text must not overlap bookable labels",G));let U=[];for(let e of d)for(let i of c)v(e.screenBox,i.screenBox)&&U.push(x(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",B.flatMap(e=>{let i=b(e.effectiveBackground,t.canvasBackground)??0;return i<S?[{primaryId:e.areaId,primaryLabel:e.label,measured:Math.round(i*100)/100,minimum:S}]:[]})));let N=n.filter(e=>!!e);return{version:Z,passed:N.length===0,state:s,targetCategoryKey:a,resolvedRules:["rendered-overview-label-size","rendered-overview-label-contrast","rendered-overview-label-collision","rendered-overview-hierarchy-containment","rendered-overview-section-first-style","rendered-overview-ga-contrast",...s==="interaction"?["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:B.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:[...V].sort()},metrics:{minimumRenderedBookableLabelPx:m(l.map(e=>e.renderedFontPx)),minimumBookableLabelContrast:m(O),minimumRenderedHierarchyLabelPx:m(c.map(e=>e.renderedFontPx)),minimumHierarchyLabelContrast:m(D),minimumRenderedFreeTextPx:m(d.map(e=>e.renderedFontPx)),minimumFreeTextContrast:m($),minimumGAContrast:m(W),minimumEffectivePointerTargetPx:m(k.map(e=>e.pointerTarget.effectiveMinimumPx)),selectedRingContrast:w==null?null:Math.round(w*100)/100},interaction:{applicable:{detail:u.length>0||y.length>0,pointer:u.length>0||y.length>0,held:u.length>=2,booked:u.length>=3,sectionFocus:u.some(e=>!!e.sectionId)||y.some(e=>!!e.sectionId),categoryFilter:new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)]).size>=2},selectedUnits:p.length,heldUnits:h.length,bookedUnits:g.length,activePointerTargets:k.length,focusedSectionId:t.focusedSectionId,focusBackdropVisible:t.focusBackdropVisible,categoryFilterKeys:t.categoryFilterKeys},findings:N}}export{Z as a,ie as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Re,b as Ne,e as be,f as _e,k as De,s as me,u as Ke}from"./chunk-6LIPQU4G.js";import{e as Be,n as Ge,p as Ue,q as Ve,r as pe,v as he}from"./chunk-3QLFGEQY.js";import{a as fe,b as ge,d as Le,f as Pe,i as oe}from"./chunk-AQKYUJBX.js";import{b as Q,m as z,p as ze}from"./chunk-DDE7IOFT.js";import{$ as Y,A as ke,T as Oe,Y as ce,Z as H,_ as X,a as vt,aa as le,b as It,ba as de,c as wt,ca as Ee,d as St,e as xt,f as Ct,fa as Ae,g as xe,h as jt,i as $t,j as Ce,k as je,ka as Te,l as se,ma as K,na as Me,qa as W,ta as te,va as ue,w as q,xa as ye,z as $e}from"./chunk-VDZ24QVV.js";import{c as Fe,m as R}from"./chunk-CXF32VPG.js";var ve=[{key:"row-seats",label:"row seats",suffix:"rows",labelSuffix:"Rows",creationWord:"Seats",objectType:"row"},{key:"table-chairs",label:"table chairs",suffix:"tables",labelSuffix:"Tables",creationWord:"Tables",objectType:"table"},{key:"booth-units",label:"booth units",suffix:"booths",labelSuffix:"Booths",creationWord:"Booths",objectType:"booth"},{key:"ga-capacity",label:"GA capacity",suffix:"ga",labelSuffix:"GA",creationWord:"Standing",objectType:"gaArea"}];function Qe(t){return t.floors?.length?t.floors:[{id:"floor-0",objects:t.objects}]}function kt(t){return ve.find(e=>e.key===t)}function ie(t){let e=new Map,n=Math.max(0,Math.floor(t.seatCount)),i=new Map((t.overrides??[]).filter(a=>Number.isInteger(a.index)&&a.index>=0&&a.index<t.seatCount).map(a=>[a.index,a])),r=(a,l=1)=>{a&&l>0&&e.set(a,(e.get(a)??0)+l)};r(t.categoryKey,n-i.size);for(let a of i.values())a.skip||r(a.categoryKey??t.categoryKey);return e}function Ot(t){return t.type==="row"||t.type==="table"?[...ie(t).keys()]:t.type==="booth"?t.categoryKey?[t.categoryKey]:[]:t.type==="gaArea"?t.capacity>0&&t.categoryKey?[t.categoryKey]:[]:[]}function qe(t){return ve.find(e=>e.objectType===t.type)??null}function He(t){return t.type==="row"||t.type==="table"||t.type==="booth"||t.type==="gaArea"}function ne(t){let e=new Map;for(let r of Qe(t))for(let a of r.objects){if(!He(a))continue;let l=qe(a);for(let f of Ot(a)){let h=e.get(f)??new Map,c=h.get(l.key)??[];if(!c.some(d=>d.id===a.id)){let d=a.displayLabel||a.label||a.id;c.push({id:a.id,label:d,type:l.objectType,floorId:r.id})}h.set(l.key,c),e.set(f,h)}}let n=new Map(t.categories.map(r=>[r.key,r.label]));return[...t.categories.map(r=>r.key),...[...e.keys()].filter(r=>!n.has(r)).sort()].flatMap(r=>{let a=e.get(r);if(!a||a.size<2)return[];let l=ve.flatMap(f=>{let h=a.get(f.key);return h?.length?[{family:f.key,label:f.label,objectType:f.objectType,targets:h}]:[]});return[{categoryKey:r,categoryLabel:n.get(r)??r,families:l,objectIds:[...new Set(l.flatMap(f=>f.targets.map(h=>h.id)))]}]})}function Xe(t){let e=t.families.map(n=>`${n.label} (${n.targets.map(i=>i.label).join(", ")})`).join(" and ");return`Category \u201C${t.categoryLabel}\u201D is used by more than one kind of inventory \u2014 ${e}. Each category can belong to only one kind \u2014 use the safe split to separate them (prices, ticket tiers, accessibility, and provenance are preserved).`}function Ye(t){return t.normalize("NFKC").trim().toLocaleLowerCase("en")}function Et(t,e,n){for(let i=1;i<=1e4;i+=1){let r=i===1?`--${e}`:`--${e}-${i}`,l=`${t.slice(0,Math.max(1,160-r.length))}${r}`;if(!n.has(l))return n.add(l),l}throw new Error(`Unable to allocate a category key for ${t} (${e})`)}function At(t,e,n){for(let i=1;i<=1e4;i+=1){let r=i===1?` (${e})`:` (${e} ${i})`,l=`${t.normalize("NFKC").trim().slice(0,Math.max(1,80-r.length)).trimEnd()}${r}`,f=Ye(l);if(!n.has(f))return n.add(f),l}throw new Error(`Unable to allocate a category label for ${t} (${e})`)}function Tt(t,e,n,i){let r=kt(e);return{...structuredClone(t),key:Et(t.key,r.suffix,n),label:At(t.label,r.labelSuffix,i)}}function Mt(t,e,n){let i=[];for(let r of Qe(t))for(let a of r.objects){if(!He(a))continue;let l=qe(a),f=n.get(l.key);if(!(!f||f===e))if(a.type==="row"||a.type==="table"){let h=[];a.categoryKey===e&&(a.categoryKey=f);for(let c of a.overrides??[])c.categoryKey===e&&(c.categoryKey=f,h.push(c.index));(a.categoryKey===f||h.length)&&i.push({family:l.key,floorId:r.id,objectId:a.id,objectType:l.objectType,fromCategoryKey:e,toCategoryKey:f,...h.length?{seatOverrideIndices:h.sort((c,d)=>c-d)}:{}})}else a.categoryKey===e&&(a.categoryKey=f,i.push({family:l.key,floorId:r.id,objectId:a.id,objectType:l.objectType,fromCategoryKey:e,toCategoryKey:f}))}return i}function We(t){let e=structuredClone(t),n=ne(e);if(!n.length)return{doc:e,changed:!1,changes:[],before:n,after:n};let i=new Set(e.categories.map(f=>f.key)),r=new Set(e.categories.map(f=>Ye(f.label))),a=[];for(let f of n){let h=e.categories.findIndex(I=>I.key===f.categoryKey);if(h<0)continue;let c=e.categories[h],d=f.families[0].family,g=new Map([[d,c.key]]),p=f.families.slice(1).map(I=>{let O=Tt(c,I.family,i,r);return g.set(I.family,O.key),{family:I.family,key:O.key,label:O.label,category:O}});e.categories.splice(h+1,0,...p.map(I=>I.category));let b=Mt(e,c.key,g);a.push({categoryKey:c.key,categoryLabel:c.label,retainedFamily:d,clones:p.map(({family:I,key:O,label:w})=>({family:I,key:O,label:w})),reassignments:b})}e.floors?.length&&(e.objects=e.floors[0].objects);let l=ne(e);return{doc:e,changed:a.length>0,changes:a,before:n,after:l}}function Lt(t,e){return Math.abs(t.x-e.x)<=1e-7&&Math.abs(t.y-e.y)<=1e-7}function Z(t,e,n){return(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x)}function re(t,e,n){let i=Z(e,n,t);return Math.abs(i)>1e-7?!1:t.x>=Math.min(e.x,n.x)-1e-7&&t.x<=Math.max(e.x,n.x)+1e-7&&t.y>=Math.min(e.y,n.y)-1e-7&&t.y<=Math.max(e.y,n.y)+1e-7}function Pt(t,e,n,i){let r=Z(t,e,n),a=Z(t,e,i),l=Z(n,i,t),f=Z(n,i,e);return(r>1e-7&&a<-1e-7||r<-1e-7&&a>1e-7)&&(l>1e-7&&f<-1e-7||l<-1e-7&&f>1e-7)?!0:Math.abs(r)<=1e-7&&re(n,t,e)||Math.abs(a)<=1e-7&&re(i,t,e)||Math.abs(l)<=1e-7&&re(t,n,i)||Math.abs(f)<=1e-7&&re(e,n,i)}function Ft(t){return t.reduce((e,n,i)=>{let r=t[(i+1)%t.length];return e+n.x*r.y-r.x*n.y},0)}function Rt(t){for(let e=0;e<t.length;e+=1){let n=(e+1)%t.length;for(let i=e+1;i<t.length;i+=1){let r=(i+1)%t.length;if(!(e===i||n===i||r===e)&&Pt(t[e],t[n],t[i],t[r]))return!0}}return!1}function Ze(t){return t.length<3?{ok:!1,code:"too_few_vertices",message:"Add at least three vertices to create a polygon."}:t.length>256?{ok:!1,code:"too_many_vertices",message:"A polygon can contain at most 256 vertices."}:t.some(e=>!Number.isFinite(e.x)||!Number.isFinite(e.y)||Math.abs(e.x)>1e7||Math.abs(e.y)>1e7)?{ok:!1,code:"invalid_coordinate",message:"Every polygon vertex must use a finite coordinate inside the safe chart range."}:t.some((e,n)=>Lt(e,t[(n+1)%t.length]))?{ok:!1,code:"duplicate_vertex",message:"Move or remove duplicate neighbouring vertices."}:Math.abs(Ft(t))<2?{ok:!1,code:"degenerate_polygon",message:"The polygon needs a visible enclosed area."}:Rt(t)?{ok:!1,code:"self_intersection",message:"Polygon edges cannot cross or touch each other."}:{ok:!0}}function B(t){return t.length>=3&&t.every(e=>Number.isFinite(e.x)&&Number.isFinite(e.y))}function G(t,e,n){let i=(t.y-e.y)*(n.x-e.x)-(t.x-e.x)*(n.y-e.y);if(Math.abs(i)>1e-7)return!1;let r=(t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y);if(r<-1e-7)return!1;let a=(n.x-e.x)**2+(n.y-e.y)**2;return r<=a+1e-7}function U(t,e){let n=!1;for(let i=0,r=e.length-1;i<e.length;r=i++){let a=e[r],l=e[i];if(G(t,a,l))return!0;a.y>t.y!=l.y>t.y&&t.x<(l.x-a.x)*(t.y-a.y)/(l.y-a.y)+a.x&&(n=!n)}return n}function D(t,e,n){return(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x)}function et(t,e,n,i){let r=D(t,e,n),a=D(t,e,i),l=D(n,i,t),f=D(n,i,e);return(r>1e-7&&a<-1e-7||r<-1e-7&&a>1e-7)&&(l>1e-7&&f<-1e-7||l<-1e-7&&f>1e-7)?!0:Math.abs(r)<=1e-7&&G(n,t,e)||Math.abs(a)<=1e-7&&G(i,t,e)||Math.abs(l)<=1e-7&&G(t,n,i)||Math.abs(f)<=1e-7&&G(e,n,i)}function V(t){for(let e=0;e<t.length;e+=1){let n=(e+1)%t.length;for(let i=e+1;i<t.length;i+=1){let r=(i+1)%t.length;if(!(e===i||n===i||r===e)&&et(t[e],t[n],t[i],t[r]))return!0}}return!1}function J(t,e){for(let n=0;n<t.length;n+=1)for(let i=0;i<e.length;i+=1)if(et(t[n],t[(n+1)%t.length],e[i],e[(i+1)%e.length]))return!0;return U(t[0],e)||U(e[0],t)}function Je(t,e){return!e.some((n,i)=>G(t,n,e[(i+1)%e.length]))&&U(t,e)}function tt(t){let e=t.outlinePath;if(!e?.segments.length)return;let n=a=>Number.isFinite(a.x)&&Number.isFinite(a.y),i=(a,l)=>Math.hypot(a.x-l.x,a.y-l.y);if(!n(e.start))return 0;let r=e.start;for(let a=0;a<e.segments.length;a++){let l=e.segments[a];if(!l||!n(l.end)||i(r,l.end)<=1e-9||l.kind==="bezier"&&(!n(l.control1)||!n(l.control2)))return a;if(l.kind==="arc"){if(!n(l.center)||!Number.isFinite(l.radius)||l.radius<=1e-6)return a;let f=Math.max(1e-4,l.radius*1e-4);if(Math.abs(i(r,l.center)-l.radius)>f||Math.abs(i(l.end,l.center)-l.radius)>f)return a}r=l.end}return i(r,e.start)>1e-4,e.segments.length-1}function Nt(t,e,n,i){let r=D(t,e,n),a=D(t,e,i),l=D(n,i,t),f=D(n,i,e);return(r>1e-7&&a<-1e-7||r<-1e-7&&a>1e-7)&&(l>1e-7&&f<-1e-7||l<-1e-7&&f>1e-7)}function ot(t,e){for(let n=0;n<t.length;n+=1)for(let i=0;i<e.length;i+=1)if(Nt(t[n],t[(n+1)%t.length],e[i],e[(i+1)%e.length]))return!0;return t.some(n=>Je(n,e))||e.some(n=>Je(n,t))}function nt(t){return t.role!=="reference-focal"||!t.points||!B(t.points)?null:t.points}function rt(t,e){if(t.displayLabel!==void 0){let n=t.displayLabel.normalize("NFKC").trim();(!n||n!==t.displayLabel||n.length>80)&&e.push({severity:"error",code:"invalid-display-label",message:`${t.type==="gaArea"?"GA area":t.type} "${t.label}" must use a normalized buyer label of 1 to 80 characters`,objectId:t.id})}if(t.displayType!==void 0){let n=t.displayType.normalize("NFKC").trim();(!n||n!==t.displayType||n.length>24)&&e.push({severity:"error",code:"invalid-display-type",message:`${t.type==="gaArea"?"GA area":t.type} "${t.label}" must use a normalized buyer type of 1 to 24 characters`,objectId:t.id})}}function it(t,e,n,i){let r=t.crop,a=r&&(!Number.isFinite(r.x)||!Number.isFinite(r.y)||!Number.isFinite(r.width)||!Number.isFinite(r.height)||r.x<0||r.y<0||r.width<=0||r.height<=0||r.x+r.width>1.000001||r.y+r.height>1.000001);(!Number.isFinite(t.center?.x)||!Number.isFinite(t.center?.y)||!Number.isFinite(t.width)||t.width<=0||!Number.isFinite(t.opacity)||t.opacity<0||t.opacity>1||t.rotation!==void 0&&!Number.isFinite(t.rotation)||a)&&n.push({severity:"error",code:"invalid-background-placement",message:`The ${e} image has an invalid position, size, opacity, rotation, or crop`,...i?{floorId:i}:{}})}function Ie(t,e,n,i){let r=t.referenceImage,a=t.backgroundImage;r&&(it(r,"reference",e,i),!r.assetId&&!r.url&&e.push({severity:"error",code:"invalid-reference-image",message:"A trace reference must identify a private asset or self-contained image",...i?{floorId:i}:{}})),a&&(it(a,a.assetId?"legacy reference":"buyer background",e,i),!a.assetId&&!a.url&&e.push({severity:"error",code:"invalid-buyer-background",message:"A buyer background must contain a renderable image URL",...i?{floorId:i}:{}}),a.assetId&&n.push({severity:"warning",code:"legacy-reference-background",message:"This legacy asset-backed background is trace-only and will migrate to the private reference layer when edited",...i?{floorId:i}:{}})),Be(t)&&e.push({severity:"error",code:"conflicting-reference-images",message:"The canonical reference and legacy asset-backed background identify different private sources",...i?{floorId:i}:{}})}function ee(t){let e=new Set(Q.map(n=>n.key));return!t||/^ref_[0-9a-f-]{36}$/.test(t.assetId)&&!!t.logicalSectionId.trim()&&["user-confirmed","authoritative-source"].includes(t.evidence)&&!!t.sourceDescription.trim()&&(t.derivation===void 0||["explicit-inventory","server-synthesized-from-aggregate"].includes(t.derivation))&&(t.aggregateEvidence===void 0||["user-confirmed","authoritative-source"].includes(t.aggregateEvidence))&&(t.derivation!=="server-synthesized-from-aggregate"||t.evidence==="user-confirmed")&&(t.sectionAssignmentEvidence===void 0||["user-confirmed","authoritative-source"].includes(t.sectionAssignmentEvidence))&&t.sectionAssignmentEvidence===void 0==!t.sectionAssignmentSourceDescription?.trim()&&(t.sectionAssignmentSourceDescription?.trim().length??0)<=240&&(t.numberingEvidence===void 0||t.numberingEvidence==="user-confirmed")&&t.numberingEvidence===void 0==!t.numberingSourceDescription?.trim()&&(t.numberingSourceDescription?.trim().length??0)<=240&&(!t.accessibility||t.accessibility.placementDerivation==="server-synthesized-row-edges"&&t.accessibility.groupLogicalSectionIds.length>0&&t.accessibility.groupLogicalSectionIds.length<=100&&new Set(t.accessibility.groupLogicalSectionIds).size===t.accessibility.groupLogicalSectionIds.length&&t.accessibility.groupLogicalSectionIds.includes(t.logicalSectionId)&&t.accessibility.groupLogicalSectionIds.every(n=>!!n.trim()&&n.length<=160)&&["user-confirmed","authoritative-source"].includes(t.accessibility.assignmentEvidence)&&!!t.accessibility.assignmentSourceDescription.trim()&&t.accessibility.assignmentSourceDescription.trim().length<=240&&t.accessibility.counts.length>0&&t.accessibility.counts.length<=Q.length&&new Set(t.accessibility.counts.map(n=>n.type)).size===t.accessibility.counts.length&&t.accessibility.counts.every(n=>e.has(n.type)&&Number.isInteger(n.count)&&n.count>0&&["user-confirmed","authoritative-source"].includes(n.evidence)&&!!n.sourceDescription.trim()&&n.sourceDescription.trim().length<=240))}function at(t){let e=t.referenceInventoryExclusion;return!e||typeof e.assetId=="string"&&/^ref_[0-9a-f-]{36}$/.test(e.assetId)&&e.assetId===t.referenceSource?.assetId&&typeof e.logicalSectionId=="string"&&e.logicalSectionId===(t.logicalSectionId??t.id)&&typeof e.reason=="string"&&!!e.reason.trim()&&e.reason.trim().length<=80&&["user-confirmed","authoritative-source"].includes(e.evidence)&&typeof e.sourceDescription=="string"&&!!e.sourceDescription.trim()&&e.sourceDescription.trim().length<=240}function st(t){let e=t.referenceCategorySource;return!e||/^ref_[0-9a-f-]{36}$/.test(e.assetId)&&/^#[0-9a-f]{6}$/i.test(e.sourceColor)&&(e.sourceColors===void 0||e.sourceColors.length>0&&e.sourceColors.includes(e.sourceColor)&&new Set(e.sourceColors).size===e.sourceColors.length&&e.sourceColors.every(n=>/^#[0-9a-f]{6}$/i.test(n)&&`${n[1]}${n[3]}${n[5]}`.toLowerCase()===`${e.sourceColor[1]}${e.sourceColor[3]}${e.sourceColor[5]}`.toLowerCase()))&&(e.logicalSectionIds===void 0||e.logicalSectionIds.length>0&&new Set(e.logicalSectionIds).size===e.logicalSectionIds.length&&e.logicalSectionIds.every(n=>!!n.trim()&&n.length<=160))&&(e.assignmentDerivation===void 0||["source-color-class","confirmed-logical-sections"].includes(e.assignmentDerivation))&&e.assignmentEvidence===void 0==!e.assignmentSourceDescription?.trim()&&(e.assignmentEvidence===void 0||["user-confirmed","authoritative-source"].includes(e.assignmentEvidence))&&(e.assignmentSourceDescription?.trim().length??0)<=240&&(e.assignmentDerivation!=="confirmed-logical-sections"||e.assignmentEvidence!==void 0&&!!e.assignmentSourceDescription?.trim())&&e.sourcePaletteColor===void 0==(e.sourcePaletteColorEvidence===void 0)&&e.sourcePaletteColorEvidence===void 0==!e.sourcePaletteColorSourceDescription?.trim()&&(e.sourcePaletteColor===void 0||/^#[0-9a-f]{6}$/i.test(e.sourcePaletteColor))&&(e.sourcePaletteColorEvidence===void 0||["user-confirmed","authoritative-source"].includes(e.sourcePaletteColorEvidence))&&(e.sourcePaletteColorSourceDescription?.trim().length??0)<=240&&["user-confirmed","authoritative-source"].includes(e.labelEvidence)&&!!e.labelSourceDescription.trim()&&e.labelSourceDescription.trim().length<=240&&t.price!==void 0&&["user-confirmed","authoritative-source"].includes(e.priceEvidence)&&!!e.priceSourceDescription.trim()&&e.priceSourceDescription.trim().length<=240&&e.outputColorEvidence===void 0==!e.outputColorSourceDescription?.trim()&&(e.outputColorEvidence===void 0||["user-confirmed","authoritative-source"].includes(e.outputColorEvidence))&&(e.outputColorSourceDescription?.trim().length??0)<=240&&(t.color.toLowerCase()===(e.sourcePaletteColor??e.sourceColor).toLowerCase()&&new Set((e.sourceColors??[e.sourceColor]).map(n=>`${n[1]}${n[3]}${n[5]}`.toLowerCase())).size===1||e.outputColorEvidence!==void 0&&["user-confirmed","authoritative-source"].includes(e.outputColorEvidence))}function ct(t,e){let n=t.floors?.length?t.floors.map(a=>({id:a.id,objects:a.objects})):[{id:"floor-0",objects:t.objects}],i=new Map,r=new Map;for(let a of n){let l=a.objects.filter(c=>c.type==="row"),f=new Map,h=new Map;for(let c of l){if(c.segmentedRow){let d=f.get(c.segmentedRow.groupId)??[];d.push(c),f.set(c.segmentedRow.groupId,d)}if(c.rowBlockGeneration){let d=h.get(c.rowBlockGeneration.groupId)??[];d.push(c),h.set(c.rowBlockGeneration.groupId,d)}c.segmentedRow&&c.rowBlockGeneration&&e.push({severity:"error",code:"invalid-row-group-membership",message:`Row "${c.label}" cannot be both a segmented-row component and a generated row-block member`,objectId:c.id,floorId:a.id})}for(let[c,d]of f){let g=i.get(c);g&&g!==a.id&&e.push({severity:"error",code:"invalid-segmented-row",message:`Segmented row "${c}" cannot span multiple floors`,objectId:d[0].id,floorId:a.id}),i.set(c,a.id);let p=d.slice().sort((j,A)=>j.segmentedRow.componentIndex-A.segmentedRow.componentIndex),b=p[0]?.segmentedRow,I=b?.componentCount??0,O=b?JSON.stringify({displayLabel:b.displayLabel,repeatLabelOnComponents:b.repeatLabelOnComponents,displayType:b.displayType,labelPresentation:b.labelPresentation,viewFromSeatUrl:b.viewFromSeatUrl,viewFromSeatMeta:b.viewFromSeatMeta,confidenceEvidence:b.confidenceEvidence,smoothing:b.smoothing}):"";b&&I>=2&&I<=64&&p.length===I&&b.boundaryBefore==="start"&&p.every((j,A)=>{let $=j.segmentedRow;return $.kind==="segmented-row-v1"&&$.groupId===c&&$.componentCount===I&&$.componentIndex===A&&(A===0?$.boundaryBefore==="start":$.boundaryBefore!=="start")&&$.displayLabel.normalize("NFKC").trim()===$.displayLabel&&$.displayLabel.length>0&&$.displayLabel.length<=80&&JSON.stringify({displayLabel:$.displayLabel,repeatLabelOnComponents:$.repeatLabelOnComponents,displayType:$.displayType,labelPresentation:$.labelPresentation,viewFromSeatUrl:$.viewFromSeatUrl,viewFromSeatMeta:$.viewFromSeatMeta,confidenceEvidence:$.confidenceEvidence,smoothing:$.smoothing})===O})||e.push({severity:"error",code:"invalid-segmented-row",message:`Segmented row "${c}" has missing, duplicated, cyclic, or inconsistent component metadata`,objectId:d[0]?.id,floorId:a.id})}for(let[c,d]of h){let g=r.get(c);g&&g!==a.id&&e.push({severity:"error",code:"invalid-row-block-generation",message:"A generated row block cannot span multiple floors",objectId:d[0].id,floorId:a.id}),r.set(c,a.id)}}}function _t(t){return t.type==="row"||t.type==="table"||t.type==="booth"}function Dt(t){let e=[],n=new Map((t.overrides??[]).map(i=>[i.index,i]));for(let i=0;i<t.seatCount;i++){let r=n.get(i);r?.skip||e.push({label:Oe(t,i,r),index:i})}return e}function lt(t){let e=[],n=new Map((t.overrides??[]).map(i=>[i.index,i]));for(let i=0;i<t.seatCount;i++){let r=n.get(i);r?.skip||e.push({label:r?.label??`${t.label}-${i+1}`,index:i})}return e}function dt(t){let e=[];t.eventConfigurationId!==void 0&&(typeof t.eventConfigurationId!="string"||t.eventConfigurationId.normalize("NFKC").trim()!==t.eventConfigurationId||t.eventConfigurationId.length<1||t.eventConfigurationId.length>100)&&e.push({severity:"error",code:"invalid-event-configuration",message:"Active event configuration must contain 1 to 100 normalized characters"});let n=[],i=new Set(t.categories.map(o=>o.key)),r=new Set(Q.map(o=>o.key)),a=new Map(t.categories.map(o=>[o.key,o.price!=null||o.notForSale===!0])),l=new Set;Ie(t,e,n);let f=o=>o.length<=2e6&&/^(https:\/\/|data:image\/)/.test(o),h=(o,S,s,y={})=>{if(S===void 0)return;if(!S||typeof S!="object"||Array.isArray(S)){e.push({severity:"error",code:"invalid-seat-view-metadata",message:`${s} view metadata is invalid`,...y});return}let u=S;o||n.push({severity:"warning",code:"orphaned-seat-view-metadata",message:`${s} view metadata has no image`,...y});let v=new Set(["exact-seat","row-representative","section-representative","venue-representative"]);u.projection!==void 0&&u.projection!=="equirectangular"&&e.push({severity:"error",code:"invalid-seat-view-projection",message:`${s} view projection must be equirectangular`,...y}),u.coverage!==void 0&&!v.has(u.coverage)&&e.push({severity:"error",code:"invalid-seat-view-coverage",message:`${s} view coverage is invalid`,...y});let m=(x,C,P)=>typeof x=="number"&&Number.isFinite(x)&&x>=C&&x<=P;u.initialBearingDeg!==void 0&&!m(u.initialBearingDeg,-360,360)&&e.push({severity:"error",code:"invalid-seat-view-bearing",message:`${s} view bearing must be between -360\xB0 and 360\xB0`,...y}),u.initialPitchDeg!==void 0&&!m(u.initialPitchDeg,-90,90)&&e.push({severity:"error",code:"invalid-seat-view-pitch",message:`${s} view pitch must be between -90\xB0 and 90\xB0`,...y}),u.capturedAt!==void 0&&(typeof u.capturedAt!="string"||u.capturedAt.length>40||!Number.isFinite(Date.parse(u.capturedAt)))&&e.push({severity:"error",code:"invalid-seat-view-capture-date",message:`${s} view capture date is invalid`,...y}),u.sourceLabel!==void 0&&(typeof u.sourceLabel!="string"||u.sourceLabel.trim().length>100)&&e.push({severity:"error",code:"invalid-seat-view-source",message:`${s} view source label is invalid`,...y}),u.previewUrl!==void 0&&!f(u.previewUrl)&&e.push({severity:"error",code:"invalid-seat-view-preview-url",message:`${s} view preview URL is invalid`,...y});for(let[x,C]of[["width",u.sourceWidth],["height",u.sourceHeight],["preview width",u.previewWidth],["preview height",u.previewHeight]])C!==void 0&&(!Number.isInteger(C)||C<1||C>32768)&&e.push({severity:"error",code:"invalid-seat-view-dimensions",message:`${s} view source ${x} is invalid`,...y});u.captureEyeHeightM!==void 0&&!m(u.captureEyeHeightM,.5,2.5)&&e.push({severity:"error",code:"invalid-seat-view-eye-height",message:`${s} capture eye height must be between 0.5 m and 2.5 m`,...y}),u.eventConfigurationId!==void 0&&(typeof u.eventConfigurationId!="string"||!u.eventConfigurationId.trim()||u.eventConfigurationId.length>100)&&e.push({severity:"error",code:"invalid-seat-view-configuration",message:`${s} event configuration id is invalid`,...y})},c=(o,S,s={})=>{if(o===void 0)return;let y=C=>{e.push({severity:"error",code:"invalid-seat-confidence-evidence",message:`${S} confidence evidence ${C}`,...s})};if(!o||typeof o!="object"||Array.isArray(o)){y("is invalid");return}let u=o;u.schema!=="seatlayer.seat-confidence/1"&&y("has an unsupported schema");let v=(C,P)=>typeof C=="string"&&C.normalize("NFKC").trim()===C&&C.length>0&&C.length<=P;v(u.evidenceId,120)||y("has an invalid evidence id"),v(u.modelVersion,120)||y("has an invalid model version"),new Set(["synthetic-model","organizer-approved","calibrated-provider"]).has(u.evidenceKind)||y("has an invalid evidence kind"),new Set(["generated","geometry-verified","configuration-verified"]).has(u.modelLevel)||y("has an invalid model level");let m=u.realityLevel??"none";new Set(["none","comparable-build-reference","actual-build-checked"]).has(m)||y("has an invalid reality level"),u.eventConfigurationId!==void 0&&!v(u.eventConfigurationId,100)&&y("has an invalid event configuration id");for(let[C,P]of[["assessment",u.assessedAt],["expiry",u.validUntil]])P!==void 0&&(!v(P,40)||!Number.isFinite(Date.parse(P)))&&y(`has an invalid ${C} date`);u.approvedByRole!==void 0&&!v(u.approvedByRole,100)&&y("has an invalid approving organization or role"),u.sourceLabel!==void 0&&!v(u.sourceLabel,120)&&y("has an invalid source label"),u.limitations!==void 0&&(!Array.isArray(u.limitations)||u.limitations.length>6||u.limitations.some(C=>!v(C,160)))&&y("has invalid limitations"),u.evidenceKind==="synthetic-model"&&(u.modelLevel!=="generated"||m!=="none")&&y("cannot describe synthetic data as verified or reality checked"),u.modelLevel!=="generated"&&(!u.assessedAt||!u.approvedByRole)&&y("requires an assessment date and approving organization or role for verified model levels"),u.modelLevel==="configuration-verified"&&!u.eventConfigurationId&&y("requires an event configuration id for configuration verification"),m!=="none"&&(!u.assessedAt||!u.sourceLabel)&&y("requires an assessment date and source for reality evidence"),m==="actual-build-checked"&&(u.modelLevel!=="configuration-verified"||!u.eventConfigurationId)&&y("requires a configuration-verified model and event configuration for an actual-build check");let x=u.modeledTarget;x!==void 0&&(!x||typeof x!="object"||Array.isArray(x)?y("has an invalid modeled target"):((!v(x.label,80)||!v(x.methodLabel,100))&&y("has invalid modeled-target labels"),(!Number.isInteger(x.totalRayCount)||x.totalRayCount<1||x.totalRayCount>1e3||!Number.isInteger(x.clearRayCount)||x.clearRayCount<0||x.clearRayCount>x.totalRayCount)&&y("has invalid modeled-target ray counts"),new Set(["clear","partial","obstructed"]).has(x.classification)||y("has an invalid modeled-target classification"),x.occluderLabels!==void 0&&(!Array.isArray(x.occluderLabels)||x.occluderLabels.length>10||x.occluderLabels.some(C=>!v(C,100)))&&y("has invalid modeled-target occluders")))};h(t.viewFromSeatUrl,t.viewFromSeatMeta,"Venue"),c(t.confidenceEvidence,"Venue"),t.viewFromSeatUrl!==void 0&&!f(t.viewFromSeatUrl)&&e.push({severity:"error",code:"invalid-venue-view-url",message:"The whole-venue view-from-seat image URL is invalid"});for(let o of t.floors??[])o.viewFromSeatUrl!==void 0&&!f(o.viewFromSeatUrl)&&e.push({severity:"error",code:"invalid-floor-view-url",message:`Floor "${o.name}" has an invalid view-from-seat image URL`}),h(o.viewFromSeatUrl,o.viewFromSeatMeta,`Floor "${o.name}"`,{floorId:o.id}),c(o.confidenceEvidence,`Floor "${o.name}"`,{floorId:o.id});let d=t.floors?.length?t.floors.flatMap(o=>o.objects):t.objects;for(let o of d)if((o.type==="row"||o.type==="section")&&(h(o.viewFromSeatUrl,o.viewFromSeatMeta,`${o.type==="row"?"Row":"Section"} "${o.label}"`,{objectId:o.id}),c(o.confidenceEvidence,`${o.type==="row"?"Row":"Section"} "${o.label}"`,{objectId:o.id})),o.type==="row"&&o.segmentedRow&&(h(o.segmentedRow.viewFromSeatUrl,o.segmentedRow.viewFromSeatMeta,`Segmented row "${o.segmentedRow.displayLabel}"`,{objectId:o.id}),c(o.segmentedRow.confidenceEvidence,`Segmented row "${o.segmentedRow.displayLabel}"`,{objectId:o.id})),o.type==="row"||o.type==="table")for(let S of o.overrides??[])h(S.viewFromSeatUrl,S.viewFromSeatMeta,`Seat ${S.index+1}`,{objectId:o.id,seatIndices:[S.index]}),c(S.confidenceEvidence,`Seat ${S.index+1}`,{objectId:o.id,seatIndices:[S.index]});let g=new Set;for(let o of t.categories){g.has(o.key)&&e.push({severity:"error",code:"duplicate-category-key",message:`Category key "${o.key}" is used more than once`,categoryKey:o.key}),g.add(o.key);let S=new Set;for(let s of o.tiers??[]){if(S.has(s.id)&&e.push({severity:"error",code:"duplicate-category-tier-id",message:`Ticket tier id "${s.id}" is used more than once in category "${o.key}"`,categoryKey:o.key}),s.restriction!=null&&!["companion","child","senior","student","membership","custom"].includes(s.restriction)&&e.push({severity:"error",code:"invalid-category-tier-restriction",message:`Ticket tier "${s.name}" has an unknown restriction`,categoryKey:o.key}),s.buyerMessage!=null&&(!s.buyerMessage.trim()||s.buyerMessage.length>240)&&e.push({severity:"error",code:"invalid-category-tier-buyer-message",message:`Ticket tier "${s.name}" buyer guidance must contain 1 to 240 characters`,categoryKey:o.key}),s.currency!=null&&!/^[A-Z]{3}$/.test(s.currency)&&e.push({severity:"error",code:"invalid-category-tier-currency",message:`Ticket tier "${s.name}" must use a three-letter ISO currency`,categoryKey:o.key}),s.applicability!=null){let y=s.applicability.seatLabels,u=s.applicability.accessibility;(y!==void 0&&(!Array.isArray(y)||!y.length||y.length>1e4||y.some(v=>typeof v!="string"||!v.trim()||v.length>160)||new Set(y).size!==y.length)||u!==void 0&&(!Array.isArray(u)||!u.length||u.some(v=>!r.has(v))||new Set(u).size!==u.length))&&e.push({severity:"error",code:"invalid-category-tier-applicability",message:`Ticket tier "${s.name}" has invalid seat applicability`,categoryKey:o.key})}s.evidence!=null&&(!["public-host","public-event","user-confirmed"].includes(s.evidence.provenance)||!s.evidence.sourceDescription.trim()||s.evidence.sourceDescription.length>240||s.evidence.capturedAt!==void 0&&(s.evidence.capturedAt.length>40||!Number.isFinite(Date.parse(s.evidence.capturedAt))))&&e.push({severity:"error",code:"invalid-category-tier-evidence",message:`Ticket tier "${s.name}" has invalid evidence provenance`,categoryKey:o.key}),S.add(s.id)}st(o)||e.push({severity:"error",code:"invalid-reference-category-source",message:`Category ${o.label||o.key} has incomplete or invalid reference evidence`,categoryKey:o.key})}let p=new Map,b=new Map,I=[],O=new Map,w=0,j=0,A=new Set;for(let o of t.floors??[])Ie(o,e,n,o.id),A.has(o.id)&&e.push({severity:"error",code:"duplicate-floor-id",message:`Floor id "${o.id}" is used more than once`,floorId:o.id}),A.add(o.id),o.baseHeightM!==void 0&&(!Number.isFinite(o.baseHeightM)||o.baseHeightM<X||o.baseHeightM>Y)&&e.push({severity:"error",code:"invalid-floor-base-height",message:`Floor "${o.name}" base height must be between ${X} and ${Y} metres`,floorId:o.id});let $=t.floors&&t.floors.length?t.floors.flatMap(o=>o.objects):t.objects;ct(t,e);let N=new Set;for(let o of $)N.has(o.id)&&e.push({severity:"error",code:"duplicate-object-id",message:`Object id "${o.id}" is used more than once`,objectId:o.id}),N.add(o.id);let L=new Set;for(let o of t.zones??[])L.has(o.id)&&e.push({severity:"error",code:"duplicate-zone-id",message:`Zone id "${o.id}" is used more than once`}),L.add(o.id),o.focalPoint!==void 0&&(!Number.isFinite(o.focalPoint.x)||!Number.isFinite(o.focalPoint.y))&&e.push({severity:"error",code:"invalid-zone-focal-point",message:`Zone "${o.label}" must use a finite focal point`});let T=new Map;for(let o of $)if(!(o.type!=="section"||!o.zone)){if(t.zones?.length&&!L.has(o.zone)){e.push({severity:"error",code:"unknown-section-zone",message:`Section "${o.displayLabel??o.label}" references unknown zone "${o.zone}"`,objectId:o.id});continue}T.has(o.zone)||T.set(o.zone,o)}for(let[o,S]of T){let s=t.zones?.find(y=>y.id===o);s&&(s?.focalPoint||n.push({severity:"warning",code:"missing-zone-focal-point",message:`Zone "${s?.label??o}" uses the legacy floor focal; set its own focal point before publishing`,objectId:S.id}))}for(let o of $)if((o.type==="row"||o.type==="table"||o.type==="booth"||o.type==="gaArea")&&rt(o,e),_t(o)){if(w++,j+=o.type==="booth"?1:o.type==="row"?Te(o):o.bookAsWhole||o.variableOccupancy?o.seatCount:lt(o).length,p.get(o.label)!==void 0?o.type!=="row"&&e.push({severity:"error",code:"duplicate-object-label",message:`Label "${o.label}" is used by more than one object`,objectId:o.id}):p.set(o.label,o.id),i.has(o.categoryKey)?l.add(o.categoryKey):e.push({severity:"error",code:"unknown-category",message:`"${o.label}" references unknown category "${o.categoryKey}"`,objectId:o.id,categoryKey:o.categoryKey}),o.type==="row"){ee(o.referenceInventorySource)||e.push({severity:"error",code:"invalid-reference-inventory-source",message:`Row "${o.label}" has invalid reference-inventory provenance`,objectId:o.id}),o.seatCount<1&&e.push({severity:"error",code:"empty-row",message:`Row "${o.label}" has no seats`,objectId:o.id});let s=new Set;for(let y of o.overrides??[]){(y.accessibility??[]).filter(x=>!r.has(x)).length&&e.push({severity:"error",code:"invalid-accessibility-type",message:`Row "${o.label}" seat ${y.index+1} uses an unknown accessibility type`,objectId:o.id,seatIndices:[y.index]}),(!Number.isInteger(y.index)||y.index<0||y.index>=o.seatCount||s.has(y.index))&&e.push({severity:"error",code:"invalid-seat-override",message:`Row "${o.label}" has a duplicated or out-of-range seat override`,objectId:o.id,...Number.isInteger(y.index)?{seatIndices:[y.index]}:{}}),s.add(y.index);let v=y.wheelchairSpaceType,m=y.accessible===!0||y.accessibility?.includes("wheelchair");v!==void 0&&v!=="seat-present"&&v!=="no-seat"?e.push({severity:"error",code:"invalid-wheelchair-space",message:`Row "${o.label}" seat ${y.index+1} has an invalid wheelchair-space type`,objectId:o.id,seatIndices:[y.index]}):v&&(!m||y.skip)&&e.push({severity:"error",code:"invalid-wheelchair-space",message:y.skip?`Row "${o.label}" seat ${y.index+1} cannot have a wheelchair-space physical type while skipped from inventory`:`Row "${o.label}" seat ${y.index+1} must include wheelchair accessibility for its physical-space type`,objectId:o.id,seatIndices:[y.index]})}for(let y of Dt(o))oe(y.label)&&e.push({severity:"error",code:"reserved-seat-label",message:`Seat label "${y.label}" uses SeatLayer's reserved GA namespace`,objectId:o.id,seatIndices:[y.index]}),b.get(y.label)!==void 0?I.push({severity:"error",code:"duplicate-seat-label",message:`Seat label "${y.label}" is used more than once`,objectId:o.id,seatIndices:[y.index]}):b.set(y.label,o.id)}else if(o.type==="table"){let s=o.bookAsWhole===!0||o.variableOccupancy===!0;if(o.seatCountsBySide){let m=["top","bottom","left","right"],x=Object.keys(o.seatCountsBySide),C=m.every(_=>Number.isInteger(o.seatCountsBySide[_])&&o.seatCountsBySide[_]>=0&&o.seatCountsBySide[_]<=40),P=C?m.reduce((_,ht)=>_+o.seatCountsBySide[ht],0):Number.NaN;(o.shape!=="rect"||x.length!==m.length||x.some(_=>!m.includes(_))||!C||P!==o.seatCount||P<1||P>40)&&e.push({severity:"error",code:"invalid-table-side-counts",message:`Table "${o.label}" needs top, bottom, left, and right whole-number chair counts totaling its ${o.seatCount}-chair capacity`,objectId:o.id})}s&&o.overrides?.length&&e.push({severity:"error",code:"grouped-table-chair-overrides",message:`Grouped table "${o.label}" cannot carry individual-chair overrides`,objectId:o.id,seatIndices:o.overrides.map(m=>m.index)});let y=new Set;for(let m of o.overrides??[]){(m.accessibility??[]).filter(_=>!r.has(_)).length&&e.push({severity:"error",code:"invalid-accessibility-type",message:`Table "${o.label}" chair ${m.index+1} uses an unknown accessibility type`,objectId:o.id,seatIndices:[m.index]}),(!Number.isInteger(m.index)||m.index<0||m.index>=o.seatCount||y.has(m.index))&&e.push({severity:"error",code:"invalid-seat-override",message:`Table "${o.label}" has a duplicated or out-of-range chair override`,objectId:o.id,...Number.isInteger(m.index)?{seatIndices:[m.index]}:{}}),y.add(m.index),m.categoryKey&&!i.has(m.categoryKey)?e.push({severity:"error",code:"unknown-category",message:`Table "${o.label}" chair ${m.index+1} references unknown category "${m.categoryKey}"`,objectId:o.id,seatIndices:[m.index],categoryKey:m.categoryKey}):m.categoryKey&&l.add(m.categoryKey);let C=m.wheelchairSpaceType,P=m.accessible===!0||m.accessibility?.includes("wheelchair");C!==void 0&&C!=="seat-present"&&C!=="no-seat"?e.push({severity:"error",code:"invalid-wheelchair-space",message:`Table "${o.label}" chair ${m.index+1} has an invalid wheelchair-space type`,objectId:o.id,seatIndices:[m.index]}):C&&(!P||m.skip)&&e.push({severity:"error",code:"invalid-wheelchair-space",message:m.skip?`Table "${o.label}" chair ${m.index+1} cannot have a wheelchair-space physical type while skipped from inventory`:`Table "${o.label}" chair ${m.index+1} must include wheelchair accessibility for its physical-space type`,objectId:o.id,seatIndices:[m.index]})}o.bookAsWhole&&o.variableOccupancy?e.push({severity:"error",code:"invalid-table-booking-mode",message:`Table "${o.label}" cannot be sold both as a whole table and with variable occupancy`,objectId:o.id}):o.variableOccupancy?(!Number.isInteger(o.minOccupancy)||!Number.isInteger(o.maxOccupancy)||o.minOccupancy<1||o.maxOccupancy<o.minOccupancy||o.maxOccupancy>o.seatCount)&&e.push({severity:"error",code:"invalid-table-occupancy",message:`Table "${o.label}" needs whole-number minimum and maximum guests from 1 to its ${o.seatCount}-chair capacity`,objectId:o.id}):(o.minOccupancy!=null||o.maxOccupancy!=null)&&e.push({severity:"error",code:"invalid-table-occupancy",message:`Table "${o.label}" has guest bounds without variable-occupancy selling`,objectId:o.id}),ee(o.referenceInventorySource)||e.push({severity:"error",code:"invalid-reference-inventory-source",message:`Table "${o.label}" has invalid reference-inventory provenance`,objectId:o.id}),(o.shape==="round"&&o.radius==null||o.shape==="rect"&&(o.width==null||o.height==null)||o.seatCount<1)&&e.push({severity:"error",code:"bad-table",message:`Table "${o.label}" is missing required dimensions or seats`,objectId:o.id});let v=s?[{label:o.label,index:void 0}]:lt(o);for(let m of v)oe(m.label)&&e.push({severity:"error",code:"reserved-seat-label",message:`Inventory label "${m.label}" uses SeatLayer's reserved GA namespace`,objectId:o.id}),b.get(m.label)!==void 0?I.push({severity:"error",code:"duplicate-seat-label",message:`Inventory label "${m.label}" is used more than once; grouped table labels must be unique`,objectId:o.id,...m.index===void 0?{}:{seatIndices:[m.index]}}):b.set(m.label,o.id)}else if(o.type==="booth"){ee(o.referenceInventorySource)||e.push({severity:"error",code:"invalid-reference-inventory-source",message:`Booth "${o.label}" has invalid reference-inventory provenance`,objectId:o.id});let s=o.label;oe(s)&&e.push({severity:"error",code:"reserved-seat-label",message:`Seat label "${s}" uses SeatLayer's reserved GA namespace`,objectId:o.id}),b.get(s)!==void 0?I.push({severity:"error",code:"duplicate-seat-label",message:`Seat label "${s}" is used more than once`,objectId:o.id}):b.set(s,o.id)}}else if(o.type==="gaArea"){if(!Le(o))e.push({severity:"error",code:"invalid-ga-inventory-segments",message:`GA area "${o.label}" has invalid joined-area inventory provenance`,objectId:o.id});else for(let u of Pe(o))b.get(u)!==void 0?I.push({severity:"error",code:"duplicate-seat-label",message:`GA inventory label "${u}" is used more than once`,objectId:o.id}):b.set(u,o.id);ee(o.referenceInventorySource)||e.push({severity:"error",code:"invalid-reference-inventory-source",message:`GA area "${o.label}" has invalid reference-inventory provenance`,objectId:o.id}),(!B(o.points)||Math.abs(z(o.points))<=1e-7||V(o.points))&&e.push({severity:"error",code:"invalid-ga-outline",message:`GA area "${o.label}" must have a finite, non-self-intersecting polygon outline`,objectId:o.id});let s=o.holes??[],y=Array.isArray(s)&&s.length<=64?s.findIndex(u=>!Array.isArray(u)||u.length>512||!B(u)||Math.abs(z(u))<=1e-7||V(u)?!0:!u.flatMap((m,x)=>{let C=u[(x+1)%u.length];return[m,{x:(m.x+C.x)/2,y:(m.y+C.y)/2}]}).every(m=>U(m,o.points))):0;if(y>=0)e.push({severity:"error",code:"invalid-ga-hole",message:`GA area "${o.label}" has a cutout outside its outline or with invalid geometry`,objectId:o.id,holeIndex:y});else if(s.some((u,v)=>s.slice(v+1).some(m=>J(u,m)))){let u=s.findIndex((v,m)=>s.slice(m+1).some(x=>J(v,x)));e.push({severity:"error",code:"overlapping-ga-holes",message:`GA area "${o.label}" has overlapping cutout polygons`,objectId:o.id,holeIndex:u})}i.has(o.categoryKey)?l.add(o.categoryKey):e.push({severity:"error",code:"unknown-category",message:`"${o.label}" references unknown category "${o.categoryKey}"`,objectId:o.id,categoryKey:o.categoryKey}),o.capacity<1&&e.push({severity:"error",code:"empty-ga",message:`GA area "${o.label}" has zero capacity`,objectId:o.id}),(!Number.isInteger(o.capacity)||o.capacity>fe)&&e.push({severity:"error",code:"invalid-ga-capacity",message:`GA area "${o.label}" capacity must be a whole number from 1 to ${fe}`,objectId:o.id}),w++,j+=Math.max(0,Math.floor(o.capacity))}else if(o.type==="section"){if(o.elevation!==void 0&&(!Number.isInteger(o.elevation)||o.elevation<ce||o.elevation>H)){let y=Number.isInteger(o.elevation)&&o.elevation>H&&o.elevation<=Ee;n.push({severity:"warning",code:y?"legacy-section-elevation":"invalid-section-elevation",message:y?`Section "${o.label}" uses legacy tier ${o.elevation}; set an exact height before normalizing it to tier ${H}`:`Section "${o.label}" elevation must be a whole-number tier from ${ce} to ${H}`,objectId:o.id})}if(o.height!==void 0&&(!Number.isFinite(o.height)||o.height<X||o.height>Y)&&e.push({severity:"error",code:"invalid-section-height",message:`Section "${o.label}" exact height must be between ${X} and ${Y} metres`,objectId:o.id}),o.rake!==void 0&&(!Number.isFinite(o.rake)||o.rake<le||o.rake>de)&&e.push({severity:"error",code:"invalid-section-rake",message:`Section "${o.label}" rake must be between ${le}\xB0 and ${de}\xB0`,objectId:o.id}),o.surfaceKind!==void 0&&o.surfaceKind!=="flat"&&o.surfaceKind!=="rakedRows"&&e.push({severity:"error",code:"invalid-section-surface-kind",message:`Section "${o.label}" surfaceKind must be 'flat' or 'rakedRows'`,objectId:o.id}),!B(o.outline)||Math.abs(z(o.outline))<=1e-7||V(o.outline)){e.push({severity:"error",code:"invalid-section-outline",message:`Section "${o.label}" must have a finite, non-self-intersecting polygon outline`,objectId:o.id});continue}if(o.outlinePath){let y=[];try{y=ke(o.outlinePath)}catch{}(!$e(o.outlinePath)||!y.length||Math.hypot(o.outlinePath.start.x-o.outline[0].x,o.outlinePath.start.y-o.outline[0].y)>1e-4||!B(y)||Math.abs(z(y))<=1e-7||V(y))&&e.push({severity:"error",code:"invalid-section-outline-path",message:`Section "${o.label}" has an invalid or inconsistent curved outline path`,objectId:o.id,edgeIndex:tt(o)})}if(o.referenceSource&&(!/^ref_[0-9a-f-]{36}$/.test(o.referenceSource.assetId)||!/^reg_[0-9a-f]{16}$/.test(o.referenceSource.regionId))&&e.push({severity:"error",code:"invalid-section-reference-source",message:`Section "${o.label}" has invalid opaque reference provenance`,objectId:o.id}),at(o)||e.push({severity:"error",code:"invalid-section-inventory-exclusion",message:`Section "${o.label}" has incomplete or mismatched non-sellable evidence`,objectId:o.id}),o.logicalSectionId!==void 0&&!o.logicalSectionId.trim())e.push({severity:"error",code:"invalid-logical-section-id",message:`Section "${o.label}" has an empty logical section id`,objectId:o.id});else if(o.logicalSectionId){let y=JSON.stringify({displayLabel:o.displayLabel??null,entrance:o.entrance??null,viewFromSeatUrl:o.viewFromSeatUrl??null,viewFromSeatMeta:o.viewFromSeatMeta??null,confidenceEvidence:o.confidenceEvidence??null,zone:o.zone??null,labelStyle:o.labelPresentation?.labelStyle??null,labelVisible:o.labelPresentation?.visible!==!1}),u=O.get(o.logicalSectionId);u&&(u.label!==o.label||u.semanticSignature!==y)?e.push({severity:"error",code:"inconsistent-logical-section",message:`Logical section "${o.logicalSectionId}" must use one technical label and buyer-facing presentation across every component`,objectId:o.id}):u||O.set(o.logicalSectionId,{label:o.label,semanticSignature:y})}o.viewFromSeatUrl!==void 0&&(o.viewFromSeatUrl.length>2e6||!/^(https:\/\/|data:image\/)/.test(o.viewFromSeatUrl))&&e.push({severity:"error",code:"invalid-section-view-url",message:`Section "${o.label}" has an invalid view-from-seat image URL`,objectId:o.id});let S=o.holes??[];if(!Array.isArray(S)||S.length>64){e.push({severity:"error",code:"invalid-section-hole",message:`Section "${o.label}" has an invalid opening collection`,objectId:o.id});continue}let s=-1;for(let y=0;y<S.length;y++){let u=S[y];if(!Array.isArray(u)||u.length>512||!B(u)||Math.abs(z(u))<=1e-7||V(u)){s=y;break}if(!u.flatMap((m,x)=>{let C=u[(x+1)%u.length];return[m,{x:(m.x+C.x)/2,y:(m.y+C.y)/2}]}).every(m=>U(m,o.outline))){s=y;break}}if(s>=0)e.push({severity:"error",code:"invalid-section-hole",message:`Section "${o.label}" has an opening outside its outline or with an invalid shape`,objectId:o.id,holeIndex:s});else if(S.some((y,u)=>S.slice(u+1).some(v=>J(y,v)))){let y=S.findIndex((u,v)=>S.slice(v+1).some(m=>J(u,m)));e.push({severity:"error",code:"overlapping-section-holes",message:`Section "${o.label}" has overlapping openings`,objectId:o.id,holeIndex:y})}}let F=t.floors?.length?t.floors.map(o=>o.objects):[t.objects];for(let o of F){let S=o.filter(s=>s.type==="section");for(let s of o.filter(y=>y.type==="text")){let y=s.iconKey;y!==void 0&&!Ge(y)&&e.push({severity:"error",code:"invalid-icon-key",message:`Venue icon "${s.text||s.id}" references an unknown symbol`,objectId:s.id});let u=s.fontFamily;u!==void 0&&(typeof u!="string"||u.normalize("NFKC").trim()!==u||u.length<1||u.length>120)&&e.push({severity:"error",code:"invalid-text-font-family",message:`Text "${s.text||s.id}" font family must contain 1 to 120 normalized characters`,objectId:s.id});let v=s.background;(s.width!==void 0&&(!Number.isFinite(s.width)||s.width<40||s.width>1200)||s.align!==void 0&&!["left","center","right"].includes(s.align)||s.lineHeight!==void 0&&(!Number.isFinite(s.lineHeight)||s.lineHeight<.8||s.lineHeight>3)||s.letterSpacing!==void 0&&(!Number.isFinite(s.letterSpacing)||s.letterSpacing<-2||s.letterSpacing>20)||s.opacity!==void 0&&(!Number.isFinite(s.opacity)||s.opacity<.1||s.opacity>1)||v!==void 0&&(!/^#[0-9a-f]{6}$/i.test(v.color)||v.padding!==void 0&&(!Number.isFinite(v.padding)||v.padding<0||v.padding>40)||v.cornerRadius!==void 0&&(!Number.isFinite(v.cornerRadius)||v.cornerRadius<0||v.cornerRadius>40)||v.opacity!==void 0&&(!Number.isFinite(v.opacity)||v.opacity<.1||v.opacity>1)))&&e.push({severity:"error",code:"invalid-text-layout",message:`Text "${s.text||s.id}" has invalid width, spacing, opacity, alignment, or background layout`,objectId:s.id})}for(let s of o.filter(y=>y.type==="shape")){if(s.eventConfigurationIds!==void 0){let v=s.eventConfigurationIds;Array.isArray(v)&&v.length>0&&v.length<=20&&v.every(x=>typeof x=="string"&&x.normalize("NFKC").trim()===x&&x.length>=1&&x.length<=100)&&new Set(v).size===v.length||e.push({severity:"error",code:"invalid-shape-configurations",message:`Shape "${s.label||s.id}" must reference 1 to 20 unique event configuration ids`,objectId:s.id})}if(s.heightM!==void 0&&(!Number.isFinite(s.heightM)||s.heightM<.05||s.heightM>50)&&e.push({severity:"error",code:"invalid-shape-height",message:`Shape "${s.label||s.id}" height must be between 0.05 m and 50 m`,objectId:s.id}),s.stroke!==void 0&&(!s.stroke||typeof s.stroke.color!="string"||!/^#[0-9a-f]{6}$/i.test(s.stroke.color)||!Number.isFinite(s.stroke.width)||s.stroke.width<.5||s.stroke.width>40)&&e.push({severity:"error",code:"invalid-shape-stroke",message:`Shape "${s.label||s.id}" stroke must use a six-digit color and width from 0.5 to 40 chart units`,objectId:s.id}),(s.lineCap!==void 0||s.lineJoin!==void 0||s.startEnding!==void 0||s.endEnding!==void 0)&&!he(s.kind)?e.push({severity:"error",code:"invalid-shape-line-style-applicability",message:`Shape "${s.label||s.id}" may use line caps, joins, and end decorations only when it is an open line or polyline`,objectId:s.id}):he(s.kind)&&(s.lineCap!==void 0&&!Ue.includes(s.lineCap)||s.lineJoin!==void 0&&!Ve.includes(s.lineJoin)||s.startEnding!==void 0&&!pe.includes(s.startEnding)||s.endEnding!==void 0&&!pe.includes(s.endEnding))&&e.push({severity:"error",code:"invalid-shape-line-style",message:`Shape "${s.label||s.id}" has an unsupported line cap, join, or ending`,objectId:s.id}),s.kind==="polygon"){let v=Ze(s.points??[]);v.ok||e.push({severity:"error",code:"invalid-shape-polygon",message:`Shape "${s.label||s.id}" has invalid polygon geometry: ${v.message}`,objectId:s.id})}let u=nt(s);if(u){for(let v of S)if(ot(u,v.outline)){e.push({severity:"error",code:"reference-focal-overlaps-section",message:`Reference focal area "${s.label??s.id}" overlaps section "${v.label}"`,objectId:s.id});break}}}}j>ge&&e.push({severity:"error",code:"inventory-capacity-exceeded",message:`Chart has ${j} bookable units; the maximum is ${ge}`}),e.push(...I.slice(0,5)),I.length>5&&e.push({severity:"error",code:"duplicate-seat-label",message:`${I.length} seats share a label with another seat; the first 5 are listed above. Seat labels must be unique across the whole chart.`});for(let o of ne(t)){let S=o.families[0]?.targets[0];n.push({severity:"warning",code:"category-inventory-family-conflict",message:Xe(o),categoryKey:o.categoryKey,...S?{objectId:S.id,floorId:S.floorId}:{},relatedObjectIds:o.objectIds,categoryInventoryFamilies:o.families})}t.focalPoint||n.push({severity:"warning",code:"missing-focal-point",message:"Chart has no focal point set"}),w===0&&n.push({severity:"warning",code:"no-bookables",message:"Chart has no rows, tables, booths, or GA areas"});for(let o of l)if(a.get(o)===!1){let S=t.categories.find(s=>s.key===o);n.push({severity:"warning",code:"unpriced-category",message:`Category "${S?.label??o}" is used but has no price`,categoryKey:o})}return[...e,...n]}var Kt=9,gt="#0e1117",Bt="#f5f6f8",bt="#8b93a7",zt="#0b1220",Gt="#0b1220",Ut="#ffffff",Vt=100;function k(t,e=2){let n=10**e;return Math.round(t*n)/n}function ut(t){let e=Fe(t);if(!e)return null;let n=b=>{let I=b/255;return I<=.04045?I/12.92:((I+.055)/1.055)**2.4},i=n(e[0]),r=n(e[1]),a=n(e[2]),l=(.4124*i+.3576*r+.1805*a)/.95047,f=(.2126*i+.7152*r+.0722*a)/1,h=(.0193*i+.1192*r+.9505*a)/1.08883,c=b=>b>.008856?Math.cbrt(b):7.787*b+16/116,d=c(l),g=c(f),p=c(h);return[116*g-16,500*(d-g),200*(g-p)]}function Qt(t,e){let n=ut(t),i=ut(e);return!n||!i?null:Math.hypot(n[0]-i[0],n[1]-i[1],n[2]-i[2])}function E(t){return{source:"quality",...t}}function qt(t){return t.code==="missing-focal-point"||t.code==="missing-zone-focal-point"?"navigation":"structure"}function Se(t){return Kt*q(t.theme?.seatScale??1,.7,1.6)}function mt(t){let e=[];for(let n of t.objects)n.type==="row"?e.push(...K(n)):n.type==="table"&&e.push(...W(n));return e}function Ht(t){let e={rowSeats:0,tableSeats:0,booths:0,gaCapacity:0};for(let n of t)for(let i of n.objects)i.type==="row"?e.rowSeats+=K(i).length:i.type==="table"?e.tableSeats+=W(i).length:i.type==="booth"?e.booths+=1:i.type==="gaArea"&&(e.gaCapacity+=Math.max(0,Math.floor(i.capacity)));return{inventoryByKind:e,bookableUnits:e.rowSeats+e.tableSeats+e.booths+e.gaCapacity}}function M(t,e){t.filter(n=>n.code===e.code).length<Vt&&t.push(e)}function Xt(t,e,n){let i=Se(t),r=2*i,a=2.3*i,l=0,f=0,h=1/0;for(let c of e){let d=new Map(c.objects.filter(w=>w.type==="row").map(w=>[w.id,w])),g=w=>{let j=c.objects.find(T=>T.id===w);if(!j||j.type!=="row"&&j.type!=="table")return"another seating object";let A=j.type==="row"?K(j):W(j),$=A.length?{x:A.reduce((T,F)=>T+F.x,0)/A.length,y:A.reduce((T,F)=>T+F.y,0)/A.length}:j.type==="row"?j.origin:j.center,N=c.objects.find(T=>T.type==="section"&&te($,T.outline,T.holes)),L=j.type==="row"?`Row \u201C${j.label}\u201D`:`Table \u201C${j.label}\u201D`;return N?.type==="section"?`${L} in \u201C${N.label}\u201D`:L},p=mt(c);l+=p.length;let b=a,I=new Map,O=new Map;for(let w of p){let j=Math.floor(w.x/b),A=Math.floor(w.y/b);for(let L=-1;L<=1;L++)for(let T=-1;T<=1;T++){let F=I.get(`${j+L}:${A+T}`)??[];for(let o of F){f++;let S=Math.hypot(w.x-o.x,w.y-o.y);if(h=Math.min(h,S),S>=a)continue;let y=(w.rowId<o.rowId?[w.rowId,o.rowId]:[o.rowId,w.rowId]).join("|"),u=O.get(y);(!u||S<u.distance)&&O.set(y,{a:w,b:o,distance:S})}}let $=`${j}:${A}`,N=I.get($)??[];N.push(w),I.set($,N)}for(let w of O.values()){let j=w.a.rowId===w.b.rowId,A=d.get(w.a.rowId),$=d.get(w.b.rowId),N=!j&&A?.segmentedRow?.repeatLabelOnComponents===!0&&$?.segmentedRow?.repeatLabelOnComponents===!0&&A.segmentedRow.groupId===$.segmentedRow.groupId,L=w.distance<r?"error":"warning";if(N&&L==="warning")continue;let T=L==="error"?"seat-overlap":"seat-cramped",F=g(w.a.rowId),o=g(w.b.rowId),S=k(L==="error"?r:a);M(n,E({severity:L,code:T,dimension:"geometry",title:j?`${F} has seats too close together`:`${F} and ${o} are too close together`,message:`The closest seats are ${k(w.distance)} chart units apart; at least ${S} are required.`,action:j?`Increase the seat spacing for ${F}, or use Review safe fixes.`:`Move ${F} or ${o} until they no longer overlap.`,objectId:w.a.rowId,relatedObjectIds:j?[w.a.rowId]:[w.a.rowId,w.b.rowId],floorId:c.id,measured:k(w.distance),minimum:k(L==="error"?r:a),autoFixable:j}))}}return{seats:l,checkedSeatPairs:f,minimumSeatDistance:Number.isFinite(h)?k(h):null}}function ae(t){let{width:e,height:n}=Ce(t);if(!t.rotation)return{x:t.position.x,y:t.position.y,width:e,height:n};let i=[{x:0,y:0},{x:e,y:0},{x:e,y:n},{x:0,y:n}].map(r=>{let a=je(r,t.rotation);return{x:t.position.x+a.x,y:t.position.y+a.y}});return ze(i)}function pt(t,e,n=0){return t.x<e.x+e.width+n&&t.x+t.width+n>e.x&&t.y<e.y+e.height+n&&t.y+t.height+n>e.y}function we(t,e,n){let i=q(e.x,t.x,t.x+t.width),r=q(e.y,t.y,t.y+t.height);return(e.x-i)**2+(e.y-r)**2<n**2}function Yt(t,e,n){let i=Se(t),r=0;for(let a of e){let l=a.objects.filter(h=>h.type==="text"),f=mt(a);r+=l.length;for(let h=0;h<l.length;h++){let c=l[h],d=ae(c),g=f.find(p=>we(d,p,i));g&&M(n,E({severity:"warning",code:"label-collision",dimension:"labels",message:`Text \u201C${c.text}\u201D overlaps seat ${g.label}`,objectId:c.id,relatedObjectIds:[c.id,g.rowId],floorId:a.id,autoFixable:!0}));for(let p=0;p<h;p++){let b=l[p];pt(d,ae(b),2)&&M(n,E({severity:"warning",code:"label-collision",dimension:"labels",message:`Text \u201C${c.text}\u201D overlaps text \u201C${b.text}\u201D`,objectId:c.id,relatedObjectIds:[c.id,b.id],floorId:a.id,autoFixable:!0}))}}}return r}function Wt(t){return t.normalize("NFKC").trim().toLowerCase().replace(/\s+/g," ")}function Zt(t,e,n){let i=new Map;for(let a of e)for(let l of a.objects){let f=l.type,h=f==="row"||f==="table"||f==="booth"||f==="gaArea",c=h||f==="section";if(h&&!l.categoryKey.trim()){let d=f==="gaArea"?"GA area":f==="row"?"Row":f==="table"?"Table":"Booth";M(n,E({severity:"warning",code:"object-uncategorized",dimension:"structure",title:`${d} \u201C${l.label||l.id}\u201D has no category`,message:`${d} \u201C${l.label||l.id}\u201D is not assigned to any category, so buyers see no price or colour for it.`,action:"Assign a category to this object in the inspector, or create one in the Categories tab first.",objectId:l.id,floorId:a.id,autoFixable:!1}))}if(c){let d=(l.type==="section"?l.displayLabel??l.label:l.label)??"";if(d.trim()){if(f==="table"||f==="booth"||f==="gaArea"){let g=Wt(d),p=i.get(g);p&&p.raw!==d?M(n,E({severity:"warning",code:"duplicate-object-label-normalized",dimension:"labels",title:`\u201C${d}\u201D and \u201C${p.raw}\u201D read as the same label`,message:`Labels \u201C${d}\u201D and \u201C${p.raw}\u201D differ only by case, spacing, or accents, so buyers cannot tell them apart.`,action:"Make the two labels visibly distinct.",objectId:l.id,relatedObjectIds:[l.id,p.id],floorId:a.id,autoFixable:!1})):p||i.set(g,{id:l.id,raw:d})}}else{let g=f==="gaArea"?"A GA area":f==="section"?"A section":f==="row"?"A row":f==="table"?"A table":"A booth";M(n,E({severity:"warning",code:"object-unlabeled",dimension:"labels",title:`${g} has no label`,message:`${g} has an empty label; buyers rely on labels to identify what they are booking.`,action:"Give this object a short, unique label in the inspector.",objectId:l.id,floorId:a.id,autoFixable:!1}))}}}let r=[];for(let a of e){let l=a.objects.filter(f=>f.type==="row"||f.type==="table"||f.type==="booth"||f.type==="gaArea");for(let f of a.objects)if(!(f.type!=="section"||f.referenceInventoryExclusion||l.some(c=>te(ue(c),f.outline,f.holes)))){if(f.referenceSource){r.push({id:f.id,floorId:a.id});continue}M(n,E({severity:"warning",code:"empty-section",dimension:"structure",title:`Section \u201C${f.displayLabel??f.label}\u201D is empty`,message:`Section \u201C${f.displayLabel??f.label}\u201D contains no rows, tables, booths, or GA areas.`,action:"Add seating inside this section (Fill with rows), or remove the empty section.",objectId:f.id,floorId:a.id,autoFixable:!1}))}}if(r.length&&M(n,E({severity:"warning",code:"empty-section",dimension:"structure",title:r.length===1?"1 traced section has no seating yet":`${r.length} traced sections have no seating yet`,message:`${r.length} section${r.length===1?"":"s"} traced from the reference image contain${r.length===1?"s":""} no rows, tables, booths, or GA areas.`,action:"Fill them with rows, or remove the ones the venue does not sell.",objectId:r[0].id,relatedObjectIds:r.map(a=>a.id),floorId:r[0].floorId,autoFixable:!1})),t.floors&&t.floors.length>1)for(let a of t.floors)a.objects.length===0&&M(n,E({severity:"warning",code:"unused-floor",dimension:"structure",title:`Floor \u201C${a.name}\u201D is empty`,message:`Floor \u201C${a.name}\u201D has no objects on it.`,action:"Add seating to this floor, or delete it from the floor list below the canvas.",floorId:a.id,autoFixable:!1}))}var Jt=5,eo=16;function to(t,e,n){for(let i of e){let r=i.focalPoint??t.focalPoint;if(r)for(let a of i.objects){if(a.type!=="section"||a.outline.length<3)continue;let{rake:l}=Ae(a);if(l<Jt)continue;let f=a.outline.map(p=>Math.hypot(p.x-r.x,p.y-r.y)),h=Math.max(...f);if(h<=0)continue;let c=(h-Math.min(...f))/h;if(l*c<=eo)continue;let g=a.displayLabel??a.label;M(n,E({severity:"warning",code:"section-rake-inconsistent",dimension:"geometry",title:`Section \u201C${g}\u201D is too deep for a single rake`,message:`Section \u201C${g}\u201D spans ${Math.round(c*100)}% of its distance to the stage at a ${Math.round(l)}\xB0 rake, so one rake can't represent its sightlines faithfully \u2014 a real tier this deep changes slope at a cross-aisle.`,action:"Split this section at the cross-aisle into two sections, each with its own rake.",objectId:a.id,floorId:i.id,autoFixable:!1}))}}}function oo(t,e,n){let i=t.theme?.background??gt,r=Bt,a=new Map;for(let c of e)for(let d of c.objects){if(d.type!=="gaArea")continue;let g=a.get(d.categoryKey)??[];g.push({id:d.id,floorId:c.id}),a.set(d.categoryKey,g)}for(let c of t.categories){let d=R(c.color,i),g=R(c.color,r);if(d==null||g==null){M(n,E({severity:"error",code:"invalid-category-color",dimension:"contrast",message:`Category \u201C${c.label}\u201D does not use a supported hex color`,categoryKey:c.key}));continue}let p=Math.min(d,g);p<3&&M(n,E({severity:"warning",code:"category-contrast-low",dimension:"contrast",title:`Category \u201C${c.label}\u201D is hard to see`,message:`Category \u201C${c.label}\u201D reaches only ${k(p)}:1 across dark and light chart backgrounds; 3:1 is required`,action:`Choose a lighter or darker color for \u201C${c.label}\u201D until this warning clears.`,categoryKey:c.key,measured:k(p),minimum:3,autoFixable:!1}));let b=a.get(c.key)??[];if(b.length){let I=me(c.color,i,be),O=me(c.color,r,be),w=Math.min(R(I,i)??0,R(O,r)??0);w<3&&M(n,E({severity:"warning",code:"ga-contrast-low",dimension:"contrast",message:`GA category \u201C${c.label}\u201D reaches only ${k(w)}:1 after its rendered opacity is composited; 3:1 is required`,objectId:b[0].id,categoryKey:c.key,floorId:b[0].floorId,relatedObjectIds:b.map(j=>j.id),measured:k(w),minimum:3,autoFixable:!1}))}}for(let c=0;c<t.categories.length;c++)for(let d=0;d<c;d++){let g=t.categories[c],p=t.categories[d],b=Qt(g.color,p.color);b!=null&&b<25&&M(n,E({severity:"warning",code:"category-colors-too-similar",dimension:"contrast",title:`\u201C${g.label}\u201D and \u201C${p.label}\u201D look too similar`,message:`Categories \u201C${g.label}\u201D and \u201C${p.label}\u201D are only \u0394E ${k(b)} apart; 25 is required`,action:"Pick a visibly different color for either category so buyers can tell them apart.",categoryKey:g.key,measured:k(b),minimum:25,autoFixable:!1}))}for(let c of e){let d=c.objects.filter(g=>g.type==="text");for(let g of d){let p=g.color??t.theme?.textColor??bt,b=R(p,i),I=g.fontSize>=18?3:4.5;(b==null||b<I)&&M(n,E({severity:"warning",code:"text-contrast-low",dimension:"contrast",message:`Text \u201C${g.text}\u201D has ${k(b??0)}:1 contrast against the chart background; ${I}:1 is required`,objectId:g.id,floorId:c.id,measured:k(b??0),minimum:I,autoFixable:!0}))}}if(t.theme?.selectionColor){let c=R(t.theme.selectionColor,i);(c==null||c<3)&&M(n,E({severity:"warning",code:"selection-contrast-low",dimension:"contrast",title:"The selection color is hard to see",message:`Selection rings have ${k(c??0)}:1 contrast against the chart background; 3:1 is required.`,action:"In Theme, choose a Selection color that stands out clearly from the Background color.",measured:k(c??0),minimum:3,autoFixable:!1}))}if(t.theme?.textColor){let c=R(t.theme.textColor,i);(c==null||c<3)&&M(n,E({severity:"warning",code:"theme-text-contrast-low",dimension:"contrast",title:"The theme text color is hard to read",message:`Theme text has ${k(c??0)}:1 contrast against the chart background; 3:1 is required.`,action:"In Theme, choose a Text color with stronger contrast against the Background color.",measured:k(c??0),minimum:3,autoFixable:!1}))}let l=t.theme?.seatLabelColor??zt,f=new Map,h=(c,d,g)=>{let p=f.get(c)??new Map,b=p.get(d)??[];b.push(g),p.set(d,b),f.set(c,p)};for(let c of e)for(let d of c.objects)if(d.type==="row")for(let g of ie(d).keys())h(g,"seat",d.id);else if(d.type==="table")for(let g of ie(d).keys())h(g,"table seat",d.id);else d.type==="booth"&&h(d.categoryKey,"booth",d.id);for(let c of t.categories){let d=f.get(c.key);if(d)for(let[g,p]of d){let b=g==="booth"?Ne:Re,I=De(_e,600),O=Ke(c.color,l),w=R(O,c.color);(w==null||w<I)&&M(n,E({severity:"warning",code:"bookable-label-contrast-low",dimension:"contrast",message:`${g==="booth"?"Booth":g==="seat"?"Seat":"Table-seat"} labels use ${b}u type and have ${k(w??0)}:1 contrast on category \u201C${c.label}\u201D; ${I}:1 is required for small text`,objectId:p[0],relatedObjectIds:p,measured:k(w??0),minimum:I,autoFixable:!0}))}}}function no(t,e){for(let n of t){let i=n.objects.filter(r=>r.type==="section");if(!(i.length<2))for(let r of n.objects){if(!(r.type==="row"||r.type==="table"||r.type==="booth"||r.type==="gaArea"))continue;let l=ue(r),f=i.filter(b=>te(l,b.outline,b.holes)),h=new Map;for(let b of f){let I=b.logicalSectionId??b.id,O=h.get(I)??[];O.push(b),h.set(I,O)}if(h.size<2)continue;let c=[...h.values()],d=c.map(b=>`Section \u201C${b[0].displayLabel??b[0].label}\u201D`),g=d.length===2?d.join(" and "):`${d.slice(0,-1).join(", ")}, and ${d[d.length-1]}`,p=r.type==="gaArea"?"GA area":r.type==="row"?"Row":r.type==="table"?"Table":"Booth";M(e,E({severity:"warning",code:"ambiguous-section-ownership",dimension:"structure",title:`${p} \u201C${r.label}\u201D belongs to more than one section`,message:`${p} \u201C${r.label}\u201D has its center inside ${g}, so its buyer section is unclear.`,action:"Adjust the boundaries until this object sits in one Section. If the overlapping shapes are meant to form one Section, combine them first.",objectId:r.id,relatedObjectIds:[r.id,...c.flatMap(b=>b.map(I=>I.id))],floorId:n.id,autoFixable:!1}))}}}var io={structure:20,geometry:30,contrast:25,labels:15,navigation:10},ro={"seat-overlap":15,"seat-cramped":4,"label-collision":4,"category-contrast-low":3,"ga-contrast-low":3,"category-colors-too-similar":3,"invalid-category-color":10,"text-contrast-low":4,"bookable-label-contrast-low":3,"selection-contrast-low":3,"theme-text-contrast-low":3,"missing-focal-point":10,"object-uncategorized":3,"object-unlabeled":3,"duplicate-object-label-normalized":2,"empty-section":2,"unused-floor":2,"ambiguous-section-ownership":4,"category-inventory-family-conflict":10};function ao(t){let e={...io};for(let r of t){let a=r.severity==="error"?10:2;e[r.dimension]=Math.max(0,e[r.dimension]-(ro[r.code]??a))}let n=Object.values(e).reduce((r,a)=>r+a,0),i=n>=95?"A":n>=85?"B":n>=70?"C":n>=55?"D":"F";return{overall:n,dimensions:e,errorFree:t.every(r=>r.severity!=="error"),grade:i}}var so=new Set(["unpriced-category","object-uncategorized"]);function yt(t,e={}){let n=ye(t),i=dt(t).filter(d=>d.code!=="missing-zone-focal-point"||e.requireExplicitZoneFocals).map(d=>{let g=d.objectId?n.find(I=>I.objects.some(O=>O.id===d.objectId))?.id:void 0,p=d.code==="category-inventory-family-conflict",b=p?t.categories.find(I=>I.key===d.categoryKey):void 0;return E({...d,...p?{severity:"error",title:`Category \u201C${b?.label??d.categoryKey??"Unknown"}\u201D spans incompatible inventory types`,action:"Show the affected objects, then review the safe category split. The repair preserves price, ticket tiers, accessibility assignments, and source provenance."}:{},...e.requireExplicitZoneFocals&&d.code==="missing-zone-focal-point"?{severity:"error"}:{},...g?{floorId:g}:{},source:"structural",dimension:qt(d),autoFixable:p})}),r=Xt(t,n,i),a=Ht(n),l=Yt(t,n,i);if(Zt(t,n,i),no(n,i),to(t,n,i),oo(t,n,i),n.reduce((d,g)=>d+g.objects.filter(p=>p.type==="row"||p.type==="table"||p.type==="booth"||p.type==="gaArea").length,0)===0){let d=new Set(["missing-focal-point","no-bookables"]);for(let g=i.length-1;g>=0;g--)d.has(i[g].code)&&i.splice(g,1)}if(e.requirePricedInventory)for(let d=0;d<i.length;d++)so.has(i[d].code)&&(i[d]={...i[d],severity:"error"});let h=i.filter(d=>d.severity==="error"),c=i.filter(d=>d.severity==="warning");return{issues:i,errors:h,warnings:c,metrics:{floors:n.length,objects:n.reduce((d,g)=>d+g.objects.length,0),seats:r.seats,bookableUnits:a.bookableUnits,inventoryByKind:a.inventoryByKind,categories:t.categories.length,freeTextLabels:l,checkedSeatPairs:r.checkedSeatPairs,minimumSeatDistance:r.minimumSeatDistance},score:ao(i),deferredRules:["rendered-row-label-decollision","rendered-bookable-state-contrast","section-focus-opacity-and-backdrop","24px-pointer-hit-target","reference-image-diff","sightline-blocked","ga-density-high"]}}function co(t,e){if(t.seatCount<2||t.seatSpacing>=e)return!1;let n=se(K(t));t.seatSpacing=k(e,3);let i=se(K(t));return t.origin.x=k(t.origin.x+n.x-i.x,3),t.origin.y=k(t.origin.y+n.y-i.y,3),!0}function lo(t,e){if(t.seatCount<2)return!1;let n=!1;if(t.shape==="round"){let i=q(t.seatArc??360,0,360),r=(i>=360?360/t.seatCount:i/(t.seatCount-1))*Math.PI/180;if(r>0){let a=e/(2*Math.sin(r/2)),l=Math.max(1,a-16);(t.radius??40)<l&&(t.radius=k(l,3),n=!0)}}else{let i=Me(t),r=Math.max(i.top,i.bottom),a=Math.max(i.left,i.right);r>1&&(t.width??80)/r<e&&(t.width=k(r*e,3),n=!0),a>1&&(t.height??50)/a<e&&(t.height=k(a*e,3),n=!0)}return n}function uo(t){return[Gt,Ut].map(n=>({color:n,minimum:Math.min(...t.map(i=>R(n,i)??0))})).sort((n,i)=>i.minimum-n.minimum)[0].color}function ft(t,e,n){let i=ae(t),r=0;for(let a of e)a.type==="row"?r+=K(a).filter(l=>we(i,l,n)).length:a.type==="table"?r+=W(a).filter(l=>we(i,l,n)).length:a.type==="text"&&a.id!==t.id&&pt(i,ae(a),2)&&r++;return r}function yo(t,e,n){if(ft(t,e,n)===0)return!1;let r={...t.position},a=Math.max(12,t.fontSize*1.25),l=[[0,-1],[1,0],[0,1],[-1,0],[1,-1],[1,1],[-1,1],[-1,-1]];for(let f=1;f<=12;f++)for(let[h,c]of l)if(t.position={x:k(r.x+h*a*f,3),y:k(r.y+c*a*f,3)},ft(t,e,n)===0)return!0;return t.position=r,!1}function Vo(t){let e=JSON.parse(JSON.stringify(t)),n=yt(e),i=[],r=We(e);if(r.changed){e=r.doc;for(let d of r.changes){let g=r.before.find(b=>b.categoryKey===d.categoryKey),p=g?.families.map(b=>b.label).join(", ")??"inventory families";i.push({code:"category-inventory-family-conflict",objectId:g?.objectIds[0],message:`Split category \u201C${d.categoryLabel}\u201D across ${p}; preserved its commercial metadata and reassigned ${d.reassignments.length} affected object${d.reassignments.length===1?"":"s"}`})}}let a=Se(e),l=2.5*a,f=ye(e);for(let d of f)for(let g of d.objects)if(g.type==="row"){let p=g.seatSpacing;co(g,l)&&i.push({code:p<2*a?"seat-overlap":"seat-cramped",objectId:g.id,message:`Expanded ${g.id} to the ${k(l)}u target pitch while preserving its centre`})}else g.type==="table"&&lo(g,l)&&i.push({code:"seat-cramped",objectId:g.id,message:`Expanded ${g.id} so its perimeter seats meet the ${k(l)}u target pitch`});let h=e.theme?.background??gt;for(let d of f)for(let g of d.objects){if(g.type!=="text")continue;let p=g.color??e.theme?.textColor??bt,b=g.fontSize>=18?3:4.5;(R(p,h)??0)<b&&(g.color=uo([h]),i.push({code:"text-contrast-low",objectId:g.id,message:`Changed ${g.id} to the highest-contrast black/white ink`}))}for(let d of f){let g=d.objects.filter(p=>p.type==="text");for(let p of g)yo(p,d.objects,a)&&i.push({code:"label-collision",objectId:p.id,message:`Moved ${p.id} to the nearest collision-free deterministic label position`})}e.floors?.length&&(e.objects=e.floors[0].objects);let c=yt(e);return{doc:e,changed:i.length>0,fixes:i,before:n,after:c}}export{ve as a,ie as b,ne as c,Xe as d,We as e,Ze as f,Qt as g,Vo as h};
|
|
1
|
+
import{a as Re,b as Ne,e as be,f as _e,k as De,s as me,u as Ke}from"./chunk-VI2CLV3Y.js";import{e as Be,n as Ge,p as Ue,q as Ve,r as pe,v as he}from"./chunk-DNGP2HDT.js";import{a as fe,b as ge,d as Le,f as Pe,i as oe}from"./chunk-AQKYUJBX.js";import{b as Q,m as z,p as ze}from"./chunk-6XJN4REG.js";import{$ as Y,A as ke,T as Oe,Y as ce,Z as H,_ as X,a as vt,aa as le,b as It,ba as de,c as wt,ca as Ee,d as St,e as xt,f as Ct,fa as Ae,g as xe,h as jt,i as $t,j as Ce,k as je,ka as Te,l as se,ma as K,na as Me,qa as W,ta as te,va as ue,w as q,xa as ye,z as $e}from"./chunk-VDZ24QVV.js";import{c as Fe,m as R}from"./chunk-CXF32VPG.js";var ve=[{key:"row-seats",label:"row seats",suffix:"rows",labelSuffix:"Rows",creationWord:"Seats",objectType:"row"},{key:"table-chairs",label:"table chairs",suffix:"tables",labelSuffix:"Tables",creationWord:"Tables",objectType:"table"},{key:"booth-units",label:"booth units",suffix:"booths",labelSuffix:"Booths",creationWord:"Booths",objectType:"booth"},{key:"ga-capacity",label:"GA capacity",suffix:"ga",labelSuffix:"GA",creationWord:"Standing",objectType:"gaArea"}];function Qe(t){return t.floors?.length?t.floors:[{id:"floor-0",objects:t.objects}]}function kt(t){return ve.find(e=>e.key===t)}function ie(t){let e=new Map,n=Math.max(0,Math.floor(t.seatCount)),i=new Map((t.overrides??[]).filter(a=>Number.isInteger(a.index)&&a.index>=0&&a.index<t.seatCount).map(a=>[a.index,a])),r=(a,l=1)=>{a&&l>0&&e.set(a,(e.get(a)??0)+l)};r(t.categoryKey,n-i.size);for(let a of i.values())a.skip||r(a.categoryKey??t.categoryKey);return e}function Ot(t){return t.type==="row"||t.type==="table"?[...ie(t).keys()]:t.type==="booth"?t.categoryKey?[t.categoryKey]:[]:t.type==="gaArea"?t.capacity>0&&t.categoryKey?[t.categoryKey]:[]:[]}function qe(t){return ve.find(e=>e.objectType===t.type)??null}function He(t){return t.type==="row"||t.type==="table"||t.type==="booth"||t.type==="gaArea"}function ne(t){let e=new Map;for(let r of Qe(t))for(let a of r.objects){if(!He(a))continue;let l=qe(a);for(let f of Ot(a)){let h=e.get(f)??new Map,c=h.get(l.key)??[];if(!c.some(d=>d.id===a.id)){let d=a.displayLabel||a.label||a.id;c.push({id:a.id,label:d,type:l.objectType,floorId:r.id})}h.set(l.key,c),e.set(f,h)}}let n=new Map(t.categories.map(r=>[r.key,r.label]));return[...t.categories.map(r=>r.key),...[...e.keys()].filter(r=>!n.has(r)).sort()].flatMap(r=>{let a=e.get(r);if(!a||a.size<2)return[];let l=ve.flatMap(f=>{let h=a.get(f.key);return h?.length?[{family:f.key,label:f.label,objectType:f.objectType,targets:h}]:[]});return[{categoryKey:r,categoryLabel:n.get(r)??r,families:l,objectIds:[...new Set(l.flatMap(f=>f.targets.map(h=>h.id)))]}]})}function Xe(t){let e=t.families.map(n=>`${n.label} (${n.targets.map(i=>i.label).join(", ")})`).join(" and ");return`Category \u201C${t.categoryLabel}\u201D is used by more than one kind of inventory \u2014 ${e}. Each category can belong to only one kind \u2014 use the safe split to separate them (prices, ticket tiers, accessibility, and provenance are preserved).`}function Ye(t){return t.normalize("NFKC").trim().toLocaleLowerCase("en")}function Et(t,e,n){for(let i=1;i<=1e4;i+=1){let r=i===1?`--${e}`:`--${e}-${i}`,l=`${t.slice(0,Math.max(1,160-r.length))}${r}`;if(!n.has(l))return n.add(l),l}throw new Error(`Unable to allocate a category key for ${t} (${e})`)}function At(t,e,n){for(let i=1;i<=1e4;i+=1){let r=i===1?` (${e})`:` (${e} ${i})`,l=`${t.normalize("NFKC").trim().slice(0,Math.max(1,80-r.length)).trimEnd()}${r}`,f=Ye(l);if(!n.has(f))return n.add(f),l}throw new Error(`Unable to allocate a category label for ${t} (${e})`)}function Tt(t,e,n,i){let r=kt(e);return{...structuredClone(t),key:Et(t.key,r.suffix,n),label:At(t.label,r.labelSuffix,i)}}function Mt(t,e,n){let i=[];for(let r of Qe(t))for(let a of r.objects){if(!He(a))continue;let l=qe(a),f=n.get(l.key);if(!(!f||f===e))if(a.type==="row"||a.type==="table"){let h=[];a.categoryKey===e&&(a.categoryKey=f);for(let c of a.overrides??[])c.categoryKey===e&&(c.categoryKey=f,h.push(c.index));(a.categoryKey===f||h.length)&&i.push({family:l.key,floorId:r.id,objectId:a.id,objectType:l.objectType,fromCategoryKey:e,toCategoryKey:f,...h.length?{seatOverrideIndices:h.sort((c,d)=>c-d)}:{}})}else a.categoryKey===e&&(a.categoryKey=f,i.push({family:l.key,floorId:r.id,objectId:a.id,objectType:l.objectType,fromCategoryKey:e,toCategoryKey:f}))}return i}function We(t){let e=structuredClone(t),n=ne(e);if(!n.length)return{doc:e,changed:!1,changes:[],before:n,after:n};let i=new Set(e.categories.map(f=>f.key)),r=new Set(e.categories.map(f=>Ye(f.label))),a=[];for(let f of n){let h=e.categories.findIndex(I=>I.key===f.categoryKey);if(h<0)continue;let c=e.categories[h],d=f.families[0].family,g=new Map([[d,c.key]]),p=f.families.slice(1).map(I=>{let O=Tt(c,I.family,i,r);return g.set(I.family,O.key),{family:I.family,key:O.key,label:O.label,category:O}});e.categories.splice(h+1,0,...p.map(I=>I.category));let b=Mt(e,c.key,g);a.push({categoryKey:c.key,categoryLabel:c.label,retainedFamily:d,clones:p.map(({family:I,key:O,label:w})=>({family:I,key:O,label:w})),reassignments:b})}e.floors?.length&&(e.objects=e.floors[0].objects);let l=ne(e);return{doc:e,changed:a.length>0,changes:a,before:n,after:l}}function Lt(t,e){return Math.abs(t.x-e.x)<=1e-7&&Math.abs(t.y-e.y)<=1e-7}function Z(t,e,n){return(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x)}function re(t,e,n){let i=Z(e,n,t);return Math.abs(i)>1e-7?!1:t.x>=Math.min(e.x,n.x)-1e-7&&t.x<=Math.max(e.x,n.x)+1e-7&&t.y>=Math.min(e.y,n.y)-1e-7&&t.y<=Math.max(e.y,n.y)+1e-7}function Pt(t,e,n,i){let r=Z(t,e,n),a=Z(t,e,i),l=Z(n,i,t),f=Z(n,i,e);return(r>1e-7&&a<-1e-7||r<-1e-7&&a>1e-7)&&(l>1e-7&&f<-1e-7||l<-1e-7&&f>1e-7)?!0:Math.abs(r)<=1e-7&&re(n,t,e)||Math.abs(a)<=1e-7&&re(i,t,e)||Math.abs(l)<=1e-7&&re(t,n,i)||Math.abs(f)<=1e-7&&re(e,n,i)}function Ft(t){return t.reduce((e,n,i)=>{let r=t[(i+1)%t.length];return e+n.x*r.y-r.x*n.y},0)}function Rt(t){for(let e=0;e<t.length;e+=1){let n=(e+1)%t.length;for(let i=e+1;i<t.length;i+=1){let r=(i+1)%t.length;if(!(e===i||n===i||r===e)&&Pt(t[e],t[n],t[i],t[r]))return!0}}return!1}function Ze(t){return t.length<3?{ok:!1,code:"too_few_vertices",message:"Add at least three vertices to create a polygon."}:t.length>256?{ok:!1,code:"too_many_vertices",message:"A polygon can contain at most 256 vertices."}:t.some(e=>!Number.isFinite(e.x)||!Number.isFinite(e.y)||Math.abs(e.x)>1e7||Math.abs(e.y)>1e7)?{ok:!1,code:"invalid_coordinate",message:"Every polygon vertex must use a finite coordinate inside the safe chart range."}:t.some((e,n)=>Lt(e,t[(n+1)%t.length]))?{ok:!1,code:"duplicate_vertex",message:"Move or remove duplicate neighbouring vertices."}:Math.abs(Ft(t))<2?{ok:!1,code:"degenerate_polygon",message:"The polygon needs a visible enclosed area."}:Rt(t)?{ok:!1,code:"self_intersection",message:"Polygon edges cannot cross or touch each other."}:{ok:!0}}function B(t){return t.length>=3&&t.every(e=>Number.isFinite(e.x)&&Number.isFinite(e.y))}function G(t,e,n){let i=(t.y-e.y)*(n.x-e.x)-(t.x-e.x)*(n.y-e.y);if(Math.abs(i)>1e-7)return!1;let r=(t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y);if(r<-1e-7)return!1;let a=(n.x-e.x)**2+(n.y-e.y)**2;return r<=a+1e-7}function U(t,e){let n=!1;for(let i=0,r=e.length-1;i<e.length;r=i++){let a=e[r],l=e[i];if(G(t,a,l))return!0;a.y>t.y!=l.y>t.y&&t.x<(l.x-a.x)*(t.y-a.y)/(l.y-a.y)+a.x&&(n=!n)}return n}function D(t,e,n){return(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x)}function et(t,e,n,i){let r=D(t,e,n),a=D(t,e,i),l=D(n,i,t),f=D(n,i,e);return(r>1e-7&&a<-1e-7||r<-1e-7&&a>1e-7)&&(l>1e-7&&f<-1e-7||l<-1e-7&&f>1e-7)?!0:Math.abs(r)<=1e-7&&G(n,t,e)||Math.abs(a)<=1e-7&&G(i,t,e)||Math.abs(l)<=1e-7&&G(t,n,i)||Math.abs(f)<=1e-7&&G(e,n,i)}function V(t){for(let e=0;e<t.length;e+=1){let n=(e+1)%t.length;for(let i=e+1;i<t.length;i+=1){let r=(i+1)%t.length;if(!(e===i||n===i||r===e)&&et(t[e],t[n],t[i],t[r]))return!0}}return!1}function J(t,e){for(let n=0;n<t.length;n+=1)for(let i=0;i<e.length;i+=1)if(et(t[n],t[(n+1)%t.length],e[i],e[(i+1)%e.length]))return!0;return U(t[0],e)||U(e[0],t)}function Je(t,e){return!e.some((n,i)=>G(t,n,e[(i+1)%e.length]))&&U(t,e)}function tt(t){let e=t.outlinePath;if(!e?.segments.length)return;let n=a=>Number.isFinite(a.x)&&Number.isFinite(a.y),i=(a,l)=>Math.hypot(a.x-l.x,a.y-l.y);if(!n(e.start))return 0;let r=e.start;for(let a=0;a<e.segments.length;a++){let l=e.segments[a];if(!l||!n(l.end)||i(r,l.end)<=1e-9||l.kind==="bezier"&&(!n(l.control1)||!n(l.control2)))return a;if(l.kind==="arc"){if(!n(l.center)||!Number.isFinite(l.radius)||l.radius<=1e-6)return a;let f=Math.max(1e-4,l.radius*1e-4);if(Math.abs(i(r,l.center)-l.radius)>f||Math.abs(i(l.end,l.center)-l.radius)>f)return a}r=l.end}return i(r,e.start)>1e-4,e.segments.length-1}function Nt(t,e,n,i){let r=D(t,e,n),a=D(t,e,i),l=D(n,i,t),f=D(n,i,e);return(r>1e-7&&a<-1e-7||r<-1e-7&&a>1e-7)&&(l>1e-7&&f<-1e-7||l<-1e-7&&f>1e-7)}function ot(t,e){for(let n=0;n<t.length;n+=1)for(let i=0;i<e.length;i+=1)if(Nt(t[n],t[(n+1)%t.length],e[i],e[(i+1)%e.length]))return!0;return t.some(n=>Je(n,e))||e.some(n=>Je(n,t))}function nt(t){return t.role!=="reference-focal"||!t.points||!B(t.points)?null:t.points}function rt(t,e){if(t.displayLabel!==void 0){let n=t.displayLabel.normalize("NFKC").trim();(!n||n!==t.displayLabel||n.length>80)&&e.push({severity:"error",code:"invalid-display-label",message:`${t.type==="gaArea"?"GA area":t.type} "${t.label}" must use a normalized buyer label of 1 to 80 characters`,objectId:t.id})}if(t.displayType!==void 0){let n=t.displayType.normalize("NFKC").trim();(!n||n!==t.displayType||n.length>24)&&e.push({severity:"error",code:"invalid-display-type",message:`${t.type==="gaArea"?"GA area":t.type} "${t.label}" must use a normalized buyer type of 1 to 24 characters`,objectId:t.id})}}function it(t,e,n,i){let r=t.crop,a=r&&(!Number.isFinite(r.x)||!Number.isFinite(r.y)||!Number.isFinite(r.width)||!Number.isFinite(r.height)||r.x<0||r.y<0||r.width<=0||r.height<=0||r.x+r.width>1.000001||r.y+r.height>1.000001);(!Number.isFinite(t.center?.x)||!Number.isFinite(t.center?.y)||!Number.isFinite(t.width)||t.width<=0||!Number.isFinite(t.opacity)||t.opacity<0||t.opacity>1||t.rotation!==void 0&&!Number.isFinite(t.rotation)||a)&&n.push({severity:"error",code:"invalid-background-placement",message:`The ${e} image has an invalid position, size, opacity, rotation, or crop`,...i?{floorId:i}:{}})}function Ie(t,e,n,i){let r=t.referenceImage,a=t.backgroundImage;r&&(it(r,"reference",e,i),!r.assetId&&!r.url&&e.push({severity:"error",code:"invalid-reference-image",message:"A trace reference must identify a private asset or self-contained image",...i?{floorId:i}:{}})),a&&(it(a,a.assetId?"legacy reference":"buyer background",e,i),!a.assetId&&!a.url&&e.push({severity:"error",code:"invalid-buyer-background",message:"A buyer background must contain a renderable image URL",...i?{floorId:i}:{}}),a.assetId&&n.push({severity:"warning",code:"legacy-reference-background",message:"This legacy asset-backed background is trace-only and will migrate to the private reference layer when edited",...i?{floorId:i}:{}})),Be(t)&&e.push({severity:"error",code:"conflicting-reference-images",message:"The canonical reference and legacy asset-backed background identify different private sources",...i?{floorId:i}:{}})}function ee(t){let e=new Set(Q.map(n=>n.key));return!t||/^ref_[0-9a-f-]{36}$/.test(t.assetId)&&!!t.logicalSectionId.trim()&&["user-confirmed","authoritative-source"].includes(t.evidence)&&!!t.sourceDescription.trim()&&(t.derivation===void 0||["explicit-inventory","server-synthesized-from-aggregate"].includes(t.derivation))&&(t.aggregateEvidence===void 0||["user-confirmed","authoritative-source"].includes(t.aggregateEvidence))&&(t.derivation!=="server-synthesized-from-aggregate"||t.evidence==="user-confirmed")&&(t.sectionAssignmentEvidence===void 0||["user-confirmed","authoritative-source"].includes(t.sectionAssignmentEvidence))&&t.sectionAssignmentEvidence===void 0==!t.sectionAssignmentSourceDescription?.trim()&&(t.sectionAssignmentSourceDescription?.trim().length??0)<=240&&(t.numberingEvidence===void 0||t.numberingEvidence==="user-confirmed")&&t.numberingEvidence===void 0==!t.numberingSourceDescription?.trim()&&(t.numberingSourceDescription?.trim().length??0)<=240&&(!t.accessibility||t.accessibility.placementDerivation==="server-synthesized-row-edges"&&t.accessibility.groupLogicalSectionIds.length>0&&t.accessibility.groupLogicalSectionIds.length<=100&&new Set(t.accessibility.groupLogicalSectionIds).size===t.accessibility.groupLogicalSectionIds.length&&t.accessibility.groupLogicalSectionIds.includes(t.logicalSectionId)&&t.accessibility.groupLogicalSectionIds.every(n=>!!n.trim()&&n.length<=160)&&["user-confirmed","authoritative-source"].includes(t.accessibility.assignmentEvidence)&&!!t.accessibility.assignmentSourceDescription.trim()&&t.accessibility.assignmentSourceDescription.trim().length<=240&&t.accessibility.counts.length>0&&t.accessibility.counts.length<=Q.length&&new Set(t.accessibility.counts.map(n=>n.type)).size===t.accessibility.counts.length&&t.accessibility.counts.every(n=>e.has(n.type)&&Number.isInteger(n.count)&&n.count>0&&["user-confirmed","authoritative-source"].includes(n.evidence)&&!!n.sourceDescription.trim()&&n.sourceDescription.trim().length<=240))}function at(t){let e=t.referenceInventoryExclusion;return!e||typeof e.assetId=="string"&&/^ref_[0-9a-f-]{36}$/.test(e.assetId)&&e.assetId===t.referenceSource?.assetId&&typeof e.logicalSectionId=="string"&&e.logicalSectionId===(t.logicalSectionId??t.id)&&typeof e.reason=="string"&&!!e.reason.trim()&&e.reason.trim().length<=80&&["user-confirmed","authoritative-source"].includes(e.evidence)&&typeof e.sourceDescription=="string"&&!!e.sourceDescription.trim()&&e.sourceDescription.trim().length<=240}function st(t){let e=t.referenceCategorySource;return!e||/^ref_[0-9a-f-]{36}$/.test(e.assetId)&&/^#[0-9a-f]{6}$/i.test(e.sourceColor)&&(e.sourceColors===void 0||e.sourceColors.length>0&&e.sourceColors.includes(e.sourceColor)&&new Set(e.sourceColors).size===e.sourceColors.length&&e.sourceColors.every(n=>/^#[0-9a-f]{6}$/i.test(n)&&`${n[1]}${n[3]}${n[5]}`.toLowerCase()===`${e.sourceColor[1]}${e.sourceColor[3]}${e.sourceColor[5]}`.toLowerCase()))&&(e.logicalSectionIds===void 0||e.logicalSectionIds.length>0&&new Set(e.logicalSectionIds).size===e.logicalSectionIds.length&&e.logicalSectionIds.every(n=>!!n.trim()&&n.length<=160))&&(e.assignmentDerivation===void 0||["source-color-class","confirmed-logical-sections"].includes(e.assignmentDerivation))&&e.assignmentEvidence===void 0==!e.assignmentSourceDescription?.trim()&&(e.assignmentEvidence===void 0||["user-confirmed","authoritative-source"].includes(e.assignmentEvidence))&&(e.assignmentSourceDescription?.trim().length??0)<=240&&(e.assignmentDerivation!=="confirmed-logical-sections"||e.assignmentEvidence!==void 0&&!!e.assignmentSourceDescription?.trim())&&e.sourcePaletteColor===void 0==(e.sourcePaletteColorEvidence===void 0)&&e.sourcePaletteColorEvidence===void 0==!e.sourcePaletteColorSourceDescription?.trim()&&(e.sourcePaletteColor===void 0||/^#[0-9a-f]{6}$/i.test(e.sourcePaletteColor))&&(e.sourcePaletteColorEvidence===void 0||["user-confirmed","authoritative-source"].includes(e.sourcePaletteColorEvidence))&&(e.sourcePaletteColorSourceDescription?.trim().length??0)<=240&&["user-confirmed","authoritative-source"].includes(e.labelEvidence)&&!!e.labelSourceDescription.trim()&&e.labelSourceDescription.trim().length<=240&&t.price!==void 0&&["user-confirmed","authoritative-source"].includes(e.priceEvidence)&&!!e.priceSourceDescription.trim()&&e.priceSourceDescription.trim().length<=240&&e.outputColorEvidence===void 0==!e.outputColorSourceDescription?.trim()&&(e.outputColorEvidence===void 0||["user-confirmed","authoritative-source"].includes(e.outputColorEvidence))&&(e.outputColorSourceDescription?.trim().length??0)<=240&&(t.color.toLowerCase()===(e.sourcePaletteColor??e.sourceColor).toLowerCase()&&new Set((e.sourceColors??[e.sourceColor]).map(n=>`${n[1]}${n[3]}${n[5]}`.toLowerCase())).size===1||e.outputColorEvidence!==void 0&&["user-confirmed","authoritative-source"].includes(e.outputColorEvidence))}function ct(t,e){let n=t.floors?.length?t.floors.map(a=>({id:a.id,objects:a.objects})):[{id:"floor-0",objects:t.objects}],i=new Map,r=new Map;for(let a of n){let l=a.objects.filter(c=>c.type==="row"),f=new Map,h=new Map;for(let c of l){if(c.segmentedRow){let d=f.get(c.segmentedRow.groupId)??[];d.push(c),f.set(c.segmentedRow.groupId,d)}if(c.rowBlockGeneration){let d=h.get(c.rowBlockGeneration.groupId)??[];d.push(c),h.set(c.rowBlockGeneration.groupId,d)}c.segmentedRow&&c.rowBlockGeneration&&e.push({severity:"error",code:"invalid-row-group-membership",message:`Row "${c.label}" cannot be both a segmented-row component and a generated row-block member`,objectId:c.id,floorId:a.id})}for(let[c,d]of f){let g=i.get(c);g&&g!==a.id&&e.push({severity:"error",code:"invalid-segmented-row",message:`Segmented row "${c}" cannot span multiple floors`,objectId:d[0].id,floorId:a.id}),i.set(c,a.id);let p=d.slice().sort((j,A)=>j.segmentedRow.componentIndex-A.segmentedRow.componentIndex),b=p[0]?.segmentedRow,I=b?.componentCount??0,O=b?JSON.stringify({displayLabel:b.displayLabel,repeatLabelOnComponents:b.repeatLabelOnComponents,displayType:b.displayType,labelPresentation:b.labelPresentation,viewFromSeatUrl:b.viewFromSeatUrl,viewFromSeatMeta:b.viewFromSeatMeta,confidenceEvidence:b.confidenceEvidence,smoothing:b.smoothing}):"";b&&I>=2&&I<=64&&p.length===I&&b.boundaryBefore==="start"&&p.every((j,A)=>{let $=j.segmentedRow;return $.kind==="segmented-row-v1"&&$.groupId===c&&$.componentCount===I&&$.componentIndex===A&&(A===0?$.boundaryBefore==="start":$.boundaryBefore!=="start")&&$.displayLabel.normalize("NFKC").trim()===$.displayLabel&&$.displayLabel.length>0&&$.displayLabel.length<=80&&JSON.stringify({displayLabel:$.displayLabel,repeatLabelOnComponents:$.repeatLabelOnComponents,displayType:$.displayType,labelPresentation:$.labelPresentation,viewFromSeatUrl:$.viewFromSeatUrl,viewFromSeatMeta:$.viewFromSeatMeta,confidenceEvidence:$.confidenceEvidence,smoothing:$.smoothing})===O})||e.push({severity:"error",code:"invalid-segmented-row",message:`Segmented row "${c}" has missing, duplicated, cyclic, or inconsistent component metadata`,objectId:d[0]?.id,floorId:a.id})}for(let[c,d]of h){let g=r.get(c);g&&g!==a.id&&e.push({severity:"error",code:"invalid-row-block-generation",message:"A generated row block cannot span multiple floors",objectId:d[0].id,floorId:a.id}),r.set(c,a.id)}}}function _t(t){return t.type==="row"||t.type==="table"||t.type==="booth"}function Dt(t){let e=[],n=new Map((t.overrides??[]).map(i=>[i.index,i]));for(let i=0;i<t.seatCount;i++){let r=n.get(i);r?.skip||e.push({label:Oe(t,i,r),index:i})}return e}function lt(t){let e=[],n=new Map((t.overrides??[]).map(i=>[i.index,i]));for(let i=0;i<t.seatCount;i++){let r=n.get(i);r?.skip||e.push({label:r?.label??`${t.label}-${i+1}`,index:i})}return e}function dt(t){let e=[];t.eventConfigurationId!==void 0&&(typeof t.eventConfigurationId!="string"||t.eventConfigurationId.normalize("NFKC").trim()!==t.eventConfigurationId||t.eventConfigurationId.length<1||t.eventConfigurationId.length>100)&&e.push({severity:"error",code:"invalid-event-configuration",message:"Active event configuration must contain 1 to 100 normalized characters"});let n=[],i=new Set(t.categories.map(o=>o.key)),r=new Set(Q.map(o=>o.key)),a=new Map(t.categories.map(o=>[o.key,o.price!=null||o.notForSale===!0])),l=new Set;Ie(t,e,n);let f=o=>o.length<=2e6&&/^(https:\/\/|data:image\/)/.test(o),h=(o,S,s,y={})=>{if(S===void 0)return;if(!S||typeof S!="object"||Array.isArray(S)){e.push({severity:"error",code:"invalid-seat-view-metadata",message:`${s} view metadata is invalid`,...y});return}let u=S;o||n.push({severity:"warning",code:"orphaned-seat-view-metadata",message:`${s} view metadata has no image`,...y});let v=new Set(["exact-seat","row-representative","section-representative","venue-representative"]);u.projection!==void 0&&u.projection!=="equirectangular"&&e.push({severity:"error",code:"invalid-seat-view-projection",message:`${s} view projection must be equirectangular`,...y}),u.coverage!==void 0&&!v.has(u.coverage)&&e.push({severity:"error",code:"invalid-seat-view-coverage",message:`${s} view coverage is invalid`,...y});let m=(x,C,P)=>typeof x=="number"&&Number.isFinite(x)&&x>=C&&x<=P;u.initialBearingDeg!==void 0&&!m(u.initialBearingDeg,-360,360)&&e.push({severity:"error",code:"invalid-seat-view-bearing",message:`${s} view bearing must be between -360\xB0 and 360\xB0`,...y}),u.initialPitchDeg!==void 0&&!m(u.initialPitchDeg,-90,90)&&e.push({severity:"error",code:"invalid-seat-view-pitch",message:`${s} view pitch must be between -90\xB0 and 90\xB0`,...y}),u.capturedAt!==void 0&&(typeof u.capturedAt!="string"||u.capturedAt.length>40||!Number.isFinite(Date.parse(u.capturedAt)))&&e.push({severity:"error",code:"invalid-seat-view-capture-date",message:`${s} view capture date is invalid`,...y}),u.sourceLabel!==void 0&&(typeof u.sourceLabel!="string"||u.sourceLabel.trim().length>100)&&e.push({severity:"error",code:"invalid-seat-view-source",message:`${s} view source label is invalid`,...y}),u.previewUrl!==void 0&&!f(u.previewUrl)&&e.push({severity:"error",code:"invalid-seat-view-preview-url",message:`${s} view preview URL is invalid`,...y});for(let[x,C]of[["width",u.sourceWidth],["height",u.sourceHeight],["preview width",u.previewWidth],["preview height",u.previewHeight]])C!==void 0&&(!Number.isInteger(C)||C<1||C>32768)&&e.push({severity:"error",code:"invalid-seat-view-dimensions",message:`${s} view source ${x} is invalid`,...y});u.captureEyeHeightM!==void 0&&!m(u.captureEyeHeightM,.5,2.5)&&e.push({severity:"error",code:"invalid-seat-view-eye-height",message:`${s} capture eye height must be between 0.5 m and 2.5 m`,...y}),u.eventConfigurationId!==void 0&&(typeof u.eventConfigurationId!="string"||!u.eventConfigurationId.trim()||u.eventConfigurationId.length>100)&&e.push({severity:"error",code:"invalid-seat-view-configuration",message:`${s} event configuration id is invalid`,...y})},c=(o,S,s={})=>{if(o===void 0)return;let y=C=>{e.push({severity:"error",code:"invalid-seat-confidence-evidence",message:`${S} confidence evidence ${C}`,...s})};if(!o||typeof o!="object"||Array.isArray(o)){y("is invalid");return}let u=o;u.schema!=="seatlayer.seat-confidence/1"&&y("has an unsupported schema");let v=(C,P)=>typeof C=="string"&&C.normalize("NFKC").trim()===C&&C.length>0&&C.length<=P;v(u.evidenceId,120)||y("has an invalid evidence id"),v(u.modelVersion,120)||y("has an invalid model version"),new Set(["synthetic-model","organizer-approved","calibrated-provider"]).has(u.evidenceKind)||y("has an invalid evidence kind"),new Set(["generated","geometry-verified","configuration-verified"]).has(u.modelLevel)||y("has an invalid model level");let m=u.realityLevel??"none";new Set(["none","comparable-build-reference","actual-build-checked"]).has(m)||y("has an invalid reality level"),u.eventConfigurationId!==void 0&&!v(u.eventConfigurationId,100)&&y("has an invalid event configuration id");for(let[C,P]of[["assessment",u.assessedAt],["expiry",u.validUntil]])P!==void 0&&(!v(P,40)||!Number.isFinite(Date.parse(P)))&&y(`has an invalid ${C} date`);u.approvedByRole!==void 0&&!v(u.approvedByRole,100)&&y("has an invalid approving organization or role"),u.sourceLabel!==void 0&&!v(u.sourceLabel,120)&&y("has an invalid source label"),u.limitations!==void 0&&(!Array.isArray(u.limitations)||u.limitations.length>6||u.limitations.some(C=>!v(C,160)))&&y("has invalid limitations"),u.evidenceKind==="synthetic-model"&&(u.modelLevel!=="generated"||m!=="none")&&y("cannot describe synthetic data as verified or reality checked"),u.modelLevel!=="generated"&&(!u.assessedAt||!u.approvedByRole)&&y("requires an assessment date and approving organization or role for verified model levels"),u.modelLevel==="configuration-verified"&&!u.eventConfigurationId&&y("requires an event configuration id for configuration verification"),m!=="none"&&(!u.assessedAt||!u.sourceLabel)&&y("requires an assessment date and source for reality evidence"),m==="actual-build-checked"&&(u.modelLevel!=="configuration-verified"||!u.eventConfigurationId)&&y("requires a configuration-verified model and event configuration for an actual-build check");let x=u.modeledTarget;x!==void 0&&(!x||typeof x!="object"||Array.isArray(x)?y("has an invalid modeled target"):((!v(x.label,80)||!v(x.methodLabel,100))&&y("has invalid modeled-target labels"),(!Number.isInteger(x.totalRayCount)||x.totalRayCount<1||x.totalRayCount>1e3||!Number.isInteger(x.clearRayCount)||x.clearRayCount<0||x.clearRayCount>x.totalRayCount)&&y("has invalid modeled-target ray counts"),new Set(["clear","partial","obstructed"]).has(x.classification)||y("has an invalid modeled-target classification"),x.occluderLabels!==void 0&&(!Array.isArray(x.occluderLabels)||x.occluderLabels.length>10||x.occluderLabels.some(C=>!v(C,100)))&&y("has invalid modeled-target occluders")))};h(t.viewFromSeatUrl,t.viewFromSeatMeta,"Venue"),c(t.confidenceEvidence,"Venue"),t.viewFromSeatUrl!==void 0&&!f(t.viewFromSeatUrl)&&e.push({severity:"error",code:"invalid-venue-view-url",message:"The whole-venue view-from-seat image URL is invalid"});for(let o of t.floors??[])o.viewFromSeatUrl!==void 0&&!f(o.viewFromSeatUrl)&&e.push({severity:"error",code:"invalid-floor-view-url",message:`Floor "${o.name}" has an invalid view-from-seat image URL`}),h(o.viewFromSeatUrl,o.viewFromSeatMeta,`Floor "${o.name}"`,{floorId:o.id}),c(o.confidenceEvidence,`Floor "${o.name}"`,{floorId:o.id});let d=t.floors?.length?t.floors.flatMap(o=>o.objects):t.objects;for(let o of d)if((o.type==="row"||o.type==="section")&&(h(o.viewFromSeatUrl,o.viewFromSeatMeta,`${o.type==="row"?"Row":"Section"} "${o.label}"`,{objectId:o.id}),c(o.confidenceEvidence,`${o.type==="row"?"Row":"Section"} "${o.label}"`,{objectId:o.id})),o.type==="row"&&o.segmentedRow&&(h(o.segmentedRow.viewFromSeatUrl,o.segmentedRow.viewFromSeatMeta,`Segmented row "${o.segmentedRow.displayLabel}"`,{objectId:o.id}),c(o.segmentedRow.confidenceEvidence,`Segmented row "${o.segmentedRow.displayLabel}"`,{objectId:o.id})),o.type==="row"||o.type==="table")for(let S of o.overrides??[])h(S.viewFromSeatUrl,S.viewFromSeatMeta,`Seat ${S.index+1}`,{objectId:o.id,seatIndices:[S.index]}),c(S.confidenceEvidence,`Seat ${S.index+1}`,{objectId:o.id,seatIndices:[S.index]});let g=new Set;for(let o of t.categories){g.has(o.key)&&e.push({severity:"error",code:"duplicate-category-key",message:`Category key "${o.key}" is used more than once`,categoryKey:o.key}),g.add(o.key);let S=new Set;for(let s of o.tiers??[]){if(S.has(s.id)&&e.push({severity:"error",code:"duplicate-category-tier-id",message:`Ticket tier id "${s.id}" is used more than once in category "${o.key}"`,categoryKey:o.key}),s.restriction!=null&&!["companion","child","senior","student","membership","custom"].includes(s.restriction)&&e.push({severity:"error",code:"invalid-category-tier-restriction",message:`Ticket tier "${s.name}" has an unknown restriction`,categoryKey:o.key}),s.buyerMessage!=null&&(!s.buyerMessage.trim()||s.buyerMessage.length>240)&&e.push({severity:"error",code:"invalid-category-tier-buyer-message",message:`Ticket tier "${s.name}" buyer guidance must contain 1 to 240 characters`,categoryKey:o.key}),s.currency!=null&&!/^[A-Z]{3}$/.test(s.currency)&&e.push({severity:"error",code:"invalid-category-tier-currency",message:`Ticket tier "${s.name}" must use a three-letter ISO currency`,categoryKey:o.key}),s.applicability!=null){let y=s.applicability.seatLabels,u=s.applicability.accessibility;(y!==void 0&&(!Array.isArray(y)||!y.length||y.length>1e4||y.some(v=>typeof v!="string"||!v.trim()||v.length>160)||new Set(y).size!==y.length)||u!==void 0&&(!Array.isArray(u)||!u.length||u.some(v=>!r.has(v))||new Set(u).size!==u.length))&&e.push({severity:"error",code:"invalid-category-tier-applicability",message:`Ticket tier "${s.name}" has invalid seat applicability`,categoryKey:o.key})}s.evidence!=null&&(!["public-host","public-event","user-confirmed"].includes(s.evidence.provenance)||!s.evidence.sourceDescription.trim()||s.evidence.sourceDescription.length>240||s.evidence.capturedAt!==void 0&&(s.evidence.capturedAt.length>40||!Number.isFinite(Date.parse(s.evidence.capturedAt))))&&e.push({severity:"error",code:"invalid-category-tier-evidence",message:`Ticket tier "${s.name}" has invalid evidence provenance`,categoryKey:o.key}),S.add(s.id)}st(o)||e.push({severity:"error",code:"invalid-reference-category-source",message:`Category ${o.label||o.key} has incomplete or invalid reference evidence`,categoryKey:o.key})}let p=new Map,b=new Map,I=[],O=new Map,w=0,j=0,A=new Set;for(let o of t.floors??[])Ie(o,e,n,o.id),A.has(o.id)&&e.push({severity:"error",code:"duplicate-floor-id",message:`Floor id "${o.id}" is used more than once`,floorId:o.id}),A.add(o.id),o.baseHeightM!==void 0&&(!Number.isFinite(o.baseHeightM)||o.baseHeightM<X||o.baseHeightM>Y)&&e.push({severity:"error",code:"invalid-floor-base-height",message:`Floor "${o.name}" base height must be between ${X} and ${Y} metres`,floorId:o.id});let $=t.floors&&t.floors.length?t.floors.flatMap(o=>o.objects):t.objects;ct(t,e);let N=new Set;for(let o of $)N.has(o.id)&&e.push({severity:"error",code:"duplicate-object-id",message:`Object id "${o.id}" is used more than once`,objectId:o.id}),N.add(o.id);let L=new Set;for(let o of t.zones??[])L.has(o.id)&&e.push({severity:"error",code:"duplicate-zone-id",message:`Zone id "${o.id}" is used more than once`}),L.add(o.id),o.focalPoint!==void 0&&(!Number.isFinite(o.focalPoint.x)||!Number.isFinite(o.focalPoint.y))&&e.push({severity:"error",code:"invalid-zone-focal-point",message:`Zone "${o.label}" must use a finite focal point`});let T=new Map;for(let o of $)if(!(o.type!=="section"||!o.zone)){if(t.zones?.length&&!L.has(o.zone)){e.push({severity:"error",code:"unknown-section-zone",message:`Section "${o.displayLabel??o.label}" references unknown zone "${o.zone}"`,objectId:o.id});continue}T.has(o.zone)||T.set(o.zone,o)}for(let[o,S]of T){let s=t.zones?.find(y=>y.id===o);s&&(s?.focalPoint||n.push({severity:"warning",code:"missing-zone-focal-point",message:`Zone "${s?.label??o}" uses the legacy floor focal; set its own focal point before publishing`,objectId:S.id}))}for(let o of $)if((o.type==="row"||o.type==="table"||o.type==="booth"||o.type==="gaArea")&&rt(o,e),_t(o)){if(w++,j+=o.type==="booth"?1:o.type==="row"?Te(o):o.bookAsWhole||o.variableOccupancy?o.seatCount:lt(o).length,p.get(o.label)!==void 0?o.type!=="row"&&e.push({severity:"error",code:"duplicate-object-label",message:`Label "${o.label}" is used by more than one object`,objectId:o.id}):p.set(o.label,o.id),i.has(o.categoryKey)?l.add(o.categoryKey):e.push({severity:"error",code:"unknown-category",message:`"${o.label}" references unknown category "${o.categoryKey}"`,objectId:o.id,categoryKey:o.categoryKey}),o.type==="row"){ee(o.referenceInventorySource)||e.push({severity:"error",code:"invalid-reference-inventory-source",message:`Row "${o.label}" has invalid reference-inventory provenance`,objectId:o.id}),o.seatCount<1&&e.push({severity:"error",code:"empty-row",message:`Row "${o.label}" has no seats`,objectId:o.id});let s=new Set;for(let y of o.overrides??[]){(y.accessibility??[]).filter(x=>!r.has(x)).length&&e.push({severity:"error",code:"invalid-accessibility-type",message:`Row "${o.label}" seat ${y.index+1} uses an unknown accessibility type`,objectId:o.id,seatIndices:[y.index]}),(!Number.isInteger(y.index)||y.index<0||y.index>=o.seatCount||s.has(y.index))&&e.push({severity:"error",code:"invalid-seat-override",message:`Row "${o.label}" has a duplicated or out-of-range seat override`,objectId:o.id,...Number.isInteger(y.index)?{seatIndices:[y.index]}:{}}),s.add(y.index);let v=y.wheelchairSpaceType,m=y.accessible===!0||y.accessibility?.includes("wheelchair");v!==void 0&&v!=="seat-present"&&v!=="no-seat"?e.push({severity:"error",code:"invalid-wheelchair-space",message:`Row "${o.label}" seat ${y.index+1} has an invalid wheelchair-space type`,objectId:o.id,seatIndices:[y.index]}):v&&(!m||y.skip)&&e.push({severity:"error",code:"invalid-wheelchair-space",message:y.skip?`Row "${o.label}" seat ${y.index+1} cannot have a wheelchair-space physical type while skipped from inventory`:`Row "${o.label}" seat ${y.index+1} must include wheelchair accessibility for its physical-space type`,objectId:o.id,seatIndices:[y.index]})}for(let y of Dt(o))oe(y.label)&&e.push({severity:"error",code:"reserved-seat-label",message:`Seat label "${y.label}" uses SeatLayer's reserved GA namespace`,objectId:o.id,seatIndices:[y.index]}),b.get(y.label)!==void 0?I.push({severity:"error",code:"duplicate-seat-label",message:`Seat label "${y.label}" is used more than once`,objectId:o.id,seatIndices:[y.index]}):b.set(y.label,o.id)}else if(o.type==="table"){let s=o.bookAsWhole===!0||o.variableOccupancy===!0;if(o.seatCountsBySide){let m=["top","bottom","left","right"],x=Object.keys(o.seatCountsBySide),C=m.every(_=>Number.isInteger(o.seatCountsBySide[_])&&o.seatCountsBySide[_]>=0&&o.seatCountsBySide[_]<=40),P=C?m.reduce((_,ht)=>_+o.seatCountsBySide[ht],0):Number.NaN;(o.shape!=="rect"||x.length!==m.length||x.some(_=>!m.includes(_))||!C||P!==o.seatCount||P<1||P>40)&&e.push({severity:"error",code:"invalid-table-side-counts",message:`Table "${o.label}" needs top, bottom, left, and right whole-number chair counts totaling its ${o.seatCount}-chair capacity`,objectId:o.id})}s&&o.overrides?.length&&e.push({severity:"error",code:"grouped-table-chair-overrides",message:`Grouped table "${o.label}" cannot carry individual-chair overrides`,objectId:o.id,seatIndices:o.overrides.map(m=>m.index)});let y=new Set;for(let m of o.overrides??[]){(m.accessibility??[]).filter(_=>!r.has(_)).length&&e.push({severity:"error",code:"invalid-accessibility-type",message:`Table "${o.label}" chair ${m.index+1} uses an unknown accessibility type`,objectId:o.id,seatIndices:[m.index]}),(!Number.isInteger(m.index)||m.index<0||m.index>=o.seatCount||y.has(m.index))&&e.push({severity:"error",code:"invalid-seat-override",message:`Table "${o.label}" has a duplicated or out-of-range chair override`,objectId:o.id,...Number.isInteger(m.index)?{seatIndices:[m.index]}:{}}),y.add(m.index),m.categoryKey&&!i.has(m.categoryKey)?e.push({severity:"error",code:"unknown-category",message:`Table "${o.label}" chair ${m.index+1} references unknown category "${m.categoryKey}"`,objectId:o.id,seatIndices:[m.index],categoryKey:m.categoryKey}):m.categoryKey&&l.add(m.categoryKey);let C=m.wheelchairSpaceType,P=m.accessible===!0||m.accessibility?.includes("wheelchair");C!==void 0&&C!=="seat-present"&&C!=="no-seat"?e.push({severity:"error",code:"invalid-wheelchair-space",message:`Table "${o.label}" chair ${m.index+1} has an invalid wheelchair-space type`,objectId:o.id,seatIndices:[m.index]}):C&&(!P||m.skip)&&e.push({severity:"error",code:"invalid-wheelchair-space",message:m.skip?`Table "${o.label}" chair ${m.index+1} cannot have a wheelchair-space physical type while skipped from inventory`:`Table "${o.label}" chair ${m.index+1} must include wheelchair accessibility for its physical-space type`,objectId:o.id,seatIndices:[m.index]})}o.bookAsWhole&&o.variableOccupancy?e.push({severity:"error",code:"invalid-table-booking-mode",message:`Table "${o.label}" cannot be sold both as a whole table and with variable occupancy`,objectId:o.id}):o.variableOccupancy?(!Number.isInteger(o.minOccupancy)||!Number.isInteger(o.maxOccupancy)||o.minOccupancy<1||o.maxOccupancy<o.minOccupancy||o.maxOccupancy>o.seatCount)&&e.push({severity:"error",code:"invalid-table-occupancy",message:`Table "${o.label}" needs whole-number minimum and maximum guests from 1 to its ${o.seatCount}-chair capacity`,objectId:o.id}):(o.minOccupancy!=null||o.maxOccupancy!=null)&&e.push({severity:"error",code:"invalid-table-occupancy",message:`Table "${o.label}" has guest bounds without variable-occupancy selling`,objectId:o.id}),ee(o.referenceInventorySource)||e.push({severity:"error",code:"invalid-reference-inventory-source",message:`Table "${o.label}" has invalid reference-inventory provenance`,objectId:o.id}),(o.shape==="round"&&o.radius==null||o.shape==="rect"&&(o.width==null||o.height==null)||o.seatCount<1)&&e.push({severity:"error",code:"bad-table",message:`Table "${o.label}" is missing required dimensions or seats`,objectId:o.id});let v=s?[{label:o.label,index:void 0}]:lt(o);for(let m of v)oe(m.label)&&e.push({severity:"error",code:"reserved-seat-label",message:`Inventory label "${m.label}" uses SeatLayer's reserved GA namespace`,objectId:o.id}),b.get(m.label)!==void 0?I.push({severity:"error",code:"duplicate-seat-label",message:`Inventory label "${m.label}" is used more than once; grouped table labels must be unique`,objectId:o.id,...m.index===void 0?{}:{seatIndices:[m.index]}}):b.set(m.label,o.id)}else if(o.type==="booth"){ee(o.referenceInventorySource)||e.push({severity:"error",code:"invalid-reference-inventory-source",message:`Booth "${o.label}" has invalid reference-inventory provenance`,objectId:o.id});let s=o.label;oe(s)&&e.push({severity:"error",code:"reserved-seat-label",message:`Seat label "${s}" uses SeatLayer's reserved GA namespace`,objectId:o.id}),b.get(s)!==void 0?I.push({severity:"error",code:"duplicate-seat-label",message:`Seat label "${s}" is used more than once`,objectId:o.id}):b.set(s,o.id)}}else if(o.type==="gaArea"){if(!Le(o))e.push({severity:"error",code:"invalid-ga-inventory-segments",message:`GA area "${o.label}" has invalid joined-area inventory provenance`,objectId:o.id});else for(let u of Pe(o))b.get(u)!==void 0?I.push({severity:"error",code:"duplicate-seat-label",message:`GA inventory label "${u}" is used more than once`,objectId:o.id}):b.set(u,o.id);ee(o.referenceInventorySource)||e.push({severity:"error",code:"invalid-reference-inventory-source",message:`GA area "${o.label}" has invalid reference-inventory provenance`,objectId:o.id}),(!B(o.points)||Math.abs(z(o.points))<=1e-7||V(o.points))&&e.push({severity:"error",code:"invalid-ga-outline",message:`GA area "${o.label}" must have a finite, non-self-intersecting polygon outline`,objectId:o.id});let s=o.holes??[],y=Array.isArray(s)&&s.length<=64?s.findIndex(u=>!Array.isArray(u)||u.length>512||!B(u)||Math.abs(z(u))<=1e-7||V(u)?!0:!u.flatMap((m,x)=>{let C=u[(x+1)%u.length];return[m,{x:(m.x+C.x)/2,y:(m.y+C.y)/2}]}).every(m=>U(m,o.points))):0;if(y>=0)e.push({severity:"error",code:"invalid-ga-hole",message:`GA area "${o.label}" has a cutout outside its outline or with invalid geometry`,objectId:o.id,holeIndex:y});else if(s.some((u,v)=>s.slice(v+1).some(m=>J(u,m)))){let u=s.findIndex((v,m)=>s.slice(m+1).some(x=>J(v,x)));e.push({severity:"error",code:"overlapping-ga-holes",message:`GA area "${o.label}" has overlapping cutout polygons`,objectId:o.id,holeIndex:u})}i.has(o.categoryKey)?l.add(o.categoryKey):e.push({severity:"error",code:"unknown-category",message:`"${o.label}" references unknown category "${o.categoryKey}"`,objectId:o.id,categoryKey:o.categoryKey}),o.capacity<1&&e.push({severity:"error",code:"empty-ga",message:`GA area "${o.label}" has zero capacity`,objectId:o.id}),(!Number.isInteger(o.capacity)||o.capacity>fe)&&e.push({severity:"error",code:"invalid-ga-capacity",message:`GA area "${o.label}" capacity must be a whole number from 1 to ${fe}`,objectId:o.id}),w++,j+=Math.max(0,Math.floor(o.capacity))}else if(o.type==="section"){if(o.elevation!==void 0&&(!Number.isInteger(o.elevation)||o.elevation<ce||o.elevation>H)){let y=Number.isInteger(o.elevation)&&o.elevation>H&&o.elevation<=Ee;n.push({severity:"warning",code:y?"legacy-section-elevation":"invalid-section-elevation",message:y?`Section "${o.label}" uses legacy tier ${o.elevation}; set an exact height before normalizing it to tier ${H}`:`Section "${o.label}" elevation must be a whole-number tier from ${ce} to ${H}`,objectId:o.id})}if(o.height!==void 0&&(!Number.isFinite(o.height)||o.height<X||o.height>Y)&&e.push({severity:"error",code:"invalid-section-height",message:`Section "${o.label}" exact height must be between ${X} and ${Y} metres`,objectId:o.id}),o.rake!==void 0&&(!Number.isFinite(o.rake)||o.rake<le||o.rake>de)&&e.push({severity:"error",code:"invalid-section-rake",message:`Section "${o.label}" rake must be between ${le}\xB0 and ${de}\xB0`,objectId:o.id}),o.surfaceKind!==void 0&&o.surfaceKind!=="flat"&&o.surfaceKind!=="rakedRows"&&e.push({severity:"error",code:"invalid-section-surface-kind",message:`Section "${o.label}" surfaceKind must be 'flat' or 'rakedRows'`,objectId:o.id}),!B(o.outline)||Math.abs(z(o.outline))<=1e-7||V(o.outline)){e.push({severity:"error",code:"invalid-section-outline",message:`Section "${o.label}" must have a finite, non-self-intersecting polygon outline`,objectId:o.id});continue}if(o.outlinePath){let y=[];try{y=ke(o.outlinePath)}catch{}(!$e(o.outlinePath)||!y.length||Math.hypot(o.outlinePath.start.x-o.outline[0].x,o.outlinePath.start.y-o.outline[0].y)>1e-4||!B(y)||Math.abs(z(y))<=1e-7||V(y))&&e.push({severity:"error",code:"invalid-section-outline-path",message:`Section "${o.label}" has an invalid or inconsistent curved outline path`,objectId:o.id,edgeIndex:tt(o)})}if(o.referenceSource&&(!/^ref_[0-9a-f-]{36}$/.test(o.referenceSource.assetId)||!/^reg_[0-9a-f]{16}$/.test(o.referenceSource.regionId))&&e.push({severity:"error",code:"invalid-section-reference-source",message:`Section "${o.label}" has invalid opaque reference provenance`,objectId:o.id}),at(o)||e.push({severity:"error",code:"invalid-section-inventory-exclusion",message:`Section "${o.label}" has incomplete or mismatched non-sellable evidence`,objectId:o.id}),o.logicalSectionId!==void 0&&!o.logicalSectionId.trim())e.push({severity:"error",code:"invalid-logical-section-id",message:`Section "${o.label}" has an empty logical section id`,objectId:o.id});else if(o.logicalSectionId){let y=JSON.stringify({displayLabel:o.displayLabel??null,entrance:o.entrance??null,viewFromSeatUrl:o.viewFromSeatUrl??null,viewFromSeatMeta:o.viewFromSeatMeta??null,confidenceEvidence:o.confidenceEvidence??null,zone:o.zone??null,labelStyle:o.labelPresentation?.labelStyle??null,labelVisible:o.labelPresentation?.visible!==!1}),u=O.get(o.logicalSectionId);u&&(u.label!==o.label||u.semanticSignature!==y)?e.push({severity:"error",code:"inconsistent-logical-section",message:`Logical section "${o.logicalSectionId}" must use one technical label and buyer-facing presentation across every component`,objectId:o.id}):u||O.set(o.logicalSectionId,{label:o.label,semanticSignature:y})}o.viewFromSeatUrl!==void 0&&(o.viewFromSeatUrl.length>2e6||!/^(https:\/\/|data:image\/)/.test(o.viewFromSeatUrl))&&e.push({severity:"error",code:"invalid-section-view-url",message:`Section "${o.label}" has an invalid view-from-seat image URL`,objectId:o.id});let S=o.holes??[];if(!Array.isArray(S)||S.length>64){e.push({severity:"error",code:"invalid-section-hole",message:`Section "${o.label}" has an invalid opening collection`,objectId:o.id});continue}let s=-1;for(let y=0;y<S.length;y++){let u=S[y];if(!Array.isArray(u)||u.length>512||!B(u)||Math.abs(z(u))<=1e-7||V(u)){s=y;break}if(!u.flatMap((m,x)=>{let C=u[(x+1)%u.length];return[m,{x:(m.x+C.x)/2,y:(m.y+C.y)/2}]}).every(m=>U(m,o.outline))){s=y;break}}if(s>=0)e.push({severity:"error",code:"invalid-section-hole",message:`Section "${o.label}" has an opening outside its outline or with an invalid shape`,objectId:o.id,holeIndex:s});else if(S.some((y,u)=>S.slice(u+1).some(v=>J(y,v)))){let y=S.findIndex((u,v)=>S.slice(v+1).some(m=>J(u,m)));e.push({severity:"error",code:"overlapping-section-holes",message:`Section "${o.label}" has overlapping openings`,objectId:o.id,holeIndex:y})}}let F=t.floors?.length?t.floors.map(o=>o.objects):[t.objects];for(let o of F){let S=o.filter(s=>s.type==="section");for(let s of o.filter(y=>y.type==="text")){let y=s.iconKey;y!==void 0&&!Ge(y)&&e.push({severity:"error",code:"invalid-icon-key",message:`Venue icon "${s.text||s.id}" references an unknown symbol`,objectId:s.id});let u=s.fontFamily;u!==void 0&&(typeof u!="string"||u.normalize("NFKC").trim()!==u||u.length<1||u.length>120)&&e.push({severity:"error",code:"invalid-text-font-family",message:`Text "${s.text||s.id}" font family must contain 1 to 120 normalized characters`,objectId:s.id});let v=s.background;(s.width!==void 0&&(!Number.isFinite(s.width)||s.width<40||s.width>1200)||s.align!==void 0&&!["left","center","right"].includes(s.align)||s.lineHeight!==void 0&&(!Number.isFinite(s.lineHeight)||s.lineHeight<.8||s.lineHeight>3)||s.letterSpacing!==void 0&&(!Number.isFinite(s.letterSpacing)||s.letterSpacing<-2||s.letterSpacing>20)||s.opacity!==void 0&&(!Number.isFinite(s.opacity)||s.opacity<.1||s.opacity>1)||v!==void 0&&(!/^#[0-9a-f]{6}$/i.test(v.color)||v.padding!==void 0&&(!Number.isFinite(v.padding)||v.padding<0||v.padding>40)||v.cornerRadius!==void 0&&(!Number.isFinite(v.cornerRadius)||v.cornerRadius<0||v.cornerRadius>40)||v.opacity!==void 0&&(!Number.isFinite(v.opacity)||v.opacity<.1||v.opacity>1)))&&e.push({severity:"error",code:"invalid-text-layout",message:`Text "${s.text||s.id}" has invalid width, spacing, opacity, alignment, or background layout`,objectId:s.id})}for(let s of o.filter(y=>y.type==="shape")){if(s.eventConfigurationIds!==void 0){let v=s.eventConfigurationIds;Array.isArray(v)&&v.length>0&&v.length<=20&&v.every(x=>typeof x=="string"&&x.normalize("NFKC").trim()===x&&x.length>=1&&x.length<=100)&&new Set(v).size===v.length||e.push({severity:"error",code:"invalid-shape-configurations",message:`Shape "${s.label||s.id}" must reference 1 to 20 unique event configuration ids`,objectId:s.id})}if(s.heightM!==void 0&&(!Number.isFinite(s.heightM)||s.heightM<.05||s.heightM>50)&&e.push({severity:"error",code:"invalid-shape-height",message:`Shape "${s.label||s.id}" height must be between 0.05 m and 50 m`,objectId:s.id}),s.stroke!==void 0&&(!s.stroke||typeof s.stroke.color!="string"||!/^#[0-9a-f]{6}$/i.test(s.stroke.color)||!Number.isFinite(s.stroke.width)||s.stroke.width<.5||s.stroke.width>40)&&e.push({severity:"error",code:"invalid-shape-stroke",message:`Shape "${s.label||s.id}" stroke must use a six-digit color and width from 0.5 to 40 chart units`,objectId:s.id}),(s.lineCap!==void 0||s.lineJoin!==void 0||s.startEnding!==void 0||s.endEnding!==void 0)&&!he(s.kind)?e.push({severity:"error",code:"invalid-shape-line-style-applicability",message:`Shape "${s.label||s.id}" may use line caps, joins, and end decorations only when it is an open line or polyline`,objectId:s.id}):he(s.kind)&&(s.lineCap!==void 0&&!Ue.includes(s.lineCap)||s.lineJoin!==void 0&&!Ve.includes(s.lineJoin)||s.startEnding!==void 0&&!pe.includes(s.startEnding)||s.endEnding!==void 0&&!pe.includes(s.endEnding))&&e.push({severity:"error",code:"invalid-shape-line-style",message:`Shape "${s.label||s.id}" has an unsupported line cap, join, or ending`,objectId:s.id}),s.kind==="polygon"){let v=Ze(s.points??[]);v.ok||e.push({severity:"error",code:"invalid-shape-polygon",message:`Shape "${s.label||s.id}" has invalid polygon geometry: ${v.message}`,objectId:s.id})}let u=nt(s);if(u){for(let v of S)if(ot(u,v.outline)){e.push({severity:"error",code:"reference-focal-overlaps-section",message:`Reference focal area "${s.label??s.id}" overlaps section "${v.label}"`,objectId:s.id});break}}}}j>ge&&e.push({severity:"error",code:"inventory-capacity-exceeded",message:`Chart has ${j} bookable units; the maximum is ${ge}`}),e.push(...I.slice(0,5)),I.length>5&&e.push({severity:"error",code:"duplicate-seat-label",message:`${I.length} seats share a label with another seat; the first 5 are listed above. Seat labels must be unique across the whole chart.`});for(let o of ne(t)){let S=o.families[0]?.targets[0];n.push({severity:"warning",code:"category-inventory-family-conflict",message:Xe(o),categoryKey:o.categoryKey,...S?{objectId:S.id,floorId:S.floorId}:{},relatedObjectIds:o.objectIds,categoryInventoryFamilies:o.families})}t.focalPoint||n.push({severity:"warning",code:"missing-focal-point",message:"Chart has no focal point set"}),w===0&&n.push({severity:"warning",code:"no-bookables",message:"Chart has no rows, tables, booths, or GA areas"});for(let o of l)if(a.get(o)===!1){let S=t.categories.find(s=>s.key===o);n.push({severity:"warning",code:"unpriced-category",message:`Category "${S?.label??o}" is used but has no price`,categoryKey:o})}return[...e,...n]}var Kt=9,gt="#0e1117",Bt="#f5f6f8",bt="#8b93a7",zt="#0b1220",Gt="#0b1220",Ut="#ffffff",Vt=100;function k(t,e=2){let n=10**e;return Math.round(t*n)/n}function ut(t){let e=Fe(t);if(!e)return null;let n=b=>{let I=b/255;return I<=.04045?I/12.92:((I+.055)/1.055)**2.4},i=n(e[0]),r=n(e[1]),a=n(e[2]),l=(.4124*i+.3576*r+.1805*a)/.95047,f=(.2126*i+.7152*r+.0722*a)/1,h=(.0193*i+.1192*r+.9505*a)/1.08883,c=b=>b>.008856?Math.cbrt(b):7.787*b+16/116,d=c(l),g=c(f),p=c(h);return[116*g-16,500*(d-g),200*(g-p)]}function Qt(t,e){let n=ut(t),i=ut(e);return!n||!i?null:Math.hypot(n[0]-i[0],n[1]-i[1],n[2]-i[2])}function E(t){return{source:"quality",...t}}function qt(t){return t.code==="missing-focal-point"||t.code==="missing-zone-focal-point"?"navigation":"structure"}function Se(t){return Kt*q(t.theme?.seatScale??1,.7,1.6)}function mt(t){let e=[];for(let n of t.objects)n.type==="row"?e.push(...K(n)):n.type==="table"&&e.push(...W(n));return e}function Ht(t){let e={rowSeats:0,tableSeats:0,booths:0,gaCapacity:0};for(let n of t)for(let i of n.objects)i.type==="row"?e.rowSeats+=K(i).length:i.type==="table"?e.tableSeats+=W(i).length:i.type==="booth"?e.booths+=1:i.type==="gaArea"&&(e.gaCapacity+=Math.max(0,Math.floor(i.capacity)));return{inventoryByKind:e,bookableUnits:e.rowSeats+e.tableSeats+e.booths+e.gaCapacity}}function M(t,e){t.filter(n=>n.code===e.code).length<Vt&&t.push(e)}function Xt(t,e,n){let i=Se(t),r=2*i,a=2.3*i,l=0,f=0,h=1/0;for(let c of e){let d=new Map(c.objects.filter(w=>w.type==="row").map(w=>[w.id,w])),g=w=>{let j=c.objects.find(T=>T.id===w);if(!j||j.type!=="row"&&j.type!=="table")return"another seating object";let A=j.type==="row"?K(j):W(j),$=A.length?{x:A.reduce((T,F)=>T+F.x,0)/A.length,y:A.reduce((T,F)=>T+F.y,0)/A.length}:j.type==="row"?j.origin:j.center,N=c.objects.find(T=>T.type==="section"&&te($,T.outline,T.holes)),L=j.type==="row"?`Row \u201C${j.label}\u201D`:`Table \u201C${j.label}\u201D`;return N?.type==="section"?`${L} in \u201C${N.label}\u201D`:L},p=mt(c);l+=p.length;let b=a,I=new Map,O=new Map;for(let w of p){let j=Math.floor(w.x/b),A=Math.floor(w.y/b);for(let L=-1;L<=1;L++)for(let T=-1;T<=1;T++){let F=I.get(`${j+L}:${A+T}`)??[];for(let o of F){f++;let S=Math.hypot(w.x-o.x,w.y-o.y);if(h=Math.min(h,S),S>=a)continue;let y=(w.rowId<o.rowId?[w.rowId,o.rowId]:[o.rowId,w.rowId]).join("|"),u=O.get(y);(!u||S<u.distance)&&O.set(y,{a:w,b:o,distance:S})}}let $=`${j}:${A}`,N=I.get($)??[];N.push(w),I.set($,N)}for(let w of O.values()){let j=w.a.rowId===w.b.rowId,A=d.get(w.a.rowId),$=d.get(w.b.rowId),N=!j&&A?.segmentedRow?.repeatLabelOnComponents===!0&&$?.segmentedRow?.repeatLabelOnComponents===!0&&A.segmentedRow.groupId===$.segmentedRow.groupId,L=w.distance<r?"error":"warning";if(N&&L==="warning")continue;let T=L==="error"?"seat-overlap":"seat-cramped",F=g(w.a.rowId),o=g(w.b.rowId),S=k(L==="error"?r:a);M(n,E({severity:L,code:T,dimension:"geometry",title:j?`${F} has seats too close together`:`${F} and ${o} are too close together`,message:`The closest seats are ${k(w.distance)} chart units apart; at least ${S} are required.`,action:j?`Increase the seat spacing for ${F}, or use Review safe fixes.`:`Move ${F} or ${o} until they no longer overlap.`,objectId:w.a.rowId,relatedObjectIds:j?[w.a.rowId]:[w.a.rowId,w.b.rowId],floorId:c.id,measured:k(w.distance),minimum:k(L==="error"?r:a),autoFixable:j}))}}return{seats:l,checkedSeatPairs:f,minimumSeatDistance:Number.isFinite(h)?k(h):null}}function ae(t){let{width:e,height:n}=Ce(t);if(!t.rotation)return{x:t.position.x,y:t.position.y,width:e,height:n};let i=[{x:0,y:0},{x:e,y:0},{x:e,y:n},{x:0,y:n}].map(r=>{let a=je(r,t.rotation);return{x:t.position.x+a.x,y:t.position.y+a.y}});return ze(i)}function pt(t,e,n=0){return t.x<e.x+e.width+n&&t.x+t.width+n>e.x&&t.y<e.y+e.height+n&&t.y+t.height+n>e.y}function we(t,e,n){let i=q(e.x,t.x,t.x+t.width),r=q(e.y,t.y,t.y+t.height);return(e.x-i)**2+(e.y-r)**2<n**2}function Yt(t,e,n){let i=Se(t),r=0;for(let a of e){let l=a.objects.filter(h=>h.type==="text"),f=mt(a);r+=l.length;for(let h=0;h<l.length;h++){let c=l[h],d=ae(c),g=f.find(p=>we(d,p,i));g&&M(n,E({severity:"warning",code:"label-collision",dimension:"labels",message:`Text \u201C${c.text}\u201D overlaps seat ${g.label}`,objectId:c.id,relatedObjectIds:[c.id,g.rowId],floorId:a.id,autoFixable:!0}));for(let p=0;p<h;p++){let b=l[p];pt(d,ae(b),2)&&M(n,E({severity:"warning",code:"label-collision",dimension:"labels",message:`Text \u201C${c.text}\u201D overlaps text \u201C${b.text}\u201D`,objectId:c.id,relatedObjectIds:[c.id,b.id],floorId:a.id,autoFixable:!0}))}}}return r}function Wt(t){return t.normalize("NFKC").trim().toLowerCase().replace(/\s+/g," ")}function Zt(t,e,n){let i=new Map;for(let a of e)for(let l of a.objects){let f=l.type,h=f==="row"||f==="table"||f==="booth"||f==="gaArea",c=h||f==="section";if(h&&!l.categoryKey.trim()){let d=f==="gaArea"?"GA area":f==="row"?"Row":f==="table"?"Table":"Booth";M(n,E({severity:"warning",code:"object-uncategorized",dimension:"structure",title:`${d} \u201C${l.label||l.id}\u201D has no category`,message:`${d} \u201C${l.label||l.id}\u201D is not assigned to any category, so buyers see no price or colour for it.`,action:"Assign a category to this object in the inspector, or create one in the Categories tab first.",objectId:l.id,floorId:a.id,autoFixable:!1}))}if(c){let d=(l.type==="section"?l.displayLabel??l.label:l.label)??"";if(d.trim()){if(f==="table"||f==="booth"||f==="gaArea"){let g=Wt(d),p=i.get(g);p&&p.raw!==d?M(n,E({severity:"warning",code:"duplicate-object-label-normalized",dimension:"labels",title:`\u201C${d}\u201D and \u201C${p.raw}\u201D read as the same label`,message:`Labels \u201C${d}\u201D and \u201C${p.raw}\u201D differ only by case, spacing, or accents, so buyers cannot tell them apart.`,action:"Make the two labels visibly distinct.",objectId:l.id,relatedObjectIds:[l.id,p.id],floorId:a.id,autoFixable:!1})):p||i.set(g,{id:l.id,raw:d})}}else{let g=f==="gaArea"?"A GA area":f==="section"?"A section":f==="row"?"A row":f==="table"?"A table":"A booth";M(n,E({severity:"warning",code:"object-unlabeled",dimension:"labels",title:`${g} has no label`,message:`${g} has an empty label; buyers rely on labels to identify what they are booking.`,action:"Give this object a short, unique label in the inspector.",objectId:l.id,floorId:a.id,autoFixable:!1}))}}}let r=[];for(let a of e){let l=a.objects.filter(f=>f.type==="row"||f.type==="table"||f.type==="booth"||f.type==="gaArea");for(let f of a.objects)if(!(f.type!=="section"||f.referenceInventoryExclusion||l.some(c=>te(ue(c),f.outline,f.holes)))){if(f.referenceSource){r.push({id:f.id,floorId:a.id});continue}M(n,E({severity:"warning",code:"empty-section",dimension:"structure",title:`Section \u201C${f.displayLabel??f.label}\u201D is empty`,message:`Section \u201C${f.displayLabel??f.label}\u201D contains no rows, tables, booths, or GA areas.`,action:"Add seating inside this section (Fill with rows), or remove the empty section.",objectId:f.id,floorId:a.id,autoFixable:!1}))}}if(r.length&&M(n,E({severity:"warning",code:"empty-section",dimension:"structure",title:r.length===1?"1 traced section has no seating yet":`${r.length} traced sections have no seating yet`,message:`${r.length} section${r.length===1?"":"s"} traced from the reference image contain${r.length===1?"s":""} no rows, tables, booths, or GA areas.`,action:"Fill them with rows, or remove the ones the venue does not sell.",objectId:r[0].id,relatedObjectIds:r.map(a=>a.id),floorId:r[0].floorId,autoFixable:!1})),t.floors&&t.floors.length>1)for(let a of t.floors)a.objects.length===0&&M(n,E({severity:"warning",code:"unused-floor",dimension:"structure",title:`Floor \u201C${a.name}\u201D is empty`,message:`Floor \u201C${a.name}\u201D has no objects on it.`,action:"Add seating to this floor, or delete it from the floor list below the canvas.",floorId:a.id,autoFixable:!1}))}var Jt=5,eo=16;function to(t,e,n){for(let i of e){let r=i.focalPoint??t.focalPoint;if(r)for(let a of i.objects){if(a.type!=="section"||a.outline.length<3)continue;let{rake:l}=Ae(a);if(l<Jt)continue;let f=a.outline.map(p=>Math.hypot(p.x-r.x,p.y-r.y)),h=Math.max(...f);if(h<=0)continue;let c=(h-Math.min(...f))/h;if(l*c<=eo)continue;let g=a.displayLabel??a.label;M(n,E({severity:"warning",code:"section-rake-inconsistent",dimension:"geometry",title:`Section \u201C${g}\u201D is too deep for a single rake`,message:`Section \u201C${g}\u201D spans ${Math.round(c*100)}% of its distance to the stage at a ${Math.round(l)}\xB0 rake, so one rake can't represent its sightlines faithfully \u2014 a real tier this deep changes slope at a cross-aisle.`,action:"Split this section at the cross-aisle into two sections, each with its own rake.",objectId:a.id,floorId:i.id,autoFixable:!1}))}}}function oo(t,e,n){let i=t.theme?.background??gt,r=Bt,a=new Map;for(let c of e)for(let d of c.objects){if(d.type!=="gaArea")continue;let g=a.get(d.categoryKey)??[];g.push({id:d.id,floorId:c.id}),a.set(d.categoryKey,g)}for(let c of t.categories){let d=R(c.color,i),g=R(c.color,r);if(d==null||g==null){M(n,E({severity:"error",code:"invalid-category-color",dimension:"contrast",message:`Category \u201C${c.label}\u201D does not use a supported hex color`,categoryKey:c.key}));continue}let p=Math.min(d,g);p<3&&M(n,E({severity:"warning",code:"category-contrast-low",dimension:"contrast",title:`Category \u201C${c.label}\u201D is hard to see`,message:`Category \u201C${c.label}\u201D reaches only ${k(p)}:1 across dark and light chart backgrounds; 3:1 is required`,action:`Choose a lighter or darker color for \u201C${c.label}\u201D until this warning clears.`,categoryKey:c.key,measured:k(p),minimum:3,autoFixable:!1}));let b=a.get(c.key)??[];if(b.length){let I=me(c.color,i,be),O=me(c.color,r,be),w=Math.min(R(I,i)??0,R(O,r)??0);w<3&&M(n,E({severity:"warning",code:"ga-contrast-low",dimension:"contrast",message:`GA category \u201C${c.label}\u201D reaches only ${k(w)}:1 after its rendered opacity is composited; 3:1 is required`,objectId:b[0].id,categoryKey:c.key,floorId:b[0].floorId,relatedObjectIds:b.map(j=>j.id),measured:k(w),minimum:3,autoFixable:!1}))}}for(let c=0;c<t.categories.length;c++)for(let d=0;d<c;d++){let g=t.categories[c],p=t.categories[d],b=Qt(g.color,p.color);b!=null&&b<25&&M(n,E({severity:"warning",code:"category-colors-too-similar",dimension:"contrast",title:`\u201C${g.label}\u201D and \u201C${p.label}\u201D look too similar`,message:`Categories \u201C${g.label}\u201D and \u201C${p.label}\u201D are only \u0394E ${k(b)} apart; 25 is required`,action:"Pick a visibly different color for either category so buyers can tell them apart.",categoryKey:g.key,measured:k(b),minimum:25,autoFixable:!1}))}for(let c of e){let d=c.objects.filter(g=>g.type==="text");for(let g of d){let p=g.color??t.theme?.textColor??bt,b=R(p,i),I=g.fontSize>=18?3:4.5;(b==null||b<I)&&M(n,E({severity:"warning",code:"text-contrast-low",dimension:"contrast",message:`Text \u201C${g.text}\u201D has ${k(b??0)}:1 contrast against the chart background; ${I}:1 is required`,objectId:g.id,floorId:c.id,measured:k(b??0),minimum:I,autoFixable:!0}))}}if(t.theme?.selectionColor){let c=R(t.theme.selectionColor,i);(c==null||c<3)&&M(n,E({severity:"warning",code:"selection-contrast-low",dimension:"contrast",title:"The selection color is hard to see",message:`Selection rings have ${k(c??0)}:1 contrast against the chart background; 3:1 is required.`,action:"In Theme, choose a Selection color that stands out clearly from the Background color.",measured:k(c??0),minimum:3,autoFixable:!1}))}if(t.theme?.textColor){let c=R(t.theme.textColor,i);(c==null||c<3)&&M(n,E({severity:"warning",code:"theme-text-contrast-low",dimension:"contrast",title:"The theme text color is hard to read",message:`Theme text has ${k(c??0)}:1 contrast against the chart background; 3:1 is required.`,action:"In Theme, choose a Text color with stronger contrast against the Background color.",measured:k(c??0),minimum:3,autoFixable:!1}))}let l=t.theme?.seatLabelColor??zt,f=new Map,h=(c,d,g)=>{let p=f.get(c)??new Map,b=p.get(d)??[];b.push(g),p.set(d,b),f.set(c,p)};for(let c of e)for(let d of c.objects)if(d.type==="row")for(let g of ie(d).keys())h(g,"seat",d.id);else if(d.type==="table")for(let g of ie(d).keys())h(g,"table seat",d.id);else d.type==="booth"&&h(d.categoryKey,"booth",d.id);for(let c of t.categories){let d=f.get(c.key);if(d)for(let[g,p]of d){let b=g==="booth"?Ne:Re,I=De(_e,600),O=Ke(c.color,l),w=R(O,c.color);(w==null||w<I)&&M(n,E({severity:"warning",code:"bookable-label-contrast-low",dimension:"contrast",message:`${g==="booth"?"Booth":g==="seat"?"Seat":"Table-seat"} labels use ${b}u type and have ${k(w??0)}:1 contrast on category \u201C${c.label}\u201D; ${I}:1 is required for small text`,objectId:p[0],relatedObjectIds:p,measured:k(w??0),minimum:I,autoFixable:!0}))}}}function no(t,e){for(let n of t){let i=n.objects.filter(r=>r.type==="section");if(!(i.length<2))for(let r of n.objects){if(!(r.type==="row"||r.type==="table"||r.type==="booth"||r.type==="gaArea"))continue;let l=ue(r),f=i.filter(b=>te(l,b.outline,b.holes)),h=new Map;for(let b of f){let I=b.logicalSectionId??b.id,O=h.get(I)??[];O.push(b),h.set(I,O)}if(h.size<2)continue;let c=[...h.values()],d=c.map(b=>`Section \u201C${b[0].displayLabel??b[0].label}\u201D`),g=d.length===2?d.join(" and "):`${d.slice(0,-1).join(", ")}, and ${d[d.length-1]}`,p=r.type==="gaArea"?"GA area":r.type==="row"?"Row":r.type==="table"?"Table":"Booth";M(e,E({severity:"warning",code:"ambiguous-section-ownership",dimension:"structure",title:`${p} \u201C${r.label}\u201D belongs to more than one section`,message:`${p} \u201C${r.label}\u201D has its center inside ${g}, so its buyer section is unclear.`,action:"Adjust the boundaries until this object sits in one Section. If the overlapping shapes are meant to form one Section, combine them first.",objectId:r.id,relatedObjectIds:[r.id,...c.flatMap(b=>b.map(I=>I.id))],floorId:n.id,autoFixable:!1}))}}}var io={structure:20,geometry:30,contrast:25,labels:15,navigation:10},ro={"seat-overlap":15,"seat-cramped":4,"label-collision":4,"category-contrast-low":3,"ga-contrast-low":3,"category-colors-too-similar":3,"invalid-category-color":10,"text-contrast-low":4,"bookable-label-contrast-low":3,"selection-contrast-low":3,"theme-text-contrast-low":3,"missing-focal-point":10,"object-uncategorized":3,"object-unlabeled":3,"duplicate-object-label-normalized":2,"empty-section":2,"unused-floor":2,"ambiguous-section-ownership":4,"category-inventory-family-conflict":10};function ao(t){let e={...io};for(let r of t){let a=r.severity==="error"?10:2;e[r.dimension]=Math.max(0,e[r.dimension]-(ro[r.code]??a))}let n=Object.values(e).reduce((r,a)=>r+a,0),i=n>=95?"A":n>=85?"B":n>=70?"C":n>=55?"D":"F";return{overall:n,dimensions:e,errorFree:t.every(r=>r.severity!=="error"),grade:i}}var so=new Set(["unpriced-category","object-uncategorized"]);function yt(t,e={}){let n=ye(t),i=dt(t).filter(d=>d.code!=="missing-zone-focal-point"||e.requireExplicitZoneFocals).map(d=>{let g=d.objectId?n.find(I=>I.objects.some(O=>O.id===d.objectId))?.id:void 0,p=d.code==="category-inventory-family-conflict",b=p?t.categories.find(I=>I.key===d.categoryKey):void 0;return E({...d,...p?{severity:"error",title:`Category \u201C${b?.label??d.categoryKey??"Unknown"}\u201D spans incompatible inventory types`,action:"Show the affected objects, then review the safe category split. The repair preserves price, ticket tiers, accessibility assignments, and source provenance."}:{},...e.requireExplicitZoneFocals&&d.code==="missing-zone-focal-point"?{severity:"error"}:{},...g?{floorId:g}:{},source:"structural",dimension:qt(d),autoFixable:p})}),r=Xt(t,n,i),a=Ht(n),l=Yt(t,n,i);if(Zt(t,n,i),no(n,i),to(t,n,i),oo(t,n,i),n.reduce((d,g)=>d+g.objects.filter(p=>p.type==="row"||p.type==="table"||p.type==="booth"||p.type==="gaArea").length,0)===0){let d=new Set(["missing-focal-point","no-bookables"]);for(let g=i.length-1;g>=0;g--)d.has(i[g].code)&&i.splice(g,1)}if(e.requirePricedInventory)for(let d=0;d<i.length;d++)so.has(i[d].code)&&(i[d]={...i[d],severity:"error"});let h=i.filter(d=>d.severity==="error"),c=i.filter(d=>d.severity==="warning");return{issues:i,errors:h,warnings:c,metrics:{floors:n.length,objects:n.reduce((d,g)=>d+g.objects.length,0),seats:r.seats,bookableUnits:a.bookableUnits,inventoryByKind:a.inventoryByKind,categories:t.categories.length,freeTextLabels:l,checkedSeatPairs:r.checkedSeatPairs,minimumSeatDistance:r.minimumSeatDistance},score:ao(i),deferredRules:["rendered-row-label-decollision","rendered-bookable-state-contrast","section-focus-opacity-and-backdrop","24px-pointer-hit-target","reference-image-diff","sightline-blocked","ga-density-high"]}}function co(t,e){if(t.seatCount<2||t.seatSpacing>=e)return!1;let n=se(K(t));t.seatSpacing=k(e,3);let i=se(K(t));return t.origin.x=k(t.origin.x+n.x-i.x,3),t.origin.y=k(t.origin.y+n.y-i.y,3),!0}function lo(t,e){if(t.seatCount<2)return!1;let n=!1;if(t.shape==="round"){let i=q(t.seatArc??360,0,360),r=(i>=360?360/t.seatCount:i/(t.seatCount-1))*Math.PI/180;if(r>0){let a=e/(2*Math.sin(r/2)),l=Math.max(1,a-16);(t.radius??40)<l&&(t.radius=k(l,3),n=!0)}}else{let i=Me(t),r=Math.max(i.top,i.bottom),a=Math.max(i.left,i.right);r>1&&(t.width??80)/r<e&&(t.width=k(r*e,3),n=!0),a>1&&(t.height??50)/a<e&&(t.height=k(a*e,3),n=!0)}return n}function uo(t){return[Gt,Ut].map(n=>({color:n,minimum:Math.min(...t.map(i=>R(n,i)??0))})).sort((n,i)=>i.minimum-n.minimum)[0].color}function ft(t,e,n){let i=ae(t),r=0;for(let a of e)a.type==="row"?r+=K(a).filter(l=>we(i,l,n)).length:a.type==="table"?r+=W(a).filter(l=>we(i,l,n)).length:a.type==="text"&&a.id!==t.id&&pt(i,ae(a),2)&&r++;return r}function yo(t,e,n){if(ft(t,e,n)===0)return!1;let r={...t.position},a=Math.max(12,t.fontSize*1.25),l=[[0,-1],[1,0],[0,1],[-1,0],[1,-1],[1,1],[-1,1],[-1,-1]];for(let f=1;f<=12;f++)for(let[h,c]of l)if(t.position={x:k(r.x+h*a*f,3),y:k(r.y+c*a*f,3)},ft(t,e,n)===0)return!0;return t.position=r,!1}function Vo(t){let e=JSON.parse(JSON.stringify(t)),n=yt(e),i=[],r=We(e);if(r.changed){e=r.doc;for(let d of r.changes){let g=r.before.find(b=>b.categoryKey===d.categoryKey),p=g?.families.map(b=>b.label).join(", ")??"inventory families";i.push({code:"category-inventory-family-conflict",objectId:g?.objectIds[0],message:`Split category \u201C${d.categoryLabel}\u201D across ${p}; preserved its commercial metadata and reassigned ${d.reassignments.length} affected object${d.reassignments.length===1?"":"s"}`})}}let a=Se(e),l=2.5*a,f=ye(e);for(let d of f)for(let g of d.objects)if(g.type==="row"){let p=g.seatSpacing;co(g,l)&&i.push({code:p<2*a?"seat-overlap":"seat-cramped",objectId:g.id,message:`Expanded ${g.id} to the ${k(l)}u target pitch while preserving its centre`})}else g.type==="table"&&lo(g,l)&&i.push({code:"seat-cramped",objectId:g.id,message:`Expanded ${g.id} so its perimeter seats meet the ${k(l)}u target pitch`});let h=e.theme?.background??gt;for(let d of f)for(let g of d.objects){if(g.type!=="text")continue;let p=g.color??e.theme?.textColor??bt,b=g.fontSize>=18?3:4.5;(R(p,h)??0)<b&&(g.color=uo([h]),i.push({code:"text-contrast-low",objectId:g.id,message:`Changed ${g.id} to the highest-contrast black/white ink`}))}for(let d of f){let g=d.objects.filter(p=>p.type==="text");for(let p of g)yo(p,d.objects,a)&&i.push({code:"label-collision",objectId:p.id,message:`Moved ${p.id} to the nearest collision-free deterministic label position`})}e.floors?.length&&(e.objects=e.floors[0].objects);let c=yt(e);return{doc:e,changed:i.length>0,fixes:i,before:n,after:c}}export{ve as a,ie as b,ne as c,Xe as d,We as e,Ze as f,Qt as g,Vo as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c,j as A,m as T}from"./chunk-CXF32VPG.js";var d=7,B=10,N=15,R=11,k=.85,x=12,M=4.5,E=3,l="#000000",u="#ffffff",g=24,Z=18.67;function y(t,L=400){return t>=g||L>=700&&t>=Z?E:M}function G(t,L){return t*L>=x}var H=24,m={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"},P=m.wheelchair;function v(t){if(!t?.length)return null;let L=t.includes("wheelchair")?"wheelchair":t[0];return m[L]??null}function w(t){return/-(\d{1,5})$/.exec(t)?.[1]??t}var a=T;function X(t,L,r){let n=c(t),o=c(L);if(!n||!o)return L;let e=Math.max(0,Math.min(1,r));return`#${n.map((s,_)=>Math.round(s*e+o[_]*(1-e))).map(s=>s.toString(16).padStart(2,"0")).join("")}`}var F=3;function I(t,L,r=M){let n=a(L,t);if(n!=null&&n>=r)return L;let o=a(l,t)??0,e=a(u,t)??0;return o===0&&e===0?L:o>=e?l:u}var S=3;function K(t){let L=a("#ffffff",t);if(L!=null&&L>=S)return"#ffffff";let r=a(l,t)??0,n=a(u,t)??0;return r===0&&n===0?"#ffffff":r>=n?l:u}var C=/^#[0-9a-f]{6}$/i;function b(t){let L=c(t);return L!=null&&A(L)>.5}var O="#e5e7eb",h="#273142";function Y(t){return b(t)?O:h}function D(t,L,r=M){let n=C.test(t.trim()),o=t.trim().toLowerCase(),e=0,i=0,s=null;for(let f of L){if(!n||!C.test(f.trim()))continue;e+=1;let p=I(f,t,r);p.toLowerCase()!==o&&(i+=1,s=p)}return{total:e,overridden:i,status:e===0?"none":i===0?"applies":i===e?"overridden":"mixed",overrideInk:s}}export{d as a,B as b,N as c,R as d,k as e,x as f,M as g,E as h,l as i,u as j,y as k,G as l,H as m,m as n,P as o,v as p,w as q,a as r,X as s,F as t,I as u,K as v,b as w,O as x,h as y,Y as z,D as A};
|