PageSourceSearch

https://sprint-track-editor.vercel.app/_next/static/chunks/app/pag…?dpl=dpl_FYeUhVpkhC4abojRgAbZ89VCy4g6

js sprint-track-editor.vercel.app collected 2026-10-03 07:47:19 UTC 102,464 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{2241:(e,t,n)=>{"use strict";n.d(t,{default:()=>ex});var l=n(5155),r=n(2115),i=n(5229),o=n(9074),a=n(4033),s=n(6132),d=n(3538),c=n(430),u=n(1283),m=n(5917),g=n(1786),p=n(368),h=n(8314),x=n(4893),f=n(5172),y=n(9096),b=n.n(y);let v="en"===new URLSearchParams(window.location.search).get("lang")?"en":"nl",j=(e,t)=>"en"===v?t:e,F=[{name:j("Wit","White"),file:"White.jpg",color:"#f5f5f5"},{name:j("Zwart","Black"),file:"Black.jpg",color:"#171717"},{name:j("Blauw","Blue"),file:"Blue.jpg",color:"#032D83"},{name:j("Cr\xe8me","Cream"),file:"Cream.jpg",color:"#B99573"},{name:j("Donkergrijs","Dark Grey"),file:"Dark Grey.jpg",color:"#393A35"},{name:j("Goud","Gold"),file:"Gold.jpg",color:"#7A5E1C"},{name:j("Groen","Green"),file:"Green.jpg",color:"#5E8337"},{name:j("Lichtblauw","Light Blue"),file:"Light Blue.jpg",color:"#0E5ABA"},{name:j("Lichtgrijs","Light Grey"),file:"Light Grey.jpg",color:"#A7A7A7"},{name:j("Oranje","Orange"),file:"Orange.jpg",color:"#DB4421"},{name:j("Roze","Pink"),file:"Pink.jpg",color:"#CC3596"},{name:j("Paars","Purple"),file:"Purple.jpg",color:"#6526B6"},{name:j("Rood klei","Red Clay"),file:"Red Clay.jpg",color:"#692215"},{name:j("Signaalrood","Signal Red"),file:"Signal Red.jpg",color:"#B4000D"},{name:j("Geel","Yellow"),file:"Yellow.jpg",color:"#E6CE50"}],S=[{id:"segoe",name:"Segoe UI Bold",sub:j("systeemfont","system font"),family:"'Segoe UI', 'Helvetica Neue', Arial, sans-serif"},{id:"united-sans",name:"United Sans Reg BLACK",sub:"≈ Rubik Black",family:"'Rubik', sans-serif"},{id:"gotham",name:"Gotham Black",sub:"≈ Montserrat Black",family:"'Montserrat', sans-serif"},{id:"ethnocentric",name:"EthnocentricRg",sub:j("eigen font","custom font"),family:"'Ethnocentric', sans-serif"},{id:"industry",name:"Industry Inc Base",sub:"≈ Teko",family:"'Teko', sans-serif"}],C=e=>e?"string"==typeof e?{text:e,fontFamily:T,fontSizeCm:25,color:null,alignment:"center"}:{text:"",fontFamily:T,fontSizeCm:25,color:null,alignment:"center",...e}:{text:"",fontFamily:T,fontSizeCm:25,color:null,alignment:"center"},w=[j("Template","Template"),j("Afmeting","Size"),j("Markeringen","Markings"),j("Logo","Logo"),j("Tekst","Text"),j("Kleuren","Colors")],k=[{title:j("Template kiezen","Select a template"),desc:j("Kies een startpunt voor je ontwerp.","Choose a starting point for your design.")},{title:j("Afmeting & banen","Size & lanes"),desc:j("Stel de breedte en lengte in, en kies de baanindeling.","Set the width and length, and choose the lane layout.")},{title:j("Markeringen","Markings"),desc:j("Voeg linialen, nummering en start/finish toe.","Add rulers, numbering and start/finish markings.")},{title:j("Logo's","Logos"),desc:j("Upload en positioneer je logo's op de mat.","Upload and position your logos on the mat.")},{title:j("Tekst","Text"),desc:j("Voeg een tekst toe aan de track.","Add text to the track.")},{title:j("Kleuren","Colors"),desc:j("Kies de kleuren van de mat en markeringen.","Choose the colors of the mat and markings.")}],T="'Funnel Sans', ui-sans-serif, system-ui",A={width:120,length:1e3,columnsEnabled:!1,numColumns:null,columns:[],showRulerLines:!1,rulerStyle:"standard",markingPlacement:"both",showStartFinish:!1,startFinishSize:20,startText:"START",finishText:"FINISH",showNumbering:!1,numberingPlacement:"center",numberingSize:20,numberingMax:null,lineWidth:5,markingType:"standard",sledDistance:10,primaryLogo:null,secondaryLogo:null,textLines:[{text:"",fontFamily:"'Funnel Sans', ui-sans-serif, system-ui",fontSizeCm:25,color:null,alignment:"center"},{text:"",fontFamily:"'Funnel Sans', ui-sans-serif, system-ui",fontSizeCm:25,color:null,alignment:"center"}],fontFamily:"'Funnel Sans', ui-sans-serif, system-ui",textPosition:"left",textRotation:90,primaryTexture:"Black.jpg",secondaryTexture:"Signal Red.jpg",thirdColor:null},z=e=>e>=185?Math.floor(e/92.5):0,M=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Signal Red.jpg",l=["Signal Red.jpg","Orange.jpg","Yellow.jpg","Light Blue.jpg"];return Array.from({length:e},(e,r)=>{var i,o,a,s,d,c,u,m,g,p,h,x,f,y,b,v,j,F,S,C,w,k,T,A,z,M,L,N,R,B,P,E,D;return{active:null==(j=null==(i=t[r])?void 0:i.active)||j,primaryTexture:null!=(F=null==(o=t[r])?void 0:o.primaryTexture)?F:null,secondaryTexture:null!=(C=null!=(S=null==(a=t[r])?void 0:a.secondaryTexture)?S:l[r])?C:n,rulerTexture:null!=(w=null==(s=t[r])?void 0:s.rulerTexture)?w:null,
1startFinishTexture:null!=(k=null==(d=t[r])?void 0:d.startFinishTexture)?k:null,numberingTexture:null!=(T=null==(c=t[r])?void 0:c.numberingTexture)?T:null,markingType:null!=(A=null==(u=t[r])?void 0:u.markingType)?A:"standard",sledDistance:null!=(z=null==(m=t[r])?void 0:m.sledDistance)?z:10,showRulerLines:null!=(M=null==(g=t[r])?void 0:g.showRulerLines)&&M,rulerStyle:null!=(L=null==(p=t[r])?void 0:p.rulerStyle)?L:"standard",markingPlacement:null!=(N=null==(h=t[r])?void 0:h.markingPlacement)?N:"both",showStartFinish:null!=(R=null==(x=t[r])?void 0:x.showStartFinish)&&R,showNumbering:null!=(B=null==(f=t[r])?void 0:f.showNumbering)&&B,numberingPlacement:null!=(P=null==(y=t[r])?void 0:y.numberingPlacement)?P:"center",numberingSize:null!=(E=null==(b=t[r])?void 0:b.numberingSize)?E:20,numberingMax:null!=(D=null==(v=t[r])?void 0:v.numberingMax)?D:null}})},L=e=>{let t=z(e.width);return e.columnsEnabled&&0!==t?Math.min(e.numColumns||t,t):1},N=[{id:"basic",name:"Sprint Track Basic",description:j("1 baan, liniaal en nummering","1 lane, ruler and numbering"),image:"/images/templates/StandardTrack.png",config:{...A,width:200,length:1e3,primaryTexture:"Signal Red.jpg",secondaryTexture:"White.jpg",showRulerLines:!0,markingPlacement:"both",showStartFinish:!0,startText:"START",finishText:"FINISH",startFinishSize:20,showNumbering:!0,numberingPlacement:"center",numberingSize:40,numberingMax:null,lineWidth:5,markingType:"standard",primaryLogo:{url:"/images/templates/PlaceholderLogo.svg",position:"middle",hAlign:"center",sizeCm:120,rotation:90,opacity:1,showBorder:!1,aspectRatio:85/35}}},{id:"hyrox",name:"HYROX Setup",description:j("Burpee + slee, 2 banen","Burpee + sled, 2 lanes"),image:"/images/templates/Hyrox setup.png",config:{...A,width:400,length:1250,primaryTexture:"Black.jpg",secondaryTexture:"White.jpg",columnsEnabled:!0,numColumns:2,columns:[{active:!0,primaryTexture:null,secondaryTexture:"White.jpg",rulerTexture:null,startFinishTexture:null,numberingTexture:null,markingType:"burpee",showRulerLines:!1,markingPlacement:"both",showStartFinish:!1,showNumbering:!1,numberingPlacement:"center",numberingSize:20,numberingMax:null},{active:!0,primaryTexture:null,secondaryTexture:"White.jpg",rulerTexture:null,startFinishTexture:null,numberingTexture:null,markingType:"sled",sledDistance:10,showRulerLines:!1,markingPlacement:"both",showStartFinish:!1,showNumbering:!1,numberingPlacement:"center",numberingSize:20,numberingMax:null}]}},{id:"brand",name:"Brand Mat",description:j("Ruimte voor logo en bedrijfsnaam","Space for logo and company name"),image:"/images/templates/Brand mat.png",config:{...A,width:200,length:1e3,primaryTexture:"Blue.jpg",secondaryTexture:"Yellow.jpg",showRulerLines:!1,showStartFinish:!1,showNumbering:!1,markingType:"standard",textLines:[{text:j("BEDRIJFSNAAM","COMPANY NAME"),fontFamily:"'Funnel Sans', ui-sans-serif, system-ui",fontSizeCm:25,color:null,alignment:"center"},{text:"",fontFamily:"'Funnel Sans', ui-sans-serif, system-ui",fontSizeCm:25,color:null,alignment:"center"}],textPosition:"left",textRotation:90}},{id:"compact",name:"Compact Track",description:j("Scherp contrast met start, finish en nummering","Sharp contrast with start, finish and numbering"),image:"/images/templates/Compact Track.png",config:{...A,width:200,length:1e3,primaryTexture:"Purple.jpg",secondaryTexture:"White.jpg",showRulerLines:!0,markingPlacement:"both",showStartFinish:!0,startText:"START",finishText:"FINISH",startFinishSize:20,showNumbering:!0,numberingPlacement:"center",numberingSize:20,numberingMax:null,lineWidth:5,markingType:"standard"}},{id:"wide",name:"Wide Track",description:j("3 banen met logo in het midden","3 lanes with logo in the center"),image:"/images/templates/Wide track.png",config:{...A,width:300,length:1e3,primaryTexture:"Black.jpg",secondaryTexture:"White.jpg",columnsEnabled:!0,numColumns:3,columns:[{active:!0,primaryTexture:"Orange.jpg",secondaryTexture:"White.jpg",rulerTexture:null,startFinishTexture:null,numberingTexture:null,markingType:"standard",sledDistance:10,showRulerLines:!0,markingPlacement:"both",showStartFinish:!1,showNumbering:!1,numberingPlacement:"center",numberingSize:20,numberingMax:null},{active:!0,primaryTexture:null,secondaryTexture:"White.jpg",rulerTexture:null,startFinis
1hTexture:null,numberingTexture:null,markingType:"standard",sledDistance:10,showRulerLines:!0,markingPlacement:"both",showStartFinish:!1,showNumbering:!1,numberingPlacement:"center",numberingSize:20,numberingMax:null},{active:!0,primaryTexture:"Orange.jpg",secondaryTexture:"White.jpg",rulerTexture:null,startFinishTexture:null,numberingTexture:null,markingType:"standard",sledDistance:10,showRulerLines:!0,markingPlacement:"both",showStartFinish:!1,showNumbering:!1,numberingPlacement:"center",numberingSize:20,numberingMax:null}],primaryLogo:{url:"/images/templates/PlaceholderLogo.svg",position:"middle",hAlign:"center",sizeCm:80,rotation:90,opacity:1,showBorder:!1,aspectRatio:85/35}}}],R=[["Purple.jpg","Blue.jpg"],["Blue.jpg","Purple.jpg"],["Signal Red.jpg","Blue.jpg"],["Blue.jpg","Signal Red.jpg"],["Red Clay.jpg","Blue.jpg"],["Blue.jpg","Red Clay.jpg"],["Green.jpg","Gold.jpg"],["Gold.jpg","Green.jpg"],["Dark Grey.jpg","Blue.jpg"],["Blue.jpg","Dark Grey.jpg"],["Purple.jpg","Dark Grey.jpg"],["Dark Grey.jpg","Purple.jpg"]],B=(e,t,n)=>{if(!e)return{xPct:50,topCm:n/2};if("number"==typeof e.xPct&&"number"==typeof e.topCm)return{xPct:e.xPct,topCm:e.topCm};let l=(e=>"begin"===e?12:"end"===e?85:50)(e.position||"middle"),r=e.hAlign||"center";return{xPct:"left"===r?8:"right"===r?92:50,topCm:l/100*n}},P=(e,t,n,l)=>{var r,i;if(!(null==e?void 0:e.url))return null;let{xPct:o,topCm:a}=B(e,t,n),s=Math.min(e.sizeCm||100,.65*n),d=s*(null!=(i=null!=(r=e.aspectRatio)?r:l)?i:2),c=(e.rotation||0)*Math.PI/180,u=Math.abs(s*Math.cos(c))+Math.abs(d*Math.sin(c)),m=Math.abs(d*Math.cos(c))+Math.abs(s*Math.sin(c)),g=o/100*t;return{top:a-u/2-5,bot:a+u/2+5,left:g-m/2-5,right:g+m/2+5}},E=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1/0,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0;return t.some(t=>t&&e>=t.top&&e<=t.bot&&t.right>n&&t.left<l)},D=(e,t,n,l)=>{let r=(e.textLines||[])[t];return r&&"number"==typeof r.xPct&&"number"==typeof r.topCm?{xPct:r.xPct,topCm:r.topCm}:((e,t,n)=>{if("number"==typeof e.textXPct&&"number"==typeof e.textTopCm)return{xPct:e.textXPct,topCm:e.textTopCm};let l=e.textPosition||"left",r=l.split("-")[0];return{xPct:l.endsWith("left")||"left"===r?8:l.endsWith("right")||"right"===r?92:50,topCm:("begin"===r?12:"end"===r?85:50)/100*n}})(e,0,l)},W=(e,t)=>{var n,l,r,i,o,a,s,d,c,u,m,g,p;let h=null!=(i=null==(n=e.columns)?void 0:n[0])?i:{},x=F.find(t=>{var n;return t.file===(null!=(n=h.primaryTexture)?n:e.primaryTexture)}),y=F.find(t=>{var n;return t.file===(null!=(n=h.secondaryTexture)?n:e.secondaryTexture)}),b=e.thirdColor?F.find(t=>t.file===e.thirdColor):null,w=(e.textLines||[]).map(C).filter(e=>e.text),k=e.columnsEnabled,T=k?(null==(l=e.columns)?void 0:l.length)||1:0,A=null!=(o=null==(r=e.columns)?void 0:r[0])?o:{},z=k?null:null!=(s=null!=(a=A.markingType)?a:e.markingType)?s:"standard",M=k?null:null!=(c=null!=(d=A.showRulerLines)?d:e.showRulerLines)&&c,L=k?null:null!=(m=null!=(u=A.showStartFinish)?u:e.showStartFinish)&&m,N=k?null:null!=(p=null!=(g=A.showNumbering)?g:e.showNumbering)&&p;k||null!=A.sledDistance||e.sledDistance;let R=F.find(t=>{var n;return t.file===(null!=(n=e.rulerTexture)?n:e.secondaryTexture)}),B=F.find(t=>{var n;return t.file===(null!=(n=e.startFinishTexture)?n:e.secondaryTexture)}),P=F.find(t=>{var n;return t.file===(null!=(n=e.numberingTexture)?n:e.secondaryTexture)}),E=new f.uE({unit:"mm",format:"a4"}),D=E.internal.pageSize.getWidth(),W=E.internal.pageSize.getHeight(),I=20,O=e=>{I+e>W-20&&(E.addPage(),I=20)};if(E.setFont("helvetica","bold"),E.setFontSize(18),E.setTextColor(20),E.text(j("Sprinttracks — ontwerp overzicht","Sprinttracks — design overview"),18,I),I+=6,E.setFont("helvetica","normal"),E.setFontSize(10),E.setTextColor(130),E.text(new Date().toLocaleDateString("en"===v?"en-GB":"nl-NL",{day:"numeric",month:"long",year:"numeric"}),18,I),I+=10,t){let n=90,l=90*(e.length/e.width),r=W-I-20;l>r&&(n=(l=r)*(e.width/e.length));let i=(D-n)/2;E.addImage(t,"JPEG",i,I,n,l),I+=l+10}let G=e=>{O(12),E.setFont("helvetica","bold"),E.setFontSize(13),E.setTextColor(20),E.text(e,18,I),I+=2,E.setDrawColor(220),E.line(18,I,D-18,I),I+=6},H=e=>{O(8),E.setFont("helvetica","bold"),E.setFontSize(10.5),E.setTextColor(20),E.text(e,18,I),I+=5.5},K=(e,t,n)=>{O(7),E.setFont("helvetica","normal"),E.setFontSize(10.5),E.setTextColor(120),E.text(e,18,I),E.setTextColor(30),E.text(String(null!=t?t:"—"),n?D-18-6:D-18,I,{align:"right"}),n&&(E.setFillColor(n),E.circle(D-18-2,I-1.3,1.8,"F")),I+=6.5};return G(j("Afmeting","Size")),K(j("Breedte","Width"),"".concat((e.width/100).toFixed(1)," m")),K(j("Lengte","Length"),"".concat((e.length/100).toFixed(1)," m")),k&&K(j("Banen","Lanes"),"".concat(T)),I+=4,G(j("Markeringen","Markings")),k?(e.columns||[]).forEac
1h((t,n)=>{var l,r,i,o,a,s,d,c;if(!1===t.active)return;let u=null!=(l=t.primaryTexture)?l:e.primaryTexture,m=F.find(e=>e.file===u),g=null!=(r=t.secondaryTexture)?r:e.secondaryTexture,p=F.find(e=>e.file===g),h=t.rulerTexture?F.find(e=>e.file===t.rulerTexture):null,x=t.startFinishTexture?F.find(e=>e.file===t.startFinishTexture):null,f=t.numberingTexture?F.find(e=>e.file===t.numberingTexture):null,y=t.markingType||"standard";H("".concat(j("Baan","Lane")," ").concat(n+1)),K(j("Kleur mat","Mat color"),(null==m?void 0:m.name)||"—",null==m?void 0:m.color),"standard"===y?(K(j("Liniaal","Ruler"),t.showRulerLines?"".concat(j("Aan","On")," (").concat("hyrox"===(t.rulerStyle||"standard")?"Hyrox":j("Standaard","Standard"),")"):j("Uit","Off")),t.showRulerLines&&K(j("Kleur liniaal","Ruler color"),(null==(i=h||p)?void 0:i.name)||"—",null==(o=h||p)?void 0:o.color),K("Start / Finish",t.showStartFinish?j("Aan","On"):j("Uit","Off")),t.showStartFinish&&K(j("Kleur start/finish","Start/finish color"),(null==(a=x||p)?void 0:a.name)||"—",null==(s=x||p)?void 0:s.color),K(j("Nummering","Numbering"),t.showNumbering?j("Aan","On"):j("Uit","Off")),t.showNumbering&&K(j("Kleur nummering","Numbering color"),(null==(d=f||p)?void 0:d.name)||"—",null==(c=f||p)?void 0:c.color),t.showRulerLines||t.showStartFinish||t.showNumbering||K(j("Kleur markeringen","Marking color"),(null==p?void 0:p.name)||"—",null==p?void 0:p.color),K(j("Lijnbreedte","Line width"),"".concat(e.lineWidth||5," cm"))):"sled"===y?K("Type",j("Slee mat","Sled mat")):"burpee"===y&&K("Type",j("Burpee mat","Burpee mat"))}):(K(j("Kleur mat","Mat color"),(null==x?void 0:x.name)||"—",null==x?void 0:x.color),"standard"===z?(K(j("Liniaal","Ruler"),M?"".concat(j("Aan","On")," (").concat("hyrox"===(A.rulerStyle||e.rulerStyle||"standard")?"Hyrox":j("Standaard","Standard"),")"):j("Uit","Off")),M&&K(j("Kleur liniaal","Ruler color"),(null==R?void 0:R.name)||"—",null==R?void 0:R.color),K("Start / Finish",L?j("Aan","On"):j("Uit","Off")),L&&K(j("Kleur start/finish","Start/finish color"),(null==B?void 0:B.name)||"—",null==B?void 0:B.color),K(j("Nummering","Numbering"),N?j("Aan","On"):j("Uit","Off")),N&&K(j("Kleur nummering","Numbering color"),(null==P?void 0:P.name)||"—",null==P?void 0:P.color),M||L||N||K(j("Kleur markeringen","Marking color"),(null==y?void 0:y.name)||"—",null==y?void 0:y.color),K(j("Lijnbreedte","Line width"),"".concat(e.lineWidth||5," cm"))):"sled"===z?K("Type",j("Slee mat","Sled mat")):"burpee"===z&&K("Type",j("Burpee mat","Burpee mat")),b&&K(j("Derde kleur","Third color"),b.name,b.color)),I+=4,G(j("Logo's","Logos")),e.primaryLogo?(K(j("Primair logo","Primary logo"),j("Geladen","Loaded")),K(j("Grootte","Size"),"".concat(e.primaryLogo.sizeCm," cm"))):K(j("Primair logo","Primary logo"),j("Geen","None")),e.secondaryLogo?(K(j("Secundair logo","Secondary logo"),j("Geladen","Loaded")),K(j("Grootte","Size"),"".concat(e.secondaryLogo.sizeCm," cm"))):K(j("Secundair logo","Secondary logo"),j("Geen","None")),I+=4,G(j("Tekst","Text")),w.length>0?w.forEach((t,n)=>{var l;let r=(null==(l=S.find(e=>e.family===t.fontFamily))?void 0:l.name)||("custom-font"===t.fontFamily?e.customFontName||j("Eigen font","Custom font"):j("Standaard","Default")),i="left"===t.alignment?j("Links","Left"):"right"===t.alignment?j("Rechts","Right"):j("Midden","Center");H("".concat(j("Tekstregel","Text line")," ").concat(n+1));let o=t.text.split("\n").filter(Boolean).join(" / ");K(j("Tekst","Text"),o),K(j("Lettertype","Font"),r),K(j("Grootte","Size"),"".concat(t.fontSizeCm," cm")),K(j("Uitlijning","Alignment"),i);let a=F.find(e=>e.color===t.color);K(j("Kleur","Color"),(null==a?void 0:a.name)||(t.color?t.color:j("Standaard (wit)","Default (white)")),t.color||"#FAFAFA")}):K(j("Tekst","Text"),j("Geen","None")),E},I="undefined"!=typeof document?document.createElement("canvas"):null,O=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:900;
1if(!e||!I)return e?.6*e.length:.6;let l=I.getContext("2d");return l.font="".concat(n," 100px ").concat(t||"sans-serif"),(l.measureText(e).width+(e.length-1)*10)/100},G=(e,t,n,l,r)=>e&&I&&!(r<=0)?Math.min(l,Math.max(4,Math.floor(r/O(e,t,n)))):l,H=function(e,t,n){let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:38;if(!n)return l;let r=Math.max(...e.map(e=>O(e,t)));return r<=0?l:Math.min(l,Math.max(1,Math.floor(.88*n/r)))},K=e=>{var t,n,i,o;let{config:a,maxH:s,maxW:d,zoom:c=1,onLogoDrag:u,onTextDrag:m}=e,[g,p]=(0,r.useState)(null),h=(0,r.useRef)(null),[x,f]=(0,r.useState)(null),y=(0,r.useRef)(null),[b,v]=(0,r.useState)({});(0,r.useEffect)(()=>{[a.primaryLogo,a.secondaryLogo].forEach(e=>{if(!(null==e?void 0:e.url)||void 0!==b[e.url])return;let t=new window.Image;t.onload=()=>v(n=>({...n,[e.url]:t.naturalWidth/t.naturalHeight||1})),t.onerror=()=>v(t=>({...t,[e.url]:1})),t.src=e.url})},[null==(t=a.primaryLogo)?void 0:t.url,null==(n=a.secondaryLogo)?void 0:n.url]);let j=a.width||120,S=a.length||1e3,w=j/S,k=null!=d?d:180,A=null!=s?s:460,z=Math.round(A*w);z>k&&(A=Math.round((z=k)/w));let M=F.find(e=>e.file===a.primaryTexture),N=F.find(e=>e.file===a.secondaryTexture),R=(null==M?void 0:M.color)||"#171717",W=(null==N?void 0:N.color)||"#930B12",I=[P(a.primaryLogo,j,S,b[null==(i=a.primaryLogo)?void 0:i.url]),P(a.secondaryLogo,j,S,b[null==(o=a.secondaryLogo)?void 0:o.url]),((e,t,n)=>{let l=(e.textLines||[]).map(C);if(!l.filter(e=>e.text).length)return null;let r=e.textRotation||0,i=90===r||270===r,o=1/0,a=-1/0,s=1/0,d=-1/0;return l.forEach((l,r)=>{if(!l.text)return;let{xPct:c,topCm:u}=D(e,r,t,n),m=l.fontSizeCm,g=l.text.split("\n").filter(Boolean),p=Math.max(...g.map(e=>e.length*m*.65)),h=m*g.length*1.2,x=i?h:p,f=i?p:h,y=c/100*t;o=Math.min(o,u-f/2-8),a=Math.max(a,u+f/2+8),s=Math.min(s,y-x/2-8),d=Math.max(d,y+x/2+8)}),{top:o,bot:a,left:s,right:d}})(a,j,S)];(0,r.useEffect)(()=>{if(!g)return;let e=e=>{let t=h.current;if(!t)return;let n=(e.clientX-t.startX)/(c||1),l=(e.clientY-t.startY)/(c||1),r=Math.min(100,Math.max(0,t.startXPct+n/z*100)),i=Math.min(S,Math.max(0,t.startTopCm+S/A*l)),o=S/A*10;Math.abs(r-50)<10/z*100&&(r=50),Math.abs(i-S/2)<o&&(i=S/2),t.lastXPct=r,t.lastTopCm=i,null==u||u(g,{xPct:r,topCm:i})},t=()=>p(null);return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[g,c,z,A,S,j,u]),(0,r.useEffect)(()=>{if(null===x)return;let e=e=>{let t=y.current;if(!t)return;let n=(e.clientX-t.startX)/(c||1),l=(e.clientY-t.startY)/(c||1),r=Math.min(100,Math.max(0,t.startXPct+n/z*100)),i=Math.min(S,Math.max(0,t.startTopCm+S/A*l)),o=S/A*10;Math.abs(r-50)<10/z*100&&(r=50),Math.abs(i-S/2)<o&&(i=S/2),t.lastXPct=r,t.lastTopCm=i,null==m||m({lineIndex:x,textXPct:r,textTopCm:i})},t=()=>f(null);return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[x,c,z,A,S,j,m]);let H=Math.floor(S/100),K=(e,t,n)=>{let l=e?H-1:H,r=t&&null!=n,i=r?Math.min(n,l):l,o=50*Math.floor((r?e?Math.max(0,(S-(i+1)*100)/2):Math.max(0,(S-100*i)/2):0)/50),a=S-(e?o+(i+1)*100:o+100*i),s=S-o;return{hasActiveZone:r,displayMax:i,naturalCount:l,withSF:e,zoneOffCm:o,zoneTopFromTop:a,zoneBottomFromTop:s,zoneTopPct:a/S*100,zoneBottomPct:s/S*100}};K(a.showStartFinish,a.showNumbering,a.numberingMax);let U=a.columnsEnabled&&j>=185,Y=U?L(a):1,X=j/Y,J=z/Y,V=Array.from({length:Y},(e,t)=>{var n,l,r,i,o,s,d,c,u,m,g,p,h,x,f,y,b,v,j,F,S,C,w,k,T,A,z,M,L,N,R,B,P,E,D,W,I,O,G,H,K,Y,X;return{active:!U||null==(b=null==(n=a.columns[t])?void 0:n.active)||b,primaryTexture:null!=(v=null==(l=a.columns[t])?void 0:l.primaryTexture)?v:a.primaryTexture,secondaryTexture:null!=(j=null==(r=a.columns[t])?void 0:r.secondaryTexture)?j:a.secondaryTexture,rulerTexture:null!=(S=null==(i=a.columns[t])?void 0:i.rulerTexture)?S:U?null:null!=(F=a.rulerTexture)?F:null,startFinishTexture:null!=(w=null==(o=a.columns[t])?void 0:o.startFinishTexture)?w:U?null:null!=(C=a.startFinishTexture)?C:null,numberingTexture:null!=(T=null==(s=a.columns[t])?void 0:s.numberingTexture)?T:U?null:null!=(k=a.numberingTexture)?k:null,markingType:null!=(A=null==(d=a.columns[t])?void 0:d.markingType)?A:a.markingType||"standard",sledDistance:null!=(z=null==(c=a.columns[t])?void 0:c.sledDistance)?z:a.sledDistance||10,showRulerLines:null!=(L=null!=(M=null==(u=a.columns[t])?void 0:u.showRulerLines)?M:a.showRulerLines)&&L,rulerStyle:null!=(R=null!=(N=null==(m=a.columns[t])?void 0:m.rulerStyle)?N:a.rulerStyle)?R:"standard",markingPlacement:null!=(P=null!=(B=null==(g=a.columns[t])?void 0:g.markingPlacement)?B:a.markingPlacement)?P:"both",showStartFinis
1h:null!=(D=null!=(E=null==(p=a.columns[t])?void 0:p.showStartFinish)?E:a.showStartFinish)&&D,showNumbering:null!=(I=null!=(W=null==(h=a.columns[t])?void 0:h.showNumbering)?W:a.showNumbering)&&I,numberingPlacement:null!=(G=null!=(O=null==(x=a.columns[t])?void 0:x.numberingPlacement)?O:a.numberingPlacement)?G:"center",numberingSize:null!=(K=null!=(H=null==(f=a.columns[t])?void 0:f.numberingSize)?H:a.numberingSize)?K:20,numberingMax:null!=(X=null!=(Y=null==(y=a.columns[t])?void 0:y.numberingMax)?Y:a.numberingMax)?X:null}}),q=[];if(U&&Y>1)for(let e=1;e<Y;e++)q.push((0,l.jsx)("div",{className:"absolute pointer-events-none",style:{left:Math.round(e*J),top:0,width:1,height:A,backgroundColor:"rgba(255,255,255,0.2)"}},"div".concat(e)));let _=z/j,Z=Math.max(1,Math.round((a.lineWidth||5)*_)),Q=5*_,$=[];for(let e=0;e<Y;e++){let t=V[e];if(!t.active||!t.showRulerLines||"standard"!==(t.markingType||"standard"))continue;let n=F.find(e=>{var n;return e.file===(null!=(n=t.rulerTexture)?n:t.secondaryTexture)}),r=(null==n?void 0:n.color)||W,i=e*J,o=e*X,a=(e+1)*X,s=X<150,d=s?10:15,c=s?20:30,u=d*_,m=c*_,g="hyrox"===(t.rulerStyle||"standard"),p=K(t.showStartFinish,t.showNumbering,t.numberingMax),h=t.showStartFinish&&p.hasActiveZone&&p.displayMax<p.naturalCount,x=t.showStartFinish?h?p.zoneTopFromTop:5:null,f=t.showStartFinish?h?p.zoneBottomFromTop:S-5:null;for(let n=50;n<S;n+=50){if(g&&n%100!=0||p.hasActiveZone&&(n<p.zoneTopFromTop||n>p.zoneBottomFromTop)||t.showStartFinish&&(n===x||n===f))continue;let s=n/S*100,h=g||n%100==0?m:u,y=g||n%100==0?c:d,b=o+5,v=b+y,j=a-5,F=j-y,C=E(n,I,b,v),w=E(n,I,F,j),k=t.markingPlacement||"both";"left"!==k&&"both"!==k||C||$.push((0,l.jsx)("div",{className:"absolute pointer-events-none",style:{top:"".concat(s,"%"),left:i+Q,width:h,height:Z,backgroundColor:r,opacity:.9,transform:"translateY(-50%)"}},"C".concat(e,"L").concat(n))),"right"!==k&&"both"!==k||w||$.push((0,l.jsx)("div",{className:"absolute pointer-events-none",style:{top:"".concat(s,"%"),left:i+J-Q-h,width:h,height:Z,backgroundColor:r,opacity:.9,transform:"translateY(-50%)"}},"C".concat(e,"R").concat(n)))}}let ee=[];for(let e=0;e<Y;e++){let t=V[e];if(!t.active||!t.showNumbering||"standard"!==(t.markingType||"standard"))continue;let n=F.find(e=>{var n;return e.file===(null!=(n=t.numberingTexture)?n:t.secondaryTexture)}),r=(null==n?void 0:n.color)||W,i="number"==typeof t.numberingSize?t.numberingSize:"small"===t.numberingSize?10:"large"===t.numberingSize?40:20,o=Math.max(4,i/S*A),s=K(t.showStartFinish,t.showNumbering,t.numberingMax),d=(e+.5)*J,c=e*X,u=t.numberingPlacement||"center",m="left"===u?c+.12*X:"right"===u?c+.88*X:c+.5*X,g=.4*i;for(let t=1;t<=s.displayMax;t++){let n,i,c=S-(s.withSF?s.zoneOffCm+100*t:s.zoneOffCm+(t-.5)*100);if(c<0||c>S||E(c,I,m-g,m+g))continue;let p=c/S*100,h=e*J,x=-Math.round(o/2);"left"===u?(n=h+.12*J,i="left"):"right"===u?(n=h+.88*J,i="right"):(n=d,i="center"),ee.push((0,l.jsx)("div",{className:"absolute pointer-events-none font-bold",style:{to
1p:"".concat(p,"%"),marginTop:x,color:r,fontSize:o,lineHeight:1,fontFamily:a.fontFamily,left:n,transform:"left"!==i?"translateX(-50%)":"none"},children:t},"".concat(e,"-").concat(t)))}}let et=(a.textLines||[]).map(C),en=a.textRotation||0,el=[(0,r.useRef)(null),(0,r.useRef)(null)],[er,ei]=(0,r.useState)([{w:0,h:0},{w:0,h:0}]);(0,r.useEffect)(()=>{let e=el.map(e=>{var t,n;return{w:(null==(t=e.current)?void 0:t.offsetWidth)||0,h:(null==(n=e.current)?void 0:n.offsetHeight)||0}});ei(t=>t[0].w===e[0].w&&t[0].h===e[0].h&&t[1].w===e[1].w&&t[1].h===e[1].h?t:e)});let eo=(e,t,n)=>{var r;if(!(null==e?void 0:e.url))return null;let{xPct:i,topCm:o}=B(e,j,S),a=o/S*100,s=Math.min(Y-1,Math.max(0,Math.floor(i/100*Y))),d=F.find(e=>{var t;return e.file===(null==(t=V[s])?void 0:t.primaryTexture)}),c=(null==d?void 0:d.color)||R,m=Math.min(e.sizeCm/S*A,.65*A),x=Math.max(2,5/S*A),f=Math.max(2,5/j*z),y=g===n;return(0,l.jsx)("div",{className:"absolute",onMouseDown:((e,t,n)=>l=>{u&&(l.stopPropagation(),l.preventDefault(),h.current={startX:l.clientX,startY:l.clientY,startXPct:t,startTopCm:n,lastXPct:t,lastTopCm:n},p(e))})(n,i,o),style:{top:"".concat(a,"%"),left:"".concat(i,"%"),transform:"translate(-50%, -50%)",opacity:null!=(r=e.opacity)?r:1,cursor:u?y?"grabbing":"grab":"default",pointerEvents:u?"auto":"none"},children:(0,l.jsx)("div",{style:{display:"inline-block",transform:"rotate(".concat(e.rotation||0,"deg)"),...e.showBorder?{paddingTop:x,paddingBottom:x,paddingLeft:f,paddingRight:f,backgroundColor:c}:{}},children:(0,l.jsx)("img",{src:e.url,alt:"logo",draggable:!1,style:{height:m,width:"auto",maxWidth:z-(e.showBorder?2*f+2:0),display:"block",pointerEvents:"none"}})})},t)};return(0,l.jsx)("div",{className:"flex flex-col items-center gap-3",children:(0,l.jsxs)("div",{className:"relative overflow-hidden shadow-2xl",style:{width:z,height:A,backgroundColor:R,flexShrink:0,outline:"1px solid #18181b"},children:[V.map((e,t)=>{if(!e.active)return null;let n=F.find(t=>t.file===e.primaryTexture),i=(null==n?void 0:n.color)||R;return(0,l.jsxs)(r.Fragment,{children:[(0,l.jsx)("div",{className:"absolute top-0 bottom-0 pointer-events-none",style:{left:Math.round(t*J),width:Math.round(J),backgroundColor:i}}),e.primaryTexture&&(0,l.jsx)("div",{className:"absolute top-0 bottom-0 opacity-40 pointer-events-none",style:{left:Math.round(t*J),width:Math.round(J),backgroundImage:"url('/images/".concat(e.primaryTexture,"')"),backgroundSize:"60px 60px",backgroundRepeat:"repeat"}})]},"bg-".concat(t))}),q,$,ee,V.map((e,t)=>{if(!e.active||!e.showStartFinish)return null;let n=K(e.showStartFinish,e.showNumbering,e.numberingMax),i=Math.max(4,("number"==typeof a.startFinishSize?a.startFinishSize:"small"===a.startFinishSize?10:"large"===a.startFinishSize?38:20)/S*A),o=.88*J,s=a.startText||"START",d=a.finishText||"FINISH",c=Math.min(G(s,a.fontFamily,900,i,o),G(d,a.fontFamily,900,i,o)),u=F.find(t=>{var n;return t.file===(null!=(n=e.startFinishTexture)?n:e.secondaryTexture)}),m=(null==u?void 0:u.color)||W,g=n.hasActiveZone&&n.displayMax<n.naturalCount,p=5/S*100,h=5/S*100,x=Math.round(t*J),f=t*X,y=(t+1)*X,b=g?n.zoneTopFromTop:5,v=g?n.zoneBottomFromTop:S-5,j=E(b,I,f,y),C=E(v,I,f,y),w={position:"absolute",left:x,width:J,textAlign:"center",fontSize:c,color:m,fontFamily:a.fontFamily,fontWeight:900,letterSpacing:"0.1em",lineHeight:1,pointerEvents:"none"};return(0,l.jsxs)(r.Fragment,{children:[!j&&(0,l.jsx)("div",{style:{...w,top:g?"".concat(n.zoneTopPct,"%"):"".concat(p,"%"),transform:g?"translateY(-50%)":"translateY(0)"},children:a.finishText||"FINISH"}),!C&&(0,l.jsx)("div",{style:{...w,top:g?"".concat(n.zoneBottomPct,"%"):"".concat(100-h,"%"),transform:g?"translateY(-50%)":"translateY(-100%)"},children:a.startText||"START"})]},"sf".concat(t))}),V.map((e,t)=>{if(!e.active)return null;let n=Math.round(t*J),i=Math.round(J),o=j/Y,s=F.find(t=>t.file===e.secondaryTexture);null==s||s.color;let d=a.lineWidth||5;if("sled"===e.markingType){if(o<100)return null;let a=100*(e.sledDistance||10),s=(S-a)/2;if(s<0)return null;let c=Math.max(2,Math.round(A/S*d)),u=Math.max(2,Math.round(i/o*d)),m=Math.round(i/o*10),g=i/2,p=u+m,h=Math.max(0,g-m-u/2-p),x=g+m+u/2,f=Math.max(0,i-u-m-x),y=s/S*100,b=Math.round(a/S*A),v=(e,t)=>
1{let i=e/S*100;return(0,l.jsxs)(r.Fragment,{children:[(0,l.jsx)("div",{className:"absolute pointer-events-none",style:{top:"".concat(i,"%"),left:n+p,width:h,height:c,backgroundColor:"#ffffff",transform:"translateY(-50%)"}}),(0,l.jsx)("div",{className:"absolute pointer-events-none",style:{top:"".concat(i,"%"),left:n+x,width:f,height:c,backgroundColor:"#ffffff",transform:"translateY(-50%)"}})]},t)},j="#ffffff";return(0,l.jsxs)(r.Fragment,{children:[(0,l.jsx)("div",{className:"absolute pointer-events-none",style:{top:0,left:n,width:u,height:A,backgroundColor:j}}),(0,l.jsx)("div",{className:"absolute pointer-events-none",style:{top:0,left:n+i-u,width:u,height:A,backgroundColor:j}}),(0,l.jsx)("div",{className:"absolute pointer-events-none",style:{top:"".concat(y,"%"),left:n+g-u/2,width:u,height:b,backgroundColor:j}}),v(s,"sled-".concat(t,"-1")),v(s+a,"sled-".concat(t,"-2"))]},"sled-c".concat(t))}if("burpee"===e.markingType){if(o<100)return null;let e=Math.max(2,Math.round(A/S*d)),a=Math.max(2,Math.round(i/o*d)),s=Math.max(1,Math.round(i/o*10)),c=n+i-a,u=Math.max(1,Math.round(i/o*10)),m=n+i/2,g=n+a+s,p=m-a/2-u,h=m+a/2+u,x=Math.max(0,p-g),f=Math.max(0,c-s-h),y=Math.floor(S/100),b="#ffffff",v=[];v.push((0,l.jsx)("div",{className:"absolute pointer-events-none",style:{top:0,left:n,width:a,height:A,backgroundColor:b}},"bc-bl-".concat(t)),(0,l.jsx)("div",{className:"absolute pointer-events-none",style:{top:0,left:c,width:a,height:A,backgroundColor:b}},"bc-br-".concat(t)),(0,l.jsx)("div",{className:"absolute pointer-events-none",style:{top:0,left:m-a/2,width:a,height:A,backgroundColor:b}},"bc-center-".concat(t)));for(let n=1;n<y;n++){let r=100*n/S*100;x>0&&v.push((0,l.jsx)("div",{className:"absolute pointer-events-none",style:{top:"".concat(r,"%"),left:g,width:x,height:e,backgroundColor:b,transform:"translateY(-50%)"}},"bc-cL-".concat(t,"-").concat(n))),f>0&&v.push((0,l.jsx)("div",{className:"absolute pointer-events-none",style:{top:"".concat(r,"%"),left:h,width:f,height:e,backgroundColor:b,transform:"translateY(-50%)"}},"bc-cR-".concat(t,"-").concat(n)))}return(0,l.jsx)(r.Fragment,{children:v},"burpee-c".concat(t))}return null}),eo(a.primaryLogo,"primary-logo","primaryLogo"),eo(a.secondaryLogo,"secondary-logo","secondaryLogo"),et.map((e,t)=>{if(!e.text)return null;let{xPct:n,topCm:r}=D(a,t,j,S),i=r/S*100,o=Math.max(6,e.fontSizeCm/S*A),s=e.text.split("\n").filter(Boolean).length||1,d=o*O(e.text.split("\n").reduce((e,t)=>t.length>e.length?t:e,""),e.fontFamily),c=er[t],u=c.w||d,g=c.h||1.25*o*s,p=Math.round(i/100*A-g/2),h=Math.round(n/100*z-u/2),b=x===t;return(0,l.jsx)("div",{ref:el[t],onMouseDown:((e,t,n)=>l=>{m&&(l.stopPropagation(),l.preventDefault(),y.current={startX:l.clientX,startY:l.clientY,startXPct:t,startTopCm:n,lastXPct:t,lastTopCm:n},f(e))})(t,n,r),className:"absolute",style:{top:p,left:h,cursor:m?b?"grabbing":"grab":"default",pointerEvents:m?"auto":"none"},children:(0,l.jsx)("div",{className:"font-black tracking-widest leading-tight",style:{transform:"rotate(".concat(en,"deg)"),transformOrigin:"center center",textAlign:"center"},children:e.text.split("\n").map((t,n)=>(0,l.jsx)("span",{style:{display:"block",whiteSpace:"nowrap",color:e.color||"#FAFAFA",fontFamily:e.fontFamily||T,fontSize:"".concat(o,"px"),textAlign:e.alignment||"center"},children:t||"\xa0"},n))})},t)}),(g||null!==x)&&(()=>{let e,t;if(g){let n="primaryLogo"===g?a.primaryLogo:a.secondaryLogo;if(!n)return null;({xPct:e,topCm:t}=B(n,j,S))}else({xPct:e,topCm:t}=D(a,x,j,S));let n=.01>Math.abs(e-50),r=.01>Math.abs(t-S/2),i={position:"absolute",backgroundColor:"#FF6200",pointerEvents:"none",zIndex:20};return(0,l.jsxs)(l.Fragment,{children:[n&&(0,l.jsx)("div",{style:{...i,left:"50%",top:0,width:1,height:A,transform:"translateX(-50%)"}}),r&&(0,l.jsx)("div",{style:{...i,top:"50%",left:0,width:z,height:1,transform:"translateY(-50%)"}})]})})()]})})},U=e=>{let{text:t,width:n=220,direction:i="up"}=e,[o,a]=(0,r.useState)(!1);return(0,l.jsxs)("span",{style:{position:"relative",display:"inline-flex",alignItems:"center"},onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[(0,l.jsx)(x.R,{size:15,weight:"bold",color:"#8C8B8B",style:{cursor:"help"}}),o&&(0,l.jsx)("div",{style:{position:"absolute",..."down"===i?{top:"calc(100% + 8px)"}:{bottom:"calc(100% + 8px)"},left:"50%",transform:"translateX(-50%)",width:n,backgroundColor:"#1A1A1A",border:"1px solid rgba(250,250,250,0.2)",padding:"8px 10px",zIndex:10,color:"#C3C3C3",fontSize:12,fontFamily:T,fontWeight:400,lineHeight:1.4,pointerEvents:"none"},children:t})]})},Y=e=>{var t;let{label:n,logo:a,onLogoChange:s,variant:d="primary",maxSizeCm:c=400}=e,[u,m]=(0,r.useState)(!1),[g,p]=(0,r.useState)(!1),h=e=>{if(!e)return;if(e.size>4194304)return void alert(j("Bestand te groot (max. 4 MB)","File too large (max. 4 MB)"));
1if(!["image/svg+xml","image/png","image/jpeg"].includes(e.type))return void alert(j("Alleen SVG, PNG of JPG toegestaan","Only SVG, PNG or JPG allowed"));let t=new FileReader;t.onloadend=()=>{var e,n;return s({url:t.result,xPct:null!=(e=null==a?void 0:a.xPct)?e:50,topCm:null==a?void 0:a.topCm,sizeCm:(null==a?void 0:a.sizeCm)||100,rotation:(null==a?void 0:a.rotation)||0,showBorder:null==(n=null==a?void 0:a.showBorder)||n})},t.readAsDataURL(e)},x=e=>s(a?{...a,...e}:null),f="primary"===d,y=u||g;return(0,l.jsxs)("div",{style:{border:"1px solid rgba(250,250,250,0.3)",padding:10,display:"flex",flexDirection:"column",gap:10},children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,l.jsx)("p",{style:q,children:n}),(0,l.jsx)(U,{direction:"down",text:j("Dit bestand wordt na het uploaden altijd gecontroleerd door een medewerker van Sprinttracks op geschiktheid voor de track. Hier gelden specifieke technische vereisten aan.","This file will always be checked by a Sprinttracks employee after uploading for suitability for the track. Specific technical requirements apply.")})]}),(null==a?void 0:a.url)?(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"10px 12px",backgroundColor:"rgba(255,98,0,0.15)",border:"1px solid #FF6200"},children:[(0,l.jsx)("img",{src:a.url,alt:"",style:{height:40,width:40,objectFit:"contain",flexShrink:0,backgroundColor:"rgba(250,250,250,0.05)",padding:4}}),(0,l.jsx)("p",{style:{flex:1,color:"#FAFAFA",fontSize:14,fontFamily:T,fontWeight:600,margin:0},children:j("Logo geupload","Logo uploaded")}),(0,l.jsx)("button",{onClick:()=>s(null),style:{background:"none",border:"none",cursor:"pointer",padding:4,color:"#FF6200",flexShrink:0},children:(0,l.jsx)(i.A,{size:16})})]}),(0,l.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,padding:"10px 12px",backgroundColor:"rgba(250,250,250,0.05)",border:"1px solid rgba(250,250,250,0.2)"},children:[(0,l.jsx)(o.A,{size:16,color:"#C3C3C3",style:{flexShrink:0,marginTop:1}}),(0,l.jsx)("p",{style:{color:"#C3C3C3",fontSize:12,fontFamily:T,lineHeight:1.4,margin:0},children:j("Sleep het logo op de preview naar de gewenste plek. Markeringen en nummering die eronder vallen, worden automatisch verborgen.","Drag the logo on the preview to the desired position. Markings and numbering underneath will be hidden automatically.")})]}),(0,l.jsx)(X,{compact:!0,label:j("Grootte op mat","Size on mat"),value:Math.min(a.sizeCm||100,c),min:15,max:c,step:5,unit:"CM",onChange:e=>x({sizeCm:e})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{style:_,children:j("Rotatie","Rotation")}),(0,l.jsx)(Z,{small:!0,options:[{id:0,label:"0\xb0"},{id:90,label:"90\xb0"},{id:180,label:"180\xb0"},{id:270,label:"270\xb0"}],selected:a.rotation||0,onSelect:e=>x({rotation:e})})]}),(0,l.jsx)(Q,{label:j("5 cm markeervrije rand","5 cm marking-free border"),checked:null==(t=a.showBorder)||t,onToggle:()=>{var e;return x({showBorder:!(null==(e=a.showBorder)||e)})},children:(0,l.jsx)("p",{style:{color:"#8C8B8B",fontSize:12,fontFamily:T,margin:0,lineHeight:1.4},children:j("Markeringslijnen die het logo overlappen worden automatisch weggelaten.","Marking lines that overlap the logo will be automatically omitted.")})})]}):(0,l.jsxs)("label",{onDrop:e=>{e.preventDefault(),m(!1),h(e.dataTransfer.files[0])},onDragOver:e=>{e.preventDefault(),m(!0)},onDragLeave:()=>m(!1),onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),style:{display:"flex",alignItems:"center",justifyContent:"center",padding:20,backgroundColor:y?f?"#FF6200":"rgba(250,250,250,0.3)":"transparent",border:y?f?"1px dashed #FF6200":"1px dashed rgba(250,250,250,0.6)":"1px dashed rgba(250,250,250,0.3)",cursor:"pointer",transition:"background-color 0.15s, border-color 0.15s"},children:[(0,l.jsx)("p",{style:{color:"#FAFAFA",fontWeight:600,fontSize:16,fontFamily:T,letterSpacing:"-0.03em",margin:0,pointerEvents:"none"},children:j("Bestand uploaden of slepen","Upload a file or drag and drop")}),(0,l.jsx)("input",{type:"file",style:{display:"none"},accept:".svg,.png,.jpg,.jpeg",onChange:e=>h(e.target.files[0])})]})]})},X=e=>{let{label:t,value:n,min:r,max:i,step:o,unit:a,onChange:s,compact:d=!1}=e,c=(n-r)/(i-r)*100;return(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:d?12:16},children:[t&&(0,l.jsx)("p",{style:d?{color:"#C3C3C3",fontSize:12,fontWeight:700,fontFamily:T,letterSpacing:"-0.02em",margin:0}:{color:"#FAFAFA",fontWeight:800,fontSize:18,letterSpacing:"-0.03em",lineHeight:1,fontFamily:T,margin:0},children:t}),(0,l.jsxs)("div",{style:{position:"relative",height:8},children:[(0,l.jsxs)("div",{style:{position:"absolute",left:36,right:36,top:0,bottom:0},children:[(0,l.jsx)("div",{style:{position:"absolute",top:0,bottom:0,left:0,width:"max(0%, calc(".concat(c,"% - 1px))"),backgroundColor:"#FF6200",borderRadius:"100px 0 0 100px"}}),(0,l.jsx)("div",{style:{position:"absolute",top:"50%",left:"".concat(c,"%"),transform:"translate(-50%, -50%)",zIndex:3,pointerEvents:"none"},children:(0,l.jsx)("div",{style:{backgroundColor:"#FF6200",borderRadius:100,padding:"3px 10px",whiteSpace:"nowrap",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,l.jsxs)("p",{style:{color:"#FAFAFA",fontWeight:700,fontSize:16,letterSpacing:"-0.03em",lineHeight:1,fontFamily:T,margin:0},children:[n,a?" ".concat(a):""]})})}),(0,l.jsx)("div",{style:{position:"absolute",top:0,bottom:0,right:0,left:"calc(".concat(c,"% + 1px)"),backgroundColor:"#444444",borderRadius:"0 100px 100px 0"}})]}),(0,l.jsx)("input",{type:"range",min:r,max:i,step:o,value:n,onChange:e=>s(Number(e.target.value)),style:{position:"absolute",inset:0,width:"100%",opacity:0,height:"100%",zIndex:4,margin:0,cursor:"pointer"}})]})]})},J=e=>{let{config:t,setConfig:n,onDimChange:i}=e,[o,s]=(0,r.useState)({});return(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:40},children:[(0,l.jsx)(X,{label:j("Breedte track (CM)","Width track (CM)"),value:t.width,min:100,max:400,step:5,unit:"CM",onChange:e=>{n(t=>({...t,width:e,...0===z(e)&&t.columnsEnabled?{columnsEnabled:!1}:{}})),null==i||i("width")}}),(0,l.jsx)(X,{label:j("Lengte track (CM)","Length track (CM)"),value:t.length,min:500,max:5e3,step:50,unit:"CM",onChange:e=>{n(t=>({...t,length:e})),null==i||i("length")}}),(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[(0,l.jsx)("p",{style:{color:"#FAFAFA",fontWeight:800,fontSize:18,letterSpacing:"-0.03em",lineHeight:1,fontFamily:T,margin:0},children:j("Aantal banen kiezen","Choose number of lanes")}),(0,l.jsx)("div",{style:{display:"flex",gap:12},children:[1,2,3,4].map(e=>{let r=t.width/e>=92.5,i=e===(t.columnsEnabled?L(t):1);return(0,l.jsx)("button",{disabled:!r,onClick:()=>n(t=>{var n,l,r,i,o,a,s,d,c;let u=t.columnsEnabled&&0!==t.columns.length?t.columns:[{active:!0,primaryTexture:null,secondaryTexture:t.secondaryTexture,rulerTexture:null,startFinis
1hTexture:null,numberingTexture:null,markingType:null!=(n=t.markingType)?n:"standard",sledDistance:null!=(l=t.sledDistance)?l:10,showRulerLines:null!=(r=t.showRulerLines)&&r,markingPlacement:null!=(i=t.markingPlacement)?i:"both",showStartFinish:null!=(o=t.showStartFinish)&&o,showNumbering:null!=(a=t.showNumbering)&&a,numberingPlacement:null!=(s=t.numberingPlacement)?s:"center",numberingSize:null!=(d=t.numberingSize)?d:20,numberingMax:null!=(c=t.numberingMax)?c:null}];return 1===e?{...t,columnsEnabled:!1,columns:M(1,u,t.secondaryTexture)}:{...t,columnsEnabled:!0,numColumns:e,columns:M(e,u,t.secondaryTexture)}}),style:{flex:1,padding:"12px 16px",border:"1px solid ".concat(i?"#FF6200":"rgba(250,250,250,0.3)"),backgroundColor:i?"#FF6200":"rgba(250,250,250,0.2)",color:"#FAFAFA",fontFamily:T,fontWeight:600,fontSize:16,letterSpacing:"-0.03em",cursor:r?"pointer":"not-allowed",opacity:r?1:.5,transition:"all 0.15s"},children:e},e)})}),t.columnsEnabled&&(0,l.jsx)("p",{style:{color:"#C3C3C3",fontSize:12,fontFamily:T},children:j("Elke baan ".concat(Math.round(t.width/L(t))," cm breed \xb7 min. 92,5 cm per baan"),"Each lane ".concat(Math.round(t.width/L(t))," cm wide \xb7 min. 92.5 cm per lane"))})]}),(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[(0,l.jsx)("p",{style:{color:"#FAFAFA",fontWeight:800,fontSize:18,letterSpacing:"-0.03em",lineHeight:1,fontFamily:T,margin:0},children:j("Kleuren","Colors")}),(0,l.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:Array.from({length:L(t)},(e,r)=>{var i,d;let c=null!=(i=o[r])&&i,u=t.columns[r]||{};return(0,l.jsxs)("div",{style:{border:"1px solid rgba(250,250,250,0.3)"},children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:10,cursor:"pointer",userSelect:"none"},onClick:()=>s(e=>({...e,[r]:!e[r]})),children:[(0,l.jsxs)("p",{style:{color:"#FAFAFA",fontWeight:600,fontSize:16,fontFamily:T,letterSpacing:"-0.03em"},children:[j("Baan","Lane")," ",r+1]}),(0,l.jsx)(a.A,{size:20,color:"#FAFAFA",style:{transform:c?"rotate(180deg)":"none",transition:"transform 0.2s"}})]}),c&&(0,l.jsx)("div",{style:{padding:12,borderTop:"1px solid rgba(250,250,250,0.15)",display:"flex",flexDirection:"column",gap:16},children:(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{style:{color:"#C3C3C3",fontSize:12,fontWeight:700,fontFamily:T,marginBottom:8,letterSpacing:"-0.02em"},children:j("Kleur","Color")}),(0,l.jsx)(er,{selected:null!=(d=u.primaryTexture)?d:t.primaryTexture,onSelect:e=>((e,t)=>n(n=>{let l=M(L(n),n.columns,n.secondaryTexture);return l[e]={...l[e],...t},{...n,columns:l}}))(r,{primaryTexture:e}),size:"sm"})]})})]},r)})})]}),t.length>2500&&(0,l.jsx)("div",{style:{backgroundColor:"rgba(180,120,0,0.15)",border:"1px solid rgba(180,120,0,0.3)",padding:16},children:(0,l.jsx)("p",{style:{color:"#F59E0B",fontSize:12,fontWeight:700,lineHeight:1.5,fontFamily:T},children:j("Let op: een rol van meer dan 25 meter is zwaarder te hanteren (\xb14 kg/m\xb2). Sprinttracks denkt graag mee over een rollenplan.","Note: a roll of more than 25 meters is heavier to handle (\xb14 kg/m\xb2). Sprinttracks is happy to advise on a roll plan.")})})]})},V=e=>{let{checked:t,onChange:n}=e;return(0,l.jsxs)("div",{onClick:n,style:{position:"relative",width:40,height:24,cursor:"pointer",flexShrink:0},children:[(0,l.jsx)("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:36,height:20,borderRadius:100,backgroundColor:t?"#FF6200":"transparent",border:"1.5px solid ".concat(t?"#FF6200":"rgba(250,250,250,0.6)"),transition:"background-color 0.2s, border-color 0.2s"}}),(0,l.jsx)("div",{style:{position:"absolute",top:"50%",transform:"translateY(-50%)",width:"27%",aspectRatio:"1",borderRadius:"50%",backgroundColor:"#FAFAFA",left:t?"57%":"16%",transition:"left 0.2s"}})]})},q={color:"#FAFAFA",fontWeight:600,fontSize:16,fontFamily:T,letterSpacing:"-0.03em",margin:0},_={color:"#C3C3C3",fontSize:12,fontWeight:700,fontFamily:T,letterSpacing:"-0.02em",marginBottom:8},Z=e=>{let{options:t,selected:n,onSelect:i,small:o=!1}=e,[a,s]=(0,r.useState)(null);return(0,l.jsx)("div",{style:{display:"flex",gap:8},children:t.map(e=>{let t=n===e.id,r=e.disabled,d=r&&e.tooltip&&a===e.id;return(0,l.jsxs)("div",{style:{flex:1,position:"relative"},onMouseEnter:()=>s(e.id),onMouseLeave:()=>s(null),children:[(0,l.jsx)("button",{disabled:r,onClick:()=>!r&&i(e.id),style:{width:"100%",padding:o?"6px 16px":"12px 16px",border:"1px solid ".concat(t?"#FF6200":"rgba(250,250,250,0.3)"),backgroundColor:t?"#FF6200":"rgba(250,250,250,0.2)",color:t?"#FAFAFA":"#C3C3C3",fontFamily:T,fontWeight:600,fontSize:16,cursor:r?"not-allowed":"pointer",opacity:r?.4:1,transition:"border-color 0.15s, background-color 0.15s"},children:e.label}),d&&(0,l.jsx)("div",{style:{position:"absolute",bottom:"calc(100% + 8px)",left:"50%",transform:"translateX(-50%)",backgroundColor:"#1A1A1A",border:"1px solid rgba(250,250,250,0.2)",padding:"6px 10px",whiteSpace:"nowrap",zIndex:10,color:"#C3C3C3",fontSize:12,fontFamily:T,lineHeight:1.4,pointerEvents:"none"},children:e.tooltip})]},e.id)})})},Q=e=>{let{label:t,checked:n,onToggle:r,children:i}=e;return(0,l.jsxs)("div",{style:{border:"1px solid ".concat(n?"#FF6200":"rgba(250,250,250,0.3)"),transition:"border-color 0.2s"},children:[(0,l.jsxs)("div",{onClick:r,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:"pointer",userSelect:"none",backgroundColor:n?"rgba(255,98,0,0.2)":"transparent",transition:"background-color 0.2s"},children:[(0,l.jsx)("p",{style:q,children:t}),(0,l.jsx)(V,{checked:n,onChange:r})]}),n&&i&&(0,l.jsx)("div",{style:{padding:12,display:"flex",flexDirection:"column",gap:14},children:i})]})},$=e=>{var t,n,r,i;let{col:o,totalMeters:a,onChange:s,startText:d,finishText:c,startFinis
1hSize:u,onStartText:m,onFinishText:g,onStartFinishSize:p,colSecondaryTexture:h,onRulerColorChange:x,onStartFinishColorChange:f,onNumberingColorChange:y,maxStartFinishCm:b}=e,v=o.showStartFinish?a-1:a,F=null!=(t=o.numberingMax)?t:v;return o.numberingMax,(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[(0,l.jsxs)(Q,{label:j("Lineaal strepen","Ruler lines"),checked:!!o.showRulerLines,onToggle:()=>s({showRulerLines:!o.showRulerLines}),children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{style:_,children:j("Stijl","Style")}),(0,l.jsx)(Z,{small:!0,options:[{id:"standard",label:j("Standaard","Standard")},{id:"hyrox",label:"Hyrox"}],selected:o.rulerStyle||"standard",onSelect:e=>s({rulerStyle:e})}),(0,l.jsx)("p",{style:{color:"#8C8B8B",fontSize:12,fontFamily:T,margin:"6px 0 0"},children:"hyrox"===(o.rulerStyle||"standard")?j("E\xe9n streep per meter.","One line per meter."):j("Korte streep per halve meter, lange streep per hele meter.","Short line per half meter, long line per full meter.")})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{style:_,children:j("Plaatsing","Placement")}),(0,l.jsx)(Z,{small:!0,options:[{id:"left",label:j("Links","Left")},{id:"both",label:j("Beide","Both")},{id:"right",label:j("Rechts","Right")}],selected:o.markingPlacement||"both",onSelect:e=>s({markingPlacement:e})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{style:_,children:j("Kleur","Color")}),(0,l.jsx)(er,{selected:null!=(n=o.rulerTexture)?n:h,onSelect:x})]})]}),(0,l.jsxs)(Q,{label:j("Start / Finish tekst","Start / Finish text"),checked:!!o.showStartFinish,onToggle:()=>s({showStartFinish:!o.showStartFinish}),children:[(0,l.jsxs)("div",{style:{display:"flex",gap:10},children:[(0,l.jsxs)("div",{style:{flex:1},children:[(0,l.jsx)("p",{style:_,children:j("Onderaan","Bottom")}),(0,l.jsx)("input",{type:"text",value:d,onChange:e=>m(e.target.value),style:{width:"100%",backgroundColor:"#0A0A0A",border:"1px solid rgba(250,250,250,0.2)",padding:"8px 12px",color:"#FAFAFA",fontFamily:T,fontSize:14,outline:"none",boxSizing:"border-box"}})]}),(0,l.jsxs)("div",{style:{flex:1},children:[(0,l.jsx)("p",{style:_,children:j("Bovenaan","Top")}),(0,l.jsx)("input",{type:"text",value:c,onChange:e=>g(e.target.value),style:{width:"100%",backgroundColor:"#0A0A0A",border:"1px solid rgba(250,250,250,0.2)",padding:"8px 12px",color:"#FAFAFA",fontFamily:T,fontSize:14,outline:"none",boxSizing:"border-box"}})]})]}),(0,l.jsx)("div",{children:(0,l.jsx)(X,{compact:!0,label:j("Grootte","Size"),value:Math.min("number"==typeof u?u:20,b),min:10,max:b,step:1,unit:"CM",onChange:p})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{style:_,children:j("Kleur","Color")}),(0,l.jsx)(er,{selected:null!=(r=o.startFinishTexture)?r:h,onSelect:f})]})]}),(0,l.jsxs)(Q,{label:j("Nummering","Numbering"),checked:!!o.showNumbering,onToggle:()=>s({showNumbering:!o.showNumbering}),children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{style:_,children:j("Plaatsing","Placement")}),(0,l.jsx)(Z,{small:!0,options:[{id:"left",label:j("Links","Left"),disabled:"left"===(o.markingPlacement||"both")||"both"===(o.markingPlacement||"both"),tooltip:j("Niet mogelijk: liniaal staat links","Not possible: ruler is on the left")},{id:"center",label:j("Midden","Center")},{id:"right",label:j("Rechts","Right"),disabled:"right"===(o.markingPlacement||"both")||"both"===(o.markingPlacement||"both"),tooltip:j("Niet mogelijk: liniaal staat rechts","Not possible: ruler is on the right")}],selected:o.numberingPlacement||"center",onSelect:e=>s({numberingPlacement:e})})]}),(0,l.jsx)("div",{children:(0,l.jsx)(X,{compact:!0,label:j("Grootte nummering","Numbering size"),value:"number"==typeof o.numberingSize?o.numberingSize:20,min:5,max:38,step:1,unit:"cm",onChange:e=>s({numberingSize:e})})}),(0,l.jsx)("div",{children:(0,l.jsx)(X,{compact:!0,label:j("Aantal nummers","Number count"),value:F,min:1,max:v,step:1,unit:"",onChange:e=>s({numberingMax:e>=v?null:e})})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{style:_,children:j("Kleur","Color")}),(0,l.jsx)(er,{selected:null!=(i=o.numberingTexture)?i:h,onSelect:y})]})]})]})},ee=e=>{let{config:t,setConfig:n}=e,[i,o]=(0,r.useState)({}),d=Math.floor(t.length/100),c=Math.max(1,t.columnsEnabled?L(t):1),u=Array.from({length:c},(e,n)=>{var l,r,i,o,a,s,d,c,u,m,g,p,h,x,f,y,b,v,j,F,S,C,w,k,T,A;let z=t.columns[n],M=!t.columnsEnabled&&0===n;return{active:null==(l=null==z?void 0:z.active)||l,primaryTexture:null!=(r=null==z?void 0:z.primaryTexture)?r:null,secondaryTexture:null!=(i=null==z?void 0:z.secondaryTexture)?i:t.secondaryTexture,rulerTexture:null!=(o=null==z?void 0:z.rulerTexture)?o:null,startFinis
1hTexture:null!=(a=null==z?void 0:z.startFinishTexture)?a:null,numberingTexture:null!=(s=null==z?void 0:z.numberingTexture)?s:null,markingType:null!=(c=null==z?void 0:z.markingType)?c:M&&null!=(d=t.markingType)?d:"standard",sledDistance:null!=(m=null==z?void 0:z.sledDistance)?m:M&&null!=(u=t.sledDistance)?u:10,showRulerLines:null!=(p=null==z?void 0:z.showRulerLines)?p:!!M&&null!=(g=t.showRulerLines)&&g,rulerStyle:null!=(x=null==z?void 0:z.rulerStyle)?x:M&&null!=(h=t.rulerStyle)?h:"standard",markingPlacement:null!=(y=null==z?void 0:z.markingPlacement)?y:M&&null!=(f=t.markingPlacement)?f:"both",showStartFinish:null!=(v=null==z?void 0:z.showStartFinish)?v:!!M&&null!=(b=t.showStartFinish)&&b,showNumbering:null!=(F=null==z?void 0:z.showNumbering)?F:!!M&&null!=(j=t.showNumbering)&&j,numberingPlacement:null!=(C=null==z?void 0:z.numberingPlacement)?C:M&&null!=(S=t.numberingPlacement)?S:"center",numberingSize:null!=(k=null==z?void 0:z.numberingSize)?k:M&&null!=(w=t.numberingSize)?w:20,numberingMax:null!=(A=null==z?void 0:z.numberingMax)?A:M&&null!=(T=t.numberingMax)?T:null}}),m=(e,t)=>n(n=>{let l=M(L(n),u,n.secondaryTexture);return l[e]={...l[e],...t},{...n,columns:l}}),g=u.some(e=>e.showRulerLines||e.showStartFinish||e.showNumbering||"sled"===e.markingType||"burpee"===e.markingType);return(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:40},children:[(0,l.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:u.map((e,r)=>{var u;let g=null!=(u=i[r])&&u;return(0,l.jsxs)("div",{style:{border:"1px solid rgba(250,250,250,0.3)"},children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:10,cursor:"pointer",userSelect:"none"},onClick:()=>o(e=>({...e,[r]:!e[r]})),children:[(0,l.jsxs)("p",{style:{color:"#FAFAFA",fontWeight:600,fontSize:16,fontFamily:T,letterSpacing:"-0.03em",margin:0},children:[j("Baan","Lane")," ",r+1]}),(0,l.jsx)(a.A,{size:20,color:"#FAFAFA",style:{transform:g?"rotate(180deg)":"none",transition:"transform 0.2s"}})]}),g&&(0,l.jsxs)("div",{style:{padding:12,display:"flex",flexDirection:"column",gap:12},children:[(0,l.jsx)("div",{children:(0,l.jsx)(Z,{options:[{id:"standard",label:j("Standaard","Standard")},{id:"sled",label:j("Slee","Sled")},{id:"burpee",label:"Burpee"}],selected:e.markingType,onSelect:e=>{m(r,{markingType:e,..."standard"!==e?{showStartFinish:!1}:{}}),"standard"!==e&&n(e=>({...e,lineWidth:5}))},small:!0})}),"standard"===e.markingType&&(0,l.jsx)($,{col:e,totalMeters:d,onChange:e=>m(r,e),startText:t.startText,finishText:t.finishText,startFinishSize:t.startFinishSize,onStartText:e=>n(t=>({...t,startText:e})),onFinishText:e=>n(t=>({...t,finishText:e})),onStartFinishSize:e=>n(t=>({...t,startFinishSize:e})),colSecondaryTexture:e.secondaryTexture,onRulerColorChange:e=>m(r,{rulerTexture:e}),onStartFinishColorChange:e=>m(r,{startFinishTexture:e}),onNumberingColorChange:e=>m(r,{numberingTexture:e}),maxStartFinishCm:H([t.startText||"START",t.finishText||"FINISH"],t.fontFamily,Math.round(t.width/c))}),"sled"===e.markingType&&(()=>{let n=100*e.sledDistance,i=(t.length-n)/2,o=n+250,a=t.width/c;return(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[a<100&&(0,l.jsxs)("div",{style:{display:"flex",gap:8,backgroundColor:"rgba(180,120,0,0.15)",border:"1px solid rgba(180,120,0,0.3)",padding:10},children:[(0,l.jsx)(s.A,{size:14,color:"#F59E0B",style:{flexShrink:0,marginTop:2}}),(0,l.jsxs)("p",{style:{color:"#F59E0B",fontSize:13,fontFamily:T},children:["Slee vereist minimaal 100 cm baanbreedte (huidig: ",Math.round(a)," cm)"]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{style:{..._,marginBottom:8},children:j("Afstand tussen lijnen","Distance between lines")}),(0,l.jsx)(Z,{options:[{id:"10",label:"10 m"},{id:"12.5",label:"12,5 m"}],selected:String(e.sledDistance),onSelect:e=>m(r,{sledDistance:parseFloat(e)}),small:!0})]}),t.length<o&&(0,l.jsxs)("div",{style:{display:"flex",gap:8,backgroundColor:"rgba(180,120,0,0.15)",border:"1px solid rgba(180,120,0,0.3)",padding:10},children:[(0,l.jsx)(s.A,{size:14,color:"#F59E0B",style:{flexShrink:0,marginTop:2}}),(0,l.jsxs)("p",{style:{color:"#F59E0B",fontSize:13,fontFamily:T,margin:0},children:["Mat te kort (min. ",(o/100).toFixed(1)," m)"]})]}),t.length>=o&&(0,l.jsxs)("p",{style:{color:"#8C8B8B",fontSize:13,fontFamily:T}
1,children:["Uitloop: ",(i/100).toFixed(2)," m per zijde"]})]})})(),"burpee"===e.markingType&&(()=>{let e=t.width/c;return e<100?(0,l.jsxs)("div",{style:{display:"flex",gap:8,backgroundColor:"rgba(180,120,0,0.15)",border:"1px solid rgba(180,120,0,0.3)",padding:10},children:[(0,l.jsx)(s.A,{size:14,color:"#F59E0B",style:{flexShrink:0,marginTop:2}}),(0,l.jsxs)("p",{style:{color:"#F59E0B",fontSize:13,fontFamily:T,margin:0},children:["Burpee vereist minimaal 100 cm baanbreedte (huidig: ",Math.round(e)," cm)"]})]}):(0,l.jsx)("p",{style:{color:"#8C8B8B",fontSize:13,fontFamily:T},children:j("Witte lijnen \xb7 zijlijnen op de rand \xb7 middenlijn \xb7 dwarslijnen elke 1 m","White lines \xb7 side lines at the edge \xb7 center line \xb7 cross lines every 1 m")})})()]})]},r)})}),g&&(()=>{let e=u.some(e=>"sled"===e.markingType||"burpee"===e.markingType);return(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[(0,l.jsx)("p",{style:_,children:j("Lijnbreedte","Line width")}),(0,l.jsx)(Z,{options:[{id:5,label:"5 cm",disabled:!1},{id:9,label:"9 cm",disabled:e,tooltip:j("Voor Slee en Burpee is de standaard maat 5 cm","For Sled and Burpee the standard size is 5 cm")}],selected:e?5:t.lineWidth||5,onSelect:e=>n(t=>({...t,lineWidth:e})),small:!0})]})})()]})},et=e=>{let{config:t,setConfig:n}=e,r=Math.max(15,t.width||120);return(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[(0,l.jsx)(Y,{variant:"primary",label:j("Primair logo","Primary logo"),logo:t.primaryLogo,onLogoChange:e=>n(t=>({...t,primaryLogo:e})),maxSizeCm:r}),(0,l.jsx)(Y,{variant:"secondary",label:j("Secundair logo","Secondary logo"),logo:t.secondaryLogo,onLogoChange:e=>n(t=>({...t,secondaryLogo:e})),maxSizeCm:r})]})},en=e=>{var t;let{index:n,line:i,onChange:o,disabled:s,customFontName:p,onFontUpload:h,fontError:x}=e,[f,y]=(0,r.useState)(!1),[b,v]=(0,r.useState)(!1),C="custom-font"===i.fontFamily?p||"Eigen font":(null==(t=S.find(e=>e.family===i.fontFamily))?void 0:t.name)||"Lettertype",w={background:"none",border:"none",cursor:s?"not-allowed":"pointer",display:"flex",alignItems:"center",padding:"8px 12px",color:s?"#444":"#C3C3C3",fontFamily:T};return(0,l.jsxs)("div",{style:{border:"1px solid rgba(250,250,250,".concat(s?.1:.3,")"),display:"flex",flexDirection:"column",opacity:s?.45:1,position:"relative"},children:[(0,l.jsx)("div",{style:{padding:"10px 10px 0"},children:(0,l.jsxs)("p",{style:q,children:[j("Tekstregel","Text line")," ",n+1,1===n&&(0,l.jsx)("span",{style:{color:"#8C8B8B",fontWeight:400,fontSize:13},children:j(" — optioneel"," — optional")})]})}),(0,l.jsxs)("div",{style:{padding:"8px 10px"},children:[(0,l.jsx)("style",{children:".tl-input-".concat(n,"::placeholder { font-family: ").concat(i.fontFamily,"; }")}),(0,l.jsx)("textarea",{rows:2,maxLength:60,value:i.text,disabled:s,onChange:e=>o({text:e.target.value.slice(0,60)}),placeholder:0===n?"Place":"Holder",className:"tl-input-".concat(n),style:{width:"100%",backgroundColor:"#0A0A0A",border:"1px solid rgba(250,250,250,0.2)",padding:"10px 12px",color:"#FAFAFA",fontFamily:i.fontFamily,fontSize:15,outline:"none",boxSizing:"border-box",letterSpacing:"-0.02em",resize:"none"}})]}),(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",borderTop:"1px solid rgba(250,250,250,0.1)",position:"relative"},children:[(0,l.jsxs)("button",{disabled:s,onClick:()=>{y(e=>!e),v(!1)},style:{...w,gap:6,borderRight:"1px solid rgba(250,250,250,0.1)",flex:"0 0 auto",color:s?"#444":"#FF6200"},children:[(0,l.jsx)("span",{style:{fontSize:13,fontWeight:600,letterSpacing:"-0.02em",fontFamily:i.fontFamily},children:C}),(0,l.jsx)(a.A,{size:13,style:{flexShrink:0,transform:f?"rotate(180deg)":"none",transition:"transform 0.2s"}})]}),(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",borderRight:"1px solid rgba(250,250,250,0.1)",flex:"0 0 auto"},children:[(0,l.jsx)("button",{disabled:s,onClick:()=>o({fontSizeCm:Math.max(3,i.fontSizeCm-1)}),style:{...w,padding:"8px 10px",fontSize:18,lineHeight:1},children:"−"}),(0,l.jsxs)("span",{style:{color:s?"#444":"#FAFAFA",fontSize:13,fontWeight:600,fontFamily:T,letterSpacing:"-0.02em",whiteSpace:"nowrap",minWidth:40,textAlign:"center"},children:[i.fontSizeCm,"cm"]}),(0,l.jsx)("button",{disabled:s,onClick:()=>o({fontSizeCm:Math.min(100,i.fontSizeCm+1)}),style:{...w,padding:"8px 10px",fontSize:16,lineHeight:1},children:"+"})]}),(0,l.jsx)("button",{disabled:s,onClick:()=>{v(e=>!e),y(!1)},style:{...w,borderRight:"1px solid rgba(250,250,250,0.1)",padding:"8px 12px"},children:(0,l.jsx)("div",{style:{width:16,height:16,borderRadius:"50%",backgroundColor:i.color||"#FAFAFA",border:"1px solid rgba(250,250,250,0.4)",flexShrink:0}})}),(0,l.jsx)("div",{style:{display:"flex",flex:1,justifyContent:"flex-end"},children:[{id:"left",icon:(0,l.jsx)(d.A,{size:14})},{id:"center",icon:(0,l.jsx)(c.A,{size:14})},{id:"right",icon:(0,l.jsx)(u.A,{size:14})}].map(e=>{let{id:t,icon:n}=e;return(0,l.jsx)("button",{disabled:s,onClick:()=>o({alignment:t}),style:{...w,padding:"8px 10px",color:i.alignment===t?"#FF6200":s?"#444":"#C3C3C3"},children:n},t)})})]}),f&&!s&&(0,l.jsxs)("div",{style:{position:"absolute",top:"100%",left:0,right:0,zIndex:20,backgroundColor:"#111",border:"1px solid rgba(250,250,250,0.2)",display:"flex",flexDirection:"column",gap:2,padding:6},children:[S.map(e=>{let t=i.fontFamily===e.family;return(0,l.jsxs)("button",{onClick:()=>{o({fontFamily:e.family}),y(!1)},style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",background:"none",border:t?"1px solid #FF6200":"1px solid rgba(250,250,250,0.1)",cursor:"pointer",backgroundColor:t?"rgba(255,98,0,0.1)":"transparent"},children:[(0,l.jsx)("span",{style:{color:"#FAFAFA",fontFamily:e.family,fontSize:14},children:e.name}),t&&(0,l.jsx)(m.A,{size:13,color:"#FF6200"})]},e.id)}),(0,l.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px",border:"1px dashed rgba(250,250,250,0.2)",cursor:"pointer",color:"custom-font"===i.fontFamily?"#FF6200":"#C3C3C3",fontSize:13,fontFamily:T}
1,children:[(0,l.jsx)(g.A,{size:13}),"custom-font"===i.fontFamily&&p?p:j("Eigen font uploaden…","Upload custom font…"),(0,l.jsx)("input",{type:"file",style:{display:"none"},accept:".ttf,.otf,.woff,.woff2",onChange:e=>{h(e,n),y(!1)}})]}),x&&(0,l.jsx)("p",{style:{color:"#f87171",fontSize:11,fontFamily:T,margin:"4px 4px 0",padding:"4px 8px",backgroundColor:"rgba(220,38,38,0.1)"},children:x})]}),b&&!s&&(0,l.jsx)("div",{style:{position:"absolute",top:"100%",left:0,right:0,zIndex:20,backgroundColor:"#111",border:"1px solid rgba(250,250,250,0.2)",padding:12},children:(0,l.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(5, 1fr)",gap:"14px 0"},children:[F.map(e=>{let t=i.color===e.color;return(0,l.jsxs)("button",{onClick:()=>{o({color:e.color}),v(!1)},style:{display:"flex",flexDirection:"column",alignItems:"center",gap:2,background:"none",border:"none",cursor:"pointer",padding:"0 4px"},children:[(0,l.jsx)("div",{style:{width:24,height:24,borderRadius:"50%",backgroundColor:e.color,border:"2px solid ".concat(t?"#FAFAFA":"transparent"),flexShrink:0}}),(0,l.jsx)("p",{style:{color:t?"#FAFAFA":"#8C8B8B",fontSize:11,fontFamily:T,margin:0,whiteSpace:"nowrap"},children:e.name})]},e.file)}),(0,l.jsxs)("button",{onClick:()=>{o({color:null}),v(!1)},style:{display:"flex",flexDirection:"column",alignItems:"center",gap:2,background:"none",border:"none",cursor:"pointer",padding:"0 4px"},children:[(0,l.jsx)("div",{style:{width:24,height:24,borderRadius:"50%",backgroundColor:"#FAFAFA",border:"2px solid ".concat(i.color?"transparent":"#FF6200"),flexShrink:0}}),(0,l.jsx)("p",{style:{color:i.color?"#8C8B8B":"#FAFAFA",fontSize:11,fontFamily:T,margin:0},children:j("Wit","White")})]})]})})]})},el=e=>{var t;let{config:n,setConfig:i}=e,[a,s]=(0,r.useState)(null),[d,c]=(0,r.useState)(n.customFontName||null),u=(e,t)=>i(n=>{let l=(n.textLines||[]).map(C);return l[e]={...l[e],...t},{...n,textLines:l}}),m=async(e,t)=>{var n;let l=null==(n=e.target.files)?void 0:n[0];if(e.target.value="",l){if(s(null),!["ttf","otf","woff","woff2"].includes(l.name.split(".").pop().toLowerCase()))return void s(j("Ondersteunde formaten: TTF, OTF, WOFF, WOFF2","Supported formats: TTF, OTF, WOFF, WOFF2"));if(l.size>5242880)return void s(j("Bestand te groot (max. 5 MB)","File too large (max. 5 MB)"));try{let e=await l.arrayBuffer(),n=new FontFace("custom-font",e);await n.load(),document.fonts.add(n);let r=l.name.replace(/\.[^.]+$/,"");c(r),i(e=>({...e,customFontName:r})),u(t,{fontFamily:"custom-font"})}catch(e){s(j("Font kon niet worden geladen. Controleer of het bestand geldig is.","Font could not be loaded. Check if the file is valid."))}}},g=(n.textLines||[]).map(C);return(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:14},children:[[0,1].map(e=>(0,l.jsx)(en,{index:e,line:g[e],onChange:t=>u(e,t),disabled:1===e&&!g[0].text,customFontName:d,onFontUpload:m,fontError:a},e)),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{style:_,children:"Rotatie"}),(0,l.jsx)(Z,{small:!0,options:[{id:0,label:"0\xb0"},{id:90,label:"90\xb0"},{id:180,label:"180\xb0"},{id:270,label:"270\xb0"}],selected:null!=(t=n.textRotation)?t:90,onSelect:e=>i(t=>({...t,textRotation:e}))})]}),(0,l.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,padding:"10px 12px",backgroundColor:"rgba(250,250,250,0.05)",border:"1px solid rgba(250,250,250,0.2)"},children:[(0,l.jsx)(o.A,{size:16,color:"#C3C3C3",style:{flexShrink:0,marginTop:1}}),(0,l.jsx)("p",{style:{color:"#C3C3C3",fontSize:12,fontFamily:T,lineHeight:1.4,margin:0},children:j("Sleep de tekst op de preview naar de gewenste plek. Markeringen die eronder vallen worden automatisch verborgen.","Drag the text on the preview to the desired position. Markings underneath will be hidden automatically.")})]})]})},er=e=>{let{selected:t,onSelect:n}=e;return(0,l.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(5, 1fr)",gap:"18px 0",width:"100%"},children:F.map(e=>{let r=t===e.file;return(0,l.jsxs)("button",{onClick:()=>n(e.file),style:{display:"flex",flexDirection:"column",alignItems:"center",gap:0,background:"none",border:"none",cursor:"pointer",padding:"0 4px"},children:[(0,l.jsx)("div",{style:{width:32,height:32,borderRadius:"50%",backgroundColor:e.color,border:"1px solid ".concat(r?"#FAFAFA":"rgba(250,250,250,0.5)"),flexShrink:0}}),(0,l.jsx)("p",{style:{color:r?"#FAFAFA":"#8C8B8B",fontSize:13,fontWeight:300,lineHeight:1.4,letterSpacing:"-0.03em",fontFamily:T,whiteSpace:"nowrap",margin:0,textAlign:"center"},children:e.name})]},e.file)})})},ei=e=>{let{config:t,setConfig:n}=e,i=t.columnsEnabled&&z(t.width)>0,o=i?L(t):1,[d,c]=(0,r.useState)(()=>{let e={startfinish:!0,tekst:!0};for(let t=0;t<o;t++)e["col-".concat(t)]=!1;return e}),u=e=>c(t=>({...t,[e]:!t[e]})),m=(e,t)=>
1n(n=>{let l=M(L(n),n.columns,n.secondaryTexture);return l[e]={...l[e],...t},{...n,columns:l}}),g={display:"flex",alignItems:"center",justifyContent:"space-between",padding:10,cursor:"pointer",userSelect:"none"},p={color:"#FAFAFA",fontSize:16,fontWeight:300,fontFamily:T,letterSpacing:"-0.03em",margin:0},h={border:"1px solid rgba(250,250,250,0.5)",padding:"12px 20px",color:"rgba(250,250,250,0.5)",fontSize:16,fontFamily:T,letterSpacing:"-0.03em",width:"100%",boxSizing:"border-box",backgroundColor:"transparent"},x=(t.textLines||[]).map(C),f=x.some(e=>e.text);return(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[Array.from({length:o},(e,r)=>{var o,c,x;let f=t.columns[r]||{},y=null!=(o=f.primaryTexture)?o:t.primaryTexture,b=null!=(c=f.secondaryTexture)?c:t.secondaryTexture,v=R.some(e=>{let[t,n]=e;return t===y&&n===b}),F=i?"".concat(j("Baan","Lane")," ").concat(r+1):j("Mat","Mat"),S=null!=(x=d["col-".concat(r)])&&x;return(0,l.jsxs)("div",{style:{border:"1px solid rgba(250,250,250,0.3)"},children:[(0,l.jsxs)("div",{style:g,onClick:()=>u("col-".concat(r)),children:[(0,l.jsx)("p",{style:q,children:F}),(0,l.jsx)(a.A,{size:20,color:"#FAFAFA",style:{transform:S?"rotate(180deg)":"none",transition:"transform 0.2s",flexShrink:0}})]}),S&&(()=>{var e,o,a,d,c,u;let g=t.columns[r]||{},x=!i&&0===r,f=null!=(e=g.showRulerLines)?e:!!x&&t.showRulerLines,F=null!=(o=g.showStartFinish)?o:!!x&&t.showStartFinish,S=null!=(a=g.showNumbering)?a:!!x&&t.showNumbering,C=null!=(d=g.rulerTexture)?d:b,w=null!=(c=g.startFinishTexture)?c:b,k=null!=(u=g.numberingTexture)?u:b;return(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:12,padding:"0 10px 12px"},children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{style:p,children:j("Kleur mat","Mat color")}),(0,l.jsx)("div",{style:{padding:"12px 12px 0"},children:(0,l.jsx)(er,{selected:y,onSelect:e=>{i?m(r,{primaryTexture:e}):n(t=>({...t,primaryTexture:e}))}})})]}),v&&(0,l.jsxs)("div",{style:{display:"flex",gap:8,backgroundColor:"rgba(180,120,0,0.15)",border:"1px solid rgba(180,120,0,0.3)",padding:10},children:[(0,l.jsx)(s.A,{size:14,color:"#F59E0B",style:{flexShrink:0,marginTop:2}}),(0,l.jsx)("p",{style:{color:"#F59E0B",fontSize:13,fontFamily:T,margin:0},children:j("Weinig contrast met de matkleur","Low contrast with the mat color")})]}),f&&(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{style:p,children:j("Kleur liniaal","Ruler color")}),(0,l.jsx)("div",{style:{padding:"12px 12px 0"},children:(0,l.jsx)(er,{selected:C,onSelect:e=>{i?m(r,{rulerTexture:e}):n(t=>({...t,rulerTexture:e}))}})})]}),F&&(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{style:p,children:j("Kleur start / finish","Start / finish color")}),(0,l.jsxs)("div",{style:{display:"flex",gap:16,padding:"6px 12px 0"},children:[(0,l.jsx)("div",{style:{flex:1},children:(0,l.jsx)("div",{style:h,children:t.startText||"Start"})}),(0,l.jsx)("div",{style:{flex:1},children:(0,l.jsx)("div",{style:h,children:t.finishText||"Finish"})})]}),(0,l.jsx)("div",{style:{padding:"8px 12px 0"},children:(0,l.jsx)(er,{selected:w,onSelect:e=>{i?m(r,{startFinishTexture:e}):n(t=>({...t,startFinishTexture:e}))}})})]}),S&&(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{style:p,children:j("Kleur nummering","Numbering color")}),(0,l.jsx)("div",{style:{padding:"12px 12px 0"},children:(0,l.jsx)(er,{selected:k,onSelect:e=>{i?m(r,{numberingTexture:e}):n(t=>({...t,numberingTexture:e}))}})})]})]})})()]},r)}),f&&(()=>{var e;
1let t=null==(e=d.tekst)||e;return(0,l.jsxs)("div",{style:{border:"1px solid rgba(250,250,250,0.3)"},children:[(0,l.jsxs)("div",{style:g,onClick:()=>u("tekst"),children:[(0,l.jsx)("p",{style:q,children:j("Tekst","Text")}),(0,l.jsx)(a.A,{size:20,color:"#FAFAFA",style:{transform:t?"rotate(180deg)":"none",transition:"transform 0.2s"}})]}),t&&(0,l.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:16,padding:"0 10px 12px"},children:x.map((e,t)=>{var r;return e.text||1!==t?(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[(0,l.jsx)("div",{style:{padding:"0 12px"},children:(0,l.jsx)("div",{style:h,children:e.text||"".concat(j("Tekstregel","Text line")," ").concat(t+1)})}),(e.text||0===t)&&(0,l.jsxs)("div",{style:{padding:"0 12px"},children:[(0,l.jsx)("p",{style:{...p,marginBottom:6},children:"Kleur"}),(0,l.jsx)(er,{selected:(null==(r=F.find(t=>t.color===e.color))?void 0:r.file)||"White.jpg",onSelect:e=>{let l=F.find(t=>t.file===e);((e,t)=>n(n=>{let l=(n.textLines||[]).map(C);return l[e]={...l[e],...t},{...n,textLines:l}}))(t,{color:(null==l?void 0:l.color)||null})}})]})]},t):null})})]})})()]})},eo=e=>{let{config:t,availW:n,availH:r,activeDim:i,zoom:o,onLogoDrag:a,onTextDrag:s,matRef:d}=e,c=t.width||120,u=t.length||1e3,m=Math.min((n-40-4)/c,(r-30-4)/u),g=Math.max(4,Math.round(c*m)),p=Math.max(4,Math.round(u*m)),h={fontFamily:T,fontWeight:600,fontSize:16,letterSpacing:"-0.03em",transition:"color 0.3s ease"};return(0,l.jsxs)("div",{style:{position:"relative",width:g+40,height:p+30},children:[(0,l.jsx)("div",{ref:d,style:{position:"absolute",left:40,top:0,width:g,height:p},children:(0,l.jsx)(K,{config:t,maxW:g,maxH:p,zoom:o,onLogoDrag:a,onTextDrag:s})}),(0,l.jsxs)("div",{style:{position:"absolute",left:40,width:g,bottom:0,textAlign:"center",...h,color:"width"===i?"#FF6200":"#8C8B8B"},children:[c," cm"]}),(0,l.jsxs)("div",{style:{position:"absolute",left:0,top:0,width:40,height:p,display:"flex",alignItems:"center",justifyContent:"center",writingMode:"vertical-lr",transform:"rotate(180deg)",...h,color:"length"===i?"#FF6200":"#8C8B8B"},children:[u," cm"]})]})},ea=r.forwardRef(function(e,t){var n,i,o,s,d,c,u,m,g,p,h;let{config:x,onContact:f,capturedMatImage:y}=e,[b,v]=(0,r.useState)(null),w=async()=>{v("contact");let e=btoa(unescape(encodeURIComponent(JSON.stringify(x,null,2)))),t="";try{t=W(x,y).output("datauristring").split(",")[1]||""}catch(e){console.error(j("PDF genereren mislukt:","PDF generation failed:"),e)}f({pdfBase64:t,jsonBase64:e}),v(null)};r.useImperativeHandle(t,()=>({handleContactClick:w,isExporting:()=>"contact"===b}));let k=x.columnsEnabled,A=k?(null==(n=x.columns)?void 0:n.length)||1:0,z=null!=(o=null==(i=x.columns)?void 0:i[0])?o:{},M=F.find(e=>{var t;return e.file===(null!=(t=z.primaryTexture)?t:x.primaryTexture)}),L=F.find(e=>{var t;return e.file===(null!=(t=z.secondaryTexture)?t:x.secondaryTexture)}),N=x.thirdColor?F.find(e=>e.file===x.thirdColor):null,R=(x.textLines||[]).map(C).filter(e=>e.text),B=k?null:null!=(d=null!=(s=z.markingType)?s:x.markingType)?d:"standard",P=k?null:null!=(u=null!=(c=z.showRulerLines)?c:x.showRulerLines)&&u,E=k?null:null!=(g=null!=(m=z.showStartFinish)?m:x.showStartFinish)&&g,D=k?null:null!=(h=null!=(p=z.showNumbering)?p:x.showNumbering)&&h;k||null!=z.sledDistance||x.sledDistance;let I=F.find(e=>{var t;return e.file===(null!=(t=x.rulerTexture)?t:x.secondaryTexture)}),O=F.find(e=>{var t;return e.file===(null!=(t=x.startFinishTexture)?t:x.secondaryTexture)}),G=F.find(e=>{var t;return e.file===(null!=(t=x.numberingTexture)?t:x.secondaryTexture)}),H=e=>({begin:j("Begin","Start"),end:j("Einde","End"),left:j("Links","Left"),right:j("Rechts","Right"),center:j("Midden","Center")})[e]||j("Midden","Center"),K=e=>{let{label:t,value:n,dots:r}=e;return(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"6px 12px"},children:[(0,l.jsx)("span",{style:{color:"#FAFAFA",fontSize:16,fontWeight:300,fontFamily:T,letterSpacing:"-0.03em"},children:t}),r?(0,l.jsx)("div",{style:{display:"flex",alignItems:"center"},children:r.map((e,t)=>(0,l.jsx)("div",{style:{width:21,height:21,borderRadius:"50%",backgroundColor:e,border:"1px solid #060607",marginRight:t<r.length-1?-6:0}},t))}):(0,l.jsx)("span",{style:{color:"#FAFAFA",fontSize:16,fontWeight:300,fontFamily:T,letterSpacing:"-0.03em",textAlign:"right"},children:n})]})},U=e=>{let{label:t}=e;return(0,l.jsx)("p",{style:{color:"#FAFAFA",fontWeight:600,fontSize:14,fontFamily:T,padding:"8px 12px 2px"},children:t})},[Y,X]=(0,r.useState)({0:!0,1:!0,2:!1,3:!1}),J=e=>{let{title:t,idx:n,children:r}=e;return(0,l.jsxs)("div",{style:{border:"1px solid rgba(250,250,250,0.3)"},children:[(0,l.jsxs)("div",{onClick:()=>X(e=>({...e,[n]:!e[n]})),style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:10,
1cursor:"pointer",userSelect:"none"},children:[(0,l.jsx)("p",{style:{...q,margin:0},children:t}),(0,l.jsx)(a.A,{size:20,color:"#FAFAFA",style:{transform:Y[n]?"rotate(180deg)":"none",transition:"transform 0.2s",flexShrink:0}})]}),Y[n]&&(0,l.jsx)("div",{style:{paddingBottom:8},children:r})]})};return(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[(0,l.jsxs)(J,{title:j("Afmeting","Size"),idx:0,children:[(0,l.jsx)(K,{label:j("Breedte","Width"),value:"".concat((x.width/100).toFixed(1)," m")}),(0,l.jsx)(K,{label:j("Lengte","Length"),value:"".concat((x.length/100).toFixed(1)," m")}),k&&(0,l.jsx)(K,{label:j("Banen","Lanes"),value:"".concat(A)})]}),(0,l.jsxs)(J,{title:j("Markeringen","Markings"),idx:1,children:[!k&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(K,{label:j("Kleur mat","Mat color"),value:(null==M?void 0:M.name)||"—",dots:(null==M?void 0:M.color)?[M.color]:void 0}),"standard"===B&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(K,{label:j("Liniaal","Ruler"),value:P?j("Aan","On"):j("Uit","Off")}),P&&(0,l.jsx)(K,{label:j("Kleur liniaal","Ruler color"),value:(null==I?void 0:I.name)||"—",dots:[(null==I?void 0:I.color)||"#C3C3C3"]}),(0,l.jsx)(K,{label:"Start / Finish",value:E?j("Aan","On"):j("Uit","Off")}),E&&(0,l.jsx)(K,{label:j("Kleur start/finish","Start/finish color"),value:(null==O?void 0:O.name)||"—",dots:[(null==O?void 0:O.color)||"#C3C3C3"]}),(0,l.jsx)(K,{label:j("Nummering","Numbering"),value:D?j("Aan","On"):j("Uit","Off")}),D&&(0,l.jsx)(K,{label:j("Kleur nummering","Numbering color"),value:(null==G?void 0:G.name)||"—",dots:[(null==G?void 0:G.color)||"#C3C3C3"]}),!P&&!E&&!D&&(0,l.jsx)(K,{label:j("Kleur markeringen","Marking color"),value:(null==L?void 0:L.name)||"—",dots:(null==L?void 0:L.color)?[L.color]:void 0}),(0,l.jsx)(K,{label:j("Lijnbreedte","Line width"),value:"".concat(x.lineWidth||5," cm")})]}),"sled"===B&&(0,l.jsx)(K,{label:"Type",value:j("Slee mat","Sled mat")}),"burpee"===B&&(0,l.jsx)(K,{label:"Type",value:j("Burpee mat","Burpee mat")}),N&&(0,l.jsx)(K,{label:j("Derde kleur","Third color"),value:N.name,dots:[N.color]})]}),k&&(x.columns||[]).map((e,t)=>{var n,i,o,a,s,d,c,u;if(!1===e.active)return null;let m=null!=(c=e.primaryTexture)?c:x.primaryTexture,g=F.find(e=>e.file===m),p=null!=(u=e.secondaryTexture)?u:x.secondaryTexture,h=F.find(e=>e.file===p),f=e.rulerTexture?F.find(t=>t.file===e.rulerTexture):null,y=e.startFinishTexture?F.find(t=>t.file===e.startFinishTexture):null,b=e.numberingTexture?F.find(t=>t.file===e.numberingTexture):null,v=e.markingType||"standard";return(0,l.jsxs)(r.Fragment,{children:[(0,l.jsx)(U,{label:"".concat(j("Baan","Lane")," ").concat(t+1)}),(0,l.jsx)(K,{label:j("Kleur mat","Mat color"),value:(null==g?void 0:g.name)||"—",dots:(null==g?void 0:g.color)?[g.color]:void 0}),"standard"===v&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(K,{label:j("Liniaal","Ruler"),value:e.showRulerLines?j("Aan","On"):j("Uit","Off")}),e.showRulerLines&&(0,l.jsx)(K,{label:j("Kleur liniaal","Ruler color"),value:(null==(n=f||h)?void 0:n.name)||"—",dots:[(null==(i=f||h)?void 0:i.color)||"#C3C3C3"]}),(0,l.jsx)(K,{label:"Start / Finish",value:e.showStartFinish?j("Aan","On"):j("Uit","Off")}),e.showStartFinish&&(0,l.jsx)(K,{label:j("Kleur start/finish","Start/finish color"),value:(null==(o=y||h)?void 0:o.name)||"—",dots:[(null==(a=y||h)?void 0:a.color)||"#C3C3C3"]}),(0,l.jsx)(K,{label:j("Nummering","Numbering"),value:e.showNumbering?j("Aan","On"):j("Uit","Off")}),e.showNumbering&&(0,l.jsx)(K,{label:j("Kleur nummering","Numbering color"),value:(null==(s=b||h)?void 0:s.name)||"—",dots:[(null==(d=b||h)?void 0:d.color)||"#C3C3C3"]}),!e.showRulerLines&&!e.showStartFinish&&!e.showNumbering&&(0,l.jsx)(K,{label:j("Kleur markeringen","Marking color"),value:(null==h?void 0:h.name)||"—",dots:(null==h?void 0:h.color)?[h.color]:void 0}),(0,l.jsx)(K,{label:j("Lijnbreedte","Line width"),value:"".concat(x.lineWidth||5," cm")})]}),"sled"===v&&(0,l.jsx)(K,{label:"Type",value:j("Slee mat","Sled mat")}),"burpee"===v&&(0,l.jsx)(K,{label:"Type",value:j("Burpee mat","Burpee mat")})]},t)})]}),(0,l.jsxs)(J,{title:j("Logo's","Logos"),idx:2,children:[x.primaryLogo?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(K,{label:j("Primair logo","Primary logo"),value:j("Geladen","Loaded")}),(0,l.jsx)(K,{label:j("Positie","Position"),value:H(x.primaryLogo.position)}),(0,l.jsx)(K,{label:j("Grootte","Size"),value:"".concat(x.primaryLogo.sizeCm," cm")})]}):(0,l.jsx)(K,{label:j("Primair logo","Primary logo"),value:j("Geen","None")}),x.secondaryLogo?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(K,{label:j("Secundair logo","Secondary logo"),value:j("Geladen","Loaded")}),(0,l.jsx)(K,{label:j("Positie","Position"),value:H(x.secondaryLogo.position)}),(0,l.jsx)(K,{label:j("Grootte","Size"),value:"".concat(x.secondaryLogo.sizeCm," cm")})]}):(0,l.jsx)(K,{label:j("Secundair logo","Secondary logo"),value:j("Geen","None")})]}),(0,l.jsx)(J,{title:j("Tekst","Text"),idx:3,children:R.length>0?R.map((e,t)=>{var n;let i=(null==(n=S.find(t=>t.family===e.fontFamily))?void 0:n.name)||("custom-font"===e.fontFamily?x.customFontName||j("Eigen font","Custom font"):j("Standaard","Default")),o="left"===e.alignment?j("Links","Left"):"right"===e.alignment?j("Rechts","Right"):j("Midden","Center");return(0,l.jsxs)(r.Fragment,{children:[(0,l.jsx)(U,{label:"".concat(j("Tekstregel","Text line")," ").concat(t+1)}),(0,l.jsx)(K,{label:j("Tekst","Text"),value:e.text}),(0,l.jsx)(K,{label:j("Lettertype","Font"),value:i}),(0,l.jsx)(K,{label:j("Grootte","Size"),value:"".concat(e.fontSizeCm," cm")}),(0,l.jsx)(K,{label:j("Uitlijning","Alignment"),value:o}),(0,l.jsx)(K,{label:j("Kleur","Color"),dots:[e.color||"#FAFAFA"]})]},t)}):(0,l.jsx)(K,{label:j("Tekst","Text"),value:j("Geen","None")})}),(0,l.jsxs)("div",{style:{display:"flex",gap:8,marginTop:8},children:[(0,l.jsx)("button",{onClick:()=>
1{if(!y)return;v("jpeg");let e=document.createElement("a");e.href=y,e.download="sprint-tracks-ontwerp.jpg",e.click(),v(null)},disabled:!!b,style:{flex:1,padding:16,backgroundColor:"#0131FF",color:"#FAFAFA",border:"none",fontFamily:T,fontWeight:600,fontSize:16,letterSpacing:"-0.03em",textTransform:"uppercase",cursor:b?"wait":"pointer",opacity:b&&"jpeg"!==b?.5:1},children:"jpeg"===b?j("Bezig...","Loading..."):j("Download als JPEG","Download as JPEG")}),(0,l.jsx)("button",{onClick:()=>{v("pdf");try{W(x,y).save("sprint-tracks-ontwerp.pdf")}finally{v(null)}},disabled:!!b,style:{flex:1,padding:16,backgroundColor:"#0131FF",color:"#FAFAFA",border:"none",fontFamily:T,fontWeight:600,fontSize:16,letterSpacing:"-0.03em",textTransform:"uppercase",cursor:b?"wait":"pointer",opacity:b&&"pdf"!==b?.5:1},children:"pdf"===b?j("Bezig...","Loading..."):j("Download als PDF","Download as PDF")})]}),(0,l.jsx)("button",{onClick:()=>(e=>{let t=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),n=URL.createObjectURL(t),l=document.createElement("a");l.href=n,l.download="sprint-tracks-design.json",l.click(),URL.revokeObjectURL(n)})(x),style:{width:"100%",padding:"10px 16px",backgroundColor:"transparent",color:"#8C8B8B",border:"1px solid rgba(250,250,250,0.3)",fontFamily:T,fontWeight:600,fontSize:13,letterSpacing:"-0.02em",cursor:"pointer"},children:j("Ontwerpbestand (.json) downloaden","Download design file (.json)")})]})}),es={width:"100%",boxSizing:"border-box",backgroundColor:"transparent",border:"1px solid rgba(250,250,250,0.3)",padding:"14px 16px",color:"#FAFAFA",fontSize:16,fontFamily:T,letterSpacing:"-0.03em",outline:"none"},ed={color:"#C3C3C3",fontSize:12,fontWeight:700,fontFamily:T,letterSpacing:"-0.02em",marginBottom:6,display:"block"},ec=e=>{let{id:t,label:n,type:r="text",placeholder:i,multiline:o,value:a,onChange:s}=e;return(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[(0,l.jsx)("label",{style:ed,children:n}),o?(0,l.jsx)("textarea",{id:t,rows:4,placeholder:i,value:a,onChange:s,style:{...es,resize:"vertical"}}):(0,l.jsx)("input",{id:t,type:r,placeholder:i,value:a,onChange:s,style:es})]})},eu=e=>{let{config:t,onBack:n,sent:i,attachments:o,submitTrigger:a,onSubmitting:s,onSent:d}=e,[c,u]=(0,r.useState)({naam:"",bedrijf:"",email:"",telefoon:"",opmerking:""}),[g,p]=(0,r.useState)(""),h=e=>t=>u(n=>({...n,[e]:t.target.value}));return(r.useEffect(()=>{if(0!==a){if(!c.naam.trim()||!c.email.trim())return void p(j("Vul je naam en e-mailadres in.","Please enter your name and email address."));p(""),s(!0),fetch("https://hook.eu2.make.com/bzt0d1c55xhclifr7sfrzvtgqwftrq7s",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({naam:c.naam,bedrijf:c.bedrijf,email:c.email,telefoon:c.telefoon,opmerking:c.opmerking,pdf_base64:(null==o?void 0:o.pdfBase64)||"",json_base64:(null==o?void 0:o.jsonBase64)||""})}).then(()=>d()).catch(()=>p(j("Versturen mislukt. Probeer het opnieuw.","Sending failed. Please try again."))).finally(()=>s(!1))}},[a]),i)?(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:24,padding:"60px 0",textAlign:"center"},children:[(0,l.jsx)("div",{style:{width:64,height:64,borderRadius:"50%",backgroundColor:"#FF6200",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,l.jsx)(m.A,{size:28,color:"#FAFAFA"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{style:{color:"#FAFAFA",fontSize:24,fontWeight:800,fontFamily:T,letterSpacing:"-0.03em",margin:0},children:j("Aanvraag verstuurd!","Request sent!")}),(0,l.jsx)("p",{style:{color:"#C3C3C3",fontSize:14,fontFamily:T,letterSpacing:"-0.02em",marginTop:8},children:j("We nemen zo snel mogelijk contact met je op.","We will contact you as soon as possible.")})]})]}):(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:20},children:[(0,l.jsxs)("div",{style:{display:"flex",gap:10,padding:"12px 14px",borderLeft:"3px solid #FF6200",backgroundColor:"rgba(255,98,0,0.08)"},children:[(0,l.jsx)(x.R,{size:18,weight:"bold",color:"#FF6200",style:{flexShrink:0,marginTop:1}}),(0,l.jsx)("p",{style:{color:"#E4E4E4",fontSize:13,fontFamily:T,letterSpacing:"-0.02em",lineHeight:1.4,margin:0},children:j("Dit is nog geen definitief design. Je ontwerp wordt meegestuurd met je aanvraag en een medewerker van Sprinttracks neemt contact met je op om samen het offici\xeble design te bespreken.","This is not yet a final design. Your design will be sent with your request and a Sprinttracks employee will contact you to discu
1ss the official design together.")})]}),(0,l.jsx)(ec,{id:"naam",label:j("NAAM *","NAME *"),placeholder:j("Je naam","Your name"),value:c.naam,onChange:h("naam")}),(0,l.jsx)(ec,{id:"bedrijf",label:j("BEDRIJF","COMPANY"),placeholder:j("Optioneel","Optional"),value:c.bedrijf,onChange:h("bedrijf")}),(0,l.jsx)(ec,{id:"email",label:j("E-MAILADRES *","EMAIL ADDRESS *"),type:"email",placeholder:j("[email protected]","[email protected]"),value:c.email,onChange:h("email")}),(0,l.jsx)(ec,{id:"telefoon",label:j("TELEFOONNUMMER","PHONE NUMBER"),type:"tel",placeholder:j("+31 6 00 00 00 00","+1 555 000 0000"),value:c.telefoon,onChange:h("telefoon")}),(0,l.jsx)(ec,{id:"opmerking",label:j("OPMERKINGEN","NOTES"),placeholder:j("Aanvullende wensen of vragen","Additional wishes or questions"),multiline:!0,value:c.opmerking,onChange:h("opmerking")}),(0,l.jsx)("p",{style:{color:"#8C8B8B",fontSize:12,fontFamily:T,letterSpacing:"-0.02em",margin:0},children:j("* Verplichte velden.","* Required fields.")}),g&&(0,l.jsx)("p",{style:{color:"#f87171",fontSize:13,fontFamily:T,margin:0},children:g})]})},em=e=>{let{currentStep:t}=e;return(0,l.jsx)("div",{className:"px-8 py-5 shrink-0",style:{fontFamily:T,display:"grid",gridTemplateColumns:"repeat(".concat(w.length,", 1fr)")},children:w.map((e,n)=>{let r=n<t,i=n===t;return(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",position:"relative",gap:8},children:[n>0&&(0,l.jsx)("div",{style:{position:"absolute",top:11,right:"calc(50% + ".concat(14,"px)"),left:0,height:1,backgroundColor:"#C3C3C3"}}),n<w.length-1&&(0,l.jsx)("div",{style:{position:"absolute",top:11,left:"calc(50% + ".concat(14,"px)"),right:0,height:1,backgroundColor:"#C3C3C3"}}),(0,l.jsxs)("div",{style:{width:24,height:24,borderRadius:"50%",border:"1px solid",borderColor:r||i?"#FF6200":"#C3C3C3",backgroundColor:r?"#FF6200":"#FAFAFA",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative",zIndex:1},children:[r&&(0,l.jsx)(m.A,{size:12,color:"#ffffff",strokeWidth:3}),i&&(0,l.jsx)("div",{style:{width:6.7,height:6.7,borderRadius:"50%",backgroundColor:"#FF6200"}})]}),(0,l.jsx)("span",{className:"text-base font-light whitespace-nowrap transition-colors",style:{color:r||i?"#060607":"#C3C3C3",letterSpacing:"-0.03em",lineHeight:1.3,textAlign:"center"},children:e})]},n)})})},eg=e=>{let{t,selectedId:n,onSelect:r}=e;return(0,l.jsxs)("button",{onClick:()=>r(t.id,t.config),className:"relative overflow-hidden flex flex-col items-start justify-end p-5 text-left transition-all",style:{height:230,border:n===t.id?"3px solid #FF6200":"1px solid #E4E4E4"},children:[(0,l.jsxs)("div",{className:"absolute inset-0 pointer-events-none",children:[t.image?(0,l.jsx)("img",{src:t.image,alt:t.name,className:"absolute inset-0 w-full h-full object-cover"}):(0,l.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,l.jsx)(K,{config:t.config,maxH:220,maxW:80})}),(0,l.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent 30%, rgba(0,0,0,0.7))"}})]}),(0,l.jsxs)("div",{className:"relative",style:{color:"#FAFAFA"},children:[(0,l.jsx)("p",{className:"font-extrabold text-lg uppercase leading-none",style:{letterSpacing:"-0.03em"},children:t.name}),(0,l.jsx)("p",{className:"font-light text-base mt-1.5",style:{letterSpacing:"-0.03em"},children:t.description})]})]})},ep=e=>{let{selectedId:t,onSelect:n}=e;return(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsx)("div",{className:"grid grid-cols-3 gap-3",children:N.slice(0,3).map(e=>(0,l.jsx)(eg,{t:e,selectedId:t,onSelect:n},e.id))}),(0,l.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[N.slice(3,5).map(e=>(0,l.jsx)(eg,{t:e,selectedId:t,onSelect:n},e.id)),(0,l.jsx)("button",{onClick:()=>n("scratch",A),className:"flex items-center justify-center p-5 text-center transition-all",style:{height:230,border:"scratch"===t?"3px solid #FF6200":"1px dashed #E4E4E4"},children:(0,l.jsxs)("p",{className:"font-extrabold text-lg uppercase leading-tight",style:{color:"#FAFAFA",letterSpacing:"-0.03em"},children:["Design from",(0,l.jsx)("br",{}),"scratch"]})})]})]})},eh=()=>{var e,t;let[n,i]=(0,r.useState)(!1),[o,a]=(0,r.useState)(null),[s,d]=(0,r.useState)(1),[c,u]=(0,r.useState)(A),[m,x]=(0,r.useState)(!1),[f,y]=(0,r.useState)(!1),[v,F]=(0,r.useState)(!1),[S,w]=(0,r.useState)({}),[z,M]=(0,r.useState)(0),[L,N]=(0,r.useState)(!1),[R,B]=(0,r.useState)(null),P=(0,r.useRef)(null),E=(0,r.useRef)(null),[D,W]=(0,r.useState)(1.02),[I,O]=(0,r.useState)({x:0,y:0}),[G,H]=(0,r.useState)(!1),[K,U]=(0,r.useState)(null),Y=(0,r.useRef)(null),X=(0,r.useRef)(null),[V,q]=(0,r.useState)({w:500,h:600}),_=(0,r.useRef)({zoom:1,pan:{x:0,y:0}}),Z=(0,r.useRef)({startX:0,startY:0,startPanX:0,startPanY:0});(0,r.useEffect)(()=>{_.current={zoom:D,pan:I}},[D,I]),(0,r.useEffect)(()=>{let e=X.current;if(!e)return;let t=new ResizeObserver(e=>{let[t]=e,{width:n,height:l}=t.contentRect;q({w:n,h:l})});return t.observe(e),()=>t.disconnect()},[]);let Q=()=>n?1!==s||c.width>=100&&c.width<=400&&c.length>=500&&c.length<=5e3:null!==o,$=[(0,l.jsx)(J,{config:c,setConfig:u,onDimChange:e=>{clearTimeout(Y.current),U(e),Y.current=setTimeout(()=>U(null),1500)}},1),(0,l.jsx)(ee,{config:c,setConfig:u},2),(0,l.jsx)(et,{config:c,setConfig:u},3),(0,l.jsx)(el,{config:c,setConfig:u},4),(0,l.jsx)(ei,{config:c,setConfig:u},5)],en=n?s:0;return(0,l.jsxs)("div",{className:"flex h-screen overflow-hidden select-none",style:{fontFamily:T,backgroundColor:"#060607"},children:[(0,l.jsxs)("div",{style:{display:"none",position:"fixed",inset:0,zIndex:9999,backdropFilter:"blur(16px)",WebkitBackdropFilter:"blur(16px)",backgroundColor:"rgba(6,6,7,0.85)",alignItems:"center",justifyContent:"center",flexDirection:"column",padding:"2rem",textAlign:"center"},className:"mobile-blocker",children:[(0,l.jsxs)("p",{style:{color:"#FAFAFA",fontFamily:T,fontWeight:800,fontSize:28,lineHeight:1,letterSpacing:"-0.03em",textTransform:"uppercase",marginBottom:16},children:[j("Gemaakt voor","Built for"),(0,l.jsx)("br",{}),(0,l.jsx)("em",{children:j("grote schermen","big screens")})]}),(0,l.jsx)("p",{style:{color:"rgba(250,250,250,0.5)",fontFamily:T,fontWeight:400,fontSize:15,lineHeight:1.4,maxWidth:300,marginBottom:28},children:j("De Sprinttrack configurator werkt het beste op een laptop of desktop. Kun je nu niet switchen? Stuur ons een aanvraag en we helpen je verder.","The Sprinttrack configurator works best on a laptop or desktop. Can't switch right now? Send us a request and we'll help you out.")}),(0,l.jsx)("a",{href:"https://sprinttracks.com/contact",target:"_blank",rel:"noopener noreferrer",style:{display:"inline-block",backgroundColor:"#0131FF",color:"#FAFAFA",fontFamily:T,fontWeight:700,fontSize:15,letterSpacing:"-0.02em",textTransform:"uppercase",padding:"12px 24px",textDecoration:"none"},children:j("Stuur een aanvraag","Send a request")})]}),(0,l.jsxs)("div",{className:"w-1/2 shrink-0 flex flex-col",style:{backgroundColor:"#060607"},children:[(0,l.jsxs)("div",{className:"px-10 pt-10 shrink-0",children:[(0,l.jsxs)("h1",{style:{color:"#FAFAFA",fontSize:48,fontWeight:800,lineHeight:.9,letterSpacing:"-0.03em",textTransform:"uppercase"},children:["Design your own",(0,l.jsx)("br",{}),(0,l.jsx)("em",{children:"Sprinttrack"})]}),(0,l.jsx)("div",{className:"mt-6",style:{height:1,backgroundColor:"rgba(250,250,250,0.2)"}})]}),(0,l.jsx)("div",{className:"px-10 py-6 shrink-0",style:{borderBottom:"1px solid rgba(250,250,250,0.2)"},children:(0,l.jsxs)("div",{className:"flex gap-4 items-start",children:[!f&&!m&&(0,l.jsxs)("div",{style:{color:"#C3C3C3",fontWeight:800,fontSize:18,lineHeight:1,letterSpacing:"-0.03em",flexShrink:0},children:[String(en+1).padStart(2,"0"),"/",(0,l.jsx)("br",{}),"06"]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{style:{color:"#FAFAFA",fontWeight:800,fontSize:24,lineHeight:.9,letterSpacing:"-0.03em",textTransform:"uppercase"},children:f?j("Gegevens achterlaten","Leave your details"):m?j("Configuratie voltooid","Configuration complete"):k[en].title}),(0,l.jsx)("p",{className:"mt-2",style:{color:"#E4E4E4",fontWeight:300,fontSize:16,lineHeight:1.3,letterSpacing:"-0.03em"},children:f?j("Vul je gegevens in, dan nemen we contact met je op over je ontwerp.","Fill in your details and we will c
1ontact you about your design."):m?j("Bekijk hieronder een overzicht van je configuratie.","See below for an overview of your configuration."):k[en].desc})]})]})}),(0,l.jsx)("div",{className:"flex-1 overflow-y-auto px-10 py-8 custom-scrollbar",children:n?f?(0,l.jsx)(eu,{config:c,onBack:()=>{y(!1),F(!1)},sent:v,attachments:S,submitTrigger:z,onSubmitting:N,onSent:()=>F(!0)}):m?(0,l.jsx)(ea,{ref:P,config:c,capturedMatImage:R,onContact:e=>{w(e||{}),y(!0)}}):$[s-1]:(0,l.jsx)(ep,{selectedId:null!=(e=null==o?void 0:o.id)?e:null,onSelect:(e,t)=>{a({id:e,config:t})}})}),(!m||n||f)&&(0,l.jsx)("div",{className:"px-10 pb-10 pt-5 shrink-0",style:{borderTop:"1px solid rgba(250,250,250,0.2)"},children:(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[n?(0,l.jsxs)("button",{onClick:f?()=>{y(!1),F(!1)}:()=>m?void x(!1):n&&1===s?void i(!1):void(n&&d(e=>e-1)),style:{background:"none",border:"none",color:f||1!==s||m?"#FAFAFA":"#888888",fontFamily:T,fontWeight:600,fontSize:18,letterSpacing:"-0.03em",textTransform:"uppercase",cursor:"pointer",padding:0,display:"flex",alignItems:"center",gap:8},children:[f||1!==s||m?(0,l.jsx)(p.A,{size:16}):(0,l.jsx)(h.A,{size:16}),f||1!==s||m?j("VORIGE STAP","PREVIOUS STEP"):j("OPNIEUW","RESTART")]}):(0,l.jsxs)("label",{style:{color:"#C3C3C3",fontSize:13,fontWeight:300,cursor:"pointer",letterSpacing:"-0.02em",display:"flex",alignItems:"center",gap:6},children:[(0,l.jsx)(g.A,{size:12}),j("Bestaand ontwerp laden","Load existing design"),(0,l.jsx)("input",{type:"file",className:"hidden",accept:".json",onChange:e=>{let t=e.target.files[0];if(!t)return;let n=new FileReader;n.onloadend=()=>{try{let e=JSON.parse(n.result);void 0!==e.logo&&void 0===e.primaryLogo&&(e.primaryLogo=e.logo,delete e.logo),u({...A,...e}),a({id:"upload",config:{...A,...e}}),i(!0),d(1)}catch(e){alert(j("Ongeldig JSON-bestand. Controleer het bestand en probeer opnieuw.","Invalid JSON file. Check the file and try again."))}},n.readAsText(t)}})]}),m&&!f&&(0,l.jsxs)("button",{onClick:()=>{var e;return null==(e=P.current)?void 0:e.handleContactClick()},style:{display:"flex",alignItems:"center",gap:16,paddingLeft:24,paddingRight:24,paddingTop:16,paddingBottom:16,backgroundColor:"#0131FF",color:"#ffffff",fontFamily:T,fontWeight:600,fontSize:20,letterSpacing:"-0.03em",textTransform:"uppercase",border:"none",cursor:"pointer",whiteSpace:"nowrap"},children:[j("GEGEVENS ACHTERLATEN","LEAVE CONTACT DETAILS"),(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"43",height:"15",viewBox:"0 0 43 15",fill:"none",children:(0,l.jsx)("path",{d:"M42.2806 8.03104L35.5306 14.781C35.3899 14.9218 35.199 15.0008 35 15.0008C34.8009 15.0008 34.6101 14.9218 34.4693 14.781C34.3286 14.6403 34.2495 14.4494 34.2495 14.2504C34.2495 14.0514 34.3286 13.8605 34.4693 13.7198L39.9397 8.25042H0.75C0.551088 8.25042 0.360322 8.1714 0.21967 8.03075C0.0790178 7.8901 0 7.69933 0 7.50042C0 7.3015 0.0790178 7.11074 0.21967 6.97009C0.360322 6.82943 0.551088 6.75042 0.75 6.75042H39.9397L34.4693 1.28104C34.3286 1.14031 34.2495 0.94944 34.2495 0.750417C34.2495 0.551394 34.3286 0.360523 34.4693 0.219792C34.6101 0.0790615 34.8009 0 35 0C35.199 0 35.3899 0.0790615 35.5306 0.219792L42.2806 6.96979C42.3503 7.03945 42.4056 7.12216 42.4434 7.21321C42.4811 7.30426 42.5006 7.40185 42.5006 7.50042C42.5006 7.59898 42.4811 7.69657 42.4434 7.78762C42.4056 7.87867 42.3503 7.96139 42.2806 8.03104Z",fill:"#FAFAFA"})})]}),f&&!v&&(0,l.jsxs)("button",{disabled:L,onClick:()=>M(e=>e+1),style:{display:"flex",alignItems:"center",gap:16,paddingLeft:24,paddingRight:24,paddingTop:16,paddingBottom:16,backgroundColor:"#0131FF",color:"#ffffff",fontFamily:T,fontWeight:600,fontSize:20,letterSpacing:"-0.03em",textTransform:"uppercase",border:"none",cursor:"pointer",whiteSpace:"nowrap"},children:[j("AANVRAAG VERSTUREN","SEND REQUEST"),(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"43",height:"15",viewBox:"0 0 43 15",fill:"none",children:(0,l.jsx)("path",{d:"M42.2806 8.03104L35.5306 14.781C35.3899 14.9218 35.199 15.0008 35 15.0008C34.8009 15.0008 34.6101 14.9218 34.4693 14.781C34.3286 14.6403 34.2495 14.4494 34.2495 14.2504C34.2495 14.0514 34.3286 13.8605 34.4693 13.7198L39.9397 8.25042H0.75C0.551088 8.25042 0.360322 8.1714 0.21967 8.03075C0.0790178 7.8901 0 7.69933 0 7.50042C0 7.3015 0.0790178 7.11074 0.21967 6.97009C0.360322 6.82943 0.551088 6.75042 0.75 6.75042H39.9397L34.4693 1.28104C34.328
16 1.14031 34.2495 0.94944 34.2495 0.750417C34.2495 0.551394 34.3286 0.360523 34.4693 0.219792C34.6101 0.0790615 34.8009 0 35 0C35.199 0 35.3899 0.0790615 35.5306 0.219792L42.2806 6.96979C42.3503 7.03945 42.4056 7.12216 42.4434 7.21321C42.4811 7.30426 42.5006 7.40185 42.5006 7.50042C42.5006 7.59898 42.4811 7.69657 42.4434 7.78762C42.4056 7.87867 42.3503 7.96139 42.2806 8.03104Z",fill:"#FAFAFA"})})]}),!m&&!f&&(0,l.jsxs)("button",{onClick:()=>{if(!n)return void(o&&(u(o.config),i(!0),d(1)));if(s<5)return void d(e=>e+1);let e=E.current;e?b().toJpeg(e,{scale:3,bgcolor:"#ffffff",quality:.92}).then(e=>{B(e)}).catch(()=>{}).finally(()=>x(!0)):x(!0)},disabled:!Q(),style:{display:"flex",alignItems:"center",gap:16,paddingLeft:24,paddingRight:24,paddingTop:16,paddingBottom:16,backgroundColor:Q()?"#0131FF":"rgba(255,255,255,0.1)",color:"#ffffff",fontFamily:T,fontWeight:600,fontSize:20,letterSpacing:"-0.03em",textTransform:"uppercase",border:"none",cursor:Q()?"pointer":"not-allowed",transition:"background-color 0.2s",whiteSpace:"nowrap"},children:[j("Volgende stap","Next step"),(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"43",height:"15",viewBox:"0 0 43 15",fill:"none",children:(0,l.jsx)("path",{d:"M42.2806 8.03104L35.5306 14.781C35.3899 14.9218 35.199 15.0008 35 15.0008C34.8009 15.0008 34.6101 14.9218 34.4693 14.781C34.3286 14.6403 34.2495 14.4494 34.2495 14.2504C34.2495 14.0514 34.3286 13.8605 34.4693 13.7198L39.9397 8.25042H0.75C0.551088 8.25042 0.360322 8.1714 0.21967 8.03075C0.0790178 7.8901 0 7.69933 0 7.50042C0 7.3015 0.0790178 7.11074 0.21967 6.97009C0.360322 6.82943 0.551088 6.75042 0.75 6.75042H39.9397L34.4693 1.28104C34.3286 1.14031 34.2495 0.94944 34.2495 0.750417C34.2495 0.551394 34.3286 0.360523 34.4693 0.219792C34.6101 0.0790615 34.8009 0 35 0C35.199 0 35.3899 0.0790615 35.5306 0.219792L42.2806 6.96979C42.3503 7.03945 42.4056 7.12216 42.4434 7.21321C42.4811 7.30426 42.5006 7.40185 42.5006 7.50042C42.5006 7.59898 42.4811 7.69657 42.4434 7.78762C42.4056 7.87867 42.3503 7.96139 42.2806 8.03104Z",fill:"#FAFAFA"})})]})]})})]}),(0,l.jsxs)("div",{className:"flex-1 flex flex-col",style:{backgroundColor:"#FAFAFA"},children:[(0,l.jsx)(em,{currentStep:m?6:en}),(0,l.jsxs)("div",{ref:X,className:"flex-1 relative overflow-hidden",style:{backgroundImage:"radial-gradient(circle, rgba(0,0,0,0.07) 1px, transparent 1px)",backgroundSize:"28px 28px",cursor:G?"grabbing":"grab",userSelect:"none"},onMouseDown:e=>{0===e.button&&(H(!0),Z.current={startX:e.clientX,startY:e.clientY,startPanX:I.x,startPanY:I.y})},onMouseMove:e=>{G&&O({x:Z.current.startPanX+(e.clientX-Z.current.startX),y:Z.current.startPanY+(e.clientY-Z.current.startY)})},onMouseUp:()=>H(!1),onMouseLeave:()=>H(!1),children:[(0,l.jsx)("div",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(calc(-50% + ".concat(I.x,"px), calc(-50% + ").concat(I.y,"px)) scale(").concat(D,")"),transformOrigin:"center center",transition:G?"none":"transform 0.12s ease"},children:(0,l.jsx)(eo,{config:n?c:null!=(t=null==o?void 0:o.config)?t:c,availW:Math.max(60,V.w-64),availH:Math.max(100,V.h-80),activeDim:K,zoom:D,onLogoDrag:n&&3===s?(e,t)=>u(n=>({...n,[e]:{...n[e],...t}})):void 0,onTextDrag:n&&4===s?e=>u(t=>{let n=[...(t.textLines||[]).map(C)];return n[e.lineIndex]={...n[e.lineIndex],xPct:e.textXPct,topCm:e.textTopCm},{...t,textLines:n}}):void 0,matRef:E})}),(0,l.jsxs)("div",{className:"absolute bottom-8 right-8 flex flex-col gap-3 pointer-events-auto",onMouseDown:e=>e.stopPropagation(),children:[(0,l.jsx)("button",{onClick:()=>W(e=>Math.min(10,Math.round((e+.25)*100)/100)),style:{width:40,height:40,border:"1px solid #FF6200",backgroundColor:"transparent",color:"#FF6200",fontSize:20,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},children:"+"}),(0,l.jsx)("button",{onClick:()=>W(e=>Math.max(.25,Math.round((e-.25)*100)/100)),style:{width:40,height:40,border:"1px solid #FF6200",backgroundColor:"transparent",color:"#FF6200",fontSize:20,fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},children:"−"})]})]})]})]})};function ex(){return(0,l.jsx)(eh,{})}},5377:(e,t,n)=>{Promise.resolve().then(n.bind(n,2241))}},e=>{e.O(0,[33,930,787,441,255,358],()=>e(e.s=5377)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.