@sprig-technologies/sprig-browser 2.32.3 → 2.32.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";var ct=Object.defineProperty;var pt=(t,e,o)=>e in t?ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var q=(t,e,o)=>(pt(t,typeof e!="symbol"?e+"":e,o),o);const i=require("./metricsReporter-D4pafvTR.cjs"),Ve="360px",Ae=()=>{try{return window.parent.Intercom}catch{return null}},Oe=[Object.freeze(Object.defineProperty({__proto__:null,disable:()=>{const t=Ae();t&&(t.ul_wasVisible=!!document.querySelector("iframe.intercom-launcher-frame"),t.ul_wasVisible&&t("update",{hide_default_launcher:!0}))},enable:()=>{const t=Ae();t&&(t.ul_wasVisible&&t("update",{hide_default_launcher:!1}),delete t.ul_wasVisible)}},Symbol.toStringTag,{value:"Module"}))];class We{static disable(){Oe.forEach(e=>e.disable())}static enable(){Oe.forEach(e=>e.enable())}}const Ce="ul-view-sdk-script",ut=["ios","android"],P="visitors",T="environments";async function O(t,e){var n,s,d;const{shouldDropOnRateLimit:o,...a}=e;a.headers=Object.assign(i.getHttpHeaders(window.UserLeap),a.headers);const r=await i.sprigFetch(t,{...a,shouldDropOnRateLimit:o});if(r.ok){const c=(n=r.headers)==null?void 0:n.get("Authorization"),p=c?c.split(" "):void 0,l=p&&p.length===2?p[1]:void 0,u=(s=r.headers)==null?void 0:s.get("x-ul-visitor-id");if(window.UserLeap.userId&&u===window.UserLeap.visitorId){const m=i.localStorageHelper.getItemObject("sprig.anon.env.vid.map");m&&m[window.UserLeap.envId]===u&&(delete m[window.UserLeap.envId],i.localStorageHelper.setItemObject("sprig.anon.env.vid.map",m))}l&&u&&(u!==window.UserLeap.visitorId||window.UserLeap.token!==l)&&(k("token",l),k("vid",u),i.eventEmitter.emit(i.SprigEvent.VisitorIDUpdated,{visitorId:u}),window.UserLeap.token=l,window.UserLeap.visitorId=u)}return(d=r.json)!=null&&d.logMessage&&console.warn(`[Sprig] ${r.json.logMessage}`),r}function k(t,e){const o=i.localStorageHelper.getItemObject("userleap.ids");let a=o[window.UserLeap.envId];a?a[t]=e:a={[t]:e},o[window.UserLeap.envId]=a,i.localStorageHelper.setItemObject("userleap.ids",o)}function be(){return window.previewMode?"0":window.UserLeap.visitorId??""}function R(t,e,o){const a=[window.UserLeap._API_URL,"sdk",t];return e&&e.forEach(r=>{a.push(r),r===T?a.push(window.UserLeap.envId):r===P&&a.push(be())}),o&&a.push(o),a.join("/")}const B=async(t,e)=>{var _e,De,Re;const{context:o,delay:a,forceBrandedLogo:r,endCard:n,isFeedback:s=!1,heatmap:d,locale:c,previewMode:p,productConfig:l,questions:u,responseGroupUid:m,surveyId:w,uuid:g,vid:I,sessionReplay:h,studyType:S}=t,f=i.getHttpHeaders(window.UserLeap),b=se(f),U=Se(f);if(h)if(b)i.eventEmitter.emit(i.SprigEvent.ReplayCapture,{responseGroupUid:m,hasQuestions:!!(u!=null&&u.length),surveyId:w,uploadId:h.uploadId,replayType:h.replayDurationType??"before",seconds:h.replayDurationSeconds,generateVideoUploadUrlPayload:{mediaRecordingUid:i.v4(),mediaType:"screen",questionId:1,responseGroupUid:m,surveyId:w,updatedAt:new Date().toISOString(),visitorId:window.UserLeap.visitorId,isReplay:!0}});else{if(!i.modules.replay)return window.UserLeap.reportError("displayQuestions",new Error("Replay module not registered")),{success:!1,message:"Replay module not registered",surveyState:"no survey"};i.modules.replay.scheduleOrCaptureReplay({responseGroupId:m,surveyId:w,visitorId:I,replayParams:h,completeUploadHeaders:f,apiUrl:window.UserLeap._API_URL,triggerTimestamp:Date.now(),isStandalone:u.length===0})}if(d){if(!i.modules.replay)return window.UserLeap.reportError("displayQuestions",new Error("Replay module not registered")),{success:!1,message:"Replay module not registered",surveyState:"no survey"};const{eventId:L,replayParams:de,responseGroupUid:dt,surveyId:lt}=d;await i.modules.replay.initializeReplay({maxReplayDurationSeconds:300,maxInflightRequests:window.UserLeap.maxInflightReplayRequests,teardownAfter:!0}),i.modules.replay.tryReplayAction(()=>{var xe;return(xe=i.modules.replay)==null?void 0:xe.scheduleCapture({apiUrl:window.UserLeap._API_URL,completeUploadHeaders:f,eventId:L,isHeatmap:!0,replayParams:de,responseGroupId:dt,surveyId:lt,triggerTimestamp:Date.now(),visitorId:I})},"Error in scheduling/capturing replay")}if(I==null||!(u!=null&&u.length))return i.breadcrumbsLogger.info("CannotDisplaySurvey",{vid:I}),{success:!1,message:"[Sprig] no survey found",surveyState:"no survey"};if(window.UserLeap.container){i.breadcrumbsLogger.info("AlreadyDisplayingSurvey");const L="[Sprig] (ERR-409) Found an existing Survey container, aborting rendering of this survey";return console.warn(L),{success:!1,message:L,surveyState:"no survey"}}if(I!==window.UserLeap.visitorId&&g!==window.UserLeap.visitorId&&!window.previewMode){const L="Attempted to display survey to a different visitor";return window.UserLeap.reportError("DisplaySurvey",new Error(L)),{success:!1,message:L,surveyState:"no survey"}}i.breadcrumbsLogger.info("ShowingSurvey",{surveyId:w}),(_e=i.modules.replay)==null||_e.RecordSurveyShown({id:w,userAgent:window.navigator.userAgent}),We.disable(),i.eventEmitter.emit(i.SprigEvent.SurveyWillPresent,{name:i.SprigEvent.SurveyWillPresent,"survey.id":w});let x,v,E,_,D=document.createElement("div");const H=L=>{const{"view.version":de}=L;de!==f["x-ul-sdk-version"]&&ze(),i.eventEmitter.removeListener("verify.view.version",H)};i.eventEmitter.on("verify.view.version",H),window.UserLeap.useMobileStyling=U,i.shouldDirectEmbed(f)?(x="ul-direct-embeded-frame",v=document.head,E=window,_=!1,b&&(Ne(w,s),D.id=x,window.UserLeap.container.appendChild(D),Be(),i.eventEmitter.emit(i.SprigEvent.SurveyLifeCycle,{state:"presented"}),i.eventEmitter.emit(i.SprigEvent.SurveyPresented,{name:i.SprigEvent.SurveyPresented,"survey.id":w}))):{frameId:x,contentWinDocHead:v,contentWindow:E,hasOverlay:_,iframe:D}=gt({productConfig:l,useMobileStyling:U,surveyId:w,isFeedback:s}),window.UserLeap.frameId=x;const A={apiURL:window.UserLeap._API_URL,cards:u,configureExitOnOverlayClick:L=>{i.eventEmitter.once(i.SprigEvent.CloseSurveyOnOverlayClick,L)},context:o,endCard:n,envId:window.UserLeap.envId,eventEmitFn:i.eventEmitter.emit.bind(i.eventEmitter),fontFamily:window.UserLeap.fontFamily,fontFamilyURL:window.UserLeap.fontFamilyURL,forceBrandedLogo:r,frame:D,headers:f,locale:c,mobileSDKVersion:window.UserLeap.mobileSDKVersion,previewKey:i.localStorageHelper.getItem("sprig.previewKey"),previewMode:p,productConfig:{framePosition:l==null?void 0:l.framePosition,desktopDisplay:l==null?void 0:l.desktopDisplay,placement:l==null?void 0:l.placement},responseGroupUid:m,startingQuestionIdx:(De=window.UserLeap.config)==null?void 0:De.startingQuestionIdx,studyType:S,styleNonce:window.UserLeap.styleNonce,surveyId:w,tabTitle:document.title,trackPageViewUrl:e,ulEvents:i.EVENTS,upchunkLibraryURL:window.UserLeap.upchunkLibraryURL,useMobileStyling:U,userId:g,viewDocument:E==null?void 0:E.document,viewWindow:E,visitorAttributes:{externalUserId:window.UserLeap.userId,email:window.UserLeap.email},...window.UserLeap._config};(Re=window.UserLeap._config)!=null&&Re.startingQuestionIdx&&(window.UserLeap._config={...window.UserLeap._config,startingQuestionIdx:null});const J=(s?window.UserLeap.feedbackCustomStyles:window.UserLeap.customStyles)??l.customStyles;A.customStyles=J,E&&(E.__cfg=A);const W=window.UserLeap.viewSDKURL?window.UserLeap.viewSDKURL:A.path,Ee=document.getElementById(Ce);Ee&&Ee.remove();const ae=function(){const L=document.createElement("script");return window.UserLeap.nonce&&L.setAttribute("nonce",window.UserLeap.nonce),L.id=Ce,L}(),Ie=()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{display:"flex"})};if(A.installationMethod==="web-npm"||A.installationMethod==="web-npm-bundled"){const{default:L}=await Promise.resolve().then(()=>require("./view-BRI_mHiJ.cjs"));L.configure(A),_&&window.UserLeap.container&&Ie()}else W&&(ae.src=W,_&&ae.addEventListener("load",()=>{window.UserLeap.container&&Ie()}),E==null||E.addEventListener("error",L=>{L.target instanceof HTMLScriptElement&&L.target.src===W&&window.UserLeap.reportError("loadFrameScript",new Error("Frame script failed to load"))},{capture:!0,once:!0}));v==null||v.appendChild(ae);const ke={success:!0,surveyState:"ready",surveyId:w,responseGroupUid:m};return window.UserLeap.isMobileSDK&&a&&(ke.delay=a),ke};function Se(t){var o;if(window.UserLeap.useMobileStyling!==void 0)return window.UserLeap.useMobileStyling;const e=((o=window.UserLeap.windowDimensions)==null?void 0:o.width)??document.body.clientWidth;return se(t)||e>10&&e<500}function se(t){return ut.includes(t["userleap-platform"])}const Le="ul-frame";window.UserLeap&&window.Sprig&&(window.Sprig._gtm?window.Sprig=window.UserLeap:window.UserLeap=window.Sprig),window.UserLeap||(window.UserLeap=window.Sprig),window.Sprig||(window.Sprig=window.UserLeap);const le="0px",Ne=(t,e,o)=>{window.UserLeap.container=document.createElement("div"),window.UserLeap.container.className="ul-container"+(e?" ul-container-feedback":""),t&&(window.UserLeap.container.dataset.studyId=t.toString());const a=Ke();o&&a&&!window.UserLeap.useMobileStyling?a.appendChild(window.UserLeap.container):document.body.appendChild(window.UserLeap.container)},ze=(t,e)=>{var a;yt();const o=window.UserLeap.container;if(o)try{(a=o.parentNode)==null||a.removeChild(o),window.UserLeap.container=null,k("trackStartUrl",null),i.eventEmitter.emit(i.SprigEvent.SurveyLifeCycle,{state:"dismissed"}),i.eventEmitter.emit(i.SprigEvent.SurveyClosed,{name:i.SprigEvent.SurveyClosed,initiator:t,"survey.id":parseInt(o.dataset.studyId),...e&&{studyType:e}})}catch(r){console.warn(`[Sprig] (ERR-412) Error removing UserLeap container by ${t} `+o),r instanceof Error&&window.UserLeap.reportError("dismissActiveSurvey",r)}},Be=()=>{i.eventEmitter.once(i.SprigEvent.SurveyWillClose,({initiator:t,studyType:e})=>{i.eventEmitter.removeAllListeners(i.SprigEvent.CloseSurveyOnOverlayClick),ze(t,e)})},wt=(t,e,o,a)=>{var l,u;const r={position:"fixed",bottom:"0px",right:le,border:0,backgroundColor:"rgba(0,0,0,0)",zIndex:2147483646,transition:"width 0.2s ease-in-out, height 0.2s ease-in-out",maxWidth:"100%"},n=Object.assign({},e,window.UserLeap),{desktopDisplay:s}=e||{},d=s==="center-modal";let c;d&&(n.framePosition="center");let p=!1;if(o)(l=window.UserLeap.windowDimensions)!=null&&l.width?r.width=`${window.UserLeap.windowDimensions.width}px`:r.width="100%",(u=window.UserLeap.windowDimensions)!=null&&u.height?r.maxHeight=window.UserLeap.windowDimensions.height-20+"px":window.UserLeap.maxHeight?r.maxHeight=window.UserLeap.maxHeight:r.maxHeight=document.body.clientHeight-20+"px",["light","dark"].includes(n.overlayStyleMobile)&&(p=!0);else{r.width=Ve,r.maxHeight=window.UserLeap.maxHeight||"66vh";const m=()=>{p=!0,c={margin:"auto",position:"static"}};if(a)d?m():c={position:"relative",height:"300px"};else switch(n.framePosition){case"bottomLeft":c={left:le};break;case"topLeft":c={left:le,top:0};break;case"topRight":c={top:0};break;case"center":m()}}return p&&((m,w)=>{const g={position:"fixed",overflow:"auto",top:"0px",left:"0px",display:"none",height:"100%",width:"100%",transition:"background-color 0.3s ease-out",zIndex:2147483646},I=w?m.overlayStyleMobile:m.overlayStyle;g["background-color"]=I==="light"?"rgba(255,255,255, 0.95)":"rgba(0,0,0,0.9)",w||(g.margin="auto"),window.UserLeap.container&&Object.assign(window.UserLeap.container.style,g)})(n,o),Object.assign(t.style,r,c),p},gt=({productConfig:t,useMobileStyling:e,surveyId:o,isFeedback:a})=>{var m,w;const r=Le,n=a&&t.desktopDisplay==="slider";Ne(o,a,n),mt();const s=document.createElement("iframe");s.id=r,s.setAttribute("title","Sprig User Feedback Dialog");const d=wt(s,t,e,a);Be();let c=!1;s.setHeight=g=>{parseInt(s.style.height)==g&&c||(c=!0,s.style.height=`${g}px`,i.eventEmitter.emit(i.SprigEvent.SurveyHeight,{name:i.SprigEvent.SurveyHeight,contentFrameHeight:g,"survey.id":o}))};let p=!1;s.setWidth=g=>{parseInt(s.style.width)==g&&p||(p=!0,s.style.width=`${g}px`,i.eventEmitter.emit(i.SprigEvent.SurveyWidth,{name:i.SprigEvent.SurveyWidth,contentFrameWidth:g,"survey.id":o}))},(m=window.UserLeap.container)==null||m.appendChild(s),t&&(e?t.exitOnOverlayClickMobile:t.exitOnOverlayClick)&&window.UserLeap.container&&(window.UserLeap.container.onclick=()=>{i.eventEmitter.emit(i.SprigEvent.CloseSurveyOnOverlayClick)}),i.eventEmitter.emit(i.SprigEvent.SurveyLifeCycle,{state:"presented"}),i.eventEmitter.emit(i.SprigEvent.SurveyPresented,{name:i.SprigEvent.SurveyPresented,"survey.id":o});const l=(w=s.contentWindow)==null?void 0:w.document;if(l&&(l.open("text/html","replace"),l.write("<!doctype html><head></head><body></body></html>"),l.close(),!e)){const g=l.body;g.style.display="flex",g.style.alignItems="center"}const u=l==null?void 0:l.head;return{frameId:r,contentWinDocHead:u,contentWindow:s.contentWindow,hasOverlay:d,iframe:s}},$e={[i.SprigEvent.SurveyFadingOut]:()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{"background-color":"rgba(0,0,0,0)"})}},mt=()=>{Object.entries($e).forEach(([t,e])=>{i.eventEmitter.on(t,e)})},yt=()=>{Object.entries($e).forEach(([t,e])=>{i.eventEmitter.off(t,e)})},F=t=>!!t&&t.nodeType===Node.ELEMENT_NODE,Pe=t=>t instanceof HTMLElement||t instanceof SVGElement,K=({document:t,elementId:e,styleString:o,nonce:a})=>{const r=t.getElementById(e);if(r)return void(r.textContent=o);const n=t.createElement("style");a&&(n.nonce=a),n.textContent=o,n.id=e,t.head.appendChild(n)},vt=(t,e)=>{const o=e.querySelector(".sprig-question-body");if(!F(o))return t;const a=o.scrollHeight;return a<100?t:t-(a-100)},Te=(t,e)=>{const o=e.querySelector(t);if(!F(o))return 0;const a=getComputedStyle(o);return parseFloat(a.paddingLeft)+parseFloat(a.paddingRight)+(parseFloat(a.marginLeft)+parseFloat(a.marginRight))+(parseFloat(a.borderLeftWidth)+parseFloat(a.borderRightWidth))},Ge=t=>{const e=t.querySelector(".ul-card__container");let o=600,a=360,r=0;if(F(e)){o=e.clientHeight,o+=(d=>{const c=d.querySelector(".sprig-question-body"),p=d.querySelector(".ul-card"),l=d.querySelector(".ul-card-main-content");let u=0;return F(p)&&(u+=p.scrollHeight-p.clientHeight),F(l)&&(u+=l.scrollHeight-l.clientHeight),F(c)&&(u+=c.scrollHeight-c.clientHeight),u})(t);const n=getComputedStyle(e);r=o,o+=parseFloat(n.marginTop)+parseFloat(n.marginBottom)+(parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth));const s=e.querySelector(".ul-card--matrix_grid");a=s?s.scrollWidth:e.scrollWidth,a+=Te(".ul-card__container",t),a+=Te(".sprig-question-body",t)}return[o+1,a,vt(r,t)]},Ke=()=>y,V=()=>document.getElementById("sprig-feedback-container"),we=()=>document.getElementById("sprig-feedback-loading-animation"),Je=()=>!!document.getElementById(Le);let He=!1,y=null,C=null,Ue=!1,$=null,M=null;const ft=["bottom-left","bottom-right","center-left","center-right"],X=()=>{var e;const t=window.UserLeap.container;return((e=t==null?void 0:t.parentElement)==null?void 0:e.id)==="sprig-feedback-loading-container"},Qe=()=>document.getElementById("sprig-feedback-error-container"),Ye=()=>{if(!y)return 0;const t=y==null?void 0:y.clientWidth,e=window.getComputedStyle(y);return t+parseInt(e.borderRightWidth||"0")+parseInt(e.borderLeftWidth||"0")},Z=t=>{const e=V();e&&(M!=null&&M.endsWith("right")?e.style.right=`${t}px`:M!=null&&M.endsWith("left")&&(e.style.left=`${t}px`))},ce=()=>{if(y&&(X()||Qe())){i.eventEmitter.off(i.SprigEvent.SurveyAppeared,z),ge();const t=Ye();return Z(-t),!0}return!1},z=()=>{if(!y||!C)return;const t=we();t&&t.remove(),y.style.height="auto",y.style.width="auto",C.disabled=!1,Ue=!1},ge=()=>{if(y&&!we()){const t=(()=>{if(we())return;const e=document.createElement("div");return e.className="ul-loading-spinner-container",e.id="sprig-feedback-loading-animation",e.role="progressbar",e.setAttribute("aria-live","polite"),e.setAttribute("aria-busy","true"),e.setAttribute("aria-label","Processing..."),e.innerHTML=`
1
+ "use strict";var ct=Object.defineProperty;var pt=(t,e,o)=>e in t?ct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o;var q=(t,e,o)=>(pt(t,typeof e!="symbol"?e+"":e,o),o);const i=require("./metricsReporter-CHOlWEKF.cjs"),Ve="360px",Ae=()=>{try{return window.parent.Intercom}catch{return null}},Oe=[Object.freeze(Object.defineProperty({__proto__:null,disable:()=>{const t=Ae();t&&(t.ul_wasVisible=!!document.querySelector("iframe.intercom-launcher-frame"),t.ul_wasVisible&&t("update",{hide_default_launcher:!0}))},enable:()=>{const t=Ae();t&&(t.ul_wasVisible&&t("update",{hide_default_launcher:!1}),delete t.ul_wasVisible)}},Symbol.toStringTag,{value:"Module"}))];class We{static disable(){Oe.forEach(e=>e.disable())}static enable(){Oe.forEach(e=>e.enable())}}const Ce="ul-view-sdk-script",ut=["ios","android"],P="visitors",T="environments";async function O(t,e){var n,s,d;const{shouldDropOnRateLimit:o,...a}=e;a.headers=Object.assign(i.getHttpHeaders(window.UserLeap),a.headers);const r=await i.sprigFetch(t,{...a,shouldDropOnRateLimit:o});if(r.ok){const c=(n=r.headers)==null?void 0:n.get("Authorization"),p=c?c.split(" "):void 0,l=p&&p.length===2?p[1]:void 0,u=(s=r.headers)==null?void 0:s.get("x-ul-visitor-id");if(window.UserLeap.userId&&u===window.UserLeap.visitorId){const m=i.localStorageHelper.getItemObject("sprig.anon.env.vid.map");m&&m[window.UserLeap.envId]===u&&(delete m[window.UserLeap.envId],i.localStorageHelper.setItemObject("sprig.anon.env.vid.map",m))}l&&u&&(u!==window.UserLeap.visitorId||window.UserLeap.token!==l)&&(k("token",l),k("vid",u),i.eventEmitter.emit(i.SprigEvent.VisitorIDUpdated,{visitorId:u}),window.UserLeap.token=l,window.UserLeap.visitorId=u)}return(d=r.json)!=null&&d.logMessage&&console.warn(`[Sprig] ${r.json.logMessage}`),r}function k(t,e){const o=i.localStorageHelper.getItemObject("userleap.ids");let a=o[window.UserLeap.envId];a?a[t]=e:a={[t]:e},o[window.UserLeap.envId]=a,i.localStorageHelper.setItemObject("userleap.ids",o)}function be(){return window.previewMode?"0":window.UserLeap.visitorId??""}function R(t,e,o){const a=[window.UserLeap._API_URL,"sdk",t];return e&&e.forEach(r=>{a.push(r),r===T?a.push(window.UserLeap.envId):r===P&&a.push(be())}),o&&a.push(o),a.join("/")}const B=async(t,e)=>{var _e,De,Re;const{context:o,delay:a,forceBrandedLogo:r,endCard:n,isFeedback:s=!1,heatmap:d,locale:c,previewMode:p,productConfig:l,questions:u,responseGroupUid:m,surveyId:w,uuid:g,vid:I,sessionReplay:h,studyType:S}=t,f=i.getHttpHeaders(window.UserLeap),b=se(f),U=Se(f);if(h)if(b)i.eventEmitter.emit(i.SprigEvent.ReplayCapture,{responseGroupUid:m,hasQuestions:!!(u!=null&&u.length),surveyId:w,uploadId:h.uploadId,replayType:h.replayDurationType??"before",seconds:h.replayDurationSeconds,generateVideoUploadUrlPayload:{mediaRecordingUid:i.v4(),mediaType:"screen",questionId:1,responseGroupUid:m,surveyId:w,updatedAt:new Date().toISOString(),visitorId:window.UserLeap.visitorId,isReplay:!0}});else{if(!i.modules.replay)return window.UserLeap.reportError("displayQuestions",new Error("Replay module not registered")),{success:!1,message:"Replay module not registered",surveyState:"no survey"};i.modules.replay.scheduleOrCaptureReplay({responseGroupId:m,surveyId:w,visitorId:I,replayParams:h,completeUploadHeaders:f,apiUrl:window.UserLeap._API_URL,triggerTimestamp:Date.now(),isStandalone:u.length===0})}if(d){if(!i.modules.replay)return window.UserLeap.reportError("displayQuestions",new Error("Replay module not registered")),{success:!1,message:"Replay module not registered",surveyState:"no survey"};const{eventId:L,replayParams:de,responseGroupUid:dt,surveyId:lt}=d;await i.modules.replay.initializeReplay({maxReplayDurationSeconds:300,maxInflightRequests:window.UserLeap.maxInflightReplayRequests,teardownAfter:!0}),i.modules.replay.tryReplayAction(()=>{var xe;return(xe=i.modules.replay)==null?void 0:xe.scheduleCapture({apiUrl:window.UserLeap._API_URL,completeUploadHeaders:f,eventId:L,isHeatmap:!0,replayParams:de,responseGroupId:dt,surveyId:lt,triggerTimestamp:Date.now(),visitorId:I})},"Error in scheduling/capturing replay")}if(I==null||!(u!=null&&u.length))return i.breadcrumbsLogger.info("CannotDisplaySurvey",{vid:I}),{success:!1,message:"[Sprig] no survey found",surveyState:"no survey"};if(window.UserLeap.container){i.breadcrumbsLogger.info("AlreadyDisplayingSurvey");const L="[Sprig] (ERR-409) Found an existing Survey container, aborting rendering of this survey";return console.warn(L),{success:!1,message:L,surveyState:"no survey"}}if(I!==window.UserLeap.visitorId&&g!==window.UserLeap.visitorId&&!window.previewMode){const L="Attempted to display survey to a different visitor";return window.UserLeap.reportError("DisplaySurvey",new Error(L)),{success:!1,message:L,surveyState:"no survey"}}i.breadcrumbsLogger.info("ShowingSurvey",{surveyId:w}),(_e=i.modules.replay)==null||_e.RecordSurveyShown({id:w,userAgent:window.navigator.userAgent}),We.disable(),i.eventEmitter.emit(i.SprigEvent.SurveyWillPresent,{name:i.SprigEvent.SurveyWillPresent,"survey.id":w});let x,v,E,_,D=document.createElement("div");const H=L=>{const{"view.version":de}=L;de!==f["x-ul-sdk-version"]&&ze(),i.eventEmitter.removeListener("verify.view.version",H)};i.eventEmitter.on("verify.view.version",H),window.UserLeap.useMobileStyling=U,i.shouldDirectEmbed(f)?(x="ul-direct-embeded-frame",v=document.head,E=window,_=!1,b&&(Ne(w,s),D.id=x,window.UserLeap.container.appendChild(D),Be(),i.eventEmitter.emit(i.SprigEvent.SurveyLifeCycle,{state:"presented"}),i.eventEmitter.emit(i.SprigEvent.SurveyPresented,{name:i.SprigEvent.SurveyPresented,"survey.id":w}))):{frameId:x,contentWinDocHead:v,contentWindow:E,hasOverlay:_,iframe:D}=gt({productConfig:l,useMobileStyling:U,surveyId:w,isFeedback:s}),window.UserLeap.frameId=x;const A={apiURL:window.UserLeap._API_URL,cards:u,configureExitOnOverlayClick:L=>{i.eventEmitter.once(i.SprigEvent.CloseSurveyOnOverlayClick,L)},context:o,endCard:n,envId:window.UserLeap.envId,eventEmitFn:i.eventEmitter.emit.bind(i.eventEmitter),fontFamily:window.UserLeap.fontFamily,fontFamilyURL:window.UserLeap.fontFamilyURL,forceBrandedLogo:r,frame:D,headers:f,locale:c,mobileSDKVersion:window.UserLeap.mobileSDKVersion,previewKey:i.localStorageHelper.getItem("sprig.previewKey"),previewMode:p,productConfig:{framePosition:l==null?void 0:l.framePosition,desktopDisplay:l==null?void 0:l.desktopDisplay,placement:l==null?void 0:l.placement},responseGroupUid:m,startingQuestionIdx:(De=window.UserLeap.config)==null?void 0:De.startingQuestionIdx,studyType:S,styleNonce:window.UserLeap.styleNonce,surveyId:w,tabTitle:document.title,trackPageViewUrl:e,ulEvents:i.EVENTS,upchunkLibraryURL:window.UserLeap.upchunkLibraryURL,useMobileStyling:U,userId:g,viewDocument:E==null?void 0:E.document,viewWindow:E,visitorAttributes:{externalUserId:window.UserLeap.userId,email:window.UserLeap.email},...window.UserLeap._config};(Re=window.UserLeap._config)!=null&&Re.startingQuestionIdx&&(window.UserLeap._config={...window.UserLeap._config,startingQuestionIdx:null});const J=(s?window.UserLeap.feedbackCustomStyles:window.UserLeap.customStyles)??l.customStyles;A.customStyles=J,E&&(E.__cfg=A);const W=window.UserLeap.viewSDKURL?window.UserLeap.viewSDKURL:A.path,Ee=document.getElementById(Ce);Ee&&Ee.remove();const ae=function(){const L=document.createElement("script");return window.UserLeap.nonce&&L.setAttribute("nonce",window.UserLeap.nonce),L.id=Ce,L}(),Ie=()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{display:"flex"})};if(A.installationMethod==="web-npm"||A.installationMethod==="web-npm-bundled"){const{default:L}=await Promise.resolve().then(()=>require("./view-CZBsyFUR.cjs"));L.configure(A),_&&window.UserLeap.container&&Ie()}else W&&(ae.src=W,_&&ae.addEventListener("load",()=>{window.UserLeap.container&&Ie()}),E==null||E.addEventListener("error",L=>{L.target instanceof HTMLScriptElement&&L.target.src===W&&window.UserLeap.reportError("loadFrameScript",new Error("Frame script failed to load"))},{capture:!0,once:!0}));v==null||v.appendChild(ae);const ke={success:!0,surveyState:"ready",surveyId:w,responseGroupUid:m};return window.UserLeap.isMobileSDK&&a&&(ke.delay=a),ke};function Se(t){var o;if(window.UserLeap.useMobileStyling!==void 0)return window.UserLeap.useMobileStyling;const e=((o=window.UserLeap.windowDimensions)==null?void 0:o.width)??document.body.clientWidth;return se(t)||e>10&&e<500}function se(t){return ut.includes(t["userleap-platform"])}const Le="ul-frame";window.UserLeap&&window.Sprig&&(window.Sprig._gtm?window.Sprig=window.UserLeap:window.UserLeap=window.Sprig),window.UserLeap||(window.UserLeap=window.Sprig),window.Sprig||(window.Sprig=window.UserLeap);const le="0px",Ne=(t,e,o)=>{window.UserLeap.container=document.createElement("div"),window.UserLeap.container.className="ul-container"+(e?" ul-container-feedback":""),t&&(window.UserLeap.container.dataset.studyId=t.toString());const a=Ke();o&&a&&!window.UserLeap.useMobileStyling?a.appendChild(window.UserLeap.container):document.body.appendChild(window.UserLeap.container)},ze=(t,e)=>{var a;yt();const o=window.UserLeap.container;if(o)try{(a=o.parentNode)==null||a.removeChild(o),window.UserLeap.container=null,k("trackStartUrl",null),i.eventEmitter.emit(i.SprigEvent.SurveyLifeCycle,{state:"dismissed"}),i.eventEmitter.emit(i.SprigEvent.SurveyClosed,{name:i.SprigEvent.SurveyClosed,initiator:t,"survey.id":parseInt(o.dataset.studyId),...e&&{studyType:e}})}catch(r){console.warn(`[Sprig] (ERR-412) Error removing UserLeap container by ${t} `+o),r instanceof Error&&window.UserLeap.reportError("dismissActiveSurvey",r)}},Be=()=>{i.eventEmitter.once(i.SprigEvent.SurveyWillClose,({initiator:t,studyType:e})=>{i.eventEmitter.removeAllListeners(i.SprigEvent.CloseSurveyOnOverlayClick),ze(t,e)})},wt=(t,e,o,a)=>{var l,u;const r={position:"fixed",bottom:"0px",right:le,border:0,backgroundColor:"rgba(0,0,0,0)",zIndex:2147483646,transition:"width 0.2s ease-in-out, height 0.2s ease-in-out",maxWidth:"100%"},n=Object.assign({},e,window.UserLeap),{desktopDisplay:s}=e||{},d=s==="center-modal";let c;d&&(n.framePosition="center");let p=!1;if(o)(l=window.UserLeap.windowDimensions)!=null&&l.width?r.width=`${window.UserLeap.windowDimensions.width}px`:r.width="100%",(u=window.UserLeap.windowDimensions)!=null&&u.height?r.maxHeight=window.UserLeap.windowDimensions.height-20+"px":window.UserLeap.maxHeight?r.maxHeight=window.UserLeap.maxHeight:r.maxHeight=document.body.clientHeight-20+"px",["light","dark"].includes(n.overlayStyleMobile)&&(p=!0);else{r.width=Ve,r.maxHeight=window.UserLeap.maxHeight||"66vh";const m=()=>{p=!0,c={margin:"auto",position:"static"}};if(a)d?m():c={position:"relative",height:"300px"};else switch(n.framePosition){case"bottomLeft":c={left:le};break;case"topLeft":c={left:le,top:0};break;case"topRight":c={top:0};break;case"center":m()}}return p&&((m,w)=>{const g={position:"fixed",overflow:"auto",top:"0px",left:"0px",display:"none",height:"100%",width:"100%",transition:"background-color 0.3s ease-out",zIndex:2147483646},I=w?m.overlayStyleMobile:m.overlayStyle;g["background-color"]=I==="light"?"rgba(255,255,255, 0.95)":"rgba(0,0,0,0.9)",w||(g.margin="auto"),window.UserLeap.container&&Object.assign(window.UserLeap.container.style,g)})(n,o),Object.assign(t.style,r,c),p},gt=({productConfig:t,useMobileStyling:e,surveyId:o,isFeedback:a})=>{var m,w;const r=Le,n=a&&t.desktopDisplay==="slider";Ne(o,a,n),mt();const s=document.createElement("iframe");s.id=r,s.setAttribute("title","Sprig User Feedback Dialog");const d=wt(s,t,e,a);Be();let c=!1;s.setHeight=g=>{parseInt(s.style.height)==g&&c||(c=!0,s.style.height=`${g}px`,i.eventEmitter.emit(i.SprigEvent.SurveyHeight,{name:i.SprigEvent.SurveyHeight,contentFrameHeight:g,"survey.id":o}))};let p=!1;s.setWidth=g=>{parseInt(s.style.width)==g&&p||(p=!0,s.style.width=`${g}px`,i.eventEmitter.emit(i.SprigEvent.SurveyWidth,{name:i.SprigEvent.SurveyWidth,contentFrameWidth:g,"survey.id":o}))},(m=window.UserLeap.container)==null||m.appendChild(s),t&&(e?t.exitOnOverlayClickMobile:t.exitOnOverlayClick)&&window.UserLeap.container&&(window.UserLeap.container.onclick=()=>{i.eventEmitter.emit(i.SprigEvent.CloseSurveyOnOverlayClick)}),i.eventEmitter.emit(i.SprigEvent.SurveyLifeCycle,{state:"presented"}),i.eventEmitter.emit(i.SprigEvent.SurveyPresented,{name:i.SprigEvent.SurveyPresented,"survey.id":o});const l=(w=s.contentWindow)==null?void 0:w.document;if(l&&(l.open("text/html","replace"),l.write("<!doctype html><head></head><body></body></html>"),l.close(),!e)){const g=l.body;g.style.display="flex",g.style.alignItems="center"}const u=l==null?void 0:l.head;return{frameId:r,contentWinDocHead:u,contentWindow:s.contentWindow,hasOverlay:d,iframe:s}},$e={[i.SprigEvent.SurveyFadingOut]:()=>{window.UserLeap.container&&Object.assign(window.UserLeap.container.style,{"background-color":"rgba(0,0,0,0)"})}},mt=()=>{Object.entries($e).forEach(([t,e])=>{i.eventEmitter.on(t,e)})},yt=()=>{Object.entries($e).forEach(([t,e])=>{i.eventEmitter.off(t,e)})},F=t=>!!t&&t.nodeType===Node.ELEMENT_NODE,Pe=t=>t instanceof HTMLElement||t instanceof SVGElement,K=({document:t,elementId:e,styleString:o,nonce:a})=>{const r=t.getElementById(e);if(r)return void(r.textContent=o);const n=t.createElement("style");a&&(n.nonce=a),n.textContent=o,n.id=e,t.head.appendChild(n)},vt=(t,e)=>{const o=e.querySelector(".sprig-question-body");if(!F(o))return t;const a=o.scrollHeight;return a<100?t:t-(a-100)},Te=(t,e)=>{const o=e.querySelector(t);if(!F(o))return 0;const a=getComputedStyle(o);return parseFloat(a.paddingLeft)+parseFloat(a.paddingRight)+(parseFloat(a.marginLeft)+parseFloat(a.marginRight))+(parseFloat(a.borderLeftWidth)+parseFloat(a.borderRightWidth))},Ge=t=>{const e=t.querySelector(".ul-card__container");let o=600,a=360,r=0;if(F(e)){o=e.clientHeight,o+=(d=>{const c=d.querySelector(".sprig-question-body"),p=d.querySelector(".ul-card"),l=d.querySelector(".ul-card-main-content");let u=0;return F(p)&&(u+=p.scrollHeight-p.clientHeight),F(l)&&(u+=l.scrollHeight-l.clientHeight),F(c)&&(u+=c.scrollHeight-c.clientHeight),u})(t);const n=getComputedStyle(e);r=o,o+=parseFloat(n.marginTop)+parseFloat(n.marginBottom)+(parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth));const s=e.querySelector(".ul-card--matrix_grid");a=s?s.scrollWidth:e.scrollWidth,a+=Te(".ul-card__container",t),a+=Te(".sprig-question-body",t)}return[o+1,a,vt(r,t)]},Ke=()=>y,V=()=>document.getElementById("sprig-feedback-container"),we=()=>document.getElementById("sprig-feedback-loading-animation"),Je=()=>!!document.getElementById(Le);let He=!1,y=null,C=null,Ue=!1,$=null,M=null;const ft=["bottom-left","bottom-right","center-left","center-right"],X=()=>{var e;const t=window.UserLeap.container;return((e=t==null?void 0:t.parentElement)==null?void 0:e.id)==="sprig-feedback-loading-container"},Qe=()=>document.getElementById("sprig-feedback-error-container"),Ye=()=>{if(!y)return 0;const t=y==null?void 0:y.clientWidth,e=window.getComputedStyle(y);return t+parseInt(e.borderRightWidth||"0")+parseInt(e.borderLeftWidth||"0")},Z=t=>{const e=V();e&&(M!=null&&M.endsWith("right")?e.style.right=`${t}px`:M!=null&&M.endsWith("left")&&(e.style.left=`${t}px`))},ce=()=>{if(y&&(X()||Qe())){i.eventEmitter.off(i.SprigEvent.SurveyAppeared,z),ge();const t=Ye();return Z(-t),!0}return!1},z=()=>{if(!y||!C)return;const t=we();t&&t.remove(),y.style.height="auto",y.style.width="auto",C.disabled=!1,Ue=!1},ge=()=>{if(y&&!we()){const t=(()=>{if(we())return;const e=document.createElement("div");return e.className="ul-loading-spinner-container",e.id="sprig-feedback-loading-animation",e.role="progressbar",e.setAttribute("aria-live","polite"),e.setAttribute("aria-busy","true"),e.setAttribute("aria-label","Processing..."),e.innerHTML=`
2
2
  <div class="ul-loading-spinner">
3
3
  <div class="first"></div>
4
4
  <div class="second"></div>
@@ -1,7 +1,7 @@
1
1
  var Lt = Object.defineProperty;
2
2
  var Ut = (t, e, n) => e in t ? Lt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var $ = (t, e, n) => (Ut(t, typeof e != "symbol" ? e + "" : e, n), n);
4
- import { g as z, s as Xe, l as D, e as u, S as w, v as Ze, m as I, b as M, h as St, E as te, D as N, c as It, r as B, i as kt, j as Et, k as _t, n as qe, o as ze, a as xt, p as _e, d as Dt, q as et } from "./metricsReporter-Gimz6xcf.js";
4
+ import { g as z, s as Xe, l as D, e as u, S as w, v as Ze, m as I, b as M, h as St, E as te, D as N, c as It, r as B, i as kt, j as Et, k as _t, n as qe, o as ze, a as xt, p as _e, d as Dt, q as et } from "./metricsReporter-Dh_342TQ.js";
5
5
  const At = "360px", ir = "ul-app", nr = "#e6e6e6", or = "#bd282a", sr = 1030, We = () => {
6
6
  try {
7
7
  return window.parent.Intercom;
@@ -106,7 +106,7 @@ const X = async (t, e) => {
106
106
  window.UserLeap.container && Object.assign(window.UserLeap.container.style, { display: "flex" });
107
107
  };
108
108
  if (P.installationMethod === "web-npm" || P.installationMethod === "web-npm-bundled") {
109
- const { default: S } = await import("./view-Csp070UH.js");
109
+ const { default: S } = await import("./view-BkqDP9V8.js");
110
110
  S.configure(P), A && window.UserLeap.container && Ce();
111
111
  } else
112
112
  J && (ge.src = J, A && ge.addEventListener("load", () => {
package/dist/core.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("./metricsReporter-D4pafvTR.cjs"),e=require("./core-gTCnh_sk.cjs");exports.DismissReason=i.DismissReason,exports.SprigEvent=i.SprigEvent,exports.SprigAPI=e.SprigAPI,exports.default=e.core,exports.sprig=e.sprig;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("./metricsReporter-CHOlWEKF.cjs"),e=require("./core-BuTAnr1A.cjs");exports.DismissReason=i.DismissReason,exports.SprigEvent=i.SprigEvent,exports.SprigAPI=e.SprigAPI,exports.default=e.core,exports.sprig=e.sprig;
package/dist/core.js CHANGED
@@ -1,5 +1,5 @@
1
- import { D as r, S as e } from "./metricsReporter-Gimz6xcf.js";
2
- import { S as o, c as p, s as t } from "./core-DsBuStDe.js";
1
+ import { D as r, S as e } from "./metricsReporter-Dh_342TQ.js";
2
+ import { S as o, c as p, s as t } from "./core-DX7Qkopv.js";
3
3
  export {
4
4
  r as DismissReason,
5
5
  o as SprigAPI,
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./core-gTCnh_sk.cjs");require("./replay.cjs");const r=require("./metricsReporter-D4pafvTR.cjs");exports.SprigAPI=e.SprigAPI,exports.default=e.core,exports.sprig=e.sprig,exports.DismissReason=r.DismissReason,exports.SprigEvent=r.SprigEvent;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./core-BuTAnr1A.cjs");require("./replay.cjs");const r=require("./metricsReporter-CHOlWEKF.cjs");exports.SprigAPI=e.SprigAPI,exports.default=e.core,exports.sprig=e.sprig,exports.DismissReason=r.DismissReason,exports.SprigEvent=r.SprigEvent;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { S as i, c as o, s as p } from "./core-DsBuStDe.js";
1
+ import { S as i, c as o, s as p } from "./core-DX7Qkopv.js";
2
2
  import "./replay.js";
3
- import { D as t, S as m } from "./metricsReporter-Gimz6xcf.js";
3
+ import { D as t, S as m } from "./metricsReporter-Dh_342TQ.js";
4
4
  export {
5
5
  t as DismissReason,
6
6
  i as SprigAPI,
@@ -1 +1 @@
1
- "use strict";var Y=Object.defineProperty;var j=(e,t,r)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var l=(e,t,r)=>(j(e,typeof t!="symbol"?t+"":t,r),r);var U=(e=>(e.Closed="close.click",e.Complete="survey.completed",e.FeedbackClosed="feedback.closed",e.PageChange="page.change",e.API="api",e.Override="override",e))(U||{}),A=(e=>(e.ReplayCapture="replay.capture",e.FeedbackButtonLoaded="feedback.button.loaded",e.SDKReady="sdk.ready",e.SurveyAppeared="survey.appeared",e.SurveyClosed="survey.closed",e.SurveyDimensions="survey.dimensions",e.SurveyFadingOut="survey.fadingOut",e.SurveyHeight="survey.height",e.SurveyPresented="survey.presented",e.SurveyLifeCycle="survey.lifeCycle",e.SurveyWidth="survey.width",e.SurveyWillClose="survey.willClose",e.SurveyWillPresent="survey.will.present",e.CloseSurveyOnOverlayClick="close.survey.overlayClick",e.VisitorIDUpdated="visitor.id.updated",e.QuestionAnswered="question.answered",e))(A||{});let m;const H=new Uint8Array(16);function B(){if(!m&&(m=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!m))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return m(H)}const a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));const w={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},b=new class{constructor(){l(this,"breadcrumbs",[])}getTimeStamp(){return new Date().toISOString()}addBreadcrumb(e){this.breadcrumbs.push(e),this.breadcrumbs.length>300&&this.breadcrumbs.shift()}debug(e,t="debug"){this.addBreadcrumb({category:t,level:"info",message:e,timestamp:this.getTimeStamp(),type:"debug"})}error(e,t={}){this.addBreadcrumb({category:"error",data:t,level:"error",message:e,timestamp:this.getTimeStamp(),type:"error"})}http(e,t){this.addBreadcrumb({category:"xhr",data:t,message:e,timestamp:this.getTimeStamp(),type:"http"})}info(e,t={}){this.addBreadcrumb({category:"info",data:t,level:"info",message:e,timestamp:this.getTimeStamp(),type:"info"})}navigation(e,t){this.addBreadcrumb({category:"navigation",data:t,message:e,timestamp:this.getTimeStamp(),type:"navigation"})}};var F=class extends Error{constructor(e,t,r){super(`Possible EventEmitter memory leak detected. ${r} ${t.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`),this.emitter=e,this.type=t,this.count=r,this.name="MaxListenersExceededWarning"}},D=class{static listenerCount(e,t){return e.listenerCount(t)}constructor(){this.events=new Map,this.maxListeners=D.defaultMaxListeners,this.hasWarnedAboutPotentialMemoryLeak=!1}_emitInternalEvent(e,t,r){this.emit(e,t,r)}_getListeners(e){return Array.prototype.concat.apply([],this.events.get(e))||[]}_removeListener(e,t){const r=e.indexOf(t);return r>-1&&e.splice(r,1),[]}_wrapOnceListener(e,t){const r=(...s)=>(this.removeListener(e,r),t.apply(this,s));return Object.defineProperty(r,"name",{value:t.name}),r}setMaxListeners(e){return this.maxListeners=e,this}getMaxListeners(){return this.maxListeners}eventNames(){return Array.from(this.events.keys())}emit(e,...t){const r=this._getListeners(e);return r.forEach(s=>{s.apply(this,t)}),r.length>0}addListener(e,t){this._emitInternalEvent("newListener",e,t);const r=this._getListeners(e).concat(t);if(this.events.set(e,r),this.maxListeners>0&&this.listenerCount(e)>this.maxListeners&&!this.hasWarnedAboutPotentialMemoryLeak){this.hasWarnedAboutPotentialMemoryLeak=!0;const s=new F(this,e,this.listenerCount(e));console.warn(s)}return this}on(e,t){return this.addListener(e,t)}once(e,t){return this.addListener(e,this._wrapOnceListener(e,t))}prependListener(e,t){const r=this._getListeners(e);if(r.length>0){const s=[t].concat(r);this.events.set(e,s)}else this.events.set(e,r.concat(t));return this}prependOnceListener(e,t){return this.prependListener(e,this._wrapOnceListener(e,t))}removeListener(e,t){const r=this._getListeners(e);return r.length>0&&(this._removeListener(r,t),this.events.set(e,r),this._emitInternalEvent("removeListener",e,t)),this}off(e,t){return this.removeListener(e,t)}removeAllListeners(e){return e?this.events.delete(e):this.events.clear(),this}listeners(e){return Array.from(this._getListeners(e))}listenerCount(e){return this._getListeners(e).length}rawListeners(e){return this.listeners(e)}},C=D;C.defaultMaxListeners=10;const q=new C,S=async e=>{await new Promise(t=>{setTimeout(t,e)})};class x{constructor(t){l(this,"storage");l(this,"tempStorage",{});l(this,"isStorageAvailable");this.storage=window[t],this.isStorageAvailable=this.checkIfStorageAvailable()}checkIfStorageAvailable(){try{const t="__storage_test__";return this.storage.setItem(t,t),this.storage.removeItem(t),!0}catch{return!1}}setItem(t,r){this.isStorageAvailable?this.storage.setItem(t,r):this.tempStorage[t]=r}setItemObject(t,r){try{this.setItem(t,JSON.stringify(r))}catch(s){s instanceof Error&&(s.stack=t+": "+r,window.UserLeap.reportError("Failed to save to local storage",s))}}getItem(t){return this.isStorageAvailable?this.storage.getItem(t):this.tempStorage[t]}getItemObject(t){const r=this.getItem(t);if(r)try{return JSON.parse(r)}catch(s){s instanceof Error&&(s.stack=t+": "+r,window.UserLeap.reportError("Failed to parse local storage",s))}return{}}removeItem(t){this.isStorageAvailable?this.storage.removeItem(t):delete this.tempStorage[t]}clear(){this.isStorageAvailable?this.storage.clear():this.tempStorage={}}}const J=new x("sessionStorage"),$=new x("localStorage");class K{constructor(t){l(this,"payload");l(this,"promise");l(this,"reject",()=>{});l(this,"resolve",()=>{});this.payload=t,this.promise=new Promise((r,s)=>{this.reject=s,this.resolve=r})}resolveRequest(t){this.resolve(t)}}const E={replay:null},G=()=>{const e=[];return E.replay&&e.push("replay"),e.join(",")},z=10;let T=!1,M="",g=!1,P=!1,y=[];const Q=e=>e._config&&e._config.installationMethod?e._config.installationMethod:e._gtm?"web-gtm":e._segment?"web-segment":"web-snippet",N=(e="")=>{T=!0,M=e},I=async({shouldDropOnRateLimit:e,...t})=>{if(e)return{status:429};{const r=new K(t);return y.push(r),r.promise}},v=async(e,t)=>{const{retries:r=0,shouldDropOnRateLimit:s=!1,shouldRetryRequest:n=!1,...i}=t,d={url:e,options:i,retries:r,shouldDropOnRateLimit:s};if(g&&!n)return I(d);const u={ok:!1,reportError:!1};if(T)return console.info(`UserLeap - ${M}`),u;try{const c=await fetch(e,i);if(c.status===429){if(!g&&!s||n){g=!0;const o=c.headers.has("ratelimit-reset")?Number(c.headers.get("ratelimit-reset")):z;return await S(1e3*o),v(e,{...i,shouldDropOnRateLimit:s,shouldRetryRequest:!0})}return I(d)}if(g=!1,y.length&&(y.map(o=>{const h=o.payload;v(h.url,{...h.options,retries:h.retries,shouldDropOnRateLimit:h.shouldDropOnRateLimit}).then(W=>{o.resolveRequest(W)})}),y=[]),c.ok){if(c.status===249)return N(),u;const o=await c.text();try{return o&&o!=="OK"&&(c.json=JSON.parse(o)),c}catch{return{ok:!1,reportError:!1,error:new Error(`failed parsing response json for ${e} - ${o}`)}}}return c}catch(c){const o=r+1;return o>5||P?{ok:!1,reportError:!1,error:c}:(await S(1e3*Math.pow(2,r)),v(e,{...i,retries:o}))}},R=Object.freeze({contains:(e,t)=>t.includes(e),notContains:(e,t)=>!t.includes(e),exactly:(e,t)=>t===e,notExactly:(e,t)=>t!==e,startsWith:(e,t)=>t.startsWith(e),endsWith:(e,t)=>t.endsWith(e),regex:(e,t)=>new RegExp(e).test(t),legacy:(e,t)=>new RegExp(e,"i").test(t)});function k(e,t){const{matchType:r,pattern:s}=e,n=r?R[r]:R.legacy;let i=!1;try{i=n(s,t)}catch(d){const u=`[Sprig] (ERR-445) Failed to check url match with pattern ${s}`;d instanceof Error&&(console.warn(u,d),d.stack=JSON.stringify(e),window.UserLeap.reportError(u,d))}return i}let V=!0,f=!1;const X=["sdk_event_queue_latency_seconds","sdk_replay_add_event_batch_seconds","sdk_replay_cleanup_seconds","sdk_replay_compression_seconds","sdk_replay_get_events_between_seconds","sdk_replay_snapshot_seconds","sdk_mutations_nodes_added","sdk_mutations_nodes_removed","sdk_mutations_attributes_changed","sdk_mutations_character_data","sdk_dom_nodes_count","sdk_page_html_characters"];let L,p={};class Z{constructor(t){l(this,"_values",[]);l(this,"_isWebMetric");this.name=t,this._isWebMetric=X.includes(this.name)}report(t){if(V&&this._values.push({time:Date.now(),value:t}),f||!this._isWebMetric)return;const r=this.findExceededThreshold(t);r&&L&&L(t,r)}collect(){const t=this._values;return this._values=[],t}findExceededThreshold(t){const r=p[this.name];if(r)return r.find(s=>this.valueExceedsThreshold(t,s))}valueExceedsThreshold(t,r){return r.type==="max"?t>r.value:r.type==="min"&&t<r.value}}const _={},O=e=>{const t=new Z(e);return _[e]=t,t};exports.DismissReason=U,exports.EVENTS={FEEDBACK_BUTTON_LOADED:"feedback.button.loaded",SDK_READY:"sdk.ready",SURVEY_APPEARED:"survey.appeared",SURVEY_CLOSED:"survey.closed",SURVEY_DIMENSIONS:"survey.dimensions",SURVEY_FADING_OUT:"survey.fadingOut",SURVEY_HEIGHT:"survey.height",SURVEY_WIDTH:"survey.width",SURVEY_PRESENTED:"survey.presented",SURVEY_LIFE_CYCLE:"survey.lifeCycle",SURVEY_WILL_CLOSE:"survey.willClose",SURVEY_WILL_PRESENT:"survey.will.present",QUESTION_ANSWERED:"question.answered",REPLAY_CAPTURE:"replay.capture",CLOSE_SURVEY_ON_OVERLAY_CLICK:"close.survey.overlayClick",VISITOR_ID_UPDATED:"visitor.id.updated",DATA:{DISMISS_REASONS:{API:"api",CLOSED:"close.click",COMPLETE:"survey.completed",PAGE_CHANGE:"page.change",OVERRIDE:"override"},SURVEY_ID:"survey.id"}},exports.PerformanceMetrics=_,exports.SprigEvent=A,exports.breadcrumbsLogger=b,exports.checkUrlMatch=k,exports.checkUrlStillMatching=e=>{const{pageUrlEvents:t}=window.UserLeap._config,r=t==null?void 0:t.find(s=>s.id===e);return!!r&&k(r,window.location.href)},exports.cspViolationHandler=e=>{var t;(t=e==null?void 0:e.blockedURI)!=null&&t.includes(window.UserLeap._API_URL)&&(P=!0,console.warn(`[Sprig] ${e.blockedURI} is blocked by Content-Security-Policy`))},exports.delay=S,exports.disableThresholdChecking=()=>f=!0,exports.eventEmitter=q,exports.getHttpHeaders=function(e={}){const t={"Content-Type":"application/json","userleap-platform":"web","x-ul-sdk-version":"2.32.3","x-ul-installation-method":Q(e),"sprig-modules":G()};if(e.envId&&(t["x-ul-environment-id"]=e.envId),e.token&&(t.Authorization="Bearer "+e.token),e.userId&&(t["x-ul-user-id"]=e.userId),e.visitorId&&(t["x-ul-visitor-id"]=e.visitorId),e.partnerAnonymousId&&(t["x-ul-anonymous-id"]=e.partnerAnonymousId),e.mobileHeadersJSON){const r=JSON.parse(e.mobileHeadersJSON);Object.assign(t,r)}return e.locale&&(t["accept-language"]=e.locale),window.previewMode&&(t["x-ul-preview-mode"]="1"),t},exports.initPerformanceReporting=({reportingIntervalSeconds:e,postMetrics:t})=>{e?setInterval(()=>{(async r=>{const s=Object.values(_).map(n=>({name:n.name,values:n.collect()}));if(s.some(n=>n.values.length))try{await r(JSON.stringify(s))}catch(n){n instanceof Error&&b.error("MetricsErr",{error:{message:n.message,name:n.name}})}})(t)},1e3*e):V=!1},exports.killNetworkRequests=N,exports.localStorageHelper=$,exports.modules=E,exports.registerMetric=O,exports.registerReplay=e=>{E.replay=e},exports.registerThresholds=(e,t)=>{p={},f=!1,e==null||e.forEach(r=>{var s;r.metric in p||(p[r.metric]=[]),(s=p[r.metric])==null||s.push(r)}),L=t},exports.reportAndRegister=(e,t)=>{let r=_[e];return r||(r=O(e)),r.report(t)},exports.sessionStorageHelper=J,exports.shouldDirectEmbed=({"userleap-platform":e})=>e!=="web",exports.sprigFetch=v,exports.v4=function(e,t,r){if(w.randomUUID&&!t&&!e)return w.randomUUID();const s=(e=e||{}).random||(e.rng||B)();return s[6]=15&s[6]|64,s[8]=63&s[8]|128,function(n,i=0){return a[n[i+0]]+a[n[i+1]]+a[n[i+2]]+a[n[i+3]]+"-"+a[n[i+4]]+a[n[i+5]]+"-"+a[n[i+6]]+a[n[i+7]]+"-"+a[n[i+8]]+a[n[i+9]]+"-"+a[n[i+10]]+a[n[i+11]]+a[n[i+12]]+a[n[i+13]]+a[n[i+14]]+a[n[i+15]]}(s)};
1
+ "use strict";var Y=Object.defineProperty;var j=(e,t,r)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var l=(e,t,r)=>(j(e,typeof t!="symbol"?t+"":t,r),r);var U=(e=>(e.Closed="close.click",e.Complete="survey.completed",e.FeedbackClosed="feedback.closed",e.PageChange="page.change",e.API="api",e.Override="override",e))(U||{}),A=(e=>(e.ReplayCapture="replay.capture",e.FeedbackButtonLoaded="feedback.button.loaded",e.SDKReady="sdk.ready",e.SurveyAppeared="survey.appeared",e.SurveyClosed="survey.closed",e.SurveyDimensions="survey.dimensions",e.SurveyFadingOut="survey.fadingOut",e.SurveyHeight="survey.height",e.SurveyPresented="survey.presented",e.SurveyLifeCycle="survey.lifeCycle",e.SurveyWidth="survey.width",e.SurveyWillClose="survey.willClose",e.SurveyWillPresent="survey.will.present",e.CloseSurveyOnOverlayClick="close.survey.overlayClick",e.VisitorIDUpdated="visitor.id.updated",e.QuestionAnswered="question.answered",e))(A||{});let m;const H=new Uint8Array(16);function B(){if(!m&&(m=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!m))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return m(H)}const a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));const w={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},b=new class{constructor(){l(this,"breadcrumbs",[])}getTimeStamp(){return new Date().toISOString()}addBreadcrumb(e){this.breadcrumbs.push(e),this.breadcrumbs.length>300&&this.breadcrumbs.shift()}debug(e,t="debug"){this.addBreadcrumb({category:t,level:"info",message:e,timestamp:this.getTimeStamp(),type:"debug"})}error(e,t={}){this.addBreadcrumb({category:"error",data:t,level:"error",message:e,timestamp:this.getTimeStamp(),type:"error"})}http(e,t){this.addBreadcrumb({category:"xhr",data:t,message:e,timestamp:this.getTimeStamp(),type:"http"})}info(e,t={}){this.addBreadcrumb({category:"info",data:t,level:"info",message:e,timestamp:this.getTimeStamp(),type:"info"})}navigation(e,t){this.addBreadcrumb({category:"navigation",data:t,message:e,timestamp:this.getTimeStamp(),type:"navigation"})}};var F=class extends Error{constructor(e,t,r){super(`Possible EventEmitter memory leak detected. ${r} ${t.toString()} listeners added. Use emitter.setMaxListeners() to increase limit`),this.emitter=e,this.type=t,this.count=r,this.name="MaxListenersExceededWarning"}},D=class{static listenerCount(e,t){return e.listenerCount(t)}constructor(){this.events=new Map,this.maxListeners=D.defaultMaxListeners,this.hasWarnedAboutPotentialMemoryLeak=!1}_emitInternalEvent(e,t,r){this.emit(e,t,r)}_getListeners(e){return Array.prototype.concat.apply([],this.events.get(e))||[]}_removeListener(e,t){const r=e.indexOf(t);return r>-1&&e.splice(r,1),[]}_wrapOnceListener(e,t){const r=(...s)=>(this.removeListener(e,r),t.apply(this,s));return Object.defineProperty(r,"name",{value:t.name}),r}setMaxListeners(e){return this.maxListeners=e,this}getMaxListeners(){return this.maxListeners}eventNames(){return Array.from(this.events.keys())}emit(e,...t){const r=this._getListeners(e);return r.forEach(s=>{s.apply(this,t)}),r.length>0}addListener(e,t){this._emitInternalEvent("newListener",e,t);const r=this._getListeners(e).concat(t);if(this.events.set(e,r),this.maxListeners>0&&this.listenerCount(e)>this.maxListeners&&!this.hasWarnedAboutPotentialMemoryLeak){this.hasWarnedAboutPotentialMemoryLeak=!0;const s=new F(this,e,this.listenerCount(e));console.warn(s)}return this}on(e,t){return this.addListener(e,t)}once(e,t){return this.addListener(e,this._wrapOnceListener(e,t))}prependListener(e,t){const r=this._getListeners(e);if(r.length>0){const s=[t].concat(r);this.events.set(e,s)}else this.events.set(e,r.concat(t));return this}prependOnceListener(e,t){return this.prependListener(e,this._wrapOnceListener(e,t))}removeListener(e,t){const r=this._getListeners(e);return r.length>0&&(this._removeListener(r,t),this.events.set(e,r),this._emitInternalEvent("removeListener",e,t)),this}off(e,t){return this.removeListener(e,t)}removeAllListeners(e){return e?this.events.delete(e):this.events.clear(),this}listeners(e){return Array.from(this._getListeners(e))}listenerCount(e){return this._getListeners(e).length}rawListeners(e){return this.listeners(e)}},C=D;C.defaultMaxListeners=10;const q=new C,S=async e=>{await new Promise(t=>{setTimeout(t,e)})};class x{constructor(t){l(this,"storage");l(this,"tempStorage",{});l(this,"isStorageAvailable");this.storage=window[t],this.isStorageAvailable=this.checkIfStorageAvailable()}checkIfStorageAvailable(){try{const t="__storage_test__";return this.storage.setItem(t,t),this.storage.removeItem(t),!0}catch{return!1}}setItem(t,r){this.isStorageAvailable?this.storage.setItem(t,r):this.tempStorage[t]=r}setItemObject(t,r){try{this.setItem(t,JSON.stringify(r))}catch(s){s instanceof Error&&(s.stack=t+": "+r,window.UserLeap.reportError("Failed to save to local storage",s))}}getItem(t){return this.isStorageAvailable?this.storage.getItem(t):this.tempStorage[t]}getItemObject(t){const r=this.getItem(t);if(r)try{return JSON.parse(r)}catch(s){s instanceof Error&&(s.stack=t+": "+r,window.UserLeap.reportError("Failed to parse local storage",s))}return{}}removeItem(t){this.isStorageAvailable?this.storage.removeItem(t):delete this.tempStorage[t]}clear(){this.isStorageAvailable?this.storage.clear():this.tempStorage={}}}const J=new x("sessionStorage"),$=new x("localStorage");class K{constructor(t){l(this,"payload");l(this,"promise");l(this,"reject",()=>{});l(this,"resolve",()=>{});this.payload=t,this.promise=new Promise((r,s)=>{this.reject=s,this.resolve=r})}resolveRequest(t){this.resolve(t)}}const E={replay:null},G=()=>{const e=[];return E.replay&&e.push("replay"),e.join(",")},z=10;let T=!1,M="",g=!1,P=!1,y=[];const Q=e=>e._config&&e._config.installationMethod?e._config.installationMethod:e._gtm?"web-gtm":e._segment?"web-segment":"web-snippet",N=(e="")=>{T=!0,M=e},I=async({shouldDropOnRateLimit:e,...t})=>{if(e)return{status:429};{const r=new K(t);return y.push(r),r.promise}},v=async(e,t)=>{const{retries:r=0,shouldDropOnRateLimit:s=!1,shouldRetryRequest:n=!1,...i}=t,d={url:e,options:i,retries:r,shouldDropOnRateLimit:s};if(g&&!n)return I(d);const u={ok:!1,reportError:!1};if(T)return console.info(`UserLeap - ${M}`),u;try{const c=await fetch(e,i);if(c.status===429){if(!g&&!s||n){g=!0;const o=c.headers.has("ratelimit-reset")?Number(c.headers.get("ratelimit-reset")):z;return await S(1e3*o),v(e,{...i,shouldDropOnRateLimit:s,shouldRetryRequest:!0})}return I(d)}if(g=!1,y.length&&(y.map(o=>{const h=o.payload;v(h.url,{...h.options,retries:h.retries,shouldDropOnRateLimit:h.shouldDropOnRateLimit}).then(W=>{o.resolveRequest(W)})}),y=[]),c.ok){if(c.status===249)return N(),u;const o=await c.text();try{return o&&o!=="OK"&&(c.json=JSON.parse(o)),c}catch{return{ok:!1,reportError:!1,error:new Error(`failed parsing response json for ${e} - ${o}`)}}}return c}catch(c){const o=r+1;return o>5||P?{ok:!1,reportError:!1,error:c}:(await S(1e3*Math.pow(2,r)),v(e,{...i,retries:o}))}},R=Object.freeze({contains:(e,t)=>t.includes(e),notContains:(e,t)=>!t.includes(e),exactly:(e,t)=>t===e,notExactly:(e,t)=>t!==e,startsWith:(e,t)=>t.startsWith(e),endsWith:(e,t)=>t.endsWith(e),regex:(e,t)=>new RegExp(e).test(t),legacy:(e,t)=>new RegExp(e,"i").test(t)});function k(e,t){const{matchType:r,pattern:s}=e,n=r?R[r]:R.legacy;let i=!1;try{i=n(s,t)}catch(d){const u=`[Sprig] (ERR-445) Failed to check url match with pattern ${s}`;d instanceof Error&&(console.warn(u,d),d.stack=JSON.stringify(e),window.UserLeap.reportError(u,d))}return i}let V=!0,f=!1;const X=["sdk_event_queue_latency_seconds","sdk_replay_add_event_batch_seconds","sdk_replay_cleanup_seconds","sdk_replay_compression_seconds","sdk_replay_get_events_between_seconds","sdk_replay_snapshot_seconds","sdk_mutations_nodes_added","sdk_mutations_nodes_removed","sdk_mutations_attributes_changed","sdk_mutations_character_data","sdk_dom_nodes_count","sdk_page_html_characters"];let L,p={};class Z{constructor(t){l(this,"_values",[]);l(this,"_isWebMetric");this.name=t,this._isWebMetric=X.includes(this.name)}report(t){if(V&&this._values.push({time:Date.now(),value:t}),f||!this._isWebMetric)return;const r=this.findExceededThreshold(t);r&&L&&L(t,r)}collect(){const t=this._values;return this._values=[],t}findExceededThreshold(t){const r=p[this.name];if(r)return r.find(s=>this.valueExceedsThreshold(t,s))}valueExceedsThreshold(t,r){return r.type==="max"?t>r.value:r.type==="min"&&t<r.value}}const _={},O=e=>{const t=new Z(e);return _[e]=t,t};exports.DismissReason=U,exports.EVENTS={FEEDBACK_BUTTON_LOADED:"feedback.button.loaded",SDK_READY:"sdk.ready",SURVEY_APPEARED:"survey.appeared",SURVEY_CLOSED:"survey.closed",SURVEY_DIMENSIONS:"survey.dimensions",SURVEY_FADING_OUT:"survey.fadingOut",SURVEY_HEIGHT:"survey.height",SURVEY_WIDTH:"survey.width",SURVEY_PRESENTED:"survey.presented",SURVEY_LIFE_CYCLE:"survey.lifeCycle",SURVEY_WILL_CLOSE:"survey.willClose",SURVEY_WILL_PRESENT:"survey.will.present",QUESTION_ANSWERED:"question.answered",REPLAY_CAPTURE:"replay.capture",CLOSE_SURVEY_ON_OVERLAY_CLICK:"close.survey.overlayClick",VISITOR_ID_UPDATED:"visitor.id.updated",DATA:{DISMISS_REASONS:{API:"api",CLOSED:"close.click",COMPLETE:"survey.completed",PAGE_CHANGE:"page.change",OVERRIDE:"override"},SURVEY_ID:"survey.id"}},exports.PerformanceMetrics=_,exports.SprigEvent=A,exports.breadcrumbsLogger=b,exports.checkUrlMatch=k,exports.checkUrlStillMatching=e=>{const{pageUrlEvents:t}=window.UserLeap._config,r=t==null?void 0:t.find(s=>s.id===e);return!!r&&k(r,window.location.href)},exports.cspViolationHandler=e=>{var t;(t=e==null?void 0:e.blockedURI)!=null&&t.includes(window.UserLeap._API_URL)&&(P=!0,console.warn(`[Sprig] ${e.blockedURI} is blocked by Content-Security-Policy`))},exports.delay=S,exports.disableThresholdChecking=()=>f=!0,exports.eventEmitter=q,exports.getHttpHeaders=function(e={}){const t={"Content-Type":"application/json","userleap-platform":"web","x-ul-sdk-version":"2.32.4","x-ul-installation-method":Q(e),"sprig-modules":G()};if(e.envId&&(t["x-ul-environment-id"]=e.envId),e.token&&(t.Authorization="Bearer "+e.token),e.userId&&(t["x-ul-user-id"]=e.userId),e.visitorId&&(t["x-ul-visitor-id"]=e.visitorId),e.partnerAnonymousId&&(t["x-ul-anonymous-id"]=e.partnerAnonymousId),e.mobileHeadersJSON){const r=JSON.parse(e.mobileHeadersJSON);Object.assign(t,r)}return e.locale&&(t["accept-language"]=e.locale),window.previewMode&&(t["x-ul-preview-mode"]="1"),t},exports.initPerformanceReporting=({reportingIntervalSeconds:e,postMetrics:t})=>{e?setInterval(()=>{(async r=>{const s=Object.values(_).map(n=>({name:n.name,values:n.collect()}));if(s.some(n=>n.values.length))try{await r(JSON.stringify(s))}catch(n){n instanceof Error&&b.error("MetricsErr",{error:{message:n.message,name:n.name}})}})(t)},1e3*e):V=!1},exports.killNetworkRequests=N,exports.localStorageHelper=$,exports.modules=E,exports.registerMetric=O,exports.registerReplay=e=>{E.replay=e},exports.registerThresholds=(e,t)=>{p={},f=!1,e==null||e.forEach(r=>{var s;r.metric in p||(p[r.metric]=[]),(s=p[r.metric])==null||s.push(r)}),L=t},exports.reportAndRegister=(e,t)=>{let r=_[e];return r||(r=O(e)),r.report(t)},exports.sessionStorageHelper=J,exports.shouldDirectEmbed=({"userleap-platform":e})=>e!=="web",exports.sprigFetch=v,exports.v4=function(e,t,r){if(w.randomUUID&&!t&&!e)return w.randomUUID();const s=(e=e||{}).random||(e.rng||B)();return s[6]=15&s[6]|64,s[8]=63&s[8]|128,function(n,i=0){return a[n[i+0]]+a[n[i+1]]+a[n[i+2]]+a[n[i+3]]+"-"+a[n[i+4]]+a[n[i+5]]+"-"+a[n[i+6]]+a[n[i+7]]+"-"+a[n[i+8]]+a[n[i+9]]+"-"+a[n[i+10]]+a[n[i+11]]+a[n[i+12]]+a[n[i+13]]+a[n[i+14]]+a[n[i+15]]}(s)};
@@ -218,7 +218,7 @@ const J = (e) => e._config && e._config.installationMethod ? e._config.installat
218
218
  A = !0, U = e;
219
219
  };
220
220
  function ae(e = {}) {
221
- const t = { "Content-Type": "application/json", "userleap-platform": "web", "x-ul-sdk-version": "2.32.3", "x-ul-installation-method": J(e), "sprig-modules": F() };
221
+ const t = { "Content-Type": "application/json", "userleap-platform": "web", "x-ul-sdk-version": "2.32.4", "x-ul-installation-method": J(e), "sprig-modules": F() };
222
222
  if (e.envId && (t["x-ul-environment-id"] = e.envId), e.token && (t.Authorization = "Bearer " + e.token), e.userId && (t["x-ul-user-id"] = e.userId), e.visitorId && (t["x-ul-visitor-id"] = e.visitorId), e.partnerAnonymousId && (t["x-ul-anonymous-id"] = e.partnerAnonymousId), e.mobileHeadersJSON) {
223
223
  const s = JSON.parse(e.mobileHeadersJSON);
224
224
  Object.assign(t, s);
package/dist/replay.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var Ee=Object.defineProperty;var ke=(e,t,r)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _=(e,t,r)=>(ke(e,typeof t!="symbol"?t+"":t,r),r);const s=require("./metricsReporter-D4pafvTR.cjs");var P=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(P||{});const ne=new class{constructor(e){_(this,"awaitingResolvers",[]);_(this,"activeCount",0);this.capacity=e}async acquire(){if(!(this.activeCount<this.capacity))return new Promise(e=>{this.awaitingResolvers.push(e)});this.activeCount++}release(){const e=this.awaitingResolvers.shift();e&&this.activeCount<=this.capacity?e():this.activeCount--}async execute(e){try{return await this.acquire(),await e()}finally{this.release()}}setLimit(e){this.capacity=e}}(2),ae=async({apiUrl:e,surveyId:t,uploadId:r,etags:n,headers:a,responseGroupUuid:o,replayDuration:i,eventDigest:c},d=!1)=>{var w;if(!d&&!r&&!n)return void s.breadcrumbsLogger.error("UploadErr",{isMobile:d,uploadId:r,etags:n});s.breadcrumbsLogger.info("MarkUploadComplete",{surveyId:t});const u=await s.sprigFetch(`${e}/sdk/1/completeSessionReplay`,{method:"POST",body:JSON.stringify({etags:n,uploadId:r,responseGroupUuid:o,surveyId:t,replayDuration:i,eventDigest:c,userAgent:(w=window==null?void 0:window.navigator)==null?void 0:w.userAgent}),headers:a,shouldRetryRequest:!0});return s.breadcrumbsLogger.info("MarkUploadDone",{surveyId:t}),u},H=(e,t)=>t.some(r=>e instanceof r);let J,Q;const M=new WeakMap,A=new WeakMap,U=new WeakMap;let O={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return M.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return D(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&(t==="done"||t==="store")||t in e};function oe(e){O=e(O)}function Ce(e){return(Q||(Q=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(F(this),t),D(this.request)}:function(...t){return D(e.apply(F(this),t))}}function Pe(e){return typeof e=="function"?Ce(e):(e instanceof IDBTransaction&&function(t){if(M.has(t))return;const r=new Promise((n,a)=>{const o=()=>{a(t.error||new DOMException("AbortError","AbortError"))};t.oncomplete=()=>{n()},t.onerror=o,t.onabort=o});M.set(t,r)}(e),H(e,J||(J=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,O):e)}function D(e){if(e instanceof IDBRequest)return function(r){const n=new Promise((a,o)=>{r.onsuccess=()=>{a(D(r.result))},r.onerror=()=>{o(r.error)}});return U.set(n,r),n}(e);if(A.has(e))return A.get(e);const t=Pe(e);return t!==e&&(A.set(e,t),U.set(t,e)),t}const F=e=>U.get(e);function j(e,{blocked:t}={}){const r=indexedDB.deleteDatabase(e);return t&&(r.onblocked=n=>t(n.oldVersion,n)),D(r).then(()=>{})}const Re=["get","getKey","getAll","getAllKeys","count"],Be=["put","add","delete","clear"],N=new Map;function X(e,t){if(!(e instanceof IDBDatabase)||t in e||typeof t!="string")return;if(N.get(t))return N.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,a=Be.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!Re.includes(r))return;const o=async function(i,...c){const d=this.transaction(i,a?"readwrite":"readonly");let u=d.store;return n&&(u=u.index(c.shift())),(await Promise.all([u[r](...c),a&&d.done]))[0]};return N.set(t,o),o}oe(e=>({...e,get:(t,r,n)=>X(t,r)||e.get(t,r,n),has:(t,r)=>!!X(t,r)||e.has(t,r)}));const xe=["continue","continuePrimaryKey","advance"],Y={},V=new WeakMap,se=new WeakMap,Ue={get(e,t){if(!xe.includes(t))return e[t];let r=Y[t];return r||(r=Y[t]=function(...n){V.set(this,se.get(this)[t](...n))}),r}};async function*Le(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const r=new Proxy(t,Ue);for(se.set(r,t),U.set(r,F(t));t;)yield r,t=await(V.get(r)||t.continue()),V.delete(r)}function Z(e,t){return t===Symbol.asyncIterator&&H(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&H(e,[IDBIndex,IDBObjectStore])}oe(e=>({...e,get:(t,r,n)=>Z(t,r)?Le:e.get(t,r,n),has:(t,r)=>Z(t,r)||e.has(t,r)}));const Te=e=>{if(e instanceof Attr)return null;let t=1;for(let r=e.previousSibling;r;r=r.previousSibling)r.nodeName===e.nodeName&&++t;return t},ie=e=>{if(e===null)return"";const t=[];if(e instanceof Document)return"/";for(let r=e;r&&!(r instanceof Document)&&r!==null;r=r instanceof Attr?r.ownerElement:r.parentElement){const n=t[t.length]={name:void 0,position:null};switch(r.nodeType){case Node.TEXT_NODE:n.name="text()";break;case Node.ATTRIBUTE_NODE:n.name="@"+r.nodeName;break;case Node.PROCESSING_INSTRUCTION_NODE:n.name="processing-instruction()";break;case Node.COMMENT_NODE:n.name="comment()";break;case Node.ELEMENT_NODE:n.name=r.nodeName}n.position=Te(r)}return"/"+t.reverse().map(r=>r.position!==null?`/${r.name}[${r.position}]`:`/${r.name}`).join("")},I={capture:!0,passive:!0},_e=["a","button","input","option","li","link"],Ae=["Escape","Enter","Backspace","F5","Tab"];let L=!1;const Ne=["label","type","role","title","placeholder","errormessage","valuetext","href"],He="aria-",ee=e=>{var n;if(((n=e.tagName)==null?void 0:n.toLowerCase())==="html")return{element:"html"};const t=e.textContent,r=t?{text:t}:{};r.element=(a=>{if(!a.tagName)return"No tagName";const o=a.getAttribute("type");return o?`${o} ${a.tagName.toLowerCase()}`:a.tagName.toLowerCase()})(e);for(const a of e.attributes){let o=a.name;const i=a.value;o.startsWith(He)&&(o=o.substring(5)),Ne.includes(o)&&(r[o]=i)}return r},Me=e=>{var n;if(!e)return{};const t={...ee(e)},r=e.parentElement;if(r&&_e.includes((n=r.tagName)==null?void 0:n.toLowerCase())){const a=ee(r);Object.assign(t,a)}return t},de=(e,t)=>{var n;let r=t.target;t.target===((n=window.document)==null?void 0:n.body)&&window.Sprig.pointerDownTarget&&(r=window.Sprig.pointerDownTarget),Fe({x:t.x,y:t.y,type:e,elementAttributes:Me(r),windowHeight:window.innerHeight,windowWidth:window.innerWidth,...r instanceof HTMLElement?{rect:r==null?void 0:r.getBoundingClientRect(),xPath:ie(r)}:{}})},ce=e=>{Ae.includes(e.key)&&Ke({key:e.key})},ue=((e,t)=>{let r;return n=>{clearTimeout(r),r=window.setTimeout(()=>e(n),t)}})(e=>{if(!(e.target instanceof HTMLElement||e.target instanceof Document))return;let t=e.target;"scrollTop"in t||(t=t.documentElement),Ge({xPath:ie(t),x:t.scrollLeft,y:t.scrollTop,elementAttributes:{targetScrollWidth:t.scrollWidth,targetClientWidth:t.clientWidth,targetScrollHeight:t.scrollHeight,targetClientHeight:t.clientHeight}})},750),le=(te="left_click",e=>de(te,e));var te;const pe=e=>{e.button===2&&de("right_click",e)},ge=e=>{window.Sprig&&(window.Sprig.pointerDownTarget=e.target)},Oe=()=>{L||(window.addEventListener("click",le,I),window.addEventListener("pointerdown",ge,I),window.addEventListener("mousedown",pe,I),window.addEventListener("keydown",ce,I),window.addEventListener("scroll",ue,I),L=!0,window.performance.getEntriesByType("navigation").map(e=>e.type).includes("reload")&&je({url:window.location.href,currentPageTitle:document.title}),window.performance.getEntriesByType("navigation").map(e=>e.type).includes("back_forward")&&Ve({curUrl:window.location.href,fromUrl:document.referrer,currentPageTitle:document.title}))},p={isRecording:!1,scrollEventUuids:{},stopRecording:()=>{}},y=(()=>{const e=s.sessionStorageHelper.getItem("sprig.sessionId");if(e)return s.breadcrumbsLogger.info("SessionIDFound",{savedSessionId:e}),s.sessionStorageHelper.removeItem("sprig.sessionId"),e;const t=s.v4();return s.breadcrumbsLogger.info("GeneratedSessionID",{uuid:t}),t})(),K=()=>{s.sessionStorageHelper.setItem("sprig.disableReplayRecording","disabled")},v=()=>!!s.sessionStorageHelper.getItem("sprig.disableReplayRecording");window.addEventListener("beforeunload",()=>{s.breadcrumbsLogger.info("BeforeUnload",{sessionId:y}),s.sessionStorageHelper.setItem("sprig.sessionId",y)});const z=e=>e&&e.trim().substring(0,500).replace(/\s\s+/g," ").replace(/\r?\n|\r/g," ").substring(0,250),b=(e,t)=>{var r,n;if(!v()&&p.isRecording)try{(n=(r=window.rrwebRecord)==null?void 0:r.addCustomEvent)==null||n.call(r,e,t)}catch(a){T("Error recording custom event",a)}},Fe=e=>{var t;(t=e==null?void 0:e.elementAttributes)!=null&&t.text&&(e.elementAttributes.text=z(e.elementAttributes.text)),b("Sprig_Click",e)},je=e=>{b("Sprig_Refresh",e)},Ve=e=>{e.currentPageTitle&&(e.currentPageTitle=z(e.currentPageTitle)),b("Sprig_BackForward",e)},Ke=e=>{b("Sprig_Keystroke",e)},Ge=async e=>{const{x:t,xPath:r,y:n}=e,a=p.scrollEventUuids[r];if(a)return f(async()=>{var c,d,u,w;const o=await l.openDB(),i=await o.get("events",a);if(i!=null&&i.event){const g=JSON.parse(i.event),h=t>((d=(c=g.data)==null?void 0:c.payload)==null?void 0:d.x),m=n>((w=(u=g.data)==null?void 0:u.payload)==null?void 0:w.y);if(!h&&!m)return null;h&&(g.data.payload.x=t),m&&(g.data.payload.y=n),g.data.payload.elementAttributes=e.elementAttributes,i.event=JSON.stringify(g),await o.put("events",i)}else b("Sprig_Scroll",e)},"Error updating scroll event");b("Sprig_Scroll",e)},me=()=>{p.stopRecording&&(p.stopRecording(),p.stopRecording=void 0),p.isRecording=!1,["cleanupInterval","inactivityInterval","pendingCheckInterval"].forEach(e=>{p[e]&&(clearInterval(p[e]),p[e]=void 0)}),L&&(window.removeEventListener("click",le,I),window.removeEventListener("pointerdown",ge,I),window.removeEventListener("mousedown",pe,I),window.removeEventListener("keydown",ce,I),window.removeEventListener("scroll",ue,I),L=!1)},We=["did not allow mutations","called in an invalid security context"],$e=(e,t,{reportError:r=!0,extraInfo:n={}})=>{if(!v()&&t instanceof Error){if(K(),t.name==="VersionError")return s.breadcrumbsLogger.error("VersionErr",{message:e}),l.deleteDB();(a=>{if(!a)return!0;for(const o of We)if(a.toLowerCase().includes(o))return!1;return!0})(t==null?void 0:t.message)&&(r&&window.UserLeap.reportError(e,t,n),l.clearAll())}},T=(e,t,{reportError:r}={reportError:!0})=>{me(),s.breadcrumbsLogger.error("ReplayErr",{code:t.code,name:t.name}),$e(e,t,{reportError:r})},f=async(e,t)=>{try{await e()}catch(r){T(t,r)}};j("replayStorage").catch(console.error),j("sprig.replay").catch(console.error);const l=new class{openDB(){return function(e,t,{blocked:r,upgrade:n,blocking:a,terminated:o}={}){const i=indexedDB.open(e,t),c=D(i);return n&&(i.onupgradeneeded=d=>{n(D(i.result),d.oldVersion,d.newVersion,D(i.transaction),d)}),r&&(i.onblocked=d=>r(d.oldVersion,d.newVersion,d)),c.then(d=>{o&&(d.onclose=()=>o()),a&&(d.onversionchange=u=>a(u.oldVersion,u.newVersion,u))}).catch(()=>{}),c}("sprigReplay",1,{upgrade:(e,t,r)=>{if(r===0&&s.sessionStorageHelper.setItem("sprig.pendingCount","0"),!e.objectStoreNames.contains("events")){const n=e.createObjectStore("events",{keyPath:"uuid"});n.createIndex("sessionId","sessionId"),n.createIndex("timestamp","timestamp"),n.createIndex("[sessionId+timestamp]",["sessionId","timestamp"])}if(!e.objectStoreNames.contains("chunkUploads")){const n=e.createObjectStore("chunkUploads",{keyPath:"uuid"});n.createIndex("sessionId","sessionId"),n.createIndex("timestamp","timestamp"),n.createIndex("[sessionId+status]",["sessionId","status"]),n.createIndex("[uploadId+status]",["uploadId","status"]),n.createIndex("[sessionId+status+uploadId]",["sessionId","status","uploadId"])}if(!e.objectStoreNames.contains("pendingCaptures")){const n=e.createObjectStore("pendingCaptures",{keyPath:"uuid"});n.createIndex("sessionId","sessionId"),n.createIndex("timestamp","timestamp"),n.createIndex("[sessionId+targetTimestamp]",["sessionId","targetTimestamp"])}}})}deleteDB(){return j("sprigReplay").catch(console.error)}async bulkAdd(e,t){const r=(await this.openDB()).transaction(e,"readwrite");return Promise.all([...t.map(n=>r.store.add(n)),r.done])}async clearAll(){const e=(await this.openDB()).transaction(["events","chunkUploads","pendingCaptures"],"readwrite");return Promise.all([e.objectStore("events").clear(),e.objectStore("chunkUploads").clear(),e.objectStore("pendingCaptures").clear()])}async deleteBySessionId(e,t){const r=IDBKeyRange.only(t),n=(await this.openDB()).transaction(e,"readwrite"),a=n.store.index("sessionId");for await(const o of a.iterate(r))await o.delete();await n.done}async updatePartial(e,t,r){const n=(await this.openDB()).transaction(e,"readwrite"),a=await n.store.get(t);a&&await n.store.put({...a,...r}),await n.done}async deleteRowsBefore(e,t,r=()=>!0){const n=IDBKeyRange.upperBound(t,!0),a=(await this.openDB()).transaction(e,"readwrite"),o=a.store.index("timestamp");for await(const i of o.iterate(n))r(i.value)&&await i.delete();await a.done}async getEventsBetween(e,t=Date.now()){if(e>=t)return Promise.resolve([]);const r=IDBKeyRange.bound([y,e],[y,t],!1,!0);return(await this.openDB()).getAllFromIndex("events","[sessionId+timestamp]",r)}async updateEventsExpiredAt(e,t,r=30){const n=new Date,a=n.setMinutes(n.getMinutes()+(r??30)),o=(await this.openDB()).transaction("events","readwrite"),i=o.store.index("[sessionId+timestamp]"),c=IDBKeyRange.bound([y,e],[y,t],!1,!0);for await(const d of i.iterate(c))await d.update({...d.value,expiredAt:a});await o.done}async deleteChunkUploads(e,t){const r=IDBKeyRange.only([t,e]),n=(await this.openDB()).transaction("chunkUploads","readwrite");let o=await n.store.index("[uploadId+status]").openCursor(r);for(;o;)o.delete(),o=await o.continue();await n.done}async getChunkUploadsByStatus({sessionId:e,status:t,uploadId:r}){const n=(await this.openDB()).transaction("chunkUploads","readonly"),a=r?n.store.index("[uploadId+status]"):n.store.index("[sessionId+status]"),o=r?IDBKeyRange.only([r,t]):IDBKeyRange.only([e,t]);return a.getAll(o)}async getPendingCaptures(e={}){return(await(await this.openDB()).getAllFromIndex("pendingCaptures","sessionId",y)).filter(r=>!e.beforePresent||r.targetTimestamp<Date.now()).filter(r=>!e.isBeforeType||r.captureParams.replayParams.replayDurationType==="before").filter(r=>!e.isHeatmap||(r.captureParams.isHeatmap??!1))}async markPendingCaptureToCanUpload(e){const t=(await this.openDB()).transaction("pendingCaptures","readwrite"),r=t.store.index("sessionId");for await(const n of r.iterate(y)){const a=n.value;a.captureParams.responseGroupId===e&&await n.update({...a,canUpload:!0})}await t.done}async markPendingHeatmapsReady(e){if(parseInt(s.sessionStorageHelper.getItem("sprig.pendingCount")??"0")===0)return null;const t=Date.now(),r=(await this.openDB()).transaction("pendingCaptures","readwrite"),n=r.store.index("sessionId");for await(const a of n.iterate(y)){const o=a.value;!o.captureParams.isHeatmap||e&&!e.includes(o.uuid)||await a.update({...o,targetTimestamp:t,captureParams:{...o.captureParams,triggerTimestamp:t,replayParams:{...o.captureParams.replayParams,replayDurationSeconds:Math.floor((t-o.timestamp)/1e3)}}})}await r.done}},we=async(e,t)=>{const r=performance.now();let n;try{n=await e()}finally{const a=performance.now()-r;let o=s.PerformanceMetrics[t];o||(o=s.registerMetric(t)),o.report(a/1e3)}return n},ye=(e,t)=>{const r=performance.now();try{e()}finally{const n=performance.now()-r;let a=s.PerformanceMetrics[t];a||(a=s.registerMetric(t)),a.report(n/1e3)}};let fe=5e3,G=6e4,W=0,E,$=!1,q=[];const qe=e=>{var t,r,n,a;if((t=e.event)!=null&&t.includes("Sprig_Scroll")){const o=(a=(n=(r=JSON.parse(e.event))==null?void 0:r.data)==null?void 0:n.payload)==null?void 0:a.xPath;if(!o)return;p.scrollEventUuids[o]=e.uuid}q.push(e),$||ze()},ze=()=>{$=!0,setTimeout(async()=>{if(v())return;const e=q;q=[],$=!1,ye(async()=>{await(async t=>{const r=t.map(n=>({...n,sessionId:n.sessionId??y}));if(r.length!==0)return f(()=>l.bulkAdd("events",r),"Error storing replay events")})(e)},"sdk_replay_add_event_batch_seconds")},500)},Je=(e,t,r)=>{p.cleanupInterval=window.setInterval(()=>{const n=Date.now();we(()=>f(async()=>{v()||await Promise.all([l.deleteRowsBefore("events",n-1e3*e,a=>a.expiredAt===void 0||a.expiredAt<n-1e3*e),l.deleteRowsBefore("chunkUploads",n-1e3*t),l.deleteRowsBefore("pendingCaptures",n-1e3*r,a=>!a.canUpload)])},"Error deleting table rows"),"sdk_replay_cleanup_seconds"),s.breadcrumbsLogger.debug("CleanupComplete")},3e4)},Qe=()=>{p.pendingCheckInterval=window.setInterval(async()=>{f(async()=>{await he()},"Error initiating pending captures")},5e3)},he=async(e=!1)=>{const t=parseInt(E??"0");if(t===0)return;const r=await l.getPendingCaptures({beforePresent:!0,isBeforeType:e}),n=await l.openDB();await Promise.all(r.map(async a=>(await n.delete("pendingCaptures",a.uuid),ve(a.captureParams,a.canUpload)))),E=(t-r.length).toString(),s.sessionStorageHelper.setItem("sprig.pendingCount",E)},Xe=async(e,t,r,n,a)=>{const o=Math.min(e+a,r),i=await we(()=>l.getEventsBetween(e,o),"sdk_replay_get_events_between_seconds");if(!(i!=null&&i.length))return s.breadcrumbsLogger.debug("NoEventsFound"),{validStartFound:n,events:[]};if(!n){s.breadcrumbsLogger.debug("ValidStartSearch");let c=-1;return i==null||i.forEach((d,u)=>{if(!d.isValidStart)return;const w=d.timestamp<=t;(c<0||w)&&(c=u)}),c<0?(s.breadcrumbsLogger.debug("ValidStartNotFound"),{validStartFound:n,events:[]}):{validStartFound:!0,events:i==null?void 0:i.slice(c)}}return{validStartFound:n,events:i}},Ie=e=>Promise.all(e.map(async t=>{const r=await(async n=>ne.execute(async()=>{var i;s.breadcrumbsLogger.info("UploadChunkStart",{chunkIndex:n.chunkIndex,surveyId:n.surveyId});const a=await s.sprigFetch(n.uploadUrl,{body:n.data,method:"PUT"});s.breadcrumbsLogger.http("UploadChunkEnd",{url:n.uploadUrl,method:"PUT",status_code:a.status,reason:a.statusText??"OK",chunkIndex:n.chunkIndex,surveyId:n.surveyId});const o=(i=a.headers)==null?void 0:i.get("ETag");if(!o)throw new Error(`Upload response did not include etag for upload ${n.uploadId}, part ${n.chunkIndex}`);return o}))(t);return await l.updatePartial("chunkUploads",t.uuid,{data:null,etag:r,status:"UploadComplete"}),t.uploadId})),be=async e=>{const t=await l.getChunkUploadsByStatus({status:"UploadComplete",uploadId:e});if(!(t!=null&&t.length))return void s.breadcrumbsLogger.info("NoChunksForUpload",{uploadId:e});const r=t.reduce((o,i)=>(o.find(c=>c.chunkIndex===i.chunkIndex)||o.push(i),o),[]);r.sort((o,i)=>o.chunkIndex-i.chunkIndex);const n=r.map(o=>({ETag:o.etag,PartNumber:o.chunkIndex})).filter(o=>o.ETag!==null),a=r[0];await ae({apiUrl:a.apiUrl,surveyId:a.surveyId,uploadId:e,responseGroupUuid:a.responseGroupId,etags:n,headers:a.completeUploadHeaders,replayDuration:a.replayDuration}),await l.deleteChunkUploads("UploadComplete",e)},Ye=()=>{f(async()=>{const e=await l.getChunkUploadsByStatus({sessionId:y,status:"ReadyForUpload"});if(!(e!=null&&e.length))return;const t=await Ie(e);t!=null&&t.length&&await Promise.all(t.map(r=>{if(r)return be(r)}))},"Error uploading unfinished chunks")},Ze=async(e,t)=>{const r=t??Date.now();return(async(n,a)=>{const o=new TextEncoder;let i=null;const c=new CompressionStream("gzip"),d=c.writable.getWriter();let u=!1,w=!1,[g,h]=[0,0],m=[];for(let k=n-35e3;k<a;k+=G){if({validStartFound:w,events:m}=await Xe(k,n,a,w,G),!(m!=null&&m.length)){s.breadcrumbsLogger.debug("NoEventsFound");continue}g===0&&(g=m[0].timestamp),h=m[m.length-1].timestamp;const R=m.map(C=>C.event);R.push(`{"timestamp":${a}}`);const B=`${u?",":"["}${R}`,x=o.encode(B);ye(()=>{d.write(x)},"sdk_replay_compression_seconds"),u=!0}if(h-g<fe)return s.breadcrumbsLogger.debug("ReplayTooShort"),null;const S=o.encode("]");return d.write(S),d.close(),i=new Uint8Array(await new Response(c.readable).arrayBuffer()),i})(r-e,r)},re=async e=>{const{surveyId:t,responseGroupId:r,visitorId:n,apiUrl:a,completeUploadHeaders:o,replayParams:i,triggerTimestamp:c}=e,d=await Ze(1e3*i.replayDurationSeconds,c);if(!(d!=null&&d.length))return void s.breadcrumbsLogger.info("FileDataEmpty",{surveyId:t});const u=((g,h,m)=>{const S=g.length,k=1024*h*1024,R=Math.ceil(S/m),B=Math.max(k,R),x=[];let C=0;for(;C<S;)x.push(g.slice(C,C+B)),C+=B;return x})(d,i.minimumChunkSizeMb,i.signedUrls.length),w=await Promise.all(u.map(async(g,h)=>{const m=s.v4(),S={apiUrl:a,chunkIndex:h+1,completeUploadHeaders:o,etag:null,responseGroupId:r,status:"ReadyForUpload",surveyId:t,timestamp:c,totalChunks:u.length,data:g,uploadId:i.uploadId,uploadUrl:i.signedUrls[h].url,uuid:m,visitorId:n};return await(await l.openDB()).add("chunkUploads",{...S,sessionId:S.sessionId??y}),S}));await(async(g,h)=>{await Ie(h),await Promise.all(g.map(m=>be(m)))})([i.uploadId],w)},ve=async(e,t)=>{if(v())return s.breadcrumbsLogger.debug("ReplayDisabled-ScheduleOrCapture");const{isHeatmap:r,isStandalone:n,replayParams:a,triggerTimestamp:o,responseGroupId:i}=e,c=async()=>{setTimeout(()=>s.eventEmitter.removeListener(s.SprigEvent.QuestionAnswered,c),0),f(async()=>{a.replayDurationType==="before"?await re(e):await l.markPendingCaptureToCanUpload(i)},"Error in schedule/capture callback")};f(async()=>{if(a.replayDurationType==="after"||a.replayDurationType==="beforeAndAfter")return!n&&!r&&s.eventEmitter.on(s.SprigEvent.QuestionAnswered,c),void await De(e);if(n||r||t)await re(e),r&&et();else{const d=35+a.replayDurationSeconds,u=o-1e3*d,w=o;await l.updateEventsExpiredAt(u,w,a.expirationTimeLimitMinutes),s.eventEmitter.on(s.SprigEvent.QuestionAnswered,c)}},"Error in scheduling/capturing replay")},et=async()=>{parseInt(E??"0")||s.sessionStorageHelper.removeItem("sprig.isCapturingHeatmap"),s.sessionStorageHelper.getItem("sprig.teardownAfterCapture")&&(me(),Se(),s.sessionStorageHelper.removeItem("sprig.teardownAfterCapture"))},Se=async()=>v()?s.breadcrumbsLogger.debug("ReplayDisabled-ClearData"):Promise.all([l.deleteBySessionId("events",y),l.deleteBySessionId("pendingCaptures",y)]).catch(e=>{T("Error clearing user replay data",e)}),De=async e=>{if(v())return;const{isHeatmap:t,surveyId:r}=e,n=await l.getPendingCaptures(),a=n==null?void 0:n.filter(d=>d.captureParams.surveyId===r);if(a!=null&&a.length)return void s.breadcrumbsLogger.info("PendingCaptureExists",{surveyId:r});t&&(p.isRecording&&f(()=>{var d,u;return(u=(d=window.rrwebRecord)==null?void 0:d.takeFullSnapshot)==null?void 0:u.call(d,!0)},"Error recording full snapshot"),s.sessionStorageHelper.setItem("sprig.isCapturingHeatmap","true"),W=Date.now(),p.inactivityInterval||(p.inactivityInterval=window.setInterval(()=>{var d;d=W,Date.now()-d>=3e4&&f(()=>l.markPendingHeatmapsReady(),"Error in heatmap inactivity")},1e3)));const o={...e,replayParams:{...e.replayParams}};e.replayParams.replayDurationType==="beforeAndAfter"&&(o.replayParams.replayDurationSeconds*=2),o.replayParams.replayDurationType="before";const i=e.triggerTimestamp+1e3*e.replayParams.replayDurationSeconds;o.triggerTimestamp=i,E=(parseInt(E??"0")+1).toString(),s.sessionStorageHelper.setItem("sprig.pendingCount",E),await(await l.openDB()).add("pendingCaptures",{canUpload:!1,captureParams:o,sessionId:y,targetTimestamp:i,timestamp:Date.now(),uuid:s.v4()})},tt=Object.freeze(Object.defineProperty({__proto__:null,RecordEvent:e=>{b("Sprig_TrackEvent",e)},RecordPageView:e=>{e.description&&(e.description=z(e.description)),b("Sprig_PageView",e)},RecordSurveyShown:e=>{b("Sprig_ShowSurvey",e)},_completeSessionReplay:async({surveyId:e,responseGroupUuid:t,eventDigest:r,headers:n})=>{if(!e||!t)return!1;const a=window.UserLeap._API_URL,o=await ae({surveyId:e,responseGroupUuid:t,eventDigest:r,apiUrl:a,headers:n},!0);return!(o!=null&&o.error)},checkPendingHeatmapsUrl:()=>v()?s.breadcrumbsLogger.debug("ReplayDisabled-PendingHeatmaps"):f(async()=>{const e=(await l.getPendingCaptures({isHeatmap:!0})).map(t=>({eventId:t.captureParams.eventId,uuid:t.uuid})).filter(({eventId:t})=>!s.checkUrlStillMatching(t)).map(({uuid:t})=>t);s.breadcrumbsLogger.info("PendingHeatmapsToComplete",{count:e.length}),e.length&&(await l.markPendingHeatmapsReady(e),s.breadcrumbsLogger.info("MarkedPendingHeatmapsReady"))},"Error marking pending heatmaps ready"),clearUserReplayData:Se,disableRecording:T,initializeReplay:async({maxReplayDurationSeconds:e,maxInflightRequests:t=2,replaySettings:r,teardownAfter:n=!1})=>{if(E=s.sessionStorageHelper.getItem("sprig.pendingCount"),!p.isRecording){if(n&&s.sessionStorageHelper.setItem("sprig.teardownAfterCapture","true"),v())return s.breadcrumbsLogger.debug("ReplayDisabled");if(await(async()=>{var a;if(!window.indexedDB||!window.IDBKeyRange||!window.CompressionStream)return!0;if((a=window.navigator.storage)!=null&&a.estimate)try{const{quota:o=0,usage:i=0}=await window.navigator.storage.estimate(),c=(o-i)/1024**3;return s.breadcrumbsLogger.info("Storage",{availableGb:c}),c<.5}catch{return!0}return!1})())return s.breadcrumbsLogger.debug("IDBNotSupported"),K();try{const a=await l.openDB();s.breadcrumbsLogger.info("DBVersion",{version:a.version})}catch(a){return s.breadcrumbsLogger.error("ReplayOpenErr",{name:a.name}),a.name==="VersionError"&&l.deleteDB(),K()}if(f(async()=>{await he(!0)},"Error uploading ready pending captures"),!e)return s.breadcrumbsLogger.debug("MissingDuration");s.breadcrumbsLogger.debug("ReplayInit"),await f(async()=>{var a;if(r!=null&&r.minDuration&&(fe=r.minDuration),r!=null&&r.batchDuration&&(G=r.batchDuration),a=t,ne.setLimit(a),Ye(),Je(e+35,1800,e+35),Qe(),!window.rrwebRecord){const{record:d}=await import(window.UserLeap.replayLibraryURL??"https://cdn.sprig.com/dependencies/record-2.0.0-alpha.17.min.js");window.rrwebRecord=d}const o=window.rrwebRecord;if(!o)return s.breadcrumbsLogger.error("RecordScriptFailed");let i=!0,c=0;p.stopRecording=o({checkoutEveryNms:3e4,sampling:{input:"last",scroll:250,media:800},emit:(d,u)=>{if(d.type===P.Custom&&(W=Date.now()),v())return;if(u&&d.type===P.Meta)c=performance.now();else if(u&&c&&d.type===P.FullSnapshot){const g=performance.now()-c;s.reportAndRegister("sdk_replay_snapshot_seconds",g/1e3)}const w=i||!!u&&d.type===P.Meta;i=!1,qe({uuid:s.v4(),event:JSON.stringify(d),isValidStart:w,timestamp:Date.now()})},...r}),p.isRecording=!!p.stopRecording,p.isRecording&&(s.eventEmitter.on("survey.complete",d=>{var u;u={id:d,userAgent:window.navigator.userAgent},b("Sprig_SubmitSurvey",u)}),Oe())},"Error initializing replay")}},isReplayRecording:()=>p.isRecording,scheduleCapture:De,scheduleOrCaptureReplay:ve,tryReplayAction:f},Symbol.toStringTag,{value:"Module"}));s.registerReplay(tt);
1
+ "use strict";var Ee=Object.defineProperty;var ke=(e,t,r)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _=(e,t,r)=>(ke(e,typeof t!="symbol"?t+"":t,r),r);const s=require("./metricsReporter-CHOlWEKF.cjs");var P=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(P||{});const ne=new class{constructor(e){_(this,"awaitingResolvers",[]);_(this,"activeCount",0);this.capacity=e}async acquire(){if(!(this.activeCount<this.capacity))return new Promise(e=>{this.awaitingResolvers.push(e)});this.activeCount++}release(){const e=this.awaitingResolvers.shift();e&&this.activeCount<=this.capacity?e():this.activeCount--}async execute(e){try{return await this.acquire(),await e()}finally{this.release()}}setLimit(e){this.capacity=e}}(2),ae=async({apiUrl:e,surveyId:t,uploadId:r,etags:n,headers:a,responseGroupUuid:o,replayDuration:i,eventDigest:c},d=!1)=>{var w;if(!d&&!r&&!n)return void s.breadcrumbsLogger.error("UploadErr",{isMobile:d,uploadId:r,etags:n});s.breadcrumbsLogger.info("MarkUploadComplete",{surveyId:t});const u=await s.sprigFetch(`${e}/sdk/1/completeSessionReplay`,{method:"POST",body:JSON.stringify({etags:n,uploadId:r,responseGroupUuid:o,surveyId:t,replayDuration:i,eventDigest:c,userAgent:(w=window==null?void 0:window.navigator)==null?void 0:w.userAgent}),headers:a,shouldRetryRequest:!0});return s.breadcrumbsLogger.info("MarkUploadDone",{surveyId:t}),u},H=(e,t)=>t.some(r=>e instanceof r);let J,Q;const M=new WeakMap,A=new WeakMap,U=new WeakMap;let O={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return M.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return D(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&(t==="done"||t==="store")||t in e};function oe(e){O=e(O)}function Ce(e){return(Q||(Q=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(F(this),t),D(this.request)}:function(...t){return D(e.apply(F(this),t))}}function Pe(e){return typeof e=="function"?Ce(e):(e instanceof IDBTransaction&&function(t){if(M.has(t))return;const r=new Promise((n,a)=>{const o=()=>{a(t.error||new DOMException("AbortError","AbortError"))};t.oncomplete=()=>{n()},t.onerror=o,t.onabort=o});M.set(t,r)}(e),H(e,J||(J=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,O):e)}function D(e){if(e instanceof IDBRequest)return function(r){const n=new Promise((a,o)=>{r.onsuccess=()=>{a(D(r.result))},r.onerror=()=>{o(r.error)}});return U.set(n,r),n}(e);if(A.has(e))return A.get(e);const t=Pe(e);return t!==e&&(A.set(e,t),U.set(t,e)),t}const F=e=>U.get(e);function j(e,{blocked:t}={}){const r=indexedDB.deleteDatabase(e);return t&&(r.onblocked=n=>t(n.oldVersion,n)),D(r).then(()=>{})}const Re=["get","getKey","getAll","getAllKeys","count"],Be=["put","add","delete","clear"],N=new Map;function X(e,t){if(!(e instanceof IDBDatabase)||t in e||typeof t!="string")return;if(N.get(t))return N.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,a=Be.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!a&&!Re.includes(r))return;const o=async function(i,...c){const d=this.transaction(i,a?"readwrite":"readonly");let u=d.store;return n&&(u=u.index(c.shift())),(await Promise.all([u[r](...c),a&&d.done]))[0]};return N.set(t,o),o}oe(e=>({...e,get:(t,r,n)=>X(t,r)||e.get(t,r,n),has:(t,r)=>!!X(t,r)||e.has(t,r)}));const xe=["continue","continuePrimaryKey","advance"],Y={},V=new WeakMap,se=new WeakMap,Ue={get(e,t){if(!xe.includes(t))return e[t];let r=Y[t];return r||(r=Y[t]=function(...n){V.set(this,se.get(this)[t](...n))}),r}};async function*Le(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const r=new Proxy(t,Ue);for(se.set(r,t),U.set(r,F(t));t;)yield r,t=await(V.get(r)||t.continue()),V.delete(r)}function Z(e,t){return t===Symbol.asyncIterator&&H(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&H(e,[IDBIndex,IDBObjectStore])}oe(e=>({...e,get:(t,r,n)=>Z(t,r)?Le:e.get(t,r,n),has:(t,r)=>Z(t,r)||e.has(t,r)}));const Te=e=>{if(e instanceof Attr)return null;let t=1;for(let r=e.previousSibling;r;r=r.previousSibling)r.nodeName===e.nodeName&&++t;return t},ie=e=>{if(e===null)return"";const t=[];if(e instanceof Document)return"/";for(let r=e;r&&!(r instanceof Document)&&r!==null;r=r instanceof Attr?r.ownerElement:r.parentElement){const n=t[t.length]={name:void 0,position:null};switch(r.nodeType){case Node.TEXT_NODE:n.name="text()";break;case Node.ATTRIBUTE_NODE:n.name="@"+r.nodeName;break;case Node.PROCESSING_INSTRUCTION_NODE:n.name="processing-instruction()";break;case Node.COMMENT_NODE:n.name="comment()";break;case Node.ELEMENT_NODE:n.name=r.nodeName}n.position=Te(r)}return"/"+t.reverse().map(r=>r.position!==null?`/${r.name}[${r.position}]`:`/${r.name}`).join("")},I={capture:!0,passive:!0},_e=["a","button","input","option","li","link"],Ae=["Escape","Enter","Backspace","F5","Tab"];let L=!1;const Ne=["label","type","role","title","placeholder","errormessage","valuetext","href"],He="aria-",ee=e=>{var n;if(((n=e.tagName)==null?void 0:n.toLowerCase())==="html")return{element:"html"};const t=e.textContent,r=t?{text:t}:{};r.element=(a=>{if(!a.tagName)return"No tagName";const o=a.getAttribute("type");return o?`${o} ${a.tagName.toLowerCase()}`:a.tagName.toLowerCase()})(e);for(const a of e.attributes){let o=a.name;const i=a.value;o.startsWith(He)&&(o=o.substring(5)),Ne.includes(o)&&(r[o]=i)}return r},Me=e=>{var n;if(!e)return{};const t={...ee(e)},r=e.parentElement;if(r&&_e.includes((n=r.tagName)==null?void 0:n.toLowerCase())){const a=ee(r);Object.assign(t,a)}return t},de=(e,t)=>{var n;let r=t.target;t.target===((n=window.document)==null?void 0:n.body)&&window.Sprig.pointerDownTarget&&(r=window.Sprig.pointerDownTarget),Fe({x:t.x,y:t.y,type:e,elementAttributes:Me(r),windowHeight:window.innerHeight,windowWidth:window.innerWidth,...r instanceof HTMLElement?{rect:r==null?void 0:r.getBoundingClientRect(),xPath:ie(r)}:{}})},ce=e=>{Ae.includes(e.key)&&Ke({key:e.key})},ue=((e,t)=>{let r;return n=>{clearTimeout(r),r=window.setTimeout(()=>e(n),t)}})(e=>{if(!(e.target instanceof HTMLElement||e.target instanceof Document))return;let t=e.target;"scrollTop"in t||(t=t.documentElement),Ge({xPath:ie(t),x:t.scrollLeft,y:t.scrollTop,elementAttributes:{targetScrollWidth:t.scrollWidth,targetClientWidth:t.clientWidth,targetScrollHeight:t.scrollHeight,targetClientHeight:t.clientHeight}})},750),le=(te="left_click",e=>de(te,e));var te;const pe=e=>{e.button===2&&de("right_click",e)},ge=e=>{window.Sprig&&(window.Sprig.pointerDownTarget=e.target)},Oe=()=>{L||(window.addEventListener("click",le,I),window.addEventListener("pointerdown",ge,I),window.addEventListener("mousedown",pe,I),window.addEventListener("keydown",ce,I),window.addEventListener("scroll",ue,I),L=!0,window.performance.getEntriesByType("navigation").map(e=>e.type).includes("reload")&&je({url:window.location.href,currentPageTitle:document.title}),window.performance.getEntriesByType("navigation").map(e=>e.type).includes("back_forward")&&Ve({curUrl:window.location.href,fromUrl:document.referrer,currentPageTitle:document.title}))},p={isRecording:!1,scrollEventUuids:{},stopRecording:()=>{}},y=(()=>{const e=s.sessionStorageHelper.getItem("sprig.sessionId");if(e)return s.breadcrumbsLogger.info("SessionIDFound",{savedSessionId:e}),s.sessionStorageHelper.removeItem("sprig.sessionId"),e;const t=s.v4();return s.breadcrumbsLogger.info("GeneratedSessionID",{uuid:t}),t})(),K=()=>{s.sessionStorageHelper.setItem("sprig.disableReplayRecording","disabled")},v=()=>!!s.sessionStorageHelper.getItem("sprig.disableReplayRecording");window.addEventListener("beforeunload",()=>{s.breadcrumbsLogger.info("BeforeUnload",{sessionId:y}),s.sessionStorageHelper.setItem("sprig.sessionId",y)});const z=e=>e&&e.trim().substring(0,500).replace(/\s\s+/g," ").replace(/\r?\n|\r/g," ").substring(0,250),b=(e,t)=>{var r,n;if(!v()&&p.isRecording)try{(n=(r=window.rrwebRecord)==null?void 0:r.addCustomEvent)==null||n.call(r,e,t)}catch(a){T("Error recording custom event",a)}},Fe=e=>{var t;(t=e==null?void 0:e.elementAttributes)!=null&&t.text&&(e.elementAttributes.text=z(e.elementAttributes.text)),b("Sprig_Click",e)},je=e=>{b("Sprig_Refresh",e)},Ve=e=>{e.currentPageTitle&&(e.currentPageTitle=z(e.currentPageTitle)),b("Sprig_BackForward",e)},Ke=e=>{b("Sprig_Keystroke",e)},Ge=async e=>{const{x:t,xPath:r,y:n}=e,a=p.scrollEventUuids[r];if(a)return f(async()=>{var c,d,u,w;const o=await l.openDB(),i=await o.get("events",a);if(i!=null&&i.event){const g=JSON.parse(i.event),h=t>((d=(c=g.data)==null?void 0:c.payload)==null?void 0:d.x),m=n>((w=(u=g.data)==null?void 0:u.payload)==null?void 0:w.y);if(!h&&!m)return null;h&&(g.data.payload.x=t),m&&(g.data.payload.y=n),g.data.payload.elementAttributes=e.elementAttributes,i.event=JSON.stringify(g),await o.put("events",i)}else b("Sprig_Scroll",e)},"Error updating scroll event");b("Sprig_Scroll",e)},me=()=>{p.stopRecording&&(p.stopRecording(),p.stopRecording=void 0),p.isRecording=!1,["cleanupInterval","inactivityInterval","pendingCheckInterval"].forEach(e=>{p[e]&&(clearInterval(p[e]),p[e]=void 0)}),L&&(window.removeEventListener("click",le,I),window.removeEventListener("pointerdown",ge,I),window.removeEventListener("mousedown",pe,I),window.removeEventListener("keydown",ce,I),window.removeEventListener("scroll",ue,I),L=!1)},We=["did not allow mutations","called in an invalid security context"],$e=(e,t,{reportError:r=!0,extraInfo:n={}})=>{if(!v()&&t instanceof Error){if(K(),t.name==="VersionError")return s.breadcrumbsLogger.error("VersionErr",{message:e}),l.deleteDB();(a=>{if(!a)return!0;for(const o of We)if(a.toLowerCase().includes(o))return!1;return!0})(t==null?void 0:t.message)&&(r&&window.UserLeap.reportError(e,t,n),l.clearAll())}},T=(e,t,{reportError:r}={reportError:!0})=>{me(),s.breadcrumbsLogger.error("ReplayErr",{code:t.code,name:t.name}),$e(e,t,{reportError:r})},f=async(e,t)=>{try{await e()}catch(r){T(t,r)}};j("replayStorage").catch(console.error),j("sprig.replay").catch(console.error);const l=new class{openDB(){return function(e,t,{blocked:r,upgrade:n,blocking:a,terminated:o}={}){const i=indexedDB.open(e,t),c=D(i);return n&&(i.onupgradeneeded=d=>{n(D(i.result),d.oldVersion,d.newVersion,D(i.transaction),d)}),r&&(i.onblocked=d=>r(d.oldVersion,d.newVersion,d)),c.then(d=>{o&&(d.onclose=()=>o()),a&&(d.onversionchange=u=>a(u.oldVersion,u.newVersion,u))}).catch(()=>{}),c}("sprigReplay",1,{upgrade:(e,t,r)=>{if(r===0&&s.sessionStorageHelper.setItem("sprig.pendingCount","0"),!e.objectStoreNames.contains("events")){const n=e.createObjectStore("events",{keyPath:"uuid"});n.createIndex("sessionId","sessionId"),n.createIndex("timestamp","timestamp"),n.createIndex("[sessionId+timestamp]",["sessionId","timestamp"])}if(!e.objectStoreNames.contains("chunkUploads")){const n=e.createObjectStore("chunkUploads",{keyPath:"uuid"});n.createIndex("sessionId","sessionId"),n.createIndex("timestamp","timestamp"),n.createIndex("[sessionId+status]",["sessionId","status"]),n.createIndex("[uploadId+status]",["uploadId","status"]),n.createIndex("[sessionId+status+uploadId]",["sessionId","status","uploadId"])}if(!e.objectStoreNames.contains("pendingCaptures")){const n=e.createObjectStore("pendingCaptures",{keyPath:"uuid"});n.createIndex("sessionId","sessionId"),n.createIndex("timestamp","timestamp"),n.createIndex("[sessionId+targetTimestamp]",["sessionId","targetTimestamp"])}}})}deleteDB(){return j("sprigReplay").catch(console.error)}async bulkAdd(e,t){const r=(await this.openDB()).transaction(e,"readwrite");return Promise.all([...t.map(n=>r.store.add(n)),r.done])}async clearAll(){const e=(await this.openDB()).transaction(["events","chunkUploads","pendingCaptures"],"readwrite");return Promise.all([e.objectStore("events").clear(),e.objectStore("chunkUploads").clear(),e.objectStore("pendingCaptures").clear()])}async deleteBySessionId(e,t){const r=IDBKeyRange.only(t),n=(await this.openDB()).transaction(e,"readwrite"),a=n.store.index("sessionId");for await(const o of a.iterate(r))await o.delete();await n.done}async updatePartial(e,t,r){const n=(await this.openDB()).transaction(e,"readwrite"),a=await n.store.get(t);a&&await n.store.put({...a,...r}),await n.done}async deleteRowsBefore(e,t,r=()=>!0){const n=IDBKeyRange.upperBound(t,!0),a=(await this.openDB()).transaction(e,"readwrite"),o=a.store.index("timestamp");for await(const i of o.iterate(n))r(i.value)&&await i.delete();await a.done}async getEventsBetween(e,t=Date.now()){if(e>=t)return Promise.resolve([]);const r=IDBKeyRange.bound([y,e],[y,t],!1,!0);return(await this.openDB()).getAllFromIndex("events","[sessionId+timestamp]",r)}async updateEventsExpiredAt(e,t,r=30){const n=new Date,a=n.setMinutes(n.getMinutes()+(r??30)),o=(await this.openDB()).transaction("events","readwrite"),i=o.store.index("[sessionId+timestamp]"),c=IDBKeyRange.bound([y,e],[y,t],!1,!0);for await(const d of i.iterate(c))await d.update({...d.value,expiredAt:a});await o.done}async deleteChunkUploads(e,t){const r=IDBKeyRange.only([t,e]),n=(await this.openDB()).transaction("chunkUploads","readwrite");let o=await n.store.index("[uploadId+status]").openCursor(r);for(;o;)o.delete(),o=await o.continue();await n.done}async getChunkUploadsByStatus({sessionId:e,status:t,uploadId:r}){const n=(await this.openDB()).transaction("chunkUploads","readonly"),a=r?n.store.index("[uploadId+status]"):n.store.index("[sessionId+status]"),o=r?IDBKeyRange.only([r,t]):IDBKeyRange.only([e,t]);return a.getAll(o)}async getPendingCaptures(e={}){return(await(await this.openDB()).getAllFromIndex("pendingCaptures","sessionId",y)).filter(r=>!e.beforePresent||r.targetTimestamp<Date.now()).filter(r=>!e.isBeforeType||r.captureParams.replayParams.replayDurationType==="before").filter(r=>!e.isHeatmap||(r.captureParams.isHeatmap??!1))}async markPendingCaptureToCanUpload(e){const t=(await this.openDB()).transaction("pendingCaptures","readwrite"),r=t.store.index("sessionId");for await(const n of r.iterate(y)){const a=n.value;a.captureParams.responseGroupId===e&&await n.update({...a,canUpload:!0})}await t.done}async markPendingHeatmapsReady(e){if(parseInt(s.sessionStorageHelper.getItem("sprig.pendingCount")??"0")===0)return null;const t=Date.now(),r=(await this.openDB()).transaction("pendingCaptures","readwrite"),n=r.store.index("sessionId");for await(const a of n.iterate(y)){const o=a.value;!o.captureParams.isHeatmap||e&&!e.includes(o.uuid)||await a.update({...o,targetTimestamp:t,captureParams:{...o.captureParams,triggerTimestamp:t,replayParams:{...o.captureParams.replayParams,replayDurationSeconds:Math.floor((t-o.timestamp)/1e3)}}})}await r.done}},we=async(e,t)=>{const r=performance.now();let n;try{n=await e()}finally{const a=performance.now()-r;let o=s.PerformanceMetrics[t];o||(o=s.registerMetric(t)),o.report(a/1e3)}return n},ye=(e,t)=>{const r=performance.now();try{e()}finally{const n=performance.now()-r;let a=s.PerformanceMetrics[t];a||(a=s.registerMetric(t)),a.report(n/1e3)}};let fe=5e3,G=6e4,W=0,E,$=!1,q=[];const qe=e=>{var t,r,n,a;if((t=e.event)!=null&&t.includes("Sprig_Scroll")){const o=(a=(n=(r=JSON.parse(e.event))==null?void 0:r.data)==null?void 0:n.payload)==null?void 0:a.xPath;if(!o)return;p.scrollEventUuids[o]=e.uuid}q.push(e),$||ze()},ze=()=>{$=!0,setTimeout(async()=>{if(v())return;const e=q;q=[],$=!1,ye(async()=>{await(async t=>{const r=t.map(n=>({...n,sessionId:n.sessionId??y}));if(r.length!==0)return f(()=>l.bulkAdd("events",r),"Error storing replay events")})(e)},"sdk_replay_add_event_batch_seconds")},500)},Je=(e,t,r)=>{p.cleanupInterval=window.setInterval(()=>{const n=Date.now();we(()=>f(async()=>{v()||await Promise.all([l.deleteRowsBefore("events",n-1e3*e,a=>a.expiredAt===void 0||a.expiredAt<n-1e3*e),l.deleteRowsBefore("chunkUploads",n-1e3*t),l.deleteRowsBefore("pendingCaptures",n-1e3*r,a=>!a.canUpload)])},"Error deleting table rows"),"sdk_replay_cleanup_seconds"),s.breadcrumbsLogger.debug("CleanupComplete")},3e4)},Qe=()=>{p.pendingCheckInterval=window.setInterval(async()=>{f(async()=>{await he()},"Error initiating pending captures")},5e3)},he=async(e=!1)=>{const t=parseInt(E??"0");if(t===0)return;const r=await l.getPendingCaptures({beforePresent:!0,isBeforeType:e}),n=await l.openDB();await Promise.all(r.map(async a=>(await n.delete("pendingCaptures",a.uuid),ve(a.captureParams,a.canUpload)))),E=(t-r.length).toString(),s.sessionStorageHelper.setItem("sprig.pendingCount",E)},Xe=async(e,t,r,n,a)=>{const o=Math.min(e+a,r),i=await we(()=>l.getEventsBetween(e,o),"sdk_replay_get_events_between_seconds");if(!(i!=null&&i.length))return s.breadcrumbsLogger.debug("NoEventsFound"),{validStartFound:n,events:[]};if(!n){s.breadcrumbsLogger.debug("ValidStartSearch");let c=-1;return i==null||i.forEach((d,u)=>{if(!d.isValidStart)return;const w=d.timestamp<=t;(c<0||w)&&(c=u)}),c<0?(s.breadcrumbsLogger.debug("ValidStartNotFound"),{validStartFound:n,events:[]}):{validStartFound:!0,events:i==null?void 0:i.slice(c)}}return{validStartFound:n,events:i}},Ie=e=>Promise.all(e.map(async t=>{const r=await(async n=>ne.execute(async()=>{var i;s.breadcrumbsLogger.info("UploadChunkStart",{chunkIndex:n.chunkIndex,surveyId:n.surveyId});const a=await s.sprigFetch(n.uploadUrl,{body:n.data,method:"PUT"});s.breadcrumbsLogger.http("UploadChunkEnd",{url:n.uploadUrl,method:"PUT",status_code:a.status,reason:a.statusText??"OK",chunkIndex:n.chunkIndex,surveyId:n.surveyId});const o=(i=a.headers)==null?void 0:i.get("ETag");if(!o)throw new Error(`Upload response did not include etag for upload ${n.uploadId}, part ${n.chunkIndex}`);return o}))(t);return await l.updatePartial("chunkUploads",t.uuid,{data:null,etag:r,status:"UploadComplete"}),t.uploadId})),be=async e=>{const t=await l.getChunkUploadsByStatus({status:"UploadComplete",uploadId:e});if(!(t!=null&&t.length))return void s.breadcrumbsLogger.info("NoChunksForUpload",{uploadId:e});const r=t.reduce((o,i)=>(o.find(c=>c.chunkIndex===i.chunkIndex)||o.push(i),o),[]);r.sort((o,i)=>o.chunkIndex-i.chunkIndex);const n=r.map(o=>({ETag:o.etag,PartNumber:o.chunkIndex})).filter(o=>o.ETag!==null),a=r[0];await ae({apiUrl:a.apiUrl,surveyId:a.surveyId,uploadId:e,responseGroupUuid:a.responseGroupId,etags:n,headers:a.completeUploadHeaders,replayDuration:a.replayDuration}),await l.deleteChunkUploads("UploadComplete",e)},Ye=()=>{f(async()=>{const e=await l.getChunkUploadsByStatus({sessionId:y,status:"ReadyForUpload"});if(!(e!=null&&e.length))return;const t=await Ie(e);t!=null&&t.length&&await Promise.all(t.map(r=>{if(r)return be(r)}))},"Error uploading unfinished chunks")},Ze=async(e,t)=>{const r=t??Date.now();return(async(n,a)=>{const o=new TextEncoder;let i=null;const c=new CompressionStream("gzip"),d=c.writable.getWriter();let u=!1,w=!1,[g,h]=[0,0],m=[];for(let k=n-35e3;k<a;k+=G){if({validStartFound:w,events:m}=await Xe(k,n,a,w,G),!(m!=null&&m.length)){s.breadcrumbsLogger.debug("NoEventsFound");continue}g===0&&(g=m[0].timestamp),h=m[m.length-1].timestamp;const R=m.map(C=>C.event);R.push(`{"timestamp":${a}}`);const B=`${u?",":"["}${R}`,x=o.encode(B);ye(()=>{d.write(x)},"sdk_replay_compression_seconds"),u=!0}if(h-g<fe)return s.breadcrumbsLogger.debug("ReplayTooShort"),null;const S=o.encode("]");return d.write(S),d.close(),i=new Uint8Array(await new Response(c.readable).arrayBuffer()),i})(r-e,r)},re=async e=>{const{surveyId:t,responseGroupId:r,visitorId:n,apiUrl:a,completeUploadHeaders:o,replayParams:i,triggerTimestamp:c}=e,d=await Ze(1e3*i.replayDurationSeconds,c);if(!(d!=null&&d.length))return void s.breadcrumbsLogger.info("FileDataEmpty",{surveyId:t});const u=((g,h,m)=>{const S=g.length,k=1024*h*1024,R=Math.ceil(S/m),B=Math.max(k,R),x=[];let C=0;for(;C<S;)x.push(g.slice(C,C+B)),C+=B;return x})(d,i.minimumChunkSizeMb,i.signedUrls.length),w=await Promise.all(u.map(async(g,h)=>{const m=s.v4(),S={apiUrl:a,chunkIndex:h+1,completeUploadHeaders:o,etag:null,responseGroupId:r,status:"ReadyForUpload",surveyId:t,timestamp:c,totalChunks:u.length,data:g,uploadId:i.uploadId,uploadUrl:i.signedUrls[h].url,uuid:m,visitorId:n};return await(await l.openDB()).add("chunkUploads",{...S,sessionId:S.sessionId??y}),S}));await(async(g,h)=>{await Ie(h),await Promise.all(g.map(m=>be(m)))})([i.uploadId],w)},ve=async(e,t)=>{if(v())return s.breadcrumbsLogger.debug("ReplayDisabled-ScheduleOrCapture");const{isHeatmap:r,isStandalone:n,replayParams:a,triggerTimestamp:o,responseGroupId:i}=e,c=async()=>{setTimeout(()=>s.eventEmitter.removeListener(s.SprigEvent.QuestionAnswered,c),0),f(async()=>{a.replayDurationType==="before"?await re(e):await l.markPendingCaptureToCanUpload(i)},"Error in schedule/capture callback")};f(async()=>{if(a.replayDurationType==="after"||a.replayDurationType==="beforeAndAfter")return!n&&!r&&s.eventEmitter.on(s.SprigEvent.QuestionAnswered,c),void await De(e);if(n||r||t)await re(e),r&&et();else{const d=35+a.replayDurationSeconds,u=o-1e3*d,w=o;await l.updateEventsExpiredAt(u,w,a.expirationTimeLimitMinutes),s.eventEmitter.on(s.SprigEvent.QuestionAnswered,c)}},"Error in scheduling/capturing replay")},et=async()=>{parseInt(E??"0")||s.sessionStorageHelper.removeItem("sprig.isCapturingHeatmap"),s.sessionStorageHelper.getItem("sprig.teardownAfterCapture")&&(me(),Se(),s.sessionStorageHelper.removeItem("sprig.teardownAfterCapture"))},Se=async()=>v()?s.breadcrumbsLogger.debug("ReplayDisabled-ClearData"):Promise.all([l.deleteBySessionId("events",y),l.deleteBySessionId("pendingCaptures",y)]).catch(e=>{T("Error clearing user replay data",e)}),De=async e=>{if(v())return;const{isHeatmap:t,surveyId:r}=e,n=await l.getPendingCaptures(),a=n==null?void 0:n.filter(d=>d.captureParams.surveyId===r);if(a!=null&&a.length)return void s.breadcrumbsLogger.info("PendingCaptureExists",{surveyId:r});t&&(p.isRecording&&f(()=>{var d,u;return(u=(d=window.rrwebRecord)==null?void 0:d.takeFullSnapshot)==null?void 0:u.call(d,!0)},"Error recording full snapshot"),s.sessionStorageHelper.setItem("sprig.isCapturingHeatmap","true"),W=Date.now(),p.inactivityInterval||(p.inactivityInterval=window.setInterval(()=>{var d;d=W,Date.now()-d>=3e4&&f(()=>l.markPendingHeatmapsReady(),"Error in heatmap inactivity")},1e3)));const o={...e,replayParams:{...e.replayParams}};e.replayParams.replayDurationType==="beforeAndAfter"&&(o.replayParams.replayDurationSeconds*=2),o.replayParams.replayDurationType="before";const i=e.triggerTimestamp+1e3*e.replayParams.replayDurationSeconds;o.triggerTimestamp=i,E=(parseInt(E??"0")+1).toString(),s.sessionStorageHelper.setItem("sprig.pendingCount",E),await(await l.openDB()).add("pendingCaptures",{canUpload:!1,captureParams:o,sessionId:y,targetTimestamp:i,timestamp:Date.now(),uuid:s.v4()})},tt=Object.freeze(Object.defineProperty({__proto__:null,RecordEvent:e=>{b("Sprig_TrackEvent",e)},RecordPageView:e=>{e.description&&(e.description=z(e.description)),b("Sprig_PageView",e)},RecordSurveyShown:e=>{b("Sprig_ShowSurvey",e)},_completeSessionReplay:async({surveyId:e,responseGroupUuid:t,eventDigest:r,headers:n})=>{if(!e||!t)return!1;const a=window.UserLeap._API_URL,o=await ae({surveyId:e,responseGroupUuid:t,eventDigest:r,apiUrl:a,headers:n},!0);return!(o!=null&&o.error)},checkPendingHeatmapsUrl:()=>v()?s.breadcrumbsLogger.debug("ReplayDisabled-PendingHeatmaps"):f(async()=>{const e=(await l.getPendingCaptures({isHeatmap:!0})).map(t=>({eventId:t.captureParams.eventId,uuid:t.uuid})).filter(({eventId:t})=>!s.checkUrlStillMatching(t)).map(({uuid:t})=>t);s.breadcrumbsLogger.info("PendingHeatmapsToComplete",{count:e.length}),e.length&&(await l.markPendingHeatmapsReady(e),s.breadcrumbsLogger.info("MarkedPendingHeatmapsReady"))},"Error marking pending heatmaps ready"),clearUserReplayData:Se,disableRecording:T,initializeReplay:async({maxReplayDurationSeconds:e,maxInflightRequests:t=2,replaySettings:r,teardownAfter:n=!1})=>{if(E=s.sessionStorageHelper.getItem("sprig.pendingCount"),!p.isRecording){if(n&&s.sessionStorageHelper.setItem("sprig.teardownAfterCapture","true"),v())return s.breadcrumbsLogger.debug("ReplayDisabled");if(await(async()=>{var a;if(!window.indexedDB||!window.IDBKeyRange||!window.CompressionStream)return!0;if((a=window.navigator.storage)!=null&&a.estimate)try{const{quota:o=0,usage:i=0}=await window.navigator.storage.estimate(),c=(o-i)/1024**3;return s.breadcrumbsLogger.info("Storage",{availableGb:c}),c<.5}catch{return!0}return!1})())return s.breadcrumbsLogger.debug("IDBNotSupported"),K();try{const a=await l.openDB();s.breadcrumbsLogger.info("DBVersion",{version:a.version})}catch(a){return s.breadcrumbsLogger.error("ReplayOpenErr",{name:a.name}),a.name==="VersionError"&&l.deleteDB(),K()}if(f(async()=>{await he(!0)},"Error uploading ready pending captures"),!e)return s.breadcrumbsLogger.debug("MissingDuration");s.breadcrumbsLogger.debug("ReplayInit"),await f(async()=>{var a;if(r!=null&&r.minDuration&&(fe=r.minDuration),r!=null&&r.batchDuration&&(G=r.batchDuration),a=t,ne.setLimit(a),Ye(),Je(e+35,1800,e+35),Qe(),!window.rrwebRecord){const{record:d}=await import(window.UserLeap.replayLibraryURL??"https://cdn.sprig.com/dependencies/record-2.0.0-alpha.17.min.js");window.rrwebRecord=d}const o=window.rrwebRecord;if(!o)return s.breadcrumbsLogger.error("RecordScriptFailed");let i=!0,c=0;p.stopRecording=o({checkoutEveryNms:3e4,sampling:{input:"last",scroll:250,media:800},emit:(d,u)=>{if(d.type===P.Custom&&(W=Date.now()),v())return;if(u&&d.type===P.Meta)c=performance.now();else if(u&&c&&d.type===P.FullSnapshot){const g=performance.now()-c;s.reportAndRegister("sdk_replay_snapshot_seconds",g/1e3)}const w=i||!!u&&d.type===P.Meta;i=!1,qe({uuid:s.v4(),event:JSON.stringify(d),isValidStart:w,timestamp:Date.now()})},...r}),p.isRecording=!!p.stopRecording,p.isRecording&&(s.eventEmitter.on("survey.complete",d=>{var u;u={id:d,userAgent:window.navigator.userAgent},b("Sprig_SubmitSurvey",u)}),Oe())},"Error initializing replay")}},isReplayRecording:()=>p.isRecording,scheduleCapture:De,scheduleOrCaptureReplay:ve,tryReplayAction:f},Symbol.toStringTag,{value:"Module"}));s.registerReplay(tt);
package/dist/replay.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var Ue = Object.defineProperty;
2
2
  var Te = (e, t, n) => t in e ? Ue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var M = (e, t, n) => (Te(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import { b as u, s as ie, a as f, v as N, c as _e, P as de, r as ce, d as Ae, e as T, S as O, f as Ne } from "./metricsReporter-Gimz6xcf.js";
4
+ import { b as u, s as ie, a as f, v as N, c as _e, P as de, r as ce, d as Ae, e as T, S as O, f as Ne } from "./metricsReporter-Dh_342TQ.js";
5
5
  var R = ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom", e[e.Plugin = 6] = "Plugin", e))(R || {});
6
6
  const ue = new class {
7
7
  constructor(e) {
@@ -1,5 +1,5 @@
1
- import { C as Ht, A as Se, a as Gr, D as Kr, i as Yr, E as Qr, b as De, d as Ct, r as Jr, e as At } from "./core-DsBuStDe.js";
2
- import { b as Xr, D as Bt, e as Be, h as We, S as ve, s as ht, v as mt } from "./metricsReporter-Gimz6xcf.js";
1
+ import { C as Ht, A as Se, a as Gr, D as Kr, i as Yr, E as Qr, b as De, d as Ct, r as Jr, e as At } from "./core-DX7Qkopv.js";
2
+ import { b as Xr, D as Bt, e as Be, h as We, S as ve, s as ht, v as mt } from "./metricsReporter-Dh_342TQ.js";
3
3
  var Le, D, Rn, xe, qt, Nn, gt, Mn, Me = {}, Ln = [], eo = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Ze = Array.isArray;
4
4
  function ue(e, t) {
5
5
  for (var n in t)
@@ -2821,7 +2821,7 @@ const Oi = ({ mode: e = null, viewWindow: t, viewDocument: n, trackPageViewUrl:
2821
2821
  })(e.cards, !!o);
2822
2822
  Fe.configure(m, { cards: f, hasEndCard: !!o, apiURL: r, UpChunk: u }), B.setState({ apiURL: r, answers: n, border: e.border, index: e.startingQuestionIdx || 0, cards: f, configureExitOnOverlayClick: e.configureExitOnOverlayClick, customMetadata: e.customMetadata, endCard: e.endCard, envId: e.envId, eventEmitFn: i, fontFamily: e.fontFamily, forceBrandedLogo: e.forceBrandedLogo, frame: d, headers: e.headers, hasViewedEmbed: !1, isPreview: e.isPreview, marketingUrl: "https://sprig.com", meta: Oi({ mode: e.mode, viewWindow: h, viewDocument: p, trackPageViewUrl: e.trackPageViewUrl }), mode: e.mode, previewKey: l, previewMode: e.previewMode, productConfig: e.productConfig, recorder: Fe, recorderEventEmitter: m, responseGroupUid: e.responseGroupUid, showStripes: e.showStripes, showSurveyBrand: e.showSurveyBrand, slugName: e.slugName, styleNonce: e.styleNonce, studyType: e.studyType, surveyId: e.surveyId, tabTitle: e.tabTitle, uploadingCardViewed: !1, uploadProgress: {}, useMobileStyling: e.useMobileStyling, useDesktopPrototype: e.useDesktopPrototype, userId: e.userId, viewDocument: e.viewDocument, visitorAttributes: e.visitorAttributes, viewedCardCount: e.startingQuestionIdx || 0 });
2823
2823
  const { head: b } = p;
2824
- if (At({ document: p, elementId: "sprig-style", styleString: 'html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;min-width:200px;min-height:0;justify-content:center}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026;margin:15px}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.sprig-container{display:flex;flex-direction:column;width:100%;height:fit-content;flex:1 1 auto;min-height:0;justify-content:center}.ul-card__container{background:#fff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;padding:0;min-height:0;position:relative;text-align:center;word-break:break-word;overflow:auto}.ul-card__container--desktop_feedbackButton{box-shadow:unset}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:center;align-self:stretch}.sprig-question-footer-container{align-items:center;width:100%;height:fit-content;display:flex;flex-direction:column;padding:12px 20px 0}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#343442;text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email,.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;z-index:2;height:fit-content}.sprig-border-bottom{border-bottom:1px solid rgba(0,0,0,.1)}.sprig-border-top{border-top:1px solid rgba(0,0,0,.1)}.question-header-container{z-index:1}.sprig-header-container{padding:16px}.question-header-button-container{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;height:fit-content}.ul-card--thanks-content .question-header-button-container{justify-content:center}.sprig-question-body{padding:0 20px;min-height:0;flex-shrink:1;overflow:auto;position:relative;align-self:stretch;width:100%}.sprig-stretch{align-self:stretch}.ul-question{color:#343442;display:block;font-size:17px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-question ol,.ul-question ul,.ul-caption ol,.ul-caption ul{margin-left:1em}.ul-caption{flex:1 0 auto;font-size:14px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start;margin-top:4px}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.select-checkbox{height:16px;width:16px;display:flex;box-sizing:border-box;background-color:"transparent";align-items:center;justify-content:center;border-radius:4px;border:1px solid #b0b5b7;flex-shrink:0}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.footer{width:100%;margin-top:12px;font-size:12px;line-height:12px;color:#000000b3}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{align-self:center;box-shadow:unset;border-radius:unset;border:none!important;position:unset;width:100%}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center;align-self:stretch}.sprig-accordion{width:100%;margin-bottom:8px}.sprig-accordion-body{width:100%;overflow:hidden}.sprig-accordion-header-container{background:transparent;border:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;cursor:pointer;margin:8px 0 0;padding:0;font-family:inherit}.sprig-header-label-container{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;flex:1 1 0}.sprig-header-label{color:#343442;font-size:15px;font-weight:590;line-height:21px;text-align:start;overflow:hidden}.sprig-check-background{flex:0 0 16px;height:16px;width:16px;border-radius:8px;margin-right:8px;background-color:#efefee;display:flex;align-items:center;justify-content:center}.sprig-check{height:9px;width:9px;margin-left:-1px}.sprig-check path{stroke:#506067;stroke-width:1.5}.sprig-caret{height:20px;width:20px;transition-property:transform}.sprig-caret path{stroke:#000}.ul-consent-legal__name-input--mobile{border:2px solid #e6e6e6}.ul-consent-legal__name-input--desktop{border:1px solid #e6e6e6}.ul-consent-legal__name-input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:#6c6c6e80}.ul-consent-legal__name-input:focus{outline:none;background:#fff}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:#00000003}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:#0000000d}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.ul-card--likert__numbers>button{padding:unset}.likert-number--mobile{border:2px solid #e6e6e6}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid #e6e6e6}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;font-size:18px;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley>svg{margin:0 auto}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card--matrix_grid{display:grid;grid-template-columns:max-content repeat(var(--numColumns),minmax(107px,1fr));grid-template-rows:repeat(var(--numRows),min-content);margin:0 auto;row-gap:4px;width:max-content}.ul-matrix-row-options{display:grid;grid-column:2/-1;grid-template-columns:subgrid}.ul-matrix-column-label{font-size:15px;max-width:150px;padding:10px 12px;text-align:center}.ul-card--matrix_container{margin-bottom:16px;overflow:auto}.ul-card--matrix_question_container{display:flex;flex-direction:column}.ul-matrix-scroll-gradient{-webkit-mask-image:linear-gradient(90deg,#000 90%,transparent);mask-image:linear-gradient(90deg,#000 90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl){-webkit-mask-image:linear-gradient(270deg,#000,90%,transparent);mask-image:linear-gradient(270deg,#000,90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl)+.ul-matrix-scroll-arrow{rotate:180deg}.ul-matrix-scroll-arrow{align-self:flex-end;background:none;border:none;color:#000;padding:0;position:absolute;top:45%}.ul-matrix-scroll-arrow:hover{cursor:pointer}.ul-matrix-option-wrapper{align-items:center;background:#f9f9f8;display:flex;justify-content:center;padding:10px 12px}.ul-matrix-last-option{border-start-end-radius:4px;border-end-end-radius:4px}.ul-matrix-row-label{align-items:center;background:#f9f9f8;border-end-start-radius:4px;border-start-start-radius:4px;display:flex;font-size:15px;left:0;right:0;max-width:200px;min-width:100px;padding:10px 12px;position:sticky}.ul-matrix-option-selected{border:6px solid var(--border);box-shadow:none}.ul-card__matrix{max-width:100%}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid #e6e6e6}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid #e6e6e6}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px;padding:unset}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-text{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:#fff}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:-webkit-fill-available}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#fff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:15px;justify-content:center;flex-direction:column}.select-button{align-items:center;background-color:transparent;border-radius:8px;border:1px solid #0b2330;box-shadow:0 0 0 2px #c8cccc;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:#f3f3f3}.select-button:active{background-color:#eee}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;padding:4px 0;z-index:100;background-color:#fff;border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:16px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:#f3f3f3}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:repeating-linear-gradient(120deg,#ebebeb,#ebebeb 24px,#fff 24px,#fff 48px);border-bottom:2px solid #ebebeb;display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;left:0;position:absolute;top:0;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;margin-top:auto;flex-grow:0;width:100%;min-height:10px;height:fit-content;flex-shrink:0}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:#00000003;border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:#00000008}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:#f9c600;border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%;height:0}.close-btn{cursor:pointer;height:16px;margin-inline-end:-10px;position:relative;top:-10px;width:16px;z-index:1;align-self:flex-start;flex-shrink:0}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}#ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px;max-width:250px;margin:16px 0}#ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{align-self:stretch;background:#00000003;border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:0;height:fit-content;line-height:16.5px;margin:0 20px;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}' }), e.customStyles && At({ document: p, elementId: "ul-custom-style", styleString: e.customStyles, nonce: e.styleNonce }), e.fontFamily && s && parent) {
2824
+ if (At({ document: p, elementId: "sprig-style", styleString: 'html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;min-width:200px;min-height:0;justify-content:center}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026;margin:15px}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.sprig-container{display:flex;flex-direction:column;width:100%;height:fit-content;flex:1 1 auto;min-height:0;justify-content:center}.ul-card__container{background:#fff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;padding:0;min-height:0;position:relative;text-align:center;word-break:break-word;overflow:auto}.ul-card__container--desktop_feedbackButton{box-shadow:unset}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:center;align-self:stretch}.sprig-question-footer-container{align-items:center;width:100%;height:fit-content;display:flex;flex-direction:column;padding:12px 20px 0}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#343442;text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email,.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;z-index:2;height:fit-content}.sprig-border-bottom{border-bottom:1px solid rgba(0,0,0,.1)}.sprig-border-top{border-top:1px solid rgba(0,0,0,.1)}.question-header-container{z-index:1}.sprig-header-container{padding:16px}.question-header-button-container{display:grid;grid-template-columns:97fr 3fr;align-items:center;justify-content:space-between;width:100%;height:fit-content}.ul-card--thanks-content .question-header-button-container{justify-content:center}.sprig-question-body{padding:0 20px;min-height:0;flex-shrink:1;overflow:auto;position:relative;align-self:stretch;width:100%}.sprig-stretch{align-self:stretch}.ul-question{color:#343442;display:block;font-size:17px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-question ol,.ul-question ul,.ul-caption ol,.ul-caption ul{margin-left:1em}.ul-caption{flex:1 0 auto;font-size:14px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start;margin-top:4px}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.select-checkbox{height:16px;width:16px;display:flex;box-sizing:border-box;background-color:"transparent";align-items:center;justify-content:center;border-radius:4px;border:1px solid #b0b5b7;flex-shrink:0}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.footer{width:100%;margin-top:12px;font-size:12px;line-height:12px;color:#000000b3}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{align-self:center;box-shadow:unset;border-radius:unset;border:none!important;position:unset;width:100%}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center;align-self:stretch}.sprig-accordion{width:100%;margin-bottom:8px}.sprig-accordion-body{width:100%;overflow:hidden}.sprig-accordion-header-container{background:transparent;border:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;cursor:pointer;margin:8px 0 0;padding:0;font-family:inherit}.sprig-header-label-container{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;flex:1 1 0}.sprig-header-label{color:#343442;font-size:15px;font-weight:590;line-height:21px;text-align:start;overflow:hidden}.sprig-check-background{flex:0 0 16px;height:16px;width:16px;border-radius:8px;margin-right:8px;background-color:#efefee;display:flex;align-items:center;justify-content:center}.sprig-check{height:9px;width:9px;margin-left:-1px}.sprig-check path{stroke:#506067;stroke-width:1.5}.sprig-caret{height:20px;width:20px;transition-property:transform}.sprig-caret path{stroke:#000}.ul-consent-legal__name-input--mobile{border:2px solid #e6e6e6}.ul-consent-legal__name-input--desktop{border:1px solid #e6e6e6}.ul-consent-legal__name-input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:#6c6c6e80}.ul-consent-legal__name-input:focus{outline:none;background:#fff}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:#00000003}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:#0000000d}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.ul-card--likert__numbers>button{padding:unset}.likert-number--mobile{border:2px solid #e6e6e6}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid #e6e6e6}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;font-size:18px;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley>svg{margin:0 auto}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card--matrix_grid{display:grid;grid-template-columns:max-content repeat(var(--numColumns),minmax(107px,1fr));grid-template-rows:repeat(var(--numRows),min-content);margin:0 auto;row-gap:4px;width:max-content}.ul-matrix-row-options{display:grid;grid-column:2/-1;grid-template-columns:subgrid}.ul-matrix-column-label{font-size:15px;max-width:150px;padding:10px 12px;text-align:center}.ul-card--matrix_container{margin-bottom:16px;overflow:auto}.ul-card--matrix_question_container{display:flex;flex-direction:column}.ul-matrix-scroll-gradient{-webkit-mask-image:linear-gradient(90deg,#000 90%,transparent);mask-image:linear-gradient(90deg,#000 90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl){-webkit-mask-image:linear-gradient(270deg,#000,90%,transparent);mask-image:linear-gradient(270deg,#000,90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl)+.ul-matrix-scroll-arrow{rotate:180deg}.ul-matrix-scroll-arrow{align-self:flex-end;background:none;border:none;color:#000;padding:0;position:absolute;top:45%}.ul-matrix-scroll-arrow:hover{cursor:pointer}.ul-matrix-option-wrapper{align-items:center;background:#f9f9f8;display:flex;justify-content:center;padding:10px 12px}.ul-matrix-last-option{border-start-end-radius:4px;border-end-end-radius:4px}.ul-matrix-row-label{align-items:center;background:#f9f9f8;border-end-start-radius:4px;border-start-start-radius:4px;display:flex;font-size:15px;left:0;right:0;max-width:200px;min-width:100px;padding:10px 12px;position:sticky}.ul-matrix-option-selected{border:6px solid var(--border);box-shadow:none}.ul-card__matrix{max-width:100%}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid #e6e6e6}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid #e6e6e6}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px;padding:unset}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-text{margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-direction:column;justify-content:center;padding:0}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:#fff}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:-webkit-fill-available}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#fff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:15px;justify-content:center;flex-direction:column}.select-button{align-items:center;background-color:transparent;border-radius:8px;border:1px solid #0b2330;box-shadow:0 0 0 2px #c8cccc;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:#f3f3f3}.select-button:active{background-color:#eee}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;padding:4px 0;z-index:100;background-color:#fff;border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:16px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:#f3f3f3}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:repeating-linear-gradient(120deg,#ebebeb,#ebebeb 24px,#fff 24px,#fff 48px);border-bottom:2px solid #ebebeb;display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;margin-top:auto;flex-grow:0;width:100%;min-height:10px;height:fit-content;flex-shrink:0}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:#00000003;border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:#00000008}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:#f9c600;border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%;height:0}.close-btn{cursor:pointer;height:16px;margin-inline-end:-10px;position:relative;top:-10px;width:16px;z-index:1;align-self:flex-start;justify-self:end;flex-shrink:0}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}#ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px;max-width:250px;margin:16px 0}#ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{align-self:stretch;background:#00000003;border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:0;height:fit-content;line-height:16.5px;margin:0 20px;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}' }), e.customStyles && At({ document: p, elementId: "ul-custom-style", styleString: e.customStyles, nonce: e.styleNonce }), e.fontFamily && s && parent) {
2825
2825
  const x = p.createElement("link");
2826
2826
  x.rel = "stylesheet", x.href = s, b.appendChild(x);
2827
2827
  }
@@ -2834,7 +2834,7 @@ const Oi = ({ mode: e = null, viewWindow: t, viewDocument: n, trackPageViewUrl:
2834
2834
  }, b.appendChild(x);
2835
2835
  }
2836
2836
  const _ = i || ((y = d.eventEmitter) == null ? void 0 : y.emit);
2837
- _ == null || _("verify.view.version", { "view.version": "2.32.3" }), c && t && Ie(a(Mi, {}), c);
2837
+ _ == null || _("verify.view.version", { "view.version": "2.32.4" }), c && t && Ie(a(Mi, {}), c);
2838
2838
  } };
2839
2839
  export {
2840
2840
  Ai as default
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("./core-gTCnh_sk.cjs"),F=require("./metricsReporter-D4pafvTR.cjs");var Me,D,wn,ke,Pt,Cn,ct,En,Le={},Sn=[],Ar=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Fe=Array.isArray;function he(e,t){for(var n in t)e[n]=t[n];return e}function jn(e){var t=e.parentNode;t&&t.removeChild(e)}function z(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Me.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return De(e,s,r,o,null)}function De(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++wn,__i:-1,__u:0};return o==null&&D.vnode!=null&&D.vnode(i),i}function In(){return{current:null}}function Q(e){return e.children}function se(e,t){this.props=e,this.context=t}function je(e,t){if(t==null)return e.__?je(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?je(e):null}function Tn(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Tn(e)}}function ut(e){(!e.__d&&(e.__d=!0)&&ke.push(e)&&!$e.__r++||Pt!==D.debounceRendering)&&((Pt=D.debounceRendering)||Cn)($e)}function $e(){var e,t,n,r,o,i,s,d,l;for(ke.sort(ct);e=ke.shift();)e.__d&&(t=ke.length,r=void 0,i=(o=(n=e).__v).__e,d=[],l=[],(s=n.__P)&&((r=he({},o)).__v=o.__v+1,D.vnode&&D.vnode(r),bt(s,r,o,n.__n,s.ownerSVGElement!==void 0,32&o.__u?[i]:null,d,i??je(o),!!(32&o.__u),l),r.__.__k[r.__i]=r,Dn(d,r,l),r.__e!=i&&Tn(r)),ke.length>t&&ke.sort(ct));$e.__r=0}function Lt(e,t,n,r,o,i,s,d,l,p,h){var c,u,m,v,b,_=r&&r.__k||Sn,y=t.length;for(n.__d=l,function(x,T,S){var w,k,j,R,g,f=T.length,E=S.length,I=E,O=0;for(x.__k=[],w=0;w<f;w++)(k=x.__k[w]=(k=T[w])==null||typeof k=="boolean"||typeof k=="function"?null:typeof k=="string"||typeof k=="number"||typeof k=="bigint"||k.constructor==String?De(null,k,null,null,k):Fe(k)?De(Q,{children:k},null,null,null):k.constructor===void 0&&k.__b>0?De(k.type,k.props,k.key,k.ref?k.ref:null,k.__v):k)!=null?(k.__=x,k.__b=x.__b+1,g=Br(k,S,R=w+O,I),k.__i=g,j=null,g!==-1&&(I--,(j=S[g])&&(j.__u|=131072)),j==null||j.__v===null?(g==-1&&O--,typeof k.type!="function"&&(k.__u|=65536)):g!==R&&(g===R+1?O++:g>R?I>f-R?O+=g-R:O--:O=g<R&&g==R-1?g-R:0,g!==w+O&&(k.__u|=65536))):(j=S[w])&&j.key==null&&j.__e&&(j.__e==x.__d&&(x.__d=je(j)),pt(j,j,!1),S[w]=null,I--);if(I)for(w=0;w<E;w++)(j=S[w])!=null&&!(131072&j.__u)&&(j.__e==x.__d&&(x.__d=je(j)),pt(j,j))}(n,t,_),l=n.__d,c=0;c<y;c++)(m=n.__k[c])!=null&&typeof m!="boolean"&&typeof m!="function"&&(u=m.__i===-1?Le:_[m.__i]||Le,m.__i=c,bt(e,m,u,o,i,s,d,l,p,h),v=m.__e,m.ref&&u.ref!=m.ref&&(u.ref&&yt(u.ref,null,m),h.push(m.ref,m.__c||v,m)),b==null&&v!=null&&(b=v),65536&m.__u||u.__k===m.__k?l=Rn(m,l,e):typeof m.type=="function"&&m.__d!==void 0?l=m.__d:v&&(l=v.nextSibling),m.__d=void 0,m.__u&=-196609);n.__d=l,n.__e=b}function Rn(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Rn(r[o],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function me(e,t){return t=t||[],e==null||typeof e=="boolean"||(Fe(e)?e.some(function(n){me(n,t)}):t.push(e)),t}function Br(e,t,n,r){var o=e.key,i=e.type,s=n-1,d=n+1,l=t[n];if(l===null||l&&o==l.key&&i===l.type)return n;if(r>(l==null||131072&l.__u?0:1))for(;s>=0||d<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&o==l.key&&i===l.type)return s;s--}if(d<t.length){if((l=t[d])&&!(131072&l.__u)&&o==l.key&&i===l.type)return d;d++}}return-1}function Mt(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Ar.test(t)?n:n+"px"}function He(e,t,n,r,o){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Mt(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Mt(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,i?Ot:Nt,i)):e.removeEventListener(t,i?Ot:Nt,i);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function Nt(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(D.event?D.event(e):e)}function Ot(e){return this.l[e.type+!0](D.event?D.event(e):e)}function bt(e,t,n,r,o,i,s,d,l,p){var h,c,u,m,v,b,_,y,x,T,S,w,k,j,R,g=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),i=[d=t.__e=n.__e]),(h=D.__b)&&h(t);e:if(typeof g=="function")try{if(y=t.props,x=(h=g.contextType)&&r[h.__c],T=h?x?x.props.value:h.__:r,n.__c?_=(c=t.__c=n.__c).__=c.__E:("prototype"in g&&g.prototype.render?t.__c=c=new g(y,T):(t.__c=c=new se(y,T),c.constructor=g,c.render=qr),x&&x.sub(c),c.props=y,c.state||(c.state={}),c.context=T,c.__n=r,u=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),g.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=he({},c.__s)),he(c.__s,g.getDerivedStateFromProps(y,c.__s))),m=c.props,v=c.state,c.__v=t,u)g.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(g.getDerivedStateFromProps==null&&y!==m&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(y,T),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(y,c.__s,T)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(c.props=y,c.state=c.__s,c.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(f){f&&(f.__=t)}),S=0;S<c._sb.length;S++)c.__h.push(c._sb[S]);c._sb=[],c.__h.length&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(y,c.__s,T),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(m,v,b)})}if(c.context=T,c.props=y,c.__P=e,c.__e=!1,w=D.__r,k=0,"prototype"in g&&g.prototype.render){for(c.state=c.__s,c.__d=!1,w&&w(t),h=c.render(c.props,c.state,c.context),j=0;j<c._sb.length;j++)c.__h.push(c._sb[j]);c._sb=[]}else do c.__d=!1,w&&w(t),h=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++k<25);c.state=c.__s,c.getChildContext!=null&&(r=he(he({},r),c.getChildContext())),u||c.getSnapshotBeforeUpdate==null||(b=c.getSnapshotBeforeUpdate(m,v)),Lt(e,Fe(R=h!=null&&h.type===Q&&h.key==null?h.props.children:h)?R:[R],t,n,r,o,i,s,d,l,p),c.base=t.__e,t.__u&=-161,c.__h.length&&s.push(c),_&&(c.__E=c.__=null)}catch(f){t.__v=null,l||i!=null?(t.__e=d,t.__u|=l?160:32,i[i.indexOf(d)]=null):(t.__e=n.__e,t.__k=n.__k),D.__e(f,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(f,E,I,O,C,M,A,H,q){var P,G,J,ce,W,X,ye,re=I.props,ue=E.props,oe=E.type;if(oe==="svg"&&(C=!0),M!=null){for(P=0;P<M.length;P++)if((W=M[P])&&"setAttribute"in W==!!oe&&(oe?W.localName===oe:W.nodeType===3)){f=W,M[P]=null;break}}if(f==null){if(oe===null)return document.createTextNode(ue);f=C?document.createElementNS("http://www.w3.org/2000/svg",oe):document.createElement(oe,ue.is&&ue),M=null,H=!1}if(oe===null)re===ue||H&&f.data===ue||(f.data=ue);else{if(M=M&&Me.call(f.childNodes),re=I.props||Le,!H&&M!=null)for(re={},P=0;P<f.attributes.length;P++)re[(W=f.attributes[P]).name]=W.value;for(P in re)W=re[P],P=="children"||(P=="dangerouslySetInnerHTML"?J=W:P==="key"||P in ue||He(f,P,null,W,C));for(P in ue)W=ue[P],P=="children"?ce=W:P=="dangerouslySetInnerHTML"?G=W:P=="value"?X=W:P=="checked"?ye=W:P==="key"||H&&typeof W!="function"||re[P]===W||He(f,P,W,re[P],C);if(G)H||J&&(G.__html===J.__html||G.__html===f.innerHTML)||(f.innerHTML=G.__html),E.__k=[];else if(J&&(f.innerHTML=""),Lt(f,Fe(ce)?ce:[ce],E,I,O,C&&oe!=="foreignObject",M,A,M?M[0]:I.__k&&je(I,0),H,q),M!=null)for(P=M.length;P--;)M[P]!=null&&jn(M[P]);H||(P="value",X!==void 0&&(X!==f[P]||oe==="progress"&&!X||oe==="option"&&X!==re[P])&&He(f,P,X,re[P],!1),P="checked",ye!==void 0&&ye!==f[P]&&He(f,P,ye,re[P],!1))}return f}(n.__e,t,n,r,o,i,s,l,p);(h=D.diffed)&&h(t)}function Dn(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)yt(n[r],n[++r],n[++r]);D.__c&&D.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){D.__e(i,o.__v)}})}function yt(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){D.__e(r,n)}}function pt(e,t,n){var r,o;if(D.unmount&&D.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||yt(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){D.__e(i,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&pt(r[o],t,n||typeof e.type!="function");n||e.__e==null||jn(e.__e),e.__=e.__e=e.__d=void 0}function qr(e,t,n){return this.constructor(e,n)}function Ie(e,t,n){var r,o,i,s;D.__&&D.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],bt(t,e=(!r&&n||t).__k=z(Q,null,[e]),o||Le,Le,t.ownerSVGElement!==void 0,!r&&n?[n]:o?null:t.firstChild?Me.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),Dn(i,e,s)}function Pn(e,t){Ie(e,t,Pn)}function Vr(e,t,n){var r,o,i,s,d=he({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:d[i]=t[i]===void 0&&s!==void 0?s[i]:t[i];return arguments.length>2&&(d.children=arguments.length>3?Me.call(arguments,2):n),De(e.type,d,r||e.key,o||e.ref,null)}function Ln(e,t){var n={__c:t="__cC"+En++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&o.some(function(d){d.__e=!0,ut(d)})},this.sub=function(s){o.push(s);var d=s.componentWillUnmount;s.componentWillUnmount=function(){o.splice(o.indexOf(s),1),d&&d.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Me=Sn.slice,D={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(d){e=d}throw e}},wn=0,se.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=he({},this.state),typeof e=="function"&&(e=e(he({},n),this.props)),e&&he(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),ut(this))},se.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ut(this))},se.prototype.render=Q,ke=[],Cn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ct=function(e,t){return e.__v.__b-t.__v.__b},$e.__r=0,En=0;var ge,V,et,Ut,Te=0,Mn=[],Ae=[],Ht=D.__b,At=D.__r,Bt=D.diffed,qt=D.__c,Vt=D.unmount;function Ce(e,t){D.__h&&D.__h(V,e,Te||t),Te=0;var n=V.__H||(V.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Ae}),n.__[e]}function $(e){return Te=1,xt(Hn,e)}function xt(e,t,n){var r=Ce(ge++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Hn(void 0,t),function(d){var l=r.__N?r.__N[0]:r.__[0],p=r.t(l,d);l!==p&&(r.__N=[p,r.__[1]],r.__c.setState({}))}],r.__c=V,!V.u)){var o=function(d,l,p){if(!r.__c.__H)return!0;var h=r.__c.__H.__.filter(function(u){return u.__c});if(h.every(function(u){return!u.__N}))return!i||i.call(this,d,l,p);var c=!1;return h.forEach(function(u){if(u.__N){var m=u.__[0];u.__=u.__N,u.__N=void 0,m!==u.__[0]&&(c=!0)}}),!(!c&&r.__c.props===d)&&(!i||i.call(this,d,l,p))};V.u=!0;var i=V.shouldComponentUpdate,s=V.componentWillUpdate;V.componentWillUpdate=function(d,l,p){if(this.__e){var h=i;i=void 0,o(d,l,p),i=h}s&&s.call(this,d,l,p)},V.shouldComponentUpdate=o}return r.__N||r.__}function Y(e,t){var n=Ce(ge++,3);!D.__s&&wt(n.__H,t)&&(n.__=e,n.i=t,V.__H.__h.push(n))}function Ne(e,t){var n=Ce(ge++,4);!D.__s&&wt(n.__H,t)&&(n.__=e,n.i=t,V.__h.push(n))}function ne(e){return Te=5,Oe(function(){return{current:e}},[])}function Nn(e,t,n){Te=6,Ne(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function Oe(e,t){var n=Ce(ge++,7);return wt(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function We(e,t){return Te=8,Oe(function(){return e},t)}function On(e){var t=V.context[e.__c],n=Ce(ge++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(V)),t.props.value):e.__}function kt(e,t){D.useDebugValue&&D.useDebugValue(t?t(e):e)}function Un(){var e=Ce(ge++,11);if(!e.__){for(var t=V.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function zr(){for(var e;e=Mn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Be),e.__H.__h.forEach(ht),e.__H.__h=[]}catch(t){e.__H.__h=[],D.__e(t,e.__v)}}D.__b=function(e){V=null,Ht&&Ht(e)},D.__r=function(e){At&&At(e),ge=0;var t=(V=e.__c).__H;t&&(et===V?(t.__h=[],V.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Ae,n.__N=n.i=void 0})):(t.__h.forEach(Be),t.__h.forEach(ht),t.__h=[],ge=0)),et=V},D.diffed=function(e){Bt&&Bt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Mn.push(t)!==1&&Ut===D.requestAnimationFrame||((Ut=D.requestAnimationFrame)||Fr)(zr)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Ae&&(n.__=n.__V),n.i=void 0,n.__V=Ae})),et=V=null},D.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Be),n.__h=n.__h.filter(function(r){return!r.__||ht(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],D.__e(r,n.__v)}}),qt&&qt(e,t)},D.unmount=function(e){Vt&&Vt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Be(r)}catch(o){t=o}}),n.__H=void 0,t&&D.__e(t,n.__v))};var zt=typeof requestAnimationFrame=="function";function Fr(e){var t,n=function(){clearTimeout(r),zt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);zt&&(t=requestAnimationFrame(n))}function Be(e){var t=V,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),V=t}function ht(e){var t=V;e.__c=e.__(),V=t}function wt(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Hn(e,t){return typeof t=="function"?t(e):t}function An(e,t){for(var n in t)e[n]=t[n];return e}function mt(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Ze(e){this.props=e}function Bn(e,t){function n(o){var i=this.props.ref,s=i==o.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!s:mt(this.props,o)}function r(o){return this.shouldComponentUpdate=n,z(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Ze.prototype=new se).isPureReactComponent=!0,Ze.prototype.shouldComponentUpdate=function(e,t){return mt(this.props,e)||mt(this.state,t)};var Ft=D.__b;D.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ft&&Ft(e)};var $r=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ct(e){function t(n){var r=An({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=$r,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var $t=function(e,t){return e==null?null:me(me(e).map(t))},qn={map:$t,forEach:$t,count:function(e){return e?me(e).length:0},only:function(e){var t=me(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:me},Wr=D.__e;D.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}Wr(e,t,n,r)};var Wt=D.unmount;function Vn(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=An({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Vn(r,t,n)})),e}function zn(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return zn(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Pe(){this.__u=0,this.t=null,this.__b=null}function Fn(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function $n(e){var t,n,r;function o(i){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return z(n,i)}return o.displayName="Lazy",o.__f=!0,o}function Se(){this.u=null,this.o=null}D.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Wt&&Wt(e)},(Pe.prototype=new se).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=Fn(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(d):d())};n.__R=s;var d=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=zn(l,l.__c.__P,l.__c.__O)}var p;for(r.setState({__a:r.__b=null});p=r.t.pop();)p.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Pe.prototype.componentWillUnmount=function(){this.t=[]},Pe.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Vn(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&z(Q,null,e.fallback);return o&&(o.__u&=-33),[z(Q,null,t.__a?null:e.children),o]};var Zt=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Zr(e){return this.getChildContext=function(){return e.context},e.children}function Gr(e){var t=this,n=e.i;t.componentWillUnmount=function(){Ie(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,o){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),Ie(z(Zr,{context:t.context},e.__v),t.l)}function Wn(e,t){var n=z(Gr,{__v:e,i:t});return n.containerInfo=t,n}(Se.prototype=new se).__a=function(e){var t=this,n=Fn(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Zt(t,e,r)):o()};n?n(i):i()}},Se.prototype.render=function(e){this.u=null,this.o=new Map;var t=me(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Se.prototype.componentDidUpdate=Se.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Zt(e,n,t)})};var Zn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Kr=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Yr=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Qr=/[A-Z0-9]/g,Jr=typeof document<"u",Xr=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Gn(e,t,n){return t.__k==null&&(t.textContent=""),Ie(e,t),typeof n=="function"&&n(),e?e.__c:null}function Kn(e,t,n){return Pn(e,t),typeof n=="function"&&n(),e?e.__c:null}se.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(se.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Gt=D.event;function eo(){}function to(){return this.cancelBubble}function no(){return this.defaultPrevented}D.event=function(e){return Gt&&(e=Gt(e)),e.persist=eo,e.isPropagationStopped=to,e.isDefaultPrevented=no,e.nativeEvent=e};var Et,ro={enumerable:!1,configurable:!0,get:function(){return this.class}},Kt=D.vnode;D.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={};for(var i in n){var s=n[i];if(!(i==="value"&&"defaultValue"in n&&s==null||Jr&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var d=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":d==="ondoubleclick"?i="ondblclick":d!=="onchange"||r!=="input"&&r!=="textarea"||Xr(n.type)?d==="onfocus"?i="onfocusin":d==="onblur"?i="onfocusout":Yr.test(i)?i=d:r.indexOf("-")===-1&&Kr.test(i)?i=i.replace(Qr,"-$&").toLowerCase():s===null&&(s=void 0):d=i="oninput",d==="oninput"&&o[i=d]&&(i="oninputCapture"),o[i]=s}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=me(n.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=me(n.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",ro)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=Zn,Kt&&Kt(e)};var Yt=D.__r;D.__r=function(e){Yt&&Yt(e),Et=e.__c};var Qt=D.diffed;D.diffed=function(e){Qt&&Qt(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Et=null};var Yn={ReactCurrentDispatcher:{current:{readContext:function(e){return Et.__n[e.__c].props.value}}}};function Qn(e){return z.bind(null,e)}function Ue(e){return!!e&&e.$$typeof===Zn}function Jn(e){return Ue(e)&&e.type===Q}function Xn(e){return Ue(e)?Vr.apply(null,arguments):e}function er(e){return!!e.__k&&(Ie(null,e),!0)}function tr(e){return e&&(e.base||e.nodeType===1&&e)||null}var nr=function(e,t){return e(t)},rr=function(e,t){return e(t)},or=Q;function St(e){e()}function ir(e){return e}function sr(){return[!1,St]}var ar=Ne,lr=Ue;function dr(e,t){var n=t(),r=$({h:{__:n,v:t}}),o=r[0].h,i=r[1];return Ne(function(){o.__=n,o.v=t,tt(o)&&i({h:o})},[e,n,t]),Y(function(){return tt(o)&&i({h:o}),e(function(){tt(o)&&i({h:o})})},[e]),n}function tt(e){var t,n,r=e.v,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var oo={useState:$,useId:Un,useReducer:xt,useEffect:Y,useLayoutEffect:Ne,useInsertionEffect:ar,useTransition:sr,useDeferredValue:ir,useSyncExternalStore:dr,startTransition:St,useRef:ne,useImperativeHandle:Nn,useMemo:Oe,useCallback:We,useContext:On,useDebugValue:kt,version:"17.0.2",Children:qn,render:Gn,hydrate:Kn,unmountComponentAtNode:er,createPortal:Wn,createElement:z,createContext:Ln,createFactory:Qn,cloneElement:Xn,createRef:In,Fragment:Q,isValidElement:Ue,isElement:lr,isFragment:Jn,findDOMNode:tr,Component:se,PureComponent:Ze,memo:Bn,forwardRef:Ct,flushSync:rr,unstable_batchedUpdates:nr,StrictMode:or,Suspense:Pe,SuspenseList:Se,lazy:$n,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Yn};const io=Object.freeze(Object.defineProperty({__proto__:null,Children:qn,Component:se,Fragment:Q,PureComponent:Ze,StrictMode:or,Suspense:Pe,SuspenseList:Se,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Yn,cloneElement:Xn,createContext:Ln,createElement:z,createFactory:Qn,createPortal:Wn,createRef:In,default:oo,findDOMNode:tr,flushSync:rr,forwardRef:Ct,hydrate:Kn,isElement:lr,isFragment:Jn,isValidElement:Ue,lazy:$n,memo:Bn,render:Gn,startTransition:St,unmountComponentAtNode:er,unstable_batchedUpdates:nr,useCallback:We,useContext:On,useDebugValue:kt,useDeferredValue:ir,useEffect:Y,useErrorBoundary:function(e){var t=Ce(ge++,10),n=$();return t.__=e,V.componentDidCatch||(V.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]},useId:Un,useImperativeHandle:Nn,useInsertionEffect:ar,useLayoutEffect:Ne,useMemo:Oe,useReducer:xt,useRef:ne,useState:$,useSyncExternalStore:dr,useTransition:sr,version:"17.0.2"},Symbol.toStringTag,{value:"Module"})),Jt=e=>{let t;const n=new Set,r=(s,d)=>{const l=typeof s=="function"?s(t):s;if(!Object.is(l,t)){const p=t;t=d??typeof l!="object"?l:Object.assign({},t,l),n.forEach(h=>h(t,p))}},o=()=>t,i={setState:r,getState:o,subscribe:s=>(n.add(s),()=>n.delete(s)),destroy:()=>n.clear()};return t=e(r,o,i),i};function so(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ao(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var cr={exports:{}},Xt={};const ur=ao(io);var pr={exports:{}},en={},Re=ur,lo=typeof Object.is=="function"?Object.is:function(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t},co=Re.useState,uo=Re.useEffect,po=Re.useLayoutEffect,ho=Re.useDebugValue;function nt(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!lo(e,n)}catch{return!0}}var mo=typeof window>"u"||window.document===void 0||window.document.createElement===void 0?function(e,t){return t()}:function(e,t){var n=t(),r=co({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return po(function(){o.value=n,o.getSnapshot=t,nt(o)&&i({inst:o})},[e,n,t]),uo(function(){return nt(o)&&i({inst:o}),e(function(){nt(o)&&i({inst:o})})},[e]),ho(n),n};en.useSyncExternalStore=Re.useSyncExternalStore!==void 0?Re.useSyncExternalStore:mo,pr.exports=en;var Ye=ur,go=pr.exports,vo=typeof Object.is=="function"?Object.is:function(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t},fo=go.useSyncExternalStore,_o=Ye.useRef,bo=Ye.useEffect,yo=Ye.useMemo,xo=Ye.useDebugValue;Xt.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=_o(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=yo(function(){function l(m){if(!c){if(c=!0,p=m,m=r(m),o!==void 0&&s.hasValue){var v=s.value;if(o(v,m))return h=v}return h=m}if(v=h,vo(p,m))return v;var b=r(m);return o!==void 0&&o(v,b)?v:(p=m,h=b)}var p,h,c=!1,u=n===void 0?null:n;return[function(){return l(t())},u===null?void 0:function(){return l(u())}]},[t,n,r,o]);var d=fo(e,i[0],i[1]);return bo(function(){s.hasValue=!0,s.value=d},[d]),xo(d),d},cr.exports=Xt;const ko=so(cr.exports),{useSyncExternalStoreWithSelector:wo}=ko,tn=e=>{const t=typeof e=="function"?(r=>r?Jt(r):Jt)(e):e,n=(r,o)=>function(i,s=i.getState,d){const l=wo(i.subscribe,i.getState,i.getServerState||i.getState,s,d);return kt(l),l}(t,r,o);return Object.assign(n,t),n},hr=e=>e?tn(e):tn,Co=1,Eo=2,jt={eq:(e,t)=>e==t,neq(e,t){return!this.eq(e,t)},gt:(e,t)=>e>t,gte:(e,t)=>e>=t,lt:(e,t)=>e<t,lte:(e,t)=>e<=t,list_exact:(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&e.slice().sort().join(",")===t.slice().sort().join(","),list_all:(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&!t.some(n=>e.indexOf(n)===-1),list_alo(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],r=new Set(n);return t.some(o=>r.has(o))},list_dni(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],r=new Set(n);return t.every(o=>!r.has(o))},contains(e,t){const n=e.toLowerCase(),r=t.toLowerCase();return n.includes(r)},notcontains(e,t){return!this.contains(e,t)}},So=(e,t,n)=>{switch(t){case"videovoice":return!!(e&&e.value);case"open":return!!n;case"multipleselect":return!!(n&&Object.keys(n).length);case"recordedtask":return(n==null?void 0:n.taskStatus)==="completed";case"texturlprompt":return!e.value;case"consentlegal":case"nps":case"likert":return n!==null;case"multiplechoice":return n!==void 0;case"matrix":return!!(n&&Object.values(n).every(r=>r!==null));default:return!0}},mr=(e,t)=>{if(t==="matrix"){const n=Object.keys(e).length,r=Object.values(e).filter(o=>o!==null).length;return r>0&&r<n}return!1},gr=({cards:e,index:t,hasEndCard:n,allResponses:r,uploadProgress:o={}})=>{if(t>=e.length||t<0)return null;const i=e[t];let s=t+1;const d=i.props.routingOptions||[];for(let h=0;h<d.length;h++){const{group:c,target:u}=d[h];if(!(c!=null&&c.length))continue;const m=c[0];if(m.questionIndex===void 0||m.questionIndex>r.length)continue;let v=nn({comparator:m.comparator,response:r[m.questionIndex],type:i.type,value:m.value});for(let b=1;b<c.length;b+=2){const _=c[b],y=c[b+1],x=nn({comparator:y.comparator,response:r[y.questionIndex],type:e[y.questionIndex].type,value:y.value});_===Co?v&&(v=x):_===Eo&&(v||(v=x))}if(v){s=u===-1&&n?e.length-1:u;break}}const l=e.findIndex(h=>h.type==="uploading");let p;return p=l>0?n?e.length-3:e.length-2:e.length-1,t>=p||s===-1||s!==null&&s>p?l>0&&Object.values(o).some(c=>c.isSubmitted&&!c.isComplete)?l:n?e.length-1:null:s===-1?null:s},nn=({comparator:e,response:t,type:n,value:r})=>{if(e==="answered")switch(n){case"texturlprompt":return t===void 0;case"consentlegal":return t&&t.submitted===!0;case"recordedtask":return"taskStatus"in t&&t.taskStatus==="completed";case"likert":case"nps":return Number.isInteger(t);case"matrix":return Object.values(t).every(o=>o!==null);case"multiplechoice":return t!==void 0;case"multipleselect":return(t==null?void 0:t.length)>0;case"open":return t&&t.length>0;case"videovoice":return!!(t!=null&&t.mediaRecordingUid);default:return!1}if(e==="given_up")return n!=="recordedtask"||"taskStatus"in t&&t.taskStatus==="given.up";if(e==="partial")return n==="matrix"&&mr(t,n);if(e==="skipped")switch(n){case"texturlprompt":return t==null?void 0:t.skipped;case"consentlegal":case"likert":case"nps":case"videovoice":return t===null;case"recordedtask":return"taskStatus"in t&&t.taskStatus==="abandoned";case"open":case"multipleselect":return(t==null?void 0:t.length)===0;case"multiplechoice":return t===void 0;case"matrix":return Object.values(t).every(o=>o===null);default:return!1}return jt[e](t,r)},jo=e=>{var r,o,i;switch(e.type){case"multipleselect":return e&&e.props&&e.props.options?e.props.options.length>13?e.props.options.map(s=>[s.value]):(t=e.props.options.map(s=>s.value),n=!e.props.properties.required,t.reduce((s,d)=>s.concat(s.map(l=>[...l,d])),[[]]).filter(s=>n||s.length>0)):null;case"multiplechoice":{if(!e||!e.props||!e.props.options)return null;const s=e.props.options.map(d=>d.value);return e.props.properties.required||s.push(void 0),s}case"matrix":{if(!((r=e==null?void 0:e.props)!=null&&r.options))return null;const s=e.props.properties.matrixColumn,d=e.props.options,l=d.reduce((h,c)=>(h[c.id]=null,h),{}),p=[{...l,[d[0].id]:s[0].value},d.reduce((h,c)=>(h[c.id]=s[0].value,h),{})];return e.props.properties.required||p.push(l),p}case"likert":{const s=Number((i=(o=e.props)==null?void 0:o.properties)==null?void 0:i.range)||5;return[...Array.from(Array(s).keys()).map(l=>l+1),...e.props.properties.required?[]:[null]]}case"nps":return[0,1,2,3,4,5,6,7,8,9,10,...e.props.properties.required?[]:[null]];case"videovoice":case"open":return["1",...e.props.properties.required?[]:[""]];case"recordedtask":{const s=[{taskStatus:"completed"},{taskStatus:"given.up"}];return e.props.properties.required||s.push({taskStatus:"abandoned"}),s}case"texturlprompt":return[void 0,...e.props.properties.required?[]:[{skipped:!0}]];case"consentlegal":return[1,...e.props.properties.required?[]:[null]];default:return[1]}var t,n},Io=e=>e in jt,To=e=>typeof e=="object"&&e!==null&&"taskStatus"in e,Ro=(e,t=[])=>t.reduce((n,r)=>{const{group:o,target:i}=r;if(!(o!=null&&o.length))return[...n];const s=o.filter(d=>!!Number(d)||typeof d=="object"&&d.questionIndex===e).map(d=>{const{comparator:l,value:p}=d;return{comparator:l,target:i,value:p}});return[...n,...s]},[]),rt=new Set(["thanks","uploading"]),B=hr()((e,t)=>({allResponses:[],answers:void 0,apiURL:"",border:"#000000",cards:[],close:async(n=Z.APP_ID)=>{const r=t(),{fadeout:o,remove:i,trackHistory:s,studyType:d}=r;await o(n),ot(r)||s({event:"closed"}),F.breadcrumbsLogger.info("SurveyClosing",{surveyId:r.surveyId}),Z.ConflictingWidgets.enable(),i({initiator:F.DismissReason.Closed,studyType:d})},configureExitOnOverlayClick:()=>{},customMetadata:{},destroy:async n=>{const{eventEmitFn:r,fadeout:o,remove:i,studyType:s,surveyId:d}=t();r("survey.complete",d),await o(n),Z.ConflictingWidgets.enable(),i({initiator:F.DismissReason.Complete,studyType:s})},endCard:{headline:""},envId:"",eventEmitFn:F.eventEmitter.emit.bind(F.eventEmitter),fadeout:async n=>{const{eventEmitFn:r,headers:o,viewDocument:i}=t();return F.shouldDirectEmbed(o)?Promise.resolve():(r(F.SprigEvent.SurveyFadingOut),new Promise(s=>{const d=i.getElementById(n);d?(d.addEventListener("transitionend",()=>{s()}),d.classList.remove("ul-app--visible")):s()}))},forceBrandedLogo:!1,frame:document.createElement("iframe"),handleClickEmbedButton:n=>{const{cards:r,eventEmitFn:o,index:i}=t();o(n,{qid:r[i].name,props:r[i].props}),e(()=>({hasViewedEmbed:!0}))},handleUploadUpdate:({mediaRecordingUid:n,isComplete:r,progressPct:o,isSubmitted:i})=>{var m,v,b;const{cards:s,destroy:d,index:l,uploadProgress:p}=t(),h=r||((m=p[n])==null?void 0:m.isComplete),c={...p,[n]:{progressPct:h?100:o||((v=p[n])==null?void 0:v.progressPct),isComplete:h,isSubmitted:i||((b=p[n])==null?void 0:b.isSubmitted)}};if(e({uploadProgress:c}),s[l].type!=="uploading")return;const u=Object.entries(p).every(([_,y])=>!y.isSubmitted||y.isComplete||n==_&&r);if(u&&l>=s.length-1)return d(Z.APP_ID);e({index:u?l+1:l,uploadingCardViewed:!0})},hasViewedEmbed:!1,headers:{Authorization:"","Content-Type":"","userleap-platform":"web","x-ul-environment-id":"","x-ul-installation-method":"web-snippet","x-ul-sdk-version":"","x-ul-visitor-id":""},index:0,isPreview:!1,marketingUrl:"https://sprig.com",meta:{ch:0,cw:0,l:"",mode:null,p:"",sh:0,sw:0},mode:void 0,next:n=>{const{allResponses:r,cards:o,eventEmitFn:i,index:s,responseGroupUid:d,submit:l,trackHistory:p,uploadProgress:h,viewedCardCount:c}=t();e({minScrollableHeight:void 0});const u=Date.now(),m=[...o],v=m[s],{type:b}=n.data,_={...n.data},y=_.value;(R=>!rt.has(R.type))(v)&&(v.value=y),_.answeredAt=u,delete _.type;const x={response:_,responseGroupUid:d,questionIndex:s};let T=b==="multiplechoice"?Object.values(y).find(R=>R!==!1):y;b==="multipleselect"&&(T=m[s].props.options.reduce((R,g)=>(y[g.id]&&R.push(g.value),R),[]));const S=r.slice(0);S[s]=T,e({allResponses:S});const w=gr({cards:m,index:s,hasEndCard:!!n.endCard,uploadProgress:h,allResponses:S});if(w===null)return x.completedAt=u,l(x),void n.completeSurvey();rt.has(m[w].type)&&(x.completedAt=u);const k=l(x);rt.has(m[w].type)||k.finally(()=>{p({event:"seen",index:w})});const j=m[w];m[w]&&i&&i("survey.question",{qid:j.name,props:j.props}),e({cards:m,hasViewedEmbed:!1,index:w,viewedCardCount:c+1})},pendingRemoveIframeReason:null,previewKey:null,previewMode:void 0,recorder:()=>{},recorderEventEmitter:F.eventEmitter,resolveTrackedPromise:()=>{const{removeIframeIfReady:n}=t();e(r=>({unresolvedRequestCount:r.unresolvedRequestCount-1})),n()},responseGroupUid:"",remove:({initiator:n,studyType:r})=>{const{removeIframeIfReady:o}=t();e({pendingRemoveIframeReason:n,studyType:r}),o()},removeIframeIfReady:()=>{const{eventEmitFn:n,pendingRemoveIframeReason:r,unresolvedRequestCount:o,studyType:i,surveyId:s}=t();r&&o===0&&(n(F.SprigEvent.SurveyWillClose,{name:F.SprigEvent.SurveyWillClose,initiator:r,studyType:i,"survey.id":s}),e({pendingRemoveIframeReason:null,studyType:i}))},seen:async()=>{const{trackHistory:n}=t();return n({event:"seen",isNew:!0})},slugName:null,showStripes:!1,showSurveyBrand:!1,styleNonce:"",submit:async({completedAt:n,questionIndex:r,response:o,responseGroupUid:i})=>{const s=t();if(!i||ot(s))return;const d={responseGroupUid:i,meta:s.meta,customMetadata:s.customMetadata,responses:[o],completedAt:n,previewKey:s.previewKey},l=await s.trackPromise(F.sprigFetch(`${s.apiURL}/sdk/1/environments/${s.envId}/visitors/${s.userId}/responses/submit`,{body:JSON.stringify(d),headers:s.headers,method:"POST"}));l.ok?s.eventEmitFn(F.SprigEvent.QuestionAnswered,{...o,questionIndex:r}):l.reportError&&(console.warn("[Sprig] (ERR-427) Failed to submit response",l.error),await s.trackPromise(rn(s,"submitResponse",l.error)))},surveyId:0,tabTitle:"",trackHistory:async({event:n,index:r,isNew:o=!1})=>{const i=t();if(ot(i))return;const{cards:s,index:d}=i,l=r!==void 0?s[r]:s[d],p={sid:i.surveyId,qid:l.name,action:n,vid:i.userId,eid:i.envId,isNew:o,responseGroupUid:i.responseGroupUid,previewKey:i.previewKey},h=await i.trackPromise(F.sprigFetch(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`,{body:JSON.stringify(p),headers:i.headers,method:"POST"}));!h.ok&&h.reportError&&(console.warn("[Sprig] (ERR-428) Failed to track survey event",h.error),await i.trackPromise(rn(i,"trackHistory",h.error)))},trackPromise:async n=>{const{resolveTrackedPromise:r}=t();return e(o=>({unresolvedRequestCount:o.unresolvedRequestCount+1})),n.then(o=>(r(),o)).catch(o=>{throw r(),o})},unresolvedRequestCount:0,update:()=>{const{cards:n,index:r,headers:o,eventEmitFn:i,frame:s,useMobileStyling:d,surveyId:l,viewDocument:p}=t(),h=n[r],c=h.type==="matrix"&&!(h.props.properties.displayMatrixAsAccordion||d);e({minScrollableHeight:void 0}),setTimeout(()=>{var b,_;const[u,m,v]=Z.calculateFrameDimensions(p);F.shouldDirectEmbed(o)?i(F.SprigEvent.SurveyHeight,{name:F.SprigEvent.SurveyHeight,contentFrameHeight:u,"survey.id":l}):((b=s.setHeight)==null||b.call(s,u),e({minScrollableHeight:v}),d||((_=s.setWidth)==null||_.call(s,c?m:parseInt(Z.DEFAULT_WIDTH))))},100)},uploadingCardViewed:!1,uploadProgress:{},useDesktopPrototype:void 0,useMobileStyling:!1,userId:"",viewDocument:window.document,viewedCardCount:0})),ot=e=>!e.userId||e.meta&&e.meta.mode==="test"||e.isPreview||e.previewMode,rn=async(e,t,n)=>{const{mode:r,userId:o,envId:i,apiURL:s,headers:d,viewDocument:l}=e,p=l.documentElement,h={mode:r,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:p.clientWidth,clientHeight:p.clientHeight,location:window.location.href,language:window.navigator.language},c={action:t,err:{message:`${n==null?void 0:n.name} - ${n==null?void 0:n.message}`,stack:n==null?void 0:n.stack},meta:h,vid:o,envId:i};(await F.sprigFetch(`${s}/sdk/1/errors`,{method:"POST",headers:Object.assign({"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},d),body:JSON.stringify(c)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",n)},vr=e=>z("svg",{fill:"none",height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e},z("path",{d:"M17 10L12 15L7 10",stroke:"#0B2330",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})),fr=e=>z("svg",{fill:"none",height:10,viewBox:"0 0 10 10",width:10,xmlns:"http://www.w3.org/2000/svg",...e},z("path",{d:"M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005",stroke:"white",strokeLinecap:"round",strokeWidth:2}));var Do=0;function a(e,t,n,r,o,i){var s,d,l={};for(d in t)d=="ref"?s=t[d]:l[d]=t[d];var p={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Do,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(d in s)l[d]===void 0&&(l[d]=s[d]);return D.vnode&&D.vnode(p),p}const Po=({visible:e})=>a("div",{className:"sprig-check-background",style:{opacity:e?1:0},children:a(fr,{className:"sprig-check"})}),on="250ms",Lo=Ct(({animate:e,children:t,header:n,isOpen:r,onClick:o,showHeaderCheck:i},s)=>{const d=ne(null),[l,p]=$(0),[h,c]=$("none"),[u,m]=$(!0);return Y(()=>{var b;const v=(b=d.current)==null?void 0:b.getBoundingClientRect();p(r&&v?v.height:0)},[r]),Y(()=>{!l&&r||!u||m(!1),c(e&&!u?`height ${on} ease`:"none")},[e,u,l,r]),a("div",{className:"sprig-accordion",ref:s,children:[a("button",{className:"sprig-accordion-header-container",onClick:o,type:"button",children:[a("div",{className:"sprig-header-label-container",children:[a("span",{className:"sprig-header-label",children:n}),a(Po,{visible:i})]}),a(vr,{className:"sprig-caret",style:{transitionDuration:e?on:"0",transform:r?"rotate(-180deg)":"none"}})]}),a("div",{className:"sprig-accordion-body",style:{transition:h,height:l},children:a("div",{ref:d,children:t})})]})}),N=(...e)=>e.filter(Boolean).join(" "),K=(e,t,n)=>{const r=t?"--mobile":"--desktop";return`${e+r} ${e+(n?`${r}_${n}`:"")} ${e}`},Mo=(e,t)=>`${e} ${e}__${t}`,te=e=>a("button",{...e,className:N("ul-card-text__button",e.className),id:"ul-card-text__button"}),_r=()=>{const{viewDocument:e}=B(r=>({viewDocument:r.viewDocument})),[t,n]=$(!1);return Y(()=>{const r=e.querySelector(".sprig-question-body"),o=new ResizeObserver(()=>{window.requestAnimationFrame(()=>{n(!!(r&&Z.isHTMLElement(r)&&r.scrollHeight>r.offsetHeight))})});return r&&o.observe(r),()=>{r&&o.unobserve(r)}},[e]),t},sn=({plainText:e,richText:t,id:n,className:r,isHeader:o})=>t?a("div",{className:r,dangerouslySetInnerHTML:{__html:t},id:n}):e?a(o?"h1":"p",{className:r,id:n,children:e}):null,No=()=>{const{cards:e,close:t,endCard:n,headers:r,index:o}=B(d=>({cards:d.cards,close:d.close,endCard:d.endCard,headers:d.headers,index:d.index,useMobileStyling:d.useMobileStyling})),i=e.length,s=Oe(()=>()=>t(Z.APP_ID),[t]);return["email","link"].includes(r["userleap-platform"])||n&&o+1===i?null:a("div",{"aria-label":"Close button",className:"close-btn",onClick:s,onKeyPress:d=>{d.key==="Enter"&&s()},role:"button",tabIndex:0,children:a("svg",{fill:"none",height:"16px",viewBox:"0 0 13 13",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:a("path",{d:"M2.54964 1.78369L1.78369 2.54964L5.73405 6.5L1.78369 10.4504L2.54964 11.2163L6.5 7.26595L10.4504 11.2163L11.2163 10.4504L7.26595 6.5L11.2163 2.54964L10.4504 1.78369L6.5 5.73405L2.54964 1.78369Z",fill:"#262136"})})})},ae=({message:e,properties:t})=>{const n=ne(null),r=t==null?void 0:t.captionText,o=_r();return a("div",{className:N("question-header-container","sprig-header-container",o?"sprig-border-bottom":null),ref:n,children:[a("div",{className:"question-header-button-container",children:[a(sn,{className:"ul-question",id:"ul-question",isHeader:!0,plainText:e,richText:t==null?void 0:t.questionHtml}),a(No,{})]}),a(sn,{className:"ul-caption",id:"ul-caption",plainText:r,richText:t==null?void 0:t.captionHtml})]})},an=({buttonText:e="View Prototype",handleClick:t})=>a("button",{className:"prototype-button",onClick:t,children:e},"prototype-btn"),ve=({defaultBody:e,embeddedType:t="prototype",properties:n})=>{var c;const{handleClickEmbedButton:r,hasViewedEmbed:o,headers:i,useDesktopPrototype:s}=B(u=>({handleClickEmbedButton:u.handleClickEmbedButton,hasViewedEmbed:u.hasViewedEmbed,headers:u.headers,useDesktopPrototype:u.useDesktopPrototype})),d=(n==null?void 0:n.conceptUrl)||((c=n==null?void 0:n.consentDocument)==null?void 0:c.url),l=window.innerWidth<Z.EMBED_MOBILE_MAX_WIDTH,p=i["userleap-platform"],h=(u,m)=>{u.preventDefault(),r(m)};if(!s&&l&&!o&&d&&["email","link"].includes(p)){if(t==="prototype")return a(an,{handleClick:u=>{h(u,"question.prototype.click")}});if(t==="pdf")return a(an,{buttonText:(n==null?void 0:n.viewDocumentText)||"View Document",handleClick:u=>{h(u,"question.agreement.click")}})}return e()},br=({isSelected:e,id:t,divId:n,themeColor:r})=>a("div",{"aria-checked":e,"aria-labelledby":`label-${t}`,className:"select-checkbox",id:n,role:"checkbox",style:e?{backgroundColor:r,borderColor:r,boxShadow:"none"}:{},tabIndex:0,children:e&&a(fr,{})}),yr=(e,t)=>{const n=ne(0),r=()=>{if(e.current){const o=e.current;o.style.height="1px";const i=o.scrollHeight+(o.offsetHeight-o.clientHeight),s=parseInt(window.getComputedStyle(o).getPropertyValue("max-height")),d=i<=s?i:s;n.current!==d&&t(),n.current=d,o.style.height=`${d}px`}};return Y(r,[]),r},Qe=({ariaLabel:e,border:t,choiceStyle:n={},label:r,isSelected:o,value:i,text:s,id:d,isRadio:l,useMobileStyling:p,error:h,allowTextEntry:c,noneOfTheAbove:u,promptText:m,onUserInputChanged:v})=>{const{styleNonce:b,viewDocument:_}=B(I=>({styleNonce:I.styleNonce,viewDocument:I.viewDocument})),[y,x]=$(!1);Uo(_,t,b);const T=({isSelected:I,userText:O})=>{v&&v({id:d,selected:I,value:i,userText:O,noneOfTheAbove:u})},S=I=>{I.stopPropagation(),T({isSelected:l||!o,userText:s}),x(!1)},w=()=>{y||x(!0)},k=()=>{y&&x(!1)},j={onClick:I=>S(I),onKeyPress:I=>(O=>{O.key!=="Enter"&&O.key!==" "||S(O)})(I)};"ontouchstart"in _.documentElement?(j.onTouchStart=k,j.onTouchCancel=k,j.onTouchEnd=k):(j.onMouseDown=w,j.onMouseLeave=k);const R=l?`radio-${d}`:`checkbox-${d}`,g=o||y?[qe]:[],f=[...h?[xr]:[],...g],E=r?{"aria-labelledby":`label-${d}`}:{"aria-label":e};return a("div",{className:N(K("choice",p),...f),id:`choice-div-${d}`,style:{...n,...h?{borderColor:Z.ERROR_BORDER_COLOR}:{}},...j,children:[a("div",{className:N("choice-label-container"),children:[l?a("div",{...E,className:N("select-radio",...g),id:R,role:"radio",tabIndex:0}):a(br,{divId:R,id:d,isSelected:o,themeColor:t}),r&&a("label",{className:N(K("select-label",p)),htmlFor:R,id:`label-${d}`,children:r})]}),c&&o&&a("div",{className:N("choice-text-entry-container",...g),children:a(Oo,{onTextChange:I=>T({isSelected:o,userText:I}),promptText:m||"Please specify",textValue:s,useMobileStyling:p})})]})},Oo=({promptText:e,textValue:t,onTextChange:n,useMobileStyling:r})=>{const o=ne(null),{update:i}=B(d=>({update:d.update})),s=yr(o,()=>i());return Y(()=>{o.current&&o.current.focus()},[]),a("textarea",{"aria-label":e,"aria-multiline":"true","aria-placeholder":e,className:N(K("choice-text-input",r)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:d=>{s(),d.stopPropagation(),n(d.currentTarget.value)},onClick:d=>{d.stopPropagation()},onKeyPress:d=>{d.stopPropagation()},placeholder:e,ref:o,role:"textbox",rows:1,value:t})},ln="ul-select-style-element",qe="ul-select-active-dynamic-style",xr="ul-select-error-dynamic-style",Uo=(e,t,n)=>{let r=e.getElementById(ln),o=!1;r||(r=e.createElement("style"),o=!0),r.tagName.toLowerCase()==="style"&&(r.id=ln,n&&(r.nonce=n),r.textContent=Ho(t),o&&e.head.appendChild(r))},Ho=e=>`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("./core-BuTAnr1A.cjs"),F=require("./metricsReporter-CHOlWEKF.cjs");var Me,D,wn,ke,Pt,Cn,ct,En,Le={},Sn=[],Ar=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Fe=Array.isArray;function he(e,t){for(var n in t)e[n]=t[n];return e}function jn(e){var t=e.parentNode;t&&t.removeChild(e)}function z(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Me.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return De(e,s,r,o,null)}function De(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++wn,__i:-1,__u:0};return o==null&&D.vnode!=null&&D.vnode(i),i}function In(){return{current:null}}function Q(e){return e.children}function se(e,t){this.props=e,this.context=t}function je(e,t){if(t==null)return e.__?je(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?je(e):null}function Tn(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Tn(e)}}function ut(e){(!e.__d&&(e.__d=!0)&&ke.push(e)&&!$e.__r++||Pt!==D.debounceRendering)&&((Pt=D.debounceRendering)||Cn)($e)}function $e(){var e,t,n,r,o,i,s,d,l;for(ke.sort(ct);e=ke.shift();)e.__d&&(t=ke.length,r=void 0,i=(o=(n=e).__v).__e,d=[],l=[],(s=n.__P)&&((r=he({},o)).__v=o.__v+1,D.vnode&&D.vnode(r),bt(s,r,o,n.__n,s.ownerSVGElement!==void 0,32&o.__u?[i]:null,d,i??je(o),!!(32&o.__u),l),r.__.__k[r.__i]=r,Dn(d,r,l),r.__e!=i&&Tn(r)),ke.length>t&&ke.sort(ct));$e.__r=0}function Lt(e,t,n,r,o,i,s,d,l,p,h){var c,u,m,v,b,_=r&&r.__k||Sn,y=t.length;for(n.__d=l,function(x,T,S){var w,k,j,R,g,f=T.length,E=S.length,I=E,O=0;for(x.__k=[],w=0;w<f;w++)(k=x.__k[w]=(k=T[w])==null||typeof k=="boolean"||typeof k=="function"?null:typeof k=="string"||typeof k=="number"||typeof k=="bigint"||k.constructor==String?De(null,k,null,null,k):Fe(k)?De(Q,{children:k},null,null,null):k.constructor===void 0&&k.__b>0?De(k.type,k.props,k.key,k.ref?k.ref:null,k.__v):k)!=null?(k.__=x,k.__b=x.__b+1,g=Br(k,S,R=w+O,I),k.__i=g,j=null,g!==-1&&(I--,(j=S[g])&&(j.__u|=131072)),j==null||j.__v===null?(g==-1&&O--,typeof k.type!="function"&&(k.__u|=65536)):g!==R&&(g===R+1?O++:g>R?I>f-R?O+=g-R:O--:O=g<R&&g==R-1?g-R:0,g!==w+O&&(k.__u|=65536))):(j=S[w])&&j.key==null&&j.__e&&(j.__e==x.__d&&(x.__d=je(j)),pt(j,j,!1),S[w]=null,I--);if(I)for(w=0;w<E;w++)(j=S[w])!=null&&!(131072&j.__u)&&(j.__e==x.__d&&(x.__d=je(j)),pt(j,j))}(n,t,_),l=n.__d,c=0;c<y;c++)(m=n.__k[c])!=null&&typeof m!="boolean"&&typeof m!="function"&&(u=m.__i===-1?Le:_[m.__i]||Le,m.__i=c,bt(e,m,u,o,i,s,d,l,p,h),v=m.__e,m.ref&&u.ref!=m.ref&&(u.ref&&yt(u.ref,null,m),h.push(m.ref,m.__c||v,m)),b==null&&v!=null&&(b=v),65536&m.__u||u.__k===m.__k?l=Rn(m,l,e):typeof m.type=="function"&&m.__d!==void 0?l=m.__d:v&&(l=v.nextSibling),m.__d=void 0,m.__u&=-196609);n.__d=l,n.__e=b}function Rn(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Rn(r[o],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function me(e,t){return t=t||[],e==null||typeof e=="boolean"||(Fe(e)?e.some(function(n){me(n,t)}):t.push(e)),t}function Br(e,t,n,r){var o=e.key,i=e.type,s=n-1,d=n+1,l=t[n];if(l===null||l&&o==l.key&&i===l.type)return n;if(r>(l==null||131072&l.__u?0:1))for(;s>=0||d<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&o==l.key&&i===l.type)return s;s--}if(d<t.length){if((l=t[d])&&!(131072&l.__u)&&o==l.key&&i===l.type)return d;d++}}return-1}function Mt(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Ar.test(t)?n:n+"px"}function He(e,t,n,r,o){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Mt(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Mt(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,i?Ot:Nt,i)):e.removeEventListener(t,i?Ot:Nt,i);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function Nt(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(D.event?D.event(e):e)}function Ot(e){return this.l[e.type+!0](D.event?D.event(e):e)}function bt(e,t,n,r,o,i,s,d,l,p){var h,c,u,m,v,b,_,y,x,T,S,w,k,j,R,g=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),i=[d=t.__e=n.__e]),(h=D.__b)&&h(t);e:if(typeof g=="function")try{if(y=t.props,x=(h=g.contextType)&&r[h.__c],T=h?x?x.props.value:h.__:r,n.__c?_=(c=t.__c=n.__c).__=c.__E:("prototype"in g&&g.prototype.render?t.__c=c=new g(y,T):(t.__c=c=new se(y,T),c.constructor=g,c.render=qr),x&&x.sub(c),c.props=y,c.state||(c.state={}),c.context=T,c.__n=r,u=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),g.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=he({},c.__s)),he(c.__s,g.getDerivedStateFromProps(y,c.__s))),m=c.props,v=c.state,c.__v=t,u)g.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(g.getDerivedStateFromProps==null&&y!==m&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(y,T),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(y,c.__s,T)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(c.props=y,c.state=c.__s,c.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(f){f&&(f.__=t)}),S=0;S<c._sb.length;S++)c.__h.push(c._sb[S]);c._sb=[],c.__h.length&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(y,c.__s,T),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(m,v,b)})}if(c.context=T,c.props=y,c.__P=e,c.__e=!1,w=D.__r,k=0,"prototype"in g&&g.prototype.render){for(c.state=c.__s,c.__d=!1,w&&w(t),h=c.render(c.props,c.state,c.context),j=0;j<c._sb.length;j++)c.__h.push(c._sb[j]);c._sb=[]}else do c.__d=!1,w&&w(t),h=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++k<25);c.state=c.__s,c.getChildContext!=null&&(r=he(he({},r),c.getChildContext())),u||c.getSnapshotBeforeUpdate==null||(b=c.getSnapshotBeforeUpdate(m,v)),Lt(e,Fe(R=h!=null&&h.type===Q&&h.key==null?h.props.children:h)?R:[R],t,n,r,o,i,s,d,l,p),c.base=t.__e,t.__u&=-161,c.__h.length&&s.push(c),_&&(c.__E=c.__=null)}catch(f){t.__v=null,l||i!=null?(t.__e=d,t.__u|=l?160:32,i[i.indexOf(d)]=null):(t.__e=n.__e,t.__k=n.__k),D.__e(f,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(f,E,I,O,C,M,A,H,q){var P,G,J,ce,W,X,ye,re=I.props,ue=E.props,oe=E.type;if(oe==="svg"&&(C=!0),M!=null){for(P=0;P<M.length;P++)if((W=M[P])&&"setAttribute"in W==!!oe&&(oe?W.localName===oe:W.nodeType===3)){f=W,M[P]=null;break}}if(f==null){if(oe===null)return document.createTextNode(ue);f=C?document.createElementNS("http://www.w3.org/2000/svg",oe):document.createElement(oe,ue.is&&ue),M=null,H=!1}if(oe===null)re===ue||H&&f.data===ue||(f.data=ue);else{if(M=M&&Me.call(f.childNodes),re=I.props||Le,!H&&M!=null)for(re={},P=0;P<f.attributes.length;P++)re[(W=f.attributes[P]).name]=W.value;for(P in re)W=re[P],P=="children"||(P=="dangerouslySetInnerHTML"?J=W:P==="key"||P in ue||He(f,P,null,W,C));for(P in ue)W=ue[P],P=="children"?ce=W:P=="dangerouslySetInnerHTML"?G=W:P=="value"?X=W:P=="checked"?ye=W:P==="key"||H&&typeof W!="function"||re[P]===W||He(f,P,W,re[P],C);if(G)H||J&&(G.__html===J.__html||G.__html===f.innerHTML)||(f.innerHTML=G.__html),E.__k=[];else if(J&&(f.innerHTML=""),Lt(f,Fe(ce)?ce:[ce],E,I,O,C&&oe!=="foreignObject",M,A,M?M[0]:I.__k&&je(I,0),H,q),M!=null)for(P=M.length;P--;)M[P]!=null&&jn(M[P]);H||(P="value",X!==void 0&&(X!==f[P]||oe==="progress"&&!X||oe==="option"&&X!==re[P])&&He(f,P,X,re[P],!1),P="checked",ye!==void 0&&ye!==f[P]&&He(f,P,ye,re[P],!1))}return f}(n.__e,t,n,r,o,i,s,l,p);(h=D.diffed)&&h(t)}function Dn(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)yt(n[r],n[++r],n[++r]);D.__c&&D.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){D.__e(i,o.__v)}})}function yt(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){D.__e(r,n)}}function pt(e,t,n){var r,o;if(D.unmount&&D.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||yt(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){D.__e(i,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&pt(r[o],t,n||typeof e.type!="function");n||e.__e==null||jn(e.__e),e.__=e.__e=e.__d=void 0}function qr(e,t,n){return this.constructor(e,n)}function Ie(e,t,n){var r,o,i,s;D.__&&D.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],bt(t,e=(!r&&n||t).__k=z(Q,null,[e]),o||Le,Le,t.ownerSVGElement!==void 0,!r&&n?[n]:o?null:t.firstChild?Me.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),Dn(i,e,s)}function Pn(e,t){Ie(e,t,Pn)}function Vr(e,t,n){var r,o,i,s,d=he({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:d[i]=t[i]===void 0&&s!==void 0?s[i]:t[i];return arguments.length>2&&(d.children=arguments.length>3?Me.call(arguments,2):n),De(e.type,d,r||e.key,o||e.ref,null)}function Ln(e,t){var n={__c:t="__cC"+En++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&o.some(function(d){d.__e=!0,ut(d)})},this.sub=function(s){o.push(s);var d=s.componentWillUnmount;s.componentWillUnmount=function(){o.splice(o.indexOf(s),1),d&&d.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Me=Sn.slice,D={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(d){e=d}throw e}},wn=0,se.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=he({},this.state),typeof e=="function"&&(e=e(he({},n),this.props)),e&&he(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),ut(this))},se.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ut(this))},se.prototype.render=Q,ke=[],Cn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ct=function(e,t){return e.__v.__b-t.__v.__b},$e.__r=0,En=0;var ge,V,et,Ut,Te=0,Mn=[],Ae=[],Ht=D.__b,At=D.__r,Bt=D.diffed,qt=D.__c,Vt=D.unmount;function Ce(e,t){D.__h&&D.__h(V,e,Te||t),Te=0;var n=V.__H||(V.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Ae}),n.__[e]}function $(e){return Te=1,xt(Hn,e)}function xt(e,t,n){var r=Ce(ge++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Hn(void 0,t),function(d){var l=r.__N?r.__N[0]:r.__[0],p=r.t(l,d);l!==p&&(r.__N=[p,r.__[1]],r.__c.setState({}))}],r.__c=V,!V.u)){var o=function(d,l,p){if(!r.__c.__H)return!0;var h=r.__c.__H.__.filter(function(u){return u.__c});if(h.every(function(u){return!u.__N}))return!i||i.call(this,d,l,p);var c=!1;return h.forEach(function(u){if(u.__N){var m=u.__[0];u.__=u.__N,u.__N=void 0,m!==u.__[0]&&(c=!0)}}),!(!c&&r.__c.props===d)&&(!i||i.call(this,d,l,p))};V.u=!0;var i=V.shouldComponentUpdate,s=V.componentWillUpdate;V.componentWillUpdate=function(d,l,p){if(this.__e){var h=i;i=void 0,o(d,l,p),i=h}s&&s.call(this,d,l,p)},V.shouldComponentUpdate=o}return r.__N||r.__}function Y(e,t){var n=Ce(ge++,3);!D.__s&&wt(n.__H,t)&&(n.__=e,n.i=t,V.__H.__h.push(n))}function Ne(e,t){var n=Ce(ge++,4);!D.__s&&wt(n.__H,t)&&(n.__=e,n.i=t,V.__h.push(n))}function ne(e){return Te=5,Oe(function(){return{current:e}},[])}function Nn(e,t,n){Te=6,Ne(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function Oe(e,t){var n=Ce(ge++,7);return wt(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function We(e,t){return Te=8,Oe(function(){return e},t)}function On(e){var t=V.context[e.__c],n=Ce(ge++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(V)),t.props.value):e.__}function kt(e,t){D.useDebugValue&&D.useDebugValue(t?t(e):e)}function Un(){var e=Ce(ge++,11);if(!e.__){for(var t=V.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function zr(){for(var e;e=Mn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Be),e.__H.__h.forEach(ht),e.__H.__h=[]}catch(t){e.__H.__h=[],D.__e(t,e.__v)}}D.__b=function(e){V=null,Ht&&Ht(e)},D.__r=function(e){At&&At(e),ge=0;var t=(V=e.__c).__H;t&&(et===V?(t.__h=[],V.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Ae,n.__N=n.i=void 0})):(t.__h.forEach(Be),t.__h.forEach(ht),t.__h=[],ge=0)),et=V},D.diffed=function(e){Bt&&Bt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Mn.push(t)!==1&&Ut===D.requestAnimationFrame||((Ut=D.requestAnimationFrame)||Fr)(zr)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Ae&&(n.__=n.__V),n.i=void 0,n.__V=Ae})),et=V=null},D.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Be),n.__h=n.__h.filter(function(r){return!r.__||ht(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],D.__e(r,n.__v)}}),qt&&qt(e,t)},D.unmount=function(e){Vt&&Vt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Be(r)}catch(o){t=o}}),n.__H=void 0,t&&D.__e(t,n.__v))};var zt=typeof requestAnimationFrame=="function";function Fr(e){var t,n=function(){clearTimeout(r),zt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);zt&&(t=requestAnimationFrame(n))}function Be(e){var t=V,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),V=t}function ht(e){var t=V;e.__c=e.__(),V=t}function wt(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Hn(e,t){return typeof t=="function"?t(e):t}function An(e,t){for(var n in t)e[n]=t[n];return e}function mt(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Ze(e){this.props=e}function Bn(e,t){function n(o){var i=this.props.ref,s=i==o.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!s:mt(this.props,o)}function r(o){return this.shouldComponentUpdate=n,z(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Ze.prototype=new se).isPureReactComponent=!0,Ze.prototype.shouldComponentUpdate=function(e,t){return mt(this.props,e)||mt(this.state,t)};var Ft=D.__b;D.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ft&&Ft(e)};var $r=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ct(e){function t(n){var r=An({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=$r,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var $t=function(e,t){return e==null?null:me(me(e).map(t))},qn={map:$t,forEach:$t,count:function(e){return e?me(e).length:0},only:function(e){var t=me(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:me},Wr=D.__e;D.__e=function(e,t,n,r){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}Wr(e,t,n,r)};var Wt=D.unmount;function Vn(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=An({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Vn(r,t,n)})),e}function zn(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return zn(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Pe(){this.__u=0,this.t=null,this.__b=null}function Fn(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function $n(e){var t,n,r;function o(i){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return z(n,i)}return o.displayName="Lazy",o.__f=!0,o}function Se(){this.u=null,this.o=null}D.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Wt&&Wt(e)},(Pe.prototype=new se).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=Fn(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(d):d())};n.__R=s;var d=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=zn(l,l.__c.__P,l.__c.__O)}var p;for(r.setState({__a:r.__b=null});p=r.t.pop();)p.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Pe.prototype.componentWillUnmount=function(){this.t=[]},Pe.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Vn(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&z(Q,null,e.fallback);return o&&(o.__u&=-33),[z(Q,null,t.__a?null:e.children),o]};var Zt=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function Zr(e){return this.getChildContext=function(){return e.context},e.children}function Gr(e){var t=this,n=e.i;t.componentWillUnmount=function(){Ie(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,o){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),Ie(z(Zr,{context:t.context},e.__v),t.l)}function Wn(e,t){var n=z(Gr,{__v:e,i:t});return n.containerInfo=t,n}(Se.prototype=new se).__a=function(e){var t=this,n=Fn(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Zt(t,e,r)):o()};n?n(i):i()}},Se.prototype.render=function(e){this.u=null,this.o=new Map;var t=me(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Se.prototype.componentDidUpdate=Se.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Zt(e,n,t)})};var Zn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Kr=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Yr=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Qr=/[A-Z0-9]/g,Jr=typeof document<"u",Xr=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Gn(e,t,n){return t.__k==null&&(t.textContent=""),Ie(e,t),typeof n=="function"&&n(),e?e.__c:null}function Kn(e,t,n){return Pn(e,t),typeof n=="function"&&n(),e?e.__c:null}se.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(se.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Gt=D.event;function eo(){}function to(){return this.cancelBubble}function no(){return this.defaultPrevented}D.event=function(e){return Gt&&(e=Gt(e)),e.persist=eo,e.isPropagationStopped=to,e.isDefaultPrevented=no,e.nativeEvent=e};var Et,ro={enumerable:!1,configurable:!0,get:function(){return this.class}},Kt=D.vnode;D.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={};for(var i in n){var s=n[i];if(!(i==="value"&&"defaultValue"in n&&s==null||Jr&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var d=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":d==="ondoubleclick"?i="ondblclick":d!=="onchange"||r!=="input"&&r!=="textarea"||Xr(n.type)?d==="onfocus"?i="onfocusin":d==="onblur"?i="onfocusout":Yr.test(i)?i=d:r.indexOf("-")===-1&&Kr.test(i)?i=i.replace(Qr,"-$&").toLowerCase():s===null&&(s=void 0):d=i="oninput",d==="oninput"&&o[i=d]&&(i="oninputCapture"),o[i]=s}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=me(n.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=me(n.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",ro)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=Zn,Kt&&Kt(e)};var Yt=D.__r;D.__r=function(e){Yt&&Yt(e),Et=e.__c};var Qt=D.diffed;D.diffed=function(e){Qt&&Qt(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Et=null};var Yn={ReactCurrentDispatcher:{current:{readContext:function(e){return Et.__n[e.__c].props.value}}}};function Qn(e){return z.bind(null,e)}function Ue(e){return!!e&&e.$$typeof===Zn}function Jn(e){return Ue(e)&&e.type===Q}function Xn(e){return Ue(e)?Vr.apply(null,arguments):e}function er(e){return!!e.__k&&(Ie(null,e),!0)}function tr(e){return e&&(e.base||e.nodeType===1&&e)||null}var nr=function(e,t){return e(t)},rr=function(e,t){return e(t)},or=Q;function St(e){e()}function ir(e){return e}function sr(){return[!1,St]}var ar=Ne,lr=Ue;function dr(e,t){var n=t(),r=$({h:{__:n,v:t}}),o=r[0].h,i=r[1];return Ne(function(){o.__=n,o.v=t,tt(o)&&i({h:o})},[e,n,t]),Y(function(){return tt(o)&&i({h:o}),e(function(){tt(o)&&i({h:o})})},[e]),n}function tt(e){var t,n,r=e.v,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var oo={useState:$,useId:Un,useReducer:xt,useEffect:Y,useLayoutEffect:Ne,useInsertionEffect:ar,useTransition:sr,useDeferredValue:ir,useSyncExternalStore:dr,startTransition:St,useRef:ne,useImperativeHandle:Nn,useMemo:Oe,useCallback:We,useContext:On,useDebugValue:kt,version:"17.0.2",Children:qn,render:Gn,hydrate:Kn,unmountComponentAtNode:er,createPortal:Wn,createElement:z,createContext:Ln,createFactory:Qn,cloneElement:Xn,createRef:In,Fragment:Q,isValidElement:Ue,isElement:lr,isFragment:Jn,findDOMNode:tr,Component:se,PureComponent:Ze,memo:Bn,forwardRef:Ct,flushSync:rr,unstable_batchedUpdates:nr,StrictMode:or,Suspense:Pe,SuspenseList:Se,lazy:$n,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Yn};const io=Object.freeze(Object.defineProperty({__proto__:null,Children:qn,Component:se,Fragment:Q,PureComponent:Ze,StrictMode:or,Suspense:Pe,SuspenseList:Se,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Yn,cloneElement:Xn,createContext:Ln,createElement:z,createFactory:Qn,createPortal:Wn,createRef:In,default:oo,findDOMNode:tr,flushSync:rr,forwardRef:Ct,hydrate:Kn,isElement:lr,isFragment:Jn,isValidElement:Ue,lazy:$n,memo:Bn,render:Gn,startTransition:St,unmountComponentAtNode:er,unstable_batchedUpdates:nr,useCallback:We,useContext:On,useDebugValue:kt,useDeferredValue:ir,useEffect:Y,useErrorBoundary:function(e){var t=Ce(ge++,10),n=$();return t.__=e,V.componentDidCatch||(V.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]},useId:Un,useImperativeHandle:Nn,useInsertionEffect:ar,useLayoutEffect:Ne,useMemo:Oe,useReducer:xt,useRef:ne,useState:$,useSyncExternalStore:dr,useTransition:sr,version:"17.0.2"},Symbol.toStringTag,{value:"Module"})),Jt=e=>{let t;const n=new Set,r=(s,d)=>{const l=typeof s=="function"?s(t):s;if(!Object.is(l,t)){const p=t;t=d??typeof l!="object"?l:Object.assign({},t,l),n.forEach(h=>h(t,p))}},o=()=>t,i={setState:r,getState:o,subscribe:s=>(n.add(s),()=>n.delete(s)),destroy:()=>n.clear()};return t=e(r,o,i),i};function so(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ao(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var cr={exports:{}},Xt={};const ur=ao(io);var pr={exports:{}},en={},Re=ur,lo=typeof Object.is=="function"?Object.is:function(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t},co=Re.useState,uo=Re.useEffect,po=Re.useLayoutEffect,ho=Re.useDebugValue;function nt(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!lo(e,n)}catch{return!0}}var mo=typeof window>"u"||window.document===void 0||window.document.createElement===void 0?function(e,t){return t()}:function(e,t){var n=t(),r=co({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return po(function(){o.value=n,o.getSnapshot=t,nt(o)&&i({inst:o})},[e,n,t]),uo(function(){return nt(o)&&i({inst:o}),e(function(){nt(o)&&i({inst:o})})},[e]),ho(n),n};en.useSyncExternalStore=Re.useSyncExternalStore!==void 0?Re.useSyncExternalStore:mo,pr.exports=en;var Ye=ur,go=pr.exports,vo=typeof Object.is=="function"?Object.is:function(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t},fo=go.useSyncExternalStore,_o=Ye.useRef,bo=Ye.useEffect,yo=Ye.useMemo,xo=Ye.useDebugValue;Xt.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=_o(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=yo(function(){function l(m){if(!c){if(c=!0,p=m,m=r(m),o!==void 0&&s.hasValue){var v=s.value;if(o(v,m))return h=v}return h=m}if(v=h,vo(p,m))return v;var b=r(m);return o!==void 0&&o(v,b)?v:(p=m,h=b)}var p,h,c=!1,u=n===void 0?null:n;return[function(){return l(t())},u===null?void 0:function(){return l(u())}]},[t,n,r,o]);var d=fo(e,i[0],i[1]);return bo(function(){s.hasValue=!0,s.value=d},[d]),xo(d),d},cr.exports=Xt;const ko=so(cr.exports),{useSyncExternalStoreWithSelector:wo}=ko,tn=e=>{const t=typeof e=="function"?(r=>r?Jt(r):Jt)(e):e,n=(r,o)=>function(i,s=i.getState,d){const l=wo(i.subscribe,i.getState,i.getServerState||i.getState,s,d);return kt(l),l}(t,r,o);return Object.assign(n,t),n},hr=e=>e?tn(e):tn,Co=1,Eo=2,jt={eq:(e,t)=>e==t,neq(e,t){return!this.eq(e,t)},gt:(e,t)=>e>t,gte:(e,t)=>e>=t,lt:(e,t)=>e<t,lte:(e,t)=>e<=t,list_exact:(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&e.slice().sort().join(",")===t.slice().sort().join(","),list_all:(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&!t.some(n=>e.indexOf(n)===-1),list_alo(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],r=new Set(n);return t.some(o=>r.has(o))},list_dni(e,t){if(!Array.isArray(t))return!1;const n=Array.isArray(e)?e:[e],r=new Set(n);return t.every(o=>!r.has(o))},contains(e,t){const n=e.toLowerCase(),r=t.toLowerCase();return n.includes(r)},notcontains(e,t){return!this.contains(e,t)}},So=(e,t,n)=>{switch(t){case"videovoice":return!!(e&&e.value);case"open":return!!n;case"multipleselect":return!!(n&&Object.keys(n).length);case"recordedtask":return(n==null?void 0:n.taskStatus)==="completed";case"texturlprompt":return!e.value;case"consentlegal":case"nps":case"likert":return n!==null;case"multiplechoice":return n!==void 0;case"matrix":return!!(n&&Object.values(n).every(r=>r!==null));default:return!0}},mr=(e,t)=>{if(t==="matrix"){const n=Object.keys(e).length,r=Object.values(e).filter(o=>o!==null).length;return r>0&&r<n}return!1},gr=({cards:e,index:t,hasEndCard:n,allResponses:r,uploadProgress:o={}})=>{if(t>=e.length||t<0)return null;const i=e[t];let s=t+1;const d=i.props.routingOptions||[];for(let h=0;h<d.length;h++){const{group:c,target:u}=d[h];if(!(c!=null&&c.length))continue;const m=c[0];if(m.questionIndex===void 0||m.questionIndex>r.length)continue;let v=nn({comparator:m.comparator,response:r[m.questionIndex],type:i.type,value:m.value});for(let b=1;b<c.length;b+=2){const _=c[b],y=c[b+1],x=nn({comparator:y.comparator,response:r[y.questionIndex],type:e[y.questionIndex].type,value:y.value});_===Co?v&&(v=x):_===Eo&&(v||(v=x))}if(v){s=u===-1&&n?e.length-1:u;break}}const l=e.findIndex(h=>h.type==="uploading");let p;return p=l>0?n?e.length-3:e.length-2:e.length-1,t>=p||s===-1||s!==null&&s>p?l>0&&Object.values(o).some(c=>c.isSubmitted&&!c.isComplete)?l:n?e.length-1:null:s===-1?null:s},nn=({comparator:e,response:t,type:n,value:r})=>{if(e==="answered")switch(n){case"texturlprompt":return t===void 0;case"consentlegal":return t&&t.submitted===!0;case"recordedtask":return"taskStatus"in t&&t.taskStatus==="completed";case"likert":case"nps":return Number.isInteger(t);case"matrix":return Object.values(t).every(o=>o!==null);case"multiplechoice":return t!==void 0;case"multipleselect":return(t==null?void 0:t.length)>0;case"open":return t&&t.length>0;case"videovoice":return!!(t!=null&&t.mediaRecordingUid);default:return!1}if(e==="given_up")return n!=="recordedtask"||"taskStatus"in t&&t.taskStatus==="given.up";if(e==="partial")return n==="matrix"&&mr(t,n);if(e==="skipped")switch(n){case"texturlprompt":return t==null?void 0:t.skipped;case"consentlegal":case"likert":case"nps":case"videovoice":return t===null;case"recordedtask":return"taskStatus"in t&&t.taskStatus==="abandoned";case"open":case"multipleselect":return(t==null?void 0:t.length)===0;case"multiplechoice":return t===void 0;case"matrix":return Object.values(t).every(o=>o===null);default:return!1}return jt[e](t,r)},jo=e=>{var r,o,i;switch(e.type){case"multipleselect":return e&&e.props&&e.props.options?e.props.options.length>13?e.props.options.map(s=>[s.value]):(t=e.props.options.map(s=>s.value),n=!e.props.properties.required,t.reduce((s,d)=>s.concat(s.map(l=>[...l,d])),[[]]).filter(s=>n||s.length>0)):null;case"multiplechoice":{if(!e||!e.props||!e.props.options)return null;const s=e.props.options.map(d=>d.value);return e.props.properties.required||s.push(void 0),s}case"matrix":{if(!((r=e==null?void 0:e.props)!=null&&r.options))return null;const s=e.props.properties.matrixColumn,d=e.props.options,l=d.reduce((h,c)=>(h[c.id]=null,h),{}),p=[{...l,[d[0].id]:s[0].value},d.reduce((h,c)=>(h[c.id]=s[0].value,h),{})];return e.props.properties.required||p.push(l),p}case"likert":{const s=Number((i=(o=e.props)==null?void 0:o.properties)==null?void 0:i.range)||5;return[...Array.from(Array(s).keys()).map(l=>l+1),...e.props.properties.required?[]:[null]]}case"nps":return[0,1,2,3,4,5,6,7,8,9,10,...e.props.properties.required?[]:[null]];case"videovoice":case"open":return["1",...e.props.properties.required?[]:[""]];case"recordedtask":{const s=[{taskStatus:"completed"},{taskStatus:"given.up"}];return e.props.properties.required||s.push({taskStatus:"abandoned"}),s}case"texturlprompt":return[void 0,...e.props.properties.required?[]:[{skipped:!0}]];case"consentlegal":return[1,...e.props.properties.required?[]:[null]];default:return[1]}var t,n},Io=e=>e in jt,To=e=>typeof e=="object"&&e!==null&&"taskStatus"in e,Ro=(e,t=[])=>t.reduce((n,r)=>{const{group:o,target:i}=r;if(!(o!=null&&o.length))return[...n];const s=o.filter(d=>!!Number(d)||typeof d=="object"&&d.questionIndex===e).map(d=>{const{comparator:l,value:p}=d;return{comparator:l,target:i,value:p}});return[...n,...s]},[]),rt=new Set(["thanks","uploading"]),B=hr()((e,t)=>({allResponses:[],answers:void 0,apiURL:"",border:"#000000",cards:[],close:async(n=Z.APP_ID)=>{const r=t(),{fadeout:o,remove:i,trackHistory:s,studyType:d}=r;await o(n),ot(r)||s({event:"closed"}),F.breadcrumbsLogger.info("SurveyClosing",{surveyId:r.surveyId}),Z.ConflictingWidgets.enable(),i({initiator:F.DismissReason.Closed,studyType:d})},configureExitOnOverlayClick:()=>{},customMetadata:{},destroy:async n=>{const{eventEmitFn:r,fadeout:o,remove:i,studyType:s,surveyId:d}=t();r("survey.complete",d),await o(n),Z.ConflictingWidgets.enable(),i({initiator:F.DismissReason.Complete,studyType:s})},endCard:{headline:""},envId:"",eventEmitFn:F.eventEmitter.emit.bind(F.eventEmitter),fadeout:async n=>{const{eventEmitFn:r,headers:o,viewDocument:i}=t();return F.shouldDirectEmbed(o)?Promise.resolve():(r(F.SprigEvent.SurveyFadingOut),new Promise(s=>{const d=i.getElementById(n);d?(d.addEventListener("transitionend",()=>{s()}),d.classList.remove("ul-app--visible")):s()}))},forceBrandedLogo:!1,frame:document.createElement("iframe"),handleClickEmbedButton:n=>{const{cards:r,eventEmitFn:o,index:i}=t();o(n,{qid:r[i].name,props:r[i].props}),e(()=>({hasViewedEmbed:!0}))},handleUploadUpdate:({mediaRecordingUid:n,isComplete:r,progressPct:o,isSubmitted:i})=>{var m,v,b;const{cards:s,destroy:d,index:l,uploadProgress:p}=t(),h=r||((m=p[n])==null?void 0:m.isComplete),c={...p,[n]:{progressPct:h?100:o||((v=p[n])==null?void 0:v.progressPct),isComplete:h,isSubmitted:i||((b=p[n])==null?void 0:b.isSubmitted)}};if(e({uploadProgress:c}),s[l].type!=="uploading")return;const u=Object.entries(p).every(([_,y])=>!y.isSubmitted||y.isComplete||n==_&&r);if(u&&l>=s.length-1)return d(Z.APP_ID);e({index:u?l+1:l,uploadingCardViewed:!0})},hasViewedEmbed:!1,headers:{Authorization:"","Content-Type":"","userleap-platform":"web","x-ul-environment-id":"","x-ul-installation-method":"web-snippet","x-ul-sdk-version":"","x-ul-visitor-id":""},index:0,isPreview:!1,marketingUrl:"https://sprig.com",meta:{ch:0,cw:0,l:"",mode:null,p:"",sh:0,sw:0},mode:void 0,next:n=>{const{allResponses:r,cards:o,eventEmitFn:i,index:s,responseGroupUid:d,submit:l,trackHistory:p,uploadProgress:h,viewedCardCount:c}=t();e({minScrollableHeight:void 0});const u=Date.now(),m=[...o],v=m[s],{type:b}=n.data,_={...n.data},y=_.value;(R=>!rt.has(R.type))(v)&&(v.value=y),_.answeredAt=u,delete _.type;const x={response:_,responseGroupUid:d,questionIndex:s};let T=b==="multiplechoice"?Object.values(y).find(R=>R!==!1):y;b==="multipleselect"&&(T=m[s].props.options.reduce((R,g)=>(y[g.id]&&R.push(g.value),R),[]));const S=r.slice(0);S[s]=T,e({allResponses:S});const w=gr({cards:m,index:s,hasEndCard:!!n.endCard,uploadProgress:h,allResponses:S});if(w===null)return x.completedAt=u,l(x),void n.completeSurvey();rt.has(m[w].type)&&(x.completedAt=u);const k=l(x);rt.has(m[w].type)||k.finally(()=>{p({event:"seen",index:w})});const j=m[w];m[w]&&i&&i("survey.question",{qid:j.name,props:j.props}),e({cards:m,hasViewedEmbed:!1,index:w,viewedCardCount:c+1})},pendingRemoveIframeReason:null,previewKey:null,previewMode:void 0,recorder:()=>{},recorderEventEmitter:F.eventEmitter,resolveTrackedPromise:()=>{const{removeIframeIfReady:n}=t();e(r=>({unresolvedRequestCount:r.unresolvedRequestCount-1})),n()},responseGroupUid:"",remove:({initiator:n,studyType:r})=>{const{removeIframeIfReady:o}=t();e({pendingRemoveIframeReason:n,studyType:r}),o()},removeIframeIfReady:()=>{const{eventEmitFn:n,pendingRemoveIframeReason:r,unresolvedRequestCount:o,studyType:i,surveyId:s}=t();r&&o===0&&(n(F.SprigEvent.SurveyWillClose,{name:F.SprigEvent.SurveyWillClose,initiator:r,studyType:i,"survey.id":s}),e({pendingRemoveIframeReason:null,studyType:i}))},seen:async()=>{const{trackHistory:n}=t();return n({event:"seen",isNew:!0})},slugName:null,showStripes:!1,showSurveyBrand:!1,styleNonce:"",submit:async({completedAt:n,questionIndex:r,response:o,responseGroupUid:i})=>{const s=t();if(!i||ot(s))return;const d={responseGroupUid:i,meta:s.meta,customMetadata:s.customMetadata,responses:[o],completedAt:n,previewKey:s.previewKey},l=await s.trackPromise(F.sprigFetch(`${s.apiURL}/sdk/1/environments/${s.envId}/visitors/${s.userId}/responses/submit`,{body:JSON.stringify(d),headers:s.headers,method:"POST"}));l.ok?s.eventEmitFn(F.SprigEvent.QuestionAnswered,{...o,questionIndex:r}):l.reportError&&(console.warn("[Sprig] (ERR-427) Failed to submit response",l.error),await s.trackPromise(rn(s,"submitResponse",l.error)))},surveyId:0,tabTitle:"",trackHistory:async({event:n,index:r,isNew:o=!1})=>{const i=t();if(ot(i))return;const{cards:s,index:d}=i,l=r!==void 0?s[r]:s[d],p={sid:i.surveyId,qid:l.name,action:n,vid:i.userId,eid:i.envId,isNew:o,responseGroupUid:i.responseGroupUid,previewKey:i.previewKey},h=await i.trackPromise(F.sprigFetch(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`,{body:JSON.stringify(p),headers:i.headers,method:"POST"}));!h.ok&&h.reportError&&(console.warn("[Sprig] (ERR-428) Failed to track survey event",h.error),await i.trackPromise(rn(i,"trackHistory",h.error)))},trackPromise:async n=>{const{resolveTrackedPromise:r}=t();return e(o=>({unresolvedRequestCount:o.unresolvedRequestCount+1})),n.then(o=>(r(),o)).catch(o=>{throw r(),o})},unresolvedRequestCount:0,update:()=>{const{cards:n,index:r,headers:o,eventEmitFn:i,frame:s,useMobileStyling:d,surveyId:l,viewDocument:p}=t(),h=n[r],c=h.type==="matrix"&&!(h.props.properties.displayMatrixAsAccordion||d);e({minScrollableHeight:void 0}),setTimeout(()=>{var b,_;const[u,m,v]=Z.calculateFrameDimensions(p);F.shouldDirectEmbed(o)?i(F.SprigEvent.SurveyHeight,{name:F.SprigEvent.SurveyHeight,contentFrameHeight:u,"survey.id":l}):((b=s.setHeight)==null||b.call(s,u),e({minScrollableHeight:v}),d||((_=s.setWidth)==null||_.call(s,c?m:parseInt(Z.DEFAULT_WIDTH))))},100)},uploadingCardViewed:!1,uploadProgress:{},useDesktopPrototype:void 0,useMobileStyling:!1,userId:"",viewDocument:window.document,viewedCardCount:0})),ot=e=>!e.userId||e.meta&&e.meta.mode==="test"||e.isPreview||e.previewMode,rn=async(e,t,n)=>{const{mode:r,userId:o,envId:i,apiURL:s,headers:d,viewDocument:l}=e,p=l.documentElement,h={mode:r,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:p.clientWidth,clientHeight:p.clientHeight,location:window.location.href,language:window.navigator.language},c={action:t,err:{message:`${n==null?void 0:n.name} - ${n==null?void 0:n.message}`,stack:n==null?void 0:n.stack},meta:h,vid:o,envId:i};(await F.sprigFetch(`${s}/sdk/1/errors`,{method:"POST",headers:Object.assign({"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},d),body:JSON.stringify(c)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",n)},vr=e=>z("svg",{fill:"none",height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e},z("path",{d:"M17 10L12 15L7 10",stroke:"#0B2330",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})),fr=e=>z("svg",{fill:"none",height:10,viewBox:"0 0 10 10",width:10,xmlns:"http://www.w3.org/2000/svg",...e},z("path",{d:"M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005",stroke:"white",strokeLinecap:"round",strokeWidth:2}));var Do=0;function a(e,t,n,r,o,i){var s,d,l={};for(d in t)d=="ref"?s=t[d]:l[d]=t[d];var p={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Do,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(d in s)l[d]===void 0&&(l[d]=s[d]);return D.vnode&&D.vnode(p),p}const Po=({visible:e})=>a("div",{className:"sprig-check-background",style:{opacity:e?1:0},children:a(fr,{className:"sprig-check"})}),on="250ms",Lo=Ct(({animate:e,children:t,header:n,isOpen:r,onClick:o,showHeaderCheck:i},s)=>{const d=ne(null),[l,p]=$(0),[h,c]=$("none"),[u,m]=$(!0);return Y(()=>{var b;const v=(b=d.current)==null?void 0:b.getBoundingClientRect();p(r&&v?v.height:0)},[r]),Y(()=>{!l&&r||!u||m(!1),c(e&&!u?`height ${on} ease`:"none")},[e,u,l,r]),a("div",{className:"sprig-accordion",ref:s,children:[a("button",{className:"sprig-accordion-header-container",onClick:o,type:"button",children:[a("div",{className:"sprig-header-label-container",children:[a("span",{className:"sprig-header-label",children:n}),a(Po,{visible:i})]}),a(vr,{className:"sprig-caret",style:{transitionDuration:e?on:"0",transform:r?"rotate(-180deg)":"none"}})]}),a("div",{className:"sprig-accordion-body",style:{transition:h,height:l},children:a("div",{ref:d,children:t})})]})}),N=(...e)=>e.filter(Boolean).join(" "),K=(e,t,n)=>{const r=t?"--mobile":"--desktop";return`${e+r} ${e+(n?`${r}_${n}`:"")} ${e}`},Mo=(e,t)=>`${e} ${e}__${t}`,te=e=>a("button",{...e,className:N("ul-card-text__button",e.className),id:"ul-card-text__button"}),_r=()=>{const{viewDocument:e}=B(r=>({viewDocument:r.viewDocument})),[t,n]=$(!1);return Y(()=>{const r=e.querySelector(".sprig-question-body"),o=new ResizeObserver(()=>{window.requestAnimationFrame(()=>{n(!!(r&&Z.isHTMLElement(r)&&r.scrollHeight>r.offsetHeight))})});return r&&o.observe(r),()=>{r&&o.unobserve(r)}},[e]),t},sn=({plainText:e,richText:t,id:n,className:r,isHeader:o})=>t?a("div",{className:r,dangerouslySetInnerHTML:{__html:t},id:n}):e?a(o?"h1":"p",{className:r,id:n,children:e}):null,No=()=>{const{cards:e,close:t,endCard:n,headers:r,index:o}=B(d=>({cards:d.cards,close:d.close,endCard:d.endCard,headers:d.headers,index:d.index,useMobileStyling:d.useMobileStyling})),i=e.length,s=Oe(()=>()=>t(Z.APP_ID),[t]);return["email","link"].includes(r["userleap-platform"])||n&&o+1===i?null:a("div",{"aria-label":"Close button",className:"close-btn",onClick:s,onKeyPress:d=>{d.key==="Enter"&&s()},role:"button",tabIndex:0,children:a("svg",{fill:"none",height:"16px",viewBox:"0 0 13 13",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:a("path",{d:"M2.54964 1.78369L1.78369 2.54964L5.73405 6.5L1.78369 10.4504L2.54964 11.2163L6.5 7.26595L10.4504 11.2163L11.2163 10.4504L7.26595 6.5L11.2163 2.54964L10.4504 1.78369L6.5 5.73405L2.54964 1.78369Z",fill:"#262136"})})})},ae=({message:e,properties:t})=>{const n=ne(null),r=t==null?void 0:t.captionText,o=_r();return a("div",{className:N("question-header-container","sprig-header-container",o?"sprig-border-bottom":null),ref:n,children:[a("div",{className:"question-header-button-container",children:[a(sn,{className:"ul-question",id:"ul-question",isHeader:!0,plainText:e,richText:t==null?void 0:t.questionHtml}),a(No,{})]}),a(sn,{className:"ul-caption",id:"ul-caption",plainText:r,richText:t==null?void 0:t.captionHtml})]})},an=({buttonText:e="View Prototype",handleClick:t})=>a("button",{className:"prototype-button",onClick:t,children:e},"prototype-btn"),ve=({defaultBody:e,embeddedType:t="prototype",properties:n})=>{var c;const{handleClickEmbedButton:r,hasViewedEmbed:o,headers:i,useDesktopPrototype:s}=B(u=>({handleClickEmbedButton:u.handleClickEmbedButton,hasViewedEmbed:u.hasViewedEmbed,headers:u.headers,useDesktopPrototype:u.useDesktopPrototype})),d=(n==null?void 0:n.conceptUrl)||((c=n==null?void 0:n.consentDocument)==null?void 0:c.url),l=window.innerWidth<Z.EMBED_MOBILE_MAX_WIDTH,p=i["userleap-platform"],h=(u,m)=>{u.preventDefault(),r(m)};if(!s&&l&&!o&&d&&["email","link"].includes(p)){if(t==="prototype")return a(an,{handleClick:u=>{h(u,"question.prototype.click")}});if(t==="pdf")return a(an,{buttonText:(n==null?void 0:n.viewDocumentText)||"View Document",handleClick:u=>{h(u,"question.agreement.click")}})}return e()},br=({isSelected:e,id:t,divId:n,themeColor:r})=>a("div",{"aria-checked":e,"aria-labelledby":`label-${t}`,className:"select-checkbox",id:n,role:"checkbox",style:e?{backgroundColor:r,borderColor:r,boxShadow:"none"}:{},tabIndex:0,children:e&&a(fr,{})}),yr=(e,t)=>{const n=ne(0),r=()=>{if(e.current){const o=e.current;o.style.height="1px";const i=o.scrollHeight+(o.offsetHeight-o.clientHeight),s=parseInt(window.getComputedStyle(o).getPropertyValue("max-height")),d=i<=s?i:s;n.current!==d&&t(),n.current=d,o.style.height=`${d}px`}};return Y(r,[]),r},Qe=({ariaLabel:e,border:t,choiceStyle:n={},label:r,isSelected:o,value:i,text:s,id:d,isRadio:l,useMobileStyling:p,error:h,allowTextEntry:c,noneOfTheAbove:u,promptText:m,onUserInputChanged:v})=>{const{styleNonce:b,viewDocument:_}=B(I=>({styleNonce:I.styleNonce,viewDocument:I.viewDocument})),[y,x]=$(!1);Uo(_,t,b);const T=({isSelected:I,userText:O})=>{v&&v({id:d,selected:I,value:i,userText:O,noneOfTheAbove:u})},S=I=>{I.stopPropagation(),T({isSelected:l||!o,userText:s}),x(!1)},w=()=>{y||x(!0)},k=()=>{y&&x(!1)},j={onClick:I=>S(I),onKeyPress:I=>(O=>{O.key!=="Enter"&&O.key!==" "||S(O)})(I)};"ontouchstart"in _.documentElement?(j.onTouchStart=k,j.onTouchCancel=k,j.onTouchEnd=k):(j.onMouseDown=w,j.onMouseLeave=k);const R=l?`radio-${d}`:`checkbox-${d}`,g=o||y?[qe]:[],f=[...h?[xr]:[],...g],E=r?{"aria-labelledby":`label-${d}`}:{"aria-label":e};return a("div",{className:N(K("choice",p),...f),id:`choice-div-${d}`,style:{...n,...h?{borderColor:Z.ERROR_BORDER_COLOR}:{}},...j,children:[a("div",{className:N("choice-label-container"),children:[l?a("div",{...E,className:N("select-radio",...g),id:R,role:"radio",tabIndex:0}):a(br,{divId:R,id:d,isSelected:o,themeColor:t}),r&&a("label",{className:N(K("select-label",p)),htmlFor:R,id:`label-${d}`,children:r})]}),c&&o&&a("div",{className:N("choice-text-entry-container",...g),children:a(Oo,{onTextChange:I=>T({isSelected:o,userText:I}),promptText:m||"Please specify",textValue:s,useMobileStyling:p})})]})},Oo=({promptText:e,textValue:t,onTextChange:n,useMobileStyling:r})=>{const o=ne(null),{update:i}=B(d=>({update:d.update})),s=yr(o,()=>i());return Y(()=>{o.current&&o.current.focus()},[]),a("textarea",{"aria-label":e,"aria-multiline":"true","aria-placeholder":e,className:N(K("choice-text-input",r)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:d=>{s(),d.stopPropagation(),n(d.currentTarget.value)},onClick:d=>{d.stopPropagation()},onKeyPress:d=>{d.stopPropagation()},placeholder:e,ref:o,role:"textbox",rows:1,value:t})},ln="ul-select-style-element",qe="ul-select-active-dynamic-style",xr="ul-select-error-dynamic-style",Uo=(e,t,n)=>{let r=e.getElementById(ln),o=!1;r||(r=e.createElement("style"),o=!0),r.tagName.toLowerCase()==="style"&&(r.id=ln,n&&(r.nonce=n),r.textContent=Ho(t),o&&e.head.appendChild(r))},Ho=e=>`
2
2
  .${qe} {
3
3
  border-color: ${e};
4
4
  }
@@ -666,4 +666,4 @@ span.ul-button-text {
666
666
  .vjs-poster {
667
667
  background-size: cover;
668
668
  }
669
- `}],Pr="-video-player",pn="-secondary-video-player",hn="-video-recorder";let le,mn;const _e=async({event:e,apiBase:t,headers:n,visitorId:r,envId:o,metadata:i})=>{const s=L.document.documentElement;if(!r||!o)return;const d={event:`SDK - ${e}`,visitorId:r,environmentId:o,metadata:{...i||{},screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:s.clientWidth,clientHeight:s.clientHeight,location:window.location.href,language:navigator.language}};(await fetch(`${t}/sdk/1/visitors/${r}/analytics`,{method:"POST",cache:"no-cache",headers:n,body:JSON.stringify(d)})).ok||console.warn("[Sprig] (ERR-444) Failed to track analytics",e)},pe=async(e,t,n,r,o,i)=>{_e({event:`Video Error ${t}`,apiBase:n,headers:r,visitorId:o,envId:i,metadata:{errorMessage:e.message}});const s=L.document.documentElement,d={screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:s.clientWidth,clientHeight:s.clientHeight,location:window.location.href,language:navigator.language},l={action:t,err:{message:e.message,stack:e.stack},meta:d,vid:o,envId:i};(await fetch(`${n}/sdk/1/errors`,{method:"POST",cache:"no-cache",headers:{...r,"userleap-platform":"video_recorder","x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(l)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",e)},Lr=(e,t)=>{if(e.length===0)return t&&t();Promise.all(e.reduce((n,r)=>(n.push(((o,{type:i,content:s})=>new Promise(function(d,l){let p;i==="script"?(p=L.document.createElement("script"),p.src=s):i==="link"?(p=L.document.createElement("link"),p.rel="stylesheet",p.href=s,p.type="text/css"):(p=L.document.createElement("style"),p.innerHTML=s),p.onload=function(){d(s)},p.onerror=function(){l(s)},p.async=!1,p.id=btoa(s),o.appendChild(p)}))(L.document.head,r)),n),[])).then(()=>{L.videojs=L.document.defaultView.videojs,t&&t()}).catch(function(n){console.log(n+" failed to load")})},gn=(e,t,n)=>{if(t==="start"&&(e.style.visibility="visible"),t==="none")e.style.visibility=ee;else if(t==="success")e.style.visibility=ee,e.innerHTML="Upload succeeded!";else{const r=Math.round(parseFloat(n));e.innerHTML=`Uploading <span class="ul-upload-progress-label__time">${r}%</span>`,e.style.background=`linear-gradient(to right, #E0E0EB 0%, #E0E0EB ${r}%, #FCFCFD ${r}%, #FCFCFD 100%)`}},lt=(e,t)=>{const n=L.videojs(e.id());return n==null?void 0:n.payload[t]},Mr=(e,t)=>{const n=new(L.videojs.getComponent("Component"))(e);return n.addClass("ul-buttons-panel"),t.map(r=>{n.addChild(r)}),ui(n),n},ui=e=>{e.children().forEach(t=>{if(ie[t.name_]){const n=Ve(ie[t.name_],`ul-${ie[t.name_]}`);t.el_.appendChild(n)}})},Ve=(e,t="")=>{const n=L.document.createElement("span");return n.className="ul-button-text",n.innerHTML=e,n.id=t,n},Nr=(e,t,n,r,o=!1,i)=>{e.addClass("ul-video-player");const s=new(L.videojs.getComponent("Component"))(e);s.addClass("ul-control-panel"),e.progressBar=s.addChild("ProgressControl"),n&&e.src(n),e.audioPlayerPlaceholder=new(L.videojs.getComponent("Component"))(e),e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");const d=n&&n.src?gi(n.src):null;!n||!o&&d?(e.audioPlayerPlaceholder.hide(),L.document.getElementById(`${e.id()}_html5_api`).style.height="100%",d&&e.poster(d)):(e.children()[0].classList.add("vjs-hidden"),L.document.getElementById(`${e.id()}_html5_api`).style.height="0px"),e.on("play",()=>{o||!n||d||hi(e),i==null||i.play()}),e.on("pause",()=>{i==null||i.pause()}),e.on("seeked",()=>{i==null||i.currentTime(e.currentTime())}),e.on("ratechange",()=>{i==null||i.playbackRate(e.playbackRate())}),e.addChild(e.audioPlayerPlaceholder,{},1),s.addChild(t),e.addChild(s),r&&r(e)},pi=(e,t,n,r,o,i,s,d=!1)=>{mn=Date.now();const l=Ke(t,{controls:!1,bigPlayButton:!1,fluid:!1,width:1280,height:720,playsinline:!0,plugins:{record:{audio:!0,video:{mandatory:{minWidth:1280,minHeight:720}},frameWidth:1280,frameHeight:720,maxLength:600,autoMuteDevice:!0}}});if(!l)return;l.payload=n;const{surveyId:p,questionId:h,responseGroupUid:c,visitorId:u,envId:m}=n;let v;const b=f=>{const E=st,I=st+"-audio-only";gn(l.uploadProgressLabel,"none"),le&&le.startTime>=mn&&le.abort();const O=L.document.getElementById("ul-camera-button");f?(l.children()[0].classList.add("vjs-hidden"),T.removeClass(E),T.addClass(I),O.innerHTML=ie.TurnOnCamera,l.audioPlayerPlaceholder.removeClass("vjs-hidden"),v==null||v.getTracks().forEach(C=>{C.stop()}),window.navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then(C=>{v=C,C.getVideoTracks().forEach(M=>{M.enabled=!1}),l.record().onDeviceReady(C)}).catch(l.record().onDeviceError.bind(l.record()))):(v==null||v.getVideoTracks().forEach(C=>{C.enabled=!0}),l.children()[0].classList.remove("vjs-hidden"),l.record().getDevice(),T.removeClass(I),T.addClass(E),O.innerHTML=ie.TurnOffCamera,l.audioPlayerPlaceholder.addClass("vjs-hidden"))},_=new(L.videojs.getComponent("Button"))(l,{clickHandler:()=>{_.hasClass(ee)||(_e({event:"Video Delete Button Clicked",apiBase:r,headers:s,visitorId:u,envId:m,metadata:{questionId:h,responseGroupUid:c,surveyId:p}}),b(l.cameraOff),o(U.DELETE,{}),T.removeClass(ee),_.addClass(ee))}});_.addClass("ul-video-recorder-delete-button"),_.el_.appendChild(Ve(ie.DeleteButton,"ul-delete-button"));const y=L.document.getElementById(t),x=()=>{y.classList.contains("vjs-fullscreen")&&l.cameraOff?y.style.display="table":y.style.display="flex"};x();const T=new(L.videojs.getComponent("Button"))(l,{clickHandler:()=>{l.record().isRecording()||(l.cameraOff=!l.cameraOff,_e({event:"Video Camera Button Clicked",apiBase:r,headers:s,visitorId:n.visitorId,envId:n.envId,metadata:{questionId:h,responseGroupUid:c,surveyId:p,cameraOff:l.cameraOff}}),b(l.cameraOff),!_.hasClass(ee)&&_.addClass(ee),o(U.DELETE,{}),x())}});T.addClass(st),T.el_.appendChild(Ve(ie.TurnOffCamera,"ul-camera-button"));const S=new(L.videojs.getComponent("Button"))(l,{clickHandler:()=>{const f=L.document.getElementById("ul-recorder-toggle");if(l.record().isRecording())l.record().stop(),f&&(f.innerHTML=ie.RecordButton),S.removeClass(at),_.removeClass(ee);else{const E=L.document.getElementById("ul-recording-countdown-screen");if(E)E.remove(),f&&(f.innerHTML=ie.RecordButton),b(l.cameraOff),o(U.DELETE,{}),T.removeClass(ee),_.addClass(ee),S.removeClass(at),j.show();else{S.addClass(at),j.hide(),T.addClass(ee),_.addClass(ee),f&&(f.innerHTML=ie.StopButton);const I=L.document.createElement("div");I.id="ul-recording-countdown-screen",y.insertBefore(I,y.children[1]),I.style.height=`${y.offsetHeight}px`,Or(l,3)}}}});S.addClass("ul-video-recorder-toggle-button"),S.el_.appendChild(Ve(ie.RecordButton,"ul-recorder-toggle"));const w=L.document.createElement("p");w.style.visibility="hidden",w.className="ul-upload-progress-label",e.appendChild(w),l.uploadProgressLabel=w;const k=Mr(l,[_,T,"PlayToggle",S,"FullscreenToggle"]),j=k.children().find(f=>f.name_==="FullscreenToggle");j.hasClass("vjs-disabled")&&j.hide();const R=k.children().find(f=>f.name_==="PlayToggle");R.hide(),_.addClass(ee),Nr(l,k,i,!1,d),l.on("stopRecord",()=>{S.hide(),R.show(),j.show(),_.removeClass(ee)}),l.on("deviceReady",()=>{S.show(),R.hide(),_.addClass(ee)}),((f,E,I,O,C)=>{const{surveyId:M,responseGroupUid:A,visitorId:H,envId:q}=f.payload;f.on("deviceError",function(){console.warn("device error: ",f.deviceErrorCode),f.deviceErrorCode.message==="Permission denied"?(f.deviceButton.addClass("permission-denied"),I&&I(U.ERROR,{type:U.PERMISSION_DENIED}),_e({event:"Video Permission Denied",apiBase:E,headers:C,visitorId:H,envId:q,metadata:{questionId:lt(f,it),responseGroupUid:A,surveyId:M}})):(I&&I(U.ERROR,{type:U.OTHER}),pe(new Error(f.deviceErrorCode.message),"recorderDeviceError",E,C,H,q))}),f.on("error",function(P,G){pe(G||f.error(),"recorderError",E,C,H,q)}),f.on("startRecord",function(P,G){O(f.uploadProgressLabel,"none"),_e({event:"Video Record Start",apiBase:E,headers:C,visitorId:H,envId:q,metadata:{questionId:lt(f,it),responseGroupUid:A,surveyId:M}})}),f.on("finishRecord",async function(){O(f.uploadProgressLabel,"start",0);const P=lt(f,it);if(!M){const X="internal error: missing fields in payload";return I&&I(U.ERROR,{type:U.OTHER}),pe(new Error(X),"finishRecord",E,C,H,q),null}f.record().stopDevice();const G=f.cameraOff?U.MEDIA_TYPE_AUDIO:U.MEDIA_TYPE_VIDEO,J=F.v4();_e({event:"Video Record Finish",apiBase:E,headers:C,visitorId:H,envId:q,metadata:{mediaRecordingUid:J,questionId:P,responseGroupUid:A,surveyId:M,mediaType:G}});const ce={surveyId:M,updatedAt:new Date().toISOString(),mediaType:G,mediaRecordingUid:J};P&&(ce.questionId=P),A&&(ce.responseGroupUid=A),H&&(ce.visitorId=H);const W=await(async()=>{const X=await fetch(`${E}/2/environments/integrations/upload`,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(ce)});if(X.ok){const ye=await X.json();return I&&I(U.UPLOAD_STARTED,{[U.UPLOAD_ID]:ye.upload.id,[U.MEDIA_TYPE]:G,[U.MEDIA_RECORDING_UID]:J}),ye.upload.url}return I&&I(U.ERROR,{type:U.OTHER,response:X}),pe(new Error("failed to get upload response with url"),"finishRecord",E,C,H,q),null})();W&&(le=L.document.defaultView.UpChunk.createUpload({endpoint:W,file:new L.document.defaultView.File([f.recordedData],`recording ${G} ${Date.now()}`),chunkSize:5120}),le.startTime=Date.now(),_e({event:"Video Upload Start",apiBase:E,headers:C,visitorId:H,envId:q,metadata:{mediaRecordingUid:J,questionId:P,responseGroupUid:A,surveyId:M,mediaType:G,url:W}}),le.on("error",X=>{O(f.uploadProgressLabel,"none"),I&&I(U.UPLOAD_FINISHED,{[U.MEDIA_RECORDING_UID]:J}),pe(X,"finishRecord",E,C,H,q)}),le.on("progress",X=>{I&&I(U.UPLOAD_PROGRESS,{[U.MEDIA_RECORDING_UID]:J,[U.UPLOAD_PROGRESS_PCT]:X.detail}),O(f.uploadProgressLabel,"progress",X.detail)}),le.on("success",()=>{O(f.uploadProgressLabel,"success"),I&&I(U.UPLOAD_FINISHED,{[U.MEDIA_RECORDING_UID]:J}),_e({event:"Video Upload Success",apiBase:E,headers:C,visitorId:H,envId:q,metadata:{mediaRecordingUid:J,questionId:P,responseGroupUid:A,surveyId:M,mediaType:G,url:W,elapsedMs:le.startTime&&Date.now()-le.startTime}})}))})})(l,r,o,gn,s);const g=[{name:"microphone"}];!l.cameraOff&&g.push({name:"camera"}),Promise.all(g.map(f=>{var E;return(E=navigator==null?void 0:navigator.permissions)==null?void 0:E.query(f)})).then(f=>{f.reduce((E,I)=>E&I.state==="granted",!0)&&l&&(l.deviceButton&&l.deviceButton.hide(),l.record().getDevice())}).catch(f=>{})},Or=(e,t=3)=>{const n=L.document.getElementById("ul-recording-countdown-screen");n&&t===0?(n.remove(),e.record().start()):n&&(n.innerHTML=`<span class='ul-countdown-text'>Recording in... ${t}</span>`,setTimeout(()=>{Or(e,t-1)},1e3))},Ur=e=>{const t=L.document.createElement("div");return t.className="ul-video-container",t.appendChild((n=>{const r=L.document.createElement("div");return r.className="ul-video-player-loading",r.id=Dt(n),["first","second","third","fourth"].map(o=>{const i=L.document.createElement("div");i.className=o,r.appendChild(i)}),r})(e)),t},_t=(e,t)=>{const n=L.document.createElement("video");n.id=e,n.className="video-js vjs-default-skin ul-video-player-video";const r=L.document.createElement("p");r.className="vjs-no-js",r.innerHTML="To view this video please enable JavaScript, and consider upgrading to a web browser that";const o=L.document.createElement("a");return o.href="https://videojs.com/html5-video-support/",o.target="_blank",o.innerHTML="supports HTML5 video",r.appendChild(o),n.appendChild(r),t.appendChild(n),t},hi=(e,t)=>{e.children()[0].classList.remove("vjs-hidden"),e.audioPlayerPlaceholder.hide(),L.document.getElementById(`${e.id()}_html5_api`).style.height="100%"},Ke=(e,t)=>L.document.getElementById(e)?t?L.videojs(e,t):L.videojs(e):(console.error(`Error in finding player element with ID, ${e}`),null),mi=(e,t,n,r=!1,o="https://api.sprig.com",i=document,s=null,d=null)=>{L.document=i;const l=e+Pr,p=Ur(l);return L.document.addEventListener("securitypolicyviolation",h=>{pe(new Error(`Voice & Video feature violates ${h.violatedDirective} web page CSP policies for the question player.`),"playerDeviceError",o,{})}),Lr(Dr,()=>{L.document.getElementById(Dt(l)).remove(),_t(l,p);const h={playsinline:!0,playbackRates:[.5,1,1.5,2],fill:!0};try{const c=e+pn;_t(c,p);const u=Ke(l,h),m=Ke(c,{muted:!0,...h});if(!u||!m)return;((_,y,x)=>{_.addClass(`ul${pn}`);const T=new(L.videojs.getComponent("Component"))(_);y&&_.src(y),_.addChild(T),x&&x(_)})(m,s,d),s||m.addClass(ee);const v=Mr(u,["PlaybackRateMenuButton","PlayToggle","FullscreenToggle"]),b=v.children().find(_=>_.name_==="FullscreenToggle");b.hasClass("vjs-disabled")&&b.hide(),Nr(u,v,t,n,r,m)}catch(c){return void pe(new Error(`Error when creating video player object ${c}`),"playerDeviceError",o,{})}}),p},gi=e=>{if(!e)return null;const t=e.match(/https:\/\/stream.mux.com\/(.*)/);let n=t?t[1]:null;return n.includes(un)&&(n=n.replace(un,"")),n?`https://image.mux.com/${n}/thumbnail.jpg?time=0`:null},U={UPLOAD_STARTED:"upload.started",UPLOAD_PROGRESS:"upload.progress",UPLOAD_FINISHED:"upload.finished",DELETE:"delete",ERROR:"error",MEDIA_TYPE:"media.type",PERMISSION_DENIED:"permission_denied",OTHER:"other",UPLOAD_ID:"upload.id",UPLOAD_PROGRESS_PCT:"upload.progress.pct",MEDIA_RECORDING_UID:"media.recording.uid",MEDIA_TYPE_VIDEO:"video",MEDIA_TYPE_AUDIO:"audio"},ie={PlaybackRateMenuButton:"Speed",PlayToggle:"Play",FullscreenToggle:"Expand",TurnOnCamera:"Turn on",TurnOffCamera:"Turn off",DeleteButton:"Delete",RecordButton:"Record",StopButton:"Stop",PauseButton:"Pause"},xe="ul-card-video__player_recorder",vn="ul-video-btn",dt=0,fn=1,vi=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{apiURL:s,envId:d,handleUploadUpdate:l,headers:p,responseGroupUid:h,surveyId:c,viewDocument:u,visitorId:m}=B(g=>({apiURL:g.apiURL,envId:g.envId,handleUploadUpdate:g.handleUploadUpdate,headers:g.headers,responseGroupUid:g.responseGroupUid,surveyId:g.surveyId,viewDocument:g.viewDocument,visitorId:g.userId})),[v,b]=$(!1),[_,y]=$(null),[x,T]=$(null),[S,w]=$(dt),k=r&&r.videoUrl,j=(g,f)=>{g===U.UPLOAD_STARTED?(y(f[U.UPLOAD_ID]),T(f[U.MEDIA_RECORDING_UID]),b(!0)):g===U.DELETE?(y(null),T(null),b(!1)):g===U.UPLOAD_PROGRESS?isNaN(f[U.UPLOAD_PROGRESS_PCT])?l({mediaRecordingUid:f[U.MEDIA_RECORDING_UID],isComplete:!0}):l({mediaRecordingUid:f[U.MEDIA_RECORDING_UID],progressPct:f[U.UPLOAD_PROGRESS_PCT]}):g===U.UPLOAD_FINISHED&&l({mediaRecordingUid:f[U.MEDIA_RECORDING_UID],isComplete:!0})},R=g=>{g.preventDefault(),g.stopPropagation(),document.getElementById(xe)&&(f=>{const E=f+hn;if(L.document.getElementById(E)&&L.videojs){try{if(!L.videojs(E).record().stream)return}catch{return}L.videojs(E).record().stop(),L.videojs(E).record().stopDevice()}})(xe),_&&x?(l({mediaRecordingUid:x,isSubmitted:!0}),n({value:{mediaRecordingUid:x},questionId:o,type:i})):n({value:null,questionId:o,type:i})};return a("form",{className:N(e,"ul-card--video","fade-in-transition"),id:"ul-video-interview-form",children:[a(ae,{message:t,properties:r}),a(fe,{children:[a("div",{id:"ul-question-player-container",style:{display:S===dt?"":"none"},children:[a("div",{id:xe,ref:g=>{if(g&&g.children.length===0&&!r.hideRecordedPrompt){const f=mi(xe,{src:k,type:"application/x-mpegURL"},void 0,r.mediaType===U.MEDIA_TYPE_AUDIO,s,u);g.appendChild(f)}}}),a(ve,{defaultBody:()=>a("button",{className:`${vn} ul-record-response-btn`,onClick:g=>{g.preventDefault(),g.stopPropagation(),document.getElementById(xe)&&(f=>{const E=Ke(f+Pr);E==null||E.pause()})(xe),w(fn)}}),properties:r})]}),a("div",{style:{display:S===fn?"block":"none"},children:[a("button",{className:`${vn} ul-back-question-btn`,onClick:g=>{g.preventDefault(),g.stopPropagation(),w(dt)},style:{display:r.hideRecordedPrompt?"none":"block"}}),a("div",{id:"ul-recorder-player-container",ref:g=>{if(g&&g.children.length===0){const f=((E,I={},O="https://api.userleap.com",C,M,A,H=!1,q=document)=>{L.document=q;const P=E+hn,G=Ur(P);return L.document.addEventListener("securitypolicyviolation",J=>{pe(new Error(`Voice & Video feature violates ${J.violatedDirective} web page CSP policies for the recorder player.`),"recorderDeviceError",O,A,I.visitorId,I.envId)}),Lr(Dr.concat(ci),()=>{_t(P,G),L.document.getElementById(Dt(P)).remove();try{pi(G,P,I,O,C,M,A,H)}catch(J){return void pe(new Error(`Error when creating video recorder player object ${J}`),"recorderDeviceError",O,A,I.visitorId,I.envId)}}),G})(xe,{surveyId:c,responseGroupUid:h,questionId:o,visitorId:m,envId:d},s,j,void 0,{...p,"x-ul-video-recorder-origin":"sdk"},r.mediaType===U.MEDIA_TYPE_AUDIO,u);g.appendChild(f)}}})]})]}),a(be,{children:[a(te,{disabled:!v,onClick:R,children:Ee(r)}),a("button",{className:"ul-card-text__button ul-button-inactive ul-card-skip__button",id:"ul-card-video__skip_button",onClick:R,style:{display:r.required?"none":"block",...v?{display:"none"}:{}},children:It(r)})]})]})},fi=({className:e})=>{const{uploadProgress:t}=B(i=>({uploadProgress:i.uploadProgress}));let n,r;Object.values(t).filter(i=>i.isSubmitted).length>1?(n="Your responses are processing",r="Please keep this tab open until your responses are fully processed."):(n="Your response is processing",r="Please keep this tab open until your response is fully processed.");const o=Math.round(Math.min(99,...Object.values(t).filter(i=>i.isSubmitted).map(i=>i.progressPct||0)));return a("div",{className:N(e,"ul-card--uploading","fade-in-transition"),children:[a("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:"ul-loading-spinner-container",role:"progressbar",children:a("div",{className:"ul-loading-spinner",children:[a("div",{className:"first"}),a("div",{className:"second"}),a("div",{className:"third"}),a("div",{className:"fourth"})]})}),a(ae,{message:`${n} (${o}% complete)`}),a("p",{className:"ul-caption",children:r})]})},_n=({logoOnly:e=!1,style:t={}})=>a("svg",{alt:(e?"Powered by ":"")+"Sprig",width:e?"35":"112",height:"15",viewBox:e?"79 0 31 15":"0 0 112 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"block",...t},children:[!e&&a("path",{d:"M0.648926 12.0181V2.8584H4.21631C6.0127 2.8584 7.25684 4.06445 7.25684 5.86084V5.87354C7.25684 7.66357 6.0127 8.88867 4.21631 8.88867H2.0708V12.0181H0.648926ZM3.86084 4.05811H2.0708V7.69531H3.86084C5.09229 7.69531 5.80957 7.02881 5.80957 5.87988V5.86719C5.80957 4.72461 5.09229 4.05811 3.86084 4.05811ZM11.6621 12.1514C9.63721 12.1514 8.39941 10.7993 8.39941 8.57764V8.56494C8.39941 6.34961 9.64355 4.99121 11.6621 4.99121C13.6743 4.99121 14.9185 6.34326 14.9185 8.56494V8.57764C14.9185 10.7993 13.6807 12.1514 11.6621 12.1514ZM11.6621 11.0024C12.8428 11.0024 13.5156 10.1011 13.5156 8.57764V8.56494C13.5156 7.03516 12.8428 6.14014 11.6621 6.14014C10.4751 6.14014 9.80859 7.03516 9.80859 8.56494V8.57764C9.80859 10.1074 10.4751 11.0024 11.6621 11.0024ZM17.6226 12.0181L15.7183 5.12451H17.1021L18.3398 10.4438H18.4414L19.8633 5.12451H21.1709L22.5928 10.4438H22.7007L23.9321 5.12451H25.2969L23.3989 12.0181H21.9834L20.5552 6.87646H20.4473L19.0254 12.0181H17.6226ZM29.334 12.1514C27.3154 12.1514 26.0967 10.7739 26.0967 8.59033V8.58398C26.0967 6.43213 27.3408 4.99121 29.2642 4.99121C31.1875 4.99121 32.3682 6.38135 32.3682 8.45068V8.93311H27.4805C27.5059 10.2534 28.2295 11.0215 29.3657 11.0215C30.248 11.0215 30.7749 10.5835 30.9399 10.228L30.9653 10.1772L32.292 10.1709L32.2793 10.228C32.0508 11.1357 31.0986 12.1514 29.334 12.1514ZM29.2705 6.12109C28.3311 6.12109 27.6201 6.76221 27.4995 7.94922H31.0034C30.8955 6.71777 30.2036 6.12109 29.2705 6.12109ZM34.0059 12.0181V5.12451H35.3833V6.16553H35.4849C35.7324 5.43555 36.3735 5.00391 37.2939 5.00391C37.5161 5.00391 37.7573 5.03564 37.897 5.06738V6.33691C37.6494 6.28613 37.4146 6.25439 37.1543 6.25439C36.1006 6.25439 35.3833 6.90186 35.3833 7.89844V12.0181H34.0059ZM41.9277 12.1514C39.9092 12.1514 38.6904 10.7739 38.6904 8.59033V8.58398C38.6904 6.43213 39.9346 4.99121 41.8579 4.99121C43.7812 4.99121 44.9619 6.38135 44.9619 8.45068V8.93311H40.0742C40.0996 10.2534 40.8232 11.0215 41.9595 11.0215C42.8418 11.0215 43.3687 10.5835 43.5337 10.228L43.5591 10.1772L44.8857 10.1709L44.873 10.228C44.6445 11.1357 43.6924 12.1514 41.9277 12.1514ZM41.8643 6.12109C40.9248 6.12109 40.2139 6.76221 40.0933 7.94922H43.5972C43.4893 6.71777 42.7974 6.12109 41.8643 6.12109ZM49.1133 12.1323C47.3804 12.1323 46.2568 10.7422 46.2568 8.57764V8.56494C46.2568 6.38135 47.3613 5.00391 49.1133 5.00391C50.0591 5.00391 50.8652 5.47363 51.2334 6.21631H51.3413V2.42041H52.7124V12.0181H51.3413V10.9326H51.2334C50.8335 11.688 50.0781 12.1323 49.1133 12.1323ZM49.5068 10.958C50.6558 10.958 51.3604 10.0503 51.3604 8.57764V8.56494C51.3604 7.09229 50.6494 6.18457 49.5068 6.18457C48.3516 6.18457 47.6597 7.08594 47.6597 8.56494V8.57764C47.6597 10.0566 48.3516 10.958 49.5068 10.958ZM61.98 12.1323C61.0151 12.1323 60.2598 11.688 59.8599 10.9326H59.7583V12.0181H58.3809V2.42041H59.7583V6.21631H59.8599C60.228 5.47363 61.0342 5.00391 61.98 5.00391C63.7319 5.00391 64.8364 6.38135 64.8364 8.56494V8.57764C64.8364 10.7422 63.7192 12.1323 61.98 12.1323ZM61.5928 10.958C62.7417 10.958 63.4336 10.0566 63.4336 8.57764V8.56494C63.4336 7.08594 62.7417 6.18457 61.5928 6.18457C60.4438 6.18457 59.7329 7.09229 59.7329 8.56494V8.57764C59.7329 10.0503 60.4438 10.958 61.5928 10.958ZM66.8867 14.4429C66.7153 14.4429 66.5122 14.4302 66.3345 14.4111V13.3257C66.4678 13.3447 66.6392 13.3511 66.7979 13.3511C67.439 13.3511 67.8262 13.0781 68.0293 12.3799L68.1309 12.0244L65.6299 5.12451H67.1152L68.8418 10.6343H68.9624L70.6826 5.12451H72.1299L69.5654 12.2847C68.9814 13.9287 68.2832 14.4429 66.8867 14.4429Z",fill:"black",fillOpacity:"0.7"}),a("path",{d:"M81.1088 6.63629C79.6878 6.32154 78.9672 5.76865 78.9672 4.99369C78.9672 4.19299 79.736 3.5886 80.7556 3.5886C81.8066 3.5886 82.5995 4.25285 82.5995 5.13336V5.20352H84.0518V5.13336C84.0518 3.52424 82.6405 2.30774 80.7693 2.30774C79.8676 2.30774 79.0414 2.58451 78.4433 3.08655C78.1463 3.33144 77.9077 3.63818 77.7448 3.98479C77.5818 4.33141 77.4984 4.70934 77.5005 5.09153C77.4946 5.44197 77.5675 5.78934 77.714 6.10857C77.8605 6.42779 78.0769 6.71092 78.3475 6.93752C78.8512 7.37584 79.5659 7.70024 80.4709 7.90299C81.9949 8.23898 82.7676 8.81054 82.7676 9.60094C82.7676 10.4576 81.9258 11.1032 80.813 11.1032C79.6571 11.1032 78.7854 10.3856 78.7854 9.43424V9.36408H77.3318V9.43424C77.3318 11.1167 78.8219 12.3847 80.7973 12.3847C81.7421 12.3847 82.6093 12.0983 83.2393 11.5769C83.5519 11.3237 83.8034 11.0048 83.9753 10.6433C84.1472 10.2818 84.2352 9.88702 84.2329 9.48766C84.2329 8.05875 83.1833 7.09907 81.1088 6.63629Z",fill:"black",fillOpacity:"0.7"}),a("path",{d:"M89.2394 4.68276C88.6963 4.67605 88.1596 4.79915 87.6751 5.04156C87.1905 5.28397 86.7725 5.63851 86.4566 6.07497V4.85204H85.0747V14.8479H86.4566V11.0356C86.7725 11.472 87.1906 11.8265 87.6751 12.0688C88.1596 12.3111 88.6963 12.434 89.2394 12.4272C91.3836 12.4272 93 10.7627 93 8.55495C93 6.34723 91.3836 4.68276 89.2394 4.68276ZM91.5608 8.84202C91.5057 9.41605 91.2512 9.95356 90.8406 10.3633C90.4299 10.773 89.8883 11.0296 89.3078 11.0896C88.5363 11.1669 87.8177 10.9461 87.2841 10.4692C86.7505 9.99222 86.4566 9.3106 86.4566 8.55495C86.4566 7.10159 87.5538 6.00546 89.0087 6.00546C89.7619 6.00546 90.4421 6.29124 90.9171 6.81002C91.407 7.34232 91.6357 8.06385 91.5608 8.84202Z",fill:"black",fillOpacity:"0.7"}),a("path",{d:"M109.95 4.85407V6.06349C109.298 5.18298 108.292 4.68286 107.153 4.68286C105.017 4.68286 103.406 6.31709 103.406 8.48426C103.406 10.6514 105.017 12.285 107.153 12.285C108.296 12.285 109.303 11.79 109.95 10.9185V11.1046C109.95 12.6101 108.993 13.5826 107.513 13.5826C106.513 13.5826 105.68 13.1494 105.284 12.424L105.264 12.3867H103.838L103.871 12.48C104.112 13.1892 104.583 13.8001 105.211 14.2179C105.841 14.6324 106.637 14.8512 107.513 14.8512C108.637 14.8512 109.594 14.4972 110.28 13.8285C110.967 13.1597 111.332 12.2194 111.332 11.1213V4.85407H109.95ZM109.175 10.3502C108.588 10.905 107.752 11.138 106.879 10.9887C106.361 10.8984 105.886 10.6475 105.523 10.2725C105.16 9.89751 104.927 9.41787 104.859 8.90328C104.736 8.03757 104.999 7.21756 105.581 6.655C106.069 6.19093 106.723 5.93643 107.401 5.94699C107.565 5.94713 107.729 5.96026 107.891 5.98625C108.946 6.15489 109.781 7.01609 109.921 8.0852C110.039 8.96507 109.766 9.78958 109.175 10.3502Z",fill:"black",fillOpacity:"0.7"}),a("path",{d:"M101.89 2.12378C101.63 2.06766 101.358 2.11486 101.133 2.25518C100.908 2.39551 100.747 2.61769 100.687 2.87371C100.626 3.12973 100.67 3.39902 100.809 3.62339C100.947 3.84775 101.17 4.00917 101.428 4.07275C101.503 4.08936 101.58 4.09778 101.657 4.09786C101.906 4.09824 102.146 4.0083 102.331 3.84518C102.517 3.68206 102.636 3.45714 102.664 3.21327C102.693 2.9694 102.63 2.72361 102.487 2.5227C102.344 2.32179 102.132 2.17981 101.89 2.12378Z",fill:"black",fillOpacity:"0.7"}),a("path",{d:"M100.967 10.934H99.7755C98.9285 10.934 98.4196 10.3644 98.4196 9.40982C98.4196 8.4791 98.8757 7.36945 99.8054 6.01778L99.8178 5.99976V5.61807L95.8571 5.06453C95.8585 4.90331 95.8162 4.74466 95.7346 4.60501C95.653 4.46536 95.5352 4.34979 95.3932 4.27027C95.0381 4.07718 94.6498 4.07717 94.3279 4.26383C94.1667 4.35799 94.035 4.4945 93.9476 4.65816C93.8602 4.82182 93.8205 5.00623 93.8328 5.19087C93.8452 5.37552 93.9092 5.55315 94.0176 5.70402C94.1261 5.85489 94.2748 5.97309 94.4472 6.04546L93.2151 12.258H94.5833L95.7196 6.35891L97.8593 6.7155C97.284 7.73439 96.9921 8.68442 96.9921 9.53919C96.9921 11.1168 97.9577 12.1498 99.5187 12.2496V12.258H102.346V4.87723H100.967V10.934Z",fill:"black",fillOpacity:"0.7"})]}),_i=()=>{const{border:e,cards:t,forceBrandedLogo:n,headers:r,index:o,marketingUrl:i,showSurveyBrand:s,slugName:d,surveyId:l,viewedCardCount:p}=B(y=>({border:y.border,cards:y.cards,forceBrandedLogo:y.forceBrandedLogo,headers:y.headers,index:y.index,marketingUrl:y.marketingUrl,showSurveyBrand:y.showSurveyBrand,slugName:y.slugName,surveyId:y.surveyId,viewedCardCount:y.viewedCardCount})),h=ne(null),c=t.filter(y=>y.type!=="uploading"&&y.type!=="thanks"),u=((y,x)=>{const T=new Set(["thanks","uploading"]);if(x>=y.length||x<0||T.has(y[x].type))return 0;const S=y.filter(k=>!T.has(k.type));if(x===S.length-1)return 1;const w={[S.length-1]:1,[-1]:0};for(let k=S.length-2;k>=x;k--){const j=S[k],R=Ro(k,j.props.routingOptions);if(R.length===0){w[k]=w[k+1]+1;continue}let g=0,f=jo(j);if(f===null)return S.length-1-x;for(let E=0;E<R.length&&f.length!==0;E++){const{comparator:I,target:O,value:C}=R[E],M=f.filter(A=>{const H=So({value:A},j.type,A),q=mr(A,j.type);return!(H&&I==="answered"||q&&I==="partial"||!H&&!q&&I==="skipped"||I==="given_up"&&To(A)&&A.taskStatus==="given.up"||H&&j.type==="open"&&(I==="contains"||I==="notcontains")||H&&Io(I)&&jt[I](A,C))});if(M.length<f.length){const A=parseInt(String(O),10);if(A!==-1&&A<=k||A>=S.length)return S.length-1-x;g=Math.max(w[A]+1,g)}f=M}f.length>0&&(g=Math.max(w[k+1]+1,g)),w[k]=g}return w[x]})(t,o),m=p+1,v=m/(m+u),b=`${i}?utm_source=survey_branding&utm_medium=website&utm_campaign=${d}&utm_content=${l}${n&&"&utm_term=poweredby_pill"}`;Y(()=>{h.current&&(h.current.style.width=100*v+"%")},[v]);const _=t[o].type==="thanks";return a("footer",{className:"ul-footer "+(r["userleap-platform"]==="link"?"ul-footer__link":""),children:_&&n?a("a",{dir:"ltr",href:b,rel:"noreferrer",target:"_blank",children:a("div",{className:"thank-you-card-link",children:[a("div",{className:"sprig-box-logo",children:a(_n,{logoOnly:!0,style:{margin:"auto"}})}),a("div",{children:a("p",{children:["Capture insights about your own product",a(bn,{style:{display:"inline-flex",marginInlineStart:"4px",verticalAlign:"middle"}})]})})]})}):a(Q,{children:[c.length>1&&a("div",{id:"ul-progress-bar-container",children:a("div",{id:"ul-progress-bar-current",ref:h,style:{border:`1px solid ${e||"#000"}`}})}),s?a("div",{className:n?"yellow-footer-logo":"",style:{marginTop:"4px",marginBottom:"4px"},children:a("a",{href:b,rel:"noreferrer",target:"_blank",children:a("div",{style:{display:"flex"},children:[a(_n,{logoOnly:!1}),n&&a(bn,{style:{display:"block",margin:"auto 0 auto 4px",transform:"rotateY(0deg) rotate(-45deg)"}})]})})}):null]})})},bn=({style:e})=>a("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[a("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),a("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),bi=()=>{const{answers:e,border:t,cards:n,close:r,configureExitOnOverlayClick:o,destroy:i,endCard:s,eventEmitFn:d,fontFamily:l,headers:p,index:h,minScrollableHeight:c,next:u,previewMode:m,productConfig:v,seen:b,showStripes:_,studyType:y,surveyId:x,update:T,useMobileStyling:S,viewDocument:w}=B(C=>({answers:C.answers,border:C.border,cards:C.cards,close:C.close,configureExitOnOverlayClick:C.configureExitOnOverlayClick,destroy:C.destroy,endCard:C.endCard,eventEmitFn:C.eventEmitFn,fontFamily:C.fontFamily,headers:C.headers,index:C.index,previewMode:C.previewMode,productConfig:C.productConfig,minScrollableHeight:C.minScrollableHeight,next:C.next,seen:C.seen,showStripes:C.showStripes,studyType:C.studyType,surveyId:C.surveyId,update:C.update,useMobileStyling:C.useMobileStyling,viewDocument:C.viewDocument})),k=ne(null),j=ne(!1),R=p["userleap-platform"],{props:g,type:f,name:E}=n[h];Y(()=>{k.current&&(k.current.classList.contains("ul-app--visible")||k.current.classList.add("ul-app--visible"),!j.current&&d&&(j.current=!0,d(F.SprigEvent.SurveyAppeared,{name:F.SprigEvent.SurveyAppeared,"survey.id":x})))},[d,x]),Y(()=>{const C=()=>{w.visibilityState==="visible"&&(b(),w.removeEventListener("visibilitychange",C))};return w.addEventListener("visibilitychange",C),C(),()=>{w.removeEventListener("visibilitychange",C)}},[b,w]),Y(()=>{T()},[h,T]),Y(()=>{o(()=>r())},[r,o]);const I=async function(C){u({data:C,completeSurvey:()=>{i(Z.APP_ID)},endCard:s}),Z.resetScrollPosition(w)};if(e){for(const C of e)if(C.questionId===E){let M;if(f==="multiplechoice"){const A=g.options.find(({value:H})=>H===C.value);if(!A)break;M={[A.id]:A.value}}else M=C.value;I({value:M,type:f,questionId:C.questionId});break}}const O=!S&&((v==null?void 0:v.framePosition)==="center"||(v==null?void 0:v.desktopDisplay)==="center-modal"||((v==null?void 0:v.placement)||"").includes("center"));return a("div",{className:N("ul-app",F.shouldDirectEmbed(p)?"ul-app--visible":"ul-app--overlay"),dir:"auto",id:Z.APP_ID,onClick:C=>{var q;const M=window.sprigAPI,A=C.target;if(!M||!A)return;const H=[A,A.parentElement];for(const P of H)if(((q=P==null?void 0:P.tagName)==null?void 0:q.toLowerCase())==="a")return C.preventDefault(),void(M==null?void 0:M.openUrl(P.href))},ref:k,style:{"--theme":t,...l?{fontFamily:l.replace(";","")}:{},...O?{position:"relative"}:{}},children:a("div",{className:"ul-app__container",children:a("div",{className:N(K("ul-card__container",S,y)),style:{...y!=="feedbackButton"||(v==null?void 0:v.desktopDisplay)==="center-modal"?{borderColor:t}:{},...(v==null?void 0:v.desktopDisplay)==="slider"?{margin:"0px"}:{}},children:a("div",{className:"sprig-container",style:{minHeight:c},children:[_&&a("div",{className:"ul-header__container",dir:"ltr",children:a("div",{className:"ul-header",children:"For development purposes only"})}),m&&a("div",{className:"ul-header__container",dir:"ltr",children:a("div",{className:"ul-header",children:"Preview Mode: Response will not be recorded."})}),a("div",{className:N(Mo("ul-card-main-content",R)),children:(()=>{const C={className:"ul-card",next:I,questionId:E,type:f};switch(f){case"consentlegal":return z(Ao,{...C,...g,key:E});case"likert":return z(qo,{...C,...g,key:E});case"matrix":return z($o,{...C,...g,key:E});case"multiplechoice":return z(Go,{...C,...g,key:E});case"multipleselect":return z(Ko,{...C,...g,key:E});case"nps":return z(Yo,{...C,key:E,props:g});case"open":return z(Qo,{...C,...g,key:E});case"recordedtask":return z(si,{...C,...g,key:E});case"texturlprompt":return z(li,{...C,...g,key:E});case"thanks":return z(di,{...C,...g,key:E});case"uploading":return z(fi,{...C,...g,key:E});case"videovoice":return z(vi,{...C,...g,key:E});default:return null}})()}),a(_i,{})]})})})})},Hr=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",yn=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:Hr()};return new MediaRecorder(e,t)},xn=(e,t,n)=>{n[t]=[],e.ondataavailable=function(r){n[t].push(r.data)},e.currentMediaRecordingUid=t,e.start()};function kn(e,t,n,r,o,i){if(e&&e.state!=="inactive"){const{"begin.callback":s}=r,d=e.currentMediaRecordingUid;if(!d)return;s&&s(d),e.onstop=()=>async function(l,p,h,c,u,m,v){const b=B.getState().viewDocument,{"upload.callback":_,"progress.callback":y}=c,x={mediaType:h,updatedAt:new Date().toISOString(),mediaRecordingUid:u,...c["passthrough.data"]},T=await(async(j,R)=>{var f;const g=await fetch(R,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)});if(g.ok){const E=await g.json();return(f=E==null?void 0:E.upload)==null?void 0:f.url}return null})(x,l);if(!T)return void(_&&_(null,{message:"failed to get upload url"}));const S=new Blob(v,{type:Hr()});if(!b.defaultView)return;const w=new b.defaultView.File([S],`recording video ${Date.now()}`),k=m.createUpload({endpoint:T,file:w,chunkSize:5120});k.on("error",j=>{_&&_(null,j)}),k.on("progress",j=>{y&&y(u,j)}),k.on("success",()=>{_&&_(u,!0)})}(t,0,n,r,d,o,i),e.stop()}}const yi={state:{chunks:{}},stopRecording(e){const{uploadApiEndpoint:t,avRecorder:n,screenRecorder:r,UpChunk:o}=this.state,i=this.state.avStream&&this.state.avStream.getVideoTracks().length>0?"video":"audio";this.state.chunks&&t&&o&&(n!=null&&n.currentMediaRecordingUid&&kn(n,t,i,e,o,this.state.chunks[n==null?void 0:n.currentMediaRecordingUid]),r!=null&&r.currentMediaRecordingUid&&kn(r,t,"screen",e,o,this.state.chunks[r==null?void 0:r.currentMediaRecordingUid]))},handleCancelledStream(e){const t=e.getVideoTracks(),n=e.getAudioTracks();let r=t.length&&t[0];r=r||n.length&&n[0],r&&r.addEventListener("ended",()=>{[this.state.avRecorder,this.state.screenRecorder].map(o=>{o&&(o.state==="recording"&&o.stop(),o.stream.getTracks().map(i=>{i.readyState==="live"&&i.stop()}))}),Object.assign(this.state,{avStream:null,captureStream:null,avRecorder:null,screenRecorder:null})})},taskDurationMillisecond(){return this.state.startTime?new Date().getTime()-this.state.startTime.getTime():0},setUpChunk(e){this.state.UpChunk=e},configure(e,t){Object.assign(this.state,t),this.state.uploadApiEndpoint=`${t.apiURL}/2/environments/integrations/upload`,this.state.chunks={},e.on("permission.status",this.permissionStatusCallback.bind(this)),e.on("av.permission",async n=>{this.avPermissionCallback(n)}),e.on("begin.recording",this.beginRecordingCallback.bind(this)),e.on("start.task",this.startTaskCallback.bind(this)),e.on("screen.permission",async n=>{this.screenPermissionCallback(n)}),e.on("finish.task",async n=>{this.finishTaskCallback(n)})},async avPermissionCallback(e){var r,o,i;const{"stream.ready":t,"permission.descriptors":n}=e;try{(r=this.state.avStream)!=null&&r.active&&(this.state.avStream.getTracks().map(s=>s.readyState==="live"&&s.stop()),((o=this.state.captureStream)==null?void 0:o.getAudioTracks().length)===1&&this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])),this.state.avStream=await navigator.mediaDevices.getUserMedia({video:n.includes("camera"),audio:!0}),((i=this.state.captureStream)==null?void 0:i.getAudioTracks().length)===0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.avStream)}catch(s){return console.warn("Error: failed to get permissions: "+s),void(t&&t(null,null))}t&&t(this.state.avStream,this.state.captureStream)},async screenPermissionCallback(e){const{"screen.permission.requested":t,"stream.ready.callback":n}=e;t==null||t(!0);try{this.state.captureStream=await navigator.mediaDevices.getDisplayMedia({video:!0,cursor:"always",displaySurface:"browser",preferCurrentTab:!0})}catch(r){return t==null||t(!1),console.warn("Error: failed to get permissions: "+r),void(n&&n(null,null))}t==null||t(!1),this.state.avStream&&this.state.avStream.getAudioTracks().length>0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.captureStream),n&&n(this.state.avStream||null,this.state.captureStream)},beginRecordingCallback(e){const{"recording.media.types":t,"start.recording.callback":n=()=>{}}=e;if(!t)return;const r=[];if(t.includes("video")&&this.state.avStream){this.state.avRecorder=yn(this.state.avStream);const o=F.v4();xn(this.state.avRecorder,o,this.state.chunks),r.push(o)}if(t.includes("screen")&&this.state.captureStream){this.state.screenRecorder=yn(this.state.captureStream);const o=F.v4();xn(this.state.screenRecorder,o,this.state.chunks),r.push(o)}r&&n&&n(r)},async finishTaskCallback(e){const{"current.index":t,"task.response":n,"task.complete.callback":r}=e;await this.stopRecording(e),r&&r(this.taskDurationMillisecond()),this.state.cards&&this.state.hasEndCard!==void 0&&this.lookAheadAndStopStream(t,n,this.state.cards,this.state.hasEndCard)},startTaskCallback(){this.state.startTime=new Date},permissionStatusCallback(e){var r;const{"permission.status.callback":t}=e,n=this.state.avStream;t&&t(n,!!n&&(n==null?void 0:n.getVideoTracks().length)>0,!!((r=this.state.captureStream)!=null&&r.active),this.state.captureStream)},lookAheadAndStopStream(e,t,n,r){const{avRecorder:o,screenRecorder:i}=this.state,{allResponses:s}=B.getState(),d=gr({cards:n,index:e,hasEndCard:r,allResponses:s});d!==null&&n[d].type==="recordedtask"||[o,i].map(l=>{l&&(l.state==="recording"&&l.stop(),l.stream.getTracks().map(p=>{p.readyState==="live"&&p.stop()}))})}},ze=Object.create(yi);Object.freeze(ze);const xi=({mode:e=null,viewWindow:t,viewDocument:n,trackPageViewUrl:r})=>{const o=n.documentElement;let i;try{i=t.parent.location.href}catch{i=t.location.href}return{mode:e,sw:t.screen.width,sh:t.screen.height,cw:o.clientWidth,ch:o.clientHeight,p:r??i,l:t.navigator.language}},ki={configure:function(e,t=!0){var y;const{answers:n,apiURL:r,endCard:o,eventEmitFn:i,fontFamilyURL:s,frame:d,previewKey:l,viewDocument:p,viewWindow:h}=e,c=F.shouldDirectEmbed(e.headers)?e.frame:p.body,u=e.UpChunk||window.UpChunk,m=F.eventEmitter,v=((x,T)=>{const S=[...x],w=new Set(["videovoice","recordedtask"]);return x.some(k=>w.has(k.type))&&S.push({name:-2,props:{routingOptions:[]},type:"uploading"}),T&&S.push({name:-1,props:{routingOptions:[]},type:"thanks"}),S})(e.cards,!!o);ze.configure(m,{cards:v,hasEndCard:!!o,apiURL:r,UpChunk:u}),B.setState({apiURL:r,answers:n,border:e.border,index:e.startingQuestionIdx||0,cards:v,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,endCard:e.endCard,envId:e.envId,eventEmitFn:i,fontFamily:e.fontFamily,forceBrandedLogo:e.forceBrandedLogo,frame:d,headers:e.headers,hasViewedEmbed:!1,isPreview:e.isPreview,marketingUrl:"https://sprig.com",meta:xi({mode:e.mode,viewWindow:h,viewDocument:p,trackPageViewUrl:e.trackPageViewUrl}),mode:e.mode,previewKey:l,previewMode:e.previewMode,productConfig:e.productConfig,recorder:ze,recorderEventEmitter:m,responseGroupUid:e.responseGroupUid,showStripes:e.showStripes,showSurveyBrand:e.showSurveyBrand,slugName:e.slugName,styleNonce:e.styleNonce,studyType:e.studyType,surveyId:e.surveyId,tabTitle:e.tabTitle,uploadingCardViewed:!1,uploadProgress:{},useMobileStyling:e.useMobileStyling,useDesktopPrototype:e.useDesktopPrototype,userId:e.userId,viewDocument:e.viewDocument,visitorAttributes:e.visitorAttributes,viewedCardCount:e.startingQuestionIdx||0});const{head:b}=p;if(Z.setSurveyStyles({document:p,elementId:"sprig-style",styleString:'html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;min-width:200px;min-height:0;justify-content:center}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026;margin:15px}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.sprig-container{display:flex;flex-direction:column;width:100%;height:fit-content;flex:1 1 auto;min-height:0;justify-content:center}.ul-card__container{background:#fff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;padding:0;min-height:0;position:relative;text-align:center;word-break:break-word;overflow:auto}.ul-card__container--desktop_feedbackButton{box-shadow:unset}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:center;align-self:stretch}.sprig-question-footer-container{align-items:center;width:100%;height:fit-content;display:flex;flex-direction:column;padding:12px 20px 0}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#343442;text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email,.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;z-index:2;height:fit-content}.sprig-border-bottom{border-bottom:1px solid rgba(0,0,0,.1)}.sprig-border-top{border-top:1px solid rgba(0,0,0,.1)}.question-header-container{z-index:1}.sprig-header-container{padding:16px}.question-header-button-container{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;height:fit-content}.ul-card--thanks-content .question-header-button-container{justify-content:center}.sprig-question-body{padding:0 20px;min-height:0;flex-shrink:1;overflow:auto;position:relative;align-self:stretch;width:100%}.sprig-stretch{align-self:stretch}.ul-question{color:#343442;display:block;font-size:17px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-question ol,.ul-question ul,.ul-caption ol,.ul-caption ul{margin-left:1em}.ul-caption{flex:1 0 auto;font-size:14px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start;margin-top:4px}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.select-checkbox{height:16px;width:16px;display:flex;box-sizing:border-box;background-color:"transparent";align-items:center;justify-content:center;border-radius:4px;border:1px solid #b0b5b7;flex-shrink:0}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.footer{width:100%;margin-top:12px;font-size:12px;line-height:12px;color:#000000b3}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{align-self:center;box-shadow:unset;border-radius:unset;border:none!important;position:unset;width:100%}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center;align-self:stretch}.sprig-accordion{width:100%;margin-bottom:8px}.sprig-accordion-body{width:100%;overflow:hidden}.sprig-accordion-header-container{background:transparent;border:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;cursor:pointer;margin:8px 0 0;padding:0;font-family:inherit}.sprig-header-label-container{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;flex:1 1 0}.sprig-header-label{color:#343442;font-size:15px;font-weight:590;line-height:21px;text-align:start;overflow:hidden}.sprig-check-background{flex:0 0 16px;height:16px;width:16px;border-radius:8px;margin-right:8px;background-color:#efefee;display:flex;align-items:center;justify-content:center}.sprig-check{height:9px;width:9px;margin-left:-1px}.sprig-check path{stroke:#506067;stroke-width:1.5}.sprig-caret{height:20px;width:20px;transition-property:transform}.sprig-caret path{stroke:#000}.ul-consent-legal__name-input--mobile{border:2px solid #e6e6e6}.ul-consent-legal__name-input--desktop{border:1px solid #e6e6e6}.ul-consent-legal__name-input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:#6c6c6e80}.ul-consent-legal__name-input:focus{outline:none;background:#fff}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:#00000003}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:#0000000d}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.ul-card--likert__numbers>button{padding:unset}.likert-number--mobile{border:2px solid #e6e6e6}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid #e6e6e6}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;font-size:18px;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley>svg{margin:0 auto}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card--matrix_grid{display:grid;grid-template-columns:max-content repeat(var(--numColumns),minmax(107px,1fr));grid-template-rows:repeat(var(--numRows),min-content);margin:0 auto;row-gap:4px;width:max-content}.ul-matrix-row-options{display:grid;grid-column:2/-1;grid-template-columns:subgrid}.ul-matrix-column-label{font-size:15px;max-width:150px;padding:10px 12px;text-align:center}.ul-card--matrix_container{margin-bottom:16px;overflow:auto}.ul-card--matrix_question_container{display:flex;flex-direction:column}.ul-matrix-scroll-gradient{-webkit-mask-image:linear-gradient(90deg,#000 90%,transparent);mask-image:linear-gradient(90deg,#000 90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl){-webkit-mask-image:linear-gradient(270deg,#000,90%,transparent);mask-image:linear-gradient(270deg,#000,90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl)+.ul-matrix-scroll-arrow{rotate:180deg}.ul-matrix-scroll-arrow{align-self:flex-end;background:none;border:none;color:#000;padding:0;position:absolute;top:45%}.ul-matrix-scroll-arrow:hover{cursor:pointer}.ul-matrix-option-wrapper{align-items:center;background:#f9f9f8;display:flex;justify-content:center;padding:10px 12px}.ul-matrix-last-option{border-start-end-radius:4px;border-end-end-radius:4px}.ul-matrix-row-label{align-items:center;background:#f9f9f8;border-end-start-radius:4px;border-start-start-radius:4px;display:flex;font-size:15px;left:0;right:0;max-width:200px;min-width:100px;padding:10px 12px;position:sticky}.ul-matrix-option-selected{border:6px solid var(--border);box-shadow:none}.ul-card__matrix{max-width:100%}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid #e6e6e6}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid #e6e6e6}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px;padding:unset}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-text{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:#fff}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:-webkit-fill-available}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#fff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:15px;justify-content:center;flex-direction:column}.select-button{align-items:center;background-color:transparent;border-radius:8px;border:1px solid #0b2330;box-shadow:0 0 0 2px #c8cccc;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:#f3f3f3}.select-button:active{background-color:#eee}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;padding:4px 0;z-index:100;background-color:#fff;border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:16px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:#f3f3f3}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:repeating-linear-gradient(120deg,#ebebeb,#ebebeb 24px,#fff 24px,#fff 48px);border-bottom:2px solid #ebebeb;display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;left:0;position:absolute;top:0;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;margin-top:auto;flex-grow:0;width:100%;min-height:10px;height:fit-content;flex-shrink:0}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:#00000003;border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:#00000008}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:#f9c600;border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%;height:0}.close-btn{cursor:pointer;height:16px;margin-inline-end:-10px;position:relative;top:-10px;width:16px;z-index:1;align-self:flex-start;flex-shrink:0}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}#ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px;max-width:250px;margin:16px 0}#ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{align-self:stretch;background:#00000003;border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:0;height:fit-content;line-height:16.5px;margin:0 20px;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}'}),e.customStyles&&Z.setSurveyStyles({document:p,elementId:"ul-custom-style",styleString:e.customStyles,nonce:e.styleNonce}),e.fontFamily&&s&&parent){const x=p.createElement("link");x.rel="stylesheet",x.href=s,b.appendChild(x)}if(!u&&e.cards.some(x=>x.type==="recordedtask")){const x=p.createElement("script");x.src=e.upchunkLibraryURL??"https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js",x.onload=()=>{ze.setUpChunk(h.UpChunk)},x.onerror=()=>{console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure")},b.appendChild(x)}const _=i||((y=d.eventEmitter)==null?void 0:y.emit);_==null||_("verify.view.version",{"view.version":"2.32.3"}),c&&t&&Ie(a(bi,{}),c)}};exports.default=ki;
669
+ `}],Pr="-video-player",pn="-secondary-video-player",hn="-video-recorder";let le,mn;const _e=async({event:e,apiBase:t,headers:n,visitorId:r,envId:o,metadata:i})=>{const s=L.document.documentElement;if(!r||!o)return;const d={event:`SDK - ${e}`,visitorId:r,environmentId:o,metadata:{...i||{},screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:s.clientWidth,clientHeight:s.clientHeight,location:window.location.href,language:navigator.language}};(await fetch(`${t}/sdk/1/visitors/${r}/analytics`,{method:"POST",cache:"no-cache",headers:n,body:JSON.stringify(d)})).ok||console.warn("[Sprig] (ERR-444) Failed to track analytics",e)},pe=async(e,t,n,r,o,i)=>{_e({event:`Video Error ${t}`,apiBase:n,headers:r,visitorId:o,envId:i,metadata:{errorMessage:e.message}});const s=L.document.documentElement,d={screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:s.clientWidth,clientHeight:s.clientHeight,location:window.location.href,language:navigator.language},l={action:t,err:{message:e.message,stack:e.stack},meta:d,vid:o,envId:i};(await fetch(`${n}/sdk/1/errors`,{method:"POST",cache:"no-cache",headers:{...r,"userleap-platform":"video_recorder","x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(l)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",e)},Lr=(e,t)=>{if(e.length===0)return t&&t();Promise.all(e.reduce((n,r)=>(n.push(((o,{type:i,content:s})=>new Promise(function(d,l){let p;i==="script"?(p=L.document.createElement("script"),p.src=s):i==="link"?(p=L.document.createElement("link"),p.rel="stylesheet",p.href=s,p.type="text/css"):(p=L.document.createElement("style"),p.innerHTML=s),p.onload=function(){d(s)},p.onerror=function(){l(s)},p.async=!1,p.id=btoa(s),o.appendChild(p)}))(L.document.head,r)),n),[])).then(()=>{L.videojs=L.document.defaultView.videojs,t&&t()}).catch(function(n){console.log(n+" failed to load")})},gn=(e,t,n)=>{if(t==="start"&&(e.style.visibility="visible"),t==="none")e.style.visibility=ee;else if(t==="success")e.style.visibility=ee,e.innerHTML="Upload succeeded!";else{const r=Math.round(parseFloat(n));e.innerHTML=`Uploading <span class="ul-upload-progress-label__time">${r}%</span>`,e.style.background=`linear-gradient(to right, #E0E0EB 0%, #E0E0EB ${r}%, #FCFCFD ${r}%, #FCFCFD 100%)`}},lt=(e,t)=>{const n=L.videojs(e.id());return n==null?void 0:n.payload[t]},Mr=(e,t)=>{const n=new(L.videojs.getComponent("Component"))(e);return n.addClass("ul-buttons-panel"),t.map(r=>{n.addChild(r)}),ui(n),n},ui=e=>{e.children().forEach(t=>{if(ie[t.name_]){const n=Ve(ie[t.name_],`ul-${ie[t.name_]}`);t.el_.appendChild(n)}})},Ve=(e,t="")=>{const n=L.document.createElement("span");return n.className="ul-button-text",n.innerHTML=e,n.id=t,n},Nr=(e,t,n,r,o=!1,i)=>{e.addClass("ul-video-player");const s=new(L.videojs.getComponent("Component"))(e);s.addClass("ul-control-panel"),e.progressBar=s.addChild("ProgressControl"),n&&e.src(n),e.audioPlayerPlaceholder=new(L.videojs.getComponent("Component"))(e),e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");const d=n&&n.src?gi(n.src):null;!n||!o&&d?(e.audioPlayerPlaceholder.hide(),L.document.getElementById(`${e.id()}_html5_api`).style.height="100%",d&&e.poster(d)):(e.children()[0].classList.add("vjs-hidden"),L.document.getElementById(`${e.id()}_html5_api`).style.height="0px"),e.on("play",()=>{o||!n||d||hi(e),i==null||i.play()}),e.on("pause",()=>{i==null||i.pause()}),e.on("seeked",()=>{i==null||i.currentTime(e.currentTime())}),e.on("ratechange",()=>{i==null||i.playbackRate(e.playbackRate())}),e.addChild(e.audioPlayerPlaceholder,{},1),s.addChild(t),e.addChild(s),r&&r(e)},pi=(e,t,n,r,o,i,s,d=!1)=>{mn=Date.now();const l=Ke(t,{controls:!1,bigPlayButton:!1,fluid:!1,width:1280,height:720,playsinline:!0,plugins:{record:{audio:!0,video:{mandatory:{minWidth:1280,minHeight:720}},frameWidth:1280,frameHeight:720,maxLength:600,autoMuteDevice:!0}}});if(!l)return;l.payload=n;const{surveyId:p,questionId:h,responseGroupUid:c,visitorId:u,envId:m}=n;let v;const b=f=>{const E=st,I=st+"-audio-only";gn(l.uploadProgressLabel,"none"),le&&le.startTime>=mn&&le.abort();const O=L.document.getElementById("ul-camera-button");f?(l.children()[0].classList.add("vjs-hidden"),T.removeClass(E),T.addClass(I),O.innerHTML=ie.TurnOnCamera,l.audioPlayerPlaceholder.removeClass("vjs-hidden"),v==null||v.getTracks().forEach(C=>{C.stop()}),window.navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then(C=>{v=C,C.getVideoTracks().forEach(M=>{M.enabled=!1}),l.record().onDeviceReady(C)}).catch(l.record().onDeviceError.bind(l.record()))):(v==null||v.getVideoTracks().forEach(C=>{C.enabled=!0}),l.children()[0].classList.remove("vjs-hidden"),l.record().getDevice(),T.removeClass(I),T.addClass(E),O.innerHTML=ie.TurnOffCamera,l.audioPlayerPlaceholder.addClass("vjs-hidden"))},_=new(L.videojs.getComponent("Button"))(l,{clickHandler:()=>{_.hasClass(ee)||(_e({event:"Video Delete Button Clicked",apiBase:r,headers:s,visitorId:u,envId:m,metadata:{questionId:h,responseGroupUid:c,surveyId:p}}),b(l.cameraOff),o(U.DELETE,{}),T.removeClass(ee),_.addClass(ee))}});_.addClass("ul-video-recorder-delete-button"),_.el_.appendChild(Ve(ie.DeleteButton,"ul-delete-button"));const y=L.document.getElementById(t),x=()=>{y.classList.contains("vjs-fullscreen")&&l.cameraOff?y.style.display="table":y.style.display="flex"};x();const T=new(L.videojs.getComponent("Button"))(l,{clickHandler:()=>{l.record().isRecording()||(l.cameraOff=!l.cameraOff,_e({event:"Video Camera Button Clicked",apiBase:r,headers:s,visitorId:n.visitorId,envId:n.envId,metadata:{questionId:h,responseGroupUid:c,surveyId:p,cameraOff:l.cameraOff}}),b(l.cameraOff),!_.hasClass(ee)&&_.addClass(ee),o(U.DELETE,{}),x())}});T.addClass(st),T.el_.appendChild(Ve(ie.TurnOffCamera,"ul-camera-button"));const S=new(L.videojs.getComponent("Button"))(l,{clickHandler:()=>{const f=L.document.getElementById("ul-recorder-toggle");if(l.record().isRecording())l.record().stop(),f&&(f.innerHTML=ie.RecordButton),S.removeClass(at),_.removeClass(ee);else{const E=L.document.getElementById("ul-recording-countdown-screen");if(E)E.remove(),f&&(f.innerHTML=ie.RecordButton),b(l.cameraOff),o(U.DELETE,{}),T.removeClass(ee),_.addClass(ee),S.removeClass(at),j.show();else{S.addClass(at),j.hide(),T.addClass(ee),_.addClass(ee),f&&(f.innerHTML=ie.StopButton);const I=L.document.createElement("div");I.id="ul-recording-countdown-screen",y.insertBefore(I,y.children[1]),I.style.height=`${y.offsetHeight}px`,Or(l,3)}}}});S.addClass("ul-video-recorder-toggle-button"),S.el_.appendChild(Ve(ie.RecordButton,"ul-recorder-toggle"));const w=L.document.createElement("p");w.style.visibility="hidden",w.className="ul-upload-progress-label",e.appendChild(w),l.uploadProgressLabel=w;const k=Mr(l,[_,T,"PlayToggle",S,"FullscreenToggle"]),j=k.children().find(f=>f.name_==="FullscreenToggle");j.hasClass("vjs-disabled")&&j.hide();const R=k.children().find(f=>f.name_==="PlayToggle");R.hide(),_.addClass(ee),Nr(l,k,i,!1,d),l.on("stopRecord",()=>{S.hide(),R.show(),j.show(),_.removeClass(ee)}),l.on("deviceReady",()=>{S.show(),R.hide(),_.addClass(ee)}),((f,E,I,O,C)=>{const{surveyId:M,responseGroupUid:A,visitorId:H,envId:q}=f.payload;f.on("deviceError",function(){console.warn("device error: ",f.deviceErrorCode),f.deviceErrorCode.message==="Permission denied"?(f.deviceButton.addClass("permission-denied"),I&&I(U.ERROR,{type:U.PERMISSION_DENIED}),_e({event:"Video Permission Denied",apiBase:E,headers:C,visitorId:H,envId:q,metadata:{questionId:lt(f,it),responseGroupUid:A,surveyId:M}})):(I&&I(U.ERROR,{type:U.OTHER}),pe(new Error(f.deviceErrorCode.message),"recorderDeviceError",E,C,H,q))}),f.on("error",function(P,G){pe(G||f.error(),"recorderError",E,C,H,q)}),f.on("startRecord",function(P,G){O(f.uploadProgressLabel,"none"),_e({event:"Video Record Start",apiBase:E,headers:C,visitorId:H,envId:q,metadata:{questionId:lt(f,it),responseGroupUid:A,surveyId:M}})}),f.on("finishRecord",async function(){O(f.uploadProgressLabel,"start",0);const P=lt(f,it);if(!M){const X="internal error: missing fields in payload";return I&&I(U.ERROR,{type:U.OTHER}),pe(new Error(X),"finishRecord",E,C,H,q),null}f.record().stopDevice();const G=f.cameraOff?U.MEDIA_TYPE_AUDIO:U.MEDIA_TYPE_VIDEO,J=F.v4();_e({event:"Video Record Finish",apiBase:E,headers:C,visitorId:H,envId:q,metadata:{mediaRecordingUid:J,questionId:P,responseGroupUid:A,surveyId:M,mediaType:G}});const ce={surveyId:M,updatedAt:new Date().toISOString(),mediaType:G,mediaRecordingUid:J};P&&(ce.questionId=P),A&&(ce.responseGroupUid=A),H&&(ce.visitorId=H);const W=await(async()=>{const X=await fetch(`${E}/2/environments/integrations/upload`,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(ce)});if(X.ok){const ye=await X.json();return I&&I(U.UPLOAD_STARTED,{[U.UPLOAD_ID]:ye.upload.id,[U.MEDIA_TYPE]:G,[U.MEDIA_RECORDING_UID]:J}),ye.upload.url}return I&&I(U.ERROR,{type:U.OTHER,response:X}),pe(new Error("failed to get upload response with url"),"finishRecord",E,C,H,q),null})();W&&(le=L.document.defaultView.UpChunk.createUpload({endpoint:W,file:new L.document.defaultView.File([f.recordedData],`recording ${G} ${Date.now()}`),chunkSize:5120}),le.startTime=Date.now(),_e({event:"Video Upload Start",apiBase:E,headers:C,visitorId:H,envId:q,metadata:{mediaRecordingUid:J,questionId:P,responseGroupUid:A,surveyId:M,mediaType:G,url:W}}),le.on("error",X=>{O(f.uploadProgressLabel,"none"),I&&I(U.UPLOAD_FINISHED,{[U.MEDIA_RECORDING_UID]:J}),pe(X,"finishRecord",E,C,H,q)}),le.on("progress",X=>{I&&I(U.UPLOAD_PROGRESS,{[U.MEDIA_RECORDING_UID]:J,[U.UPLOAD_PROGRESS_PCT]:X.detail}),O(f.uploadProgressLabel,"progress",X.detail)}),le.on("success",()=>{O(f.uploadProgressLabel,"success"),I&&I(U.UPLOAD_FINISHED,{[U.MEDIA_RECORDING_UID]:J}),_e({event:"Video Upload Success",apiBase:E,headers:C,visitorId:H,envId:q,metadata:{mediaRecordingUid:J,questionId:P,responseGroupUid:A,surveyId:M,mediaType:G,url:W,elapsedMs:le.startTime&&Date.now()-le.startTime}})}))})})(l,r,o,gn,s);const g=[{name:"microphone"}];!l.cameraOff&&g.push({name:"camera"}),Promise.all(g.map(f=>{var E;return(E=navigator==null?void 0:navigator.permissions)==null?void 0:E.query(f)})).then(f=>{f.reduce((E,I)=>E&I.state==="granted",!0)&&l&&(l.deviceButton&&l.deviceButton.hide(),l.record().getDevice())}).catch(f=>{})},Or=(e,t=3)=>{const n=L.document.getElementById("ul-recording-countdown-screen");n&&t===0?(n.remove(),e.record().start()):n&&(n.innerHTML=`<span class='ul-countdown-text'>Recording in... ${t}</span>`,setTimeout(()=>{Or(e,t-1)},1e3))},Ur=e=>{const t=L.document.createElement("div");return t.className="ul-video-container",t.appendChild((n=>{const r=L.document.createElement("div");return r.className="ul-video-player-loading",r.id=Dt(n),["first","second","third","fourth"].map(o=>{const i=L.document.createElement("div");i.className=o,r.appendChild(i)}),r})(e)),t},_t=(e,t)=>{const n=L.document.createElement("video");n.id=e,n.className="video-js vjs-default-skin ul-video-player-video";const r=L.document.createElement("p");r.className="vjs-no-js",r.innerHTML="To view this video please enable JavaScript, and consider upgrading to a web browser that";const o=L.document.createElement("a");return o.href="https://videojs.com/html5-video-support/",o.target="_blank",o.innerHTML="supports HTML5 video",r.appendChild(o),n.appendChild(r),t.appendChild(n),t},hi=(e,t)=>{e.children()[0].classList.remove("vjs-hidden"),e.audioPlayerPlaceholder.hide(),L.document.getElementById(`${e.id()}_html5_api`).style.height="100%"},Ke=(e,t)=>L.document.getElementById(e)?t?L.videojs(e,t):L.videojs(e):(console.error(`Error in finding player element with ID, ${e}`),null),mi=(e,t,n,r=!1,o="https://api.sprig.com",i=document,s=null,d=null)=>{L.document=i;const l=e+Pr,p=Ur(l);return L.document.addEventListener("securitypolicyviolation",h=>{pe(new Error(`Voice & Video feature violates ${h.violatedDirective} web page CSP policies for the question player.`),"playerDeviceError",o,{})}),Lr(Dr,()=>{L.document.getElementById(Dt(l)).remove(),_t(l,p);const h={playsinline:!0,playbackRates:[.5,1,1.5,2],fill:!0};try{const c=e+pn;_t(c,p);const u=Ke(l,h),m=Ke(c,{muted:!0,...h});if(!u||!m)return;((_,y,x)=>{_.addClass(`ul${pn}`);const T=new(L.videojs.getComponent("Component"))(_);y&&_.src(y),_.addChild(T),x&&x(_)})(m,s,d),s||m.addClass(ee);const v=Mr(u,["PlaybackRateMenuButton","PlayToggle","FullscreenToggle"]),b=v.children().find(_=>_.name_==="FullscreenToggle");b.hasClass("vjs-disabled")&&b.hide(),Nr(u,v,t,n,r,m)}catch(c){return void pe(new Error(`Error when creating video player object ${c}`),"playerDeviceError",o,{})}}),p},gi=e=>{if(!e)return null;const t=e.match(/https:\/\/stream.mux.com\/(.*)/);let n=t?t[1]:null;return n.includes(un)&&(n=n.replace(un,"")),n?`https://image.mux.com/${n}/thumbnail.jpg?time=0`:null},U={UPLOAD_STARTED:"upload.started",UPLOAD_PROGRESS:"upload.progress",UPLOAD_FINISHED:"upload.finished",DELETE:"delete",ERROR:"error",MEDIA_TYPE:"media.type",PERMISSION_DENIED:"permission_denied",OTHER:"other",UPLOAD_ID:"upload.id",UPLOAD_PROGRESS_PCT:"upload.progress.pct",MEDIA_RECORDING_UID:"media.recording.uid",MEDIA_TYPE_VIDEO:"video",MEDIA_TYPE_AUDIO:"audio"},ie={PlaybackRateMenuButton:"Speed",PlayToggle:"Play",FullscreenToggle:"Expand",TurnOnCamera:"Turn on",TurnOffCamera:"Turn off",DeleteButton:"Delete",RecordButton:"Record",StopButton:"Stop",PauseButton:"Pause"},xe="ul-card-video__player_recorder",vn="ul-video-btn",dt=0,fn=1,vi=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{apiURL:s,envId:d,handleUploadUpdate:l,headers:p,responseGroupUid:h,surveyId:c,viewDocument:u,visitorId:m}=B(g=>({apiURL:g.apiURL,envId:g.envId,handleUploadUpdate:g.handleUploadUpdate,headers:g.headers,responseGroupUid:g.responseGroupUid,surveyId:g.surveyId,viewDocument:g.viewDocument,visitorId:g.userId})),[v,b]=$(!1),[_,y]=$(null),[x,T]=$(null),[S,w]=$(dt),k=r&&r.videoUrl,j=(g,f)=>{g===U.UPLOAD_STARTED?(y(f[U.UPLOAD_ID]),T(f[U.MEDIA_RECORDING_UID]),b(!0)):g===U.DELETE?(y(null),T(null),b(!1)):g===U.UPLOAD_PROGRESS?isNaN(f[U.UPLOAD_PROGRESS_PCT])?l({mediaRecordingUid:f[U.MEDIA_RECORDING_UID],isComplete:!0}):l({mediaRecordingUid:f[U.MEDIA_RECORDING_UID],progressPct:f[U.UPLOAD_PROGRESS_PCT]}):g===U.UPLOAD_FINISHED&&l({mediaRecordingUid:f[U.MEDIA_RECORDING_UID],isComplete:!0})},R=g=>{g.preventDefault(),g.stopPropagation(),document.getElementById(xe)&&(f=>{const E=f+hn;if(L.document.getElementById(E)&&L.videojs){try{if(!L.videojs(E).record().stream)return}catch{return}L.videojs(E).record().stop(),L.videojs(E).record().stopDevice()}})(xe),_&&x?(l({mediaRecordingUid:x,isSubmitted:!0}),n({value:{mediaRecordingUid:x},questionId:o,type:i})):n({value:null,questionId:o,type:i})};return a("form",{className:N(e,"ul-card--video","fade-in-transition"),id:"ul-video-interview-form",children:[a(ae,{message:t,properties:r}),a(fe,{children:[a("div",{id:"ul-question-player-container",style:{display:S===dt?"":"none"},children:[a("div",{id:xe,ref:g=>{if(g&&g.children.length===0&&!r.hideRecordedPrompt){const f=mi(xe,{src:k,type:"application/x-mpegURL"},void 0,r.mediaType===U.MEDIA_TYPE_AUDIO,s,u);g.appendChild(f)}}}),a(ve,{defaultBody:()=>a("button",{className:`${vn} ul-record-response-btn`,onClick:g=>{g.preventDefault(),g.stopPropagation(),document.getElementById(xe)&&(f=>{const E=Ke(f+Pr);E==null||E.pause()})(xe),w(fn)}}),properties:r})]}),a("div",{style:{display:S===fn?"block":"none"},children:[a("button",{className:`${vn} ul-back-question-btn`,onClick:g=>{g.preventDefault(),g.stopPropagation(),w(dt)},style:{display:r.hideRecordedPrompt?"none":"block"}}),a("div",{id:"ul-recorder-player-container",ref:g=>{if(g&&g.children.length===0){const f=((E,I={},O="https://api.userleap.com",C,M,A,H=!1,q=document)=>{L.document=q;const P=E+hn,G=Ur(P);return L.document.addEventListener("securitypolicyviolation",J=>{pe(new Error(`Voice & Video feature violates ${J.violatedDirective} web page CSP policies for the recorder player.`),"recorderDeviceError",O,A,I.visitorId,I.envId)}),Lr(Dr.concat(ci),()=>{_t(P,G),L.document.getElementById(Dt(P)).remove();try{pi(G,P,I,O,C,M,A,H)}catch(J){return void pe(new Error(`Error when creating video recorder player object ${J}`),"recorderDeviceError",O,A,I.visitorId,I.envId)}}),G})(xe,{surveyId:c,responseGroupUid:h,questionId:o,visitorId:m,envId:d},s,j,void 0,{...p,"x-ul-video-recorder-origin":"sdk"},r.mediaType===U.MEDIA_TYPE_AUDIO,u);g.appendChild(f)}}})]})]}),a(be,{children:[a(te,{disabled:!v,onClick:R,children:Ee(r)}),a("button",{className:"ul-card-text__button ul-button-inactive ul-card-skip__button",id:"ul-card-video__skip_button",onClick:R,style:{display:r.required?"none":"block",...v?{display:"none"}:{}},children:It(r)})]})]})},fi=({className:e})=>{const{uploadProgress:t}=B(i=>({uploadProgress:i.uploadProgress}));let n,r;Object.values(t).filter(i=>i.isSubmitted).length>1?(n="Your responses are processing",r="Please keep this tab open until your responses are fully processed."):(n="Your response is processing",r="Please keep this tab open until your response is fully processed.");const o=Math.round(Math.min(99,...Object.values(t).filter(i=>i.isSubmitted).map(i=>i.progressPct||0)));return a("div",{className:N(e,"ul-card--uploading","fade-in-transition"),children:[a("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:"ul-loading-spinner-container",role:"progressbar",children:a("div",{className:"ul-loading-spinner",children:[a("div",{className:"first"}),a("div",{className:"second"}),a("div",{className:"third"}),a("div",{className:"fourth"})]})}),a(ae,{message:`${n} (${o}% complete)`}),a("p",{className:"ul-caption",children:r})]})},_n=({logoOnly:e=!1,style:t={}})=>a("svg",{alt:(e?"Powered by ":"")+"Sprig",width:e?"35":"112",height:"15",viewBox:e?"79 0 31 15":"0 0 112 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"block",...t},children:[!e&&a("path",{d:"M0.648926 12.0181V2.8584H4.21631C6.0127 2.8584 7.25684 4.06445 7.25684 5.86084V5.87354C7.25684 7.66357 6.0127 8.88867 4.21631 8.88867H2.0708V12.0181H0.648926ZM3.86084 4.05811H2.0708V7.69531H3.86084C5.09229 7.69531 5.80957 7.02881 5.80957 5.87988V5.86719C5.80957 4.72461 5.09229 4.05811 3.86084 4.05811ZM11.6621 12.1514C9.63721 12.1514 8.39941 10.7993 8.39941 8.57764V8.56494C8.39941 6.34961 9.64355 4.99121 11.6621 4.99121C13.6743 4.99121 14.9185 6.34326 14.9185 8.56494V8.57764C14.9185 10.7993 13.6807 12.1514 11.6621 12.1514ZM11.6621 11.0024C12.8428 11.0024 13.5156 10.1011 13.5156 8.57764V8.56494C13.5156 7.03516 12.8428 6.14014 11.6621 6.14014C10.4751 6.14014 9.80859 7.03516 9.80859 8.56494V8.57764C9.80859 10.1074 10.4751 11.0024 11.6621 11.0024ZM17.6226 12.0181L15.7183 5.12451H17.1021L18.3398 10.4438H18.4414L19.8633 5.12451H21.1709L22.5928 10.4438H22.7007L23.9321 5.12451H25.2969L23.3989 12.0181H21.9834L20.5552 6.87646H20.4473L19.0254 12.0181H17.6226ZM29.334 12.1514C27.3154 12.1514 26.0967 10.7739 26.0967 8.59033V8.58398C26.0967 6.43213 27.3408 4.99121 29.2642 4.99121C31.1875 4.99121 32.3682 6.38135 32.3682 8.45068V8.93311H27.4805C27.5059 10.2534 28.2295 11.0215 29.3657 11.0215C30.248 11.0215 30.7749 10.5835 30.9399 10.228L30.9653 10.1772L32.292 10.1709L32.2793 10.228C32.0508 11.1357 31.0986 12.1514 29.334 12.1514ZM29.2705 6.12109C28.3311 6.12109 27.6201 6.76221 27.4995 7.94922H31.0034C30.8955 6.71777 30.2036 6.12109 29.2705 6.12109ZM34.0059 12.0181V5.12451H35.3833V6.16553H35.4849C35.7324 5.43555 36.3735 5.00391 37.2939 5.00391C37.5161 5.00391 37.7573 5.03564 37.897 5.06738V6.33691C37.6494 6.28613 37.4146 6.25439 37.1543 6.25439C36.1006 6.25439 35.3833 6.90186 35.3833 7.89844V12.0181H34.0059ZM41.9277 12.1514C39.9092 12.1514 38.6904 10.7739 38.6904 8.59033V8.58398C38.6904 6.43213 39.9346 4.99121 41.8579 4.99121C43.7812 4.99121 44.9619 6.38135 44.9619 8.45068V8.93311H40.0742C40.0996 10.2534 40.8232 11.0215 41.9595 11.0215C42.8418 11.0215 43.3687 10.5835 43.5337 10.228L43.5591 10.1772L44.8857 10.1709L44.873 10.228C44.6445 11.1357 43.6924 12.1514 41.9277 12.1514ZM41.8643 6.12109C40.9248 6.12109 40.2139 6.76221 40.0933 7.94922H43.5972C43.4893 6.71777 42.7974 6.12109 41.8643 6.12109ZM49.1133 12.1323C47.3804 12.1323 46.2568 10.7422 46.2568 8.57764V8.56494C46.2568 6.38135 47.3613 5.00391 49.1133 5.00391C50.0591 5.00391 50.8652 5.47363 51.2334 6.21631H51.3413V2.42041H52.7124V12.0181H51.3413V10.9326H51.2334C50.8335 11.688 50.0781 12.1323 49.1133 12.1323ZM49.5068 10.958C50.6558 10.958 51.3604 10.0503 51.3604 8.57764V8.56494C51.3604 7.09229 50.6494 6.18457 49.5068 6.18457C48.3516 6.18457 47.6597 7.08594 47.6597 8.56494V8.57764C47.6597 10.0566 48.3516 10.958 49.5068 10.958ZM61.98 12.1323C61.0151 12.1323 60.2598 11.688 59.8599 10.9326H59.7583V12.0181H58.3809V2.42041H59.7583V6.21631H59.8599C60.228 5.47363 61.0342 5.00391 61.98 5.00391C63.7319 5.00391 64.8364 6.38135 64.8364 8.56494V8.57764C64.8364 10.7422 63.7192 12.1323 61.98 12.1323ZM61.5928 10.958C62.7417 10.958 63.4336 10.0566 63.4336 8.57764V8.56494C63.4336 7.08594 62.7417 6.18457 61.5928 6.18457C60.4438 6.18457 59.7329 7.09229 59.7329 8.56494V8.57764C59.7329 10.0503 60.4438 10.958 61.5928 10.958ZM66.8867 14.4429C66.7153 14.4429 66.5122 14.4302 66.3345 14.4111V13.3257C66.4678 13.3447 66.6392 13.3511 66.7979 13.3511C67.439 13.3511 67.8262 13.0781 68.0293 12.3799L68.1309 12.0244L65.6299 5.12451H67.1152L68.8418 10.6343H68.9624L70.6826 5.12451H72.1299L69.5654 12.2847C68.9814 13.9287 68.2832 14.4429 66.8867 14.4429Z",fill:"black",fillOpacity:"0.7"}),a("path",{d:"M81.1088 6.63629C79.6878 6.32154 78.9672 5.76865 78.9672 4.99369C78.9672 4.19299 79.736 3.5886 80.7556 3.5886C81.8066 3.5886 82.5995 4.25285 82.5995 5.13336V5.20352H84.0518V5.13336C84.0518 3.52424 82.6405 2.30774 80.7693 2.30774C79.8676 2.30774 79.0414 2.58451 78.4433 3.08655C78.1463 3.33144 77.9077 3.63818 77.7448 3.98479C77.5818 4.33141 77.4984 4.70934 77.5005 5.09153C77.4946 5.44197 77.5675 5.78934 77.714 6.10857C77.8605 6.42779 78.0769 6.71092 78.3475 6.93752C78.8512 7.37584 79.5659 7.70024 80.4709 7.90299C81.9949 8.23898 82.7676 8.81054 82.7676 9.60094C82.7676 10.4576 81.9258 11.1032 80.813 11.1032C79.6571 11.1032 78.7854 10.3856 78.7854 9.43424V9.36408H77.3318V9.43424C77.3318 11.1167 78.8219 12.3847 80.7973 12.3847C81.7421 12.3847 82.6093 12.0983 83.2393 11.5769C83.5519 11.3237 83.8034 11.0048 83.9753 10.6433C84.1472 10.2818 84.2352 9.88702 84.2329 9.48766C84.2329 8.05875 83.1833 7.09907 81.1088 6.63629Z",fill:"black",fillOpacity:"0.7"}),a("path",{d:"M89.2394 4.68276C88.6963 4.67605 88.1596 4.79915 87.6751 5.04156C87.1905 5.28397 86.7725 5.63851 86.4566 6.07497V4.85204H85.0747V14.8479H86.4566V11.0356C86.7725 11.472 87.1906 11.8265 87.6751 12.0688C88.1596 12.3111 88.6963 12.434 89.2394 12.4272C91.3836 12.4272 93 10.7627 93 8.55495C93 6.34723 91.3836 4.68276 89.2394 4.68276ZM91.5608 8.84202C91.5057 9.41605 91.2512 9.95356 90.8406 10.3633C90.4299 10.773 89.8883 11.0296 89.3078 11.0896C88.5363 11.1669 87.8177 10.9461 87.2841 10.4692C86.7505 9.99222 86.4566 9.3106 86.4566 8.55495C86.4566 7.10159 87.5538 6.00546 89.0087 6.00546C89.7619 6.00546 90.4421 6.29124 90.9171 6.81002C91.407 7.34232 91.6357 8.06385 91.5608 8.84202Z",fill:"black",fillOpacity:"0.7"}),a("path",{d:"M109.95 4.85407V6.06349C109.298 5.18298 108.292 4.68286 107.153 4.68286C105.017 4.68286 103.406 6.31709 103.406 8.48426C103.406 10.6514 105.017 12.285 107.153 12.285C108.296 12.285 109.303 11.79 109.95 10.9185V11.1046C109.95 12.6101 108.993 13.5826 107.513 13.5826C106.513 13.5826 105.68 13.1494 105.284 12.424L105.264 12.3867H103.838L103.871 12.48C104.112 13.1892 104.583 13.8001 105.211 14.2179C105.841 14.6324 106.637 14.8512 107.513 14.8512C108.637 14.8512 109.594 14.4972 110.28 13.8285C110.967 13.1597 111.332 12.2194 111.332 11.1213V4.85407H109.95ZM109.175 10.3502C108.588 10.905 107.752 11.138 106.879 10.9887C106.361 10.8984 105.886 10.6475 105.523 10.2725C105.16 9.89751 104.927 9.41787 104.859 8.90328C104.736 8.03757 104.999 7.21756 105.581 6.655C106.069 6.19093 106.723 5.93643 107.401 5.94699C107.565 5.94713 107.729 5.96026 107.891 5.98625C108.946 6.15489 109.781 7.01609 109.921 8.0852C110.039 8.96507 109.766 9.78958 109.175 10.3502Z",fill:"black",fillOpacity:"0.7"}),a("path",{d:"M101.89 2.12378C101.63 2.06766 101.358 2.11486 101.133 2.25518C100.908 2.39551 100.747 2.61769 100.687 2.87371C100.626 3.12973 100.67 3.39902 100.809 3.62339C100.947 3.84775 101.17 4.00917 101.428 4.07275C101.503 4.08936 101.58 4.09778 101.657 4.09786C101.906 4.09824 102.146 4.0083 102.331 3.84518C102.517 3.68206 102.636 3.45714 102.664 3.21327C102.693 2.9694 102.63 2.72361 102.487 2.5227C102.344 2.32179 102.132 2.17981 101.89 2.12378Z",fill:"black",fillOpacity:"0.7"}),a("path",{d:"M100.967 10.934H99.7755C98.9285 10.934 98.4196 10.3644 98.4196 9.40982C98.4196 8.4791 98.8757 7.36945 99.8054 6.01778L99.8178 5.99976V5.61807L95.8571 5.06453C95.8585 4.90331 95.8162 4.74466 95.7346 4.60501C95.653 4.46536 95.5352 4.34979 95.3932 4.27027C95.0381 4.07718 94.6498 4.07717 94.3279 4.26383C94.1667 4.35799 94.035 4.4945 93.9476 4.65816C93.8602 4.82182 93.8205 5.00623 93.8328 5.19087C93.8452 5.37552 93.9092 5.55315 94.0176 5.70402C94.1261 5.85489 94.2748 5.97309 94.4472 6.04546L93.2151 12.258H94.5833L95.7196 6.35891L97.8593 6.7155C97.284 7.73439 96.9921 8.68442 96.9921 9.53919C96.9921 11.1168 97.9577 12.1498 99.5187 12.2496V12.258H102.346V4.87723H100.967V10.934Z",fill:"black",fillOpacity:"0.7"})]}),_i=()=>{const{border:e,cards:t,forceBrandedLogo:n,headers:r,index:o,marketingUrl:i,showSurveyBrand:s,slugName:d,surveyId:l,viewedCardCount:p}=B(y=>({border:y.border,cards:y.cards,forceBrandedLogo:y.forceBrandedLogo,headers:y.headers,index:y.index,marketingUrl:y.marketingUrl,showSurveyBrand:y.showSurveyBrand,slugName:y.slugName,surveyId:y.surveyId,viewedCardCount:y.viewedCardCount})),h=ne(null),c=t.filter(y=>y.type!=="uploading"&&y.type!=="thanks"),u=((y,x)=>{const T=new Set(["thanks","uploading"]);if(x>=y.length||x<0||T.has(y[x].type))return 0;const S=y.filter(k=>!T.has(k.type));if(x===S.length-1)return 1;const w={[S.length-1]:1,[-1]:0};for(let k=S.length-2;k>=x;k--){const j=S[k],R=Ro(k,j.props.routingOptions);if(R.length===0){w[k]=w[k+1]+1;continue}let g=0,f=jo(j);if(f===null)return S.length-1-x;for(let E=0;E<R.length&&f.length!==0;E++){const{comparator:I,target:O,value:C}=R[E],M=f.filter(A=>{const H=So({value:A},j.type,A),q=mr(A,j.type);return!(H&&I==="answered"||q&&I==="partial"||!H&&!q&&I==="skipped"||I==="given_up"&&To(A)&&A.taskStatus==="given.up"||H&&j.type==="open"&&(I==="contains"||I==="notcontains")||H&&Io(I)&&jt[I](A,C))});if(M.length<f.length){const A=parseInt(String(O),10);if(A!==-1&&A<=k||A>=S.length)return S.length-1-x;g=Math.max(w[A]+1,g)}f=M}f.length>0&&(g=Math.max(w[k+1]+1,g)),w[k]=g}return w[x]})(t,o),m=p+1,v=m/(m+u),b=`${i}?utm_source=survey_branding&utm_medium=website&utm_campaign=${d}&utm_content=${l}${n&&"&utm_term=poweredby_pill"}`;Y(()=>{h.current&&(h.current.style.width=100*v+"%")},[v]);const _=t[o].type==="thanks";return a("footer",{className:"ul-footer "+(r["userleap-platform"]==="link"?"ul-footer__link":""),children:_&&n?a("a",{dir:"ltr",href:b,rel:"noreferrer",target:"_blank",children:a("div",{className:"thank-you-card-link",children:[a("div",{className:"sprig-box-logo",children:a(_n,{logoOnly:!0,style:{margin:"auto"}})}),a("div",{children:a("p",{children:["Capture insights about your own product",a(bn,{style:{display:"inline-flex",marginInlineStart:"4px",verticalAlign:"middle"}})]})})]})}):a(Q,{children:[c.length>1&&a("div",{id:"ul-progress-bar-container",children:a("div",{id:"ul-progress-bar-current",ref:h,style:{border:`1px solid ${e||"#000"}`}})}),s?a("div",{className:n?"yellow-footer-logo":"",style:{marginTop:"4px",marginBottom:"4px"},children:a("a",{href:b,rel:"noreferrer",target:"_blank",children:a("div",{style:{display:"flex"},children:[a(_n,{logoOnly:!1}),n&&a(bn,{style:{display:"block",margin:"auto 0 auto 4px",transform:"rotateY(0deg) rotate(-45deg)"}})]})})}):null]})})},bn=({style:e})=>a("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[a("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),a("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),bi=()=>{const{answers:e,border:t,cards:n,close:r,configureExitOnOverlayClick:o,destroy:i,endCard:s,eventEmitFn:d,fontFamily:l,headers:p,index:h,minScrollableHeight:c,next:u,previewMode:m,productConfig:v,seen:b,showStripes:_,studyType:y,surveyId:x,update:T,useMobileStyling:S,viewDocument:w}=B(C=>({answers:C.answers,border:C.border,cards:C.cards,close:C.close,configureExitOnOverlayClick:C.configureExitOnOverlayClick,destroy:C.destroy,endCard:C.endCard,eventEmitFn:C.eventEmitFn,fontFamily:C.fontFamily,headers:C.headers,index:C.index,previewMode:C.previewMode,productConfig:C.productConfig,minScrollableHeight:C.minScrollableHeight,next:C.next,seen:C.seen,showStripes:C.showStripes,studyType:C.studyType,surveyId:C.surveyId,update:C.update,useMobileStyling:C.useMobileStyling,viewDocument:C.viewDocument})),k=ne(null),j=ne(!1),R=p["userleap-platform"],{props:g,type:f,name:E}=n[h];Y(()=>{k.current&&(k.current.classList.contains("ul-app--visible")||k.current.classList.add("ul-app--visible"),!j.current&&d&&(j.current=!0,d(F.SprigEvent.SurveyAppeared,{name:F.SprigEvent.SurveyAppeared,"survey.id":x})))},[d,x]),Y(()=>{const C=()=>{w.visibilityState==="visible"&&(b(),w.removeEventListener("visibilitychange",C))};return w.addEventListener("visibilitychange",C),C(),()=>{w.removeEventListener("visibilitychange",C)}},[b,w]),Y(()=>{T()},[h,T]),Y(()=>{o(()=>r())},[r,o]);const I=async function(C){u({data:C,completeSurvey:()=>{i(Z.APP_ID)},endCard:s}),Z.resetScrollPosition(w)};if(e){for(const C of e)if(C.questionId===E){let M;if(f==="multiplechoice"){const A=g.options.find(({value:H})=>H===C.value);if(!A)break;M={[A.id]:A.value}}else M=C.value;I({value:M,type:f,questionId:C.questionId});break}}const O=!S&&((v==null?void 0:v.framePosition)==="center"||(v==null?void 0:v.desktopDisplay)==="center-modal"||((v==null?void 0:v.placement)||"").includes("center"));return a("div",{className:N("ul-app",F.shouldDirectEmbed(p)?"ul-app--visible":"ul-app--overlay"),dir:"auto",id:Z.APP_ID,onClick:C=>{var q;const M=window.sprigAPI,A=C.target;if(!M||!A)return;const H=[A,A.parentElement];for(const P of H)if(((q=P==null?void 0:P.tagName)==null?void 0:q.toLowerCase())==="a")return C.preventDefault(),void(M==null?void 0:M.openUrl(P.href))},ref:k,style:{"--theme":t,...l?{fontFamily:l.replace(";","")}:{},...O?{position:"relative"}:{}},children:a("div",{className:"ul-app__container",children:a("div",{className:N(K("ul-card__container",S,y)),style:{...y!=="feedbackButton"||(v==null?void 0:v.desktopDisplay)==="center-modal"?{borderColor:t}:{},...(v==null?void 0:v.desktopDisplay)==="slider"?{margin:"0px"}:{}},children:a("div",{className:"sprig-container",style:{minHeight:c},children:[_&&a("div",{className:"ul-header__container",dir:"ltr",children:a("div",{className:"ul-header",children:"For development purposes only"})}),m&&a("div",{className:"ul-header__container",dir:"ltr",children:a("div",{className:"ul-header",children:"Preview Mode: Response will not be recorded."})}),a("div",{className:N(Mo("ul-card-main-content",R)),children:(()=>{const C={className:"ul-card",next:I,questionId:E,type:f};switch(f){case"consentlegal":return z(Ao,{...C,...g,key:E});case"likert":return z(qo,{...C,...g,key:E});case"matrix":return z($o,{...C,...g,key:E});case"multiplechoice":return z(Go,{...C,...g,key:E});case"multipleselect":return z(Ko,{...C,...g,key:E});case"nps":return z(Yo,{...C,key:E,props:g});case"open":return z(Qo,{...C,...g,key:E});case"recordedtask":return z(si,{...C,...g,key:E});case"texturlprompt":return z(li,{...C,...g,key:E});case"thanks":return z(di,{...C,...g,key:E});case"uploading":return z(fi,{...C,...g,key:E});case"videovoice":return z(vi,{...C,...g,key:E});default:return null}})()}),a(_i,{})]})})})})},Hr=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",yn=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:Hr()};return new MediaRecorder(e,t)},xn=(e,t,n)=>{n[t]=[],e.ondataavailable=function(r){n[t].push(r.data)},e.currentMediaRecordingUid=t,e.start()};function kn(e,t,n,r,o,i){if(e&&e.state!=="inactive"){const{"begin.callback":s}=r,d=e.currentMediaRecordingUid;if(!d)return;s&&s(d),e.onstop=()=>async function(l,p,h,c,u,m,v){const b=B.getState().viewDocument,{"upload.callback":_,"progress.callback":y}=c,x={mediaType:h,updatedAt:new Date().toISOString(),mediaRecordingUid:u,...c["passthrough.data"]},T=await(async(j,R)=>{var f;const g=await fetch(R,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)});if(g.ok){const E=await g.json();return(f=E==null?void 0:E.upload)==null?void 0:f.url}return null})(x,l);if(!T)return void(_&&_(null,{message:"failed to get upload url"}));const S=new Blob(v,{type:Hr()});if(!b.defaultView)return;const w=new b.defaultView.File([S],`recording video ${Date.now()}`),k=m.createUpload({endpoint:T,file:w,chunkSize:5120});k.on("error",j=>{_&&_(null,j)}),k.on("progress",j=>{y&&y(u,j)}),k.on("success",()=>{_&&_(u,!0)})}(t,0,n,r,d,o,i),e.stop()}}const yi={state:{chunks:{}},stopRecording(e){const{uploadApiEndpoint:t,avRecorder:n,screenRecorder:r,UpChunk:o}=this.state,i=this.state.avStream&&this.state.avStream.getVideoTracks().length>0?"video":"audio";this.state.chunks&&t&&o&&(n!=null&&n.currentMediaRecordingUid&&kn(n,t,i,e,o,this.state.chunks[n==null?void 0:n.currentMediaRecordingUid]),r!=null&&r.currentMediaRecordingUid&&kn(r,t,"screen",e,o,this.state.chunks[r==null?void 0:r.currentMediaRecordingUid]))},handleCancelledStream(e){const t=e.getVideoTracks(),n=e.getAudioTracks();let r=t.length&&t[0];r=r||n.length&&n[0],r&&r.addEventListener("ended",()=>{[this.state.avRecorder,this.state.screenRecorder].map(o=>{o&&(o.state==="recording"&&o.stop(),o.stream.getTracks().map(i=>{i.readyState==="live"&&i.stop()}))}),Object.assign(this.state,{avStream:null,captureStream:null,avRecorder:null,screenRecorder:null})})},taskDurationMillisecond(){return this.state.startTime?new Date().getTime()-this.state.startTime.getTime():0},setUpChunk(e){this.state.UpChunk=e},configure(e,t){Object.assign(this.state,t),this.state.uploadApiEndpoint=`${t.apiURL}/2/environments/integrations/upload`,this.state.chunks={},e.on("permission.status",this.permissionStatusCallback.bind(this)),e.on("av.permission",async n=>{this.avPermissionCallback(n)}),e.on("begin.recording",this.beginRecordingCallback.bind(this)),e.on("start.task",this.startTaskCallback.bind(this)),e.on("screen.permission",async n=>{this.screenPermissionCallback(n)}),e.on("finish.task",async n=>{this.finishTaskCallback(n)})},async avPermissionCallback(e){var r,o,i;const{"stream.ready":t,"permission.descriptors":n}=e;try{(r=this.state.avStream)!=null&&r.active&&(this.state.avStream.getTracks().map(s=>s.readyState==="live"&&s.stop()),((o=this.state.captureStream)==null?void 0:o.getAudioTracks().length)===1&&this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])),this.state.avStream=await navigator.mediaDevices.getUserMedia({video:n.includes("camera"),audio:!0}),((i=this.state.captureStream)==null?void 0:i.getAudioTracks().length)===0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.avStream)}catch(s){return console.warn("Error: failed to get permissions: "+s),void(t&&t(null,null))}t&&t(this.state.avStream,this.state.captureStream)},async screenPermissionCallback(e){const{"screen.permission.requested":t,"stream.ready.callback":n}=e;t==null||t(!0);try{this.state.captureStream=await navigator.mediaDevices.getDisplayMedia({video:!0,cursor:"always",displaySurface:"browser",preferCurrentTab:!0})}catch(r){return t==null||t(!1),console.warn("Error: failed to get permissions: "+r),void(n&&n(null,null))}t==null||t(!1),this.state.avStream&&this.state.avStream.getAudioTracks().length>0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.captureStream),n&&n(this.state.avStream||null,this.state.captureStream)},beginRecordingCallback(e){const{"recording.media.types":t,"start.recording.callback":n=()=>{}}=e;if(!t)return;const r=[];if(t.includes("video")&&this.state.avStream){this.state.avRecorder=yn(this.state.avStream);const o=F.v4();xn(this.state.avRecorder,o,this.state.chunks),r.push(o)}if(t.includes("screen")&&this.state.captureStream){this.state.screenRecorder=yn(this.state.captureStream);const o=F.v4();xn(this.state.screenRecorder,o,this.state.chunks),r.push(o)}r&&n&&n(r)},async finishTaskCallback(e){const{"current.index":t,"task.response":n,"task.complete.callback":r}=e;await this.stopRecording(e),r&&r(this.taskDurationMillisecond()),this.state.cards&&this.state.hasEndCard!==void 0&&this.lookAheadAndStopStream(t,n,this.state.cards,this.state.hasEndCard)},startTaskCallback(){this.state.startTime=new Date},permissionStatusCallback(e){var r;const{"permission.status.callback":t}=e,n=this.state.avStream;t&&t(n,!!n&&(n==null?void 0:n.getVideoTracks().length)>0,!!((r=this.state.captureStream)!=null&&r.active),this.state.captureStream)},lookAheadAndStopStream(e,t,n,r){const{avRecorder:o,screenRecorder:i}=this.state,{allResponses:s}=B.getState(),d=gr({cards:n,index:e,hasEndCard:r,allResponses:s});d!==null&&n[d].type==="recordedtask"||[o,i].map(l=>{l&&(l.state==="recording"&&l.stop(),l.stream.getTracks().map(p=>{p.readyState==="live"&&p.stop()}))})}},ze=Object.create(yi);Object.freeze(ze);const xi=({mode:e=null,viewWindow:t,viewDocument:n,trackPageViewUrl:r})=>{const o=n.documentElement;let i;try{i=t.parent.location.href}catch{i=t.location.href}return{mode:e,sw:t.screen.width,sh:t.screen.height,cw:o.clientWidth,ch:o.clientHeight,p:r??i,l:t.navigator.language}},ki={configure:function(e,t=!0){var y;const{answers:n,apiURL:r,endCard:o,eventEmitFn:i,fontFamilyURL:s,frame:d,previewKey:l,viewDocument:p,viewWindow:h}=e,c=F.shouldDirectEmbed(e.headers)?e.frame:p.body,u=e.UpChunk||window.UpChunk,m=F.eventEmitter,v=((x,T)=>{const S=[...x],w=new Set(["videovoice","recordedtask"]);return x.some(k=>w.has(k.type))&&S.push({name:-2,props:{routingOptions:[]},type:"uploading"}),T&&S.push({name:-1,props:{routingOptions:[]},type:"thanks"}),S})(e.cards,!!o);ze.configure(m,{cards:v,hasEndCard:!!o,apiURL:r,UpChunk:u}),B.setState({apiURL:r,answers:n,border:e.border,index:e.startingQuestionIdx||0,cards:v,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,endCard:e.endCard,envId:e.envId,eventEmitFn:i,fontFamily:e.fontFamily,forceBrandedLogo:e.forceBrandedLogo,frame:d,headers:e.headers,hasViewedEmbed:!1,isPreview:e.isPreview,marketingUrl:"https://sprig.com",meta:xi({mode:e.mode,viewWindow:h,viewDocument:p,trackPageViewUrl:e.trackPageViewUrl}),mode:e.mode,previewKey:l,previewMode:e.previewMode,productConfig:e.productConfig,recorder:ze,recorderEventEmitter:m,responseGroupUid:e.responseGroupUid,showStripes:e.showStripes,showSurveyBrand:e.showSurveyBrand,slugName:e.slugName,styleNonce:e.styleNonce,studyType:e.studyType,surveyId:e.surveyId,tabTitle:e.tabTitle,uploadingCardViewed:!1,uploadProgress:{},useMobileStyling:e.useMobileStyling,useDesktopPrototype:e.useDesktopPrototype,userId:e.userId,viewDocument:e.viewDocument,visitorAttributes:e.visitorAttributes,viewedCardCount:e.startingQuestionIdx||0});const{head:b}=p;if(Z.setSurveyStyles({document:p,elementId:"sprig-style",styleString:'html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;min-width:200px;min-height:0;justify-content:center}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026;margin:15px}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.sprig-container{display:flex;flex-direction:column;width:100%;height:fit-content;flex:1 1 auto;min-height:0;justify-content:center}.ul-card__container{background:#fff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;padding:0;min-height:0;position:relative;text-align:center;word-break:break-word;overflow:auto}.ul-card__container--desktop_feedbackButton{box-shadow:unset}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:center;align-self:stretch}.sprig-question-footer-container{align-items:center;width:100%;height:fit-content;display:flex;flex-direction:column;padding:12px 20px 0}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#343442;text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email,.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;z-index:2;height:fit-content}.sprig-border-bottom{border-bottom:1px solid rgba(0,0,0,.1)}.sprig-border-top{border-top:1px solid rgba(0,0,0,.1)}.question-header-container{z-index:1}.sprig-header-container{padding:16px}.question-header-button-container{display:grid;grid-template-columns:97fr 3fr;align-items:center;justify-content:space-between;width:100%;height:fit-content}.ul-card--thanks-content .question-header-button-container{justify-content:center}.sprig-question-body{padding:0 20px;min-height:0;flex-shrink:1;overflow:auto;position:relative;align-self:stretch;width:100%}.sprig-stretch{align-self:stretch}.ul-question{color:#343442;display:block;font-size:17px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-question ol,.ul-question ul,.ul-caption ol,.ul-caption ul{margin-left:1em}.ul-caption{flex:1 0 auto;font-size:14px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start;margin-top:4px}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.select-checkbox{height:16px;width:16px;display:flex;box-sizing:border-box;background-color:"transparent";align-items:center;justify-content:center;border-radius:4px;border:1px solid #b0b5b7;flex-shrink:0}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.footer{width:100%;margin-top:12px;font-size:12px;line-height:12px;color:#000000b3}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{align-self:center;box-shadow:unset;border-radius:unset;border:none!important;position:unset;width:100%}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center;align-self:stretch}.sprig-accordion{width:100%;margin-bottom:8px}.sprig-accordion-body{width:100%;overflow:hidden}.sprig-accordion-header-container{background:transparent;border:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;cursor:pointer;margin:8px 0 0;padding:0;font-family:inherit}.sprig-header-label-container{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;flex:1 1 0}.sprig-header-label{color:#343442;font-size:15px;font-weight:590;line-height:21px;text-align:start;overflow:hidden}.sprig-check-background{flex:0 0 16px;height:16px;width:16px;border-radius:8px;margin-right:8px;background-color:#efefee;display:flex;align-items:center;justify-content:center}.sprig-check{height:9px;width:9px;margin-left:-1px}.sprig-check path{stroke:#506067;stroke-width:1.5}.sprig-caret{height:20px;width:20px;transition-property:transform}.sprig-caret path{stroke:#000}.ul-consent-legal__name-input--mobile{border:2px solid #e6e6e6}.ul-consent-legal__name-input--desktop{border:1px solid #e6e6e6}.ul-consent-legal__name-input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:#6c6c6e80}.ul-consent-legal__name-input:focus{outline:none;background:#fff}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:#00000003}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:#0000000d}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.ul-card--likert__numbers>button{padding:unset}.likert-number--mobile{border:2px solid #e6e6e6}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid #e6e6e6}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;font-size:18px;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley>svg{margin:0 auto}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card--matrix_grid{display:grid;grid-template-columns:max-content repeat(var(--numColumns),minmax(107px,1fr));grid-template-rows:repeat(var(--numRows),min-content);margin:0 auto;row-gap:4px;width:max-content}.ul-matrix-row-options{display:grid;grid-column:2/-1;grid-template-columns:subgrid}.ul-matrix-column-label{font-size:15px;max-width:150px;padding:10px 12px;text-align:center}.ul-card--matrix_container{margin-bottom:16px;overflow:auto}.ul-card--matrix_question_container{display:flex;flex-direction:column}.ul-matrix-scroll-gradient{-webkit-mask-image:linear-gradient(90deg,#000 90%,transparent);mask-image:linear-gradient(90deg,#000 90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl){-webkit-mask-image:linear-gradient(270deg,#000,90%,transparent);mask-image:linear-gradient(270deg,#000,90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl)+.ul-matrix-scroll-arrow{rotate:180deg}.ul-matrix-scroll-arrow{align-self:flex-end;background:none;border:none;color:#000;padding:0;position:absolute;top:45%}.ul-matrix-scroll-arrow:hover{cursor:pointer}.ul-matrix-option-wrapper{align-items:center;background:#f9f9f8;display:flex;justify-content:center;padding:10px 12px}.ul-matrix-last-option{border-start-end-radius:4px;border-end-end-radius:4px}.ul-matrix-row-label{align-items:center;background:#f9f9f8;border-end-start-radius:4px;border-start-start-radius:4px;display:flex;font-size:15px;left:0;right:0;max-width:200px;min-width:100px;padding:10px 12px;position:sticky}.ul-matrix-option-selected{border:6px solid var(--border);box-shadow:none}.ul-card__matrix{max-width:100%}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid #e6e6e6}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid #e6e6e6}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px;padding:unset}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-text{margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-direction:column;justify-content:center;padding:0}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:#fff}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:-webkit-fill-available}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#fff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:15px;justify-content:center;flex-direction:column}.select-button{align-items:center;background-color:transparent;border-radius:8px;border:1px solid #0b2330;box-shadow:0 0 0 2px #c8cccc;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:#f3f3f3}.select-button:active{background-color:#eee}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;padding:4px 0;z-index:100;background-color:#fff;border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:16px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:#f3f3f3}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:repeating-linear-gradient(120deg,#ebebeb,#ebebeb 24px,#fff 24px,#fff 48px);border-bottom:2px solid #ebebeb;display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;margin-top:auto;flex-grow:0;width:100%;min-height:10px;height:fit-content;flex-shrink:0}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:#00000003;border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:#00000008}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:#f9c600;border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%;height:0}.close-btn{cursor:pointer;height:16px;margin-inline-end:-10px;position:relative;top:-10px;width:16px;z-index:1;align-self:flex-start;justify-self:end;flex-shrink:0}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}#ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px;max-width:250px;margin:16px 0}#ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{align-self:stretch;background:#00000003;border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:0;height:fit-content;line-height:16.5px;margin:0 20px;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}'}),e.customStyles&&Z.setSurveyStyles({document:p,elementId:"ul-custom-style",styleString:e.customStyles,nonce:e.styleNonce}),e.fontFamily&&s&&parent){const x=p.createElement("link");x.rel="stylesheet",x.href=s,b.appendChild(x)}if(!u&&e.cards.some(x=>x.type==="recordedtask")){const x=p.createElement("script");x.src=e.upchunkLibraryURL??"https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js",x.onload=()=>{ze.setUpChunk(h.UpChunk)},x.onerror=()=>{console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure")},b.appendChild(x)}const _=i||((y=d.eventEmitter)==null?void 0:y.emit);_==null||_("verify.view.version",{"view.version":"2.32.4"}),c&&t&&Ie(a(bi,{}),c)}};exports.default=ki;
package/package.json CHANGED
@@ -46,5 +46,5 @@
46
46
  },
47
47
  "homepage": "https://docs.sprig.com/docs/web-javascript",
48
48
  "license": "See LICENSE file",
49
- "version": "2.32.3"
49
+ "version": "2.32.4"
50
50
  }