@sprig-technologies/sprig-browser 2.32.0 → 2.32.2

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.
@@ -0,0 +1,669 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("./core-D-LZZjJw.cjs"),z=require("./metricsReporter-CiE5uf1B.cjs");var Me,P,xn,ye,Rt,kn,lt,wn,De={},Cn=[],Or=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Fe=Array.isArray;function me(e,t){for(var n in t)e[n]=t[n];return e}function En(e){var t=e.parentNode;t&&t.removeChild(e)}function $(e,t,n){var r,o,i,a={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?Me.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return Re(e,a,r,o,null)}function Re(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??++xn,__i:-1,__u:0};return o==null&&P.vnode!=null&&P.vnode(i),i}function Sn(){return{current:null}}function ee(e){return e.children}function ae(e,t){this.props=e,this.context=t}function Ee(e,t){if(t==null)return e.__?Ee(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"?Ee(e):null}function jn(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 jn(e)}}function dt(e){(!e.__d&&(e.__d=!0)&&ye.push(e)&&!$e.__r++||Rt!==P.debounceRendering)&&((Rt=P.debounceRendering)||kn)($e)}function $e(){var e,t,n,r,o,i,a,c,s;for(ye.sort(lt);e=ye.shift();)e.__d&&(t=ye.length,r=void 0,i=(o=(n=e).__v).__e,c=[],s=[],(a=n.__P)&&((r=me({},o)).__v=o.__v+1,P.vnode&&P.vnode(r),ft(a,r,o,n.__n,a.ownerSVGElement!==void 0,32&o.__u?[i]:null,c,i??Ee(o),!!(32&o.__u),s),r.__.__k[r.__i]=r,Tn(c,r,s),r.__e!=i&&jn(r)),ye.length>t&&ye.sort(lt));$e.__r=0}function Pt(e,t,n,r,o,i,a,c,s,p,u){var l,m,h,_,b,v=r&&r.__k||Cn,y=t.length;for(n.__d=s,function(x,T,S){var C,k,j,w,f,g=T.length,R=S.length,I=R,N=0;for(x.__k=[],C=0;C<g;C++)(k=x.__k[C]=(k=T[C])==null||typeof k=="boolean"||typeof k=="function"?null:typeof k=="string"||typeof k=="number"||typeof k=="bigint"||k.constructor==String?Re(null,k,null,null,k):Fe(k)?Re(ee,{children:k},null,null,null):k.constructor===void 0&&k.__b>0?Re(k.type,k.props,k.key,k.ref?k.ref:null,k.__v):k)!=null?(k.__=x,k.__b=x.__b+1,f=Ur(k,S,w=C+N,I),k.__i=f,j=null,f!==-1&&(I--,(j=S[f])&&(j.__u|=131072)),j==null||j.__v===null?(f==-1&&N--,typeof k.type!="function"&&(k.__u|=65536)):f!==w&&(f===w+1?N++:f>w?I>g-w?N+=f-w:N--:N=f<w&&f==w-1?f-w:0,f!==C+N&&(k.__u|=65536))):(j=S[C])&&j.key==null&&j.__e&&(j.__e==x.__d&&(x.__d=Ee(j)),ct(j,j,!1),S[C]=null,I--);if(I)for(C=0;C<R;C++)(j=S[C])!=null&&!(131072&j.__u)&&(j.__e==x.__d&&(x.__d=Ee(j)),ct(j,j))}(n,t,v),s=n.__d,l=0;l<y;l++)(h=n.__k[l])!=null&&typeof h!="boolean"&&typeof h!="function"&&(m=h.__i===-1?De:v[h.__i]||De,h.__i=l,ft(e,h,m,o,i,a,c,s,p,u),_=h.__e,h.ref&&m.ref!=h.ref&&(m.ref&&_t(m.ref,null,h),u.push(h.ref,h.__c||_,h)),b==null&&_!=null&&(b=_),65536&h.__u||m.__k===h.__k?s=In(h,s,e):typeof h.type=="function"&&h.__d!==void 0?s=h.__d:_&&(s=_.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=s,n.__e=b}function In(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=In(r[o],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function he(e,t){return t=t||[],e==null||typeof e=="boolean"||(Fe(e)?e.some(function(n){he(n,t)}):t.push(e)),t}function Ur(e,t,n,r){var o=e.key,i=e.type,a=n-1,c=n+1,s=t[n];if(s===null||s&&o==s.key&&i===s.type)return n;if(r>(s==null||131072&s.__u?0:1))for(;a>=0||c<t.length;){if(a>=0){if((s=t[a])&&!(131072&s.__u)&&o==s.key&&i===s.type)return a;a--}if(c<t.length){if((s=t[c])&&!(131072&s.__u)&&o==s.key&&i===s.type)return c;c++}}return-1}function Dt(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Or.test(t)?n:n+"px"}function Ue(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||Dt(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Dt(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?Mt:Lt,i)):e.removeEventListener(t,i?Mt:Lt,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 Lt(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(P.event?P.event(e):e)}function Mt(e){return this.l[e.type+!0](P.event?P.event(e):e)}function ft(e,t,n,r,o,i,a,c,s,p){var u,l,m,h,_,b,v,y,x,T,S,C,k,j,w,f=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(s=!!(32&n.__u),i=[c=t.__e=n.__e]),(u=P.__b)&&u(t);e:if(typeof f=="function")try{if(y=t.props,x=(u=f.contextType)&&r[u.__c],T=u?x?x.props.value:u.__:r,n.__c?v=(l=t.__c=n.__c).__=l.__E:("prototype"in f&&f.prototype.render?t.__c=l=new f(y,T):(t.__c=l=new ae(y,T),l.constructor=f,l.render=Hr),x&&x.sub(l),l.props=y,l.state||(l.state={}),l.context=T,l.__n=r,m=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),f.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=me({},l.__s)),me(l.__s,f.getDerivedStateFromProps(y,l.__s))),h=l.props,_=l.state,l.__v=t,m)f.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(f.getDerivedStateFromProps==null&&y!==h&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,T),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,T)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=y,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(g){g&&(g.__=t)}),S=0;S<l._sb.length;S++)l.__h.push(l._sb[S]);l._sb=[],l.__h.length&&a.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,T),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(h,_,b)})}if(l.context=T,l.props=y,l.__P=e,l.__e=!1,C=P.__r,k=0,"prototype"in f&&f.prototype.render){for(l.state=l.__s,l.__d=!1,C&&C(t),u=l.render(l.props,l.state,l.context),j=0;j<l._sb.length;j++)l.__h.push(l._sb[j]);l._sb=[]}else do l.__d=!1,C&&C(t),u=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++k<25);l.state=l.__s,l.getChildContext!=null&&(r=me(me({},r),l.getChildContext())),m||l.getSnapshotBeforeUpdate==null||(b=l.getSnapshotBeforeUpdate(h,_)),Pt(e,Fe(w=u!=null&&u.type===ee&&u.key==null?u.props.children:u)?w:[w],t,n,r,o,i,a,c,s,p),l.base=t.__e,t.__u&=-161,l.__h.length&&a.push(l),v&&(l.__E=l.__=null)}catch(g){t.__v=null,s||i!=null?(t.__e=c,t.__u|=s?160:32,i[i.indexOf(c)]=null):(t.__e=n.__e,t.__k=n.__k),P.__e(g,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(g,R,I,N,U,E,B,M,A){var D,q,Y,ce,W,Q,_e,re=I.props,ue=R.props,oe=R.type;if(oe==="svg"&&(U=!0),E!=null){for(D=0;D<E.length;D++)if((W=E[D])&&"setAttribute"in W==!!oe&&(oe?W.localName===oe:W.nodeType===3)){g=W,E[D]=null;break}}if(g==null){if(oe===null)return document.createTextNode(ue);g=U?document.createElementNS("http://www.w3.org/2000/svg",oe):document.createElement(oe,ue.is&&ue),E=null,M=!1}if(oe===null)re===ue||M&&g.data===ue||(g.data=ue);else{if(E=E&&Me.call(g.childNodes),re=I.props||De,!M&&E!=null)for(re={},D=0;D<g.attributes.length;D++)re[(W=g.attributes[D]).name]=W.value;for(D in re)W=re[D],D=="children"||(D=="dangerouslySetInnerHTML"?Y=W:D==="key"||D in ue||Ue(g,D,null,W,U));for(D in ue)W=ue[D],D=="children"?ce=W:D=="dangerouslySetInnerHTML"?q=W:D=="value"?Q=W:D=="checked"?_e=W:D==="key"||M&&typeof W!="function"||re[D]===W||Ue(g,D,W,re[D],U);if(q)M||Y&&(q.__html===Y.__html||q.__html===g.innerHTML)||(g.innerHTML=q.__html),R.__k=[];else if(Y&&(g.innerHTML=""),Pt(g,Fe(ce)?ce:[ce],R,I,N,U&&oe!=="foreignObject",E,B,E?E[0]:I.__k&&Ee(I,0),M,A),E!=null)for(D=E.length;D--;)E[D]!=null&&En(E[D]);M||(D="value",Q!==void 0&&(Q!==g[D]||oe==="progress"&&!Q||oe==="option"&&Q!==re[D])&&Ue(g,D,Q,re[D],!1),D="checked",_e!==void 0&&_e!==g[D]&&Ue(g,D,_e,re[D],!1))}return g}(n.__e,t,n,r,o,i,a,s,p);(u=P.diffed)&&u(t)}function Tn(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)_t(n[r],n[++r],n[++r]);P.__c&&P.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){P.__e(i,o.__v)}})}function _t(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){P.__e(r,n)}}function ct(e,t,n){var r,o;if(P.unmount&&P.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||_t(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){P.__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]&&ct(r[o],t,n||typeof e.type!="function");n||e.__e==null||En(e.__e),e.__=e.__e=e.__d=void 0}function Hr(e,t,n){return this.constructor(e,n)}function Se(e,t,n){var r,o,i,a;P.__&&P.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],a=[],ft(t,e=(!r&&n||t).__k=$(ee,null,[e]),o||De,De,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,a),Tn(i,e,a)}function Rn(e,t){Se(e,t,Rn)}function Br(e,t,n){var r,o,i,a,c=me({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:c[i]=t[i]===void 0&&a!==void 0?a[i]:t[i];return arguments.length>2&&(c.children=arguments.length>3?Me.call(arguments,2):n),Re(e.type,c,r||e.key,o||e.ref,null)}function Pn(e,t){var n={__c:t="__cC"+wn++,__: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(a){this.props.value!==a.value&&o.some(function(c){c.__e=!0,dt(c)})},this.sub=function(a){o.push(a);var c=a.componentWillUnmount;a.componentWillUnmount=function(){o.splice(o.indexOf(a),1),c&&c.call(a)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Me=Cn.slice,P={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(c){e=c}throw e}},xn=0,ae.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=me({},this.state),typeof e=="function"&&(e=e(me({},n),this.props)),e&&me(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),dt(this))},ae.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),dt(this))},ae.prototype.render=ee,ye=[],kn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,lt=function(e,t){return e.__v.__b-t.__v.__b},$e.__r=0,wn=0;var ge,F,Je,Nt,je=0,Dn=[],He=[],Ot=P.__b,Ut=P.__r,Ht=P.diffed,Bt=P.__c,At=P.unmount;function ke(e,t){P.__h&&P.__h(F,e,je||t),je=0;var n=F.__H||(F.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:He}),n.__[e]}function Z(e){return je=1,bt(On,e)}function bt(e,t,n){var r=ke(ge++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):On(void 0,t),function(c){var s=r.__N?r.__N[0]:r.__[0],p=r.t(s,c);s!==p&&(r.__N=[p,r.__[1]],r.__c.setState({}))}],r.__c=F,!F.u)){var o=function(c,s,p){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(m){return m.__c});if(u.every(function(m){return!m.__N}))return!i||i.call(this,c,s,p);var l=!1;return u.forEach(function(m){if(m.__N){var h=m.__[0];m.__=m.__N,m.__N=void 0,h!==m.__[0]&&(l=!0)}}),!(!l&&r.__c.props===c)&&(!i||i.call(this,c,s,p))};F.u=!0;var i=F.shouldComponentUpdate,a=F.componentWillUpdate;F.componentWillUpdate=function(c,s,p){if(this.__e){var u=i;i=void 0,o(c,s,p),i=u}a&&a.call(this,c,s,p)},F.shouldComponentUpdate=o}return r.__N||r.__}function X(e,t){var n=ke(ge++,3);!P.__s&&xt(n.__H,t)&&(n.__=e,n.i=t,F.__H.__h.push(n))}function Ne(e,t){var n=ke(ge++,4);!P.__s&&xt(n.__H,t)&&(n.__=e,n.i=t,F.__h.push(n))}function ne(e){return je=5,Te(function(){return{current:e}},[])}function Ln(e,t,n){je=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 Te(e,t){var n=ke(ge++,7);return xt(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Le(e,t){return je=8,Te(function(){return e},t)}function Mn(e){var t=F.context[e.__c],n=ke(ge++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(F)),t.props.value):e.__}function yt(e,t){P.useDebugValue&&P.useDebugValue(t?t(e):e)}function Nn(){var e=ke(ge++,11);if(!e.__){for(var t=F.__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 Ar(){for(var e;e=Dn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Be),e.__H.__h.forEach(ut),e.__H.__h=[]}catch(t){e.__H.__h=[],P.__e(t,e.__v)}}P.__b=function(e){F=null,Ot&&Ot(e)},P.__r=function(e){Ut&&Ut(e),ge=0;var t=(F=e.__c).__H;t&&(Je===F?(t.__h=[],F.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=He,n.__N=n.i=void 0})):(t.__h.forEach(Be),t.__h.forEach(ut),t.__h=[],ge=0)),Je=F},P.diffed=function(e){Ht&&Ht(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Dn.push(t)!==1&&Nt===P.requestAnimationFrame||((Nt=P.requestAnimationFrame)||Vr)(Ar)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==He&&(n.__=n.__V),n.i=void 0,n.__V=He})),Je=F=null},P.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Be),n.__h=n.__h.filter(function(r){return!r.__||ut(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],P.__e(r,n.__v)}}),Bt&&Bt(e,t)},P.unmount=function(e){At&&At(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&&P.__e(t,n.__v))};var Vt=typeof requestAnimationFrame=="function";function Vr(e){var t,n=function(){clearTimeout(r),Vt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Vt&&(t=requestAnimationFrame(n))}function Be(e){var t=F,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),F=t}function ut(e){var t=F;e.__c=e.__(),F=t}function xt(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function On(e,t){return typeof t=="function"?t(e):t}function Un(e,t){for(var n in t)e[n]=t[n];return e}function pt(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 Hn(e,t){function n(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:pt(this.props,o)}function r(o){return this.shouldComponentUpdate=n,$(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(ze.prototype=new ae).isPureReactComponent=!0,ze.prototype.shouldComponentUpdate=function(e,t){return pt(this.props,e)||pt(this.state,t)};var qt=P.__b;P.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),qt&&qt(e)};var qr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function kt(e){function t(n){var r=Un({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=qr,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ft=function(e,t){return e==null?null:he(he(e).map(t))},Bn={map:Ft,forEach:Ft,count:function(e){return e?he(e).length:0},only:function(e){var t=he(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:he},Fr=P.__e;P.__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)}Fr(e,t,n,r)};var $t=P.unmount;function An(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=Un({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return An(r,t,n)})),e}function Vn(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Vn(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 qn(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Fn(e){var t,n,r;function o(i){if(t||(t=e()).then(function(a){n=a.default||a},function(a){r=a}),r)throw r;if(!n)throw t;return $(n,i)}return o.displayName="Lazy",o.__f=!0,o}function Ce(){this.u=null,this.o=null}P.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),$t&&$t(e)},(Pe.prototype=new ae).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=qn(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(c):c())};n.__R=a;var c=function(){if(!--r.__u){if(r.state.__a){var s=r.state.__a;r.__v.__k[0]=Vn(s,s.__c.__P,s.__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(a,a)},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]=An(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&$(ee,null,e.fallback);return o&&(o.__u&=-33),[$(ee,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 $r(e){return this.getChildContext=function(){return e.context},e.children}function zr(e){var t=this,n=e.i;t.componentWillUnmount=function(){Se(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)}}),Se($($r,{context:t.context},e.__v),t.l)}function $n(e,t){var n=$(zr,{__v:e,i:t});return n.containerInfo=t,n}(Ce.prototype=new ae).__a=function(e){var t=this,n=qn(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()}},Ce.prototype.render=function(e){this.u=null,this.o=new Map;var t=he(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},Ce.prototype.componentDidUpdate=Ce.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,Wr=/^(?: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]/,Zr=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Gr=/[A-Z0-9]/g,Kr=typeof document<"u",Yr=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Wn(e,t,n){return t.__k==null&&(t.textContent=""),Se(e,t),typeof n=="function"&&n(),e?e.__c:null}function Zn(e,t,n){return Rn(e,t),typeof n=="function"&&n(),e?e.__c:null}ae.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ae.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Wt=P.event;function Qr(){}function Jr(){return this.cancelBubble}function Xr(){return this.defaultPrevented}P.event=function(e){return Wt&&(e=Wt(e)),e.persist=Qr,e.isPropagationStopped=Jr,e.isDefaultPrevented=Xr,e.nativeEvent=e};var wt,eo={enumerable:!1,configurable:!0,get:function(){return this.class}},Zt=P.vnode;P.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={};for(var i in n){var a=n[i];if(!(i==="value"&&"defaultValue"in n&&a==null||Kr&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var c=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&a===!0?a="":c==="ondoubleclick"?i="ondblclick":c!=="onchange"||r!=="input"&&r!=="textarea"||Yr(n.type)?c==="onfocus"?i="onfocusin":c==="onblur"?i="onfocusout":Zr.test(i)?i=c:r.indexOf("-")===-1&&Wr.test(i)?i=i.replace(Gr,"-$&").toLowerCase():a===null&&(a=void 0):c=i="oninput",c==="oninput"&&o[i=c]&&(i="oninputCapture"),o[i]=a}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=he(n.children).forEach(function(s){s.props.selected=o.value.indexOf(s.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=he(n.children).forEach(function(s){s.props.selected=o.multiple?o.defaultValue.indexOf(s.props.value)!=-1:o.defaultValue==s.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",eo)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=zn,Zt&&Zt(e)};var Gt=P.__r;P.__r=function(e){Gt&&Gt(e),wt=e.__c};var Kt=P.diffed;P.diffed=function(e){Kt&&Kt(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),wt=null};var Gn={ReactCurrentDispatcher:{current:{readContext:function(e){return wt.__n[e.__c].props.value}}}};function Kn(e){return $.bind(null,e)}function Oe(e){return!!e&&e.$$typeof===zn}function Yn(e){return Oe(e)&&e.type===ee}function Qn(e){return Oe(e)?Br.apply(null,arguments):e}function Jn(e){return!!e.__k&&(Se(null,e),!0)}function Xn(e){return e&&(e.base||e.nodeType===1&&e)||null}var er=function(e,t){return e(t)},tr=function(e,t){return e(t)},nr=ee;function Ct(e){e()}function rr(e){return e}function or(){return[!1,Ct]}var ir=Ne,ar=Oe;function sr(e,t){var n=t(),r=Z({h:{__:n,v:t}}),o=r[0].h,i=r[1];return Ne(function(){o.__=n,o.v=t,Xe(o)&&i({h:o})},[e,n,t]),X(function(){return Xe(o)&&i({h:o}),e(function(){Xe(o)&&i({h:o})})},[e]),n}function Xe(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 to={useState:Z,useId:Nn,useReducer:bt,useEffect:X,useLayoutEffect:Ne,useInsertionEffect:ir,useTransition:or,useDeferredValue:rr,useSyncExternalStore:sr,startTransition:Ct,useRef:ne,useImperativeHandle:Ln,useMemo:Te,useCallback:Le,useContext:Mn,useDebugValue:yt,version:"17.0.2",Children:Bn,render:Wn,hydrate:Zn,unmountComponentAtNode:Jn,createPortal:$n,createElement:$,createContext:Pn,createFactory:Kn,cloneElement:Qn,createRef:Sn,Fragment:ee,isValidElement:Oe,isElement:ar,isFragment:Yn,findDOMNode:Xn,Component:ae,PureComponent:ze,memo:Hn,forwardRef:kt,flushSync:tr,unstable_batchedUpdates:er,StrictMode:nr,Suspense:Pe,SuspenseList:Ce,lazy:Fn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Gn};const no=Object.freeze(Object.defineProperty({__proto__:null,Children:Bn,Component:ae,Fragment:ee,PureComponent:ze,StrictMode:nr,Suspense:Pe,SuspenseList:Ce,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Gn,cloneElement:Qn,createContext:Pn,createElement:$,createFactory:Kn,createPortal:$n,createRef:Sn,default:to,findDOMNode:Xn,flushSync:tr,forwardRef:kt,hydrate:Zn,isElement:ar,isFragment:Yn,isValidElement:Oe,lazy:Fn,memo:Hn,render:Wn,startTransition:Ct,unmountComponentAtNode:Jn,unstable_batchedUpdates:er,useCallback:Le,useContext:Mn,useDebugValue:yt,useDeferredValue:rr,useEffect:X,useErrorBoundary:function(e){var t=ke(ge++,10),n=Z();return t.__=e,F.componentDidCatch||(F.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]},useId:Nn,useImperativeHandle:Ln,useInsertionEffect:ir,useLayoutEffect:Ne,useMemo:Te,useReducer:bt,useRef:ne,useState:Z,useSyncExternalStore:sr,useTransition:or,version:"17.0.2"},Symbol.toStringTag,{value:"Module"})),Yt=e=>{let t;const n=new Set,r=(a,c)=>{const s=typeof a=="function"?a(t):a;if(!Object.is(s,t)){const p=t;t=c??typeof s!="object"?s:Object.assign({},t,s),n.forEach(u=>u(t,p))}},o=()=>t,i={setState:r,getState:o,subscribe:a=>(n.add(a),()=>n.delete(a)),destroy:()=>n.clear()};return t=e(r,o,i),i};function ro(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function oo(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 lr={exports:{}},Qt={};const dr=oo(no);var cr={exports:{}},Jt={},Ie=dr,io=typeof Object.is=="function"?Object.is:function(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t},ao=Ie.useState,so=Ie.useEffect,lo=Ie.useLayoutEffect,co=Ie.useDebugValue;function et(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!io(e,n)}catch{return!0}}var uo=typeof window>"u"||window.document===void 0||window.document.createElement===void 0?function(e,t){return t()}:function(e,t){var n=t(),r=ao({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return lo(function(){o.value=n,o.getSnapshot=t,et(o)&&i({inst:o})},[e,n,t]),so(function(){return et(o)&&i({inst:o}),e(function(){et(o)&&i({inst:o})})},[e]),co(n),n};Jt.useSyncExternalStore=Ie.useSyncExternalStore!==void 0?Ie.useSyncExternalStore:uo,cr.exports=Jt;var Ge=dr,po=cr.exports,mo=typeof Object.is=="function"?Object.is:function(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t},ho=po.useSyncExternalStore,go=Ge.useRef,vo=Ge.useEffect,fo=Ge.useMemo,_o=Ge.useDebugValue;Qt.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=go(null);if(i.current===null){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=fo(function(){function s(h){if(!l){if(l=!0,p=h,h=r(h),o!==void 0&&a.hasValue){var _=a.value;if(o(_,h))return u=_}return u=h}if(_=u,mo(p,h))return _;var b=r(h);return o!==void 0&&o(_,b)?_:(p=h,u=b)}var p,u,l=!1,m=n===void 0?null:n;return[function(){return s(t())},m===null?void 0:function(){return s(m())}]},[t,n,r,o]);var c=ho(e,i[0],i[1]);return vo(function(){a.hasValue=!0,a.value=c},[c]),_o(c),c},lr.exports=Qt;const bo=ro(lr.exports),{useSyncExternalStoreWithSelector:yo}=bo,Xt=e=>{const t=typeof e=="function"?(r=>r?Yt(r):Yt)(e):e,n=(r,o)=>function(i,a=i.getState,c){const s=yo(i.subscribe,i.getState,i.getServerState||i.getState,a,c);return yt(s),s}(t,r,o);return Object.assign(n,t),n},ur=e=>e?Xt(e):Xt,xo=1,ko=2,Et={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)}},wo=(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}},pr=(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},mr=({cards:e,index:t,hasEndCard:n,allResponses:r,uploadProgress:o={}})=>{if(t>=e.length||t<0)return null;const i=e[t];let a=t+1;const c=i.props.routingOptions||[];for(let u=0;u<c.length;u++){const{group:l,target:m}=c[u];if(!(l!=null&&l.length))continue;const h=l[0];if(h.questionIndex===void 0||h.questionIndex>r.length)continue;let _=en({comparator:h.comparator,response:r[h.questionIndex],type:i.type,value:h.value});for(let b=1;b<l.length;b+=2){const v=l[b],y=l[b+1],x=en({comparator:y.comparator,response:r[y.questionIndex],type:e[y.questionIndex].type,value:y.value});v===xo?_&&(_=x):v===ko&&(_||(_=x))}if(_){a=m===-1&&n?e.length-1:m;break}}const s=e.findIndex(u=>u.type==="uploading");let p;return p=s>0?n?e.length-3:e.length-2:e.length-1,t>=p||a===-1||a!==null&&a>p?s>0&&Object.values(o).some(l=>l.isSubmitted&&!l.isComplete)?s:n?e.length-1:null:a===-1?null:a},en=({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":case"multipleselect":return Object.keys(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"&&pr(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 Et[e](t,r)},Co=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(a=>[a.value]):(t=e.props.options.map(a=>a.value),n=!e.props.properties.required,t.reduce((a,c)=>a.concat(a.map(s=>[...s,c])),[[]]).filter(a=>n||a.length>0)):null;case"multiplechoice":{if(!e||!e.props||!e.props.options)return null;const a=e.props.options.map(c=>c.value);return e.props.properties.required||a.push(void 0),a}case"matrix":{if(!((r=e==null?void 0:e.props)!=null&&r.options))return null;const a=e.props.properties.matrixColumn,c=e.props.options,s=c.reduce((u,l)=>(u[l.id]=null,u),{}),p=[{...s,[c[0].id]:a[0].value},c.reduce((u,l)=>(u[l.id]=a[0].value,u),{})];return e.props.properties.required||p.push(s),p}case"likert":{const a=Number((i=(o=e.props)==null?void 0:o.properties)==null?void 0:i.range)||5;return[...Array.from(Array(a).keys()).map(s=>s+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 a=[{taskStatus:"completed"},{taskStatus:"given.up"}];return e.props.properties.required||a.push({taskStatus:"abandoned"}),a}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},Eo=e=>e in Et,So=e=>typeof e=="object"&&e!==null&&"taskStatus"in e,jo=(e,t=[])=>t.reduce((n,r)=>{const{group:o,target:i}=r;if(!(o!=null&&o.length))return[...n];const a=o.filter(c=>!!Number(c)||typeof c=="object"&&c.questionIndex===e).map(c=>{const{comparator:s,value:p}=c;return{comparator:s,target:i,value:p}});return[...n,...a]},[]),tt=new Set(["thanks","uploading"]),V=ur()((e,t)=>({allResponses:[],answers:void 0,apiURL:"",border:"#000000",cards:[],close:async(n=G.APP_ID)=>{const r=t(),{fadeout:o,remove:i,trackHistory:a,studyType:c}=r;await o(n),nt(r)||a({event:"closed"}),z.breadcrumbsLogger.info("SurveyClosing",{surveyId:r.surveyId}),G.ConflictingWidgets.enable(),i({initiator:z.DismissReason.Closed,studyType:c})},configureExitOnOverlayClick:()=>{},customMetadata:{},destroy:async n=>{const{eventEmitFn:r,fadeout:o,remove:i,studyType:a,surveyId:c}=t();r("survey.complete",c),await o(n),G.ConflictingWidgets.enable(),i({initiator:z.DismissReason.Complete,studyType:a})},endCard:{headline:""},envId:"",eventEmitFn:z.eventEmitter.emit.bind(z.eventEmitter),fadeout:async n=>{const{eventEmitFn:r,headers:o,viewDocument:i}=t();return z.shouldDirectEmbed(o)?Promise.resolve():(r(z.SprigEvent.SurveyFadingOut),new Promise(a=>{const c=i.getElementById(n);c?(c.addEventListener("transitionend",()=>{a()}),c.classList.remove("ul-app--visible")):a()}))},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 h,_,b;const{cards:a,destroy:c,index:s,uploadProgress:p}=t(),u=r||((h=p[n])==null?void 0:h.isComplete),l={...p,[n]:{progressPct:u?100:o||((_=p[n])==null?void 0:_.progressPct),isComplete:u,isSubmitted:i||((b=p[n])==null?void 0:b.isSubmitted)}};if(e({uploadProgress:l}),a[s].type!=="uploading")return;const m=Object.entries(p).every(([v,y])=>!y.isSubmitted||y.isComplete||n==v&&r);if(m&&s>=a.length-1)return c(G.APP_ID);e({index:m?s+1:s,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:a,responseGroupUid:c,submit:s,trackHistory:p,uploadProgress:u,viewedCardCount:l}=t(),m=Date.now(),h=[...o],_=h[a],{type:b}=n.data,v={...n.data},y=v.value;(w=>!tt.has(w.type))(_)&&(_.value=y),v.answeredAt=m,delete v.type;const x={response:v,responseGroupUid:c,questionIndex:a};let T=b==="multiplechoice"?Object.values(y).find(w=>w!==!1):y;b==="multipleselect"&&(T=h[a].props.options.reduce((w,f)=>(y[f.id]&&w.push(f.value),w),[]));const S=r.slice(0);S[a]=T,e({allResponses:S});const C=mr({cards:h,index:a,hasEndCard:!!n.endCard,uploadProgress:u,allResponses:S});if(C===null)return x.completedAt=m,s(x),void n.completeSurvey();tt.has(h[C].type)&&(x.completedAt=m);const k=s(x);tt.has(h[C].type)||k.finally(()=>{p({event:"seen",index:C})});const j=h[C];h[C]&&i&&i("survey.question",{qid:j.name,props:j.props}),e({cards:h,hasViewedEmbed:!1,index:C,viewedCardCount:l+1})},pendingRemoveIframeReason:null,previewKey:null,previewMode:void 0,recorder:()=>{},recorderEventEmitter:z.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:a}=t();r&&o===0&&(n(z.SprigEvent.SurveyWillClose,{name:z.SprigEvent.SurveyWillClose,initiator:r,studyType:i,"survey.id":a}),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 a=t();if(!i||nt(a))return;const c={responseGroupUid:i,meta:a.meta,customMetadata:a.customMetadata,responses:[o],completedAt:n,previewKey:a.previewKey},s=await a.trackPromise(z.sprigFetch(`${a.apiURL}/sdk/1/environments/${a.envId}/visitors/${a.userId}/responses/submit`,{body:JSON.stringify(c),headers:a.headers,method:"POST"}));s.ok?a.eventEmitFn(z.SprigEvent.QuestionAnswered,{...o,questionIndex:r}):s.reportError&&(console.warn("[Sprig] (ERR-427) Failed to submit response",s.error),await a.trackPromise(tn(a,"submitResponse",s.error)))},surveyId:0,tabTitle:"",trackHistory:async({event:n,index:r,isNew:o=!1})=>{const i=t();if(nt(i))return;const{cards:a,index:c}=i,s=r!==void 0?a[r]:a[c],p={sid:i.surveyId,qid:s.name,action:n,vid:i.userId,eid:i.envId,isNew:o,responseGroupUid:i.responseGroupUid,previewKey:i.previewKey},u=await i.trackPromise(z.sprigFetch(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`,{body:JSON.stringify(p),headers:i.headers,method:"POST"}));!u.ok&&u.reportError&&(console.warn("[Sprig] (ERR-428) Failed to track survey event",u.error),await i.trackPromise(tn(i,"trackHistory",u.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:a,useMobileStyling:c,surveyId:s,viewDocument:p}=t(),u=n[r],l=u.type==="matrix"&&!(u.props.properties.displayMatrixAsAccordion||c);setTimeout(()=>{var _,b;const[m,h]=G.calculateFrameDimensions(p);z.shouldDirectEmbed(o)?i(z.SprigEvent.SurveyHeight,{name:z.SprigEvent.SurveyHeight,contentFrameHeight:m,"survey.id":s}):((_=a.setHeight)==null||_.call(a,m),c||((b=a.setWidth)==null||b.call(a,l?h:parseInt(G.DEFAULT_WIDTH))))},100)},uploadingCardViewed:!1,uploadProgress:{},useDesktopPrototype:void 0,useMobileStyling:!1,userId:"",viewDocument:window.document,viewedCardCount:0})),nt=e=>!e.userId||e.meta&&e.meta.mode==="test"||e.isPreview||e.previewMode,tn=async(e,t,n)=>{const{mode:r,userId:o,envId:i,apiURL:a,headers:c,viewDocument:s}=e,p=s.documentElement,u={mode:r,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:p.clientWidth,clientHeight:p.clientHeight,location:window.location.href,language:window.navigator.language},l={action:t,err:{message:`${n==null?void 0:n.name} - ${n==null?void 0:n.message}`,stack:n==null?void 0:n.stack},meta:u,vid:o,envId:i};(await z.sprigFetch(`${a}/sdk/1/errors`,{method:"POST",headers:Object.assign({"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},c),body:JSON.stringify(l)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",n)},hr=e=>$("svg",{fill:"none",height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e},$("path",{d:"M17 10L12 15L7 10",stroke:"#0B2330",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})),gr=e=>$("svg",{fill:"none",height:10,viewBox:"0 0 10 10",width:10,xmlns:"http://www.w3.org/2000/svg",...e},$("path",{d:"M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005",stroke:"white",strokeLinecap:"round",strokeWidth:2}));var Io=0;function d(e,t,n,r,o,i){var a,c,s={};for(c in t)c=="ref"?a=t[c]:s[c]=t[c];var p={type:e,props:s,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Io,__i:-1,__u:0,__source:o,__self:i};if(typeof e=="function"&&(a=e.defaultProps))for(c in a)s[c]===void 0&&(s[c]=a[c]);return P.vnode&&P.vnode(p),p}const To=({visible:e})=>d("div",{className:"sprig-check-background",style:{opacity:e?1:0},children:d(gr,{className:"sprig-check"})}),nn="250ms",Ro=kt(({animate:e,children:t,header:n,isOpen:r,onClick:o,showHeaderCheck:i},a)=>{const c=ne(null),[s,p]=Z(0);X(()=>{var m;const l=(m=c.current)==null?void 0:m.getBoundingClientRect();p(r&&l?l.height:0)},[r]);const u=Te(()=>({transition:e?`height ${nn} ease`:"none",height:s}),[s,e]);return d("div",{className:"sprig-accordion",ref:a,children:[d("button",{className:"sprig-accordion-header-container",onClick:o,type:"button",children:[d("div",{className:"sprig-header-label-container",children:[d("span",{className:"sprig-header-label",children:n}),d(To,{visible:i})]}),d(hr,{className:"sprig-caret",style:{transitionDuration:e?nn:"0",transform:r?"rotate(-180deg)":"none"}})]}),d("div",{className:"sprig-accordion-body",style:u,children:d("div",{ref:c,children:t})})]})}),O=(...e)=>e.filter(Boolean).join(" "),K=(e,t,n)=>{const r=t?"--mobile":"--desktop";return`${e+r} ${e+(n?`${r}_${n}`:"")} ${e}`},Po=(e,t)=>`${e} ${e}__${t}`,te=e=>d("button",{...e,className:O("ul-card-text__button",e.className),id:"ul-card-text__button"}),rn=({plainText:e,richText:t,id:n,className:r,isHeader:o})=>t?d("div",{className:r,dangerouslySetInnerHTML:{__html:t},id:n}):e?d(o?"h1":"p",{className:r,id:n,children:e}):null,se=({message:e,properties:t})=>{const n=t==null?void 0:t.captionText;return d("div",{className:"question-header-container",children:[d(rn,{className:"ul-question",id:"ul-question",isHeader:!0,plainText:e,richText:t==null?void 0:t.questionHtml}),d(rn,{className:"ul-caption",id:"ul-caption",plainText:n,richText:t==null?void 0:t.captionHtml})]})},on=({buttonText:e="View Prototype",handleClick:t})=>d("button",{className:"prototype-button",onClick:t,children:e},"prototype-btn"),ve=({defaultBody:e,embeddedType:t="prototype",properties:n})=>{var l;const{handleClickEmbedButton:r,hasViewedEmbed:o,headers:i,useDesktopPrototype:a}=V(m=>({handleClickEmbedButton:m.handleClickEmbedButton,hasViewedEmbed:m.hasViewedEmbed,headers:m.headers,useDesktopPrototype:m.useDesktopPrototype})),c=(n==null?void 0:n.conceptUrl)||((l=n==null?void 0:n.consentDocument)==null?void 0:l.url),s=window.innerWidth<G.EMBED_MOBILE_MAX_WIDTH,p=i["userleap-platform"],u=(m,h)=>{m.preventDefault(),r(h)};if(!a&&s&&!o&&c&&["email","link"].includes(p)){if(t==="prototype")return d(on,{handleClick:m=>{u(m,"question.prototype.click")}});if(t==="pdf")return d(on,{buttonText:(n==null?void 0:n.viewDocumentText)||"View Document",handleClick:m=>{u(m,"question.agreement.click")}})}return e()},vr=({isSelected:e,id:t,divId:n,themeColor:r})=>d("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&&d(gr,{})}),fr=(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),a=parseInt(window.getComputedStyle(o).getPropertyValue("max-height")),c=i<=a?i:a;n.current!==c&&t(),n.current=c,o.style.height=`${c}px`}};return X(r,[]),r},Ke=({ariaLabel:e,border:t,choiceStyle:n={},label:r,isSelected:o,value:i,text:a,id:c,isRadio:s,useMobileStyling:p,error:u,allowTextEntry:l,noneOfTheAbove:m,promptText:h,onUserInputChanged:_})=>{const{styleNonce:b,viewDocument:v}=V(I=>({styleNonce:I.styleNonce,viewDocument:I.viewDocument})),[y,x]=Z(!1);Lo(v,t,b);const T=({isSelected:I,userText:N})=>{_&&_({id:c,selected:I,value:i,userText:N,noneOfTheAbove:m})},S=I=>{I.stopPropagation(),T({isSelected:s||!o,userText:a}),x(!1)},C=()=>{y||x(!0)},k=()=>{y&&x(!1)},j={onClick:I=>S(I),onKeyPress:I=>(N=>{N.key!=="Enter"&&N.key!==" "||S(N)})(I)};"ontouchstart"in v.documentElement?(j.onTouchStart=k,j.onTouchCancel=k,j.onTouchEnd=k):(j.onMouseDown=C,j.onMouseLeave=k);const w=s?`radio-${c}`:`checkbox-${c}`,f=o||y?[Ae]:[],g=[...u?[_r]:[],...f],R=r?{"aria-labelledby":`label-${c}`}:{"aria-label":e};return d("div",{className:O(K("choice",p),...g),id:`choice-div-${c}`,style:{...n,...u?{borderColor:G.ERROR_BORDER_COLOR}:{}},...j,children:[d("div",{className:O("choice-label-container"),children:[s?d("div",{...R,className:O("select-radio",...f),id:w,role:"radio",tabIndex:0}):d(vr,{divId:w,id:c,isSelected:o,themeColor:t}),r&&d("label",{className:O(K("select-label",p)),htmlFor:w,id:`label-${c}`,children:r})]}),l&&o&&d("div",{className:O("choice-text-entry-container",...f),children:d(Do,{onTextChange:I=>T({isSelected:o,userText:I}),promptText:h||"Please specify",textValue:a,useMobileStyling:p})})]})},Do=({promptText:e,textValue:t,onTextChange:n,useMobileStyling:r})=>{const o=ne(null),{update:i}=V(c=>({update:c.update})),a=fr(o,()=>i());return X(()=>{o.current&&o.current.focus()},[]),d("textarea",{"aria-label":e,"aria-multiline":"true","aria-placeholder":e,className:O(K("choice-text-input",r)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:c=>{a(),c.stopPropagation(),n(c.currentTarget.value)},onClick:c=>{c.stopPropagation()},onKeyPress:c=>{c.stopPropagation()},placeholder:e,ref:o,role:"textbox",rows:1,value:t})},an="ul-select-style-element",Ae="ul-select-active-dynamic-style",_r="ul-select-error-dynamic-style",Lo=(e,t,n)=>{let r=e.getElementById(an),o=!1;r||(r=e.createElement("style"),o=!0),r.tagName.toLowerCase()==="style"&&(r.id=an,n&&(r.nonce=n),r.textContent=Mo(t),o&&e.head.appendChild(r))},Mo=e=>`
2
+ .${Ae} {
3
+ border-color: ${e};
4
+ }
5
+ .${Ae} .select-radio, .${Ae}.select-radio {
6
+ border: 6px solid ${e};
7
+ box-shadow: none;
8
+ }
9
+ .${_r} {
10
+ border-color: ${G.ERROR_BORDER_COLOR};
11
+ }
12
+ `,we=e=>(e==null?void 0:e.buttonText)||"Next",St=e=>(e==null?void 0:e.skipButtonText)||"Skip",No=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{useMobileStyling:a,border:c}=V(w=>({useMobileStyling:w.useMobileStyling,border:w.border})),[s,p]=Z(!1),[u,l]=Z(""),[m,h]=Z(!1),_=r==null?void 0:r.collectName,b=(r==null?void 0:r.nameLabelText)||"Full Name",v=(r==null?void 0:r.consentText)||"I agree to the stated conditions",y=(r==null?void 0:r.submitButtonText)||"Submit",x=!!u.trim(),T=s&&(!_||x),S=(w,f=!1)=>{w.preventDefault(),w.stopPropagation();let g=null;if(!f){if(!T)return void h(!0);g={submitted:!0},_&&(g.name=u)}n({value:g,questionId:o,type:i})},C=w=>{w.preventDefault(),w.stopPropagation(),l(w.currentTarget.value)},k=w=>{w.currentTarget.style.borderColor=m&&!x?G.ERROR_BORDER_COLOR:c},j=w=>{w.currentTarget.style.borderColor=m&&!x?G.ERROR_BORDER_COLOR:G.DEFAULT_BORDER_COLOR};return d("div",{className:O(e,"ul-card__consent-legal","fade-in-transition"),children:[d(se,{message:t}),d("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:r!=null&&r.richTextBody?{__html:r.richTextBody}:void 0,id:"ul-card__consent-legal-body-container"}),d(ve,{properties:r,defaultBody:()=>d("div",{children:[d(Ke,{allowTextEntry:!1,border:c,error:m&&!s,id:"consent",isRadio:!1,isSelected:s,label:v,onUserInputChanged:({selected:w})=>{w!==s&&p(!s)},useMobileStyling:a}),_&&d("input",{"aria-label":b,"aria-placeholder":b,className:O(K("ul-consent-legal__name-input",a)),"data-gramm":"false",maxLength:250,name:"name",onBlur:j,onFocus:k,onInput:C,placeholder:b,style:m&&!x?{borderColor:G.ERROR_BORDER_COLOR}:{},tabIndex:0,value:u}),d("div",{className:"ul-card__button-wrapper ul-card-vertical__button-wrapper",children:[d(te,{className:T?"":"sprig-button-disabled",onClick:S,children:y}),r.required===!1&&d("button",{className:"ul-card-skip__button",onClick:w=>S(w,!0),children:St(r)})]})]}),embeddedType:"pdf"})]},o)},Oo=({activeValue:e,border:t,icon:n,isPressed:r,onSubmit:o,range:i,scaleLabelType:a,setActiveValue:c,setIsPressed:s,useMobileStyling:p,value:u,viewDocument:l})=>{const m=`option-${u}`,h=a==="number",_=a==="star",b=h&&u===e,[v,y]=u<=e&&_||u===e?r?[t,1]:[t,.3]:["",1];return d("button",{"aria-label":h?void 0:String(u),className:(()=>{switch(a){case"star":return O(K("likert-star",p),K(`likert-star-${u}`,p));case"smiley":return O(K("likert-smiley",p),K(`likert-smiley-${u}`,p));default:return u===i?O(K("likert-number",p),K(`likert-number-${u}`,p),K("likert-last-option",p)):O(K("likert-number",p),K(`likert-number-${u}`,p))}})(),dangerouslySetInnerHTML:{__html:n},id:m,onClick:()=>o(),onKeyDown:x=>{var C,k;const T=l.querySelectorAll(`.likert-${a??"number"}`),S=u-1;x.key==="ArrowRight"?(C=T[S+1])==null||C.focus():x.key==="ArrowLeft"?(k=T[S-1])==null||k.focus():x.key!=="Enter"&&x.key!==" "||o()},onPointerDown:()=>s(!0),onPointerEnter:()=>c(u),onPointerLeave:()=>{c(-1),s(!1)},style:{color:h?"":v,borderColor:b?v:"",fillOpacity:b?"":y,zIndex:b?3:"auto"},tabIndex:0})},Uo=({className:e,labels:t,message:n,next:r,properties:o,questionId:i,type:a})=>{const{border:c,useMobileStyling:s,viewDocument:p}=V(w=>({border:w.border,useMobileStyling:w.useMobileStyling,viewDocument:w.viewDocument})),[u,l]=Z(-1),[m,h]=Z(!1),_=t&&t.left,b=t&&t.right;let v;const{range:y,scaleLabelType:x,ratingIcons:T}=o;y&&(v=Number(y));const S=v||5,C=w=>{var f,g;switch(x){case"star":return(f=T[0])==null?void 0:f.svg;case"smiley":return(g=T[w])==null?void 0:g.svg;default:return String(w+1)}},k=[...Array(S)].map((w,f)=>{const g=f+1;return d(Oo,{activeValue:u,border:c,icon:C(f),isPressed:m,onSubmit:()=>r({value:g,questionId:i,type:a}),range:S,scaleLabelType:x,setActiveValue:l,setIsPressed:h,useMobileStyling:s,value:g,viewDocument:p},f)}),j=w=>{w.preventDefault(),w.stopPropagation(),r({value:null,questionId:i,type:a})};return d("form",{className:O(e,"ul-card--likert","fade-in-transition"),children:[d(se,{message:n,properties:o}),d(ve,{properties:o,defaultBody:()=>d(ee,{children:[d("div",{"aria-label":`Rating (1 - ${S})`,className:"ul-card--likert__numbers",role:"radiogroup",children:k}),d("div",{className:"ul-card--likert__labels",children:[d("span",{children:_}),d("span",{children:b})]}),!o.required&&d("div",{className:"ul-vertical-centered-container",children:d(te,{onClick:j,children:we(o)})})]})})]},i)},br=e=>e&&(e.scrollHeight>e.offsetHeight?e:br(e.parentElement)),Ho=e=>{if(!e||!(n=>n instanceof HTMLElement)(e))return 0;const t=getComputedStyle(e);return parseFloat(t.marginTop)+parseFloat(t.marginBottom)+(parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth))},Bo=({columns:e,onSelect:t,options:n,selectedOptions:r})=>{const o=ne([]),{border:i,useMobileStyling:a}=V(m=>({border:m.border,useMobileStyling:m.useMobileStyling})),c=n.findIndex(m=>r[m.id]===null),[s,p]=Z(c),u=Le((m,h)=>{t(m,h);const _=s+1,b=n[_];if(b&&r[b.id]===null){p(_);const v=o.current[s];if(v!=null&&v.firstElementChild){const y=br(v),x=v.firstElementChild,T=Ho(v)+x.clientHeight;y==null||y.scrollTo(0,v.offsetTop+T)}}},[t,n,r,s]),l=Le((m,h)=>{const _=s===m;return d(Ro,{animate:!0,header:h.label,isOpen:_,onClick:()=>p(_&&!window.UserLeap.isMobileSDK?-1:m),ref:b=>{b&&(o.current[m]=b)},showHeaderCheck:r[h.id]!==null,children:d("div",{style:{paddingTop:"12px"},children:e.map(b=>d(Ke,{allowTextEntry:!1,ariaLabel:`${h.label}-${b.label}`,border:i,error:!1,id:`${h.id}-${b.value}`,isRadio:!0,isSelected:r[h.id]===b.value,label:b.label,onUserInputChanged:()=>u(h.id,b.value),useMobileStyling:a},b.label))})},h.id)},[i,e,s,u,r,a]);return d("div",{children:n.map((m,h)=>l(h,m))})},Ao=({columns:e,onSelect:t,options:n,selectedOptions:r})=>{const{border:o,useMobileStyling:i}=V(l=>({border:l.border,useMobileStyling:l.useMobileStyling})),a=n.length,c=e.length,s=ne(null),[p,u]=Z(!1);return X(()=>{const l=s.current,m=new ResizeObserver(h=>{window.requestAnimationFrame(()=>{l&&u(Math.round(h[0].contentRect.width)<l.scrollWidth)})});return l&&m.observe(l),()=>{l&&m.unobserve(l)}},[]),d("div",{className:"ul-card--matrix_question_container",children:[d("div",{className:O("ul-card--matrix_container",p&&"ul-matrix-scroll-gradient"),onScroll:()=>{(()=>{const l=s.current;l&&u(l.clientWidth+Math.abs(l.scrollLeft)<l.scrollWidth)})()},ref:s,children:d("div",{className:"ul-card--matrix_grid",style:`--numColumns: ${c}; --numRows: ${a+1}`,children:[d("div",{})," ",e.map(l=>d("div",{className:"ul-matrix-column-label",children:l.label},l.label)),n.map(l=>d(ee,{children:[d("div",{"aria-label":l.label,className:"ul-matrix-row-label",children:l.label},l.label),d("div",{className:"ul-matrix-row-options",role:"radiogroup",children:e.map((m,h)=>d("div",{className:O("ul-matrix-option-wrapper",h===c-1&&"ul-matrix-last-option"),children:d(Ke,{allowTextEntry:!1,ariaLabel:`${l.label}-${m.label}`,border:o,choiceStyle:{background:"transparent",border:"none",marginBottom:"0",padding:"0"},error:!1,id:`${l.id}-${m.value}`,isRadio:!0,isSelected:r[l.id]===m.value,onUserInputChanged:()=>t(l.id,m.value),useMobileStyling:i})},m.value))})]}))]})}),p&&d("button",{className:"ul-matrix-scroll-arrow",onClick:l=>{l.preventDefault();const m=s.current;if(m){const h=getComputedStyle(m).direction==="rtl";m.scrollLeft=h?m.clientWidth-m.scrollWidth:m.scrollWidth}},children:d("svg",{fill:"currentColor",height:"32",viewBox:"0 0 256 256",width:"32",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"})})})]})},Vo=({className:e,message:t,next:n,options:r,properties:o,questionId:i,type:a})=>{const{useMobileStyling:c}=V(v=>({useMobileStyling:v.useMobileStyling})),s=o.matrixColumn,p=o.required,u=r.reduce((v,y)=>(v[y.id]=null,v),{}),[l,m]=Z(u),h=(v,y)=>{m(x=>({...x,[v]:y}))},_=p&&Object.values(l).every(v=>v==null),b=o.displayMatrixAsAccordion||c;return d("form",{className:O(e,"fade-in-transition","ul-card__matrix"),id:"text-form",onSubmit:v=>{v.preventDefault(),v.stopPropagation(),n({value:l,questionId:i,type:a})},children:[d(se,{message:t,properties:o}),d(ve,{properties:o,defaultBody:()=>d("div",{className:"ul-card--matrix_question_container",children:[d(b?Bo:Ao,{columns:s,onSelect:h,options:r,selectedOptions:l}),d("div",{className:"ul-card__button-wrapper",children:d(te,{disabled:_,children:we(o)})})]})})]},i)},qo=({options:e,selectItem:t,selectedOptions:n,showCheckbox:r})=>{const[o,i]=Z("0px"),a=ne(!1),{themeColor:c,doc:s}=V(u=>({doc:u.viewDocument,themeColor:u.border})),p=Le(u=>{if(a.current)return;const l=s.documentElement.clientHeight-30;let m=(u==null?void 0:u.getBoundingClientRect().height)??0;const h=(u==null?void 0:u.getBoundingClientRect().bottom)??0;h>l&&(m-=h-l),i(`-${m}px`),a.current=!0},[s.documentElement.clientHeight]);return d("div",{className:"select-list",ref:p,style:{marginBottom:o},children:e.map(u=>{return d("div",{className:"select-option",onClick:m=>{t(u),m.stopPropagation()},role:"option",children:[r&&d(vr,{divId:(l=u.id,`checkbox-div-${l}`),id:u.id,isSelected:n.includes(u),themeColor:c}),u.label]},u.id);var l})})},Fo=({isMultiSelect:e=!1,multiselectText:t="choices selected",onChange:n,options:r,placeholderText:o,value:i})=>{const[a,c]=Z(!1),{viewDocument:s,update:p}=V(m=>({viewDocument:m.viewDocument,update:m.update})),u=()=>{c(!a),p()};X(()=>{var h;const m=()=>{c(!1),p()};return s.addEventListener("click",m),(h=window.parent)==null||h.addEventListener("click",m),()=>{var _;(_=window.parent)==null||_.removeEventListener("click",m),s.removeEventListener("click",m)}},[s,p]);const l=i.length===0?["select-button-placeholder"]:[];return d(ee,{children:[d("button",{"aria-label":"choice dropdown button",className:O("select-button",...l),onClick:m=>{m.stopPropagation(),u()},type:"button",children:[d("span",{children:i.length===0?o:i.length===1?i[0].label:`${i.length} ${t}`}),d(hr,{})]}),a&&d(qo,{options:r,selectedOptions:i,selectItem:m=>{var b;const h=i.some(v=>v.id===m.id),_=i.some(v=>{var y;return(y=v.optionProperties)==null?void 0:y.noneOfTheAbove});(b=m.optionProperties)!=null&&b.noneOfTheAbove&&!h?n([m]):e?n(h?i.filter(v=>v.id!==m.id):_?[m]:[...i,m]):h||n([m]),e||u()},showCheckbox:e})]})},yr=({className:e,message:t,onSubmit:n,options:r=[],properties:o,questionId:i,type:a})=>{const{border:c,useMobileStyling:s}=V(C=>({border:C.border,useMobileStyling:C.useMobileStyling})),p=r.reduce((C,k)=>(C[k.id]={isSelected:!1},C),{}),[u,l]=Z(p),m=a==="multiplechoice",h=o.required,_=r.find(C=>{var k;return(k=C.optionProperties)==null?void 0:k.noneOfTheAbove}),b=Object.entries(u).some(([C,k])=>{var f;const j=r.find(g=>`${g.id}`===C),w=k.userText===void 0||k.userText.trim()==="";return((f=j==null?void 0:j.optionProperties)==null?void 0:f.allowsTextEntry)&&w&&k.isSelected}),v=Object.values(u).some(C=>C.isSelected),y=b||h&&!v,x=r.map(({id:C,label:k,value:j,optionProperties:w})=>{var I,N;const f=`${C}`,{allowsTextEntry:g,noneOfTheAbove:R}={allowsTextEntry:!1,noneOfTheAbove:!1,...w};return d(Ke,{allowTextEntry:g,border:c,error:!1,id:f,isRadio:m,isSelected:!!((I=u[f])!=null&&I.isSelected),label:k,noneOfTheAbove:R,onUserInputChanged:U=>S(U.id,U.selected,U.userText,U.noneOfTheAbove),promptText:"Please specify",text:(N=u[C])==null?void 0:N.userText,useMobileStyling:s,value:j},f)}),T=C=>{C.preventDefault(),C.stopPropagation(),n(u)},S=(C,k,j,w)=>{const f=Object.assign({},u);if((m||w)&&k)for(const g of Object.values(f))g.isSelected=!1,delete g.userText;else _&&!w&&u[_.id].isSelected&&(f[_.id].isSelected=!1);f[C]={isSelected:k,userText:j},l(f)};return d("form",{className:O(e,"ul-card--multiple","fade-in-transition"),id:"text-form",onSubmit:T,children:[d(se,{message:t,properties:o}),d(ve,{properties:o,defaultBody:()=>d("div",{children:[o.isDropdown?d(Fo,{isMultiSelect:!m,multiselectText:o.dropdownMultiselectedText??"choices selected",onChange:C=>{const k={...u};for(const j of r)C.includes(j)?k[j.id].isSelected=!0:k[j.id].isSelected=!1;l(k)},options:r,placeholderText:o.dropdownPlaceholderText??(m?"Select choice":"Select choice(s)"),value:r.filter(C=>u[C.id].isSelected)}):d("div",{className:O(K("ul-card__choices",s)),role:m?"radiogroup":"group",children:x}),d("div",{className:"ul-card__button-wrapper",children:d(te,{disabled:y,onClick:T,children:we(o)})})]})})]},i)},$o=e=>{const{questionId:t,type:n,next:r,options:o}=e;return d(yr,{...e,onSubmit:i=>{const a=Object.entries(i).find(([,l])=>l.isSelected)||[void 0,void 0],[c,s]=a,p=o.find(l=>`${l.id}`===c),u=s!=null&&s.userText?{[c]:{userText:s.userText}}:null;r({value:p&&c?{[c]:p.value}:{},secondaryValue:u,questionId:t,type:n})}})},zo=e=>{const{questionId:t,type:n,next:r}=e;return d(yr,{...e,onSubmit:o=>{const i=Object.entries(o).reduce((c,[s,p])=>(c[s]=p.isSelected,c),{}),a=Object.entries(o).reduce((c,[s,p])=>{if(!p.userText)return c;const u=c||{};return u[s]={userText:p.userText},u},null);r({value:i,secondaryValue:a,questionId:t,type:n})}})},Wo=({className:e,props:{labels:t,message:n,properties:r},next:o,questionId:i,type:a})=>{const{border:c,useMobileStyling:s,viewDocument:p}=V(_=>({border:_.border,useMobileStyling:_.useMobileStyling,viewDocument:_.viewDocument})),u=t&&t.left,l=t&&t.right,m=[...Array(11)].map((_,b)=>d("button",{className:O(K("nps-number",s),K(`nps-number-${b}`,s)),id:`option-${b}`,onClick:()=>o({value:b,questionId:i,type:a}),onKeyDown:v=>{var x,T;const y=p.querySelectorAll("button.nps-number");v.key==="ArrowRight"?(x=y[b+1])==null||x.focus():v.key==="ArrowLeft"?(T=y[b-1])==null||T.focus():v.key!=="Enter"&&v.key!==" "||o({value:b,questionId:i,type:a})},onPointerDown:v=>{v.currentTarget.style.zIndex="2",v.currentTarget.style.borderColor=c},onPointerLeave:v=>{v.currentTarget.style.zIndex="auto",v.currentTarget.style.borderColor=G.DEFAULT_BORDER_COLOR},tabIndex:0,children:b},b)),h=_=>{_.preventDefault(),_.stopPropagation(),o({value:null,questionId:i,type:a})};return d("form",{className:O(e,"ul-card--nps","fade-in-transition"),children:[d(se,{message:n,properties:r}),d(ve,{properties:r,defaultBody:()=>d("div",{children:[d("div",{className:"ul-card--nps__numbers",children:m}),d("div",{className:"ul-card--nps__labels",children:[d("span",{children:u}),d("span",{children:l})]}),!r.required&&d("div",{className:"ul-vertical-centered-container",children:d(te,{onClick:h,children:we(r)})})]})})]},i)},Zo=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{border:a,useMobileStyling:c,update:s}=V(S=>({border:S.border,useMobileStyling:S.useMobileStyling,update:S.update})),[p,u]=Z(""),l=ne(null),m=p.trim(),h=r.required===!0&&!m,_=fr(l,()=>s()),b=S=>{_(),S.preventDefault(),S.stopPropagation(),u(S.currentTarget.value)},v=S=>{S.preventDefault(),S.stopPropagation(),n({value:p,questionId:o,type:i})},y=r&&r.openTextPlaceholder?r.openTextPlaceholder:"",x=S=>{S.currentTarget.style.borderColor=a},T=S=>{S.currentTarget.style.borderColor=G.DEFAULT_BORDER_COLOR};return d("form",{className:O(e,"ul-card--text","fade-in-transition"),id:"text-form",children:[d(se,{message:t,properties:r}),d(ve,{defaultBody:()=>d("div",{className:"ul-card-text",children:[d("div",{className:"ul-card-text__container",children:d("textarea",{"aria-labelledby":"ul-question","aria-describedby":"ul-caption","aria-multiline":"true","aria-placeholder":y,className:O(K("ul-card-text__input",c)),"data-gramm":"false",maxLength:5e3,name:"text",onBlur:T,onChange:b,onFocus:x,placeholder:y,ref:l,role:"textbox",tabIndex:0})}),d(te,{disabled:h,onClick:v,style:{backgroundColor:h?"":a},children:we(r)}),r.footerHtml&&d("div",{className:"footer",dangerouslySetInnerHTML:{__html:r.footerHtml}})]}),properties:r})]},o)},mt=1,xr=2,kr=3,We=e=>e.type==="av_permission",sn=e=>e.type==="screen_permission",wr=(e,t)=>e===void 0?mt:e?((n,r)=>!(We(r)?r.permissionDescriptors:[]).includes("camera")||n.getVideoTracks().length>0)(e,t)?kr:mt:xr,ln={avStream:null,currentPage:null,mediaRecordingUids:null,nextQuestion:()=>{},passthroughData:void 0,recordingMediaTypes:void 0,screenPermissionRequested:!1,type:void 0},de=ur(e=>({...ln,reset:()=>{e(ln)},updatePage:t=>{e(t)}}));function ht({currentPage:e,pages:t}){const{avStream:n,recordingMediaTypes:r,updatePage:o}=de.getState(),{recorderEventEmitter:i}=V.getState();i.emit("av.permission",{"permission.descriptors":e.permissionDescriptors,"stream.ready":(a,c)=>{if(n===a)return;let s=e;if(a&&!e.permissionDescriptors.includes("camera")){const p=t.indexOf(e),u=c!=null&&c.active?p+2:p+1;c!=null&&c.active&&r&&i.emit("begin.recording",{"recording.media.types":r,"start.recording.callback":l=>o({mediaRecordingUids:l})}),s=t[u]}o({currentPage:s,avStream:a})}})}function gt({status:e}){const{nextQuestion:t,passthroughData:n,mediaRecordingUids:r,reset:o}=de.getState(),{recorderEventEmitter:i,handleUploadUpdate:a,index:c}=V.getState(),s={value:{taskStatus:e},type:"recordedtask",questionId:(n==null?void 0:n.questionId)||1};n&&i.emit("finish.task",{"begin.callback":p=>{a({mediaRecordingUid:p,isSubmitted:!0,progressPct:0,isComplete:!1})},"progress.callback":(p,u)=>{a({mediaRecordingUid:p,progressPct:u.detail,isSubmitted:!1,isComplete:!1})},"upload.callback":p=>{p&&a({mediaRecordingUid:p,isComplete:!0,isSubmitted:!0,progressPct:100})},"passthrough.data":n,"current.index":c,"task.response":s,"task.complete.callback":p=>{s.value.taskDurationMillisecond=p,r&&(s.value.mediaRecordingUids=r),o(),t(s)}})}function jt({pages:e,setIsRequestingPermission:t}){const{recorderEventEmitter:n,eventEmitFn:r}=V.getState(),{updatePage:o,currentPage:i,recordingMediaTypes:a,screenPermissionRequested:c}=de.getState();if(!i)return;const s=e.indexOf(i);switch(i.type){case"av_permission":{const p=c?s+2:s+1;return c&&a&&n.emit("begin.recording",{"recording.media.types":a,"start.recording.callback":u=>{o({mediaRecordingUids:u})}}),void o({currentPage:e[p]})}case"screen_permission":return void n.emit("screen.permission",{"screen.permission.requested":t,"stream.ready.callback":(p,u)=>{const l=u?e[s+1]:i;u&&a&&n.emit("begin.recording",{"recording.media.types":a,"start.recording.callback":m=>{o({captureStream:u,mediaRecordingUids:m})}}),o({currentPage:l,screenPermissionRequested:!0,captureStream:u})}});case"start_task":return r("recorded.task.start"),n.emit("recorded.task.start"),n.emit("start.task"),void o({currentPage:e[s+1],screenPermissionRequested:!0});case"complete_task":return}}const Cr="ul-permission-graphics-container",Er="ul-permission-body",Sr=O(Cr,"ul_recorded-task-inset-spacing"),Ye=O("ul-horizontal-button-container","ul-horizontal-button-container-left"),jr=({richTextBody:e})=>d("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:e},id:"ul-task-detail-container"}),Qe=({required:e,skipButtonText:t,bottom:n=!1})=>e?null:d(te,{className:O(n&&"ul-skip-button-below","ul-button-inactive"),onClick:gt.bind(null,{status:"abandoned"}),children:t||"Skip"}),It=e=>{const{avStream:t,captureStream:n,recordingMediaTypes:r,updatePage:o}=de.getState(),i=(r==null?void 0:r.includes("audio"))||(r==null?void 0:r.includes("video"));X(()=>{const a=setInterval(()=>{i&&t&&!t.active?o({avStream:null,currentPage:e[0]}):n&&n.active||o({captureStream:void 0,currentPage:e[i?1:0]})},1e3);return()=>clearInterval(a)},[t,n,i,e,r,o])},Go=({content:e,pages:t,required:n})=>{const{buttonText:r,skipButtonText:o,taskDetail:i}=e;return It(t),d("div",{className:"ul-task-page",children:[i&&d(jr,{richTextBody:i}),d("div",{className:Ye,children:[d(te,{onClick:jt.bind(null,{pages:t}),children:r}),d(Qe,{required:n,skipButtonText:o})]})]},"start-task")},Ko=({content:e,pages:t,properties:n})=>{const{buttonText:r,skipButtonText:o}=e;It(t);const i=d(ve,{properties:n,defaultBody:()=>d("div",{className:Ye,children:[d(te,{className:"ul-complete-task-button",onClick:gt.bind(null,{status:"completed"}),children:r}),d(te,{className:O("ul-button-inactive"),onClick:gt.bind(null,{status:"given.up"}),children:o})]})});return d("div",{className:"ul-task-page",children:[e.taskDetail&&d(jr,{richTextBody:e.taskDetail}),i]},"complete-task")},Yo=({content:e,pages:t,required:n})=>{const{buttonText:r,skipButtonText:o}=e,[i]=V(s=>[s.tabTitle]),[a,c]=Z(!1);return d("div",{children:[d("div",{className:Sr,children:[d("p",{style:{marginTop:"auto"},children:e.selectTabText}),d("div",{className:"ul-select-tab-container",children:d("p",{className:Er,children:i})})]}),d("div",{className:n?"":Ye,children:[d(te,{disabled:a,onClick:jt.bind(null,{pages:t,setIsRequestingPermission:c}),children:r}),d(Qe,{required:n,skipButtonText:o})]})]})},Qo=({content:e})=>d("div",{className:O(Cr,"ul_permission_svg_container","ul_recorded-task-inset-spacing","ul-center-horizontally"),dangerouslySetInnerHTML:{__html:e.svg}},"ul-permission-request-graphic"),Jo=({content:e,pages:t,required:n})=>{const{permissionDeniedHeadline:r,permissionDeniedBody:o,skipButtonText:i,tryAgainButtonText:a}=e,c=We(t[0])?t[0]:null;return X(()=>{const s=setInterval(()=>{c!==null&&ht({currentPage:c,pages:t})},1e3);return()=>clearInterval(s)},[c,t]),c?d("div",{children:[d("div",{className:Sr,children:d("p",{className:"ul-av-permission-denied-paragraph",children:[d("span",{className:"ul-av-permission-denied-headline",children:r}),d("span",{className:Er,children:o})]})}),d("div",{className:Ye,children:[d(te,{onClick:ht.bind(null,{currentPage:c,pages:t}),children:a}),d(Qe,{required:n,skipButtonText:i})]})]}):null},Xo=({stream:e})=>d("video",{autoPlay:!0,className:O("ul_recorded-task-inset-spacing"),id:"ul-record-task-video-preview",muted:!0,ref:t=>{t&&(t.srcObject=e||null)}}),ei=({content:e,pages:t,required:n})=>{const{skipButtonText:r}=e,{avStream:o}=de.getState();return It(t),d("div",{children:[d(Xo,{stream:o}),d("div",{className:"ul-vertical-button-container-center",children:[d(te,{onClick:jt.bind(null,{pages:t}),children:e.buttonText}),d(Qe,{bottom:!0,required:n,skipButtonText:r})]})]})},ti=({properties:e})=>{const{pages:t,required:n}=e,{avStream:r,currentPage:o}=de.getState();if(o===void 0)return null;switch(o==null?void 0:o.type){case"av_permission":{const i=wr(r,o);return i===mt?d(Qo,{content:o}):d(i===xr?Jo:ei,{content:o,pages:t,required:n})}case"screen_permission":return d(Yo,{content:o,pages:t,required:n});case"start_task":return d(Go,{content:o,pages:t,required:n});case"complete_task":return d(Ko,{content:o,pages:t,properties:e});default:return null}},ni=({className:e,properties:t,next:n,questionId:r})=>{const o=V(),{surveyId:i,responseGroupUid:a,userId:c}=o,s=de(),{screenPermissionRequested:p}=s,u=de(b=>b.avStream);let l=de(b=>b.currentPage);l||(l=function({pages:b,userId:v,responseGroupUid:y,surveyId:x,questionId:T,next:S}){const{updatePage:C}=de.getState(),{eventEmitFn:k,recorderEventEmitter:j}=V.getState(),w={questionId:T,surveyId:x,visitorId:v,responseGroupUid:y};let f=0;j.emit("recorded.task.permission.screen"),k("recorded.task.permission.screen"),j.emit("permission.status",{"permission.status.callback":(R,I,N,U)=>{const E=b[f],{type:B}=E,M=["screen"];if(We(E)){const{permissionDescriptors:A}=E,D=A==null?void 0:A.includes("microphone"),q=A==null?void 0:A.includes("camera");D&&M.push("audio"),q&&M.push("video"),(R!=null&&R.active&&!q||R!=null&&R.active&&I)&&f++}sn(b[f])&&N&&(f++,j.emit("begin.recording",{"recording.media.types":M,"start.recording.callback":A=>C({mediaRecordingUids:A})})),C({currentPage:b[f],avStream:R,screenPermissionRequested:N,nextQuestion:S,type:B,passthroughData:w,recordingMediaTypes:M,captureStream:U})}});const g=b[f];return g.type==="av_permission"&&ht({currentPage:g,pages:b}),g}({questionId:r,surveyId:i,next:b=>{n(b)},pages:t.pages,responseGroupUid:a,userId:c}));let m=l.headline,h=l.captionText;const _=wr(u,l);return sn(l)&&p&&(m=l.permissionDeniedHeadline,h=l.permissionDeniedCaptionText),We(l)&&_===kr&&(m=l.permissionGrantedHeadline,h=l.permissionGrantedCaptionText),d("div",{className:O(e,"ul-center-horizontally","fade-in-transition"),children:[d(se,{message:m,properties:{captionText:h}}),d(ti,{properties:t})]})},ri={"{{user_id}}":"externalUserId","{{email}}":"email"},oi=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{visitorAttributes:a}=V(l=>({visitorAttributes:l.visitorAttributes})),c=(l,m=!1)=>{n({value:m?{skipped:!0}:void 0,questionId:o,type:i})},s=l=>{l.key!=="Enter"&&l.key!==" "||n({value:void 0,questionId:o,type:i})};return d("div",{className:O(e,"ul-card__text-url-prompt","fade-in-transition"),children:[d(se,{message:t}),(p=r==null?void 0:r.richTextBody,u=r==null?void 0:r.body,d("div",p?{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:p},id:"ul-card__text-url-body-container"}:{className:"ul-rich-text-body",id:"ul-card__text-url-body-container",children:(u?u.split(/\n\s*\n/g):[]).map((l,m)=>d("p",{children:l},m))})),d(ve,{defaultBody:()=>{const l=((m,h={})=>{if(!m)return m;let _=m;const b=[];for(const[x,T]of Object.entries(ri))if(_.toLowerCase().includes(x))if(h[T]){const S=new RegExp(x,"gi");_=_.replace(S,h[T])}else b.push(x);if(b.length===0||!_.includes("?"))return _;const v=_.slice(0,_.indexOf("?")),y=_.slice(_.indexOf("?")+1).split("&").map(x=>x.split("=")).filter(x=>!b.includes(x[1]));return y.length===0?v:`${v}?${y.map(x=>x.join("=")).join("&")}`})(r&&r.buttonUrl,a);return d("div",{className:"ul-card-button-group",children:[d("a",{className:"ul-card-text__button ul-card__text-url-prompt-button",href:l,id:"ul-card-text__button",onClick:c,onKeyPress:s,rel:"noreferrer",role:l?"link":"button",tabIndex:0,target:"_blank",children:we(r)}),r.required===!1&&d("button",{className:"ul-card-skip__button",onClick:m=>c(0,!0),children:St(r)})]})},properties:r})]},o);var p,u},ii=({className:e,questionId:t})=>{const{border:n,destroy:r,endCard:o,forceBrandedLogo:i}=V(s=>({border:s.border,destroy:s.destroy,endCard:s.endCard,forceBrandedLogo:s.forceBrandedLogo}));X(()=>{setTimeout(()=>{r(G.APP_ID)},i?4e3:2e3)},[r,i]);const a=o&&o.subheader?d("p",{className:"ul-caption",children:o.subheader}):null,c=o&&o.headline?o.headline:"";return d("div",{className:O(e,"ul-card--thanks","fade-in-transition"),children:d("div",{children:d("div",{className:"ul-card--thanks-content",children:[d("div",{className:"ul-thanks-check",children:d("svg",{"aria-labelledby":"title",fill:"none",height:"99",viewBox:"0 0 81 99",width:"81",xmlns:"http://www.w3.org/2000/svg",children:[d("path",{clipRule:"evenodd",d:"M40.5 77C60.9345 77 77.5 60.4345 77.5 40C77.5 19.5655 60.9345 3 40.5 3C20.0655 3 3.5 19.5655 3.5 40C3.5 60.4345 20.0655 77 40.5 77ZM80.5 40C80.5 62.0914 62.5914 80 40.5 80C18.4086 80 0.5 62.0914 0.5 40C0.5 17.9086 18.4086 0 40.5 0C62.5914 0 80.5 17.9086 80.5 40Z",fill:n,fillRule:"evenodd"}),d("path",{clipRule:"evenodd",d:"M55.025 22.9046C55.6299 23.4705 55.6616 24.4198 55.0956 25.0247C54.8724 25.2634 54.6109 25.5285 54.3157 25.8277C52.2547 27.9168 48.5549 31.667 44.8135 39.6658C43.2818 42.9406 42.0864 45.8386 41.0823 48.2729C40.6539 49.3116 40.2603 50.2659 39.8902 51.129C39.287 52.5359 38.7248 53.7508 38.1744 54.625C37.8997 55.0613 37.5806 55.4905 37.2017 55.8245C36.8201 56.1607 36.2613 56.5 35.5457 56.5C34.6742 56.5 34.0892 55.9692 33.7774 55.6083C33.4502 55.2296 33.1752 54.7511 32.9396 54.301C32.7305 53.9013 32.5088 53.4367 32.2797 52.9565C32.2429 52.8794 32.2059 52.8019 32.1688 52.7243C31.8942 52.1499 31.5959 51.534 31.2537 50.8868C29.8886 48.305 27.8539 45.2878 24.2343 43.1382C23.522 42.7152 23.2875 41.7949 23.7105 41.0826C24.1335 40.3703 25.0539 40.1358 25.7662 40.5588C30.0556 43.1062 32.4149 46.6647 33.9058 49.4845C34.2776 50.1876 34.5973 50.8487 34.8753 51.4302C34.9147 51.5124 34.9529 51.5926 34.9902 51.6707C35.2222 52.1567 35.4164 52.5637 35.5978 52.9102C35.6151 52.9434 35.6321 52.9754 35.6485 53.0061C36.0565 52.3531 36.5341 51.3434 37.133 49.9468C37.4781 49.1418 37.8572 48.2229 38.2761 47.2074C39.2886 44.7532 40.5339 41.7347 42.0961 38.3948C46.0591 29.9221 50.0641 25.8648 52.1535 23.7482C52.4423 23.4556 52.6944 23.2002 52.9048 22.9753C53.4708 22.3703 54.42 22.3387 55.025 22.9046ZM35.1994 53.5892C35.1994 53.5892 35.2 53.5888 35.2012 53.5879C35.2 53.5889 35.1994 53.5893 35.1994 53.5892ZM36.0666 53.6682C36.0732 53.674 36.0765 53.6775 36.0765 53.6777C36.0765 53.678 36.0732 53.6751 36.0666 53.6682Z",fill:n,fillRule:"evenodd"}),d("path",{d:"M69.5 97C69.5 98.1046 56.2924 99 40 99C23.7076 99 10.5 98.1046 10.5 97C10.5 95.8954 23.7076 95 40 95C56.2924 95 69.5 95.8954 69.5 97Z",fill:"black",fillOpacity:"0.2"})]})}),d(se,{message:c}),a]})})},t)},xe="https://cdn.sprig.com",L={document:void 0,videojs:void 0},Tt=e=>e+"-loading-spiner",J="hidden",dn=".m3u8",rt="questionId",ot="ul-video-recorder-camera-off-button",it="ul-recording-in-session",ai=[{type:"link",content:`${xe}/dependencies/videojs-record-4.5.0.min.css`},{type:"script",content:`${xe}/dependencies/RecordRTC-5.6.2.js`},{type:"script",content:`${xe}/dependencies/adapter.8.0.0.min.js`},{type:"script",content:`${xe}/dependencies/videojs-record-4.5.0.min.js`},{type:"script",content:`${xe}/userleap-web-upchunk-v2.2.2.js`}],Ir=[{type:"link",content:`${xe}/dependencies/video-js-7.18.0.min.css`},{type:"script",content:`${xe}/dependencies/video-js-7.18.0.min.js`},{type:"style",content:`/* progress control styles */
13
+ .video-js .vjs-control {
14
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
15
+ }
16
+
17
+ .video-js .vjs-progress-control .vjs-progress-holder {
18
+ margin: 0 0px;
19
+ }
20
+
21
+ .video-js .vjs-progress-control {
22
+ position: absolute;
23
+ height: 3px;
24
+ width: 100%;
25
+ }
26
+ /* position and align the buttons and button texts */
27
+ .ul-control-panel {
28
+ bottom: 0;
29
+ width: 100%;
30
+ flex-direction: column;
31
+ background-color: white;
32
+ height: fit-content;
33
+ z-index: 2;
34
+ }
35
+
36
+ .ul-buttons-panel {
37
+ color: black;
38
+ display: flex;
39
+ gap: 20px;
40
+ height: 50px;
41
+ justify-content: center;
42
+ margin: 10px;
43
+ padding: 2px 14px 0;
44
+ }
45
+
46
+ .video-js .vjs-volume-panel {
47
+ height: 30px;
48
+ width: 40px;
49
+ }
50
+
51
+ .ul-inactive {
52
+ opacity: 0.3;
53
+ cursor: default;
54
+ pointer-events: none;
55
+ }
56
+
57
+ /* buttons */
58
+ .ul-buttons-panel > .vjs-button {
59
+ background-color: rgba(0, 0, 0, 0.05);
60
+ border-radius: 50%;
61
+ display: flex;
62
+ height: 3em;
63
+ justify-content: center;
64
+ width: 3em;
65
+ }
66
+
67
+ .vjs-button>.vjs-icon-placeholder:before {
68
+ align-items: center;
69
+ display: flex;
70
+ font-size: unset;
71
+ line-height: 0.5;
72
+ justify-content: center;
73
+ }
74
+
75
+ span.ul-button-text {
76
+ align-self: flex-end;
77
+ position: relative;
78
+ top: 14px;
79
+ }
80
+
81
+ #ul-camera-button {
82
+ white-space: nowrap;
83
+ }
84
+
85
+ .video-js .vjs-volume-control.vjs-volume-horizontal {
86
+ background-color: #fff;
87
+ z-index: 1;
88
+ }
89
+
90
+ .vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level {
91
+ background-color: black;
92
+ }
93
+
94
+ .video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,
95
+ .video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,
96
+ .video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active {
97
+ width: 40px;
98
+ }
99
+
100
+ .video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,
101
+ .video-js .vjs-volume-panel .vjs-volume-control:active,
102
+ .video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control,
103
+ .video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,
104
+ .video-js .vjs-volume-panel:active .vjs-volume-control,
105
+ .video-js .vjs-volume-panel:focus .vjs-volume-control {
106
+ visibility: visible;
107
+ left: 40px;
108
+ position: absolute;
109
+ transition: visibility 0.1s, opacity 0.1s, height 0.1s, width 0.1s, left 0s, top 0s;
110
+ }
111
+
112
+ /* play button customization */
113
+ .video-js .vjs-play-control {
114
+ color: black;
115
+ }
116
+
117
+ .video-js .vjs-play-control .vjs-icon-placeholder:before {
118
+ content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5363 6.40226L1.93958 10.7006C1.64037 10.8502 1.28833 10.6326 1.28833 10.2981V1.7014C1.28833 1.36688 1.64037 1.14931 1.93958 1.29891L10.5363 5.59727C10.868 5.76311 10.868 6.23642 10.5363 6.40226Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
119
+ }
120
+
121
+ /* position and style the current timer */
122
+ .ul-time-panel {
123
+ position: absolute;
124
+ bottom: 80px;
125
+ left: 10px;
126
+ height: 22px;
127
+ color: black;
128
+ border: 1px solid #e0e0eb;
129
+ border-radius: 23px;
130
+ background-color: white;
131
+ width: fit-content;
132
+ }
133
+
134
+ .video-js .vjs-current-time,
135
+ .vjs-no-flex .vjs-current-time {
136
+ display: flex;
137
+ align-items: center;
138
+ text-align: center;
139
+ }
140
+
141
+ /* remove the dot progress indicator */
142
+ .video-js .vjs-play-progress:before,
143
+ .video-js .vjs-volume-level:before,
144
+ .vjs-icon-circle:before,
145
+ .vjs-seek-to-live-control .vjs-icon-placeholder:before {
146
+ content: none;
147
+ }
148
+
149
+ .video-js .vjs-mute-control .vjs-icon-placeholder:before {
150
+ content: url("data:image/svg+xml,%3Csvg width='19' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.825.324A.75.75 0 019.25 1v11.667a.75.75 0 01-1.219.585l-3.96-3.169H1a.75.75 0 01-.75-.75v-5a.75.75 0 01.75-.75h3.07L8.031.414a.75.75 0 01.794-.09zM7.75 2.56L4.802 4.92a.75.75 0 01-.469.164H1.75v3.5h2.583a.75.75 0 01.469.165l2.948 2.358V2.56zM14.911.47a.75.75 0 011.061 0 9.084 9.084 0 010 12.844.75.75 0 01-1.06-1.06 7.584 7.584 0 000-10.724.75.75 0 010-1.06zM11.97 3.41a.75.75 0 011.06 0 4.917 4.917 0 010 6.953.75.75 0 11-1.06-1.06 3.417 3.417 0 000-4.832.75.75 0 010-1.06z' fill='%23262136'/%3E%3C/svg%3E");
151
+ }
152
+
153
+ .video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before {
154
+ content: url("data:image/svg+xml,%3Csvg width='19' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.5 1.167L4.333 4.5H1v5h3.333L8.5 12.833V1.167zM17.17 4.5l-5 5M12.17 4.5l5 5' stroke='%23262136' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
155
+ }
156
+
157
+ .video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before {
158
+ content: url("data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.82489 0.32403C9.08474 0.44892 9.25 0.711703 9.25 1.00001V12.6667C9.25 12.955 9.08474 13.2178 8.82489 13.3427C8.56504 13.4675 8.25661 13.4324 8.03148 13.2523L4.07025 10.0833H1C0.585786 10.0833 0.25 9.74755 0.25 9.33334V4.33334C0.25 3.91913 0.585786 3.58334 1 3.58334H4.07025L8.03148 0.414355C8.25661 0.234253 8.56504 0.19914 8.82489 0.32403ZM7.75 2.56048L4.80185 4.91899C4.66887 5.02538 4.50364 5.08334 4.33333 5.08334H1.75V8.58334H4.33333C4.50364 8.58334 4.66887 8.6413 4.80185 8.74769L7.75 11.1062V2.56048Z' fill='%23262136'/%3E%3C/svg%3E%0A");
159
+ }
160
+
161
+ .video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before {
162
+ content: url("data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.82489 0.32403C9.08474 0.44892 9.25 0.711703 9.25 1.00001V12.6667C9.25 12.955 9.08474 13.2178 8.82489 13.3427C8.56504 13.4675 8.25661 13.4324 8.03148 13.2523L4.07025 10.0833H1C0.585786 10.0833 0.25 9.74755 0.25 9.33334V4.33334C0.25 3.91913 0.585786 3.58334 1 3.58334H4.07025L8.03148 0.414355C8.25661 0.234253 8.56504 0.19914 8.82489 0.32403ZM7.75 2.56048L4.80185 4.91899C4.66887 5.02538 4.50364 5.08334 4.33333 5.08334H1.75V8.58334H4.33333C4.50364 8.58334 4.66887 8.6413 4.80185 8.74769L7.75 11.1062V2.56048Z' fill='%23262136'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.9698 3.41124C12.2627 3.11839 12.7376 3.11846 13.0304 3.4114C13.9521 4.33341 14.4699 5.58376 14.4699 6.88748C14.4699 8.19121 13.9521 9.44156 13.0304 10.3636C12.7376 10.6565 12.2627 10.6566 11.9698 10.3637C11.6768 10.0709 11.6767 9.596 11.9696 9.30307C12.6101 8.66235 12.9699 7.79346 12.9699 6.88748C12.9699 5.98151 12.6101 5.11262 11.9696 4.4719C11.6767 4.17896 11.6768 3.70409 11.9698 3.41124Z' fill='%23262136'/%3E%3C/svg%3E%0A");
163
+ }
164
+
165
+ .video-js .vjs-volume-control:hover .vjs-mouse-display {
166
+ display: none !important;
167
+ }
168
+
169
+ .video-js .vjs-play-progress {
170
+ background-color: black;
171
+ }
172
+
173
+ /* position video player inside the container */
174
+ .video-js .vjs-tech {
175
+ position: static;
176
+ }
177
+
178
+ .video-js .vjs-time-tooltip {
179
+ padding: 0.25em 0.75em;
180
+ align-items: center;
181
+ color: #333;
182
+ background: #FCFCFD;
183
+ border-radius: 99px;
184
+ text-align: center;
185
+ border: 1px solid #E0E0EB;
186
+ display: flex;
187
+ align-items: center;
188
+ justify-content: center;
189
+ top: -25px;
190
+ font-size: 12px !important;
191
+ width: 50px !important;
192
+ }
193
+
194
+ .video-js .vjs-play-progress.vjs-slider-bar .vjs-time-tooltip {
195
+ visibility: hidden !important;
196
+ }
197
+
198
+ .video-js .vjs-progress-control .vjs-mouse-display {
199
+ z-index: 2;
200
+ }
201
+
202
+ .ul-video-player {
203
+ width: 100%;
204
+ display: flex;
205
+ flex-direction: column;
206
+ height: auto;
207
+ border: 1px solid #E6E6E6;
208
+ background-color: white;
209
+ box-sizing: border-box;
210
+ border-radius: 4px;
211
+ background-clip: border-box;
212
+ overflow: hidden;
213
+ }
214
+
215
+ .video-js.vjs-fullscreen:not(.vjs-ios-native-fs) {
216
+ border: none;
217
+ }
218
+
219
+ #video-response-player-secondary-video-player {
220
+ max-width: 200px;
221
+ margin-right: 20px;
222
+ background-color: transparent;
223
+ }
224
+
225
+ #ul-card-video__player_recorder-video-recorder.vjs-fullscreen {
226
+ display: table;
227
+ }
228
+
229
+ .video-js div.vjs-progress-control {
230
+ margin-top: -3px;
231
+ }
232
+
233
+ .video-js .vjs-progress-control .vjs-slider {
234
+ background-color: #B2BBBD;
235
+ }
236
+
237
+ .vjs-record.video-js .vjs-control.vjs-button.vjs-fullscreen-control {
238
+ position:relative;
239
+ }
240
+
241
+ .video-js .vjs-fullscreen-control .vjs-icon-placeholder:before {
242
+ content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.82143 2.54004L12.2614 2.54004C12.9242 2.54004 13.4614 3.0773 13.4614 3.74004L13.4614 6.18004' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6.17955 13.46L3.73955 13.46C3.07681 13.46 2.53955 12.9227 2.53955 12.26L2.53955 9.81996' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12.7772 3.22266L9.36475 6.63516' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6.29434 9.70605L2.88184 13.1186' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
243
+ }
244
+
245
+ .video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before {
246
+ content: url("data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.583 9.813H5.25a1 1 0 011 1v3.666M5.375 10.688L1 15.061M14.917 5.813H11.25a1 1 0 01-1-1V1.146M15.063 1l-4.376 4.375' stroke='%23262136' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
247
+ }
248
+
249
+ .video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before, .video-js .vjs-icon-replay:before {
250
+ content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5363 6.40226L1.93958 10.7006C1.64037 10.8502 1.28833 10.6326 1.28833 10.2981V1.7014C1.28833 1.36688 1.64037 1.14931 1.93958 1.29891L10.5363 5.59727C10.868 5.76311 10.868 6.23642 10.5363 6.40226Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
251
+ }
252
+
253
+ .video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before, .vjs-icon-pause:before {
254
+ content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3.61885' y='2.06074' width='3.16185' height='11.88' rx='0.9' fill='black' stroke='%23EDEDED' stroke-width='0.6' stroke-linecap='round'/%3E%3Crect x='9.21797' y='2.06074' width='3.16185' height='11.88' rx='0.9' fill='black' stroke='%23EDEDED' stroke-width='0.6' stroke-linecap='round'/%3E%3C/svg%3E%0A");
255
+ padding: 2px;
256
+ }
257
+
258
+ .vjs-error-display {
259
+ display: none;
260
+ }
261
+
262
+ .ul-video-player-video {
263
+ position: relative;
264
+ top: 0;
265
+ left: 0;
266
+ width: 100%;
267
+ }
268
+
269
+ .ul-video-container {
270
+ width: 100%;
271
+ height: auto;
272
+ left: 0px;
273
+ top: 0px;
274
+
275
+ background-color: transparent;
276
+ border-radius: 4px;
277
+
278
+ align-items: start;
279
+ display: flex;
280
+ flex-direction: column;
281
+
282
+ /* Inside Auto Layout */
283
+
284
+ flex: none;
285
+ order: 0;
286
+ flex-grow: 0;
287
+ margin: 10px 0px;
288
+ position: relative;
289
+ }
290
+
291
+ .vjs-record button.vjs-device-button.vjs-control {
292
+ background: rgba(255, 255, 255, 96);
293
+ width: 100%;
294
+ height: 100%;
295
+ left: 0;
296
+ top: 0;
297
+ margin: 0;
298
+ border-radius: 0;
299
+ line-height: 0.6;
300
+ padding: 10px;
301
+ display: flex;
302
+ align-items: center;
303
+ flex-direction: column;
304
+ justify-content: center;
305
+ z-index: 3;
306
+ }
307
+
308
+ .vjs-record .vjs-device-button.vjs-control:before {
309
+ font-size: 14px !important;
310
+ color: #333;
311
+ content: "Your browser needs to access your camera and microphone for video recording";
312
+ line-height: 135%;
313
+ }
314
+
315
+ .vjs-record .vjs-device-button.vjs-control.permission-denied:before {
316
+ font-size: 16px !important;
317
+ color: #262136;
318
+ content: "Unable to access your camera and microphone";
319
+ }
320
+
321
+ .vjs-record .vjs-device-button.vjs-control:after {
322
+ display: inline-block;
323
+ background: #F0F0F5;
324
+ font-size: 13px;
325
+ border-radius: 4px;
326
+ content: "Request Permissions";
327
+ padding: 1em 2em;
328
+ color: #333;
329
+ margin-top: 20px;
330
+ }
331
+
332
+ .vjs-record .vjs-device-button.vjs-control.permission-denied:after {
333
+ display: inline-block;
334
+ background: white;
335
+ font-size: 13px;
336
+ content: "Please go to your browser settings and update permissions to enable recording";
337
+ padding: 1em;
338
+ color: #4B575D;
339
+ margin: 5px;
340
+ line-height: 135%;
341
+ text-align: center;
342
+ }
343
+
344
+ .vjs-control.vjs-button.ul-video-recorder-delete-button, .vjs-control.vjs-button.ul-video-recorder-toggle-button, .vjs-control.vjs-button.ul-video-recorder-camera-off-button-audio-only, .vjs-control.vjs-button.ul-video-recorder-camera-off-button {
345
+ cursor: pointer;
346
+ }
347
+
348
+ .ul-video-recorder-delete-button .vjs-icon-placeholder:before {
349
+ content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.21234 7.37549V11.1193M2.53931 4.25595H13.4593H2.53931ZM5.57234 4.25595V3.00833C5.57222 2.84433 5.60354 2.68192 5.6645 2.53038C5.72546 2.37884 5.81488 2.24115 5.92762 2.12519C6.04037 2.00922 6.17424 1.91726 6.32158 1.85456C6.46892 1.79185 6.62683 1.75964 6.78628 1.75977H9.21234C9.37179 1.75964 9.5297 1.79185 9.67703 1.85456C9.82437 1.91726 9.95824 2.00922 10.071 2.12519C10.1837 2.24115 10.2732 2.37884 10.3341 2.53038C10.3951 2.68192 10.4264 2.84433 10.4263 3.00833V4.25595H5.57234ZM12.2463 4.25595V12.9912C12.2463 13.3223 12.1184 13.6399 11.8907 13.8741C11.6631 14.1082 11.3543 14.2398 11.0323 14.2398H4.96628C4.64432 14.2398 4.33555 14.1082 4.10789 13.8741C3.88023 13.6399 3.75234 13.3223 3.75234 12.9912V4.25595H12.2463ZM6.78628 7.37549V11.1193V7.37549Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
350
+ }
351
+
352
+ .ul-video-recorder-toggle-button .vjs-icon-placeholder:before {
353
+ content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0Z' fill='%23D15153'/%3E%3C/svg%3E");
354
+ }
355
+
356
+ .ul-video-recorder-toggle-button.ul-recording-in-session .vjs-icon-placeholder:before {
357
+ content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 10L12 2C12 0.89543 11.1046 -4.85396e-07 10 -4.37114e-07L2 -8.74228e-08C0.89543 -3.91405e-08 -4.85396e-07 0.895431 -4.37114e-07 2L-8.74228e-08 10C-3.91405e-08 11.1046 0.895431 12 2 12L10 12C11.1046 12 12 11.1046 12 10Z' fill='%23D15153'/%3E%3C/svg%3E%0A");
358
+ }
359
+
360
+ .ul-video-recorder-camera-off-button .vjs-icon-placeholder:before {
361
+ content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_2645_4654)'%3E%3Cpath d='M15.1491 4.75L10.5991 8L15.1491 11.25V4.75Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9.29912 3.4502H2.14912C1.43115 3.4502 0.849121 4.03223 0.849121 4.7502V11.2502C0.849121 11.9682 1.43115 12.5502 2.14912 12.5502H9.29912C10.0171 12.5502 10.5991 11.9682 10.5991 11.2502V4.7502C10.5991 4.03223 10.0171 3.4502 9.29912 3.4502Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2645_4654'%3E%3Crect width='15.6' height='15.6' fill='white' transform='translate(0.199951 0.200195)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");
362
+ }
363
+
364
+ .ul-video-recorder-camera-off-button-audio-only .vjs-icon-placeholder:before {
365
+ content: url("data:image/svg+xml,%3Csvg width='22' height='15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M.75 3A2.75 2.75 0 013.5.25h9.081A2.75 2.75 0 0115.331 3v9a2.75 2.75 0 01-2.75 2.75H3.5A2.75 2.75 0 01.75 12V3zM3.5 1.75c-.69 0-1.25.56-1.25 1.25v9c0 .69.56 1.25 1.25 1.25h9.081c.69 0 1.25-.56 1.25-1.25V3c0-.69-.56-1.25-1.25-1.25H3.5z' fill='%23262136'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M14.53 2.03l-12 12-1.06-1.06 12-12 1.06 1.06zM20.87 1.525a.75.75 0 01.38.652v10.588a.75.75 0 01-1.134.644l-5.92-3.53a.75.75 0 01-.365-.643v-3.53a.75.75 0 01.366-.644l5.919-3.53a.75.75 0 01.754-.007zm-5.539 4.607V8.81l4.419 2.635V3.497l-4.419 2.635z' fill='%23262136'/%3E%3C/svg%3E");
366
+ transform: scale(0.75);
367
+ }
368
+
369
+ .ul-upload-progress-label {
370
+ padding: 0.15em 0.75em;
371
+ align-items: center;
372
+ font-size: 12px;
373
+ color: #333;
374
+ background: #FCFCFD;
375
+ border-radius: 99px;
376
+ text-align: center;
377
+ border: 1px solid #E0E0EB;
378
+ display: flex;
379
+ align-items: center;
380
+ justify-content: center;
381
+ position: absolute;
382
+ bottom: 75px;
383
+ left: calc(50% - 65px);
384
+ width: 130px;
385
+ z-index: 5;
386
+ }
387
+
388
+ .ul-upload-progress-label__time {
389
+ display: inline-flex;
390
+ margin-left: 0.8em;
391
+ align-items: center;
392
+ }
393
+
394
+ .ul-upload-progress-label__time:before {
395
+ content: "";
396
+ display: inline-flex;
397
+ width: 1px;
398
+ height: 12px;
399
+ background-color: #E0E0EB;
400
+ margin-right: 0.8em;
401
+ }
402
+
403
+ @keyframes grow {
404
+ 0% {
405
+ transform: scale(1);
406
+ background-color: #EEECFC;
407
+ }
408
+ 50% {
409
+ transform: scale(1.2);
410
+ background-color: #E1DFF4;
411
+ }
412
+ 100% {
413
+ transform: scale(1);
414
+ background-color: #EEECFC;
415
+ }
416
+ }
417
+
418
+ .ul-audio-recorder-placeholder:before {
419
+ width: 80px;
420
+ height: 80px;
421
+ border-radius: 120px;
422
+ background-color: #EEECFC;
423
+ content: "";
424
+ position: absolute;
425
+ left: calc(50% - 40px);
426
+ top: calc(50% - 40px);
427
+ animation: 6s infinite grow;
428
+ transform-origin: 50% 60%;
429
+ }
430
+
431
+ .ul-audio-recorder-placeholder:after {
432
+ content: url("data:image/svg+xml,%3Csvg width='98' height='98' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='a' maskUnits='userSpaceOnUse' x='0' y='0' width='98' height='98'%3E%3Ccircle cx='49' cy='49' r='49' fill='%23EDECF8'/%3E%3C/mask%3E%3Cg mask='url(%23a)'%3E%3Ccircle cx='49' cy='49' r='50' fill='%23645CC2'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.422 81.812c5.405-15.547 20.187-26.706 37.576-26.706 17.39 0 32.172 11.159 37.577 26.707-9.164 10.43-22.601 17.013-37.576 17.013-14.976 0-28.414-6.583-37.577-17.014z' fill='%23fff' fill-opacity='.6'/%3E%3Ccircle cx='49' cy='29' r='17' fill='%23fff' fill-opacity='.7'/%3E%3C/g%3E%3C/svg%3E");
433
+ position: absolute;
434
+ left: 50%;
435
+ top: 50%;
436
+ transform: translate(-50%, -50%);
437
+ transform: translate(-50%, -50%) scale(0.6);
438
+ }
439
+
440
+ .ul-audio-recorder-placeholder {
441
+ min-height: 150px;
442
+ width: 100%;
443
+ background-color: #fcfcfd;
444
+ display: block;
445
+ position: relative;
446
+ }
447
+
448
+ .vjs-fullscreen .ul-audio-recorder-placeholder {
449
+ vertical-align: middle;
450
+ display: table-cell;
451
+ }
452
+
453
+ .vjs-fullscreen .ul-control-panel {
454
+ height: 80px;
455
+ position: absolute;
456
+ bottom: 0;
457
+ left: 0;
458
+ width: 100%;
459
+ max-width: 100%;
460
+ background-color: #F8F8F8;
461
+ }
462
+
463
+ .vjs-playback-rate .vjs-playback-rate-value {
464
+ align-items: center;
465
+ display: flex;
466
+ font-size: 12px;
467
+ justify-content: center;
468
+ }
469
+
470
+ .vjs-playback-rate .vjs-menu {
471
+ left: -5px;
472
+ bottom: 3px;
473
+ }
474
+
475
+ .vjs-menu-button-popup .vjs-menu .vjs-menu-content {
476
+ background-color: white;
477
+ border: 1px solid rgba(0, 0, 0, 0.1);
478
+ box-sizing: border-box;
479
+ border-radius: 4px;
480
+ }
481
+
482
+ .vjs-menu li {
483
+ font-size: 12px;
484
+ padding: 5px 0;
485
+ }
486
+
487
+ .vjs-menu li.vjs-selected {
488
+ color: lightgray;
489
+ }
490
+
491
+ .vjs-menu li.vjs-menu-item:hover {
492
+ background-color: rgba(0, 0, 0, 0.05);
493
+ }
494
+
495
+ .vjs-fullscreen .ul-buttons-panel {
496
+ top: calc(50% - 30px);
497
+ position: relative;
498
+ }
499
+
500
+ .vjs-fullscreen .vjs-record-indicator.vjs-control {
501
+ bottom: 90px !important;
502
+ }
503
+
504
+ .vjs-record.video-js div.vjs-control.vjs-record-indicator {
505
+ padding: 0.3em 0.75em 0.15em 15px;
506
+ align-items: center;
507
+ font-size: 12px;
508
+ color: #333;
509
+ background: #FCFCFD;
510
+ border-radius: 99px;
511
+ text-align: center;
512
+ border: 1px solid #E0E0EB;
513
+ display: flex;
514
+ justify-content: center;
515
+ align-items: center;
516
+ position: absolute;
517
+ bottom: 75px;
518
+ top: auto;
519
+ left: calc(50% - 21px);
520
+ width: 43px;
521
+ height: 16px;
522
+ z-index: 4;
523
+ }
524
+
525
+ .vjs-record.video-js div.vjs-control.vjs-record-indicator:after {
526
+ content: "";
527
+ background-color: #EB5757;
528
+ width: 6px;
529
+ height: 6px;
530
+ border-radius: 8px;
531
+ animation: none;
532
+ top: 4px;
533
+ left: 5px;
534
+ }
535
+
536
+ .vjs-record.video-js div.vjs-control.vjs-record-indicator:before {
537
+ position: relative;
538
+ font-size: 9px;
539
+ animation: none;
540
+ opacity: 1;
541
+ color: #333;
542
+ top: auto;
543
+ left: auto;
544
+ }
545
+
546
+ .ul-video-player-loading {
547
+ display: inline-block;
548
+ position: relative;
549
+ width: 6rem;
550
+ height: 6rem;
551
+
552
+ }
553
+ .ul-video-player-loading div {
554
+ box-sizing: border-box;
555
+ position: absolute;
556
+ display: block;
557
+ width: 80%;
558
+ height: 80%;
559
+ margin: 5px;
560
+ border: 5px solid #666;
561
+ border-radius: 50%;
562
+ animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
563
+ border-color: #666 transparent transparent transparent;
564
+ }
565
+
566
+ .first {
567
+ animation-delay: -0.45s;
568
+ }
569
+ .second {
570
+ animation-delay: -0.3s;
571
+ }
572
+ .third {
573
+ animation-delay: -0.15s;
574
+ }
575
+
576
+ @keyframes lds-ring {
577
+ 0% {
578
+ transform: rotate(0deg);
579
+ }
580
+ 100% {
581
+ transform: rotate(360deg);
582
+ }
583
+ }
584
+
585
+ .ul-video-btn {
586
+ width: 100%;
587
+ border: 1px solid #E6E6E6;
588
+ border-radius: 4px;
589
+ background-color: rgba(0, 0, 0, 0.02);
590
+ padding: 8px;
591
+ font-weight: 500;
592
+ font-size: 15px;
593
+ }
594
+
595
+ .ul-record-response-btn:before, .ul-record-response-btn:after, .ul-back-question-btn:before, .ul-back-question-btn:after {
596
+ margin: 0 5px;
597
+ vertical-align: middle;
598
+ }
599
+
600
+ .ul-record-response-btn:before {
601
+ content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_2645_4654)'%3E%3Cpath d='M15.1491 4.75L10.5991 8L15.1491 11.25V4.75Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9.29912 3.4502H2.14912C1.43115 3.4502 0.849121 4.03223 0.849121 4.7502V11.2502C0.849121 11.9682 1.43115 12.5502 2.14912 12.5502H9.29912C10.0171 12.5502 10.5991 11.9682 10.5991 11.2502V4.7502C10.5991 4.03223 10.0171 3.4502 9.29912 3.4502Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2645_4654'%3E%3Crect width='15.6' height='15.6' fill='white' transform='translate(0.199951 0.200195)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");
602
+ display: inline-block;
603
+ transform: translate(0px, 2px);
604
+ }
605
+
606
+ .ul-record-response-btn:after {
607
+ content: 'Record your Response';
608
+ }
609
+
610
+ .ul-back-question-btn:before {
611
+ content: url("data:image/svg+xml,%3Csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.8757 8.22361L1.1118 14.6056C0.945578 14.6887 0.75 14.5678 0.75 14.382V1.61803C0.75 1.43219 0.945579 1.31131 1.1118 1.39443L13.8757 7.77639C14.06 7.86852 14.06 8.13148 13.8757 8.22361Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
612
+ display: inline-block;
613
+ transform: scale(0.85) translate(0, 1px);
614
+ -moz-transform: scale(0.85) translate(0, 2px);
615
+ }
616
+
617
+ .ul-back-question-btn:after {
618
+ content: 'Back to Question';
619
+ }
620
+
621
+ .hidden {
622
+ display: none !important;
623
+ opacity: 0;
624
+ visibility: hidden;
625
+ }
626
+
627
+ .visible {
628
+ visibility: visible;
629
+ opacity: 1;
630
+ animation: fade 0.3s;
631
+ }
632
+
633
+ @keyframes fade {
634
+ 0% {
635
+ opacity: 0;
636
+ }
637
+
638
+ 100% {
639
+ opacity: 1;
640
+ }
641
+ }
642
+
643
+ #ul-recording-countdown-screen {
644
+ width: 100%;
645
+ height: 100%;
646
+ color: black;
647
+ background-color: rgba(255, 255, 255, 0.8);
648
+ position: absolute;
649
+ text-align: center;
650
+ font-size: 15px;
651
+ z-index: 1;
652
+ display: table;
653
+ }
654
+
655
+ .ul-countdown-text {
656
+ vertical-align: middle;
657
+ display: table-cell;
658
+ transform: translate(0, -25px);
659
+ }
660
+
661
+ .vjs-fullscreen > #ul-recording-countdown-screen {
662
+ font-size: 25px;
663
+ transform: unset;
664
+ }
665
+
666
+ .vjs-poster {
667
+ background-size: cover;
668
+ }
669
+ `}],Tr="-video-player",cn="-secondary-video-player",un="-video-recorder";let le,pn;const fe=async({event:e,apiBase:t,headers:n,visitorId:r,envId:o,metadata:i})=>{const a=L.document.documentElement;if(!r||!o)return;const c={event:`SDK - ${e}`,visitorId:r,environmentId:o,metadata:{...i||{},screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:a.clientWidth,clientHeight:a.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(c)})).ok||console.warn("[Sprig] (ERR-444) Failed to track analytics",e)},pe=async(e,t,n,r,o,i)=>{fe({event:`Video Error ${t}`,apiBase:n,headers:r,visitorId:o,envId:i,metadata:{errorMessage:e.message}});const a=L.document.documentElement,c={screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:a.clientWidth,clientHeight:a.clientHeight,location:window.location.href,language:navigator.language},s={action:t,err:{message:e.message,stack:e.stack},meta:c,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(s)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",e)},Rr=(e,t)=>{if(e.length===0)return t&&t();Promise.all(e.reduce((n,r)=>(n.push(((o,{type:i,content:a})=>new Promise(function(c,s){let p;i==="script"?(p=L.document.createElement("script"),p.src=a):i==="link"?(p=L.document.createElement("link"),p.rel="stylesheet",p.href=a,p.type="text/css"):(p=L.document.createElement("style"),p.innerHTML=a),p.onload=function(){c(a)},p.onerror=function(){s(a)},p.async=!1,p.id=btoa(a),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")})},mn=(e,t,n)=>{if(t==="start"&&(e.style.visibility="visible"),t==="none")e.style.visibility=J;else if(t==="success")e.style.visibility=J,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%)`}},at=(e,t)=>{const n=L.videojs(e.id());return n==null?void 0:n.payload[t]},Pr=(e,t)=>{const n=new(L.videojs.getComponent("Component"))(e);return n.addClass("ul-buttons-panel"),t.map(r=>{n.addChild(r)}),si(n),n},si=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},Dr=(e,t,n,r,o=!1,i)=>{e.addClass("ul-video-player");const a=new(L.videojs.getComponent("Component"))(e);a.addClass("ul-control-panel"),e.progressBar=a.addChild("ProgressControl"),n&&e.src(n),e.audioPlayerPlaceholder=new(L.videojs.getComponent("Component"))(e),e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");const c=n&&n.src?ui(n.src):null;!n||!o&&c?(e.audioPlayerPlaceholder.hide(),L.document.getElementById(`${e.id()}_html5_api`).style.height="100%",c&&e.poster(c)):(e.children()[0].classList.add("vjs-hidden"),L.document.getElementById(`${e.id()}_html5_api`).style.height="0px"),e.on("play",()=>{o||!n||c||di(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),a.addChild(t),e.addChild(a),r&&r(e)},li=(e,t,n,r,o,i,a,c=!1)=>{pn=Date.now();const s=Ze(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(!s)return;s.payload=n;const{surveyId:p,questionId:u,responseGroupUid:l,visitorId:m,envId:h}=n;let _;const b=g=>{const R=ot,I=ot+"-audio-only";mn(s.uploadProgressLabel,"none"),le&&le.startTime>=pn&&le.abort();const N=L.document.getElementById("ul-camera-button");g?(s.children()[0].classList.add("vjs-hidden"),T.removeClass(R),T.addClass(I),N.innerHTML=ie.TurnOnCamera,s.audioPlayerPlaceholder.removeClass("vjs-hidden"),_==null||_.getTracks().forEach(U=>{U.stop()}),window.navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then(U=>{_=U,U.getVideoTracks().forEach(E=>{E.enabled=!1}),s.record().onDeviceReady(U)}).catch(s.record().onDeviceError.bind(s.record()))):(_==null||_.getVideoTracks().forEach(U=>{U.enabled=!0}),s.children()[0].classList.remove("vjs-hidden"),s.record().getDevice(),T.removeClass(I),T.addClass(R),N.innerHTML=ie.TurnOffCamera,s.audioPlayerPlaceholder.addClass("vjs-hidden"))},v=new(L.videojs.getComponent("Button"))(s,{clickHandler:()=>{v.hasClass(J)||(fe({event:"Video Delete Button Clicked",apiBase:r,headers:a,visitorId:m,envId:h,metadata:{questionId:u,responseGroupUid:l,surveyId:p}}),b(s.cameraOff),o(H.DELETE,{}),T.removeClass(J),v.addClass(J))}});v.addClass("ul-video-recorder-delete-button"),v.el_.appendChild(Ve(ie.DeleteButton,"ul-delete-button"));const y=L.document.getElementById(t),x=()=>{y.classList.contains("vjs-fullscreen")&&s.cameraOff?y.style.display="table":y.style.display="flex"};x();const T=new(L.videojs.getComponent("Button"))(s,{clickHandler:()=>{s.record().isRecording()||(s.cameraOff=!s.cameraOff,fe({event:"Video Camera Button Clicked",apiBase:r,headers:a,visitorId:n.visitorId,envId:n.envId,metadata:{questionId:u,responseGroupUid:l,surveyId:p,cameraOff:s.cameraOff}}),b(s.cameraOff),!v.hasClass(J)&&v.addClass(J),o(H.DELETE,{}),x())}});T.addClass(ot),T.el_.appendChild(Ve(ie.TurnOffCamera,"ul-camera-button"));const S=new(L.videojs.getComponent("Button"))(s,{clickHandler:()=>{const g=L.document.getElementById("ul-recorder-toggle");if(s.record().isRecording())s.record().stop(),g&&(g.innerHTML=ie.RecordButton),S.removeClass(it),v.removeClass(J);else{const R=L.document.getElementById("ul-recording-countdown-screen");if(R)R.remove(),g&&(g.innerHTML=ie.RecordButton),b(s.cameraOff),o(H.DELETE,{}),T.removeClass(J),v.addClass(J),S.removeClass(it),j.show();else{S.addClass(it),j.hide(),T.addClass(J),v.addClass(J),g&&(g.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`,Lr(s,3)}}}});S.addClass("ul-video-recorder-toggle-button"),S.el_.appendChild(Ve(ie.RecordButton,"ul-recorder-toggle"));const C=L.document.createElement("p");C.style.visibility="hidden",C.className="ul-upload-progress-label",e.appendChild(C),s.uploadProgressLabel=C;const k=Pr(s,[v,T,"PlayToggle",S,"FullscreenToggle"]),j=k.children().find(g=>g.name_==="FullscreenToggle");j.hasClass("vjs-disabled")&&j.hide();const w=k.children().find(g=>g.name_==="PlayToggle");w.hide(),v.addClass(J),Dr(s,k,i,!1,c),s.on("stopRecord",()=>{S.hide(),w.show(),j.show(),v.removeClass(J)}),s.on("deviceReady",()=>{S.show(),w.hide(),v.addClass(J)}),((g,R,I,N,U)=>{const{surveyId:E,responseGroupUid:B,visitorId:M,envId:A}=g.payload;g.on("deviceError",function(){console.warn("device error: ",g.deviceErrorCode),g.deviceErrorCode.message==="Permission denied"?(g.deviceButton.addClass("permission-denied"),I&&I(H.ERROR,{type:H.PERMISSION_DENIED}),fe({event:"Video Permission Denied",apiBase:R,headers:U,visitorId:M,envId:A,metadata:{questionId:at(g,rt),responseGroupUid:B,surveyId:E}})):(I&&I(H.ERROR,{type:H.OTHER}),pe(new Error(g.deviceErrorCode.message),"recorderDeviceError",R,U,M,A))}),g.on("error",function(D,q){pe(q||g.error(),"recorderError",R,U,M,A)}),g.on("startRecord",function(D,q){N(g.uploadProgressLabel,"none"),fe({event:"Video Record Start",apiBase:R,headers:U,visitorId:M,envId:A,metadata:{questionId:at(g,rt),responseGroupUid:B,surveyId:E}})}),g.on("finishRecord",async function(){N(g.uploadProgressLabel,"start",0);const D=at(g,rt);if(!E){const Q="internal error: missing fields in payload";return I&&I(H.ERROR,{type:H.OTHER}),pe(new Error(Q),"finishRecord",R,U,M,A),null}g.record().stopDevice();const q=g.cameraOff?H.MEDIA_TYPE_AUDIO:H.MEDIA_TYPE_VIDEO,Y=z.v4();fe({event:"Video Record Finish",apiBase:R,headers:U,visitorId:M,envId:A,metadata:{mediaRecordingUid:Y,questionId:D,responseGroupUid:B,surveyId:E,mediaType:q}});const ce={surveyId:E,updatedAt:new Date().toISOString(),mediaType:q,mediaRecordingUid:Y};D&&(ce.questionId=D),B&&(ce.responseGroupUid=B),M&&(ce.visitorId=M);const W=await(async()=>{const Q=await fetch(`${R}/2/environments/integrations/upload`,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(ce)});if(Q.ok){const _e=await Q.json();return I&&I(H.UPLOAD_STARTED,{[H.UPLOAD_ID]:_e.upload.id,[H.MEDIA_TYPE]:q,[H.MEDIA_RECORDING_UID]:Y}),_e.upload.url}return I&&I(H.ERROR,{type:H.OTHER,response:Q}),pe(new Error("failed to get upload response with url"),"finishRecord",R,U,M,A),null})();W&&(le=L.document.defaultView.UpChunk.createUpload({endpoint:W,file:new L.document.defaultView.File([g.recordedData],`recording ${q} ${Date.now()}`),chunkSize:5120}),le.startTime=Date.now(),fe({event:"Video Upload Start",apiBase:R,headers:U,visitorId:M,envId:A,metadata:{mediaRecordingUid:Y,questionId:D,responseGroupUid:B,surveyId:E,mediaType:q,url:W}}),le.on("error",Q=>{N(g.uploadProgressLabel,"none"),I&&I(H.UPLOAD_FINISHED,{[H.MEDIA_RECORDING_UID]:Y}),pe(Q,"finishRecord",R,U,M,A)}),le.on("progress",Q=>{I&&I(H.UPLOAD_PROGRESS,{[H.MEDIA_RECORDING_UID]:Y,[H.UPLOAD_PROGRESS_PCT]:Q.detail}),N(g.uploadProgressLabel,"progress",Q.detail)}),le.on("success",()=>{N(g.uploadProgressLabel,"success"),I&&I(H.UPLOAD_FINISHED,{[H.MEDIA_RECORDING_UID]:Y}),fe({event:"Video Upload Success",apiBase:R,headers:U,visitorId:M,envId:A,metadata:{mediaRecordingUid:Y,questionId:D,responseGroupUid:B,surveyId:E,mediaType:q,url:W,elapsedMs:le.startTime&&Date.now()-le.startTime}})}))})})(s,r,o,mn,a);const f=[{name:"microphone"}];!s.cameraOff&&f.push({name:"camera"}),Promise.all(f.map(g=>{var R;return(R=navigator==null?void 0:navigator.permissions)==null?void 0:R.query(g)})).then(g=>{g.reduce((R,I)=>R&I.state==="granted",!0)&&s&&(s.deviceButton&&s.deviceButton.hide(),s.record().getDevice())}).catch(g=>{})},Lr=(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(()=>{Lr(e,t-1)},1e3))},Mr=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=Tt(n),["first","second","third","fourth"].map(o=>{const i=L.document.createElement("div");i.className=o,r.appendChild(i)}),r})(e)),t},vt=(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},di=(e,t)=>{e.children()[0].classList.remove("vjs-hidden"),e.audioPlayerPlaceholder.hide(),L.document.getElementById(`${e.id()}_html5_api`).style.height="100%"},Ze=(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),ci=(e,t,n,r=!1,o="https://api.sprig.com",i=document,a=null,c=null)=>{L.document=i;const s=e+Tr,p=Mr(s);return L.document.addEventListener("securitypolicyviolation",u=>{pe(new Error(`Voice & Video feature violates ${u.violatedDirective} web page CSP policies for the question player.`),"playerDeviceError",o,{})}),Rr(Ir,()=>{L.document.getElementById(Tt(s)).remove(),vt(s,p);const u={playsinline:!0,playbackRates:[.5,1,1.5,2],fill:!0};try{const l=e+cn;vt(l,p);const m=Ze(s,u),h=Ze(l,{muted:!0,...u});if(!m||!h)return;((v,y,x)=>{v.addClass(`ul${cn}`);const T=new(L.videojs.getComponent("Component"))(v);y&&v.src(y),v.addChild(T),x&&x(v)})(h,a,c),a||h.addClass(J);const _=Pr(m,["PlaybackRateMenuButton","PlayToggle","FullscreenToggle"]),b=_.children().find(v=>v.name_==="FullscreenToggle");b.hasClass("vjs-disabled")&&b.hide(),Dr(m,_,t,n,r,h)}catch(l){return void pe(new Error(`Error when creating video player object ${l}`),"playerDeviceError",o,{})}}),p},ui=e=>{if(!e)return null;const t=e.match(/https:\/\/stream.mux.com\/(.*)/);let n=t?t[1]:null;return n.includes(dn)&&(n=n.replace(dn,"")),n?`https://image.mux.com/${n}/thumbnail.jpg?time=0`:null},H={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"},be="ul-card-video__player_recorder",hn="ul-video-btn",st=0,gn=1,pi=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{apiURL:a,envId:c,handleUploadUpdate:s,headers:p,responseGroupUid:u,surveyId:l,viewDocument:m,visitorId:h}=V(f=>({apiURL:f.apiURL,envId:f.envId,handleUploadUpdate:f.handleUploadUpdate,headers:f.headers,responseGroupUid:f.responseGroupUid,surveyId:f.surveyId,viewDocument:f.viewDocument,visitorId:f.userId})),[_,b]=Z(!1),[v,y]=Z(null),[x,T]=Z(null),[S,C]=Z(st),k=r&&r.videoUrl,j=(f,g)=>{f===H.UPLOAD_STARTED?(y(g[H.UPLOAD_ID]),T(g[H.MEDIA_RECORDING_UID]),b(!0)):f===H.DELETE?(y(null),T(null),b(!1)):f===H.UPLOAD_PROGRESS?isNaN(g[H.UPLOAD_PROGRESS_PCT])?s({mediaRecordingUid:g[H.MEDIA_RECORDING_UID],isComplete:!0}):s({mediaRecordingUid:g[H.MEDIA_RECORDING_UID],progressPct:g[H.UPLOAD_PROGRESS_PCT]}):f===H.UPLOAD_FINISHED&&s({mediaRecordingUid:g[H.MEDIA_RECORDING_UID],isComplete:!0})},w=f=>{f.preventDefault(),f.stopPropagation(),document.getElementById(be)&&(g=>{const R=g+un;if(L.document.getElementById(R)&&L.videojs){try{if(!L.videojs(R).record().stream)return}catch{return}L.videojs(R).record().stop(),L.videojs(R).record().stopDevice()}})(be),v&&x?(s({mediaRecordingUid:x,isSubmitted:!0}),n({value:{mediaRecordingUid:x},questionId:o,type:i})):n({value:null,questionId:o,type:i})};return d("form",{className:O(e,"ul-card--video","fade-in-transition"),id:"ul-video-interview-form",children:[d(se,{message:t,properties:r}),d("div",{id:"ul-card-voice__video",children:[d("div",{children:[d("div",{id:"ul-question-player-container",style:{display:S===st?"":"none"},children:[d("div",{id:be,ref:f=>{if(f&&f.children.length===0&&!r.hideRecordedPrompt){const g=ci(be,{src:k,type:"application/x-mpegURL"},void 0,r.mediaType===H.MEDIA_TYPE_AUDIO,a,m);f.appendChild(g)}}}),d(ve,{defaultBody:()=>d("button",{className:`${hn} ul-record-response-btn`,onClick:f=>{f.preventDefault(),f.stopPropagation(),document.getElementById(be)&&(g=>{const R=Ze(g+Tr);R==null||R.pause()})(be),C(gn)}}),properties:r})]}),d("div",{style:{display:S===gn?"block":"none"},children:[d("button",{className:`${hn} ul-back-question-btn`,onClick:f=>{f.preventDefault(),f.stopPropagation(),C(st)},style:{display:r.hideRecordedPrompt?"none":"block"}}),d("div",{id:"ul-recorder-player-container",ref:f=>{if(f&&f.children.length===0){const g=((R,I={},N="https://api.userleap.com",U,E,B,M=!1,A=document)=>{L.document=A;const D=R+un,q=Mr(D);return L.document.addEventListener("securitypolicyviolation",Y=>{pe(new Error(`Voice & Video feature violates ${Y.violatedDirective} web page CSP policies for the recorder player.`),"recorderDeviceError",N,B,I.visitorId,I.envId)}),Rr(Ir.concat(ai),()=>{vt(D,q),L.document.getElementById(Tt(D)).remove();try{li(q,D,I,N,U,E,B,M)}catch(Y){return void pe(new Error(`Error when creating video recorder player object ${Y}`),"recorderDeviceError",N,B,I.visitorId,I.envId)}}),q})(be,{surveyId:l,responseGroupUid:u,questionId:o,visitorId:h,envId:c},a,j,void 0,{...p,"x-ul-video-recorder-origin":"sdk"},r.mediaType===H.MEDIA_TYPE_AUDIO,m);f.appendChild(g)}}})]})]}),d(te,{disabled:!_,onClick:w,children:we(r)}),d("button",{className:"ul-card-text__button ul-button-inactive ul-card-skip__button",id:"ul-card-video__skip_button",onClick:w,style:{display:r.required?"none":"block",..._?{display:"none"}:{}},children:St(r)})]})]})},mi=({className:e})=>{const{uploadProgress:t}=V(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 d("div",{className:O(e,"ul-card--uploading","fade-in-transition"),children:[d("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:"ul-loading-spinner-container",role:"progressbar",children:d("div",{className:"ul-loading-spinner",children:[d("div",{className:"first"}),d("div",{className:"second"}),d("div",{className:"third"}),d("div",{className:"fourth"})]})}),d(se,{message:`${n} (${o}% complete)`}),d("p",{className:"ul-caption",children:r})]})},vn=({logoOnly:e=!1,style:t={}})=>d("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&&d("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"}),d("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"}),d("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"}),d("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"}),d("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"}),d("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"})]}),hi=()=>{const{border:e,cards:t,forceBrandedLogo:n,headers:r,index:o,marketingUrl:i,showSurveyBrand:a,slugName:c,surveyId:s,viewedCardCount:p}=V(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})),u=ne(null),l=t.filter(y=>y.type!=="uploading"&&y.type!=="thanks"),m=((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 C={[S.length-1]:1,[-1]:0};for(let k=S.length-2;k>=x;k--){const j=S[k],w=jo(k,j.props.routingOptions);if(w.length===0){C[k]=C[k+1]+1;continue}let f=0,g=Co(j);if(g===null)return S.length-1-x;for(let R=0;R<w.length&&g.length!==0;R++){const{comparator:I,target:N,value:U}=w[R],E=g.filter(B=>{const M=wo({value:B},j.type,B),A=pr(B,j.type);return!(M&&I==="answered"||A&&I==="partial"||!M&&!A&&I==="skipped"||I==="given_up"&&So(B)&&B.taskStatus==="given.up"||M&&j.type==="open"&&(I==="contains"||I==="notcontains")||M&&Eo(I)&&Et[I](B,U))});if(E.length<g.length){const B=parseInt(String(N),10);if(B!==-1&&B<=k||B>=S.length)return S.length-1-x;f=Math.max(C[B]+1,f)}g=E}g.length>0&&(f=Math.max(C[k+1]+1,f)),C[k]=f}return C[x]})(t,o),h=p+1,_=h/(h+m),b=`${i}?utm_source=survey_branding&utm_medium=website&utm_campaign=${c}&utm_content=${s}${n&&"&utm_term=poweredby_pill"}`;X(()=>{u.current&&(u.current.style.width=100*_+"%")},[_]);const v=t[o].type==="thanks";return d("footer",{className:"ul-footer "+(r["userleap-platform"]==="link"?"ul-footer__link":""),style:a?{}:{marginBottom:"10px"},children:v&&n?d("a",{dir:"ltr",href:b,rel:"noreferrer",target:"_blank",children:d("div",{className:"thank-you-card-link",children:[d("div",{className:"sprig-box-logo",children:d(vn,{logoOnly:!0,style:{margin:"auto"}})}),d("div",{children:d("p",{children:["Capture insights about your own product",d(fn,{style:{display:"inline-flex",marginInlineStart:"4px",verticalAlign:"middle"}})]})})]})}):d(ee,{children:[l.length>1&&d("div",{id:"ul-progress-bar-container",children:d("div",{id:"ul-progress-bar-current",ref:u,style:{border:`1px solid ${e||"#000"}`}})}),a?d("div",{className:n?"yellow-footer-logo":"",style:{marginTop:"4px"},children:d("a",{href:b,rel:"noreferrer",target:"_blank",children:d("div",{style:{display:"flex"},children:[d(vn,{logoOnly:!1}),n&&d(fn,{style:{display:"block",margin:"auto 0 auto 4px",transform:"rotateY(0deg) rotate(-45deg)"}})]})})}):null]})})},fn=({style:e})=>d("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[d("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),d("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),gi=()=>{const{answers:e,border:t,cards:n,close:r,configureExitOnOverlayClick:o,destroy:i,endCard:a,eventEmitFn:c,fontFamily:s,headers:p,index:u,next:l,previewMode:m,productConfig:h,seen:_,showStripes:b,studyType:v,surveyId:y,update:x,useMobileStyling:T,viewDocument:S}=V(E=>({answers:E.answers,border:E.border,cards:E.cards,close:E.close,configureExitOnOverlayClick:E.configureExitOnOverlayClick,destroy:E.destroy,endCard:E.endCard,eventEmitFn:E.eventEmitFn,fontFamily:E.fontFamily,headers:E.headers,index:E.index,previewMode:E.previewMode,productConfig:E.productConfig,next:E.next,seen:E.seen,showStripes:E.showStripes,studyType:E.studyType,surveyId:E.surveyId,update:E.update,useMobileStyling:E.useMobileStyling,viewDocument:E.viewDocument})),C=ne(null),k=ne(!1),j=p["userleap-platform"],{props:w,type:f,name:g}=n[u],R=n.length;X(()=>{C.current&&(C.current.classList.contains("ul-app--visible")||C.current.classList.add("ul-app--visible"),!k.current&&c&&(k.current=!0,c(z.SprigEvent.SurveyAppeared,{name:z.SprigEvent.SurveyAppeared,"survey.id":y})))},[c,y]),X(()=>{const E=()=>{S.visibilityState==="visible"&&(_(),S.removeEventListener("visibilitychange",E))};return S.addEventListener("visibilitychange",E),E(),()=>{S.removeEventListener("visibilitychange",E)}},[_,S]),X(()=>{x()},[u,x]),X(()=>{o(()=>r())},[r,o]);const I=Te(()=>()=>r(G.APP_ID),[r]),N=async function(E){l({data:E,completeSurvey:()=>{i(G.APP_ID)},endCard:a}),G.resetScrollPosition(S)};if(e){for(const E of e)if(E.questionId===g){let B;if(f==="multiplechoice"){const M=w.options.find(({value:A})=>A===E.value);if(!M)break;B={[M.id]:M.value}}else B=E.value;N({value:B,type:f,questionId:E.questionId});break}}const U=!T&&((h==null?void 0:h.framePosition)==="center"||(h==null?void 0:h.desktopDisplay)==="center-modal"||((h==null?void 0:h.placement)||"").includes("center"));return d("div",{className:O("ul-app",z.shouldDirectEmbed(p)?"ul-app--visible":"ul-app--overlay"),dir:"auto",id:G.APP_ID,onClick:E=>{var D;const B=window.sprigAPI,M=E.target;if(!B||!M)return;const A=[M,M.parentElement];for(const q of A)if(((D=q==null?void 0:q.tagName)==null?void 0:D.toLowerCase())==="a")return E.preventDefault(),void(B==null?void 0:B.openUrl(q.href))},ref:C,style:{"--theme":t,...s?{fontFamily:s.replace(";","")}:{},...U?{position:"relative"}:{}},children:d("div",{className:"ul-app__container",children:d("div",{className:O(K("ul-card__container",T,v)),style:{...v!=="feedbackButton"||(h==null?void 0:h.desktopDisplay)==="center-modal"?{borderColor:t}:{},...(h==null?void 0:h.desktopDisplay)==="slider"?{margin:"0px"}:{}},children:[!["email","link"].includes(p["userleap-platform"])&&(!a||u+1!==R)&&d("div",{className:O(K("close-container",T)),children:d("div",{"aria-label":"Close button",className:"close-btn",onClick:I,onKeyPress:E=>{E.key==="Enter"&&I()},role:"button",tabIndex:0,children:d("svg",{fill:"none",height:"18px",viewBox:"0 0 13 13",width:"18px",xmlns:"http://www.w3.org/2000/svg",children:d("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"})})})}),b&&d("div",{className:"ul-header__container",dir:"ltr",children:d("div",{className:"ul-header",children:"For development purposes only"})}),m&&d("div",{className:"ul-header__container",dir:"ltr",children:d("div",{className:"ul-header",children:"Preview Mode: Response will not be recorded."})}),d("div",{className:O(Po("ul-card-main-content",j)),children:(()=>{const E={className:"ul-card",next:N,questionId:g,type:f};switch(f){case"consentlegal":return $(No,{...E,...w,key:g});case"likert":return $(Uo,{...E,...w,key:g});case"matrix":return $(Vo,{...E,...w,key:g});case"multiplechoice":return $($o,{...E,...w,key:g});case"multipleselect":return $(zo,{...E,...w,key:g});case"nps":return $(Wo,{...E,key:g,props:w});case"open":return $(Zo,{...E,...w,key:g});case"recordedtask":return $(ni,{...E,...w,key:g});case"texturlprompt":return $(oi,{...E,...w,key:g});case"thanks":return $(ii,{...E,...w,key:g});case"uploading":return $(mi,{...E,...w,key:g});case"videovoice":return $(pi,{...E,...w,key:g});default:return null}})()}),d(hi,{})]})})})},Nr=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",_n=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:Nr()};return new MediaRecorder(e,t)},bn=(e,t,n)=>{n[t]=[],e.ondataavailable=function(r){n[t].push(r.data)},e.currentMediaRecordingUid=t,e.start()};function yn(e,t,n,r,o,i){if(e&&e.state!=="inactive"){const{"begin.callback":a}=r,c=e.currentMediaRecordingUid;if(!c)return;a&&a(c),e.onstop=()=>async function(s,p,u,l,m,h,_){const b=V.getState().viewDocument,{"upload.callback":v,"progress.callback":y}=l,x={mediaType:u,updatedAt:new Date().toISOString(),mediaRecordingUid:m,...l["passthrough.data"]},T=await(async(j,w)=>{var g;const f=await fetch(w,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)});if(f.ok){const R=await f.json();return(g=R==null?void 0:R.upload)==null?void 0:g.url}return null})(x,s);if(!T)return void(v&&v(null,{message:"failed to get upload url"}));const S=new Blob(_,{type:Nr()});if(!b.defaultView)return;const C=new b.defaultView.File([S],`recording video ${Date.now()}`),k=h.createUpload({endpoint:T,file:C,chunkSize:5120});k.on("error",j=>{v&&v(null,j)}),k.on("progress",j=>{y&&y(m,j)}),k.on("success",()=>{v&&v(m,!0)})}(t,0,n,r,c,o,i),e.stop()}}const vi={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&&yn(n,t,i,e,o,this.state.chunks[n==null?void 0:n.currentMediaRecordingUid]),r!=null&&r.currentMediaRecordingUid&&yn(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(a=>a.readyState==="live"&&a.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(a){return console.warn("Error: failed to get permissions: "+a),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=_n(this.state.avStream);const o=z.v4();bn(this.state.avRecorder,o,this.state.chunks),r.push(o)}if(t.includes("screen")&&this.state.captureStream){this.state.screenRecorder=_n(this.state.captureStream);const o=z.v4();bn(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:a}=V.getState(),c=mr({cards:n,index:e,hasEndCard:r,allResponses:a});c!==null&&n[c].type==="recordedtask"||[o,i].map(s=>{s&&(s.state==="recording"&&s.stop(),s.stream.getTracks().map(p=>{p.readyState==="live"&&p.stop()}))})}},qe=Object.create(vi);Object.freeze(qe);const fi=({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}},_i={configure:function(e,t=!0){var y;const{answers:n,apiURL:r,endCard:o,eventEmitFn:i,fontFamilyURL:a,frame:c,previewKey:s,viewDocument:p,viewWindow:u}=e,l=z.shouldDirectEmbed(e.headers)?e.frame:p.body,m=e.UpChunk||window.UpChunk,h=z.eventEmitter,_=((x,T)=>{const S=[...x],C=new Set(["videovoice","recordedtask"]);return x.some(k=>C.has(k.type))&&S.push({name:-2,props:{routingOptions:[]},type:"uploading"}),T&&S.push({name:-1,props:{routingOptions:[]},type:"thanks"}),S})(e.cards,!!o);qe.configure(h,{cards:_,hasEndCard:!!o,apiURL:r,UpChunk:m}),V.setState({apiURL:r,answers:n,border:e.border,index:e.startingQuestionIdx||0,cards:_,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,endCard:e.endCard,envId:e.envId,eventEmitFn:i,fontFamily:e.fontFamily,forceBrandedLogo:e.forceBrandedLogo,frame:c,headers:e.headers,hasViewedEmbed:!1,isPreview:e.isPreview,marketingUrl:"https://sprig.com",meta:fi({mode:e.mode,viewWindow:u,viewDocument:p,trackPageViewUrl:e.trackPageViewUrl}),mode:e.mode,previewKey:s,previewMode:e.previewMode,productConfig:e.productConfig,recorder:qe,recorderEventEmitter:h,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(G.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;margin:auto;text-align:start;min-width:200px}.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}.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;overflow:auto;padding:20px 20px 5px;position:relative;text-align:center;word-break:break-word}.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;margin-bottom:3px;display:flex;gap:16px;justify-content:center}.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{flex-grow:55;display:flex}.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{margin-bottom:5px}.question-header-container{margin-bottom:15px}.ul-question{color:#343442;display:block;font-size:20px;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:15px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start;margin-top:8px}.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}.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-voice__video{align-items:center;display:flex;flex-direction:column}#ul-card-voice__video>div{margin-bottom:10px;width:100%}#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;max-height:190px;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:center;margin-top:auto;flex-grow:1;width:100%}.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%}.close-btn{cursor:pointer;height:18px;margin-inline-end:-10px;position:relative;top:-10px;width:18px;z-index:1}.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:25px 0}#ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{width:100%;background:#00000003;border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:1;margin:0;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}'}),e.customStyles&&G.setSurveyStyles({document:p,elementId:"ul-custom-style",styleString:e.customStyles,nonce:e.styleNonce}),e.fontFamily&&a&&parent){const x=p.createElement("link");x.rel="stylesheet",x.href=a,b.appendChild(x)}if(!m&&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=()=>{qe.setUpChunk(u.UpChunk)},x.onerror=()=>{console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure")},b.appendChild(x)}const v=i||((y=c.eventEmitter)==null?void 0:y.emit);v==null||v("verify.view.version",{"view.version":"2.32.2"}),l&&t&&Se(d(gi,{}),l)}};exports.default=_i;