@seatlayer/core 0.96.0 → 0.97.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/ar-Q44JP5JY.js +1 -0
- package/dist/be-CGFFSIQL.js +1 -0
- package/dist/bg-WOYK6OLH.js +1 -0
- package/dist/ca-77ZVI3X5.js +1 -0
- package/dist/chunk-2P72QUJR.js +1 -0
- package/dist/chunk-5N4H3KMR.js +1 -0
- package/dist/chunk-ASIIXY5M.js +1 -0
- package/dist/{chunk-O3DGXAIC.js → chunk-CUACREZL.js} +1 -1
- package/dist/{chunk-CEIVHWRB.js → chunk-FLMKHAUT.js} +1 -1
- package/dist/{chunk-TKYTTEJ2.js → chunk-IW7QZIMF.js} +1 -1
- package/dist/chunk-M5VINTGE.js +1 -0
- package/dist/chunk-NGZXKXOY.js +1 -0
- package/dist/{chunk-U7CVRE4P.js → chunk-OLGPAFXW.js} +1 -1
- package/dist/{chunk-M5X6G7FD.js → chunk-P4C24CIZ.js} +1 -1
- package/dist/{chunk-A3ZL3R75.js → chunk-QEPYNCBJ.js} +1 -1
- package/dist/chunk-VAI2VDQR.js +1 -0
- package/dist/{chunk-Q3MSDG4S.js → chunk-YPESNMTC.js} +1 -1
- package/dist/chunk-Z43H6AWN.js +1 -0
- package/dist/core/chart-ops/index.cjs +1 -1
- package/dist/core/chart-ops/index.d.cts +40 -18
- package/dist/core/chart-ops/index.d.ts +40 -18
- package/dist/core/chart-ops/index.js +1 -1
- package/dist/core/inventory/index.cjs +1 -1
- package/dist/core/inventory/index.js +1 -1
- package/dist/core/layout/index.cjs +1 -1
- package/dist/core/layout/index.js +1 -1
- package/dist/core/quality/index.js +1 -1
- package/dist/core/render-assets/index.js +1 -1
- package/dist/core/sections/index.js +1 -1
- package/dist/cs-OSBZYCSR.js +1 -0
- package/dist/cy-ZCOJW2WH.js +1 -0
- package/dist/da-2PDK6JTR.js +1 -0
- package/dist/de-R5LLVFUU.js +1 -0
- package/dist/el-ZPFVDCWA.js +1 -0
- package/dist/es-7YASJP32.js +1 -0
- package/dist/et-J4TV6KQL.js +1 -0
- package/dist/fa-4TEO7UGM.js +1 -0
- package/dist/fi-GIUDDKMH.js +1 -0
- package/dist/fr-J5J2XJLA.js +1 -0
- package/dist/he-OCEHSVUJ.js +1 -0
- package/dist/hi-EK5CTBW5.js +1 -0
- package/dist/hr-SLDTQOYC.js +1 -0
- package/dist/hu-2QNE77NO.js +1 -0
- package/dist/id-LGDAFQJK.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +8 -16
- package/dist/index.d.ts +8 -16
- package/dist/index.js +1 -1
- package/dist/it-DT4Y3IYB.js +1 -0
- package/dist/ja-D5EY2XCQ.js +1 -0
- package/dist/ko-DD2NV45Q.js +1 -0
- package/dist/ku-KZCMVLBE.js +1 -0
- package/dist/localeLoaders-GGAKX22E.js +1 -0
- package/dist/lt-QWGTJ47Y.js +1 -0
- package/dist/lv-LYAIG3VK.js +1 -0
- package/dist/ms-XTF4KNGD.js +1 -0
- package/dist/nl-QEXY6XHS.js +1 -0
- package/dist/no-HCOXN2CN.js +1 -0
- package/dist/pl-BWY53TSD.js +1 -0
- package/dist/pt-2UJUBCPL.js +1 -0
- package/dist/ro-GGXOLTED.js +1 -0
- package/dist/ru-ZTFK3WCU.js +1 -0
- package/dist/sk-KU543Y2U.js +1 -0
- package/dist/sl-FT576R7A.js +1 -0
- package/dist/sr-WE3J46JE.js +1 -0
- package/dist/stage-CKb7aNoH.d.cts +18 -0
- package/dist/stage-CKb7aNoH.d.ts +18 -0
- package/dist/sv-YEAOPSEB.js +1 -0
- package/dist/th-BEBRDHJA.js +1 -0
- package/dist/tr-LOAHUPSH.js +1 -0
- package/dist/uk-2GMICSHN.js +1 -0
- package/dist/vi-TC5B6AUR.js +1 -0
- package/dist/view3d/index.cjs +241 -78
- package/dist/view3d/index.d.cts +146 -78
- package/dist/view3d/index.d.ts +146 -78
- package/dist/view3d/index.js +239 -76
- package/dist/view3d/scene/scene.worker.cjs +1 -1
- package/dist/view3d/scene/scene.worker.js +1 -1
- package/dist/zh-Hans-TSZWTZQY.js +1 -0
- package/dist/zh-Hant-TLB4FZYM.js +1 -0
- package/package.json +1 -1
- package/dist/ar-3S65PDDG.js +0 -1
- package/dist/be-WJKGEBTI.js +0 -1
- package/dist/bg-TZUF36MP.js +0 -1
- package/dist/ca-WLW64J7W.js +0 -1
- package/dist/chunk-F2EXXZSZ.js +0 -1
- package/dist/chunk-F7TP67LK.js +0 -1
- package/dist/chunk-LAX7F5ML.js +0 -1
- package/dist/chunk-LFJUXTIO.js +0 -1
- package/dist/chunk-M7JA4BGP.js +0 -1
- package/dist/cs-HQXANWJA.js +0 -1
- package/dist/cy-EG5BJOG7.js +0 -1
- package/dist/da-5XEBRUEE.js +0 -1
- package/dist/de-SCVAU32D.js +0 -1
- package/dist/el-KBW7YAF5.js +0 -1
- package/dist/es-IFLC65KX.js +0 -1
- package/dist/et-OXB22VMP.js +0 -1
- package/dist/fa-GFAZXHP6.js +0 -1
- package/dist/fi-AI67VYYH.js +0 -1
- package/dist/fr-V3RG2KYP.js +0 -1
- package/dist/he-J3I6MRUR.js +0 -1
- package/dist/hr-SA4WZ3AG.js +0 -1
- package/dist/hu-TM35NZ4U.js +0 -1
- package/dist/it-E4QYIYC4.js +0 -1
- package/dist/ja-S5M7EINH.js +0 -1
- package/dist/ku-DNZQIUUG.js +0 -1
- package/dist/localeLoaders-JTNNRDK2.js +0 -1
- package/dist/lt-ETQDX2HL.js +0 -1
- package/dist/lv-FYFIWI4F.js +0 -1
- package/dist/nl-XOG5SBZQ.js +0 -1
- package/dist/no-7UGUTFXW.js +0 -1
- package/dist/pl-5HR7DQIK.js +0 -1
- package/dist/pt-L4CCONDZ.js +0 -1
- package/dist/ro-KZVPOCZ6.js +0 -1
- package/dist/ru-CD7HYORB.js +0 -1
- package/dist/sk-AQZOHJYW.js +0 -1
- package/dist/sl-XYRITXI6.js +0 -1
- package/dist/sr-6VTXFVHT.js +0 -1
- package/dist/sv-EJWP7WJV.js +0 -1
- package/dist/tr-VKVADTIZ.js +0 -1
- package/dist/uk-QSJV3LDS.js +0 -1
- package/dist/zh-Hans-2FN4LFAW.js +0 -1
- package/dist/zh-Hant-5T2AB4FR.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as E}from"./chunk-5BMXWOE7.js";import{N as v,
|
|
1
|
+
import{l as E}from"./chunk-5BMXWOE7.js";import{N as v,Ta as _,Wa as R}from"./chunk-VAI2VDQR.js";var T=.08,Y=.045;function L(t){return`__floor__:${encodeURIComponent(t)}`}function X(t,e,o){return{...t,objects:e,floors:void 0,...o?{focalPoint:o}:{},referenceImage:void 0,backgroundImage:void 0}}function j(t,e,o){let s=t.focalPoint??e.focalPoint;return s?s.x:o.x+o.width/2}function Q(t){let e=t.floors??[];if(!e.length)return[];let o=e.map(n=>R(X(t,n.objects,n.focalPoint),{freeText:"exclude"})),a=Math.max(1,...o.map(n=>n.width))*T,r=0;return e.map((n,c)=>{let h=o[c],u=r-(h.y+h.height);return r-=h.height+a,{floorId:n.id,label:n.name??n.id,level:c,levelBadge:c===0?"G":String(c),translation:{x:-j(n,t,h),y:u},bounds:h}})}function z(t,e,o,s){let a=e==="name"?t.label:t.levelBadge;if(!a)return[];let r=Math.max(1,o*Y),n=t.bounds.x+t.translation.x,c=t.bounds.y+t.translation.y+r*.4,h=`floor-level-${t.floorId}`,u={type:"text",id:`${h}-text`,text:a,position:{x:n,y:c},fontSize:r,rotation:0,color:s,bold:!0};if(e==="name")return[u];let x=r*.95;return[{type:"shape",id:`${h}-badge`,kind:"ellipse",x:n-x*.35,y:c-x*.3,width:x*2,height:x*2,fill:"transparent",stroke:{color:s,width:Math.max(1,r*.09)},opacity:.8},u]}function V(t,e={}){let o=t.floors;if(!o||o.length<2)return t;let s=Q(t),a=[];o.forEach((u,x)=>{let{x:y,y:S}=s[x].translation;for(let I of u.objects)x>0&&I.type==="shape"&&I.role==="stage"||a.push(_(I,y,S))});let r={...t,objects:a,floors:void 0},n=R(r,{freeText:"exclude"}),c=Math.max(1,n.width,n.height),h=t.theme?.textColor??"#94a3b8";for(let u of s)a.push(...z(u,e.labelStyle??"number",c,h));return{...r,objects:a,referenceImage:void 0,backgroundImage:void 0}}function W(t){if(!t.floors||t.floors.length<2)return t;let e=!t.zones?.length,o=new Set,s=t.floors.flatMap(r=>r.objects.flatMap(n=>{if(n.type==="shape"&&n.role==="stage"){let c=JSON.stringify([n.kind,n.x,n.y,n.width,n.height,n.points,n.rotation??0,n.label,n.heightM,n.eventConfigurationIds]);if(o.has(c))return[];o.add(c)}return e&&n.type==="section"?[{...n,zone:L(r.id)}]:[n]})),a=e?t.floors.map(r=>({id:L(r.id),label:r.name,focalPoint:{...r.focalPoint}})):t.zones;return{...t,objects:s,zones:a,floors:void 0,referenceImage:void 0,backgroundImage:E(t)}}function N(t){let e=t.floors;if(!e?.length)return null;let o=e.find(r=>r.objects.some(n=>n.type==="shape"&&n.role==="stage"));if(o)return o.id;let s=e[0],a=-1;for(let r of e){let n=R(X(t,r.objects,r.focalPoint),{freeText:"exclude"}),c=n.width*n.height;c>a&&(a=c,s=r)}return s.id}var U=640;function tt(t,e){return(t.floors?.length??0)<2?null:t.floorOverview==="combined"||!Number.isFinite(e)||e<=0||e>=U?"all":N(t)}var Z=9;function $(t){if(t.kind==="circle")return{hx:t.r,hy:t.r};let e=t.width/2,o=t.height/2,s=t.rotation??0;if(!s)return{hx:e,hy:o};let a=s*Math.PI/180,r=Math.abs(Math.cos(a)),n=Math.abs(Math.sin(a));return{hx:e*r+o*n,hy:e*n+o*r}}function q(t,e,o){let s=e-t.seat.x,a=o-t.seat.y;if(t.shape.kind==="circle")return s*s+a*a<=t.shape.r*t.shape.r;let r=t.shape.rotation??0,n=s,c=a;if(r){let h=-r*Math.PI/180,u=Math.cos(h),x=Math.sin(h);n=s*u-a*x,c=s*x+a*u}return Math.abs(n)<=t.shape.width/2&&Math.abs(c)<=t.shape.height/2}function G(t,e,o,s,a){if(t.shape.kind==="circle"){let f=Math.min(Math.max(t.seat.x,e),s),m=Math.min(Math.max(t.seat.y,o),a),d=t.seat.x-f,p=t.seat.y-m;return d*d+p*p<=t.shape.r*t.shape.r}let r=t.shape.rotation??0;if(!r)return t.seat.x-t.hx<=s&&t.seat.x+t.hx>=e&&t.seat.y-t.hy<=a&&t.seat.y+t.hy>=o;let n=r*Math.PI/180,c=Math.cos(n),h=Math.sin(n),u=t.shape.width/2,x=t.shape.height/2,y=[[-u,-x],[u,-x],[u,x],[-u,x]].map(([f,m])=>[t.seat.x+f*c-m*h,t.seat.y+f*h+m*c]),S=[[e,o],[s,o],[s,a],[e,a]],I=[[1,0],[0,1],[c,h],[-h,c]];for(let[f,m]of I){let d=1/0,p=-1/0;for(let[P,O]of y){let i=P*f+O*m;i<d&&(d=i),i>p&&(p=i)}let M=1/0,w=-1/0;for(let[P,O]of S){let i=P*f+O*m;i<M&&(M=i),i>w&&(w=i)}if(p<M||w<d)return!1}return!0}function ot(t,e={}){let o=e.seatRadius??Z,s=t.length,a=new Array(s),r=1/0,n=1/0,c=-1/0,h=-1/0,u=0;for(let i=0;i<s;i++){let l=t[i],D=e.shapeOf?.(l)??{kind:"circle",r:o},{hx:g,hy:b}=$(D);a[i]={seat:l,shape:D,hx:g,hy:b},l.x-g<r&&(r=l.x-g),l.y-b<n&&(n=l.y-b),l.x+g>c&&(c=l.x+g),l.y+b>h&&(h=l.y+b),g>u&&(u=g),b>u&&(u=b)}s===0&&(r=0,n=0,c=0,h=0);let x=u>0?u*4:1,y=Math.max(c-r,0),S=Math.max(h-n,0),I=Math.max(64,e.maxCells??s*4),f=x,m=Math.max(1,Math.ceil(y/f)||1),d=Math.max(1,Math.ceil(S/f)||1);for(;m*d>I&&(m>1||d>1);)f*=2,m=Math.max(1,Math.ceil(y/f)||1),d=Math.max(1,Math.ceil(S/f)||1);let p=m*d,M=new Int32Array(p+1),w=0;for(let i=0;i<s;i++){let l=a[i],D=v(Math.floor((l.seat.x-l.hx-r)/f),0,m-1),g=v(Math.floor((l.seat.x+l.hx-r)/f),0,m-1),b=v(Math.floor((l.seat.y-l.hy-n)/f),0,d-1),F=v(Math.floor((l.seat.y+l.hy-n)/f),0,d-1);for(let A=b;A<=F;A++)for(let C=D;C<=g;C++)M[A*m+C+1]++,w++}for(let i=0;i<p;i++)M[i+1]+=M[i];let P=new Int32Array(w),O=M.slice(0,p);for(let i=0;i<s;i++){let l=a[i],D=v(Math.floor((l.seat.x-l.hx-r)/f),0,m-1),g=v(Math.floor((l.seat.x+l.hx-r)/f),0,m-1),b=v(Math.floor((l.seat.y-l.hy-n)/f),0,d-1),F=v(Math.floor((l.seat.y+l.hy-n)/f),0,d-1);for(let A=b;A<=F;A++)for(let C=D;C<=g;C++){let k=A*m+C;P[O[k]++]=i}}return{seats:t,entries:a,minX:r,minY:n,cell:f,cols:m,rows:d,cellStart:M,items:P,stamp:new Int32Array(s),epoch:0}}function rt(t,e,o={}){let{cols:s,rows:a,cell:r,minX:n,minY:c,cellStart:h,items:u,entries:x}=t,y=Math.floor((e.x-n)/r),S=Math.floor((e.y-c)/r);if(y<0||S<0||y>=s||S>=a)return null;let I=S*s+y,f=h[I+1],m=-1,d=1/0;for(let p=h[I];p<f;p++){let M=u[p],w=x[M];if(o.filter&&!o.filter(w.seat.id,w.seat)||!q(w,e.x,e.y))continue;let P=e.x-w.seat.x,O=e.y-w.seat.y,i=P*P+O*O;(i<d||i===d&&M<m)&&(d=i,m=M)}return m<0?null:x[m].seat.id}function st(t,e,o,s={}){if(!(o>0))return null;let{cols:a,rows:r,cell:n,minX:c,minY:h,cellStart:u,items:x,entries:y}=t,S=Math.max(0,Math.floor((e.x-o-c)/n)),I=Math.min(a-1,Math.floor((e.x+o-c)/n)),f=Math.max(0,Math.floor((e.y-o-h)/n)),m=Math.min(r-1,Math.floor((e.y+o-h)/n));if(S>I||f>m)return null;let d=-1,p=o*o,M=t.stamp,w=++t.epoch;for(let P=f;P<=m;P++){let O=P*a;for(let i=S;i<=I;i++){let l=O+i,D=u[l+1];for(let g=u[l];g<D;g++){let b=x[g];if(M[b]===w)continue;M[b]=w;let F=y[b];if(s.filter&&!s.filter(F.seat.id,F.seat))continue;let A=e.x-F.seat.x,C=e.y-F.seat.y,k=A*A+C*C;(k<p||k===p&&b<d)&&(p=k,d=b)}}}return d<0?null:y[d].seat.id}function at(t,e,o={}){let s=Math.min(e.x,e.x+e.width),a=Math.max(e.x,e.x+e.width),r=Math.min(e.y,e.y+e.height),n=Math.max(e.y,e.y+e.height),c=o.mode??"center",{cols:h,rows:u,cell:x,minX:y,minY:S,cellStart:I,items:f,entries:m}=t,d=Math.max(0,Math.floor((s-y)/x)),p=Math.min(h-1,Math.floor((a-y)/x)),M=Math.max(0,Math.floor((r-S)/x)),w=Math.min(u-1,Math.floor((n-S)/x));if(d>p||M>w)return[];let P=[],O=t.stamp,i=++t.epoch;for(let l=M;l<=w;l++){let D=l*h;for(let g=d;g<=p;g++){let b=D+g,F=I[b+1];for(let A=I[b];A<F;A++){let C=f[A];if(O[C]===i)continue;O[C]=i;let k=m[C];if(o.filter&&!o.filter(k.seat.id,k.seat))continue;(c==="center"?k.seat.x>=s&&k.seat.x<=a&&k.seat.y>=r&&k.seat.y<=n:G(k,s,r,a,n))&&P.push(C)}}}return P.sort((l,D)=>l-D),P.map(l=>m[l].seat.id)}function ct(t){let e=t.cols*t.rows,o=0,s=0;for(let r=0;r<e;r++){let n=t.cellStart[r+1]-t.cellStart[r];n>0&&o++,n>s&&(s=n)}let a=t.items.length;return{cell:t.cell,cols:t.cols,rows:t.rows,cells:e,occupiedCells:o,refs:a,maxPerCell:s,meanPerOccupiedCell:o?a/o:0}}function lt(t,e=0){let o=Math.max(1,t.width,t.height),s={x:t.x+t.width/2,y:t.y+t.height/2},a=o*1.55,r=Math.max(o*.82,Math.max(0,e)+o*.45);return{target:s,distance:a,height:r,focalLength:Math.hypot(a,r),yawRad:-8*Math.PI/180}}function B(t,e,o=0){let s=e.x-t.target.x,a=e.y-t.target.y,r=Math.cos(t.yawRad),n=Math.sin(t.yawRad),c=s*r-a*n,u=s*n+a*r-t.distance,x=o-t.height,y=Math.hypot(t.distance,t.height),S=(-t.distance*u-t.height*x)/y,I=(-t.height*u+t.distance*x)/y,f=Math.max(y*.08,S),m=t.focalLength/f;return{x:t.target.x+c*m,y:t.target.y-I*m,depth:f,scale:m}}function ht(t,e){return{x:t.a*e.x+t.c*e.y+t.e,y:t.b*e.x+t.d*e.y+t.f}}function ut(t){let e=t.a*t.d-t.b*t.c;if(!Number.isFinite(e)||Math.abs(e)<1e-9)throw new Error("perspective projection produced a singular affine");let o=t.d/e,s=-t.b/e,a=-t.c/e,r=t.a/e;return{a:o,b:s,c:a,d:r,e:-(o*t.e+a*t.f),f:-(s*t.e+r*t.f)}}function mt(t,e){return{a:t.a*e.a+t.c*e.b,b:t.b*e.a+t.d*e.b,c:t.a*e.c+t.c*e.d,d:t.b*e.c+t.d*e.d,e:t.a*e.e+t.c*e.f+t.e,f:t.b*e.e+t.d*e.f+t.f}}function xt(t,e,o=()=>0){let s=B(t,e,o(e)),a={x:e.x+1,y:e.y},r={x:e.x,y:e.y+1},n=B(t,a,o(a)),c=B(t,r,o(r)),h=n.x-s.x,u=n.y-s.y,x=c.x-s.x,y=c.y-s.y;return{a:h,b:u,c:x,d:y,e:s.x-h*e.x-x*e.y,f:s.y-u*e.x-y*e.y}}function ft(t){let e=Math.hypot(t.a,t.b),o=t.a*t.d-t.b*t.c;return{rotationDeg:Math.atan2(t.b,t.a)*180/Math.PI,scaleX:e,scaleY:o/Math.max(e,1e-9),skewX:(t.a*t.c+t.b*t.d)/Math.max(o,1e-9)}}export{T as a,L as b,Q as c,V as d,W as e,N as f,U as g,tt as h,Z as i,ot as j,rt as k,st as l,at as m,ct as n,lt as o,B as p,ht as q,ut as r,mt as s,xt as t,ft as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as Ie,i as ce}from"./chunk-5ITK5236.js";import{c as Pe}from"./chunk-CRCGO52K.js";var Yn=2e6,Mt=/^data:image\/(?:png|jpe?g|webp|gif|avif);base64,[a-z0-9+/]+={0,2}$/i,St=/[\s"'<>`\\]/;function vt(e){if(typeof e!="string"||!e||e.length>2e6||e!==e.trim())return!1;if(e.startsWith("data:"))return Mt.test(e);if(St.test(e))return!1;try{let t=new URL(e);return t.protocol==="https:"&&!t.username&&!t.password}catch{return!1}}function Ce(e){let t=e.trim();return vt(t)?t:null}var wt=2e5,Wn=1e5,Et="large_venue_inventory";function $n(e){return e?.includes(Et)?2e5:1e5}var Z="seatlayer.event-configuration/1",le="seatlayer.event-configuration-export/1",K=100,It=120,Pt=2e5,Ct=1e4,ke=/^[a-f0-9]{64}$/,_t=new Set(["stage","screen","barrier","camera_platform","sound_desk","rigging_truss"]);function Y(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function H(e,t){return typeof e=="string"&&e.length>=1&&e.length<=t&&e.normalize("NFKC").trim()===e}function Re(e){return typeof e=="number"&&Number.isInteger(e)&&e>0}function _e(e){return!Array.isArray(e)||e.length>Pt||!e.every(t=>H(t,K))?null:[...new Set(e)].sort()}function Te(e){return!Y(e)||!H(e.chartId,K)||!H(e.version,K)||e.sha256!==void 0&&(typeof e.sha256!="string"||!ke.test(e.sha256))?null:{chartId:e.chartId,version:e.version,...typeof e.sha256=="string"?{sha256:e.sha256}:{}}}function ue(e,t,n){return typeof e=="number"&&Number.isFinite(e)&&e>=t&&e<=n}function kt(e){return Y(e)?e.mode==="none"||e.mode==="opaque"?e.opacity===void 0?{mode:e.mode}:null:e.mode==="partial"&&ue(e.opacity,.01,.99)?{mode:"partial",opacity:e.opacity}:null:null}function Rt(e,t){if(e===void 0)return;if(!Array.isArray(e)||e.length>Ct)return null;let n=new Set(t),i=new Set,o=new Set,r=0,s=[];for(let l of e){if(!Y(l)||!H(l.id,K)||!H(l.objectId,K)||!n.has(l.objectId)||!_t.has(String(l.kind))||!ue(l.heightM,.05,50)||l.baseElevationM!==void 0&&!ue(l.baseElevationM,-10,100))return null;let m=kt(l.occlusion);if(!m||i.has(l.id)||o.has(l.objectId))return null;let a=l.contentImageUrl===void 0?void 0:typeof l.contentImageUrl=="string"?Ce(l.contentImageUrl):null;if(l.contentImageUrl!==void 0&&(!a||l.kind!=="screen"||++r>1))return null;i.add(l.id),o.add(l.objectId),s.push({id:l.id,objectId:l.objectId,kind:l.kind,heightM:l.heightM,...l.baseElevationM!==void 0?{baseElevationM:l.baseElevationM}:{},occlusion:m,...a?{contentImageUrl:a}:{}})}return s.sort((l,m)=>l.id.localeCompare(m.id))}function Oe(e){let t=[];if(!Y(e))return{issues:[{code:"invalid_export",path:"configuration",message:"Configuration must be an object"}]};e.schema!==Z&&t.push({code:"unsupported_schema",path:"configuration.schema",message:`Configuration schema must be ${Z}`}),H(e.id,K)||t.push({code:"invalid_id",path:"configuration.id",message:"Configuration id must contain 1 to 100 normalized characters"}),H(e.label,It)||t.push({code:"invalid_label",path:"configuration.label",message:"Configuration label must contain 1 to 120 normalized characters"}),Re(e.version)||t.push({code:"invalid_version",path:"configuration.version",message:"Configuration version must be a positive integer"});let n=Te(e.baseVenue);n||t.push({code:"invalid_base_venue",path:"configuration.baseVenue",message:"Base venue must identify one normalized chart id and exact version"});let i=Y(e.overlay)?e.overlay:null,o=_e(i?.objectIds),r=_e(i?.productionKillSeatIds),s=o?Rt(i?.productionElements,o):null;return(!i||!o||!r)&&t.push({code:"invalid_overlay",path:"configuration.overlay",message:"Overlay ids must be bounded arrays of normalized stable ids"}),s===null&&t.push({code:"invalid_production_element",path:"configuration.overlay.productionElements",message:"Production elements must be unique, bounded semantics over referenced base-venue objects"}),t.length||!n||!o||!r||s===null?{issues:t}:{issues:t,value:{schema:Z,id:e.id,label:e.label,version:e.version,baseVenue:n,overlay:{objectIds:o,productionKillSeatIds:r,...s!==void 0?{productionElements:s}:{}}}}}function Jn(e){let t=Oe(e);return t.value?{ok:!0,value:t.value}:{ok:!1,issues:t.issues}}function Zn(e){if(!Y(e))return{ok:!1,issues:[{code:"invalid_export",path:"",message:"Export must be an object"}]};let t=[];e.schema!==le&&t.push({code:"unsupported_schema",path:"schema",message:`Export schema must be ${le}`}),(typeof e.contentSha256!="string"||!ke.test(e.contentSha256))&&t.push({code:"invalid_checksum",path:"contentSha256",message:"Export checksum must be a lowercase SHA-256 digest"});let n=Oe(e.configuration);return t.push(...n.issues),t.length||!n.value||typeof e.contentSha256!="string"?{ok:!1,issues:t}:{ok:!0,value:{schema:le,configuration:n.value,contentSha256:e.contentSha256}}}function eo(e){return JSON.stringify({schema:Z,id:e.id,label:e.label,version:e.version,baseVenue:{chartId:e.baseVenue.chartId,version:e.baseVenue.version,...e.baseVenue.sha256?{sha256:e.baseVenue.sha256}:{}},overlay:{objectIds:[...new Set(e.overlay.objectIds)].sort(),productionKillSeatIds:[...new Set(e.overlay.productionKillSeatIds)].sort(),...e.overlay.productionElements!==void 0?{productionElements:[...e.overlay.productionElements].sort((t,n)=>t.id.localeCompare(n.id)).map(t=>({id:t.id,objectId:t.objectId,kind:t.kind,heightM:t.heightM,...t.baseElevationM!==void 0?{baseElevationM:t.baseElevationM}:{},occlusion:t.occlusion,...t.contentImageUrl?{contentImageUrl:t.contentImageUrl}:{}}))}:{}}})}function to(e,t){let n=[];e.baseVenue.chartId!==t.chartId&&n.push({code:"base_venue_mismatch",message:"Configuration belongs to a different base venue"}),e.baseVenue.version!==t.version&&n.push({code:"base_venue_version_mismatch",message:"Configuration was authored against a different venue version"}),e.baseVenue.sha256&&!t.sha256?n.push({code:"base_venue_checksum_missing",message:"Venue checksum is required for this configuration"}):e.baseVenue.sha256&&e.baseVenue.sha256!==t.sha256&&n.push({code:"base_venue_checksum_mismatch",message:"Venue bytes do not match the configuration base"});let i=new Set(t.objectIds);for(let r of e.overlay.objectIds)i.has(r)||n.push({code:"overlay_object_missing",message:`Production object ${r} is missing from the base venue`,targetId:r});if(t.objectTypes)for(let r of e.overlay.productionElements??[])t.objectTypes.get(r.objectId)!=="shape"&&n.push({code:"production_element_not_shape",message:`Production element ${r.id} must reference base-venue shape geometry`,targetId:r.objectId});let o=new Set(t.seatIds);for(let r of e.overlay.productionKillSeatIds)o.has(r)||n.push({code:"production_kill_seat_missing",message:`Production-kill seat ${r} is missing from the base venue`,targetId:r});return{compatible:n.length===0,issues:n}}var Tt={draft:new Set(["review","archived"]),review:new Set(["draft","approved","archived"]),approved:new Set(["published","archived"]),published:new Set(["archived"]),archived:new Set};function no(e,t){return e===t||Tt[e].has(t)}function oo(e,t,n){return!Re(n)||n>=t.version?null:e.find(i=>i.id===t.id&&i.version===n&&i.status==="published")??null}function Ot(e){return e.floors?.length?e.floors.flatMap(t=>t.objects):e.objects}function de(e,t,n){if(!(!e||typeof e!="object")){if(Array.isArray(e)){for(let i of e)de(i,t,n);return}for(let[i,o]of Object.entries(e)){if(i==="eventConfigurationId"){H(o,K)?t.add(o):o!==void 0&&n.add(String(o));continue}if(i==="eventConfigurationIds"){if(!Array.isArray(o))n.add(String(o));else for(let r of o)H(r,K)?t.add(r):n.add(String(r));continue}de(o,t,n)}}}function io(e,t){let n=Te(t);if(!n)return{ok:!1,invalidIds:["baseVenue"]};let i=new Set,o=new Set;if(de(e,i,o),o.size)return{ok:!1,invalidIds:[...o].sort()};let r=Ot(e);return{ok:!0,configurations:[...i].sort().map(s=>({schema:Z,id:s,label:s,version:1,baseVenue:n,overlay:{objectIds:r.filter(l=>l.type==="shape"&&l.eventConfigurationIds?.includes(s)).map(l=>l.id).sort(),productionKillSeatIds:[]}}))}}var so=40,ao=1200,co=.8,lo=3,uo=-2,fo=20,ho=.1,mo=40,po=40,Ae=e=>Math.max(1,e.fontSize*.6+(e.letterSpacing??0));function At(e,t){let n=e.text.split(/\r?\n/);if(!e.width)return Math.max(1,n.length);let i=Math.max(1,Math.floor(t/Ae(e))),o=0;for(let r of n){if(!r.length){o+=1;continue}let s=0;for(let l of r.split(/\s+/)){let m=l.length;s&&s+1+m<=i?s+=1+m:(o+=Math.max(1,Math.ceil(m/i)),s=m%i)}}return Math.max(1,o)}function Ne(e){let t=e.background?.padding??0,n=e.text.split(/\r?\n/),i=Math.max(1,...n.map(l=>l.length))*Ae(e),o=e.width??i+t*2,r=Math.max(1,o-t*2),s=At(e,r);return{width:o,height:s*e.fontSize*(e.lineHeight??1.2)+t*2,lineCount:s,padding:t}}var Nt=Math.PI/180;function k(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function jt(e,t,n){let i=Math.cos(n),o=Math.sin(n),r=e.x-t.x,s=e.y-t.y;return{x:t.x+r*i-s*o,y:t.y+r*o+s*i}}function yo(e,t){return jt(e,{x:0,y:0},t*Nt)}function L(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function Lt(e){let t=0,n=0;for(let o of e)t+=o.x,n+=o.y;let i=e.length||1;return{x:t/i,y:n/i}}function go(e){return e.length?Lt(e):null}function fe(e,t){let n=1-t,i=n*n*n,o=3*n*n*t,r=3*n*t*t,s=t*t*t;return{x:i*e.start.x+o*e.control1.x+r*e.control2.x+s*e.end.x,y:i*e.start.y+o*e.control1.y+r*e.control2.y+s*e.end.y}}function So(e,t,n){let i={x:(e.x+t.x)/2,y:(e.y+t.y)/2},o={x:(n.x-i.x)*4/3,y:(n.y-i.y)*4/3};return{start:{...e},control1:{x:e.x+(t.x-e.x)/3+o.x,y:e.y+(t.y-e.y)/3+o.y},control2:{x:e.x+(t.x-e.x)*2/3+o.x,y:e.y+(t.y-e.y)*2/3+o.y},end:{...t}}}function Fe(e,t,n=192){if(!Number.isInteger(t)||t<1)throw new Error("Path point count must be a positive integer");if(t===1)return[fe(e,.5)];let i=Array.from({length:n+1},(m,a)=>fe(e,a/n)),o=new Float64Array(i.length);for(let m=1;m<i.length;m+=1){let a=i[m].x-i[m-1].x,c=i[m].y-i[m-1].y;o[m]=o[m-1]+Math.hypot(a,c)}let r=o[o.length-1];if(r<=1e-9)return Array.from({length:t},()=>({...e.start}));let s=[],l=1;for(let m=0;m<t;m+=1){let a=r*m/(t-1);for(;l<o.length-1&&o[l]<a;)l+=1;let c=o[l-1],u=o[l],h=u===c?0:(a-c)/(u-c);s.push({x:i[l-1].x+(i[l].x-i[l-1].x)*h,y:i[l-1].y+(i[l].y-i[l-1].y)*h})}return s}function F(e,t){return{x:e.x+t.x,y:e.y+t.y}}function ee(e,t){return{x:e.x-t.x,y:e.y-t.y}}function D(e,t){return{x:e.x*t,y:e.y*t}}function oe(e,t=13){return Array.from({length:t},(n,i)=>fe(e,i/(t-1)))}function je(e,t){let n=Math.max(0,Math.min(1,t))*(e.length-1),i=Math.min(e.length-2,Math.floor(n));return L(e[i],e[i+1],n-i)}function Le(e,t,n){let i=Math.max(0,Math.min(1,t)),o=Math.max(i,Math.min(1,n)),r=[je(e,i)];for(let s=1;s<e.length-1;s+=1){let l=s/(e.length-1);l>i+1e-9&&l<o-1e-9&&r.push(e[s])}return r.push(je(e,o)),r}function De(e,t){let n=[[0,1],[1,2],[2,3],[3,0]],i=0,o=Number.POSITIVE_INFINITY;n.forEach(([h,d],p)=>{let f=k(L(e[h],e[d],.5),t);f<o&&(o=f,i=p)});let r=e[i],s=e[(i+1)%4],l=e[(i+2)%4],m=e[(i+3)%4],a=L(r,s,.5),c=ee(t,a),u=Math.max(1e-9,Math.hypot(c.x,c.y));return{p0:r,p1:s,p2:l,p3:m,normal:D(c,1/u),depth:(k(r,m)+k(s,l))/2}}function Ve(e){let{p0:t,p1:n,p2:i,p3:o,normal:r,depth:s}=e,l=ee(n,t),m=ee(i,o),a=s*.22,c=s*.12;return{nearPath:{start:t,control1:F(F(t,D(l,1/3)),D(r,a)),control2:F(F(t,D(l,2/3)),D(r,a)),end:n},farPath:{start:i,control1:F(F(o,D(m,2/3)),D(r,c)),control2:F(F(o,D(m,1/3)),D(r,c)),end:o}}}function vo(e,t,n){if(e.length!==4)throw new Error("A section shell requires four mapped bounds corners");let i=e.reduce((p,f)=>F(p,f),{x:0,y:0});i.x/=4,i.y/=4;let o=k(e[0],e[1]),r=k(e[0],e[3]),s=n==="auto"?o>r*1.25&&k(i,t)>r?"bezier":"tapered":n;if(s==="rectangle")return{mode:s,outline:e.map(p=>({...p}))};let l=De(e,t),{p0:m,p1:a,p2:c,p3:u}=l;if(s==="tapered")return{mode:s,outline:[F(m,D(ee(a,m),.14)),F(m,D(ee(a,m),1-.14)),c,u]};let{nearPath:h,farPath:d}=Ve(l);return{mode:s,outline:[...oe(h),...oe(d).slice(1)]}}function wo(e,t,n,i){if(e.length!==4)throw new Error("Aisle generation requires four mapped bounds corners");if(!Number.isInteger(n)||n<0||n>3)throw new Error("Aisle count must be an integer from 0 to 3");if(n===0)return[];let o=De(e,t),{p0:r,p1:s,p2:l,p3:m}=o,a=i==="bezier"?Ve(o):null,c=a?oe(a.nearPath):null,u=a?oe(a.farPath).reverse():null,h=Math.min(.055,.18/(n+1));return Array.from({length:n},(d,p)=>{let f=(p+1)/(n+1),y=f-h/2,S=f+h/2;return c&&u?[...Le(c,y,S),...Le(u,y,S).reverse()]:[L(r,s,y),L(r,s,S),L(m,l,S),L(m,l,y)]})}function Ft(e,t,n){let i=n.x-t.x,o=n.y-t.y,r=i*i+o*o,s=r?Math.max(0,Math.min(1,((e.x-t.x)*i+(e.y-t.y)*o)/r)):0;return Math.hypot(e.x-(t.x+s*i),e.y-(t.y+s*o))}function Dt(e,t){let n=1/0;for(let i of t)if(!(i.length<2))for(let o=0,r=i.length-1;o<i.length;r=o++){let s=Ft(e,i[r],i[o]);s<n&&(n=s)}return n}function He(e,t){let n=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){let r=t[i].x,s=t[i].y,l=t[o].x,m=t[o].y;s>e.y!=m>e.y&&e.x<(l-r)*(e.y-s)/(m-s)+r&&(n=!n)}return n}function Ke(e){return Array.isArray(e)?e.filter(t=>Array.isArray(t)&&t.length>=3):[]}function Vt(e,t,n){let i=He(e,t)&&!n.some(r=>He(e,r)),o=Dt(e,[t,...n]);return i?o:-o}function z(e,t,n,i,o){let r=Vt({x:e,y:t},i,o);return{x:e,y:t,h:n,d:r,max:r+n*Math.SQRT2}}var he=class{constructor(){this.items=[]}get size(){return this.items.length}push(t){let n=this.items;n.push(t);let i=n.length-1;for(;i>0;){let o=i-1>>1;if(n[o].max>=n[i].max)break;[n[o],n[i]]=[n[i],n[o]],i=o}}pop(){let t=this.items,n=t[0],i=t.pop();if(t.length&&i){t[0]=i;let o=0;for(;;){let r=o*2+1,s=r+1,l=o;if(r<t.length&&t[r].max>t[l].max&&(l=r),s<t.length&&t[s].max>t[l].max&&(l=s),l===o)break;[t[l],t[o]]=[t[o],t[l]],o=l}}return n}};function Ue(e){if(e.length<3)return 0;let t=0;for(let n=0,i=e.length-1;n<e.length;i=n++)t+=(e[i].x+e[n].x)*(e[i].y-e[n].y);return Math.abs(t)/2}function Io(e,t){return Math.max(0,Ue(e)-Ke(t).reduce((n,i)=>n+Ue(i),0))}function Ge(e,t){let n=Ke(t);if(!e.length)return{point:{x:0,y:0},radius:0};if(e.length<3){let f=e.reduce((S,E)=>S+E.x,0)/e.length,y=e.reduce((S,E)=>S+E.y,0)/e.length;return{point:{x:f,y},radius:0}}let i=1/0,o=1/0,r=-1/0,s=-1/0;for(let f of e)f.x<i&&(i=f.x),f.y<o&&(o=f.y),f.x>r&&(r=f.x),f.y>s&&(s=f.y);let l=r-i,m=s-o,a=Math.min(l,m);if(!(a>0))return{point:{x:(i+r)/2,y:(o+s)/2},radius:0};let c=Math.max(l,m)/150,u=new he,h=a/2;for(let f=i;f<r;f+=a)for(let y=o;y<s;y+=a)u.push(z(f+h,y+h,h,e,n));let d=z(i+l/2,o+m/2,0,e,n),p=0;for(;u.size;){let f=u.pop();if(!f)break;f.d>d.d&&(d=f),!(f.max-d.d<=c)&&(p>=4e3||(p+=1,h=f.h/2,u.push(z(f.x-h,f.y-h,h,e,n)),u.push(z(f.x+h,f.y-h,h,e,n)),u.push(z(f.x-h,f.y+h,h,e,n)),u.push(z(f.x+h,f.y+h,h,e,n))))}return{point:{x:d.x,y:d.y},radius:Math.max(0,d.d)}}function Ht(e,t,n){return Math.max(t,Math.min(n,e))}function Co(e,t,n){return e<t?t:e>n?n:e}function Ut(e){return Ht(e,0,1)}function Xe(e){let t=Ut(e);return t*t*(3-2*t)}var W=Math.PI*2;function $(e){return Number.isFinite(e.x)&&Number.isFinite(e.y)}function Kt(e,t,n){let i=t-e;if(n){for(;i<0;)i+=W;for(;i>=W;)i-=W}else{for(;i>0;)i-=W;for(;i<=-W;)i+=W}return i}function To(e){return e.end}function ze(e){if(e.version!==1||e.closed!==!0||!$(e.start)||!Array.isArray(e.segments)||e.segments.length<2||e.segments.length>512)return!1;let t=e.start;for(let n of e.segments){if(!n||!$(n.end))return!1;if(n.kind==="line"){if(k(t,n.end)<=1e-9)return!1}else if(n.kind==="bezier"){if(!$(n.control1)||!$(n.control2)||k(t,n.end)<=1e-9)return!1}else if(n.kind==="arc"){if(!$(n.center)||!Number.isFinite(n.radius)||n.radius<=1e-6||Math.abs(k(t,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||Math.abs(k(n.end,n.center)-n.radius)>Math.max(1e-4,n.radius*1e-4)||k(t,n.end)<=1e-9)return!1}else return!1;t=n.end}return k(t,e.start)<=1e-4}function Gt(e,t,n){let i=1-n;return{x:i**3*e.x+3*i**2*n*t.control1.x+3*i*n**2*t.control2.x+n**3*t.end.x,y:i**3*e.y+3*i**2*n*t.control1.y+3*i*n**2*t.control2.y+n**3*t.end.y}}function Oo(e,t=2){if(!ze(e))throw new Error("Section outline path is invalid");let n=Math.max(.25,t),i=[{...e.start}],o=e.start;for(let r of e.segments){if(r.kind==="line")i.push({...r.end});else if(r.kind==="arc"){let s=Math.atan2(o.y-r.center.y,o.x-r.center.x),l=Math.atan2(r.end.y-r.center.y,r.end.x-r.center.x),m=Kt(s,l,r.clockwise),a=Math.max(2,Math.ceil(Math.abs(m)*r.radius/n));for(let c=1;c<=a;c+=1){let u=s+m*c/a;i.push({x:r.center.x+Math.cos(u)*r.radius,y:r.center.y+Math.sin(u)*r.radius})}}else{let s=k(o,r.control1)+k(r.control1,r.control2)+k(r.control2,r.end),l=Math.max(2,Math.ceil(s/n));for(let m=1;m<=l;m+=1)i.push(Gt(o,r,m/l))}o=r.end}return k(i[i.length-1],i[0])<=1e-4&&i.pop(),i}function We(e,t,n){return Xt(e,o=>({x:o.x+t,y:o.y+n}))}function Xt(e,t,n=1,i=!1){return{...e,start:t(e.start),segments:e.segments.map(o=>o.kind==="line"?{...o,end:t(o.end)}:o.kind==="arc"?{...o,center:t(o.center),radius:o.radius*Math.abs(n),clockwise:i?!o.clockwise:o.clockwise,end:t(o.end)}:{...o,control1:t(o.control1),control2:t(o.control2),end:t(o.end)})}}var Bt=45,me=150,Yt=60;function zt(e){let t=Bt/100;if(e<=t)return me;let n=Math.min(1,(e-t)/(1-t));return me-n*(me-Yt)}var Be=.5523;function Ye(e,t){return Math.abs(e.x-t.x)<=1e-6&&Math.abs(e.y-t.y)<=1e-6}function Wt(e){let t=[],n=[];for(e.forEach((i,o)=>{$(i)&&(t.length&&Ye(t[t.length-1],i)||(t.push({x:i.x,y:i.y}),n.push(o)))});t.length>1&&Ye(t[0],t[t.length-1]);)t.pop(),n.pop();return{points:t,sourceIndex:n}}function Ao(e,t,n){return Jt(e,{cornerSmoothing:t,...n})}var $t=.5,qt=4/3;function Qt(e,t,n){let i=t.x-e.x,o=t.y-e.y,r=Math.hypot(i,o);if(r<=1e-9)return{kind:"line",end:{...t}};let s=-o/r,l=i/r,m=n*qt;return{kind:"bezier",control1:{x:e.x+i/3+s*m,y:e.y+o/3+l*m},control2:{x:e.x+i*2/3+s*m,y:e.y+o*2/3+l*m},end:{...t}}}function Jt(e,t){let{points:n,sourceIndex:i}=Wt(e),o=n.length;if(o<3)return null;let r=Math.min(100,Math.max(0,t.cornerSmoothing??0))/100,s=t.edgeCurvature,l=new Array(o).fill(0);if(s?.length)for(let g=0;g<o;g+=1){let M=s[i[g]];l[g]=Number.isFinite(M)?Math.min(100,Math.max(-100,M))/100:0}let m=l.some(g=>Math.abs(g)>1e-6);if(r<=0&&!m)return null;let a=t.wideAngleThresholdDeg??zt(r),c=[];for(let g=0;g<o;g+=1)c[g]=k(n[g],n[(g+1)%o]);let u=new Array(o).fill(0);for(let g=0;g<o;g+=1){let M=n[(g-1+o)%o],b=n[g],x=n[(g+1)%o],w={x:M.x-b.x,y:M.y-b.y},v={x:x.x-b.x,y:x.y-b.y},P=Math.hypot(w.x,w.y),A=Math.hypot(v.x,v.y);if(P<=1e-9||A<=1e-9)continue;let C=Math.min(1,Math.max(-1,(w.x*v.x+w.y*v.y)/(P*A))),R=Math.acos(C)*180/Math.PI;if(R<a)continue;let T=Xe((R-a)/(180-a));u[g]=r*T*.5*Math.min(P,A)}for(let g=0;g<o;g+=1){let M=(g+1)%o,b=u[g]+u[M];if(b>c[g]&&b>1e-9){let x=c[g]/b;u[g]*=x,u[M]*=x}}let h=new Array(o),d=new Array(o);for(let g=0;g<o;g+=1){let M=n[(g-1+o)%o],b=n[g],x=n[(g+1)%o];if(u[g]<=1e-6){h[g]={...b},d[g]={...b};continue}let w=k(b,M)||1,v=k(b,x)||1;h[g]={x:b.x+(M.x-b.x)/w*u[g],y:b.y+(M.y-b.y)/w*u[g]},d[g]={x:b.x+(x.x-b.x)/v*u[g],y:b.y+(x.y-b.y)/v*u[g]}}if(u.every(g=>g<=1e-6)&&!m)return null;let p=[],f={...d[0]},y=f,S=(g,M)=>{if(k(y,g)<=1e-9)return;let b=l[M];Math.abs(b)>1e-6?p.push(Qt(y,g,b*$t*c[M])):p.push({kind:"line",end:{...g}}),y=g};for(let g=1;g<=o;g+=1){let M=g%o,b=n[M];S(h[M],(g-1)%o),u[M]>1e-6&&k(h[M],d[M])>1e-9&&(p.push({kind:"bezier",control1:L(h[M],b,Be),control2:L(d[M],b,Be),end:{...d[M]}}),y=d[M])}if(!p.length)return null;let E=p[p.length-1];k(E.end,f)>1e-9&&(E.kind==="line"?E.end={...f}:p.push({kind:"line",end:{...f}}));let I={version:1,closed:!0,start:f,segments:p};return ze(I)?I:null}function No(e){let t=[],n=e.start;for(let o of e.segments)t.push(n),n=o.end;let i=[];for(let o=e.segments.length-1;o>=0;o-=1){let r=e.segments[o],s=t[o];r.kind==="line"?i.push({kind:"line",end:{...s}}):r.kind==="arc"?i.push({kind:"arc",center:{...r.center},radius:r.radius,clockwise:!r.clockwise,end:{...s}}):i.push({kind:"bezier",control1:{...r.control2},control2:{...r.control1},end:{...s}})}return{version:1,closed:!0,start:{...e.start},segments:i}}function Lo(e,t,n){let i=[];for(let o=0;o<e.length-1;o+=1){let r=e[o],s=e[o+1],l=Math.hypot(s.x-r.x,s.y-r.y);if(l<=0)continue;let m=Math.max(1,Math.round(l/n)),a=l/m,c=Math.atan2(s.y-r.y,s.x-r.x),u=o===0,d=(o>0?t[o-1]:void 0)==="break"?2:1,p=u?{...r}:{x:r.x+Math.cos(c)*a*d,y:r.y+Math.sin(c)*a*d},f=u?m+1:Math.max(1,m-(d-1));i.push({origin:p,rotation:c*180/Math.PI,seatCount:f,seatSpacing:a})}return i}function Fo(e){let t=e.rotation*Math.PI/180,n={x:Math.cos(t),y:Math.sin(t)};return Array.from({length:e.seatCount},(i,o)=>({x:e.origin.x+n.x*o*e.seatSpacing,y:e.origin.y+n.y*o*e.seatSpacing}))}function Do(e){return e.reduce((t,n)=>t+n.seatCount,0)}function $e(e){let t=new Map,n=new Map;for(let i of e){if(i.type!=="row"||!i.segmentedRow)continue;let o=n.get(i.segmentedRow.groupId)??[];o.push(i),n.set(i.segmentedRow.groupId,o)}for(let[i,o]of n){let r=o.slice().sort((h,d)=>h.segmentedRow.componentIndex-d.segmentedRow.componentIndex),s=r[0]?.segmentedRow?.componentCount??0,l=r[0]?.segmentedRow;if(!l||!(s>=2&&r.length===s&&l?.boundaryBefore==="start"&&r.every((h,d)=>h.segmentedRow?.kind==="segmented-row-v1"&&h.segmentedRow.groupId===i&&h.segmentedRow.componentCount===s&&h.segmentedRow.componentIndex===d&&h.segmentedRow.repeatLabelOnComponents===l.repeatLabelOnComponents&&(d===0?h.segmentedRow.boundaryBefore==="start":h.segmentedRow.boundaryBefore!=="start")&&h.segmentedRow.displayLabel===l.displayLabel)))continue;let a=r.reduce((h,d)=>h+d.seatCount,0),c=0,u=0;for(let h of r)h.segmentedRow.boundaryBefore==="break"&&(c+=1),t.set(h.id,{groupId:i,adjacencyOffset:c,displayOffset:u,displayLabel:l.displayLabel,totalSeats:a,canonical:r[0],viewFromSeatUrl:l.viewFromSeatUrl,viewFromSeatMeta:l.viewFromSeatMeta,confidenceEvidence:l.confidenceEvidence}),c+=h.seatCount,u+=h.seatCount}return t}var q=.02291666666666667,Ho=1/q,Zt=58,en=Zt*q,qe=0,Je=3,Qe=0,pe=120,tn=0,nn=45,on=7,Q=1.2;function be(e,t,n,i){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):i}function Uo(e){return Number.isFinite(e)?Math.max(qe,Math.min(Je,Math.round(e))):qe}function rn(e){return!Number.isFinite(e)||!Number.isInteger(e)||e<0?0:e<=on?e:Je}function Ze(e,t={}){let n=be(t.floorBaseHeightM,Qe,pe,0),i=Math.min(pe,n+rn(e.elevation)*en),o=e.height===void 0?i:be(e.height,Qe,pe,i),r=be(e.rake,tn,nn,0);return{height:o,rake:r}}function et(e){let t=e.length;return t<=3?[...e]:[e[Math.floor(t*.25)],e[Math.floor(t*.5)],e[Math.floor(t*.75)]]}function tt(e,t,n){if(!e.length)return 1/0;if(e.length===1)return Math.hypot(t-e[0].x,n-e[0].y);let i=1/0;for(let o=0;o+1<e.length;o++){let r=e[o],s=e[o+1],l=s.x-r.x,m=s.y-r.y,a=l*l+m*m,c=a>1e-12?((t-r.x)*l+(n-r.y)*m)/a:0;c<0?c=0:c>1&&(c=1);let u=t-(r.x+c*l),h=n-(r.y+c*m);if(Math.abs(u)>=i||Math.abs(h)>=i)continue;let d=Math.hypot(u,h);d<i&&(i=d)}return i}function sn(e){let t=0,n=0;for(let r of e)t+=r.x,n+=r.y;let i=e.length||1;t/=i,n/=i;let o=0;for(let r of e){let s=Math.hypot(r.x-t,r.y-n);s>o&&(o=s)}return{cx:t,cy:n,r:o}}function nt(e,t){return Math.hypot(e.cx-t.cx,e.cy-t.cy)-e.r-t.r}function ye(e,t){let n=1/0;for(let i of et(e)){let o=tt(t,i.x,i.y);o<n&&(n=o)}for(let i of et(t)){let o=tt(e,i.x,i.y);o<n&&(n=o)}return n}function an(e,t){if(e.length<3)return{pts:e,seatIndices:t};let n=0,i=0;for(let c of e)n+=c.x,i+=c.y;n/=e.length,i/=e.length;let o=-1,r=e[0];for(let c of e){let u=Math.hypot(c.x-n,c.y-i);u>o&&(o=u,r=c)}let s=r.x-n,l=r.y-i,m=Math.hypot(s,l);m>1e-9?(s/=m,l/=m):(s=1,l=0);let a=e.map((c,u)=>({p:c,i:u,t:(c.x-n)*s+(c.y-i)*l})).sort((c,u)=>c.t-u.t);return{pts:a.map(c=>c.p),seatIndices:a.map(c=>t[c.i])}}function cn(e){let t=e.length;if(t<3)return null;let n=0,i=0;for(let E of e)n+=E.x,i+=E.y;n/=t,i/=t;let o=0,r=0,s=0,l=0,m=0,a=0,c=0;for(let E of e){let I=E.x-n,g=E.y-i;o+=I*I,s+=g*g,r+=I*g,l+=I*I*I,m+=g*g*g,a+=I*g*g,c+=g*I*I}let u=o*s-r*r;if(Math.abs(u)<1e-9)return null;let h=(l+a)/2,d=(m+c)/2,p=(h*s-d*r)/u,f=(d*o-h*r)/u,y=p+n,S=f+i;return!Number.isFinite(y)||!Number.isFinite(S)?null:{cx:y,cy:S}}var ln=.15;function un(e){if(e.length<2)return null;let t=e.map(E=>{let I=0,g=0;for(let M of E.pts)I+=M.x,g+=M.y;return{x:I/E.pts.length,y:g/E.pts.length}}),n=0,i=0;for(let E of t)n+=E.x,i+=E.y;n/=t.length,i/=t.length;let o=0,r=0,s=0;for(let E of t){let I=E.x-n,g=E.y-i;o+=I*I,r+=I*g,s+=g*g}let l=o+s,m=o*s-r*r,a=l/2+Math.sqrt(Math.max(0,l*l/4-m)),c,u;Math.abs(r)>1e-12?(c=a-s,u=r):o>=s?(c=1,u=0):(c=0,u=1);let h=Math.hypot(c,u);if(!(h>1e-12))return null;c/=h,u/=h;let d=1/0,p=-1/0,f=[];for(let E of e){let I=1/0,g=-1/0;for(let M of E.pts){let b=M.x*c+M.y*u;b<I&&(I=b),b>g&&(g=b),b<d&&(d=b),b>p&&(p=b)}f.push(g-I)}let y=p-d;return y>1e-9?(f.sort((E,I)=>E-I),f[Math.min(f.length-1,Math.floor(f.length*.9))]/y<=dn?{x:c,y:u}:null):null}var dn=.35;function ot(e,t,n,i){let o=new Map;for(let b of n){let x=t[b],w=x.rowId||`__seat-${b}`,v=o.get(w);v||(v={pts:[],idx:[]},o.set(w,v)),v.pts.push({x:x.x,y:x.y}),v.idx.push(b)}if(!o.size)return{sectionId:e,rows:[],blockCount:0};let r=[];for(let[b,x]of o){let w=an(x.pts,x.idx),v=0;for(let P of w.pts)v+=Math.hypot(P.x-i.x,P.y-i.y);r.push({id:b,pts:w.pts,seatIndices:w.seatIndices,blockId:-1,ordinal:0,blockDepth:0,focalDistance:v/w.pts.length})}let s=r.map(b=>sn(b.pts)),l=r.length<=256?r.length*(r.length-1)/2:0,m=l?new Float64Array(l):null;m?.fill(Number.NaN);let a=m?new Map(r.map((b,x)=>[b,x])):null,c=(b,x)=>(b>x&&([b,x]=[x,b]),b*(2*r.length-b-1)/2+(x-b-1)),u=(b,x)=>{if(!m)return ye(r[b].pts,r[x].pts);let w=c(b,x),v=m[w];if(!Number.isNaN(v))return v;let P=ye(r[b].pts,r[x].pts);return m[w]=P,P},h=(b,x)=>a?u(a.get(b),a.get(x)):ye(b.pts,x.pts),d=[];for(let b=0;b<r.length;b++){let x=1/0;for(let w=0;w<r.length;w++){if(b===w||nt(s[b],s[w])>=x)continue;let v=u(b,w);v<x&&(x=v)}Number.isFinite(x)&&d.push(x)}d.sort((b,x)=>b-x);let p=d.length?d[Math.floor(d.length/2)]:1,f=Math.max(p*1.8,1e-6),y=r.map(()=>[]);for(let b=0;b<r.length;b++)for(let x=b+1;x<r.length;x++)nt(s[b],s[x])>f||u(b,x)<=f&&(y[b].push(x),y[x].push(b));let S=0;for(let b=0;b<r.length;b++){if(r[b].blockId!==-1)continue;let x=S++,w=[b];for(r[b].blockId=x;w.length;){let v=w.pop();for(let P of y[v])r[P].blockId===-1&&(r[P].blockId=x,w.push(P))}}let E=new Map;for(let b of r){let x=E.get(b.blockId)??[];x.push(b),E.set(b.blockId,x)}let I=[];for(let b of r){if(b.pts.length<4)continue;let x=cn(b.pts);x&&(!Number.isFinite(x.cx)||!Number.isFinite(x.cy)||I.push({x:x.cx,y:x.cy}))}let g=I.length>=2?(()=>{let b=I.map(v=>v.x).sort((v,P)=>v-P),x=I.map(v=>v.y).sort((v,P)=>v-P),w=Math.floor(I.length/2);return{cx:b[w],cy:x[w]}})():null;if(g){let b=C=>Math.hypot(C.x-g.cx,C.y-g.cy),x=1/0,w=-1/0,v=[];for(let C of r){let R=1/0,T=-1/0;for(let N of C.pts){let O=b(N);O<R&&(R=O),O>T&&(T=O)}v.push(T-R),R<x&&(x=R),T>w&&(w=T)}let P=w-x;v.sort((C,R)=>C-R);let A=v[Math.min(v.length-1,Math.floor(v.length*.9))];if(P>1e-9&&A/P<=ln){let C=r.map(_=>{let ne=0;for(let xt of _.pts)ne+=b(xt);return{row:_,radius:ne/_.pts.length}}),R=0,T=0;for(let _ of C)R+=_.radius,T+=_.row.focalDistance;R/=C.length,T/=C.length;let N=0;for(let _ of C)N+=(_.radius-R)*(_.row.focalDistance-T);if(N<0)for(let _ of C)_.radius=-_.radius;let j=1/0;for(let _ of C)_.radius<j&&(j=_.radius);C.sort((_,ne)=>_.radius-ne.radius);let V=-1,B=-1/0,gt=P/Math.max(1,C.length)*.5,Ee=[];for(let _ of C)_.radius-B>gt&&(V++,B=_.radius),_.row.ordinal=V,_.row.blockDepth=_.radius-j,Ee.push(_.row);return{sectionId:e,rows:Ee,blockCount:S}}}let M=[];for(let[,b]of E){let x=un(b);if(x){let w=P=>{let A=0;for(let C of P.pts)A+=C.x*x.x+C.y*x.y;return A/P.pts.length};b.sort((P,A)=>w(P)-w(A)),b.length>=2&&b[0].focalDistance>b[b.length-1].focalDistance&&b.reverse();let v=0;for(let P=0;P<b.length;P++)P>0&&(v+=h(b[P-1],b[P])),b[P].ordinal=P,b[P].blockDepth=v,M.push(b[P])}else{let w=1/0;for(let v of b)v.focalDistance<w&&(w=v.focalDistance);b.sort((v,P)=>v.focalDistance-P.focalDistance);for(let v=0;v<b.length;v++)b[v].ordinal=v,b[v].blockDepth=Math.max(0,b[v].focalDistance-w),M.push(b[v])}}return{sectionId:e,rows:M,blockCount:S}}var Xo=[{key:"rect",label:"Flat stage",blurb:"Classic proscenium box."},{key:"rounded",label:"Rounded",blurb:"Softened corners."},{key:"arc",label:"Curved front",blurb:"Front edge bows toward the audience."},{key:"thrust",label:"Thrust (T)",blurb:"Central tongue projects into the crowd."},{key:"runway",label:"Runway",blurb:"Long catwalk into the audience."},{key:"round",label:"In the round",blurb:"Central platform, audience all around."},{key:"pitch-football",label:"Football pitch",blurb:"105 \xD7 68 m pitch with centre circle and penalty boxes."},{key:"rink-hockey",label:"Hockey rink",blurb:"60 \xD7 30 m ice rink with blue lines and faceoff circles."},{key:"track-athletics",label:"Athletics track",blurb:"400 m track: two straights, two semicircles, eight lanes."},{key:"oval-cricket",label:"Cricket oval",blurb:"~150 \xD7 140 m oval with boundary rope and pitch strip."},{key:"pitch-rugby",label:"Rugby pitch",blurb:"100 \xD7 70 m field of play with in-goal areas, 22 m and 10 m lines."},{key:"diamond-baseball",label:"Baseball field",blurb:"Diamond, infield, mound and foul lines out to 99 m poles."},{key:"court-basketball",label:"Basketball court",blurb:"28 \xD7 15 m court with keys and three-point lines."},{key:"court-tennis",label:"Tennis court",blurb:"23.77 \xD7 10.97 m doubles court with run-off and net."},{key:"ring-boxing",label:"Boxing ring",blurb:"Raised ring, 6.1 m inside the ropes, coloured corners."}],fn=new Set(["pitch-football","rink-hockey","track-athletics","oval-cricket","pitch-rugby","diamond-baseball","court-basketball","court-tennis","ring-boxing"]),hn=new Set(["pitch-football","track-athletics","oval-cricket","pitch-rugby","diamond-baseball"]);function mn(e){return!!e&&fn.has(e)}function Bo(e){return!!e&&hn.has(e)}var it=1.1,pn={"pitch-football":{width:105,height:68},"rink-hockey":{width:60,height:30},"track-athletics":{width:176.9,height:92.5},"oval-cricket":{width:150,height:140},"pitch-rugby":{width:120,height:70},"diamond-baseball":{width:140,height:140},"court-basketball":{width:32,height:19},"court-tennis":{width:36.57,height:18.29},"ring-boxing":{width:7.8,height:7.8}},bn={"pitch-football":"#2f7d4f","rink-hockey":"#e8f1f8","track-athletics":"#a4472f","oval-cricket":"#3d8a53","pitch-rugby":"#2f7d4f","diamond-baseball":"#2f7d4f","court-basketball":"#c8894f","court-tennis":"#3f7a5a","ring-boxing":"#2a4d8f"};var rt=Math.PI*2;function st(e,t,n,i,o,r){return{x:o+e*n-t*i,y:r+e*i+t*n}}function Yo(e){let{kind:t,cx:n,cy:i,width:o,height:r}=e,s=(e.rotation??0)*Math.PI/180,l=Math.cos(s),m=Math.sin(s),a=o/2,c=r/2,u=[],h=(d,p)=>{u.push({x:d,y:p})};switch(t){case"rect":{h(-a,-c),h(a,-c),h(a,c),h(-a,c);break}case"rounded":{let d=Math.min(o,r)*.18,p=5,f=(y,S,E)=>{for(let I=0;I<=p;I++){let g=E+I/p*(Math.PI/2);h(y+d*Math.cos(g),S+d*Math.sin(g))}};f(a-d,-c+d,-Math.PI/2),f(a-d,c-d,0),f(-a+d,c-d,Math.PI/2),f(-a+d,-c+d,Math.PI);break}case"arc":{let d=r*.45;h(-a,-c),h(a,-c);let p=24;for(let f=0;f<=p;f++){let y=f/p,S=a-y*o,E=c+d*(1-Math.pow(2*S/o,2));h(S,E)}break}case"thrust":{let d=o*.18,p=r*1.1;h(-a,-c),h(a,-c),h(a,c),h(d,c),h(d,c+p),h(-d,c+p),h(-d,c),h(-a,c);break}case"runway":{let d=o*.1,p=r*3;h(-a,-c),h(a,-c),h(a,c),h(d,c),h(d,c+p),h(-d,c+p),h(-d,c),h(-a,c);break}case"round":case"oval-cricket":{for(let p=0;p<40;p++){let f=p/40*rt;h(a*Math.cos(f),c*Math.sin(f))}break}case"pitch-football":case"pitch-rugby":case"court-basketball":case"court-tennis":case"ring-boxing":{h(-a,-c),h(a,-c),h(a,c),h(-a,c);break}case"diamond-baseball":{for(let d of gn(a,c))h(d.x,d.y);break}case"rink-hockey":{for(let d of yn(a,c,a*(8.5/60),c*(8.5/30)))h(d.x,d.y);break}case"track-athletics":{for(let d of ge(a,c))h(d.x,d.y);break}}return u.map(d=>st(d.x,d.y,l,m,n,i))}function yn(e,t,n,i){let o=[],s=(l,m,a)=>{for(let c=0;c<=8;c++){let u=a+c/8*(Math.PI/2);o.push({x:l+n*Math.cos(u),y:m+i*Math.sin(u)})}};return s(e-n,-t+i,-Math.PI/2),s(e-n,t-i,0),s(-e+n,t-i,Math.PI/2),s(-e+n,-t+i,Math.PI),o}function ge(e,t){let n=Math.max(0,e-t),i=[],o=20;for(let r=0;r<=o;r++){let s=-Math.PI/2+r/o*Math.PI;i.push({x:n+t*Math.cos(s),y:t*Math.sin(s)})}for(let r=0;r<=o;r++){let s=Math.PI/2+r/o*Math.PI;i.push({x:-n+t*Math.cos(s),y:t*Math.sin(s)})}return i}var X=(()=>{let t={x:0,y:52},n=25,i={x:70,y:t.y-70},o=(i.x*i.x+i.y*i.y-4900)/(2*(i.y+70)),r=o+70,s=[],l=Math.atan2(i.y-o,i.x),m=Math.atan2(i.y-o,-i.x);for(let a=0;a<=24;a++){let c=l+(m-l)*a/24;s.push({x:r*Math.cos(c),y:o+r*Math.sin(c)})}return{half:70,home:t,backstop:n,fence:s}})();function gn(e,t){let n=e/X.half,i=t/X.half;return[{x:-X.backstop*n,y:t},{x:X.backstop*n,y:t},...X.fence.map(o=>({x:o.x*n,y:o.y*i}))]}var xn="#f1f5f9";function xe(e){return mn(e)}function G(e,t,n,i,o=32){let r=[];for(let s=0;s<o;s++){let l=s/o*rt;r.push({x:e+n*Math.cos(l),y:t+i*Math.sin(l)})}return r}function U(e,t,n,i){return[{x:e-n,y:t-i},{x:e+n,y:t-i},{x:e+n,y:t+i},{x:e-n,y:t+i}]}function Mn(e){let{kind:t,cx:n,cy:i,width:o,height:r}=e,s=(e.rotation??0)*Math.PI/180,l=Math.cos(s),m=Math.sin(s),a=o/2,c=r/2,u=[],h=pn[t],d=f=>h?f/h.width*o:0,p=f=>h?f/h.height*r:0;switch(t){case"pitch-football":{u.push({points:[{x:0,y:-c},{x:0,y:c}],closed:!1}),u.push({points:G(0,0,d(9.15),p(9.15)),closed:!0});for(let f of[-1,1])u.push({points:U(f*(a-d(16.5)/2),0,d(16.5)/2,p(40.32)/2),closed:!0}),u.push({points:U(f*(a-d(5.5)/2),0,d(5.5)/2,p(18.32)/2),closed:!0});break}case"rink-hockey":{u.push({points:[{x:0,y:-c},{x:0,y:c}],closed:!1,ink:"#d63b3b"});for(let f of[-1,1]){u.push({points:[{x:f*d(7.5),y:-c},{x:f*d(7.5),y:c}],closed:!1,ink:"#2f6ecb"}),u.push({points:[{x:f*(a-d(4)),y:-p(11)},{x:f*(a-d(4)),y:p(11)}],closed:!1,ink:"#d63b3b"});for(let y of[-1,1])u.push({points:G(f*d(20.5),y*p(7),d(4.5),p(4.5)),closed:!0,ink:"#2f6ecb"})}u.push({points:G(0,0,d(4.5),p(4.5)),closed:!0,ink:"#2f6ecb"});break}case"track-athletics":{let y=c-p(1.22)*8;y>0&&u.push({points:ge(a-d(1.22)*8,y),closed:!0,fill:"#2f7d4f"});for(let S=1;S<8;S++){let E=p(1.22)*S,I=c-E;if(I<=0)break;u.push({points:ge(a-d(1.22)*S,I),closed:!0})}break}case"oval-cricket":{u.push({points:G(0,0,d(27.4),p(27.4+20.12/2),40),closed:!0}),u.push({points:U(0,0,d(3.05)/2,p(20.12)/2),closed:!0,ink:"#d8cfae"});break}case"pitch-rugby":{let f=y=>({points:[{x:d(y),y:-c},{x:d(y),y:c}],closed:!1});u.push(f(0));for(let y of[-1,1]){u.push(f(y*50),f(y*28));for(let S=-35;S<35;S+=4)u.push({points:[{x:d(y*10),y:p(S)},{x:d(y*10),y:p(Math.min(35,S+2))}],closed:!1})}break}case"diamond-baseball":{let f=(O,j)=>({x:d(O),y:p(j)}),{home:y}=X,S=27.43,E=S/Math.SQRT2,I={x:y.x+E,y:y.y-E},g={x:y.x,y:y.y-2*E},M={x:y.x-E,y:y.y-E},b={x:y.x,y:y.y-18.44},x="#b98a59",w=bn["diamond-baseball"],v=38.94,P=[f(y.x,y.y)],A=Math.atan2(y.y-v/Math.SQRT2-b.y,v/Math.SQRT2),C=Math.PI-A;for(let O=0;O<=16;O++){let j=A-(A+Math.PI*2-C)%(Math.PI*2)*(O/16);P.push(f(b.x+29*Math.cos(j),b.y+29*Math.sin(j)))}u.push({points:P,closed:!0,fill:x,ink:x});let R={x:y.x,y:y.y-E},T=[{x:y.x,y:y.y},I,g,M].map(O=>f(R.x+(O.x-R.x)*.84,R.y+(O.y-R.y)*.84));u.push({points:T,closed:!0,fill:w,ink:w}),u.push({points:G(d(b.x),p(b.y),d(2.74),p(2.74),20),closed:!0,fill:x,ink:x}),u.push({points:G(d(y.x),p(y.y),d(3.96),p(3.96),20),closed:!0,fill:x,ink:x});let N=X.fence;u.push({points:[f(y.x,y.y),f(N[0].x,N[0].y)],closed:!1}),u.push({points:[f(y.x,y.y),f(N[N.length-1].x,N[N.length-1].y)],closed:!1});for(let O of[I,g,M])u.push({points:U(d(O.x),p(O.y),d(.3),p(.3)),closed:!0,fill:xn});break}case"court-basketball":{u.push({points:U(0,0,d(14),p(7.5)),closed:!0}),u.push({points:[{x:0,y:-p(7.5)},{x:0,y:p(7.5)}],closed:!1}),u.push({points:G(0,0,d(1.8),p(1.8),24),closed:!0});for(let f of[-1,1]){let y=f*14,S=f*(14-5.8),E=f*(14-1.575);u.push({points:U(d((y+S)/2),0,d(2.9),p(2.45)),closed:!0,fill:"#2f5d8a"}),u.push({points:G(d(S),0,d(1.8),p(1.8),24),closed:!0});let I=Math.sqrt(6.75*6.75-6.6*6.6),g=[{x:d(y),y:-p(6.6)}],M=Math.atan2(-6.6,-f*I),b=2*Math.atan2(6.6,I);for(let x=0;x<=16;x++){let w=M-f*b*(x/16);g.push({x:d(E+6.75*Math.cos(w)),y:p(6.75*Math.sin(w))})}g.push({x:d(y),y:p(6.6)}),u.push({points:g,closed:!1})}break}case"court-tennis":{u.push({points:U(0,0,d(11.885),p(5.485)),closed:!0,fill:"#2b5f99"});for(let f of[-1,1])u.push({points:[{x:-d(11.885),y:f*p(4.115)},{x:d(11.885),y:f*p(4.115)}],closed:!1}),u.push({points:[{x:f*d(6.4),y:-p(4.115)},{x:f*d(6.4),y:p(4.115)}],closed:!1});u.push({points:[{x:-d(6.4),y:0},{x:d(6.4),y:0}],closed:!1}),u.push({points:[{x:0,y:-p(6.4)},{x:0,y:p(6.4)}],closed:!1,ink:"#d1d5db"});break}case"ring-boxing":{u.push({points:U(0,0,d(3.05),p(3.05)),closed:!0});let S=[[-1,-1,"#c53030"],[1,1,"#2b6cb0"],[1,-1,"#e2e8f0"],[-1,1,"#e2e8f0"]];for(let[E,I,g]of S)u.push({points:U(E*d(3.05),I*p(3.05),d(.3),p(.3)),closed:!0,fill:g,ink:g});break}default:return[]}return u.map(f=>({...f,points:f.points.map(y=>st(y.x,y.y,l,m,n,i))}))}function zo(e){if(e.role!=="stage"||!xe(e.stageKind))return[];let t=null;if(e.x!=null&&e.y!=null&&e.width!=null&&e.height!=null&&e.width>0&&e.height>0&&[e.x,e.y,e.width,e.height].every(Number.isFinite))t={cx:e.x+e.width/2,cy:e.y+e.height/2,width:e.width,height:e.height};else if(e.points&&e.points.length>=3&&e.points.every(n=>Number.isFinite(n.x)&&Number.isFinite(n.y))){let n=e.points.map(c=>c.x),i=e.points.map(c=>c.y),o=Math.min(...n),r=Math.max(...n),s=Math.min(...i),l=Math.max(...i),m=Math.max(1,r-o),a=Math.max(1,l-s);t={cx:o+m/2,cy:s+a/2,width:m,height:a}}return t?Mn({kind:e.stageKind,...t}):[]}function Sn(e){if((e.kind==="polygon"||e.kind==="polyline"||e.kind==="line")&&e.points&&e.points.length>=2)return e.points;if(e.x==null||e.y==null||e.width==null||e.height==null)return null;let t=e.x,n=e.y,i=e.width,o=e.height;return[{x:t,y:n},{x:t+i,y:n},{x:t+i,y:n+o},{x:t,y:n+o}]}function vn(e,t,n){let i=n*Math.PI/180,o=Math.cos(i),r=Math.sin(i),s=e.x-t.x,l=e.y-t.y;return{x:t.x+s*o-l*r,y:t.y+s*r+l*o}}function at(e){let t=Sn(e);if(!t||t.length<2)return null;let n=e.rotation??0,i=Math.abs(n)<1e-6?t:t.map(m=>vn(m,{x:t.reduce((a,c)=>a+c.x,0)/t.length,y:t.reduce((a,c)=>a+c.y,0)/t.length},n)),o=1/0,r=1/0,s=-1/0,l=-1/0;for(let m of i)o=Math.min(o,m.x),r=Math.min(r,m.y),s=Math.max(s,m.x),l=Math.max(l,m.y);return!Number.isFinite(o)||s-o<1e-6||l-r<1e-6?null:{minX:o,minY:r,maxX:s,maxY:l}}var wn=5,En=3,In=.92,Pn=1.9,Cn=2,_n=.6,kn=1,Rn=.06;function Tn(e){return e.heightM!==void 0?e.heightM:e.stageKind==="ring-boxing"?it:xe(e.stageKind)?Rn:kn}function ct(e){let t=1/0,n=1/0,i=-1/0,o=-1/0,r=-1/0;for(let s of Me(e)){let l=s.baseHeightM??0;for(let m of s.objects){if(m.type!=="shape"||m.role!=="stage")continue;let a=at(m);a&&(t=Math.min(t,a.minX),n=Math.min(n,a.minY),i=Math.max(i,a.maxX),o=Math.max(o,a.maxY),r=Math.max(r,l+Tn(m)))}}return!Number.isFinite(t)||!Number.isFinite(r)?null:{minX:t,minY:n,maxX:i,maxY:o,deckTopM:r}}function On(e,t,n,i){let o=1/0,r=1/0,s=-1/0,l=-1/0;for(let d of e)Number.isFinite(d.eyeHeightM)&&(o=Math.min(o,d.x),s=Math.max(s,d.x),r=Math.min(r,d.y),l=Math.max(l,d.y));if(!Number.isFinite(o))return null;let m=o*t,a=r*t,c=Math.max(1,Math.ceil((s-o)*t/n)+1),u=Math.max(1,Math.ceil((l-r)*t/n)+1),h=new Float64Array(c*u).fill(-1/0);for(let d of e){if(!Number.isFinite(d.eyeHeightM))continue;let p=d.eyeHeightM-Q,f=Math.min(c-1,Math.max(0,Math.floor((d.x*t-m)/n))),S=Math.min(u-1,Math.max(0,Math.floor((d.y*t-a)/n)))*c+f,E=p+i;E>h[S]&&(h[S]=E)}return{cellM:n,minX:m,minY:a,cols:c,rows:u,top:h}}function An(e,t,n){let i=Math.floor((t-e.minX)/e.cellM),o=Math.floor((n-e.minY)/e.cellM);return i<0||o<0||i>=e.cols||o>=e.rows?-1/0:e.top[o*e.cols+i]}function lt(e,t,n={}){let i=new Map;if(!t||!e.length)return i;let o=n.metresPerChartUnit??q,r=n.cellM??_n,s=n.chairBackM??In,l=n.selfRowSkipM??Cn,m=n.clearThreshold??.9,a=n.partialThreshold??.25,c=Math.max(1,n.columns??wn),u=Math.max(1,n.rows??En),h=On(e,o,r,s);if(!h)return i;let d=(t.maxX-t.minX)*o,p=(t.maxY-t.minY)*o,f=d>=p,y=(t.minX+t.maxX)/2*o,S=(t.minY+t.maxY)/2*o,E=[];for(let g=0;g<c;g++){let M=(g+.5)/c-.5,b=f?y+M*d:y,x=f?S:S+M*p;for(let w=0;w<u;w++){let v=t.deckTopM+(u===1?0:w/(u-1)*Pn);E.push({x:b,y:x,z:v})}}let I=r/2;for(let g of e){if(!Number.isFinite(g.eyeHeightM))continue;let M=g.x*o,b=g.y*o,x=g.eyeHeightM,w=0,v=1/0;for(let A of E){let C=A.x-M,R=A.y-b,T=Math.hypot(C,R);if(!(T>l)){w++;continue}let N=C/T,O=R/T,j=0;for(let V=l;V<T;V+=I){let B=An(h,M+N*V,b+O*V);if(!(!Number.isFinite(B)||B>=x)&&B>x+(A.z-x)*V/T){j=V;break}}j?v=Math.min(v,j):w++}let P=w/E.length;P>=m||i.set(g.id,{seatId:g.id,mark:P<a?"obstructedView":"restrictedView",visibleFraction:P,totalRays:E.length,atDistanceM:Number.isFinite(v)?v:0})}return i}function ut(e,t){if(!t.size)return 0;let n=0;for(let i of e){let o=t.get(i.id);if(!o)continue;let r=i.commercial;r?.restrictedView!==void 0||r?.obstructedView!==void 0||(i.commercial={...r,[o.mark]:!0},n++)}return n}function Se(e){return e?e.accessibility?.length?e.wheelchairSpaceType&&!e.accessibility.includes("wheelchair")?["wheelchair",...e.accessibility]:e.accessibility:e.wheelchairSpaceType?["wheelchair"]:e.accessible?["wheelchair"]:[]:[]}var se=Math.PI/180,Nn=9,J=16;function ve(e,t,n,i){let o=n*se,r=Math.cos(o),s=Math.sin(o);return{x:i.x+e*r-t*s,y:i.y+e*s+t*r}}function we(e){let{seatCount:t,seatSpacing:n,curve:i,rotation:o,origin:r}=e,s=[];if(e.path)return Fe(e.path,t);if(t<=1)return t===1&&s.push({x:r.x,y:r.y}),s;if(i===0){for(let a=0;a<t;a++)s.push(ve(a*n,0,o,r));return s}let l=i/(t-1)*se,m=n/(2*Math.sin(Math.abs(l)/2));for(let a=0;a<t;a++){let c=a*l,u=m*Math.sin(c),h=-m+m*Math.cos(c);s.push(ve(u,h,o,r))}return s}function pt(e){let t=new Map;if(e.overrides)for(let n of e.overrides)t.set(n.index,n);return t}function pi(e){let t=new Set((e.overrides??[]).filter(n=>n.skip&&Number.isInteger(n.index)&&n.index>=0&&n.index<e.seatCount).map(n=>n.index));return Math.max(0,e.seatCount-t.size)}function jn(e,t){let n=pt(e);return we(e).map((i,o)=>{let r=n.get(o),s=Se(r),l=Ie(e,o,r),m={...e.commercial,...r?.commercial};return{index:o,x:i.x+(r?.dx??0),y:i.y+(r?.dy??0),label:l,displayLabel:ce(e,o,t,r),categoryKey:r?.categoryKey??e.categoryKey,skipped:!!r?.skip,accessible:s.length>0,accessibility:s,wheelchairSpaceType:r?.wheelchairSpaceType,commercial:Object.values(m).some(a=>a!==void 0&&a!==!1&&a!=="")?m:void 0,glyph:r?.glyph,viewUrl:r?.viewFromSeatUrl??e.viewFromSeatUrl,viewMeta:r?.viewFromSeatUrl?r.viewFromSeatMeta:e.viewFromSeatMeta,labelStyle:r?.labelStyle??e.seatLabelStyle}})}function Ln(e){let t=[];for(let n of jn(e))n.skipped||t.push({id:`${e.id}:${n.index}`,label:n.label,displayLabel:n.displayLabel===n.label?void 0:n.displayLabel,x:n.x,y:n.y,rowId:e.id,categoryKey:n.categoryKey,accessible:n.accessible||void 0,accessibility:n.accessibility.length?n.accessibility:void 0,wheelchairSpaceType:n.wheelchairSpaceType,commercial:n.commercial,glyph:n.glyph,viewUrl:n.viewUrl,viewMeta:n.viewMeta,labelStyle:n.labelStyle});return t}function Fn(e){if(e.seatCountsBySide)return{...e.seatCountsBySide};let t=e.sides&&e.sides.length?e.sides:["top","bottom"],n=["top","bottom","left","right"].filter(r=>t.includes(r)),i={top:0,bottom:0,left:0,right:0};if(!n.length)return i;let o=Math.max(0,Math.round(e.seatCount));for(let r=0;r<o;r++)i[n[r%n.length]]+=1;return i}function bt(e){let t=[],n=Math.max(0,Math.round(e.seatCount));if(n===0)return t;let i=new Map((e.overrides??[]).map(c=>[c.index,c])),o=(c,u,h,d)=>{let p=i.get(c),f=Se(p),y=p?.label??`${e.label}-${c+1}`,S=e.displayLabel??e.label;return{index:c,label:y,displayLabel:p?.displayLabel??`${S}-${c+1}`,x:u+(p?.dx??0),y:h+(p?.dy??0),categoryKey:p?.categoryKey??e.categoryKey,skipped:!!p?.skip,accessible:f.length>0,accessibility:f,wheelchairSpaceType:p?.wheelchairSpaceType,commercial:p?.commercial,glyph:p?.glyph,viewUrl:p?.viewFromSeatUrl,viewMeta:p?.viewFromSeatUrl?p.viewFromSeatMeta:void 0,labelStyle:p?.labelStyle,...d?{side:d}:{}}};if(e.shape==="round"){let c=(e.radius??40)+J,u=e.rotation*se,h=Math.max(0,Math.min(360,e.seatArc??360));if(h>=360||n===1){for(let y=0;y<n;y++){let S=u+y/n*2*Math.PI;t.push(o(y,e.center.x+c*Math.cos(S),e.center.y+c*Math.sin(S)))}return t}let d=h*se,p=(2*Math.PI-d)/2,f=u+p;for(let y=0;y<n;y++){let S=f+y/(n-1)*d;t.push(o(y,e.center.x+c*Math.cos(S),e.center.y+c*Math.sin(S)))}return t}let r=e.width??80,s=e.height??50,l=Fn(e),m=["top","bottom","left","right"],a=0;for(let c of m){let u=l[c];for(let h=0;h<u;h++){let d,p;c==="top"?(d=-r/2+(h+.5)*r/u,p=-s/2-J):c==="bottom"?(d=-r/2+(h+.5)*r/u,p=s/2+J):c==="left"?(d=-r/2-J,p=-s/2+(h+.5)*s/u):(d=r/2+J,p=-s/2+(h+.5)*s/u);let f=ve(d,p,e.rotation,e.center);t.push(o(a++,f.x,f.y,c))}}return t}function bi(e){return e.bookAsWhole||e.variableOccupancy?Math.max(0,Math.round(e.seatCount)):bt(e).filter(t=>!t.skipped).length}function Dn(e){return bt(e).filter(t=>!t.skipped).map(t=>({id:`${e.id}:${t.index}`,label:t.label,...t.displayLabel!==t.label?{displayLabel:t.displayLabel}:{},x:t.x,y:t.y,rowId:e.id,categoryKey:t.categoryKey,...t.accessible?{accessible:!0}:{},...t.accessibility.length?{accessibility:t.accessibility}:{},...t.wheelchairSpaceType?{wheelchairSpaceType:t.wheelchairSpaceType}:{},...t.commercial?{commercial:t.commercial}:{},...t.glyph?{glyph:t.glyph}:{},...t.viewUrl?{viewUrl:t.viewUrl}:{},...t.viewUrl&&t.viewMeta?{viewMeta:t.viewMeta}:{},...t.labelStyle?{labelStyle:t.labelStyle}:{}}))}function Vn(e){return[{id:`${e.id}:0`,label:e.label,...e.displayLabel&&e.displayLabel!==e.label?{displayLabel:e.displayLabel}:{},x:e.center.x,y:e.center.y,rowId:e.id,categoryKey:e.categoryKey,kind:"booth"}]}function dt(e,t){let n=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){let r=t[i].x,s=t[i].y,l=t[o].x,m=t[o].y;s>e.y!=m>e.y&&e.x<(l-r)*(e.y-s)/(m-s)+r&&(n=!n)}return n}function Hn(e,t){return t.some((n,i)=>{let o=t[(i+1)%t.length],r=(e.y-n.y)*(o.x-n.x)-(e.x-n.x)*(o.y-n.y);if(Math.abs(r)>1e-7)return!1;let s=(e.x-n.x)*(o.x-n.x)+(e.y-n.y)*(o.y-n.y),l=(o.x-n.x)**2+(o.y-n.y)**2;return s>=-1e-7&&s<=l+1e-7})}function te(e){return Array.isArray(e)?e.filter(t=>Array.isArray(t)&&t.length>=3):[]}function ae(e,t,n){return dt(e,t)&&!te(n).some(i=>dt(e,i)||Hn(e,i))}function yi(e,t){return Ge(e,t).point}function re(e){if(!e.length)return{x:0,y:0};let t=0,n=0;for(let i of e)t+=i.x,n+=i.y;return{x:t/e.length,y:n/e.length}}function yt(e){switch(e.type){case"row":{let t=we(e),n=pt(e),i=0,o=0,r=0;for(let s=0;s<t.length;s++){let l=n.get(s);l?.skip||(i+=t[s].x+(l?.dx??0),o+=t[s].y+(l?.dy??0),r++)}return r?{x:i/r,y:o/r}:{x:e.origin.x,y:e.origin.y}}case"table":case"booth":return{x:e.center.x,y:e.center.y};case"gaArea":return re(e.points);case"section":return re(e.outline);case"text":return{x:e.position.x,y:e.position.y};case"shape":return e.points&&e.points.length?re(e.points):e.x!=null&&e.y!=null&&e.width!=null&&e.height!=null?{x:e.x+e.width/2,y:e.y+e.height/2}:{x:e.x??0,y:e.y??0};case"decorImage":return{x:e.x+e.width/2,y:e.y+e.height/2}}}function ft(e,t){return e.length===t.length&&e.every((n,i)=>n.x===t[i].x&&n.y===t[i].y)}function Un(e,t){if(e.type!=="gaArea"||!ft(e.points,t.outline))return!1;let n=te(e.holes),i=te(t.holes);return n.length===i.length&&n.every((o,r)=>ft(o,i[r]))}function Kn(e,t,n=e.filter(o=>o.type==="section"),i=yt(t)){let o="referenceInventorySource"in t?t.referenceInventorySource?.logicalSectionId:void 0;return(o?n.find(s=>(s.logicalSectionId??s.id)===o&&(Un(t,s)||ae(i,s.outline,s.holes))):void 0)??n.find(s=>ae(i,s.outline,s.holes))}function Me(e){return e.floors&&e.floors.length?e.floors:[{id:"floor-0",name:"Main",objects:e.objects,focalPoint:e.focalPoint,referenceImage:e.referenceImage,backgroundImage:e.backgroundImage}]}function gi(e,t){let n=Me(e);return(t?n.find(i=>i.id===t):n[0])?.objects??[]}function Gn(e){return e.floors&&e.floors.length?e.floors.flatMap(t=>t.objects):e.objects}function Xn(e,t,n){let i=r=>({x:r.x+t,y:r.y+n}),o=r=>r.map(i);switch(e.type){case"row":return{...e,origin:i(e.origin)};case"table":case"booth":return{...e,center:i(e.center)};case"gaArea":return{...e,points:o(e.points),...e.holes?{holes:te(e.holes).map(o)}:{}};case"section":return{...e,outline:o(e.outline),...e.outlinePath?{outlinePath:We(e.outlinePath,t,n)}:{},...e.holes?{holes:te(e.holes).map(o)}:{}};case"text":return{...e,position:i(e.position)};case"shape":return{...e,...e.points?{points:o(e.points)}:{},...e.x!=null?{x:e.x+t}:{},...e.y!=null?{y:e.y+n}:{}};case"decorImage":return{...e,x:e.x+t,y:e.y+n}}}function xi(e,t=900){if(!e.floors||e.floors.length<2)return e;let n=[];return e.floors.forEach((i,o)=>{let r=-o*t;for(let s of i.objects)n.push(r===0?s:Xn(s,0,r))}),{...e,objects:n,floors:void 0}}function ht(e,t,n,i,o,r,s,l,m){let a=[],c=e.filter(f=>f.type==="section"),u=$e(e),h=f=>!f?.eventConfigurationId||f.eventConfigurationId===i&&(f.eventConfigurationVersion===void 0||f.eventConfigurationVersion===m),d=f=>Pe(f,{activeConfigurationId:i,activeConfigurationVersion:m,activeBasisSha256:o,now:l}),p=(f,y)=>d(f)?{...f,coverage:y}:void 0;for(let f of e){let y=[];if(f.type==="row"?y=Ln(f):f.type==="table"?y=Dn(f):f.type==="booth"&&(y=Vn(f)),!y.length)continue;for(let M of y)M.viewUrl&&!h(M.viewMeta)&&(M.viewUrl=void 0,M.viewMeta=void 0);if(f.type==="row"){let M=u.get(f.id);if(M){let b=new Map((f.overrides??[]).map(x=>[x.index,x]));for(let x of y){let w=Number(x.id.slice(x.id.lastIndexOf(":")+1));if(!Number.isInteger(w))continue;x.logicalRowId=M.groupId,x.logicalSeatIndex=M.adjacencyOffset+w,b.get(w)?.displayLabel||(x.displayLabel=ce(f,w,M)),!x.viewUrl&&M.viewFromSeatUrl&&h(M.viewFromSeatMeta)&&(x.viewUrl=M.viewFromSeatUrl,x.viewMeta=M.viewFromSeatMeta);let v=b.get(w)?.confidenceEvidence;x.confidenceEvidence=p(v,"exact-seat")??p(f.confidenceEvidence,"row-representative")??p(M.confidenceEvidence,"row-representative")}}}let S=Kn(e,f,c,f.type==="row"?re(y):yt(f)),E=S?.viewFromSeatUrl,g=(S?.zone?t?.find(M=>M.id===S.zone):void 0)?.focalPoint??n;for(let M of y){if(!M.confidenceEvidence){let b=Number(M.id.slice(M.id.lastIndexOf(":")+1)),x=(f.type==="row"||f.type==="table")&&Number.isInteger(b)?f.overrides?.find(w=>w.index===b)?.confidenceEvidence:void 0;M.confidenceEvidence=p(x,"exact-seat")??(f.type==="row"?p(f.confidenceEvidence,"row-representative"):void 0)}M.confidenceEvidence??=p(S?.confidenceEvidence,"section-representative")??(s?p(s.evidence,s.coverage):void 0),!M.viewUrl&&E&&h(S?.viewFromSeatMeta)&&(M.viewUrl=E,M.viewMeta=S?.viewFromSeatMeta),!M.viewUrl&&r&&h(r.meta)&&(M.viewUrl=r.url,M.viewMeta=r.meta),S&&(M.sectionId=S.logicalSectionId??S.id),S?.zone&&(M.zoneId=S.zone),g&&(M.focalPoint={...g})}a.push(...y)}return a}function Mi(e,t={}){if(e.floors?.length){let i=[];for(let o of e.floors){let r=o.focalPoint??e.focalPoint,s=o.viewFromSeatUrl?{url:o.viewFromSeatUrl,meta:o.viewFromSeatMeta}:e.viewFromSeatUrl?{url:e.viewFromSeatUrl,meta:e.viewFromSeatMeta}:void 0,l=o.confidenceEvidence?{evidence:o.confidenceEvidence,coverage:"floor-representative"}:e.confidenceEvidence?{evidence:e.confidenceEvidence,coverage:"venue-representative"}:void 0,m=ht(o.objects,e.zones,r,e.eventConfigurationId,e.confidenceBasisSha256,s,l,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);t.resolveEyeHeights!==!1&&mt(o.objects,o.focalPoint??e.focalPoint,o.baseHeightM??0,m);for(let a of m)a.floorId=o.id;for(let a of m)i.push(a)}return i}let n=ht(e.objects,e.zones,e.focalPoint,e.eventConfigurationId,e.confidenceBasisSha256,e.viewFromSeatUrl?{url:e.viewFromSeatUrl,meta:e.viewFromSeatMeta}:void 0,e.confidenceEvidence?{evidence:e.confidenceEvidence,coverage:"venue-representative"}:void 0,t.now,t.eventConfigurationVersion??e.eventConfigurationVersion);return t.resolveEyeHeights!==!1&&mt(e.objects,e.focalPoint,t.floorBaseHeightM??0,n),Bn(e,n,t)}function Bn(e,t,n){return!n.deriveRestrictedView||e.derivedRestrictedView===!1||n.resolveEyeHeights===!1||ut(t,lt(t,ct(e))),t}function mt(e,t,n,i){let o=e.filter(u=>u.type==="section"),r=n>0||o.some(u=>u.height!==void 0||u.rake!==void 0||(u.elevation??0)>0);if(!o.length||!r||!t){for(let u of i)u.eyeHeightM=n+Q;return}let s=new Array(i.length),l=new Map;for(let u of o)l.has(u.id)||l.set(u.id,u);let m=new Map,a=new Map;for(let u=0;u<i.length;u++){let h=i[u],p=(h.sectionId?l.get(h.sectionId)??o.find(y=>y.logicalSectionId===h.sectionId&&ae({x:h.x,y:h.y},y.outline,y.holes)):void 0)??o.find(y=>ae({x:h.x,y:h.y},y.outline,y.holes))??null;if(s[u]=p,!p)continue;m.has(p.id)||m.set(p.id,Ze(p,{floorBaseHeightM:n}));let f=a.get(p.id);f?f.push(u):a.set(p.id,[u])}let c=new Array(i.length).fill(void 0);for(let[u,h]of a){let d=m.get(u);if(!d)continue;let p=d.rake>0?Math.tan(d.rake*Math.PI/180):0,f=ot(u,i,h,t);for(let y of f.rows){let S=y.blockDepth*q*p,E=d.height+S;for(let I of y.seatIndices)c[I]=E}}for(let u=0;u<i.length;u++){let h=i[u],d=s[u];if(!d){h.eyeHeightM=n+Q;continue}let p=m.get(d.id);h.eyeHeightM=(c[u]??p.height)+Q}}var ie=40;function Si(e,t){let n=t?.freeText==="exclude",i=1/0,o=1/0,r=-1/0,s=-1/0,l=(a,c)=>{a<i&&(i=a),c<o&&(o=c),a>r&&(r=a),c>s&&(s=c)},m=a=>{if(Array.isArray(a))for(let c of a)!c||typeof c!="object"||l(c.x,c.y)};for(let a of Gn(e))if(a.type==="row"){let c=new Map((a.overrides??[]).map(u=>[u.index,u]));we(a).forEach((u,h)=>{let d=c.get(h);d?.skip||l(u.x+(d?.dx??0),u.y+(d?.dy??0))})}else if(a.type==="gaArea")m(a.points);else if(a.type==="section")m(a.outline);else if(a.type==="decorImage")l(a.x,a.y),l(a.x+a.width,a.y+a.height);else if(a.type==="shape")a.points&&a.points.length?m(a.points):a.x!=null&&a.y!=null&&a.width!=null&&a.height!=null&&(l(a.x,a.y),l(a.x+a.width,a.y+a.height));else if(a.type==="table"){let c=J+Nn,u=a.shape==="round"?(a.radius??40)+c:Math.max((a.width??80)/2,(a.height??50)/2)+c;l(a.center.x-u,a.center.y-u),l(a.center.x+u,a.center.y+u)}else if(a.type==="booth"){let c=Math.max(a.width,a.height)/2;l(a.center.x-c,a.center.y-c),l(a.center.x+c,a.center.y+c)}else if(a.type==="text"){if(n)continue;let c=Ne(a);l(a.position.x,a.position.y),l(a.position.x+c.width,a.position.y+c.height)}for(let a of[e.referenceImage,e.backgroundImage]){if(!a)continue;let{center:c,width:u}=a;if(!c||!Number.isFinite(c.x)||!Number.isFinite(c.y)||!Number.isFinite(u))continue;let h=u*3/4;l(c.x-u/2,c.y-h/2),l(c.x+u/2,c.y+h/2)}if(!isFinite(i)){let a=e.focalPoint??{x:0,y:0};return{x:a.x-200,y:a.y-200,width:400,height:400}}return{x:i-ie,y:o-ie,width:r-i+ie*2,height:s-o+ie*2}}export{Yn as a,vt as b,Ce as c,wt as d,Wn as e,Et as f,$n as g,Z as h,le as i,Jn as j,Zn as k,eo as l,to as m,no as n,oo as o,io as p,so as q,ao as r,co as s,lo as t,uo as u,fo as v,ho as w,mo as x,po as y,Ne as z,yo as A,Lt as B,go as C,fe as D,So as E,Fe as F,vo as G,wo as H,Dt as I,Ue as J,Io as K,Ge as L,Ht as M,Co as N,To as O,ze as P,Oo as Q,We as R,Xt as S,Bt as T,zt as U,Ao as V,$t as W,Jt as X,No as Y,Lo as Z,Fo as _,Do as $,$e as aa,q as ba,Ho as ca,en as da,qe as ea,Je as fa,Qe as ga,pe as ha,tn as ia,nn as ja,on as ka,Q as la,Uo as ma,Ze as na,tt as oa,cn as pa,ot as qa,Xo as ra,mn as sa,Bo as ta,it as ua,Yo as va,xn as wa,xe as xa,zo as ya,Se as za,J as Aa,we as Ba,pi as Ca,jn as Da,Ln as Ea,Fn as Fa,bt as Ga,bi as Ha,Dn as Ia,Vn as Ja,dt as Ka,te as La,ae as Ma,yi as Na,yt as Oa,Kn as Pa,Me as Qa,gi as Ra,Gn as Sa,Xn as Ta,xi as Ua,Mi as Va,Si as Wa};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as V,k as H,w as m}from"./chunk-LAX7F5ML.js";var ie=3,k=4.5,T=3,$=24,re=20;function A(t){return t.filter(a=>a.visible&&!!a.screenBox)}function y(t,a){return t.x<a.x+a.width&&t.x+t.width>a.x&&t.y<a.y+a.height&&t.y+t.height>a.y}function p(t){return t.length?Math.round(Math.min(...t)*100)/100:null}function o(t,a,s){return s.length?{code:t,message:a,count:s.length,samples:s.slice(0,re)}:null}function B(t,a,s){return{primaryId:t.seatId,primaryLabel:t.label,...a==null?{}:{measured:Math.round(a*100)/100},...s==null?{}:{minimum:s}}}function F(t,a,s){return{primaryId:t.id,primaryLabel:t.label,...a==null?{}:{measured:Math.round(a*100)/100},...s==null?{}:{minimum:s}}}function D(t,a,s){return{primaryId:t.objectId,primaryLabel:t.text,...a==null?{}:{measured:Math.round(a*100)/100},...s==null?{}:{minimum:s}}}function g(t,a,s,l){return{primaryId:t,primaryLabel:a,secondaryId:s,secondaryLabel:l}}function ae(t,a="overview",s=null){let l=A(t.labels),c=A(t.hierarchyLabels),d=A(t.freeTextLabels),f=A(t.rowLabels),C=t.gaAreas.filter(e=>e.visible),W=l.map(e=>m(e.ink,e.fill)??0),X=c.map(e=>m(e.ink,e.fill)??0),Y=d.map(e=>m(e.ink,e.background)??0),q=C.map(e=>m(e.effectiveBackground,t.canvasBackground)??0),u=s?t.labels.filter(e=>e.categoryKey===s):t.labels,v=s?t.gaAreas.filter(e=>e.categoryKey===s):t.gaAreas,h=u.filter(e=>e.selected),x=u.filter(e=>e.status==="held"),w=u.filter(e=>e.status==="booked"),R=u.filter(e=>e.pointerTarget.active),M=new Set([...t.labels.filter(e=>e.visible&&(e.opacity>.25||e.selected||e.status!=="free")).map(e=>e.categoryKey),...t.gaAreas.filter(e=>e.visible&&e.opacity>.1).map(e=>e.categoryKey)]),S=h.length?p(h.map(e=>m(e.selectionRingColor??t.selectionRingColor,e.fill)??0)):null,n=[],I=(e,i)=>Array.from({length:e},(b,L)=>({primaryId:`overview:${L+1}`,primaryLabel:i}));a==="overview"&&t.rung==="sections"&&(n.push(o("overview-section-category-paint","Section overview shells must use the neutral hierarchy palette, not category paint",I(t.overviewStyle.categoryPaintedSectionShells,"category-painted section shell"))),n.push(o("overview-category-detail-visible","Category-tinted section detail must wait until section focus or seat zoom",I(t.overviewStyle.visibleCategoryDetailOutlines,"category detail outline"))),n.push(o("overview-row-hints-visible","Row and seat patterns must not clutter the section overview",I(t.overviewStyle.visibleSectionRowHints,"section row hint"))),n.push(o("overview-availability-clutter","Live availability counts belong in focused detail, not on section overview shells",I(t.overviewStyle.visibleSectionAvailabilityLabels,"section availability label"))),n.push(o("overview-ga-detail-visible","Section-contained standing paint belongs in focused detail, not on section overview shells",I(t.overviewStyle.visibleSectionGADetails,"section-contained GA detail")))),n.push(o("bookable-label-undersized","Visible bookable labels must meet the rendered small-text size floor",l.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>B(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),n.push(o("bookable-label-viewport-clipped","Visible interaction labels must remain fully inside the buyer viewport",a==="interaction"?l.filter(e=>e.screenBox.x<0||e.screenBox.y<0||e.screenBox.x+e.screenBox.width>t.viewport.width||e.screenBox.y+e.screenBox.height>t.viewport.height).map(e=>B(e)):[])),n.push(o("row-label-viewport-clipped","Visible interaction row labels must remain fully inside the buyer viewport",a==="interaction"?f.flatMap((e,i)=>{let b=e.screenBox;return b.x<0||b.y<0||b.x+b.width>t.viewport.width||b.y+b.height>t.viewport.height?[{primaryId:`row-label-${i}`,primaryLabel:e.text}]:[]}):[]));let _=[];if(a==="interaction")for(let e=0;e<f.length;e+=1)for(let i=0;i<e;i+=1)y(f[e].screenBox,f[i].screenBox)&&_.push(g(`row-label-${i}`,f[i].text,`row-label-${e}`,f[e].text));if(n.push(o("row-label-collision","Visible interaction row labels must not overlap",_)),a==="interaction"){let e=u.length>0,i=v.length>0,b=e||i,L=v.filter(r=>r.visible),J=new Set([...u.flatMap(r=>r.sectionId?[r.sectionId]:[]),...v.flatMap(r=>r.sectionId?[r.sectionId]:[])]),Z=new Set([...t.labels.map(r=>r.categoryKey),...t.gaAreas.map(r=>r.categoryKey)]),P=r=>r.screenCenter.x>=0&&r.screenCenter.x<=t.viewport.width&&r.screenCenter.y>=0&&r.screenCenter.y<=t.viewport.height;n.push(o("detail-rung-missing","Interaction evidence with bookable inventory must render the seat-detail rung",b&&t.rung!=="seats"?[{primaryId:"renderer",primaryLabel:t.rung}]:[])),n.push(o("detail-inventory-not-visible","Interaction evidence must frame at least one real bookable unit",b&&!u.some(P)&&!L.length?[{primaryId:"renderer",primaryLabel:"no target inventory in viewport"}]:[])),n.push(o("pointer-target-inactive","Interaction evidence must expose a live production pointer target",e&&!R.some(P)||!e&&i&&!L.some(r=>r.interactive)?[{primaryId:"renderer",primaryLabel:"no active pointer target in viewport"}]:[])),n.push(o("pointer-target-undersized","Every active production pointer target must reach at least 24 CSS pixels",R.filter(r=>P(r)&&r.pointerTarget.effectiveMinimumPx<$).map(r=>B(r,r.pointerTarget.effectiveMinimumPx,$)))),n.push(o("selected-state-missing","Interaction evidence must paint a selected unit and its renderer-owned ring",e&&(!h.length||!h.some(r=>t.selectionRingSeatIds.includes(r.seatId)))?[{primaryId:"renderer",primaryLabel:"selected state"}]:[])),n.push(o("selected-state-contrast-low","The selected-state ring must maintain 3:1 graphical contrast with the seat paint",h.length&&(S??0)<T?[{primaryId:h[0].seatId,primaryLabel:h[0].label,measured:Math.round((S??0)*100)/100,minimum:T}]:[])),n.push(o("held-state-missing","Interaction evidence must paint a held state when the floor has at least two status-managed units",u.length>=2&&!x.length?[{primaryId:"renderer",primaryLabel:"held state"}]:[])),n.push(o("booked-state-missing","Interaction evidence must paint a taken state when the floor has at least three status-managed units",u.length>=3&&!w.length?[{primaryId:"renderer",primaryLabel:"booked state"}]:[]));let ee=new Set(x.map(r=>`${r.fill.toLowerCase()}:${r.opacity}`)),te=new Set(w.map(r=>`${r.fill.toLowerCase()}:${r.opacity}`));n.push(o("status-state-indistinct","Held and taken evidence must resolve to distinct renderer paint",x.length&&w.length&&[...ee].some(r=>te.has(r))?[{primaryId:x[0].seatId,primaryLabel:x[0].label,secondaryId:w[0].seatId,secondaryLabel:w[0].label}]:[])),n.push(o("section-focus-missing","Interaction evidence must exercise section focus and its backdrop when section membership exists",J.size&&(!t.focusedSectionId||!t.focusBackdropVisible)?[{primaryId:"renderer",primaryLabel:"section focus"}]:[])),n.push(o("category-filter-missing","Interaction evidence must exercise a category filter when multiple categories exist",Z.size>=2&&(!t.categoryFilterKeys||!t.categoryFilterKeys.length)?[{primaryId:"renderer",primaryLabel:"category filter"}]:[]));let E=t.labels.filter(r=>r.status==="free"&&!r.selected&&t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(r.categoryKey)),Q=t.gaAreas.filter(r=>t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(r.categoryKey));n.push(o("category-filter-ineffective","The active category filter must visibly dim excluded free inventory",(E.length||Q.length)&&!E.some(r=>r.opacity<=.25)&&!Q.some(r=>r.opacity<=.1)?[...E.map(r=>B(r,r.opacity)),...Q.map(r=>({primaryId:r.areaId,primaryLabel:r.label,measured:r.opacity}))]:[])),n.push(o("target-category-not-visible","A category-specific interaction scene must visibly paint its exact target category",s&&!M.has(s)?[{primaryId:s,primaryLabel:s}]:[])),n.push(o("target-category-filter-mismatch","A category-specific interaction scene must bind its filter to only the exact target category",s&&(t.categoryFilterKeys?.length!==1||t.categoryFilterKeys[0]!==s)?[{primaryId:s,primaryLabel:s}]:[]))}n.push(o("bookable-label-contrast-low","Visible bookable labels must meet 4.5:1 contrast against their actual paint",l.flatMap(e=>{let i=m(e.ink,e.fill)??0;return i<k?[B(e,i,k)]:[]})));let z=[];for(let e=0;e<l.length;e+=1)for(let i=0;i<e;i+=1)y(l[e].screenBox,l[i].screenBox)&&z.push(g(l[i].seatId,l[i].label,l[e].seatId,l[e].label));n.push(o("bookable-label-collision","Visible bookable labels must not overlap",z)),n.push(o("hierarchy-label-undersized","Visible section and zone labels must meet the rendered small-text size floor",c.filter(e=>e.renderedFontPx<(e.sizeFloorPx??V)).map(e=>F(e,e.renderedFontPx,e.sizeFloorPx??V)))),n.push(o("hierarchy-label-contrast-low","Visible section and zone labels must meet 4.5:1 contrast against their backing paint",c.flatMap(e=>{let i=m(e.ink,e.fill)??0,b=e.kind==="section"&&e.role==="name"?H:k;return i<b?[F(e,i,b)]:[]}))),n.push(o("hierarchy-label-viewport-clipped","Visible overview hierarchy labels must remain fully inside the buyer viewport",a==="overview"?c.filter(e=>e.screenBox.x<0||e.screenBox.y<0||e.screenBox.x+e.screenBox.width>t.viewport.width||e.screenBox.y+e.screenBox.height>t.viewport.height).map(e=>F(e)):[])),n.push(o("hierarchy-label-outside-section","Visible section labels must remain inside the filled section surface and outside holes",c.filter(e=>e.kind==="section"&&e.fitsContainer===!1).map(e=>F(e))));let K=[];for(let e=0;e<c.length;e+=1)for(let i=0;i<e;i+=1)y(c[e].screenBox,c[i].screenBox)&&K.push(g(c[i].id,c[i].label,c[e].id,c[e].label));n.push(o("hierarchy-label-collision","Visible hierarchy labels must not overlap each other",K));let N=[];for(let e of c)for(let i of l)y(e.screenBox,i.screenBox)&&N.push(g(e.id,e.label,i.seatId,i.label));n.push(o("hierarchy-bookable-collision","Visible hierarchy labels must not overlap bookable labels",N)),n.push(o("free-text-undersized","Visible chart text must meet the rendered small-text size floor",d.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>D(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),n.push(o("free-text-contrast-low","Visible chart text must meet 4.5:1 contrast against its measured background",d.flatMap(e=>{let i=m(e.ink,e.background)??0;return i<k?[D(e,i,k)]:[]})));let G=[];for(let e=0;e<d.length;e+=1)for(let i=0;i<e;i+=1)y(d[e].screenBox,d[i].screenBox)&&G.push(g(d[i].objectId,d[i].text,d[e].objectId,d[e].text));n.push(o("free-text-collision","Visible chart text labels must not overlap each other",G));let O=[];for(let e of d)for(let i of l)y(e.screenBox,i.screenBox)&&O.push(g(e.objectId,e.text,i.seatId,i.label));n.push(o("free-text-bookable-collision","Visible chart text must not overlap bookable labels",O));let U=[];for(let e of d)for(let i of c)y(e.screenBox,i.screenBox)&&U.push(g(e.objectId,e.text,i.id,i.label));n.push(o("free-text-hierarchy-collision","Visible chart text must not overlap hierarchy labels",U)),n.push(o("ga-contrast-low","Visible GA surfaces must maintain 3:1 graphical contrast with the canvas",C.flatMap(e=>{let i=m(e.effectiveBackground,t.canvasBackground)??0;return i<T?[{primaryId:e.areaId,primaryLabel:e.label,measured:Math.round(i*100)/100,minimum:T}]:[]})));let j=n.filter(e=>!!e);return{version:ie,passed:j.length===0,state:a,targetCategoryKey:s,resolvedRules:["rendered-overview-label-size","rendered-overview-label-contrast","rendered-overview-label-collision","rendered-overview-hierarchy-viewport","rendered-overview-hierarchy-containment","rendered-overview-section-first-style","rendered-overview-ga-contrast",...a==="interaction"?["rendered-detail-label-viewport","rendered-detail-inventory","rendered-pointer-target","rendered-selected-held-taken-states","rendered-section-focus","rendered-category-filter"]:[]],viewport:t.viewport,canvasBackground:t.canvasBackground,effectiveScale:t.effectiveScale,rung:t.rung,inventory:{totalBookableUnits:t.totalBookableUnits,totalLabelledBookableUnits:t.totalLabelledBookableUnits,visibleBookableLabels:l.length,hiddenBookableLabels:t.hiddenLabels,visibleHierarchyLabels:c.length,visibleFreeTextLabels:d.length,visibleGAAreas:C.length},overviewStyle:t.overviewStyle,composition:{hierarchy:t.hierarchyLabels.filter(e=>e.role==="name").map(e=>({id:e.id,kind:e.kind,label:e.label,visible:e.visible})).sort((e,i)=>e.kind.localeCompare(i.kind)||e.id.localeCompare(i.id)),labelledObjects:t.freeTextLabels.map(e=>({objectId:e.objectId,kind:e.kind,text:e.text,visible:e.visible})).sort((e,i)=>e.objectId.localeCompare(i.objectId)||e.kind.localeCompare(i.kind)),gaAreas:t.gaAreas.map(e=>({areaId:e.areaId,label:e.label,categoryKey:e.categoryKey,...e.sectionId?{sectionId:e.sectionId}:{},visible:e.visible})).sort((e,i)=>e.areaId.localeCompare(i.areaId)),bookableSectionIds:[...new Set(t.labels.flatMap(e=>e.sectionId?[e.sectionId]:[]))].sort(),categoryKeys:[...new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)])].sort(),activeCategoryKeys:[...M].sort()},metrics:{minimumRenderedBookableLabelPx:p(l.map(e=>e.renderedFontPx)),minimumBookableLabelContrast:p(W),minimumRenderedHierarchyLabelPx:p(c.map(e=>e.renderedFontPx)),minimumHierarchyLabelContrast:p(X),minimumRenderedFreeTextPx:p(d.map(e=>e.renderedFontPx)),minimumFreeTextContrast:p(Y),minimumGAContrast:p(q),minimumEffectivePointerTargetPx:p(R.map(e=>e.pointerTarget.effectiveMinimumPx)),selectedRingContrast:S==null?null:Math.round(S*100)/100},interaction:{applicable:{detail:u.length>0||v.length>0,pointer:u.length>0||v.length>0,held:u.length>=2,booked:u.length>=3,sectionFocus:u.some(e=>!!e.sectionId)||v.some(e=>!!e.sectionId),categoryFilter:new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)]).size>=2},selectedUnits:h.length,heldUnits:x.length,bookedUnits:w.length,activePointerTargets:R.length,focusedSectionId:t.focusedSectionId,focusBackdropVisible:t.focusBackdropVisible,categoryFilterKeys:t.categoryFilterKeys},findings:j}}export{ie as a,$ as b,ae as c};
|
|
1
|
+
import{I as m,u as V,w as H}from"./chunk-Z43H6AWN.js";var ie=3,k=4.5,T=3,$=24,re=20;function A(t){return t.filter(a=>a.visible&&!!a.screenBox)}function y(t,a){return t.x<a.x+a.width&&t.x+t.width>a.x&&t.y<a.y+a.height&&t.y+t.height>a.y}function p(t){return t.length?Math.round(Math.min(...t)*100)/100:null}function o(t,a,s){return s.length?{code:t,message:a,count:s.length,samples:s.slice(0,re)}:null}function B(t,a,s){return{primaryId:t.seatId,primaryLabel:t.label,...a==null?{}:{measured:Math.round(a*100)/100},...s==null?{}:{minimum:s}}}function F(t,a,s){return{primaryId:t.id,primaryLabel:t.label,...a==null?{}:{measured:Math.round(a*100)/100},...s==null?{}:{minimum:s}}}function D(t,a,s){return{primaryId:t.objectId,primaryLabel:t.text,...a==null?{}:{measured:Math.round(a*100)/100},...s==null?{}:{minimum:s}}}function g(t,a,s,l){return{primaryId:t,primaryLabel:a,secondaryId:s,secondaryLabel:l}}function ae(t,a="overview",s=null){let l=A(t.labels),c=A(t.hierarchyLabels),d=A(t.freeTextLabels),f=A(t.rowLabels),C=t.gaAreas.filter(e=>e.visible),W=l.map(e=>m(e.ink,e.fill)??0),X=c.map(e=>m(e.ink,e.fill)??0),Y=d.map(e=>m(e.ink,e.background)??0),q=C.map(e=>m(e.effectiveBackground,t.canvasBackground)??0),u=s?t.labels.filter(e=>e.categoryKey===s):t.labels,v=s?t.gaAreas.filter(e=>e.categoryKey===s):t.gaAreas,h=u.filter(e=>e.selected),x=u.filter(e=>e.status==="held"),w=u.filter(e=>e.status==="booked"),R=u.filter(e=>e.pointerTarget.active),M=new Set([...t.labels.filter(e=>e.visible&&(e.opacity>.25||e.selected||e.status!=="free")).map(e=>e.categoryKey),...t.gaAreas.filter(e=>e.visible&&e.opacity>.1).map(e=>e.categoryKey)]),S=h.length?p(h.map(e=>m(e.selectionRingColor??t.selectionRingColor,e.fill)??0)):null,n=[],I=(e,i)=>Array.from({length:e},(b,L)=>({primaryId:`overview:${L+1}`,primaryLabel:i}));a==="overview"&&t.rung==="sections"&&(n.push(o("overview-section-category-paint","Section overview shells must use the neutral hierarchy palette, not category paint",I(t.overviewStyle.categoryPaintedSectionShells,"category-painted section shell"))),n.push(o("overview-category-detail-visible","Category-tinted section detail must wait until section focus or seat zoom",I(t.overviewStyle.visibleCategoryDetailOutlines,"category detail outline"))),n.push(o("overview-row-hints-visible","Row and seat patterns must not clutter the section overview",I(t.overviewStyle.visibleSectionRowHints,"section row hint"))),n.push(o("overview-availability-clutter","Live availability counts belong in focused detail, not on section overview shells",I(t.overviewStyle.visibleSectionAvailabilityLabels,"section availability label"))),n.push(o("overview-ga-detail-visible","Section-contained standing paint belongs in focused detail, not on section overview shells",I(t.overviewStyle.visibleSectionGADetails,"section-contained GA detail")))),n.push(o("bookable-label-undersized","Visible bookable labels must meet the rendered small-text size floor",l.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>B(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),n.push(o("bookable-label-viewport-clipped","Visible interaction labels must remain fully inside the buyer viewport",a==="interaction"?l.filter(e=>e.screenBox.x<0||e.screenBox.y<0||e.screenBox.x+e.screenBox.width>t.viewport.width||e.screenBox.y+e.screenBox.height>t.viewport.height).map(e=>B(e)):[])),n.push(o("row-label-viewport-clipped","Visible interaction row labels must remain fully inside the buyer viewport",a==="interaction"?f.flatMap((e,i)=>{let b=e.screenBox;return b.x<0||b.y<0||b.x+b.width>t.viewport.width||b.y+b.height>t.viewport.height?[{primaryId:`row-label-${i}`,primaryLabel:e.text}]:[]}):[]));let _=[];if(a==="interaction")for(let e=0;e<f.length;e+=1)for(let i=0;i<e;i+=1)y(f[e].screenBox,f[i].screenBox)&&_.push(g(`row-label-${i}`,f[i].text,`row-label-${e}`,f[e].text));if(n.push(o("row-label-collision","Visible interaction row labels must not overlap",_)),a==="interaction"){let e=u.length>0,i=v.length>0,b=e||i,L=v.filter(r=>r.visible),J=new Set([...u.flatMap(r=>r.sectionId?[r.sectionId]:[]),...v.flatMap(r=>r.sectionId?[r.sectionId]:[])]),Z=new Set([...t.labels.map(r=>r.categoryKey),...t.gaAreas.map(r=>r.categoryKey)]),P=r=>r.screenCenter.x>=0&&r.screenCenter.x<=t.viewport.width&&r.screenCenter.y>=0&&r.screenCenter.y<=t.viewport.height;n.push(o("detail-rung-missing","Interaction evidence with bookable inventory must render the seat-detail rung",b&&t.rung!=="seats"?[{primaryId:"renderer",primaryLabel:t.rung}]:[])),n.push(o("detail-inventory-not-visible","Interaction evidence must frame at least one real bookable unit",b&&!u.some(P)&&!L.length?[{primaryId:"renderer",primaryLabel:"no target inventory in viewport"}]:[])),n.push(o("pointer-target-inactive","Interaction evidence must expose a live production pointer target",e&&!R.some(P)||!e&&i&&!L.some(r=>r.interactive)?[{primaryId:"renderer",primaryLabel:"no active pointer target in viewport"}]:[])),n.push(o("pointer-target-undersized","Every active production pointer target must reach at least 24 CSS pixels",R.filter(r=>P(r)&&r.pointerTarget.effectiveMinimumPx<$).map(r=>B(r,r.pointerTarget.effectiveMinimumPx,$)))),n.push(o("selected-state-missing","Interaction evidence must paint a selected unit and its renderer-owned ring",e&&(!h.length||!h.some(r=>t.selectionRingSeatIds.includes(r.seatId)))?[{primaryId:"renderer",primaryLabel:"selected state"}]:[])),n.push(o("selected-state-contrast-low","The selected-state ring must maintain 3:1 graphical contrast with the seat paint",h.length&&(S??0)<T?[{primaryId:h[0].seatId,primaryLabel:h[0].label,measured:Math.round((S??0)*100)/100,minimum:T}]:[])),n.push(o("held-state-missing","Interaction evidence must paint a held state when the floor has at least two status-managed units",u.length>=2&&!x.length?[{primaryId:"renderer",primaryLabel:"held state"}]:[])),n.push(o("booked-state-missing","Interaction evidence must paint a taken state when the floor has at least three status-managed units",u.length>=3&&!w.length?[{primaryId:"renderer",primaryLabel:"booked state"}]:[]));let ee=new Set(x.map(r=>`${r.fill.toLowerCase()}:${r.opacity}`)),te=new Set(w.map(r=>`${r.fill.toLowerCase()}:${r.opacity}`));n.push(o("status-state-indistinct","Held and taken evidence must resolve to distinct renderer paint",x.length&&w.length&&[...ee].some(r=>te.has(r))?[{primaryId:x[0].seatId,primaryLabel:x[0].label,secondaryId:w[0].seatId,secondaryLabel:w[0].label}]:[])),n.push(o("section-focus-missing","Interaction evidence must exercise section focus and its backdrop when section membership exists",J.size&&(!t.focusedSectionId||!t.focusBackdropVisible)?[{primaryId:"renderer",primaryLabel:"section focus"}]:[])),n.push(o("category-filter-missing","Interaction evidence must exercise a category filter when multiple categories exist",Z.size>=2&&(!t.categoryFilterKeys||!t.categoryFilterKeys.length)?[{primaryId:"renderer",primaryLabel:"category filter"}]:[]));let E=t.labels.filter(r=>r.status==="free"&&!r.selected&&t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(r.categoryKey)),Q=t.gaAreas.filter(r=>t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(r.categoryKey));n.push(o("category-filter-ineffective","The active category filter must visibly dim excluded free inventory",(E.length||Q.length)&&!E.some(r=>r.opacity<=.25)&&!Q.some(r=>r.opacity<=.1)?[...E.map(r=>B(r,r.opacity)),...Q.map(r=>({primaryId:r.areaId,primaryLabel:r.label,measured:r.opacity}))]:[])),n.push(o("target-category-not-visible","A category-specific interaction scene must visibly paint its exact target category",s&&!M.has(s)?[{primaryId:s,primaryLabel:s}]:[])),n.push(o("target-category-filter-mismatch","A category-specific interaction scene must bind its filter to only the exact target category",s&&(t.categoryFilterKeys?.length!==1||t.categoryFilterKeys[0]!==s)?[{primaryId:s,primaryLabel:s}]:[]))}n.push(o("bookable-label-contrast-low","Visible bookable labels must meet 4.5:1 contrast against their actual paint",l.flatMap(e=>{let i=m(e.ink,e.fill)??0;return i<k?[B(e,i,k)]:[]})));let z=[];for(let e=0;e<l.length;e+=1)for(let i=0;i<e;i+=1)y(l[e].screenBox,l[i].screenBox)&&z.push(g(l[i].seatId,l[i].label,l[e].seatId,l[e].label));n.push(o("bookable-label-collision","Visible bookable labels must not overlap",z)),n.push(o("hierarchy-label-undersized","Visible section and zone labels must meet the rendered small-text size floor",c.filter(e=>e.renderedFontPx<(e.sizeFloorPx??V)).map(e=>F(e,e.renderedFontPx,e.sizeFloorPx??V)))),n.push(o("hierarchy-label-contrast-low","Visible section and zone labels must meet 4.5:1 contrast against their backing paint",c.flatMap(e=>{let i=m(e.ink,e.fill)??0,b=e.kind==="section"&&e.role==="name"?H:k;return i<b?[F(e,i,b)]:[]}))),n.push(o("hierarchy-label-viewport-clipped","Visible overview hierarchy labels must remain fully inside the buyer viewport",a==="overview"?c.filter(e=>e.screenBox.x<0||e.screenBox.y<0||e.screenBox.x+e.screenBox.width>t.viewport.width||e.screenBox.y+e.screenBox.height>t.viewport.height).map(e=>F(e)):[])),n.push(o("hierarchy-label-outside-section","Visible section labels must remain inside the filled section surface and outside holes",c.filter(e=>e.kind==="section"&&e.fitsContainer===!1).map(e=>F(e))));let K=[];for(let e=0;e<c.length;e+=1)for(let i=0;i<e;i+=1)y(c[e].screenBox,c[i].screenBox)&&K.push(g(c[i].id,c[i].label,c[e].id,c[e].label));n.push(o("hierarchy-label-collision","Visible hierarchy labels must not overlap each other",K));let N=[];for(let e of c)for(let i of l)y(e.screenBox,i.screenBox)&&N.push(g(e.id,e.label,i.seatId,i.label));n.push(o("hierarchy-bookable-collision","Visible hierarchy labels must not overlap bookable labels",N)),n.push(o("free-text-undersized","Visible chart text must meet the rendered small-text size floor",d.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>D(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),n.push(o("free-text-contrast-low","Visible chart text must meet 4.5:1 contrast against its measured background",d.flatMap(e=>{let i=m(e.ink,e.background)??0;return i<k?[D(e,i,k)]:[]})));let G=[];for(let e=0;e<d.length;e+=1)for(let i=0;i<e;i+=1)y(d[e].screenBox,d[i].screenBox)&&G.push(g(d[i].objectId,d[i].text,d[e].objectId,d[e].text));n.push(o("free-text-collision","Visible chart text labels must not overlap each other",G));let O=[];for(let e of d)for(let i of l)y(e.screenBox,i.screenBox)&&O.push(g(e.objectId,e.text,i.seatId,i.label));n.push(o("free-text-bookable-collision","Visible chart text must not overlap bookable labels",O));let U=[];for(let e of d)for(let i of c)y(e.screenBox,i.screenBox)&&U.push(g(e.objectId,e.text,i.id,i.label));n.push(o("free-text-hierarchy-collision","Visible chart text must not overlap hierarchy labels",U)),n.push(o("ga-contrast-low","Visible GA surfaces must maintain 3:1 graphical contrast with the canvas",C.flatMap(e=>{let i=m(e.effectiveBackground,t.canvasBackground)??0;return i<T?[{primaryId:e.areaId,primaryLabel:e.label,measured:Math.round(i*100)/100,minimum:T}]:[]})));let j=n.filter(e=>!!e);return{version:ie,passed:j.length===0,state:a,targetCategoryKey:s,resolvedRules:["rendered-overview-label-size","rendered-overview-label-contrast","rendered-overview-label-collision","rendered-overview-hierarchy-viewport","rendered-overview-hierarchy-containment","rendered-overview-section-first-style","rendered-overview-ga-contrast",...a==="interaction"?["rendered-detail-label-viewport","rendered-detail-inventory","rendered-pointer-target","rendered-selected-held-taken-states","rendered-section-focus","rendered-category-filter"]:[]],viewport:t.viewport,canvasBackground:t.canvasBackground,effectiveScale:t.effectiveScale,rung:t.rung,inventory:{totalBookableUnits:t.totalBookableUnits,totalLabelledBookableUnits:t.totalLabelledBookableUnits,visibleBookableLabels:l.length,hiddenBookableLabels:t.hiddenLabels,visibleHierarchyLabels:c.length,visibleFreeTextLabels:d.length,visibleGAAreas:C.length},overviewStyle:t.overviewStyle,composition:{hierarchy:t.hierarchyLabels.filter(e=>e.role==="name").map(e=>({id:e.id,kind:e.kind,label:e.label,visible:e.visible})).sort((e,i)=>e.kind.localeCompare(i.kind)||e.id.localeCompare(i.id)),labelledObjects:t.freeTextLabels.map(e=>({objectId:e.objectId,kind:e.kind,text:e.text,visible:e.visible})).sort((e,i)=>e.objectId.localeCompare(i.objectId)||e.kind.localeCompare(i.kind)),gaAreas:t.gaAreas.map(e=>({areaId:e.areaId,label:e.label,categoryKey:e.categoryKey,...e.sectionId?{sectionId:e.sectionId}:{},visible:e.visible})).sort((e,i)=>e.areaId.localeCompare(i.areaId)),bookableSectionIds:[...new Set(t.labels.flatMap(e=>e.sectionId?[e.sectionId]:[]))].sort(),categoryKeys:[...new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)])].sort(),activeCategoryKeys:[...M].sort()},metrics:{minimumRenderedBookableLabelPx:p(l.map(e=>e.renderedFontPx)),minimumBookableLabelContrast:p(W),minimumRenderedHierarchyLabelPx:p(c.map(e=>e.renderedFontPx)),minimumHierarchyLabelContrast:p(X),minimumRenderedFreeTextPx:p(d.map(e=>e.renderedFontPx)),minimumFreeTextContrast:p(Y),minimumGAContrast:p(q),minimumEffectivePointerTargetPx:p(R.map(e=>e.pointerTarget.effectiveMinimumPx)),selectedRingContrast:S==null?null:Math.round(S*100)/100},interaction:{applicable:{detail:u.length>0||v.length>0,pointer:u.length>0||v.length>0,held:u.length>=2,booked:u.length>=3,sectionFocus:u.some(e=>!!e.sectionId)||v.some(e=>!!e.sectionId),categoryFilter:new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)]).size>=2},selectedUnits:h.length,heldUnits:x.length,bookedUnits:w.length,activePointerTargets:R.length,focusedSectionId:t.focusedSectionId,focusBackdropVisible:t.focusBackdropVisible,categoryFilterKeys:t.categoryFilterKeys},findings:j}}export{ie as a,$ as b,ae as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as b,k as y,n as f,t as g}from"./chunk-JBOTRSMY.js";var A=72;var N="seatmap.chart";var I=[{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"}],R=new Map(I.map(e=>[e.key,e]));function W(e){return R.get(e)}var w={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 v(e){let t=e?.[0];return t&&w[t]||"#3b82f6"}var k=[{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"}],M=new Map(k.map(e=>[e.key,e]));function Y(e){return M.get(e)}var X=8,q=24,E=["reference-focal","bar","entrance","exit","restroom","screen","sound","concession","coat","wall","rail","suite","obstruction"],T=new Set(E);function Q(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&&T.has(e.role)?"surroundings":"background";case"text":return"background";default:return"interactive"}}var ie=7,oe=10,L=10,P=.39,O=.8,_=.62;function ae(e){let t=Math.min(Math.abs(e.width),Math.abs(e.height));if(!(t>0))return L;let n=Math.max(1,e.text.length),r=Math.abs(e.width)*O/(n*_);return Math.max(L,Math.min(t*P,r))}var se=15,ce=11,le=.85,B=12,d=4.5,de=3,F=3,o="#000000",a="#ffffff",D=24,z=18.67;function ue(e,t=400){return e>=D||t>=700&&e>=z?F:d}function be(e,t){return e*t>=B}var ge=24,x={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"},me=x.wheelchair;function pe(e){if(!e?.length)return null;let t=e.includes("wheelchair")?"wheelchair":e[0];return x[t]??null}function Se(e,t){return t.colorblind?G(t.canvasBackground):v(e)}function ye(e){return/-(\d{1,5})$/.exec(e)?.[1]??e}var s=f;function fe(e,t,n){let r=b(e),c=b(t);if(!r||!c)return t;let i=Math.max(0,Math.min(1,n));return`#${r.map((l,m)=>Math.round(l*i+c[m]*(1-i))).map(l=>l.toString(16).padStart(2,"0")).join("")}`}var ve=3;function Le(e){let t=s(a,e)??0,n=s(o,e)??0;return t>=d?a:n>=d&&g(e)||g(e)?o:a}function G(e){return g(e)?o:a}function C(e,t,n=d){let r=s(t,e);if(r!=null&&r>=n)return t;let c=s(o,e)??0,i=s(a,e)??0;return c===0&&i===0?t:c>=i?o:a}function he(e,t,n,r=d){return t??C(e,n,r)}var V=3;function xe(e){let t=s("#ffffff",e);if(t!=null&&t>=V)return"#ffffff";let n=s(o,e)??0,r=s(a,e)??0;return n===0&&r===0?"#ffffff":n>=r?o:a}var h=/^#[0-9a-f]{6}$/i;function H(e){let t=b(e);return t!=null&&y(t)>.5}var Z="#e5e7eb",K="#273142";function Ce(e){return H(e)?Z:K}function Ae(e,t,n=d){let r=h.test(e.trim()),c=e.trim().toLowerCase(),i=0,u=0,l=null;for(let p of t){if(!r||!h.test(p.trim()))continue;i+=1;let S=C(p,e,n);S.toLowerCase()!==c&&(u+=1,l=S)}return{total:i,overridden:u,status:i===0?"none":u===0?"applies":u===i?"overridden":"mixed",overrideInk:l}}export{A as a,N as b,I as c,W as d,w as e,v as f,k as g,Y as h,X as i,q as j,E as k,Q as l,ie as m,oe as n,L as o,P as p,ae as q,se as r,ce as s,le as t,B as u,d as v,de as w,F as x,o as y,a as z,ue as A,be as B,ge as C,x as D,me as E,pe as F,Se as G,ye as H,s as I,fe as J,ve as K,Le as L,G as M,C as N,he as O,xe as P,H as Q,Z as R,K as S,Ce as T,Ae as U};
|