1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1518a974-0975-4e04-86f6-ab592e181cd3",e._sentryDebugIdIdentifier="sentry-dbid-1518a974-0975-4e04-86f6-ab592e181cd3")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4076],{18038:(e,t,r)=>{r.d(t,{N:()=>c});var l=r(2033),n=r(87457);let a=Object.freeze({memberName:"Jane Doe",memberId:"100245",memberEmail:"[email protected]",memberTier:"Premium",expiryDate:new Date(new Date().getFullYear()+1,11,31),createdAt:new Date(new Date().getFullYear(),0,14),serialNumber:"ML-SAMPLE-0001",balance:8,points:1250});function i(e,t){if(!e)return null;let r=e instanceof Date?e:new Date(e);if(Number.isNaN(r.getTime()))return null;switch(t){case"date-short":return r.toLocaleDateString("en-US",{year:"2-digit",month:"numeric",day:"numeric"});case"date-medium":return r.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});case"date-long":return r.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});case"date-time":return r.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"});default:return r.toISOString().slice(0,10)}}function o(e,t){let r=new Date(e),l=r.getDate();return r.setMonth(r.getMonth()+t),r.getDate()!==l&&r.setDate(0),r}function s(e){var t,r,o;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||!e.source)return null;let c={...a,...s};switch(e.source){case"memberName":return c.memberName||null;case"memberId":if(null!=c.memberId)return String(c.memberId);if(c.reference)return c.reference;return c.serialNumber||null;case"memberEmail":return c.memberEmail||null;case"memberTier":return c.memberTier||null;case"expiryDate":return i(c.expiryDate,e.format||"iso-date");case"joinDate":return i(c.createdAt,e.format||"date-medium");case"serialNumber":return c.serialNumber||null;case"organizationName":return s.organizationName||"Your Organization";case"static":return e.staticValue||null;case"signupAnswer":{let r=e.sourceKey?null==s||null==(t=s.answers)?void 0:t[e.sourceKey]:null;return(null==r?"":String(r).trim())||e.label||e.sourceKey||null}case"balance":{let t=null!=(r=null==s?void 0:s.balance)?r:a.balance;if(null==t)return null;if("currencyMinor"===e.format){let e=((null==s?void 0:s.valueCurrency)||void 0||"SGD").toUpperCase(),r=(0,n.KF)(e)?t:t/100;return(0,l.$g)(r,e)}return String(t)}case"points":{let e=null!=(o=null==s?void 0:s.points)?o:a.points;return null==e?null:String(e)}default:return null}}function c(e,t){var r,l,n,i,c,u,m,d,p,f,g,h,x,b,y;let v=(null==e||null==(r=e.walletFields)?void 0:r.apple)||{},w=(null==e?void 0:e.program)||{},N=(null==e||null==(l=e.organization)?void 0:l.name)||"Your Organization",k={organizationName:N,memberName:(t.name||"").trim()||"Your Name",memberEmail:(t.email||"").trim()||a.memberEmail,answers:t.answers||{},createdAt:new Date,expiryDate:function(e){let t=(null==e?void 0:e.passType)==="membership"?a.expiryDate:null,r=null==e?void 0:e.expiry;if(!r||!["none","duration","window"].includes(r.mode)){let t=Number(null==e?void 0:e.validityMonths);r=Number.isInteger(t)&&t>=1?{mode:"duration",durationValue:t,durationUnit:"month"}:{mode:"none"}}let l=new Date;if("duration"===r.mode){let e=Number(null!=(n=r.durationValue)?n:r.durationMonths),a=null!=(i=r.durationUnit)?i:"month";if(!Number.isInteger(e)||e<1)return t;if("hour"===a)return new Date(l.getTime()+60*e*6e4);if("day"===a){var n,i;let t=new Date(l);return t.setDate(t.getDate()+e),t}return"year"===a?o(l,12*e):o(l,e)}return"window"===r.mode?"year"===r.windowUnit?new Date(l.getFullYear(),11,31,23,59,59,999):new Date(l.getFullYear(),l.getMonth()+1,0,23,59,59,999):t}(w),..."entries"===w.passType?{balance:null!=(d=t.startingBalance)?d:w.startingBalance}:"stamp"===w.passType?{balance:Math.min(3,Number(w.targetStamps)||0),stampTarget:w.targetStamps,stampIcon:w.stampIcon}:"value"===w.passType?{balance:w.startingBalanceMinor,valueCurrency:(null==e?void 0:e.currency)||void 0}:{}},j=e=>(Array.isArray(e)?e:[]).map(e=>{var t;return{id:String(null!=(t=null==e?void 0:e.id)?t:""),label:(e=>{let t=(null==e?void 0:e.label)||"";if(!(null==e?void 0:e.labelSource))return t;let r=s({source:e.labelSource,sourceKey:e.labelSourceKey,format:e.labelFormat,currencyCode:e.currencyCode},k);return null==r||""===r?t:String(r)})(e),value:s(e,k),align:null==e?void 0:e.align,region:(null==e?void 0:e.sourceKey)?"".concat(e.source,":").concat(e.sourceKey):(null==e?void 0:e.source)||""}}).filter(e=>null!==e.value&&""!==e.value),C=Number(w.targetStamps),M="stamp"===w.passType&&Number.isInteger(y=C)&&y>=1&&y<=20?{target:C,collected:Math.min(3,C),icon:w.stampIcon||"check"}:null,D=j(v.primaryFields),F=(null==e||null==(n=e.colors)?void 0:n.primaryColor)||"#1D1D1F";return{colors:{primaryColor:F,secondaryColor:(null==e||null==(i=e.colors)?void 0:i.secondaryColor)||"#434343",textColor:(null==e||null==(c=e.colors)?void 0:c.textColor)||"#FFFFFF",labelColor:(null==e||null==(u=e.colors)?void 0:u.labelColor)||"rgba(255,255,255,0.72)"},screenTone:(null!=(p=function(e){let t=/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec((e||"").trim());if(!t)return null;let r=parseInt(3===t[1].length?t[1].split("").map(e=>e+e).join(""):t[1],16);return(.299*(r>>16&255)+.587*(r>>8&255)+.114*(255&r))/255}(F))?p:0)>.62?"dark":"light",stripImage:null!=(f=null==e?void 0:e.backgroundImage)?f:null,passType:null!=(g=w.passType)?g:null,wordmark:null!=(h=null==e?void 0:e.wordmark)?h:null,orgName:N,orgInitial:N.charAt(0).toUpperCase(),logoUrl:null!=(x=null==e||null==(m
1=e.organization)?void 0:m.logoUrl)?x:null,header:j(v.headerFields),primary:null!=(b=D[0])?b:null,frontFields:[...j(v.secondaryFields),...j(v.auxiliaryFields)],stamp:M,barcodeValue:"ML-SAMPLE-0001"}}},19575:(e,t,r)=>{r.d(t,{A:()=>d});var l=r(54568),n=r(7620),a=r(7891);function i(e){let t=Number(e);if(!Number.isInteger(t)||t<1||t>20)return null;let r=t<=6?1:2;return{rows:r,perRow:Math.ceil(t/r)}}let o={check:{paths:["M5 13l4 4L19 7"]},star:{paths:["M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26Z"]},heart:{paths:["M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"]},dot:{paths:["M19 12A7 7 0 1 1 5 12A7 7 0 1 1 19 12Z"],fill:!0},coffee:{paths:["M10 2v2","M14 2v2","M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1","M6 2v2"]},gift:{paths:["M4 8H20A1 1 0 0 1 21 9V11A1 1 0 0 1 20 12H4A1 1 0 0 1 3 11V9A1 1 0 0 1 4 8Z","M12 8v13","M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7","M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5"]}},s={membership:"/_next/static/media/membership.ee564c2a.jpg",entries:"/_next/static/media/entries.78d9a2db.jpg",stamp:"/_next/static/media/stamp.73c6960c.jpg",single_entry:"/_next/static/media/single_entry.b72601ed.jpg",voucher:"/_next/static/media/voucher.33682a2a.jpg",value:"/_next/static/media/value.3ce84ce4.jpg",timed:"/_next/static/media/timed.faf9d6f3.jpg",trial:"/_next/static/media/trial.e76402a3.jpg"};function c(e){let{text:t,baseCqw:r,minRatio:a=.275,observeRef:i,className:o="",style:s}=e,c=(0,n.useRef)(null);return(0,n.useLayoutEffect)(()=>{var e,t;let r=c.current;if(!r)return;let l=()=>{r.style.setProperty("--fit-scale","1");let e=r.clientWidth,t=r.scrollWidth;e&&!(t<=e)&&r.style.setProperty("--fit-scale",String(Math.max(a,e/t)))};l(),null==(t=document.fonts)||null==(e=t.ready)||e.then(l);let n=null==i?void 0:i.current;if(!n||"undefined"==typeof ResizeObserver)return;let o=new ResizeObserver(l);return o.observe(n),()=>o.disconnect()},[t,r,a,i]),(0,l.jsx)("p",{ref:c,className:o,style:{...s,fontSize:"calc(var(--fit-scale, 1) * ".concat(r,"cqw)")},children:t})}let u={left:"text-left",center:"text-center",right:"text-right"},m={left:"self-start text-left",center:"self-center text-center",right:"self-end text-right"};function d(e){let{view:t,className:r=""}=e,i=(0,n.useRef)(null),{colors:o,header:d,primary:g,frontFields:h,stamp:x}=t,b=t.stripImage||function(e){if(e)return s[e]}(t.passType),y="linear-gradient(135deg, ".concat(o.primaryColor," 0%, ").concat(o.secondaryColor," 100%)"),v=b?"linear-gradient(".concat(f(o.primaryColor,.25),", ").concat(f(o.primaryColor,.55),"), url(").concat(String(b).replace(/"/g,'\\"').replace(/\)/g,"\\)").replace(/\(/g,"\\("),") center/cover no-repeat"):y;return(0,l.jsx)("div",{className:"relative w-full ".concat(r),style:{containerType:"inline-size"},children:(0,l.jsxs)("div",{ref:i,className:"relative flex w-full flex-col overflow-hidden rounded-[22px] shadow-2xl",style:{backgroundColor:o.primaryColor,color:o.textColor,aspectRatio:"375 / 550"},children:[(0,l.jsxs)("div",{className:"flex min-h-[78px] shrink-0 items-start justify-between px-5 pb-3 pt-4",children:[(0,l.jsx)("div",{className:"flex min-w-0 flex-1 items-center gap-2 pr-3",children:t.wordmark?(0,l.jsx)("img",{src:t.wordmark,alt:"",className:"object-contain object-left",style:{maxWidth:"42.67cqw",maxHeight:"13.33cqw"}}):(0,l.jsxs)(l.Fragment,{children:[t.logoUrl?(0,l.jsx)("img",{src:t.logoUrl,alt:"",className:"h-9 w-9 flex-shrink-0 object-contain"}):(0,l.jsx)("div",{className:"flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-full text-sm font-bold",style:{backgroundColor:o.textColor,color:o.primaryColor},children:t.orgInitial}),(0,l.jsx)("span",{className:"min-w-0 truncate text-[13px] font-semibold",style:{color:o.textColor},children:t.orgName})]})}),d.length>0&&(0,l.jsx)("div",{className:"flex max-w-[45%] flex-shrink-0 flex-col items-end space-y-0.5",children:d.map(e=>{var t;return(0,l.jsxs)("div",{"data-region":e.region,className:m[null!=(t=e.align)?t:""]||"self-end text-right",children:[(0,l.jsx)("p",{className:"text-[8px] font-medium uppercase leading-tight tracking-wider opacity-70",style:{color:o.labelColor},children:e.label}),(0,l.jsx)("p",{className:"max-w-[120px] truncate text-[11px] font-semibold leading-tight",style:{color:o.textColor},children:e.value})]},e.id)})})]}),(0,l.jsx)("div",{className:"relative flex w-full shrink-0 items-start px-5 pb-5 pt-2",style:{background:v,aspectRatio:"375 / 144"}
1,children:x?(0,l.jsx)(p,{target:x.target,collected:x.collected,primaryColor:o.primaryColor,stampIcon:x.icon}):g?(0,l.jsxs)("div",{className:"w-full min-w-0","data-region":g.region,children:[(0,l.jsx)(c,{text:g.value,baseCqw:15.7,observeRef:i,className:"truncate font-normal leading-[1.2] tracking-tight",style:{color:o.textColor,textShadow:"0 1px 2px rgba(0,0,0,0.18)"}}),(0,l.jsx)("p",{className:"mt-1 text-[10px] font-medium uppercase tracking-[0.12em] opacity-80",style:{color:o.labelColor},children:g.label})]}):null}),(0,l.jsx)("div",{className:"min-h-0 flex-1 px-5 pb-2.5 pt-3.5",style:{backgroundColor:o.primaryColor},children:h.length>0&&(0,l.jsx)("div",{className:"flex items-start justify-between space-x-3",children:h.map((e,t)=>(0,l.jsxs)("div",{"data-region":e.region,className:"min-w-0 flex-1 ".concat(e.align?u[e.align]:t===h.length-1&&h.length>1?"text-right":""),children:[(0,l.jsx)("p",{className:"truncate text-[9px] font-medium uppercase tracking-[0.1em] opacity-80",style:{color:o.labelColor},children:e.label}),(0,l.jsx)("p",{className:"mt-0.5 truncate text-[14px] font-semibold",style:{color:o.textColor},children:e.value})]},e.id||t))})}),(0,l.jsx)("div",{className:"shrink-0 px-5 pb-4",children:(0,l.jsx)("div",{"data-region":"qr",className:"mx-auto flex items-center justify-center rounded-md",style:{width:"clamp(104px, 38%, 124px)",aspectRatio:"1 / 1",backgroundColor:"#ffffff"},children:(0,l.jsx)(a.h,{value:t.barcodeValue,size:112,className:"h-[82%] w-[82%]",bgColor:"#ffffff",fgColor:"#000000",level:"M",includeMargin:!1})})})]})})}function p(e){let{target:t,collected:r,primaryColor:n,stampIcon:a="check"}=e;if(!i(t))return null;let s=function(e){let{collected:t,target:r,primaryColor:l,stampIcon:n="check",width:a,height:s}=e,c=i(r);if(!c)return[];let{rows:u,perRow:m}=c,d=.8*Math.min(s/(2*u+1),a/(2*m+2)),p=a/m,f=s/u,g=n&&o[n]||o.check,h=Math.max(0,Math.min(Number(r),Number(t)||0)),x=[];for(let e=0;e<r;e++){let t=Math.floor(e/m),n=e-t*m,a=Math.min(m,r-t*m),i=(n+(m-a)/2)*p+p/2,o=t*f+f/2;if(e<h){x.push({kind:"circle",cx:i,cy:o,r:d,fill:"#FFFFFF",stroke:"none"});let e=1.2*d;x.push({kind:"glyph",transform:"translate(".concat(i-e/2," ").concat(o-e/2,") scale(").concat(e/24,")"),paths:g.paths,fill:g.fill?l:"none",stroke:g.fill?"none":l,strokeWidth:3})}else x.push({kind:"circle",cx:i,cy:o,r:d,fill:"none",stroke:"#FFFFFF",strokeOpacity:.4,strokeWidth:3})}return x}({collected:r,target:t,primaryColor:n,stampIcon:a,width:375,height:144});return(0,l.jsx)("svg",{className:"absolute inset-0 h-full w-full",viewBox:"0 0 ".concat(375," ").concat(144),preserveAspectRatio:"xMidYMid meet",children:s.map((e,t)=>"circle"===e.kind?(0,l.jsx)("circle",{cx:e.cx,cy:e.cy,r:e.r,fill:e.fill,stroke:e.stroke,strokeOpacity:e.strokeOpacity,strokeWidth:e.strokeWidth},t):(0,l.jsx)("g",{transform:e.transform,children:e.paths.map((t,r)=>(0,l.jsx)("path",{d:t,fill:e.fill,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeLinecap:"round",strokeLinejoin:"round"},r))},t))})}function f(e,t){if(!e||"string"!=typeof e)return"rgba(0,0,0,".concat(t,")");let r=e.trim();if(r.startsWith("rgb"))return r;let l=r.replace("#",""),n=parseInt(3===l.length?l.split("").map(e=>e+e).join(""):l,16);return Number.isNaN(n)?"rgba(0,0,0,".concat(t,")"):"rgba(".concat(n>>16&255,",").concat(n>>8&255,",").concat(255&n,",").concat(t,")")}}}]);
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.