@seatlayer/core 0.72.0 → 0.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{categoryInventory-Bt-0psga.d.ts → categoryInventory-Bcmnr6ZH.d.ts} +1 -1
- package/dist/{categoryInventory-BU1j8Q70.d.cts → categoryInventory-DueSAIBX.d.cts} +1 -1
- package/dist/{chunk-O5UWBFUT.js → chunk-3L4M7L5I.js} +1 -1
- package/dist/chunk-5JB4VW6B.js +1 -0
- package/dist/{chunk-YW2WGLRM.js → chunk-BAWUBGWY.js} +1 -1
- package/dist/{chunk-4V5WYN6O.js → chunk-HDY2MYYH.js} +1 -1
- package/dist/chunk-JLYR66MT.js +1 -0
- package/dist/{chunk-KCFEFP6H.js → chunk-KN7GLEAI.js} +1 -1
- package/dist/{chunk-KPSJDH3N.js → chunk-N5NRM4NW.js} +1 -1
- package/dist/chunk-QLDV5ZGA.js +1 -0
- package/dist/{chunk-AM2LRFAY.js → chunk-UX67GDLV.js} +1 -1
- package/dist/{chunk-ALE2T36W.js → chunk-YFV4DSSX.js} +1 -1
- package/dist/{chunk-NKYPEBW3.js → chunk-ZMYRXJOA.js} +1 -1
- package/dist/core/chart-ops/index.cjs +1 -1
- package/dist/core/chart-ops/index.d.cts +11 -4
- package/dist/core/chart-ops/index.d.ts +11 -4
- package/dist/core/chart-ops/index.js +1 -1
- package/dist/core/inventory/index.cjs +1 -1
- package/dist/core/inventory/index.d.cts +11 -4
- package/dist/core/inventory/index.d.ts +11 -4
- package/dist/core/inventory/index.js +1 -1
- package/dist/core/layout/index.cjs +1 -1
- package/dist/core/layout/index.d.cts +5 -5
- package/dist/core/layout/index.d.ts +5 -5
- package/dist/core/layout/index.js +1 -1
- package/dist/core/quality/index.cjs +1 -1
- package/dist/core/quality/index.d.cts +3 -3
- package/dist/core/quality/index.d.ts +3 -3
- package/dist/core/quality/index.js +1 -1
- package/dist/core/render-assets/index.cjs +1 -1
- package/dist/core/render-assets/index.d.cts +1 -1
- package/dist/core/render-assets/index.d.ts +1 -1
- package/dist/core/render-assets/index.js +1 -1
- package/dist/core/seatConfidence.d.cts +1 -1
- package/dist/core/seatConfidence.d.ts +1 -1
- package/dist/core/sections/index.cjs +1 -1
- package/dist/core/sections/index.d.cts +5 -5
- package/dist/core/sections/index.d.ts +5 -5
- package/dist/core/sections/index.js +1 -1
- package/dist/{eventConfigurations-DfVUGyCg.d.ts → eventConfigurations-C7YAqkFR.d.ts} +1 -1
- package/dist/{eventConfigurations-3uSorYVC.d.cts → eventConfigurations-DwXdrjqj.d.cts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +102 -13
- package/dist/index.d.ts +102 -13
- package/dist/index.js +1 -1
- package/dist/{labeling-BiWB-8aq.d.ts → labeling-BUCj-kHU.d.ts} +1 -1
- package/dist/{labeling-9RWWmJhZ.d.cts → labeling-iugoy25P.d.cts} +1 -1
- package/dist/{layout-B6iOoPOv.d.cts → layout-DPJX6D9k.d.cts} +3 -3
- package/dist/{layout-B7URbtDR.d.ts → layout-Dv3R0Mpw.d.ts} +3 -3
- package/dist/{renderedQuality-C5dQiq97.d.ts → renderedQuality-CSHrmnHf.d.cts} +10 -2
- package/dist/{renderedQuality-BZsq3wDe.d.cts → renderedQuality-CfonzUpl.d.ts} +10 -2
- package/dist/{renderer-6sFRupj0.d.ts → renderer-C5avrVLy.d.ts} +11 -2
- package/dist/{renderer-CBOo1OZk.d.cts → renderer-Dn4Plcv9.d.cts} +11 -2
- package/dist/{sections-DU6YDYoZ.d.cts → sections-DhJ7TukF.d.cts} +1 -1
- package/dist/{sections-Cn_sk1Sx.d.ts → sections-uV7vqDHj.d.ts} +1 -1
- package/dist/{segmentedRowModel-CKmyHvKv.d.cts → segmentedRowModel-DWOjcPrU.d.cts} +1 -1
- package/dist/{segmentedRowModel-DbP7pWUk.d.ts → segmentedRowModel-DgSEzAYd.d.ts} +1 -1
- package/dist/{ticketRestrictions-CvS2oQ8v.d.ts → ticketRestrictions-DIh61MqE.d.ts} +2 -2
- package/dist/{ticketRestrictions-DkenahW2.d.cts → ticketRestrictions-JT87K45q.d.cts} +2 -2
- package/dist/{types-D6-wLa-m.d.cts → types-Dx4jA8aI.d.cts} +22 -4
- package/dist/{types-D6-wLa-m.d.ts → types-Dx4jA8aI.d.ts} +22 -4
- package/dist/view3d/crossfade/panorama.d.cts +1 -1
- package/dist/view3d/crossfade/panorama.d.ts +1 -1
- package/dist/view3d/index.cjs +1 -1
- package/dist/view3d/index.d.cts +3 -3
- package/dist/view3d/index.d.ts +3 -3
- package/dist/view3d/index.js +1 -1
- package/dist/view3d/scene/scene.worker.cjs +1 -1
- package/dist/view3d/scene/scene.worker.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-4F7VBQCF.js +0 -1
- package/dist/chunk-HXYWP6NX.js +0 -1
- package/dist/chunk-ZOXZWPTL.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(e){let n=e;return delete n.referenceScan,delete n.referenceInventorySource,delete n.referenceInventoryExclusion,delete n.referenceSource,delete n.referenceAnnotationSource,e}function b(e){return(e.type==="shape"||e.type==="text")&&(e.referenceAnnotationSource?.kind==="direct-landmark-v1"||e.referenceAnnotationSource?.kind==="direct-stage-v1")&&(e.referenceAnnotationSource.ownership="organizer"),e}function m(e){return e.type==="shape"&&h(e)}function h(e){return(e.type==="shape"||e.type==="text")&&(e.labelImportance==="orientation"||e.referenceAnnotationSource?.kind==="direct-landmark-v1")}function S(e){return e.referenceImage??(e.backgroundImage?.assetId?e.backgroundImage:void 0)}function g(e){let n=e.backgroundImage;return n?.url&&!n.assetId?n:void 0}function o(e){let n=g(e);if(!n?.url)return;let{calibration:a,derivedScale:r,assetId:y,...u}=n;return u}function C(e){let n=a=>{let r=a.backgroundImage;r?.assetId&&(a.referenceImage||(a.referenceImage=r,a.backgroundImage=void 0))};n(e);for(let a of e.floors??[])n(a);return e}function i(e){let n={...e};return t(n),delete n.editor,n}function d(e){let n={...e};return delete n.referenceCategorySource,delete n.referenceDirectSeatImport,n}function x(e){let n=o(e),a=e.floors?.map(r=>({...r,objects:r.objects.map(i),referenceImage:void 0,backgroundImage:o(r)}));return{...e,categories:e.categories.map(d),objects:e.objects.map(i),referenceImage:void 0,venueSurveyRegistrations:void 0,backgroundImage:n,...a?{floors:a}:{}}}function O(e){return!!e.referenceImage?.assetId&&!!e.backgroundImage?.assetId&&e.referenceImage.assetId!==e.backgroundImage.assetId}var _=24,L=2,H={facilities:"Facilities","food-drink":"Food & drink",navigation:"Getting around",accessibility:"Accessibility"},N=["facilities","food-drink","navigation","accessibility"],c="M13 4.6a1.6 1.6 0 1 0-3.2 0 1.6 1.6 0 0 0 3.2 0 M11 6.5V13h5l2.4 6 M15 16.4A5 5 0 1 1 9 11.3",s=[{key:"restroom-men",label:"Men's restroom",group:"facilities",path:"M16 7a4 4 0 1 0-8 0 4 4 0 0 0 8 0 M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"},{key:"restroom-women",label:"Women's restroom",group:"facilities",path:"M15 5a3 3 0 1 0-6 0 3 3 0 0 0 6 0 M12 8l-4 10h8l-4-10 M10 18v4 M14 18v4"},{key:"restroom-accessible",label:"Accessible restroom",group:"facilities",path:c},{key:"first-aid",label:"First aid",group:"facilities",path:"M5 4h14a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Z M12 8v8 M8 12h8"},{key:"coat-check",label:"Coat check",group:"facilities",path:"M12 6a2 2 0 0 1 0-4 2 2 0 0 1 1.6 3.2L21 13H3l8.4-7.8 M3 13h18"},{key:"atm",label:"ATM / cash",group:"facilities",path:"M2 6h20v12H2V6Z M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0 M6 9h.01 M18 15h.01"},{key:"info",label:"Info point",group:"facilities",path:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18 M12 11v5 M12 8h.01"},{key:"lost-found",label:"Lost & found",group:"facilities",path:"M11 4a7 7 0 1 0 0 14 7 7 0 0 0 0-14 M16 16l5 5 M9 8.5a2 2 0 1 1 3 1.7c-.8.5-1 .8-1 1.8 M11 15h.01"},{key:"restrooms",label:"Restrooms",group:"facilities",path:"M6 3h12a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z M12 8a2 2 0 1 0 0 4 2 2 0 0 0 0-4 M9 18v-3.5a3 3 0 0 1 6 0V18"},{key:"charging",label:"Charging point",group:"facilities",path:"M3 8h13v8H3V8Z M16 10h3v4h-3 M9.6 9l-2 3.5h2.5l-1.5 3"},{key:"smoking",label:"Smoking area",group:"facilities",path:"M2 15h13v3H2v-3Z M18 16h2 M19 8c0 1 1 1.5 1 2.5S19 12 19 13"},{key:"no-smoking",label:"No smoking",group:"facilities",path:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18 M5.6 5.6l12.8 12.8 M7 13h6v2H7v-2Z"},{key:"food",label:"Food",group:"food-drink",path:"M7 3v6a2 2 0 0 0 4 0V3 M9 11v10 M17 3c-1.6 1-2.2 3-2.2 6 0 2 .9 3.2 2.2 3.6V21"},{key:"bar",label:"Bar",group:"food-drink",path:"M4 5h16l-8 8-8-8Z M12 13v6 M8 20h8"},{key:"coffee",label:"Caf\xE9 / coffee",group:"food-drink",path:"M4 8h13v4a5 5 0 0 1-5 5H9a5 5 0 0 1-5-5V8Z M17 9h2a2 2 0 0 1 0 4h-2 M8 2v2 M11 2v2 M4 21h14"},{key:"water",label:"Water / drinks",group:"food-drink",path:"M12 22a7 7 0 0 1-7-7c0-5 7-12 7-12s7 7 7 12a7 7 0 0 1-7 7Z"},{key:"merch",label:"Merch / shop",group:"food-drink",path:"M6 8h12l-1 12H7L6 8Z M9 8V6a3 3 0 0 1 6 0v2"},{key:"screen",label:"Screen",group:"facilities",path:"M3 4h18v12H3V4Z M9 20h6 M12 16v4 M10 8l4 2-4 2V8Z"},{key:"sound-booth",label:"Sound booth",group:"facilities",path:"M6 4v16 M6 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4 M12 4v16 M12 8a2 2 0 1 0 0 4 2 2 0 0 0 0-4 M18 4v16 M18 12a2 2 0 1 0 0 4 2 2 0 0 0 0-4"},{key:"entrance",label:"Entrance",group:"navigation",path:"M14 3h5a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-5 M3 12h11 M10 8l4 4-4 4"},{key:"exit",label:"Exit",group:"navigation",path:"M10 3H5a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h5 M14 12h7 M17 8l4 4-4 4"},{key:"emergency-exit",label:"Emergency exit",group:"navigation",path:"M14 4.6a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0 M12.5 8l-3.5 2 1.6 3.6-2 4.4 M12.5 10l3.5 1.5 M9 10.5l-3.5 1 M15 12h6 M18 9l3 3-3 3"},{key:"stairs",label:"Stairs",group:"navigation",path:"M3 20v-4h4v-4h4v-4h4V4h5"},{key:"elevator",label:"Elevator",group:"navigation",path:"M5 3h14a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z M8 11l1.5-2 1.5 2 M8 14l1.5 2 1.5-2 M15 8v8"},{key:"parking",label:"Parking",group:"navigation",path:"M5 3h14a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z M9 17V7h4a3 3 0 0 1 0 6H9"},{key:"wheelchair",label:"Wheelchair access",group:"accessibility",path:c},{key:"hearing",label:"Hearing assistance",group:"accessibility",path:"M8 20a4 4 0 0 1-2-3c0-1 .5-2 .5-3a4.5 4.5 0 1 1 9 0c0 1.4-1 2-2 2.4-1.2.5-1.5 1-1.5 2.2 M17 6a5 5 0 0 1 1 6 M19.5 4a8 8 0 0 1 1.2 9"}],A={wall:"M3 5h18v14H3V5Z M3 9.7h18 M3 14.3h18 M9 5v4.7 M15 5v4.7 M6 9.7v4.6 M12 9.7v4.6 M18 9.7v4.6 M9 14.3v4.7 M15 14.3v4.7",rail:"M3 7h18 M4 17h16 M6 7v10 M10 7v10 M14 7v10 M18 7v10",suite:"M3 4h18v16H3V4Z M6 17v-5h12v5 M8 12V9h8v3",obstruction:"M8 3h8l-1 4v10l1 4H8l1-4V7L8 3Z M9 7h6 M9 17h6"},l=new Map(s.map(e=>[e.key,e]));function f(e){return e?l.get(e):void 0}function P(e){return f(e)?.path}function R(e){return typeof e=="string"&&l.has(e)}var D=s.map(e=>e.key);var Z=["butt","round","square"],B=["miter","round","bevel"],F=["none","arrow"],M="round",k="round",p="none";function v(e){return e==="line"||e==="polyline"}function U(e){return e==="polygon"||v(e)}function j(e){return{lineCap:e.lineCap??M,lineJoin:e.lineJoin??k,startEnding:e.startEnding??p,endEnding:e.endEnding??p}}function w(e){return{pointerLength:Math.min(48,Math.max(8,e*3)),pointerWidth:Math.min(40,Math.max(8,e*2.25))}}export{b as a,m as b,h as c,S as d,g as e,C as f,x as g,O as h,_ as i,L as j,H as k,N as l,s as m,A as n,f as o,P as p,R as q,D as r,Z as s,B as t,F as u,M as v,k as w,p as x,v as y,U as z,j as A,w as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ba as d,oa as b,sa as p,ta as h,ya as I}from"./chunk-
|
|
1
|
+
import{Ba as d,oa as b,sa as p,ta as h,ya as I}from"./chunk-KN7GLEAI.js";var m="__sl_ga__",f=1e5,v=1e5;function j(t,e){return`${m}${encodeURIComponent(t)}__${e+1}`}function S(t){let e=t.inventorySegments;if(e===void 0)return!0;if(!Array.isArray(e)||e.length<1||e.length>256)return!1;let r=0,i=new Map;for(let o of e){if(!o||typeof o.sourceAreaId!="string"||!o.sourceAreaId.trim()||o.sourceAreaId.length>160||!Number.isInteger(o.startIndex)||o.startIndex<0||!Number.isInteger(o.count)||o.count<1||o.startIndex+o.count>f||(r+=o.count,r>f))return!1;let u=i.get(o.sourceAreaId)??[],n=o.startIndex+o.count;if(u.some(s=>o.startIndex<s.end&&n>s.start))return!1;u.push({start:o.startIndex,end:n}),i.set(o.sourceAreaId,u)}return r===t.capacity}function A(t){let e=Math.min(f,Math.max(0,Math.floor(t.capacity)));return t.inventorySegments===void 0?e?[{sourceAreaId:t.id,startIndex:0,count:e}]:[]:S(t)?t.inventorySegments.map(r=>({...r})):[]}function y(t){return A(t).flatMap(e=>Array.from({length:e.count},(r,i)=>j(e.sourceAreaId,e.startIndex+i)))}function M(t,e){if(t.inventorySegments===void 0||e===t.capacity)return t.inventorySegments;if(e<t.capacity)return;let r=A(t);if(!r.length)return;let i=e-t.capacity;if(!i)return r;let u=r.filter(s=>s.sourceAreaId===t.id).reduce((s,a)=>Math.max(s,a.startIndex+a.count),0),n=r[r.length-1];if(n?.sourceAreaId===t.id&&n.startIndex+n.count===u)n.count+=i;else{if(r.length>=256)return;r.push({sourceAreaId:t.id,startIndex:u,count:i})}return r}function R(t){return d(t).filter(e=>e.type==="gaArea")}function N(t){return t.startsWith(m)}var g="__ungrouped__";function x(t){return t.type==="row"?b(t).map(e=>e.label):t.type==="table"?p(t).map(e=>e.label):t.type==="booth"?h(t).map(e=>e.label):t.type==="gaArea"?y(t):[]}function O(t){return t.type==="row"||t.type==="table"||t.type==="booth"||t.type==="gaArea"}function _(t){let e=d(t),r=e.filter(n=>n.type==="section"),i=new Map;for(let n of r){let s=n.logicalSectionId??n.id;i.get(s)||i.set(s,{id:s,label:n.displayLabel||n.label||"Section",zone:n.zone,seatCount:0,objectIds:[],seatLabels:[]})}let o={id:g,label:"Other seats",seatCount:0,objectIds:[],seatLabels:[]},u=new Map;for(let n of e){if(!O(n))continue;let s=x(n);if(s.length===0)continue;let a=I(e,n),c=a?i.get(a.logicalSectionId??a.id):o;c.seatCount+=s.length,c.objectIds.push(n.id),c.seatLabels.push(...s),u.set(n.id,c.id)}return{sections:[...i.values()],ungrouped:o.objectIds.length?o:null,objectToSection:u}}function C(t,e){return e.has(t.id)||!!t.logicalSectionId&&e.has(t.logicalSectionId)||!!t.zone&&e.has(t.zone)}function G(t,e){let r=new Set;if(!e.size)return r;let{sections:i,ungrouped:o,objectToSection:u}=_(t),n=new Set,s=new Map(i.map(c=>[c.id,c.zone]));for(let c of i){let l=s.get(c.id);(e.has(c.id)||l&&e.has(l))&&n.add(c.id)}let a=!!o&&e.has(g);for(let[c,l]of u)(n.has(l)||a&&l===g)&&r.add(c);return r}function U(t,e){if(!e.size)return t;let r=G(t,e),i=e instanceof Set?e:new Set(e),o=n=>!(r.has(n.id)||n.type==="section"&&C(n,i));if(t.floors&&t.floors.length){let n=!1,s=t.floors.map(a=>{let c=a.objects.filter(o);return c.length!==a.objects.length&&(n=!0),c.length===a.objects.length?a:{...a,objects:c}});return n?{...t,floors:s,objects:s[0].objects}:t}let u=t.objects.filter(o);return u.length===t.objects.length?t:{...t,objects:u}}export{f as a,v as b,j as c,S as d,A as e,y as f,M as g,R as h,N as i,g as j,_ as k,C as l,G as m,U as n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as b}from"./chunk-
|
|
1
|
+
import{o as b}from"./chunk-BAWUBGWY.js";var l="seatlayer.event-configuration/1",p="seatlayer.event-configuration-export/1",c=100,_=120,S=1e5,k=1e4,y=/^[a-f0-9]{64}$/,x=new Set(["stage","screen","barrier","camera_platform","sound_desk","rigging_truss"]);function d(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function u(e,n){return typeof e=="string"&&e.length>=1&&e.length<=n&&e.normalize("NFKC").trim()===e}function E(e){return typeof e=="number"&&Number.isInteger(e)&&e>0}function v(e){return!Array.isArray(e)||e.length>S||!e.every(n=>u(n,c))?null:[...new Set(e)].sort()}function C(e){return!d(e)||!u(e.chartId,c)||!u(e.version,c)||e.sha256!==void 0&&(typeof e.sha256!="string"||!y.test(e.sha256))?null:{chartId:e.chartId,version:e.version,...typeof e.sha256=="string"?{sha256:e.sha256}:{}}}function m(e,n,t){return typeof e=="number"&&Number.isFinite(e)&&e>=n&&e<=t}function V(e){return d(e)?e.mode==="none"||e.mode==="opaque"?e.opacity===void 0?{mode:e.mode}:null:e.mode==="partial"&&m(e.opacity,.01,.99)?{mode:"partial",opacity:e.opacity}:null:null}function j(e,n){if(e===void 0)return;if(!Array.isArray(e)||e.length>k)return null;let t=new Set(n),s=new Set,i=new Set,r=0,a=[];for(let o of e){if(!d(o)||!u(o.id,c)||!u(o.objectId,c)||!t.has(o.objectId)||!x.has(String(o.kind))||!m(o.heightM,.05,50)||o.baseElevationM!==void 0&&!m(o.baseElevationM,-10,100))return null;let f=V(o.occlusion);if(!f||s.has(o.id)||i.has(o.objectId))return null;let g=o.contentImageUrl===void 0?void 0:typeof o.contentImageUrl=="string"?b(o.contentImageUrl):null;if(o.contentImageUrl!==void 0&&(!g||o.kind!=="screen"||++r>1))return null;s.add(o.id),i.add(o.objectId),a.push({id:o.id,objectId:o.objectId,kind:o.kind,heightM:o.heightM,...o.baseElevationM!==void 0?{baseElevationM:o.baseElevationM}:{},occlusion:f,...g?{contentImageUrl:g}:{}})}return a.sort((o,f)=>o.id.localeCompare(f.id))}function I(e){let n=[];if(!d(e))return{issues:[{code:"invalid_export",path:"configuration",message:"Configuration must be an object"}]};e.schema!==l&&n.push({code:"unsupported_schema",path:"configuration.schema",message:`Configuration schema must be ${l}`}),u(e.id,c)||n.push({code:"invalid_id",path:"configuration.id",message:"Configuration id must contain 1 to 100 normalized characters"}),u(e.label,_)||n.push({code:"invalid_label",path:"configuration.label",message:"Configuration label must contain 1 to 120 normalized characters"}),E(e.version)||n.push({code:"invalid_version",path:"configuration.version",message:"Configuration version must be a positive integer"});let t=C(e.baseVenue);t||n.push({code:"invalid_base_venue",path:"configuration.baseVenue",message:"Base venue must identify one normalized chart id and exact version"});let s=d(e.overlay)?e.overlay:null,i=v(s?.objectIds),r=v(s?.productionKillSeatIds),a=i?j(s?.productionElements,i):null;return(!s||!i||!r)&&n.push({code:"invalid_overlay",path:"configuration.overlay",message:"Overlay ids must be bounded arrays of normalized stable ids"}),a===null&&n.push({code:"invalid_production_element",path:"configuration.overlay.productionElements",message:"Production elements must be unique, bounded semantics over referenced base-venue objects"}),n.length||!t||!i||!r||a===null?{issues:n}:{issues:n,value:{schema:l,id:e.id,label:e.label,version:e.version,baseVenue:t,overlay:{objectIds:i,productionKillSeatIds:r,...a!==void 0?{productionElements:a}:{}}}}}function R(e){let n=I(e);return n.value?{ok:!0,value:n.value}:{ok:!1,issues:n.issues}}function P(e){if(!d(e))return{ok:!1,issues:[{code:"invalid_export",path:"",message:"Export must be an object"}]};let n=[];e.schema!==p&&n.push({code:"unsupported_schema",path:"schema",message:`Export schema must be ${p}`}),(typeof e.contentSha256!="string"||!y.test(e.contentSha256))&&n.push({code:"invalid_checksum",path:"contentSha256",message:"Export checksum must be a lowercase SHA-256 digest"});let t=I(e.configuration);return n.push(...t.issues),n.length||!t.value||typeof e.contentSha256!="string"?{ok:!1,issues:n}:{ok:!0,value:{schema:p,configuration:t.value,contentSha256:e.contentSha256}}}function A(e){return JSON.stringify({schema:l,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((n,t)=>n.id.localeCompare(t.id)).map(n=>({id:n.id,objectId:n.objectId,kind:n.kind,heightM:n.heightM,...n.baseElevationM!==void 0?{baseElevationM:n.baseElevationM}:{},occlusion:n.occlusion,...n.contentImageUrl?{contentImageUrl:n.contentImageUrl}:{}}))}:{}}})}function N(e,n){let t=[];e.baseVenue.chartId!==n.chartId&&t.push({code:"base_venue_mismatch",message:"Configuration belongs to a different base venue"}),e.baseVenue.version!==n.version&&t.push({code:"base_venue_version_mismatch",message:"Configuration was authored against a different venue version"}),e.baseVenue.sha256&&!n.sha256?t.push({code:"base_venue_checksum_missing",message:"Venue checksum is required for this configuration"}):e.baseVenue.sha256&&e.baseVenue.sha256!==n.sha256&&t.push({code:"base_venue_checksum_mismatch",message:"Venue bytes do not match the configuration base"});let s=new Set(n.objectIds);for(let r of e.overlay.objectIds)s.has(r)||t.push({code:"overlay_object_missing",message:`Production object ${r} is missing from the base venue`,targetId:r});if(n.objectTypes)for(let r of e.overlay.productionElements??[])n.objectTypes.get(r.objectId)!=="shape"&&t.push({code:"production_element_not_shape",message:`Production element ${r.id} must reference base-venue shape geometry`,targetId:r.objectId});let i=new Set(n.seatIds);for(let r of e.overlay.productionKillSeatIds)i.has(r)||t.push({code:"production_kill_seat_missing",message:`Production-kill seat ${r} is missing from the base venue`,targetId:r});return{compatible:t.length===0,issues:t}}var w={draft:new Set(["review","archived"]),review:new Set(["draft","approved","archived"]),approved:new Set(["published","archived"]),published:new Set(["archived"]),archived:new Set};function T(e,n){return e===n||w[e].has(n)}function L(e,n,t){return!E(t)||t>=n.version?null:e.find(s=>s.id===n.id&&s.version===t&&s.status==="published")??null}function O(e){return e.floors?.length?e.floors.flatMap(n=>n.objects):e.objects}function h(e,n,t){if(!(!e||typeof e!="object")){if(Array.isArray(e)){for(let s of e)h(s,n,t);return}for(let[s,i]of Object.entries(e)){if(s==="eventConfigurationId"){u(i,c)?n.add(i):i!==void 0&&t.add(String(i));continue}if(s==="eventConfigurationIds"){if(!Array.isArray(i))t.add(String(i));else for(let r of i)u(r,c)?n.add(r):t.add(String(r));continue}h(i,n,t)}}}function U(e,n){let t=C(n);if(!t)return{ok:!1,invalidIds:["baseVenue"]};let s=new Set,i=new Set;if(h(e,s,i),i.size)return{ok:!1,invalidIds:[...i].sort()};let r=O(e);return{ok:!0,configurations:[...s].sort().map(a=>({schema:l,id:a,label:a,version:1,baseVenue:t,overlay:{objectIds:r.filter(o=>o.type==="shape"&&o.eventConfigurationIds?.includes(a)).map(o=>o.id).sort(),productionKillSeatIds:[]}}))}}export{l as a,p as b,R as c,P as d,A as e,N as f,T as g,L as h,U as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ca as B,Fa as F,x as j}from"./chunk-
|
|
1
|
+
import{Ca as B,Fa as F,x as j}from"./chunk-KN7GLEAI.js";var L=.08,X=.045;function E(t,e,n){return{...t,objects:e,floors:void 0,...n?{focalPoint:n}:{},referenceImage:void 0,backgroundImage:void 0}}function T(t,e,n){let o=t.focalPoint??e.focalPoint;return o?o.x:n.x+n.width/2}function Y(t){let e=t.floors??[];if(!e.length)return[];let n=e.map(s=>F(E(t,s.objects,s.focalPoint),{freeText:"exclude"})),a=Math.max(1,...n.map(s=>s.width))*L,r=0;return e.map((s,l)=>{let h=n[l],u=r-(h.y+h.height);return r-=h.height+a,{floorId:s.id,label:s.name??s.id,level:l,levelBadge:l===0?"G":String(l),translation:{x:-T(s,t,h),y:u},bounds:h}})}function _(t,e,n,o){let a=e==="name"?t.label:t.levelBadge;if(!a)return[];let r=Math.max(1,n*X),s=t.bounds.x+t.translation.x,l=t.bounds.y+t.translation.y+r*.4,h=`floor-level-${t.floorId}`,u={type:"text",id:`${h}-text`,text:a,position:{x:s,y:l},fontSize:r,rotation:0,color:o,bold:!0};if(e==="name")return[u];let m=r*.95;return[{type:"shape",id:`${h}-badge`,kind:"ellipse",x:s-m*.35,y:l-m*.3,width:m*2,height:m*2,fill:"transparent",stroke:{color:o,width:Math.max(1,r*.09)},opacity:.8},u]}function z(t,e={}){let n=t.floors;if(!n||n.length<2)return t;let o=Y(t),a=[];n.forEach((u,m)=>{let{x:y,y:S}=o[m].translation;for(let w of u.objects)m>0&&w.type==="shape"&&w.role==="stage"||a.push(B(w,y,S))});let r={...t,objects:a,floors:void 0},s=F(r,{freeText:"exclude"}),l=Math.max(1,s.width,s.height),h=t.theme?.textColor??"#94a3b8";for(let u of o)a.push(..._(u,e.labelStyle??"number",l,h));return{...r,objects:a,referenceImage:void 0,backgroundImage:void 0}}function Q(t){let e=t.floors;if(!e?.length)return null;let n=e.find(r=>r.objects.some(s=>s.type==="shape"&&s.role==="stage"));if(n)return n.id;let o=e[0],a=-1;for(let r of e){let s=F(E(t,r.objects,r.focalPoint),{freeText:"exclude"}),l=s.width*s.height;l>a&&(a=l,o=r)}return o.id}var N=640;function H(t,e){return(t.floors?.length??0)<2?null:!Number.isFinite(e)||e<=0||e>=N?"all":Q(t)}var U=9;function $(t){if(t.kind==="circle")return{hx:t.r,hy:t.r};let e=t.width/2,n=t.height/2,o=t.rotation??0;if(!o)return{hx:e,hy:n};let a=o*Math.PI/180,r=Math.abs(Math.cos(a)),s=Math.abs(Math.sin(a));return{hx:e*r+n*s,hy:e*s+n*r}}function q(t,e,n){let o=e-t.seat.x,a=n-t.seat.y;if(t.shape.kind==="circle")return o*o+a*a<=t.shape.r*t.shape.r;let r=t.shape.rotation??0,s=o,l=a;if(r){let h=-r*Math.PI/180,u=Math.cos(h),m=Math.sin(h);s=o*u-a*m,l=o*m+a*u}return Math.abs(s)<=t.shape.width/2&&Math.abs(l)<=t.shape.height/2}function G(t,e,n,o,a){if(t.shape.kind==="circle"){let d=Math.min(Math.max(t.seat.x,e),o),x=Math.min(Math.max(t.seat.y,n),a),f=t.seat.x-d,b=t.seat.y-x;return f*f+b*b<=t.shape.r*t.shape.r}let r=t.shape.rotation??0;if(!r)return t.seat.x-t.hx<=o&&t.seat.x+t.hx>=e&&t.seat.y-t.hy<=a&&t.seat.y+t.hy>=n;let s=r*Math.PI/180,l=Math.cos(s),h=Math.sin(s),u=t.shape.width/2,m=t.shape.height/2,y=[[-u,-m],[u,-m],[u,m],[-u,m]].map(([d,x])=>[t.seat.x+d*l-x*h,t.seat.y+d*h+x*l]),S=[[e,n],[o,n],[o,a],[e,a]],w=[[1,0],[0,1],[l,h],[-h,l]];for(let[d,x]of w){let f=1/0,b=-1/0;for(let[P,O]of y){let c=P*d+O*x;c<f&&(f=c),c>b&&(b=c)}let M=1/0,I=-1/0;for(let[P,O]of S){let c=P*d+O*x;c<M&&(M=c),c>I&&(I=c)}if(b<M||I<f)return!1}return!0}function W(t,e={}){let n=e.seatRadius??U,o=t.length,a=new Array(o),r=1/0,s=1/0,l=-1/0,h=-1/0,u=0;for(let c=0;c<o;c++){let i=t[c],D=e.shapeOf?.(i)??{kind:"circle",r:n},{hx:g,hy:p}=$(D);a[c]={seat:i,shape:D,hx:g,hy:p},i.x-g<r&&(r=i.x-g),i.y-p<s&&(s=i.y-p),i.x+g>l&&(l=i.x+g),i.y+p>h&&(h=i.y+p),g>u&&(u=g),p>u&&(u=p)}o===0&&(r=0,s=0,l=0,h=0);let m=u>0?u*4:1,y=Math.max(l-r,0),S=Math.max(h-s,0),w=Math.max(64,e.maxCells??o*4),d=m,x=Math.max(1,Math.ceil(y/d)||1),f=Math.max(1,Math.ceil(S/d)||1);for(;x*f>w&&(x>1||f>1);)d*=2,x=Math.max(1,Math.ceil(y/d)||1),f=Math.max(1,Math.ceil(S/d)||1);let b=x*f,M=new Int32Array(b+1),I=0;for(let c=0;c<o;c++){let i=a[c],D=j(Math.floor((i.seat.x-i.hx-r)/d),0,x-1),g=j(Math.floor((i.seat.x+i.hx-r)/d),0,x-1),p=j(Math.floor((i.seat.y-i.hy-s)/d),0,f-1),R=j(Math.floor((i.seat.y+i.hy-s)/d),0,f-1);for(let C=p;C<=R;C++)for(let A=D;A<=g;A++)M[C*x+A+1]++,I++}for(let c=0;c<b;c++)M[c+1]+=M[c];let P=new Int32Array(I),O=M.slice(0,b);for(let c=0;c<o;c++){let i=a[c],D=j(Math.floor((i.seat.x-i.hx-r)/d),0,x-1),g=j(Math.floor((i.seat.x+i.hx-r)/d),0,x-1),p=j(Math.floor((i.seat.y-i.hy-s)/d),0,f-1),R=j(Math.floor((i.seat.y+i.hy-s)/d),0,f-1);for(let C=p;C<=R;C++)for(let A=D;A<=g;A++){let k=C*x+A;P[O[k]++]=c}}return{seats:t,entries:a,minX:r,minY:s,cell:d,cols:x,rows:f,cellStart:M,items:P,stamp:new Int32Array(o),epoch:0}}function tt(t,e,n={}){let{cols:o,rows:a,cell:r,minX:s,minY:l,cellStart:h,items:u,entries:m}=t,y=Math.floor((e.x-s)/r),S=Math.floor((e.y-l)/r);if(y<0||S<0||y>=o||S>=a)return null;let w=S*o+y,d=h[w+1],x=-1,f=1/0;for(let b=h[w];b<d;b++){let M=u[b],I=m[M];if(n.filter&&!n.filter(I.seat.id,I.seat)||!q(I,e.x,e.y))continue;let P=e.x-I.seat.x,O=e.y-I.seat.y,c=P*P+O*O;(c<f||c===f&&M<x)&&(f=c,x=M)}return x<0?null:m[x].seat.id}function et(t,e,n,o={}){if(!(n>0))return null;let{cols:a,rows:r,cell:s,minX:l,minY:h,cellStart:u,items:m,entries:y}=t,S=Math.max(0,Math.floor((e.x-n-l)/s)),w=Math.min(a-1,Math.floor((e.x+n-l)/s)),d=Math.max(0,Math.floor((e.y-n-h)/s)),x=Math.min(r-1,Math.floor((e.y+n-h)/s));if(S>w||d>x)return null;let f=-1,b=n*n,M=t.stamp,I=++t.epoch;for(let P=d;P<=x;P++){let O=P*a;for(let c=S;c<=w;c++){let i=O+c,D=u[i+1];for(let g=u[i];g<D;g++){let p=m[g];if(M[p]===I)continue;M[p]=I;let R=y[p];if(o.filter&&!o.filter(R.seat.id,R.seat))continue;let C=e.x-R.seat.x,A=e.y-R.seat.y,k=C*C+A*A;(k<b||k===b&&p<f)&&(b=k,f=p)}}}return f<0?null:y[f].seat.id}function nt(t,e,n={}){let o=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),s=Math.max(e.y,e.y+e.height),l=n.mode??"center",{cols:h,rows:u,cell:m,minX:y,minY:S,cellStart:w,items:d,entries:x}=t,f=Math.max(0,Math.floor((o-y)/m)),b=Math.min(h-1,Math.floor((a-y)/m)),M=Math.max(0,Math.floor((r-S)/m)),I=Math.min(u-1,Math.floor((s-S)/m));if(f>b||M>I)return[];let P=[],O=t.stamp,c=++t.epoch;for(let i=M;i<=I;i++){let D=i*h;for(let g=f;g<=b;g++){let p=D+g,R=w[p+1];for(let C=w[p];C<R;C++){let A=d[C];if(O[A]===c)continue;O[A]=c;let k=x[A];if(n.filter&&!n.filter(k.seat.id,k.seat))continue;(l==="center"?k.seat.x>=o&&k.seat.x<=a&&k.seat.y>=r&&k.seat.y<=s:G(k,o,r,a,s))&&P.push(A)}}}return P.sort((i,D)=>i-D),P.map(i=>x[i].seat.id)}function ot(t){let e=t.cols*t.rows,n=0,o=0;for(let r=0;r<e;r++){let s=t.cellStart[r+1]-t.cellStart[r];s>0&&n++,s>o&&(o=s)}let a=t.items.length;return{cell:t.cell,cols:t.cols,rows:t.rows,cells:e,occupiedCells:n,refs:a,maxPerCell:o,meanPerOccupiedCell:n?a/n:0}}function st(t,e=0){let n=Math.max(1,t.width,t.height),o={x:t.x+t.width/2,y:t.y+t.height/2},a=n*1.55,r=Math.max(n*.82,Math.max(0,e)+n*.45);return{target:o,distance:a,height:r,focalLength:Math.hypot(a,r),yawRad:-8*Math.PI/180}}function v(t,e,n=0){let o=e.x-t.target.x,a=e.y-t.target.y,r=Math.cos(t.yawRad),s=Math.sin(t.yawRad),l=o*r-a*s,u=o*s+a*r-t.distance,m=n-t.height,y=Math.hypot(t.distance,t.height),S=(-t.distance*u-t.height*m)/y,w=(-t.height*u+t.distance*m)/y,d=Math.max(y*.08,S),x=t.focalLength/d;return{x:t.target.x+l*x,y:t.target.y-w*x,depth:d,scale:x}}function at(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 ct(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 n=t.d/e,o=-t.b/e,a=-t.c/e,r=t.a/e;return{a:n,b:o,c:a,d:r,e:-(n*t.e+a*t.f),f:-(o*t.e+r*t.f)}}function it(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 lt(t,e,n=()=>0){let o=v(t,e,n(e)),a={x:e.x+1,y:e.y},r={x:e.x,y:e.y+1},s=v(t,a,n(a)),l=v(t,r,n(r)),h=s.x-o.x,u=s.y-o.y,m=l.x-o.x,y=l.y-o.y;return{a:h,b:u,c:m,d:y,e:o.x-h*e.x-m*e.y,f:o.y-u*e.x-y*e.y}}function ht(t){let e=Math.hypot(t.a,t.b),n=t.a*t.d-t.b*t.c;return{rotationDeg:Math.atan2(t.b,t.a)*180/Math.PI,scaleX:e,scaleY:n/Math.max(e,1e-9),skewX:(t.a*t.c+t.b*t.d)/Math.max(n,1e-9)}}export{L as a,Y as b,z as c,Q as d,N as e,H as f,U as g,W as h,tt as i,et as j,nt as k,ot as l,st as m,v as n,at as o,ct as p,it as q,lt as r,ht as s};
|