PageSourceSearch

https://www.saatva.com/coresite/_next/static/chunks/pages/comfort-quiz/results-450d95f798e48c8e.js

js saatva.com collected 2026-10-02 05:45:01 UTC 7,950 bytes, 1 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="a09488e7-13f0-4888-9903-67b6e6524b43",e._sentryDebugIdIdentifier="sentry-dbid-a09488e7-13f0-4888-9903-67b6e6524b43")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25],{22356:(e,s,a)=>{"use strict";a.r(s),a.d(s,{__N_SSP:()=>k,default:()=>R});var t=a(37876),r=a(14232),i=a(95062),l=a.n(i),n=a(67010);let o="sharesBed",u="weight",c="preferredFeel",d="sleepPosition",h="lessThan130",p="between130And230",m="between231And300",f="soft",w="medium",v="firm",g="notSure",b="side",y="back",C="stomach",S="combination",x="saatvaClassicPlushSoft",q="saatvaClassicLuxuryFirm",F="saatvaClassicFirm",_={[o]:{queryParams:["sharesBed"],answers:{yes:["I share the bed with a sleep partner"],no:["I get the bed all to myself"]}},[u]:{queryParams:["weight","partnerWeight"],answers:{[h]:["Less than 130 lbs"],[p]:["130-230 lbs"],[m]:["231-300 lbs"]}},[c]:{queryParams:["feel","partnerFeel"],answers:{[f]:["Plush, cushioned feel (Soft)"],[w]:["Balance of cushioning and uplifting support (Medium)"],[v]:["Uplifting support (Firm)"],[g]:["I'm not sure"],cantAgree:["We can't agree on firmness"]}},[d]:{queryParams:["position","partnerPosition"],answers:{[b]:["Side sleeper"],[y]:["Back sleeper"],[C]:["Stomach sleeper"],[S]:["A combination of two or all of these"]}}},L={[x]:{name:"Saatva Classic Plush Soft",productCode:"saatva-classic",targetSku:"7055-5/0",content:{title:"Saatva Classic",subtitle:"Luxury innerspring in <strong><i>Plush Soft</i></strong>",comfortDetails:{howItFeels:["Soft & cushiony thanks to the extra padding on top","Body-hugging to relieve pressure points"],idealFor:["Side sleepers who need extra pressure relief on the hips and shoulders","Lighter-weight people who often find mattresses to be too firm"]}}},[q]:{name:"Saatva Classic Luxury Firm",productCode:"saatva-classic",targetSku:"7054-5/0",content:{title:"Saatva Classic",subtitle:"Luxury innerspring in <strong><i>Luxury Firm</i></strong> (Medium)",comfortDetails:{howItFeels:["Medium firmness, perfect balance of cushioning and uplifting support","Designed to replicate the feel of luxury hotel beds"],idealFor:["All sleep positions","Couples who can’t agree on firmness"]}}},[F]:{name:"Saatva Classic Firm",productCode:"saatva-classic",targetSku:"7056-5/0",content:{title:"Saatva Classic",subtitle:"Luxury innerspring in <strong><i>Firm</i></strong>",comfortDetails:{howItFeels:["Lying on top of the mattress rather than sinking in","Balanced resistance that’s never hard on the back and joints"],idealFor:["Stomach & back sleepers or heavier body types","Sleepers who need an extra-firm mattress"]}}}},P=[{when:{[o]:["yes"],[u]:[h]},values:{[x]:1,[q]:3}},{when:{[u]:[h]},values:{[x]:1,[q]:1,[F]:-10}},{when:{[u]:[p]},values:{[q]:1,[F]:1}},{when:{[u]:[m]},values:{[x]:-10,[q]:1,[F]:1}},{when:{[u]:[h],[c]:[f]},values:{[x]:1,[q]:-10,[F]:-10}},{when:{[u]:[p],[c]:[f]},values:{[x]:1,[F]:-10}},{when:{[u]:[m],[c]:[f]},values:{[x]:1,[F]:-10}},{when:{[u]:[h],[c]:[w]},values:{[x]:-10,[F]:-10}},{when:{[u]:[p],[c]:[w]},values:{[x]:-10,[q]:1,[F]:-10}},{when:{[u]:[m],[c]:[w]},values:{[x]:-10,[q]:1,[F]:1}},{when:{[u]:[h],[c]:[v]},values:{[x]:-10,[q]:1,[F]:-10}},{when:{[u]:[p],[c]:[v]},values:{[x]:-10,[F]:1}},{when:{[u]:[m],[c]:[v]},values:{[x]:-10,[F]:1}},{when:{[u]:[h],[c]:[g]},values:{[q]:1}},{when:{[u]:[p],[c]:[g]},values:{[q]:1}},{when:{[u]:[m],[c]:[g]},values:{[q]:1}},{when:{[u]:[h],[d]:[b]},values:{[x]:3,[q]:1}},{when:{[u]:[p],[d]:[b]},values:{[x]:1,[q]:3,[F]:1}},{when:{[u]:[m],[d]:[b]},values:{[q]:3,[F]:3}},{when:{[u]:[h],[d]:[y]},values:{[x]:1,[q]:1}},{when:{[u]:[p],[d]:[y]},values:{[q]:3,[F]:3}},{when:{[u]:[m],[d]:[y]},values:{[q]:3,[F]:3}},{when:{[u]:[h],[d]:[C]},values:{saatvaClassicPlushSoft:1}},{when:{[u]:[p],[d]:[C]},values:{saatvaClassicLuxuryFirm:3,saatvaClassicFirm:3}},{when:{[u]:[m],[d]:[C]},values:{saatvaClassicLuxuryFirm:3,saatvaClassicFirm:3}},{when:{[u]:[h],[d]:[S]}
1,values:{saatvaClassicPlushSoft:1}},{when:{[u]:[p],[d]:[S]},values:{saatvaClassicLuxuryFirm:3,saatvaClassicFirm:3}},{when:{[u]:[m],[d]:[S]},values:{saatvaClassicLuxuryFirm:3,saatvaClassicFirm:3}}];var I=a(70982);function j(e){let{products:s,...a}=e,i=(0,r.useCallback)(()=>(0,I.O0)(L,_,P),[]),l=(0,r.useCallback)(({quizResults:e,topProduct:s,topProducts:a})=>({...e.answers,outcome:s.name,comfort_quiz_outcome:a}),[]);return(0,t.jsx)(n.A,{...a,products:s,quizType:"comfort",viewName:"ComfortQuizResultsView",loadingLabel:"comfort",questions:_,calculateResults:i,buildCordialAttributes:l})}j.propTypes={products:l().array.isRequired};var k=!0;function R(e){return(0,t.jsx)(j,{...e})}},36296:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/comfort-quiz/results",function(){return a(22356)}])},67010:(e,s,a)=>{"use strict";a.d(s,{A:()=>q});var t=a(37876),r=a(14232),i=a(95062),l=a.n(i),n=a(55504),o=a(3704),u=a(14022),c=a(38357),d=a(58827),h=a(82548),p=a(73616),m=a(70982),f=a(12455),w=a(14335),v=a(20025),g=a(68757),b=a(53830),y=a.n(b);let C=({children:e,...s})=>(0,t.jsx)(f.A,{...s,children:(0,t.jsx)("div",{className:y().quizResultsWrapper,children:(0,t.jsx)("div",{className:"container",children:e})})});C.propTypes={children:l().node.isRequired};let S=({title:e,showLoader:s=!0,layoutProps:a})=>(0,t.jsx)(C,{...a,children:(0,t.jsx)("div",{className:y().loadingContainer,children:(0,t.jsxs)("div",{className:y().loadingContainerContent,children:[(0,t.jsx)("h1",{className:y().loadingContainerTitle,children:e}),s&&(0,t.jsx)(o.Loader,{className:y().loadingContainerLoader,loaderItemCount:4,size:"md",isInline:!0})]})})}),x={comfort:"comfortQuizResults",toppers:"topperQuizResults",pillow:"pillowQuizResults"};function q({products:e,quizType:s,calculateResults:a,viewName:i,loadingLabel:l,questions:o,buildCordialAttributes:f,...b}){let[y,F]=(0,r.useState)(null),[_,L]=(0,r.useState)(!0),[P,I]=(0,r.useState)(!1),{isOn:j}=(0,c.useFeatureFlag)("ENABLE_EMAIL_R5S.DIS-1049"),k=(0,r.useRef)(!1);(0,r.useEffect)(()=>{(async()=>{try{let e=a();F(e)}catch(e){u.default.error({message:"Error calculating quiz results",location:i,error:e})}finally{L(!1)}})()},[a,i]);let R=(0,r.useMemo)(()=>y&&e?(0,m.NP)(y,e):null,[y,e]),N=g.QUIZ_CONFIGS[s];(0,r.useEffect)(()=>{!k.current&&y&&R&&(k.current=!0,(0,w.T5)({quizId:N.quizId,siteSection:N.quizName.toLowerCase(),subSection:"",subSubSection:"quiz results",quizDetails:(0,m.wP)(y.answers,o),products:(0,m.hK)(R,e)}))},[y,R,N,o,e]);let z=async e=>{let a=y.detailedRecommendations.slice(0,3).map(e=>e.name),t=R[0];if(e.email){let r=x[s];r&&(0,v.w)(e.email,r);let l={email:e.email,phone:e.phone?`1${e.phone}`:null,marketingOptIn:e.optinEmail,attributes:f({quizResults:y,topProduct:t,topProducts:a})};try{await (0,d.Z)("cordial/userUpdate",l,"POST")}catch(e){u.default.error({message:"Error sending user data to Cordial",location:`${i}.handleContactSubmit`,error:e})}}I(!0)};return!P&&j?(0,t.jsx)(C,{...b,children:(0,t.jsx)(p.A,{onSubmit:z,onSkip:()=>I(!0),productLabel:N.contactFormLabel})}):_?(0,t.jsx)(S,{title:`Your ${l} quiz results are loading...`,layoutProps:b}):y?R?(0,t.jsx)(C,{...b,children:(0,t.jsx)(n.SelectionProvider,{productsData:e,defaultInStock:!0,children:(0,t.jsx)(h.A,{results:y,processedResults:R,quizType:s})})}):(0,t.jsx)(S,{title:"Processing results...",layoutProps:b}):(0,t.jsx)(S,{title:"Unable to calculate results",showLoader:!1,layoutProps:b})}S.propTypes={title:l().string.isRequired,showLoader:l().bool,layoutProps:l().object},q.propTypes={products:l().array.isRequired,quizType:l().oneOf(Object.keys(g.QUIZ_CONFIGS)).isRequired,calculateResults:l().func.isRequired,viewName:l().string.isRequired,loadingLabel:l().string.isRequired,questions:l().object,buildCordialAttributes:l().func.isRequired}}},e=>{e.O(0,[7268,4087,2455,9296,636,6593,8792],()=>e(e.s=36296)),_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.