PageSourceSearch

https://whitelabel-loyalty.com/_next/static/chunks/pages/products/dynamo/get-started-49287f0839e06a66.js

js whitelabel-loyalty.com collected 2026-09-24 17:38:19 UTC 16,007 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5151],{91184:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/products/dynamo/get-started",function(){return n(34858)}])},50116:function(e,t,n){"use strict";var r=n(26042),s=n(69396),a=n(99534),i=n(85893),o=n(13902),l=n(94184),u=n.n(l),c=n(45697),d=n.n(c),m=n(87536),f=function(e){var t=e.config,n=(0,a.Z)(e,["config"]),l=(0,m.Gc)(),c=l.register,d=l.formState.errors[n.name],f=u()("w-full rounded-lg border px-3 py-2 shadow-sm focus:outline-none",{"border-[#FDA29B] pr-10":d,"border-[#D5D7DA] focus:border-primary-blue":!d});return(0,i.jsxs)("div",{className:"relative flex-1",children:[(0,i.jsxs)("label",{htmlFor:n.name,className:"mb-1.5 block text-sm/5 font-semibold text-black",children:[n.label,(null===t||void 0===t?void 0:t.required)&&(0,i.jsx)("span",{className:"ml-1 text-sm/5 text-tertiary",children:"*"})]}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)("input",(0,s.Z)((0,r.Z)({},n,c(n.name,t)),{id:n.name,className:f})),d&&(0,i.jsx)(o.Z,{className:"absolute right-3 top-1/2 h-5 w-5 -translate-y-1/2 text-tertiary"})]}),d&&(0,i.jsx)("p",{role:"alert",className:"text-md/5 absolute text-tertiary",children:null===d||void 0===d?void 0:d.message})]})};f.propTypes={config:d().object,label:d().string.isRequired,name:d().string.isRequired,placeholder:d().string},t.Z=f},34858:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return q}});var r=n(47568),s=n(26042),a=n(69396),i=n(70655),o=n(85893),l=n(87066),u=n(41664),c=n.n(u),d=n(34651),m=n(67294),f=n(87536),p=n(50116),x=n(61321),h=n(45697),b=n.n(h);var y={randomUUID:"undefined"!==typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let g;const v=new Uint8Array(16);const w=[];for(let D=0;D<256;++D)w.push((D+256).toString(16).slice(1));function j(e,t=0){return(w[e[t+0]]+w[e[t+1]]+w[e[t+2]]+w[e[t+3]]+"-"+w[e[t+4]]+w[e[t+5]]+"-"+w[e[t+6]]+w[e[t+7]]+"-"+w[e[t+8]]+w[e[t+9]]+"-"+w[e[t+10]]+w[e[t+11]]+w[e[t+12]]+w[e[t+13]]+w[e[t+14]]+w[e[t+15]]).toLowerCase()}function C(e,t,n){const r=(e=e||{}).random??e.rng?.()??function(){if(!g){if("undefined"===typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");g=crypto.getRandomValues.bind(crypto)}return g(v)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return j(r)}var N=function(e,t,n){return!y.randomUUID||t||e?C(e,t,n):y.randomUUID()},S=function(e){var t=e.isLoading,n=e.setIsLoading,u=e.setShouldPoll,c=e.setDynamoSubmissionId,d=e.setSubmissionStartedAt,m=e.error,h=e.setError,b=e.notice,y=e.setNotice,g=(0,f.Gc)(),v=g.handleSubmit,w=g.formState.isValid,j=function(){var e=(0,r.Z)((function(e){var t,r,o,m,f,p,x,b;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:n(!0),h(null),y(null),null===d||void 0===d||d(null),t=N(),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,l.Z.post("/api/sandbox-submit",(0,a.Z)((0,s.Z)({},e),{dynamoSubmissionId:t}),{headers:{"Content-Type":"application/json"}})];case 2:return o=i.sent(),m=(null===(r=o.data)||void 0===r?void 0:r.submittedAt)||null,null===d||void 0===d||d(m),c(t),u(!0),[3,4];case 3:return f=i.sent(),b=(null===(p=f.response)||void 0===p||null===(x=p.data)||void 0===x?void 0:x.message)||"Something went wrong. Please try again.",h(b),n(!1),[3,4];case 4:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}(),C={required:"This is a required field."};return(0,o.jsxs)("form",{onSubmit:v(j),className:"flex flex-1 flex-col space-y-6 overflow-hidden p-6",children:[(0,o.jsxs)("div",{className:"flex-1 space-y-6 overflow-y-auto",children:[(0,o.jsxs)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[(0,o.jsx)(p.Z,{label:"First Name",name:"firstname",placeholder:"First Name",config:C}),(0,o.jsx)(p.Z,{label:"Last Name",name:"lastname",placeholder:"Last Name",config:C}),(0,o.jsx)(p.Z,{label:"Company Email",name:"email",placeholder:"[email protected]",config:(0,a.Z)((0,s.Z)({},C),{pattern:{value:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,message:"Email must be formatted correctly."}})}),(0,o.jsx)(p.Z,{label:"Company Name",name:"company",config:C}),(0,o.jsx)("div",{className:"md:col-span-2",children:(0,o.jsx)(p.Z,{label:"Company website",name:"website",config:(0,a.Z)((0,s.Z)({},C),{pattern:{value:/^(https?:\/\/)?([\w-]+\.)+[\w-]{2,}(\/[^\s]*)?$/,message:"Website must be a valid URL"}})})})]}),m&&(0,o.jsx)("p",{className:"md:text-md/8 text-md/5 font-light text-tertiary",children:m}),b&&(0,o.jsxs)("p",{className:"md:text-md/8 text-md/5 font-light text-secondary",children:["Looks like you already have sandbox access. Please check your email for your access details, or"," ",(0,o.jsx)("a",{href:"mailto:[email protected]",className:"underline",children:"contact support"})," ","if you're unable to get in."]})]}),(0,o.jsxs)("div",{className:"flex flex-shrink-0 items-center gap-3",children:[(0,o.jsxs)(x.Z,{type:"submit",variant:"primary",color:"blue",size:"small",disabled:!w||t,fullWidth:!1,children:[(0,o.jsx)(x.Z.Text,{children:"Get sandbox access"}),(0,o.jsx)(x.Z.Icon,{})]}),t&&(0,o.jsx)("span",{role:"status","aria-label":"Submitting your request",className:"h-5 w-5 animate-spin rounded-full border-2 border-button-blue border-t-transparent"})]})]})};S.propTypes={isLoading:b().bool.isRequired,setIsLoading:b().func.isRequired,setShouldPoll:b().func.isRequired,setDynamoSubmissionId:b().func.isRequired,setSubmissionStartedAt:b().func,error:b().string.isRequired,setError:b().func.isRequired,notice:b().oneOfType([b().bool,b().oneOf([null])]),setNotice:b().func.isRequired};var Z=S,R=n(11355),I=n(40741),k=n(87716),_=function(e){var t=e.isOpen,n=e.onClose,r=e.onRedirect,s=e.onCountdownComplete,a=e.shouldRedirect,i=(0,m.useState)(30),l=i[0],u=i[1],c=(0,m.useRef)(!1);(0,m.useEffect)((function(){if(!t)return u(30),void(c.current=!1);var e=Date.now()+3e4;u(30),c.current=!1;var n=setInterval((function(){var t=Math.max(0,e-Date.now());u(Math.ceil(t/1e3))}),1e3),r=setTimeout((function(){clearInterval(n),u(0)}),3e4);return function(){clearInterval(n),clearTimeout(r)}}),[t]),(0,m.useEffect)((function(){if(t&&0===l){if(a){var e=setTimeout(r,2e3);return function(){return clearTimeout(e)}}c.current||(c.current=!0,null===s||void 0===s||s())}}),[t,l,a,r,s]);var d=0===l?a?"Redirecting...":"Looks like this is taking a bit longer, please wait...":"You\u2019ll be redirected in ".concat(l," seconds.");return(0,o.jsx)(R.u,{appear:!0,show:t,as:m.Fragment,children:(0,o.jsx)(I.V,{as:"div",className:"relative z-50",onClose:n,children:(0,o.jsx)(R.u.Child,{as:m.Fragment,enter:"ease-out duration-100",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,o.jsx)("div",{className:"fixed inset-0 bg-white",children:(0,o.jsxs)("div",{className:"m-8 flex flex-col items-center justify-center",children:[(0,o.jsx)("img",{src:"/wll-logo-black.svg",alt:"White Label Loyalty"}),(0,o.jsx)("div",{className:"mt-20",children:(0,o.jsx)(k.T,{fill:"#000"})}),(0,o.jsxs)("div",{className:"mt-8 space-y-2 text-center md:space-y-6",children:[(0,o.jsx)("h2",{className:"text-xl/7 font-semibold text-gray-900 md:text-4xl/[54px]",children:d}),(0,o.jsx)("p",{className:"mx-auto mt-4 max-w-lg text-sm/5 text-[#566887] md:text-xl/7",children:"Your interest has been captured and is being processed. This may take a moment."})]})]})})})})})};_.propTypes={isOpen:b().bool.isRequired,onClose:b().func.isRequired,onRedirect:b().func.isRequired,onCountdownComplete:b().func,shouldRedirect:b().bool};var L=_,T=3e3,A=function(e,t,n,s){var a=0,o=0,u=null,c=null,d=!1,m=function(e){d||n("Failed to retrieve deal. Please try again later.",e)},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T;u=setTimeout(p,e)},p=function(){var n=(0,r.Z)((function(){var n,r,u,p,x,h,b,y;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:a++,n=new AbortController,c=n,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,l.Z.post("/api/deal-search",e,{headers:{"Content-Type":"application/json"},signal:n.signal,timeout:1e4})];case 2:return r=i.sent(),u=r.data.dealId,d?[2]:(o=0,u?t(u):a>=40?m("not_found"):!1!==(null===s||void 0===s?void 0:s())&&f(),[3,5]);case 3:return p=i.sent(),d?[2]:(o++,!(!1!==(null===(x=p.response)||void 0===x||null===(h=x.data)||void 0===h?void 0:h.retryable))||a>=40||o>=3?m("request_failed"):f(function(e){var t=Number(e);return Number.isFinite(t)&&t>0?1e3*t:Math.min(T*Math.pow(2,Math.max(o-1,0)),15e3)+Math.floor(500*Math.random())}(null===(b=p.response)||void 0===b||null===(y=b.headers)||void 0===y?void 0:y["retry-after"])),[3,5]);case 4:return c===n&&(c=null),[7];case 5:return[2]}}
1))}));return function(){return n.apply(this,arguments)}}();return p(),function(){d=!0,u&&clearTimeout(u),c&&c.abort()}},F=function(){var e=(0,r.Z)((function(e){var t,n,r,s,a,o;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return t=e.company,n=e.dynamoSubmissionId,r=e.submittedAt,s=e.signal,[4,l.Z.post("/api/deal-search",{company:t,dynamoSubmissionId:n,submittedAt:r,searchMode:"existing"},{signal:s,timeout:1e4})];case 1:return o=i.sent(),[2,Boolean(null===(a=o.data)||void 0===a?void 0:a.dealExists)]}}))}));return function(t){return e.apply(this,arguments)}}(),E=function(e){var t=e.title,n=e.subtitle;return(0,o.jsxs)("div",{className:"mx-auto flex w-full flex-1 flex-row gap-4 md:max-w-[250px] md:flex-col md:items-center md:justify-center",children:[(0,o.jsxs)("svg",{className:"relative top-1 h-[14px] w-[14px] shrink-0 md:top-0 md:h-6 md:w-6",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("path",{d:"M0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z",fill:"#079455"}),(0,o.jsx)("path",{d:"M16 9L10.5 14.5L8 12",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,o.jsxs)("div",{className:"flex flex-col gap-2 md:text-center",children:[(0,o.jsx)("p",{className:"text-base/6 font-medium md:text-xl/6",children:t}),(0,o.jsx)("p",{className:"text-sm/5 font-light text-white/60 md:text-xl/6",children:n})]})]})},q=function(){var e=(0,f.cI)({mode:"onChange"}),t=e.watch,n=e.reset,u=(0,m.useState)(!1),p=u[0],x=u[1],h=(0,m.useState)(!1),b=h[0],y=h[1],g=(0,m.useState)(!1),v=g[0],w=g[1],j=(0,m.useState)(null),C=j[0],N=j[1],S=(0,m.useState)(null),R=S[0],I=S[1],k=(0,m.useState)(null),_=k[0],T=k[1],q=(0,m.useState)(null),D=q[0],P=q[1],U=(0,m.useRef)(null),M=(0,m.useRef)(null),O=(0,m.useRef)(!1),V=t("company"),W=(0,m.useCallback)((function(e){M.current=e}),[]),B=(0,m.useCallback)((function(){U.current||(U.current="existing",O.current=!1,P(!0),x(!1),y(!1),w(!1))}),[]);(0,m.useEffect)((function(){if(b&&V&&R){U.current=null,O.current=!1;var e={company:V,dynamoSubmissionId:R},t=new AbortController,s=function(e){U.current||(U.current="error",O.current=!1,y(!1),w(!1),T(e),x(!1))},a=A(e,(function(e){U.current||(U.current="deal",O.current=!1,function(e){if(e)try{d.ZP.identify(String(e))}catch(_){console.error("Analytics error:",_)}}(e),N(e),y(!1),w(!1),n())}),function(){var e=(0,r.Z)((function(e,n){var r,a;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:if(U.current)return[2];if("not_found"!==n)return s(e),[2];if(!(r=M.current))return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,F({company:V,dynamoSubmissionId:R,submittedAt:r,signal:t.signal})];case 2:return i.sent()?(B(),[2]):[3,4];case 3:return a=i.sent(),l.Z.isCancel(a)?[2]:[3,4];case 4:return s(e),[2]}}))}));return function(t,n){return e.apply(this,arguments)}}(),(function(){return!(O.current&&!U.current)||(B(),!1)}));return function(){a(),t.abort()}}}),[b,V,R,n,B]),(0,m.useEffect)((function(){if(v){var e=M.current;if(b&&V&&R&&e){var t=new AbortController,n=!0,s=function(){var s=(0,r.Z)((function(){var r,s;return(0,i.__generator)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,3,4]),[4,F({company:V,dynamoSubmissionId:R,submittedAt:e,signal:t.signal})];case 1:return r=a.sent(),n&&r&&!U.current&&(O.current=!0),[3,4];case 2:return s=a.sent(),l.Z.isCancel(s)?[2]:[3,4];case 3:return n&&w(!1),[7];case 4:return[2]}}
1))}));return function(){return s.apply(this,arguments)}}();return s(),function(){n=!1,t.abort()}}w(!1)}}),[v,b,V,R]);var $=(0,m.useCallback)((function(){!U.current&&M.current&&w(!0)}),[]),G=(0,m.useCallback)((function(){x(!1),window.location.href="https://onboarding.whitelabel-loyalty.com/".concat(C)}),[C]);return(0,o.jsxs)("div",{className:"relative flex min-h-screen flex-col bg-[#F0F7FF]",children:[(0,o.jsx)(c(),{href:"/",children:(0,o.jsx)("img",{src:"/wll-logo-white.svg",alt:"White Label Loyalty",className:"absolute left-1/2 top-6 -translate-x-1/2 cursor-pointer lg:left-10 lg:top-10 lg:translate-x-0"})}),(0,o.jsx)("div",{className:"bg-very-dark-blue pb-44 pt-28 text-white lg:pt-8",children:(0,o.jsxs)("div",{className:"mx-auto max-w-4xl space-y-8 px-4 md:space-y-6",children:[(0,o.jsxs)("div",{className:"space-y-2 md:space-y-6",children:[(0,o.jsx)("h1",{className:"text-center text-xl/8 font-semibold md:text-4xl/[54px]",children:"Access our loyalty API for 14 days at no cost."}),(0,o.jsx)("p",{className:"text-center text-sm/5 font-light text-white/60 md:text-xl/6",children:"Please enter your details below to receive access on your email."})]}),(0,o.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row",children:[(0,o.jsx)(E,{title:"Docs & Support",subtitle:"Step-by-step guides plus a 1 hr expert call."}),(0,o.jsx)(E,{title:"API Reference",subtitle:"Plug in and power up your loyalty experience."}),(0,o.jsx)(E,{title:"Admin Portal",subtitle:"Design, test, and fine-tune your loyalty program."})]})]})}),(0,o.jsx)("div",{className:"flex flex-1 bg-[#F0F7FF] px-0 pb-0 md:flex-none md:px-4 md:pb-12",children:(0,o.jsx)("div",{className:"mx-auto -mt-32 flex max-w-4xl flex-1 rounded-t-xl bg-white shadow-lg md:rounded-xl",children:(0,o.jsx)(f.RV,(0,a.Z)((0,s.Z)({},e),{children:(0,o.jsx)(Z,{isLoading:p,setIsLoading:x,setShouldPoll:y,setDynamoSubmissionId:I,setSubmissionStartedAt:W,error:_,setError:T,notice:D,setNotice:P})}))})}),(0,o.jsx)(L,{isOpen:b||!!C,onClose:function(){},shouldRedirect:!!C,onRedirect:G,onCountdownComplete:$})]})}},87716:function(e,t,n){"use strict";n.d(t,{T:function(){return s}});var r=n(85893),s=function(e){var t=e.fill,n=void 0===t?"#295e7e":t;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{"aria-hidden":"true",class:"h-8 w-8 animate-spin text-gray-200",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:n})]}),(0,r.jsx)("span",{class:"sr-only",children:"Loading..."})]})}}},function(e){e.O(0,[3020,9774,2888,179],(function(){return t=91184,e(e.s=t);var t}));var t=e.O();_N_E=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.