@sprig-technologies/sprig-browser 2.34.2 → 2.36.0
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.
- package/dist/{core-B84vH8bq.cjs → core-B-mNVA8c.cjs} +2 -2
- package/dist/{core-9nFfVPj6.js → core-PNM_2mYx.js} +3 -3
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +4 -0
- package/dist/core.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -2
- package/dist/{metricsReporter-BzXI6BiM.js → metricsReporter-B_p_qsZJ.js} +1 -1
- package/dist/{metricsReporter-Dy3EDEs8.cjs → metricsReporter-CWGtDAqh.cjs} +1 -1
- package/dist/replay.cjs +1 -1
- package/dist/replay.js +1 -1
- package/dist/{view-CDp4O3a5.js → view-C3-nqngP.js} +1259 -1169
- package/dist/view-Cji0PL_w.cjs +669 -0
- package/package.json +1 -1
- package/dist/view-DJLfkjCB.cjs +0 -669
|
@@ -0,0 +1,669 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Y=require("./core-B-mNVA8c.cjs"),H=require("./metricsReporter-CWGtDAqh.cjs");var Me,M,Nn,we,Ot,Pn,pt,Mn,Pe={},On=[],eo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ze=Array.isArray;function ge(e,t){for(var n in t)e[n]=t[n];return e}function Un(e){var t=e.parentNode;t&&t.removeChild(e)}function ie(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Me.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Re(e,s,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??++Nn,__i:-1,__u:0};return o==null&&M.vnode!=null&&M.vnode(i),i}function Hn(){return{current:null}}function X(e){return e.children}function le(e,t){this.props=e,this.context=t}function je(e,t){if(t==null)return e.__?je(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?je(e):null}function Bn(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 Bn(e)}}function mt(e){(!e.__d&&(e.__d=!0)&&we.push(e)&&!ze.__r++||Ot!==M.debounceRendering)&&((Ot=M.debounceRendering)||Pn)(ze)}function ze(){var e,t,n,r,o,i,s,d,l;for(we.sort(pt);e=we.shift();)e.__d&&(t=we.length,r=void 0,i=(o=(n=e).__v).__e,d=[],l=[],(s=n.__P)&&((r=ge({},o)).__v=o.__v+1,M.vnode&&M.vnode(r),xt(s,r,o,n.__n,s.ownerSVGElement!==void 0,32&o.__u?[i]:null,d,i??je(o),!!(32&o.__u),l),r.__.__k[r.__i]=r,An(d,r,l),r.__e!=i&&Bn(r)),we.length>t&&we.sort(pt));ze.__r=0}function qn(e,t,n,r,o,i,s,d,l,u,h){var c,m,v,g,b,_=r&&r.__k||On,k=t.length;for(n.__d=l,function(y,j,I){var C,E,x,P,D,T=j.length,p=I.length,f=p,w=0;for(y.__k=[],C=0;C<T;C++)(E=y.__k[C]=(E=j[C])==null||typeof E=="boolean"||typeof E=="function"?null:typeof E=="string"||typeof E=="number"||typeof E=="bigint"||E.constructor==String?Re(null,E,null,null,E):Ze(E)?Re(X,{children:E},null,null,null):E.constructor===void 0&&E.__b>0?Re(E.type,E.props,E.key,E.ref?E.ref:null,E.__v):E)!=null?(E.__=y,E.__b=y.__b+1,D=to(E,I,P=C+w,f),E.__i=D,x=null,D!==-1&&(f--,(x=I[D])&&(x.__u|=131072)),x==null||x.__v===null?(D==-1&&w--,typeof E.type!="function"&&(E.__u|=65536)):D!==P&&(D===P+1?w++:D>P?f>T-P?w+=D-P:w--:w=D<P&&D==P-1?D-P:0,D!==C+w&&(E.__u|=65536))):(x=I[C])&&x.key==null&&x.__e&&(x.__e==y.__d&&(y.__d=je(x)),ht(x,x,!1),I[C]=null,f--);if(f)for(C=0;C<p;C++)(x=I[C])!=null&&!(131072&x.__u)&&(x.__e==y.__d&&(y.__d=je(x)),ht(x,x))}(n,t,_),l=n.__d,c=0;c<k;c++)(v=n.__k[c])!=null&&typeof v!="boolean"&&typeof v!="function"&&(m=v.__i===-1?Pe:_[v.__i]||Pe,v.__i=c,xt(e,v,m,o,i,s,d,l,u,h),g=v.__e,v.ref&&m.ref!=v.ref&&(m.ref&&kt(m.ref,null,v),h.push(v.ref,v.__c||g,v)),b==null&&g!=null&&(b=g),65536&v.__u||m.__k===v.__k?l=Fn(v,l,e):typeof v.type=="function"&&v.__d!==void 0?l=v.__d:g&&(l=g.nextSibling),v.__d=void 0,v.__u&=-196609);n.__d=l,n.__e=b}function Fn(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=Fn(r[o],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function fe(e,t){return t=t||[],e==null||typeof e=="boolean"||(Ze(e)?e.some(function(n){fe(n,t)}):t.push(e)),t}function to(e,t,n,r){var o=e.key,i=e.type,s=n-1,d=n+1,l=t[n];if(l===null||l&&o==l.key&&i===l.type)return n;if(r>(l==null||131072&l.__u?0:1))for(;s>=0||d<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&o==l.key&&i===l.type)return s;s--}if(d<t.length){if((l=t[d])&&!(131072&l.__u)&&o==l.key&&i===l.type)return d;d++}}return-1}function Ut(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||eo.test(t)?n:n+"px"}function He(e,t,n,r,o){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Ut(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Ut(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?Bt:Ht,i)):e.removeEventListener(t,i?Bt:Ht,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 Ht(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(M.event?M.event(e):e)}function Bt(e){return this.l[e.type+!0](M.event?M.event(e):e)}function xt(e,t,n,r,o,i,s,d,l,u){var h,c,m,v,g,b,_,k,y,j,I,C,E,x,P,D=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),i=[d=t.__e=n.__e]),(h=M.__b)&&h(t);e:if(typeof D=="function")try{if(k=t.props,y=(h=D.contextType)&&r[h.__c],j=h?y?y.props.value:h.__:r,n.__c?_=(c=t.__c=n.__c).__=c.__E:("prototype"in D&&D.prototype.render?t.__c=c=new D(k,j):(t.__c=c=new le(k,j),c.constructor=D,c.render=ro),y&&y.sub(c),c.props=k,c.state||(c.state={}),c.context=j,c.__n=r,m=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),D.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=ge({},c.__s)),ge(c.__s,D.getDerivedStateFromProps(k,c.__s))),v=c.props,g=c.state,c.__v=t,m)D.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(D.getDerivedStateFromProps==null&&k!==v&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(k,j),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(k,c.__s,j)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(c.props=k,c.state=c.__s,c.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(T){T&&(T.__=t)}),I=0;I<c._sb.length;I++)c.__h.push(c._sb[I]);c._sb=[],c.__h.length&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(k,c.__s,j),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(v,g,b)})}if(c.context=j,c.props=k,c.__P=e,c.__e=!1,C=M.__r,E=0,"prototype"in D&&D.prototype.render){for(c.state=c.__s,c.__d=!1,C&&C(t),h=c.render(c.props,c.state,c.context),x=0;x<c._sb.length;x++)c.__h.push(c._sb[x]);c._sb=[]}else do c.__d=!1,C&&C(t),h=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++E<25);c.state=c.__s,c.getChildContext!=null&&(r=ge(ge({},r),c.getChildContext())),m||c.getSnapshotBeforeUpdate==null||(b=c.getSnapshotBeforeUpdate(v,g)),qn(e,Ze(P=h!=null&&h.type===X&&h.key==null?h.props.children:h)?P:[P],t,n,r,o,i,s,d,l,u),c.base=t.__e,t.__u&=-161,c.__h.length&&s.push(c),_&&(c.__E=c.__=null)}catch(T){t.__v=null,l||i!=null?(t.__e=d,t.__u|=l?160:32,i[i.indexOf(d)]=null):(t.__e=n.__e,t.__k=n.__k),M.__e(T,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=no(n.__e,t,n,r,o,i,s,l,u);(h=M.diffed)&&h(t)}function An(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)kt(n[r],n[++r],n[++r]);M.__c&&M.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){M.__e(i,o.__v)}})}function no(e,t,n,r,o,i,s,d,l){var u,h,c,m,v,g,b,_=n.props,k=t.props,y=t.type;if(y==="svg"&&(o=!0),i!=null){for(u=0;u<i.length;u++)if((v=i[u])&&"setAttribute"in v==!!y&&(y?v.localName===y:v.nodeType===3)){e=v,i[u]=null;break}}if(e==null){if(y===null)return document.createTextNode(k);e=o?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,k.is&&k),i=null,d=!1}if(y===null)_===k||d&&e.data===k||(e.data=k);else{if(i=i&&Me.call(e.childNodes),_=n.props||Pe,!d&&i!=null)for(_={},u=0;u<e.attributes.length;u++)_[(v=e.attributes[u]).name]=v.value;for(u in _)v=_[u],u=="children"||(u=="dangerouslySetInnerHTML"?c=v:u==="key"||u in k||He(e,u,null,v,o));for(u in k)v=k[u],u=="children"?m=v:u=="dangerouslySetInnerHTML"?h=v:u=="value"?g=v:u=="checked"?b=v:u==="key"||d&&typeof v!="function"||_[u]===v||He(e,u,v,_[u],o);if(h)d||c&&(h.__html===c.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(c&&(e.innerHTML=""),qn(e,Ze(m)?m:[m],t,n,r,o&&y!=="foreignObject",i,s,i?i[0]:n.__k&&je(n,0),d,l),i!=null)for(u=i.length;u--;)i[u]!=null&&Un(i[u]);d||(u="value",g!==void 0&&(g!==e[u]||y==="progress"&&!g||y==="option"&&g!==_[u])&&He(e,u,g,_[u],!1),u="checked",b!==void 0&&b!==e[u]&&He(e,u,b,_[u],!1))}return e}function kt(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){M.__e(r,n)}}function ht(e,t,n){var r,o;if(M.unmount&&M.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||kt(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){M.__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]&&ht(r[o],t,n||typeof e.type!="function");n||e.__e==null||Un(e.__e),e.__=e.__e=e.__d=void 0}function ro(e,t,n){return this.constructor(e,n)}function Te(e,t,n){var r,o,i,s;M.__&&M.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],xt(t,e=(!r&&n||t).__k=ie(X,null,[e]),o||Pe,Pe,t.ownerSVGElement!==void 0,!r&&n?[n]:o?null:t.firstChild?Me.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),An(i,e,s)}function Vn(e,t){Te(e,t,Vn)}function oo(e,t,n){var r,o,i,s,d=ge({},e.props);for(i in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?o=t[i]:d[i]=t[i]===void 0&&s!==void 0?s[i]:t[i];return arguments.length>2&&(d.children=arguments.length>3?Me.call(arguments,2):n),Re(e.type,d,r||e.key,o||e.ref,null)}function zn(e,t){var n={__c:t="__cC"+Mn++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&o.some(function(d){d.__e=!0,mt(d)})},this.sub=function(s){o.push(s);var d=s.componentWillUnmount;s.componentWillUnmount=function(){o.splice(o.indexOf(s),1),d&&d.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Me=On.slice,M={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(d){e=d}throw e}},Nn=0,le.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ge({},this.state),typeof e=="function"&&(e=e(ge({},n),this.props)),e&&ge(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),mt(this))},le.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),mt(this))},le.prototype.render=X,we=[],Pn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,pt=function(e,t){return e.__v.__b-t.__v.__b},ze.__r=0,Mn=0;var io=0;function a(e,t,n,r,o,i){var s,d,l={};for(d in t)d=="ref"?s=t[d]:l[d]=t[d];var u={type:e,props:l,key:n,ref:s,__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"&&(s=e.defaultProps))for(d in s)l[d]===void 0&&(l[d]=s[d]);return M.vnode&&M.vnode(u),u}var ve,Q,et,qt,Le=0,$n=[],Be=[],Ft=M.__b,At=M.__r,Vt=M.diffed,zt=M.__c,$t=M.unmount;function Ee(e,t){M.__h&&M.__h(Q,e,Le||t),Le=0;var n=Q.__H||(Q.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Be}),n.__[e]}function $(e){return Le=1,wt(Gn,e)}function wt(e,t,n){var r=Ee(ve++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Gn(void 0,t),function(d){var l=r.__N?r.__N[0]:r.__[0],u=r.t(l,d);l!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=Q,!Q.u)){var o=function(d,l,u){if(!r.__c.__H)return!0;var h=r.__c.__H.__.filter(function(m){return m.__c});if(h.every(function(m){return!m.__N}))return!i||i.call(this,d,l,u);var c=!1;return h.forEach(function(m){if(m.__N){var v=m.__[0];m.__=m.__N,m.__N=void 0,v!==m.__[0]&&(c=!0)}}),!(!c&&r.__c.props===d)&&(!i||i.call(this,d,l,u))};Q.u=!0;var i=Q.shouldComponentUpdate,s=Q.componentWillUpdate;Q.componentWillUpdate=function(d,l,u){if(this.__e){var h=i;i=void 0,o(d,l,u),i=h}s&&s.call(this,d,l,u)},Q.shouldComponentUpdate=o}return r.__N||r.__}function Z(e,t){var n=Ee(ve++,3);!M.__s&&St(n.__H,t)&&(n.__=e,n.i=t,Q.__H.__h.push(n))}function Oe(e,t){var n=Ee(ve++,4);!M.__s&&St(n.__H,t)&&(n.__=e,n.i=t,Q.__h.push(n))}function ne(e){return Le=5,de(function(){return{current:e}},[])}function Wn(e,t,n){Le=6,Oe(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 de(e,t){var n=Ee(ve++,7);return St(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Se(e,t){return Le=8,de(function(){return e},t)}function Qn(e){var t=Q.context[e.__c],n=Ee(ve++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Q)),t.props.value):e.__}function Ct(e,t){M.useDebugValue&&M.useDebugValue(t?t(e):e)}function Zn(){var e=Ee(ve++,11);if(!e.__){for(var t=Q.__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 so(){for(var e;e=$n.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(qe),e.__H.__h.forEach(gt),e.__H.__h=[]}catch(t){e.__H.__h=[],M.__e(t,e.__v)}}M.__b=function(e){Q=null,Ft&&Ft(e)},M.__r=function(e){At&&At(e),ve=0;var t=(Q=e.__c).__H;t&&(et===Q?(t.__h=[],Q.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Be,n.__N=n.i=void 0})):(t.__h.forEach(qe),t.__h.forEach(gt),t.__h=[],ve=0)),et=Q},M.diffed=function(e){Vt&&Vt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&($n.push(t)!==1&&qt===M.requestAnimationFrame||((qt=M.requestAnimationFrame)||ao)(so)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Be&&(n.__=n.__V),n.i=void 0,n.__V=Be})),et=Q=null},M.__c=function(e,t){t.some(function(n){try{n.__h.forEach(qe),n.__h=n.__h.filter(function(r){return!r.__||gt(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],M.__e(r,n.__v)}}),zt&&zt(e,t)},M.unmount=function(e){$t&&$t(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{qe(r)}catch(o){t=o}}),n.__H=void 0,t&&M.__e(t,n.__v))};var Wt=typeof requestAnimationFrame=="function";function ao(e){var t,n=function(){clearTimeout(r),Wt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Wt&&(t=requestAnimationFrame(n))}function qe(e){var t=Q,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Q=t}function gt(e){var t=Q;e.__c=e.__(),Q=t}function St(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Gn(e,t){return typeof t=="function"?t(e):t}function Kn(e,t){for(var n in t)e[n]=t[n];return e}function ft(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 $e(e){this.props=e}function Yn(e,t){function n(o){var i=this.props.ref,s=i==o.ref;return!s&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!s:ft(this.props,o)}function r(o){return this.shouldComponentUpdate=n,ie(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}($e.prototype=new le).isPureReactComponent=!0,$e.prototype.shouldComponentUpdate=function(e,t){return ft(this.props,e)||ft(this.state,t)};var Qt=M.__b;M.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Qt&&Qt(e)};var lo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Et(e){function t(n){var r=Kn({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=lo,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Zt=function(e,t){return e==null?null:fe(fe(e).map(t))},Jn={map:Zt,forEach:Zt,count:function(e){return e?fe(e).length:0},only:function(e){var t=fe(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:fe},co=M.__e;M.__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)}co(e,t,n,r)};var Gt=M.unmount;function Xn(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=Kn({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Xn(r,t,n)})),e}function er(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return er(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 Ne(){this.__u=0,this.t=null,this.__b=null}function tr(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function nr(e){var t,n,r;function o(i){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return ie(n,i)}return o.displayName="Lazy",o.__f=!0,o}function Ie(){this.u=null,this.o=null}M.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Gt&&Gt(e)},(Ne.prototype=new le).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=tr(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(d):d())};n.__R=s;var d=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=er(l,l.__c.__P,l.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.t.pop();)u.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Ne.prototype.componentWillUnmount=function(){this.t=[]},Ne.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]=Xn(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&ie(X,null,e.fallback);return o&&(o.__u&=-33),[ie(X,null,t.__a?null:e.children),o]};var Kt=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 uo(e){return this.getChildContext=function(){return e.context},e.children}function po(e){var t=this,n=e.i;t.componentWillUnmount=function(){Te(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)}}),Te(ie(uo,{context:t.context},e.__v),t.l)}function rr(e,t){var n=ie(po,{__v:e,i:t});return n.containerInfo=t,n}(Ie.prototype=new le).__a=function(e){var t=this,n=tr(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Kt(t,e,r)):o()};n?n(i):i()}},Ie.prototype.render=function(e){this.u=null,this.o=new Map;var t=fe(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},Ie.prototype.componentDidUpdate=Ie.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Kt(e,n,t)})};var or=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,mo=/^(?: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]/,ho=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,go=/[A-Z0-9]/g,fo=typeof document<"u",vo=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function ir(e,t,n){return t.__k==null&&(t.textContent=""),Te(e,t),typeof n=="function"&&n(),e?e.__c:null}function sr(e,t,n){return Vn(e,t),typeof n=="function"&&n(),e?e.__c:null}le.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(le.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Yt=M.event;function _o(){}function bo(){return this.cancelBubble}function yo(){return this.defaultPrevented}M.event=function(e){return Yt&&(e=Yt(e)),e.persist=_o,e.isPropagationStopped=bo,e.isDefaultPrevented=yo,e.nativeEvent=e};var It,xo={enumerable:!1,configurable:!0,get:function(){return this.class}},Jt=M.vnode;M.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,o={};for(var i in n){var s=n[i];if(!(i==="value"&&"defaultValue"in n&&s==null||fo&&i==="children"&&r==="noscript"||i==="class"||i==="className")){var d=i.toLowerCase();i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&s===!0?s="":d==="ondoubleclick"?i="ondblclick":d!=="onchange"||r!=="input"&&r!=="textarea"||vo(n.type)?d==="onfocus"?i="onfocusin":d==="onblur"?i="onfocusout":ho.test(i)?i=d:r.indexOf("-")===-1&&mo.test(i)?i=i.replace(go,"-$&").toLowerCase():s===null&&(s=void 0):d=i="oninput",d==="oninput"&&o[i=d]&&(i="oninputCapture"),o[i]=s}}r=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=fe(n.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),r=="select"&&o.defaultValue!=null&&(o.value=fe(n.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",xo)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=or,Jt&&Jt(e)};var Xt=M.__r;M.__r=function(e){Xt&&Xt(e),It=e.__c};var en=M.diffed;M.diffed=function(e){en&&en(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),It=null};var ar={ReactCurrentDispatcher:{current:{readContext:function(e){return It.__n[e.__c].props.value}}}};function lr(e){return ie.bind(null,e)}function Ue(e){return!!e&&e.$$typeof===or}function dr(e){return Ue(e)&&e.type===X}function cr(e){return Ue(e)?oo.apply(null,arguments):e}function jt(e){return!!e.__k&&(Te(null,e),!0)}function ur(e){return e&&(e.base||e.nodeType===1&&e)||null}var pr=function(e,t){return e(t)},mr=function(e,t){return e(t)},hr=X;function Tt(e){e()}function gr(e){return e}function fr(){return[!1,Tt]}var vr=Oe,_r=Ue;function br(e,t){var n=t(),r=$({h:{__:n,v:t}}),o=r[0].h,i=r[1];return Oe(function(){o.__=n,o.v=t,tt(o)&&i({h:o})},[e,n,t]),Z(function(){return tt(o)&&i({h:o}),e(function(){tt(o)&&i({h:o})})},[e]),n}function tt(e){var t,n,r=e.v,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}var ko={useState:$,useId:Zn,useReducer:wt,useEffect:Z,useLayoutEffect:Oe,useInsertionEffect:vr,useTransition:fr,useDeferredValue:gr,useSyncExternalStore:br,startTransition:Tt,useRef:ne,useImperativeHandle:Wn,useMemo:de,useCallback:Se,useContext:Qn,useDebugValue:Ct,version:"17.0.2",Children:Jn,render:ir,hydrate:sr,unmountComponentAtNode:jt,createPortal:rr,createElement:ie,createContext:zn,createFactory:lr,cloneElement:cr,createRef:Hn,Fragment:X,isValidElement:Ue,isElement:_r,isFragment:dr,findDOMNode:ur,Component:le,PureComponent:$e,memo:Yn,forwardRef:Et,flushSync:mr,unstable_batchedUpdates:pr,StrictMode:hr,Suspense:Ne,SuspenseList:Ie,lazy:nr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ar};const wo=Object.freeze(Object.defineProperty({__proto__:null,Children:Jn,Component:le,Fragment:X,PureComponent:$e,StrictMode:hr,Suspense:Ne,SuspenseList:Ie,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ar,cloneElement:cr,createContext:zn,createElement:ie,createFactory:lr,createPortal:rr,createRef:Hn,default:ko,findDOMNode:ur,flushSync:mr,forwardRef:Et,hydrate:sr,isElement:_r,isFragment:dr,isValidElement:Ue,lazy:nr,memo:Yn,render:ir,startTransition:Tt,unmountComponentAtNode:jt,unstable_batchedUpdates:pr,useCallback:Se,useContext:Qn,useDebugValue:Ct,useDeferredValue:gr,useEffect:Z,useErrorBoundary:function(e){var t=Ee(ve++,10),n=$();return t.__=e,Q.componentDidCatch||(Q.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]},useId:Zn,useImperativeHandle:Wn,useInsertionEffect:vr,useLayoutEffect:Oe,useMemo:de,useReducer:wt,useRef:ne,useState:$,useSyncExternalStore:br,useTransition:fr,version:"17.0.2"},Symbol.toStringTag,{value:"Module"})),tn=e=>{let t;const n=new Set,r=(s,d)=>{const l=typeof s=="function"?s(t):s;if(!Object.is(l,t)){const u=t;t=d??typeof l!="object"?l:Object.assign({},t,l),n.forEach(h=>h(t,u))}},o=()=>t,i={setState:r,getState:o,subscribe:s=>(n.add(s),()=>n.delete(s)),destroy:()=>n.clear()};return t=e(r,o,i),i};function Co(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function So(e){if(Object.prototype.hasOwnProperty.call(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 nn={exports:{}},nt={};const yr=So(wo);var rn,on,sn,an,ln={exports:{}},rt={};function Eo(){return on||(on=1,ln.exports=function(){if(rn)return rt;rn=1;var e=yr,t=typeof Object.is=="function"?Object.is:function(l,u){return l===u&&(l!==0||1/l==1/u)||l!=l&&u!=u},n=e.useState,r=e.useEffect,o=e.useLayoutEffect,i=e.useDebugValue;function s(l){var u=l.getSnapshot;l=l.value;try{var h=u();return!t(l,h)}catch{return!0}}var d=typeof window>"u"||window.document===void 0||window.document.createElement===void 0?function(l,u){return u()}:function(l,u){var h=u(),c=n({inst:{value:h,getSnapshot:u}}),m=c[0].inst,v=c[1];return o(function(){m.value=h,m.getSnapshot=u,s(m)&&v({inst:m})},[l,h,u]),r(function(){return s(m)&&v({inst:m}),l(function(){s(m)&&v({inst:m})})},[l]),i(h),h};return rt.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,rt}()),ln.exports}var Io=(an||(an=1,nn.exports=function(){if(sn)return nt;sn=1;var e=yr,t=Eo(),n=typeof Object.is=="function"?Object.is:function(l,u){return l===u&&(l!==0||1/l==1/u)||l!=l&&u!=u},r=t.useSyncExternalStore,o=e.useRef,i=e.useEffect,s=e.useMemo,d=e.useDebugValue;return nt.useSyncExternalStoreWithSelector=function(l,u,h,c,m){var v=o(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=s(function(){function _(C){if(!j){if(j=!0,k=C,C=c(C),m!==void 0&&g.hasValue){var E=g.value;if(m(E,C))return y=E}return y=C}if(E=y,n(k,C))return E;var x=c(C);return m!==void 0&&m(E,x)?E:(k=C,y=x)}var k,y,j=!1,I=h===void 0?null:h;return[function(){return _(u())},I===null?void 0:function(){return _(I())}]},[u,h,c,m]);var b=r(l,v[0],v[1]);return i(function(){g.hasValue=!0,g.value=b},[b]),d(b),b},nt}()),nn.exports);const jo=Co(Io),{useSyncExternalStoreWithSelector:To}=jo,dn=e=>{const t=typeof e=="function"?(r=>r?tn(r):tn)(e):e,n=(r,o)=>function(i,s=i.getState,d){const l=To(i.subscribe,i.getState,i.getServerState||i.getState,s,d);return Ct(l),l}(t,r,o);return Object.assign(n,t),n},xr=e=>e?dn(e):dn,Lo=1,Do=2,Lt={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)}},Ro=(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}},kr=(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},wr=({cards:e,index:t,hasEndCard:n,allResponses:r,uploadProgress:o={}})=>{if(t>=e.length||t<0)return null;const i=e[t];let s=t+1;const d=i.props.routingOptions||[];for(let h=0;h<d.length;h++){const{group:c,target:m}=d[h];if(!(c!=null&&c.length))continue;const v=c[0];if(v.questionIndex===void 0||v.questionIndex>r.length)continue;let g=cn({comparator:v.comparator,response:r[v.questionIndex],type:i.type,value:v.value});for(let b=1;b<c.length;b+=2){const _=c[b],k=c[b+1],y=cn({comparator:k.comparator,response:r[k.questionIndex],type:e[k.questionIndex].type,value:k.value});_===Lo?g&&(g=y):_===Do&&(g||(g=y))}if(g){s=m===-1&&n?e.length-1:m;break}}const l=e.findIndex(h=>h.type==="uploading");let u;return u=l>0?n?e.length-3:e.length-2:e.length-1,t>=u||s===-1||s!==null&&s>u?l>0&&Object.values(o).some(c=>c.isSubmitted&&!c.isComplete)?l:n?e.length-1:null:s===-1?null:s},cn=({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"rankorder":case"matrix":return Object.values(t).every(o=>o!==null);case"multiplechoice":return t!==void 0;case"multipleselect":return(t==null?void 0:t.length)>0;case"open":return t&&t.length>0;case"videovoice":return!!(t!=null&&t.mediaRecordingUid);default:return!1}if(e==="given_up")return n!=="recordedtask"||"taskStatus"in t&&t.taskStatus==="given.up";if(e==="partial")return n==="matrix"&&kr(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);case"rankorder":return t===null||Object.values(t).some(o=>o===null);default:return!1}return Lt[e](t,r)},No=e=>{var r,o,i;switch(e.type){case"multipleselect":return e&&e.props&&e.props.options?e.props.options.length>13?e.props.options.map(s=>[s.value]):(t=e.props.options.map(s=>s.value),n=!e.props.properties.required,t.reduce((s,d)=>s.concat(s.map(l=>[...l,d])),[[]]).filter(s=>n||s.length>0)):null;case"multiplechoice":{if(!e||!e.props||!e.props.options)return null;const s=e.props.options.map(d=>d.value);return e.props.properties.required||s.push(void 0),s}case"matrix":{if(!((r=e==null?void 0:e.props)!=null&&r.options))return null;const s=e.props.properties.matrixColumn,d=e.props.options,l=d.reduce((h,c)=>(h[c.id]=null,h),{}),u=[{...l,[d[0].id]:s[0].value},d.reduce((h,c)=>(h[c.id]=s[0].value,h),{})];return e.props.properties.required||u.push(l),u}case"likert":{const s=Number((i=(o=e.props)==null?void 0:o.properties)==null?void 0:i.range)||5;return[...Array.from(Array(s).keys()).map(l=>l+1),...e.props.properties.required?[]:[null]]}case"nps":return[0,1,2,3,4,5,6,7,8,9,10,...e.props.properties.required?[]:[null]];case"videovoice":case"open":return["1",...e.props.properties.required?[]:[""]];case"recordedtask":{const s=[{taskStatus:"completed"},{taskStatus:"given.up"}];return e.props.properties.required||s.push({taskStatus:"abandoned"}),s}case"texturlprompt":return[void 0,...e.props.properties.required?[]:[{skipped:!0}]];case"consentlegal":return[1,...e.props.properties.required?[]:[null]];default:return[1]}var t,n},Po=e=>e in Lt,Mo=e=>typeof e=="object"&&e!==null&&"taskStatus"in e,Oo=(e,t=[])=>t.reduce((n,r)=>{const{group:o,target:i}=r;if(!(o!=null&&o.length))return[...n];const s=o.filter(d=>!!Number(d)||typeof d=="object"&&d.questionIndex===e).map(d=>{const{comparator:l,value:u}=d;return{comparator:l,target:i,value:u}});return[...n,...s]},[]),ot=new Set(["thanks","uploading"]),F=xr()((e,t)=>({allResponses:[],answers:void 0,apiURL:"",border:"#000000",cards:[],close:async(n=Y.APP_ID)=>{const r=t(),{fadeout:o,remove:i,trackHistory:s,studyType:d}=r;await o(n),it(r)||s({event:"closed"}),H.breadcrumbsLogger.info("SurveyClosing",{surveyId:r.surveyId}),Y.ConflictingWidgets.enable(),i({initiator:H.DismissReason.Closed,studyType:d})},configureExitOnOverlayClick:()=>{},customMetadata:{},destroy:async n=>{const{eventEmitFn:r,fadeout:o,remove:i,studyType:s,surveyId:d}=t();r("survey.complete",d),await o(n),Y.ConflictingWidgets.enable(),i({initiator:H.DismissReason.Complete,studyType:s})},endCard:{headline:""},envId:"",eventEmitFn:H.eventEmitter.emit.bind(H.eventEmitter),fadeout:async n=>{const{eventEmitFn:r,headers:o,viewDocument:i}=t();return H.shouldDirectEmbed(o)?Promise.resolve():(r(H.SprigEvent.SurveyFadingOut),new Promise(s=>{const d=i.getElementById(n);d?(d.addEventListener("transitionend",()=>{s()}),d.classList.remove("ul-app--visible")):s()}))},forceBrandedLogo:!1,frame:document.createElement("iframe"),handleClickEmbedButton:n=>{const{cards:r,eventEmitFn:o,index:i}=t();o(n,{qid:r[i].name,props:r[i].props}),e(()=>({hasViewedEmbed:!0}))},handleUploadUpdate:({mediaRecordingUid:n,isComplete:r,progressPct:o,isSubmitted:i})=>{var v,g,b;const{cards:s,destroy:d,index:l,uploadProgress:u}=t(),h=r||((v=u[n])==null?void 0:v.isComplete),c={...u,[n]:{progressPct:h?100:o||((g=u[n])==null?void 0:g.progressPct),isComplete:h,isSubmitted:i||((b=u[n])==null?void 0:b.isSubmitted)}};if(e({uploadProgress:c}),s[l].type!=="uploading")return;const m=Object.entries(u).every(([_,k])=>!k.isSubmitted||k.isComplete||n==_&&r);if(m&&l>=s.length-1)return d(Y.APP_ID);e({index:m?l+1:l,uploadingCardViewed:!0})},hasViewedEmbed:!1,headers:{Authorization:"","Content-Type":"","userleap-platform":"web","x-ul-environment-id":"","x-ul-installation-method":"web-snippet","x-ul-sdk-version":"","x-ul-visitor-id":""},index:0,isPreview:!1,marketingUrl:"https://sprig.com",meta:{ch:0,cw:0,l:"",mode:null,p:"",sh:0,sw:0},mode:void 0,next:n=>{const{allResponses:r,cards:o,eventEmitFn:i,index:s,responseGroupUid:d,submit:l,trackHistory:u,uploadProgress:h,viewedCardCount:c}=t();e({minScrollableHeight:void 0});const m=Array.isArray(n.data)?n.data:[n.data],v=Date.now(),g=[...o],b={response:[],responseGroupUid:d,questionIndex:s};let _=null;const k=r.slice(0);m.forEach((I,C)=>{const E=g[s+C],{type:x,...P}=I,D={...P,answeredAt:v},T=D.value;(f=>f&&!ot.has(f.type))(E)&&(E.value=T,E.secondaryValue=D.secondaryValue||null),b.response.push(D);let p=T;x!=="multipleselect"&&x!=="multiplechoice"||T===null||(p=x==="multiplechoice"?Object.values(T).find(f=>f!==!1):T,x==="multipleselect"&&(p=g[s+C].props.options.reduce((f,w)=>(T[w.id]&&f.push(w.value),f),[]))),k[s+C]=p,_=wr({cards:g,index:s+C,hasEndCard:!!n.endCard,uploadProgress:h,allResponses:k})}),e({allResponses:k}),(_===null||ot.has(g[_].type))&&(b.completedAt=v);const y=l(b);if(_===null)return void n.completeSurvey();_&&!ot.has(g[_].type)&&y.finally(()=>{u({event:"seen",index:_})});const j=g[_];g[_]&&i&&i("survey.question",{qid:j.name,props:j.props}),e({cards:g,hasViewedEmbed:!1,index:_,viewedCardCount:c+1})},pendingRemoveIframeReason:null,previewKey:null,previewMode:void 0,recorder:()=>{},recorderEventEmitter:H.eventEmitter,resolveTrackedPromise:()=>{const{removeIframeIfReady:n}=t();e(r=>({unresolvedRequestCount:r.unresolvedRequestCount-1})),n()},responseGroupUid:"",remove:({initiator:n,studyType:r})=>{const{eventEmitFn:o,removeIframeIfReady:i,surveyId:s}=t();e({pendingRemoveIframeReason:n,studyType:r}),o(H.SprigEvent.SurveyCloseRequested,{name:H.SprigEvent.SurveyCloseRequested,initiator:n,studyType:r,"survey.id":s}),i()},removeIframeIfReady:()=>{const{eventEmitFn:n,pendingRemoveIframeReason:r,unresolvedRequestCount:o,studyType:i,surveyId:s}=t();r&&o===0&&(n(H.SprigEvent.SurveyWillClose,{name:H.SprigEvent.SurveyWillClose,initiator:r,studyType:i,"survey.id":s}),e({pendingRemoveIframeReason:null,studyType:i}))},seen:async()=>{const{trackHistory:n}=t();return n({event:"seen",isNew:!0})},slugName:null,showStripes:!1,showSurveyBrand:!1,styleNonce:"",submit:async({completedAt:n,questionIndex:r,response:o,responseGroupUid:i})=>{const s=t();if(!i||it(s))return;const d={responseGroupUid:i,meta:s.meta,customMetadata:s.customMetadata,responses:o,completedAt:n,previewKey:s.previewKey},l=await s.trackPromise(H.sprigFetch(`${s.apiURL}/sdk/1/environments/${s.envId}/visitors/${s.userId}/responses/submit`,{body:JSON.stringify(d),headers:s.headers,method:"POST"}));l.ok?o.forEach((u,h)=>{s.eventEmitFn(H.SprigEvent.QuestionAnswered,{...u,questionIndex:r?r+h:void 0,"survey.id":s.surveyId})}):l.reportError&&(console.warn("[Sprig] (ERR-427) Failed to submit response",l.error),await s.trackPromise(un(s,"submitResponse",l.error)))},surveyId:0,tabTitle:"",trackHistory:async({event:n,index:r,isNew:o=!1})=>{const i=t();if(it(i))return;const{cards:s,index:d}=i;let l=r??d,u=s[l];for(;u;){const h={sid:i.surveyId,qid:u.name,action:n,vid:i.userId,eid:i.envId,isNew:o,responseGroupUid:i.responseGroupUid,previewKey:i.previewKey},c=await i.trackPromise(H.sprigFetch(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`,{method:"POST",headers:i.headers,body:JSON.stringify(h)}));!c.ok&&c.reportError&&(console.warn("[Sprig] (ERR-428) Failed to track survey event",c.error),await i.trackPromise(un(i,"trackHistory",c.error)));const m=s[l+1];if(!u.groupId||!(m!=null&&m.groupId)||m.groupId!==u.groupId)break;l++,u=m,o=!1}},trackPromise:async n=>{const{resolveTrackedPromise:r}=t();return e(o=>({unresolvedRequestCount:o.unresolvedRequestCount+1})),n.then(o=>(r(),o)).catch(o=>{throw r(),o})},unresolvedRequestCount:0,update:()=>{const{cards:n,index:r,headers:o,eventEmitFn:i,frame:s,useMobileStyling:d,surveyId:l,viewDocument:u}=t(),h=o["userleap-platform"]==="web",c=H.shouldDirectEmbed(o),m=n[r],v=m.type==="matrix"&&!(m.props.properties.displayMatrixAsAccordion||d);e({minScrollableHeight:void 0}),setTimeout(()=>{var k,y,j;!c&&!d&&((k=s==null?void 0:s.setWidth)==null||k.call(s,Y.DEFAULT_WIDTH_PX));const[g,b,_]=Y.calculateFrameDimensions(u,h&&!d,c);c?(i(H.SprigEvent.SurveyHeight,{name:H.SprigEvent.SurveyHeight,contentFrameHeight:g,"survey.id":l}),i(H.SprigEvent.SurveyWidth,{name:H.SprigEvent.SurveyWidth,contentFrameWidth:b,"survey.id":l})):((y=s.setHeight)==null||y.call(s,g),e({minScrollableHeight:_}),!d&&v&&((j=s.setWidth)==null||j.call(s,b)))},100)},uploadingCardViewed:!1,uploadProgress:{},useDesktopPrototype:void 0,useMobileStyling:!1,userId:"",viewDocument:window.document,viewedCardCount:0,focusedQuestionId:null,setFocusedQuestionId:n=>e({focusedQuestionId:n})})),it=e=>!e.userId||e.meta&&e.meta.mode==="test"||e.isPreview||e.previewMode,un=async(e,t,n)=>{const{mode:r,userId:o,envId:i,apiURL:s,headers:d,viewDocument:l}=e,u=l.documentElement,h={mode:r,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:u.clientWidth,clientHeight:u.clientHeight,location:window.location.href,language:window.navigator.language},c={action:t,err:{message:`${n==null?void 0:n.name} - ${n==null?void 0:n.message}`,stack:n==null?void 0:n.stack},meta:h,vid:o,envId:i};(await H.sprigFetch(`${s}/sdk/1/errors`,{method:"POST",headers:Object.assign({"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},d),body:JSON.stringify(c)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",n)},Cr=e=>ie("svg",{fill:"none",height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e},ie("path",{d:"M17 10L12 15L7 10",stroke:"#0B2330",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})),Sr=e=>ie("svg",{fill:"none",height:10,viewBox:"0 0 10 10",width:10,xmlns:"http://www.w3.org/2000/svg",...e},ie("path",{d:"M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005",stroke:"white",strokeLinecap:"round",strokeWidth:2})),Uo=({visible:e})=>a("div",{className:"sprig-check-background",style:{opacity:e?1:0},children:a(Sr,{className:"sprig-check"})}),pn="250ms",Ho=Et(({animate:e,children:t,header:n,isOpen:r,onClick:o,showHeaderCheck:i},s)=>{const d=ne(null),[l,u]=$(0),[h,c]=$("none"),[m,v]=$(!0);return Z(()=>{var b;const g=(b=d.current)==null?void 0:b.getBoundingClientRect();u(r&&g?g.height:0)},[r]),Z(()=>{!l&&r||!m||v(!1),c(e&&!m?`height ${pn} ease`:"none")},[e,m,l,r]),a("div",{className:"sprig-accordion",ref:s,children:[a("button",{className:"sprig-accordion-header-container",onClick:o,type:"button",children:[a("div",{className:"sprig-header-label-container",children:[a("span",{className:"sprig-header-label",children:n}),a(Uo,{visible:i})]}),a(Cr,{className:"sprig-caret",style:{transitionDuration:e?pn:"0",transform:r?"rotate(-180deg)":"none"}})]}),a("div",{className:"sprig-accordion-body",style:{transition:h,height:l},children:a("div",{ref:d,children:t})})]})}),Dt=({style:e,stroke:t="black"})=>a("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[a("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),a("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),B=(...e)=>e.filter(Boolean).join(" "),te=(e,t,n)=>{const r=t?"--mobile":"--desktop";return`${e+r} ${e+(n?`${r}_${n}`:"")} ${e}`},Bo=(e,t)=>`${e} ${e}__${t}`,re=e=>a("button",{...e,className:B("ul-card-text__button",e.className),id:"ul-card-text__button"}),Er=()=>{const{viewDocument:e}=F(r=>({viewDocument:r.viewDocument})),[t,n]=$(!1);return Z(()=>{const r=e.querySelector(".sprig-question-body"),o=new ResizeObserver(()=>{window.requestAnimationFrame(()=>{n(!!(r&&Y.isHTMLElement(r)&&r.scrollHeight>r.offsetHeight))})});return r&&o.observe(r),()=>{r&&o.disconnect()}},[e]),t},mn=({plainText:e,richText:t,id:n,className:r,isHeader:o})=>t?a("div",{className:r,dangerouslySetInnerHTML:{__html:t},id:n}):e?a(o?"h1":"p",{className:r,id:n,children:e}):null,qo=()=>{const{cards:e,close:t,endCard:n,headers:r,index:o}=F(d=>({cards:d.cards,close:d.close,endCard:d.endCard,headers:d.headers,index:d.index,useMobileStyling:d.useMobileStyling})),i=e.length,s=de(()=>()=>t(Y.APP_ID),[t]);return["email","link"].includes(r["userleap-platform"])||n&&o+1===i?null:a("div",{"aria-label":"Close button",className:"close-btn",onClick:s,onKeyPress:d=>{d.key==="Enter"&&s()},role:"button",tabIndex:0,children:a("svg",{fill:"none",height:"16px",viewBox:"0 0 13 13",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:a("path",{d:"M2.54964 1.78369L1.78369 2.54964L5.73405 6.5L1.78369 10.4504L2.54964 11.2163L6.5 7.26595L10.4504 11.2163L11.2163 10.4504L7.26595 6.5L11.2163 2.54964L10.4504 1.78369L6.5 5.73405L2.54964 1.78369Z",fill:"#262136"})})})},se=({message:e,properties:t})=>{const n=ne(null),r=t==null?void 0:t.captionText,o=Er();return a("div",{className:B("question-header-container","sprig-header-container",o?"sprig-border-bottom":null),ref:n,children:[a("div",{className:"question-header-button-container",children:[a(mn,{className:"ul-question",id:"ul-question",isHeader:!0,plainText:e,richText:t==null?void 0:t.questionHtml}),a(qo,{})]}),a(mn,{className:"ul-caption",id:"ul-caption",plainText:r,richText:t==null?void 0:t.captionHtml})]})},Fo=()=>a("svg",{fill:"none",height:"10",viewBox:"0 0 13 10",width:"13",xmlns:"http://www.w3.org/2000/svg",children:a("path",{d:"M11.5 1.5L4.5 8.5L1 5",stroke:"#FFFFFF",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),Ge=({isSubmitDisabled:e,handleSubmit:t})=>a("div",{className:"ul-card-longform__submit-button-container",children:a(re,{className:"ul-card-longform__submit-button",disabled:e,onClick:t,children:["OK ",a(Fo,{})]})}),hn=({buttonText:e="View Prototype",handleClick:t})=>a("button",{className:"prototype-button",onClick:t,children:e},"prototype-btn"),pe=({defaultBody:e,embeddedType:t="prototype",properties:n})=>{var c;const{handleClickEmbedButton:r,hasViewedEmbed:o,headers:i,useDesktopPrototype:s}=F(m=>({handleClickEmbedButton:m.handleClickEmbedButton,hasViewedEmbed:m.hasViewedEmbed,headers:m.headers,useDesktopPrototype:m.useDesktopPrototype})),d=(n==null?void 0:n.conceptUrl)||((c=n==null?void 0:n.consentDocument)==null?void 0:c.url),l=window.innerWidth<Y.EMBED_MOBILE_MAX_WIDTH,u=i["userleap-platform"],h=(m,v)=>{m.preventDefault(),r(v)};if(!s&&l&&!o&&d&&["email","link"].includes(u)){if(t==="prototype")return a(hn,{handleClick:m=>{h(m,"question.prototype.click")}});if(t==="pdf")return a(hn,{buttonText:(n==null?void 0:n.viewDocumentText)||"View Document",handleClick:m=>{h(m,"question.agreement.click")}})}return e()},Ir=({isSelected:e,id:t,divId:n,themeColor:r})=>a("div",{"aria-checked":e,"aria-labelledby":`label-${t}`,className:"select-checkbox",id:n,role:"checkbox",style:e?{backgroundColor:r,borderColor:r,boxShadow:"none"}:{},tabIndex:0,children:e&&a(Sr,{})}),jr=(e,t)=>{const n=ne(0);return()=>{if(e.current){const r=e.current;r.style.height="1px";const o=r.scrollHeight+(r.offsetHeight-r.clientHeight),i=parseInt(window.getComputedStyle(r).getPropertyValue("max-height")),s=o<=i?o:i;n.current!==s&&t(),n.current=s,r.style.height=`${s}px`}}},Ke=({ariaLabel:e,border:t,choiceStyle:n={},label:r,isSelected:o,value:i,text:s,id:d,isRadio:l,useMobileStyling:u,error:h,allowTextEntry:c,noneOfTheAbove:m,promptText:v,onUserInputChanged:g})=>{const{styleNonce:b,viewDocument:_}=F(f=>({styleNonce:f.styleNonce,viewDocument:f.viewDocument})),[k,y]=$(!1);Vo(_,t,b);const j=({isSelected:f,userText:w})=>{g&&g({id:d,selected:f,value:i,userText:w,noneOfTheAbove:m})},I=f=>{f.stopPropagation(),j({isSelected:l||!o,userText:s}),y(!1)},C=()=>{k||y(!0)},E=()=>{k&&y(!1)},x={onClick:f=>I(f),onKeyPress:f=>(w=>{w.key!=="Enter"&&w.key!==" "||I(w)})(f)};"ontouchstart"in _.documentElement?(x.onTouchStart=E,x.onTouchCancel=E,x.onTouchEnd=E):(x.onMouseDown=C,x.onMouseLeave=E);const P=l?`radio-${d}`:`checkbox-${d}`,D=o||k?[Fe]:[],T=[...h?[Tr]:[],...D],p=r?{"aria-labelledby":`label-${d}`}:{"aria-label":e};return a("div",{className:B(te("choice",u),...T),id:`choice-div-${d}`,style:{...n,...h?{borderColor:Y.ERROR_BORDER_COLOR}:{}},...x,children:[a("div",{className:B("choice-label-container"),children:[l?a("div",{...p,className:B("select-radio",...D),id:P,role:"radio",tabIndex:0}):a(Ir,{divId:P,id:d,isSelected:o,themeColor:t}),r&&a("label",{className:B(te("select-label",u)),htmlFor:P,id:`label-${d}`,children:r})]}),c&&o&&a("div",{className:B("choice-text-entry-container",...D),children:a(Ao,{onTextChange:f=>j({isSelected:o,userText:f}),promptText:v||"Please specify",textValue:s,useMobileStyling:u})})]})},Ao=({promptText:e,textValue:t,onTextChange:n,useMobileStyling:r})=>{const o=ne(null),{update:i}=F(d=>({update:d.update})),s=jr(o,()=>i());return Z(()=>(s(),o.current&&o.current.focus(),()=>{i()}),[]),a("textarea",{"aria-label":e,"aria-multiline":"true","aria-placeholder":e,className:B(te("choice-text-input",r)),"data-gramm":"false",maxLength:5e3,name:"text",onChange:d=>{s(),d.stopPropagation(),n(d.currentTarget.value)},onClick:d=>{d.stopPropagation()},onKeyPress:d=>{d.stopPropagation()},placeholder:e,ref:o,role:"textbox",rows:1,value:t})},gn="ul-select-style-element",Fe="ul-select-active-dynamic-style",Tr="ul-select-error-dynamic-style",Vo=(e,t,n)=>{let r=e.getElementById(gn),o=!1;r||(r=e.createElement("style"),o=!0),r.tagName.toLowerCase()==="style"&&(r.id=gn,n&&(r.nonce=n),r.textContent=zo(t),o&&e.head.appendChild(r))},zo=e=>`
|
|
2
|
+
.${Fe} {
|
|
3
|
+
border-color: ${e};
|
|
4
|
+
}
|
|
5
|
+
.${Fe} .select-radio, .${Fe}.select-radio {
|
|
6
|
+
border: 6px solid ${e};
|
|
7
|
+
box-shadow: none;
|
|
8
|
+
}
|
|
9
|
+
.${Tr} {
|
|
10
|
+
border-color: ${Y.ERROR_BORDER_COLOR};
|
|
11
|
+
}
|
|
12
|
+
`,me=({children:e})=>a("div",{className:"sprig-question-body",children:e}),_e=({children:e})=>{const t=Er();return a("div",{className:B("sprig-question-footer-container",t?"sprig-border-top":null),children:e})},Lr=({logoOnly:e=!1,style:t={}})=>a("svg",{alt:(e?"Powered by ":"")+"Sprig",width:e?"35":"112",height:"15",viewBox:e?"79 0 31 15":"0 0 112 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"block",...t},children:[!e&&a("path",{d:"M0.648926 12.0181V2.8584H4.21631C6.0127 2.8584 7.25684 4.06445 7.25684 5.86084V5.87354C7.25684 7.66357 6.0127 8.88867 4.21631 8.88867H2.0708V12.0181H0.648926ZM3.86084 4.05811H2.0708V7.69531H3.86084C5.09229 7.69531 5.80957 7.02881 5.80957 5.87988V5.86719C5.80957 4.72461 5.09229 4.05811 3.86084 4.05811ZM11.6621 12.1514C9.63721 12.1514 8.39941 10.7993 8.39941 8.57764V8.56494C8.39941 6.34961 9.64355 4.99121 11.6621 4.99121C13.6743 4.99121 14.9185 6.34326 14.9185 8.56494V8.57764C14.9185 10.7993 13.6807 12.1514 11.6621 12.1514ZM11.6621 11.0024C12.8428 11.0024 13.5156 10.1011 13.5156 8.57764V8.56494C13.5156 7.03516 12.8428 6.14014 11.6621 6.14014C10.4751 6.14014 9.80859 7.03516 9.80859 8.56494V8.57764C9.80859 10.1074 10.4751 11.0024 11.6621 11.0024ZM17.6226 12.0181L15.7183 5.12451H17.1021L18.3398 10.4438H18.4414L19.8633 5.12451H21.1709L22.5928 10.4438H22.7007L23.9321 5.12451H25.2969L23.3989 12.0181H21.9834L20.5552 6.87646H20.4473L19.0254 12.0181H17.6226ZM29.334 12.1514C27.3154 12.1514 26.0967 10.7739 26.0967 8.59033V8.58398C26.0967 6.43213 27.3408 4.99121 29.2642 4.99121C31.1875 4.99121 32.3682 6.38135 32.3682 8.45068V8.93311H27.4805C27.5059 10.2534 28.2295 11.0215 29.3657 11.0215C30.248 11.0215 30.7749 10.5835 30.9399 10.228L30.9653 10.1772L32.292 10.1709L32.2793 10.228C32.0508 11.1357 31.0986 12.1514 29.334 12.1514ZM29.2705 6.12109C28.3311 6.12109 27.6201 6.76221 27.4995 7.94922H31.0034C30.8955 6.71777 30.2036 6.12109 29.2705 6.12109ZM34.0059 12.0181V5.12451H35.3833V6.16553H35.4849C35.7324 5.43555 36.3735 5.00391 37.2939 5.00391C37.5161 5.00391 37.7573 5.03564 37.897 5.06738V6.33691C37.6494 6.28613 37.4146 6.25439 37.1543 6.25439C36.1006 6.25439 35.3833 6.90186 35.3833 7.89844V12.0181H34.0059ZM41.9277 12.1514C39.9092 12.1514 38.6904 10.7739 38.6904 8.59033V8.58398C38.6904 6.43213 39.9346 4.99121 41.8579 4.99121C43.7812 4.99121 44.9619 6.38135 44.9619 8.45068V8.93311H40.0742C40.0996 10.2534 40.8232 11.0215 41.9595 11.0215C42.8418 11.0215 43.3687 10.5835 43.5337 10.228L43.5591 10.1772L44.8857 10.1709L44.873 10.228C44.6445 11.1357 43.6924 12.1514 41.9277 12.1514ZM41.8643 6.12109C40.9248 6.12109 40.2139 6.76221 40.0933 7.94922H43.5972C43.4893 6.71777 42.7974 6.12109 41.8643 6.12109ZM49.1133 12.1323C47.3804 12.1323 46.2568 10.7422 46.2568 8.57764V8.56494C46.2568 6.38135 47.3613 5.00391 49.1133 5.00391C50.0591 5.00391 50.8652 5.47363 51.2334 6.21631H51.3413V2.42041H52.7124V12.0181H51.3413V10.9326H51.2334C50.8335 11.688 50.0781 12.1323 49.1133 12.1323ZM49.5068 10.958C50.6558 10.958 51.3604 10.0503 51.3604 8.57764V8.56494C51.3604 7.09229 50.6494 6.18457 49.5068 6.18457C48.3516 6.18457 47.6597 7.08594 47.6597 8.56494V8.57764C47.6597 10.0566 48.3516 10.958 49.5068 10.958ZM61.98 12.1323C61.0151 12.1323 60.2598 11.688 59.8599 10.9326H59.7583V12.0181H58.3809V2.42041H59.7583V6.21631H59.8599C60.228 5.47363 61.0342 5.00391 61.98 5.00391C63.7319 5.00391 64.8364 6.38135 64.8364 8.56494V8.57764C64.8364 10.7422 63.7192 12.1323 61.98 12.1323ZM61.5928 10.958C62.7417 10.958 63.4336 10.0566 63.4336 8.57764V8.56494C63.4336 7.08594 62.7417 6.18457 61.5928 6.18457C60.4438 6.18457 59.7329 7.09229 59.7329 8.56494V8.57764C59.7329 10.0503 60.4438 10.958 61.5928 10.958ZM66.8867 14.4429C66.7153 14.4429 66.5122 14.4302 66.3345 14.4111V13.3257C66.4678 13.3447 66.6392 13.3511 66.7979 13.3511C67.439 13.3511 67.8262 13.0781 68.0293 12.3799L68.1309 12.0244L65.6299 5.12451H67.1152L68.8418 10.6343H68.9624L70.6826 5.12451H72.1299L69.5654 12.2847C68.9814 13.9287 68.2832 14.4429 66.8867 14.4429Z",fill:"black",fillOpacity:"0.7"}),a("path",{d:"M81.1088 6.63629C79.6878 6.32154 78.9672 5.76865 78.9672 4.99369C78.9672 4.19299 79.736 3.5886 80.7556 3.5886C81.8066 3.5886 82.5995 4.25285 82.5995 5.13336V5.20352H84.0518V5.13336C84.0518 3.52424 82.6405 2.30774 80.7693 2.30774C79.8676 2.30774 79.0414 2.58451 78.4433 3.08655C78.1463 3.33144 77.9077 3.63818 77.7448 3.98479C77.5818 4.33141 77.4984 4.70934 77.5005 5.09153C77.4946 5.44197 77.5675 5.78934 77.714 6.10857C77.8605 6.42779 78.0769 6.71092 78.3475 6.93752C78.8512 7.37584 79.5659 7.70024 80.4709 7.90299C81.9949 8.23898 82.7676 8.81054 82.7676 9.60094C82.7676 10.4576 81.9258 11.1032 80.813 11.1032C79.6571 11.1032 78.7854 10.3856 78.7854 9.43424V9.36408H77.3318V9.43424C77.3318 11.1167 78.8219 12.3847 80.7973 12.3847C81.7421 12.3847 82.6093 12.0983 83.2393 11.5769C83.5519 11.3237 83.8034 11.0048 83.9753 10.6433C84.1472 10.2818 84.2352 9.88702 84.2329 9.48766C84.2329 8.05875 83.1833 7.09907 81.1088 6.63629Z",fill:"black",fillOpacity:"0.7"}),a("path",{d:"M89.2394 4.68276C88.6963 4.67605 88.1596 4.79915 87.6751 5.04156C87.1905 5.28397 86.7725 5.63851 86.4566 6.07497V4.85204H85.0747V14.8479H86.4566V11.0356C86.7725 11.472 87.1906 11.8265 87.6751 12.0688C88.1596 12.3111 88.6963 12.434 89.2394 12.4272C91.3836 12.4272 93 10.7627 93 8.55495C93 6.34723 91.3836 4.68276 89.2394 4.68276ZM91.5608 8.84202C91.5057 9.41605 91.2512 9.95356 90.8406 10.3633C90.4299 10.773 89.8883 11.0296 89.3078 11.0896C88.5363 11.1669 87.8177 10.9461 87.2841 10.4692C86.7505 9.99222 86.4566 9.3106 86.4566 8.55495C86.4566 7.10159 87.5538 6.00546 89.0087 6.00546C89.7619 6.00546 90.4421 6.29124 90.9171 6.81002C91.407 7.34232 91.6357 8.06385 91.5608 8.84202Z",fill:"black",fillOpacity:"0.7"}),a("path",{d:"M109.95 4.85407V6.06349C109.298 5.18298 108.292 4.68286 107.153 4.68286C105.017 4.68286 103.406 6.31709 103.406 8.48426C103.406 10.6514 105.017 12.285 107.153 12.285C108.296 12.285 109.303 11.79 109.95 10.9185V11.1046C109.95 12.6101 108.993 13.5826 107.513 13.5826C106.513 13.5826 105.68 13.1494 105.284 12.424L105.264 12.3867H103.838L103.871 12.48C104.112 13.1892 104.583 13.8001 105.211 14.2179C105.841 14.6324 106.637 14.8512 107.513 14.8512C108.637 14.8512 109.594 14.4972 110.28 13.8285C110.967 13.1597 111.332 12.2194 111.332 11.1213V4.85407H109.95ZM109.175 10.3502C108.588 10.905 107.752 11.138 106.879 10.9887C106.361 10.8984 105.886 10.6475 105.523 10.2725C105.16 9.89751 104.927 9.41787 104.859 8.90328C104.736 8.03757 104.999 7.21756 105.581 6.655C106.069 6.19093 106.723 5.93643 107.401 5.94699C107.565 5.94713 107.729 5.96026 107.891 5.98625C108.946 6.15489 109.781 7.01609 109.921 8.0852C110.039 8.96507 109.766 9.78958 109.175 10.3502Z",fill:"black",fillOpacity:"0.7"}),a("path",{d:"M101.89 2.12378C101.63 2.06766 101.358 2.11486 101.133 2.25518C100.908 2.39551 100.747 2.61769 100.687 2.87371C100.626 3.12973 100.67 3.39902 100.809 3.62339C100.947 3.84775 101.17 4.00917 101.428 4.07275C101.503 4.08936 101.58 4.09778 101.657 4.09786C101.906 4.09824 102.146 4.0083 102.331 3.84518C102.517 3.68206 102.636 3.45714 102.664 3.21327C102.693 2.9694 102.63 2.72361 102.487 2.5227C102.344 2.32179 102.132 2.17981 101.89 2.12378Z",fill:"black",fillOpacity:"0.7"}),a("path",{d:"M100.967 10.934H99.7755C98.9285 10.934 98.4196 10.3644 98.4196 9.40982C98.4196 8.4791 98.8757 7.36945 99.8054 6.01778L99.8178 5.99976V5.61807L95.8571 5.06453C95.8585 4.90331 95.8162 4.74466 95.7346 4.60501C95.653 4.46536 95.5352 4.34979 95.3932 4.27027C95.0381 4.07718 94.6498 4.07717 94.3279 4.26383C94.1667 4.35799 94.035 4.4945 93.9476 4.65816C93.8602 4.82182 93.8205 5.00623 93.8328 5.19087C93.8452 5.37552 93.9092 5.55315 94.0176 5.70402C94.1261 5.85489 94.2748 5.97309 94.4472 6.04546L93.2151 12.258H94.5833L95.7196 6.35891L97.8593 6.7155C97.284 7.73439 96.9921 8.68442 96.9921 9.53919C96.9921 11.1168 97.9577 12.1498 99.5187 12.2496V12.258H102.346V4.87723H100.967V10.934Z",fill:"black",fillOpacity:"0.7"})]}),Dr=({forceBrandedLogo:e,marketingUrlLink:t})=>a("div",{className:e?"yellow-footer-logo":"",style:{marginTop:"4px",marginBottom:"4px"},children:a("a",{href:t,rel:"noreferrer",target:"_blank",children:a("div",{style:{display:"flex"},children:[a(Lr,{logoOnly:!1}),e&&a(Dt,{style:{display:"block",margin:"auto 0 auto 4px",transform:"rotateY(0deg) rotate(-45deg)"}})]})})}),Rr=({marketingUrlLink:e})=>a("a",{dir:"ltr",href:e,rel:"noreferrer",target:"_blank",children:a("div",{className:"thank-you-card-link",children:[a("div",{className:"sprig-box-logo",children:a(Lr,{logoOnly:!0,style:{margin:"auto"}})}),a("div",{children:a("p",{children:["Capture insights about your own product",a(Dt,{style:{display:"inline-flex",marginInlineStart:"4px",verticalAlign:"middle"}})]})})]})}),xe=e=>(e==null?void 0:e.buttonText)||"Next",Rt=e=>(e==null?void 0:e.skipButtonText)||"Skip",Nr=({marketingUrl:e,slugName:t,surveyId:n,forceBrandedLogo:r})=>`${e}?utm_source=survey_branding&utm_medium=website&utm_campaign=${t}&utm_content=${n}${r?"&utm_term=poweredby_pill":""}`,$o=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{useMobileStyling:s,border:d,isLongFormSurvey:l,focusedQuestionId:u}=F(f=>({useMobileStyling:f.useMobileStyling,border:f.border,isLongFormSurvey:H.isLongFormSurvey(f.studyType),focusedQuestionId:f.focusedQuestionId})),[h,c]=$(!1),[m,v]=$(""),[g,b]=$(!1),_=l&&u===o,k=r==null?void 0:r.collectName,y=(r==null?void 0:r.nameLabelText)||"Full Name",j=(r==null?void 0:r.consentText)||"I agree to the stated conditions",I=(r==null?void 0:r.submitButtonText)||"Submit",C=!!m.trim(),E=h&&(!k||C),x=(f,w=!1)=>{f.preventDefault(),f.stopPropagation();let S=null;if(!w){if(!E)return void b(!0);S={submitted:!0},k&&(S.name=m)}n({value:S,questionId:o,type:i},E)},P=f=>{f.preventDefault(),f.stopPropagation(),v(f.currentTarget.value)},D=f=>{f.currentTarget.style.borderColor=g&&!C?Y.ERROR_BORDER_COLOR:d},T=f=>{f.currentTarget.style.borderColor=g&&!C?Y.ERROR_BORDER_COLOR:Y.DEFAULT_BORDER_COLOR},p=()=>a(_e,{children:[a("div",{className:"sprig-stretch",children:[a(Ke,{allowTextEntry:!1,border:d,error:g&&!h,id:"consent",isRadio:!1,isSelected:h,label:j,onUserInputChanged:({selected:f})=>{f!==h&&c(!h)},useMobileStyling:s}),k&&a("input",{"aria-label":y,"aria-placeholder":y,className:B(te("ul-consent-legal__name-input",s)),"data-gramm":"false",maxLength:250,name:"name",onBlur:T,onFocus:D,onInput:P,placeholder:y,style:g&&!C?{borderColor:Y.ERROR_BORDER_COLOR}:{},tabIndex:0,value:m})]}),a("div",{className:"ul-card__button-wrapper ul-card-vertical__button-wrapper",children:[a(re,{className:E?"":"sprig-button-disabled",onClick:x,children:I}),r.required===!1&&!l&&a("button",{className:"ul-card-skip__button",onClick:f=>x(f,!0),children:Rt(r)})]})]});return a("div",{className:B(e,l&&!_&&"ul-card--unfocused","ul-card__consent-legal","fade-in-transition"),children:[a(se,{message:t,properties:{questionHtml:r.questionHtml}}),a(X,{children:[r!=null&&r.richTextBody?a(me,{children:a("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:r!=null&&r.richTextBody?{__html:r.richTextBody}:void 0,id:"ul-card__consent-legal-body-container"})}):null,a(pe,{properties:r,defaultBody:p,embeddedType:"pdf"})]})]},o)},Wo=({icon:e,scaleLabelType:t,value:n,selectedValue:r})=>{if(t==="smiley"&&n===r){let o=0;return e.replace(/black/g,()=>++o==1?"black":"white")}return e},Qo=({activeValue:e,border:t,icon:n,isPressed:r,onSubmit:o,range:i,scaleLabelType:s,selectedValue:d,setSelectedValue:l,setActiveValue:u,setIsPressed:h,useMobileStyling:c,value:m,viewDocument:v})=>{const{isLongFormSurvey:g}=F(x=>({isLongFormSurvey:H.isLongFormSurvey(x.studyType)})),b=`option-${m}`,_=s==="number",k=s==="star",y=s==="smiley",j=_&&m===e||m===d,[I,C]=(()=>{const x=k&&d!==null&&m<=d;return k&&m<=e||y&&m===e||x||m===e||m===d?[t,r||x||m===d?1:.3]:["",1]})(),E=de(()=>{const x={borderColor:j?I:"",fillOpacity:j?"":C,zIndex:j?3:"auto",color:d===m?"#fff":""};return _?{...x,backgroundColor:d===m?I:""}:{...x,color:k||y||d===m?I:""}},[j,I,C,d,m,_,k,y]);return a("button",{"aria-label":_?void 0:String(m),className:(()=>{switch(s){case"star":return B(te("likert-star",c),te(`likert-star-${m}`,c));case"smiley":return B(te("likert-smiley",c),te(`likert-smiley-${m}`,c));default:return m===i?B(te("likert-number",c),te(`likert-number-${m}`,c),te("likert-last-option",c)):B(te("likert-number",c),te(`likert-number-${m}`,c))}})(),dangerouslySetInnerHTML:{__html:Wo({icon:n,scaleLabelType:s,value:m,selectedValue:d})},id:b,onClick:x=>{g&&(x.preventDefault(),x.stopPropagation(),l(m)),o()},onKeyDown:x=>{var T,p;const P=v.querySelectorAll(`.likert-${s??"number"}`),D=m-1;x.key==="ArrowRight"?(T=P[D+1])==null||T.focus():x.key==="ArrowLeft"?(p=P[D-1])==null||p.focus():x.key!=="Enter"&&x.key!==" "||(g&&(x.preventDefault(),x.stopPropagation(),l(m)),o())},onPointerDown:()=>h(!0),onPointerEnter:()=>u(m),onPointerLeave:()=>{u(-1),h(!1)},style:E,tabIndex:0})},Zo=({className:e,labels:t,message:n,next:r,properties:o,questionId:i,type:s})=>{const{border:d,useMobileStyling:l,viewDocument:u,isLongFormSurvey:h,focusedQuestionId:c}=F(w=>({border:w.border,useMobileStyling:w.useMobileStyling,viewDocument:w.viewDocument,isLongFormSurvey:H.isLongFormSurvey(w.studyType),focusedQuestionId:w.focusedQuestionId})),[m,v]=$(-1),[g,b]=$(!1),[_,k]=$(null),y=h&&c===i,j=t&&t.left,I=t&&t.right;let C;const{range:E,scaleLabelType:x,ratingIcons:P}=o;E&&(C=Number(E));const D=C||5,T=w=>{var S,R;switch(x){case"star":return(S=P[0])==null?void 0:S.svg;case"smiley":return(R=P[w])==null?void 0:R.svg;default:return String(w+1)}},p=[...Array(D)].map((w,S)=>{const R=S+1;return a(Qo,{activeValue:m,border:d,icon:T(S),isPressed:g,onSubmit:()=>r({value:R,questionId:i,type:s},!0),range:D,scaleLabelType:x,selectedValue:_,setActiveValue:v,setIsPressed:b,setSelectedValue:k,useMobileStyling:l,value:R,viewDocument:u},S)}),f=w=>{w.preventDefault(),w.stopPropagation(),r({value:null,questionId:i,type:s},!0)};return a("form",{className:B(e,"ul-card--likert","fade-in-transition",h&&!y&&"ul-card--unfocused"),children:[a(se,{message:n,properties:o}),a(pe,{properties:o,defaultBody:()=>a(X,{children:[a(me,{children:[a("div",{"aria-label":`Rating (1 - ${D})`,className:"ul-card--likert__numbers",role:"radiogroup",children:p}),a("div",{className:"ul-card--likert__labels",children:[a("span",{children:j}),a("span",{children:I})]})]}),!o.required&&!h&&a(_e,{children:a("div",{className:"ul-vertical-centered-container",children:a(re,{onClick:f,children:xe(o)})})})]})})]},i)},Pr=e=>e&&(e.scrollHeight>e.offsetHeight?e:Pr(e.parentElement)),Go=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))},Ko=({columns:e,onSelect:t,options:n,selectedOptions:r})=>{const o=ne([]),{border:i,useMobileStyling:s}=F(m=>({border:m.border,useMobileStyling:m.useMobileStyling})),d=n.findIndex(m=>r[m.id]===null),[l,u]=$(d),h=Se((m,v)=>{t(m,v);const g=l+1,b=n[g];if(b&&r[b.id]===null){u(g);const _=o.current[l];if(_!=null&&_.firstElementChild){const k=Pr(_),y=_.firstElementChild,j=Go(_)+y.clientHeight;k==null||k.scrollTo(0,_.offsetTop+j)}}},[t,n,r,l]),c=Se((m,v)=>{const g=l===m;return a(Ho,{animate:!0,header:v.label,isOpen:g,onClick:()=>u(g&&!window.UserLeap.isMobileSDK?-1:m),ref:b=>{b&&(o.current[m]=b)},showHeaderCheck:r[v.id]!==null,children:a("div",{style:{paddingTop:"12px"},children:e.map(b=>a(Ke,{allowTextEntry:!1,ariaLabel:`${v.label}-${b.label}`,border:i,error:!1,id:`${v.id}-${b.value}`,isRadio:!0,isSelected:r[v.id]===b.value,label:b.label,onUserInputChanged:()=>h(v.id,b.value),useMobileStyling:s},b.label))})},v.id)},[i,e,l,h,r,s]);return a("div",{children:n.map((m,v)=>c(v,m))})},Yo=({columns:e,onSelect:t,options:n,selectedOptions:r})=>{const{border:o,useMobileStyling:i,isLongFormSurvey:s}=F(g=>({border:g.border,useMobileStyling:g.useMobileStyling,isLongFormSurvey:H.isLongFormSurvey(g.studyType)})),d=n.length,l=e.length,u=ne(null),[h,c]=$(!1),[m,v]=$(!1);return Z(()=>{const g=u.current,b=new ResizeObserver(_=>{window.requestAnimationFrame(()=>{g&&(c(Math.round(_[0].contentRect.width)<g.scrollWidth),v(Math.round(_[0].contentRect.width)<g.scrollWidth))})});return g&&b.observe(g),()=>{g&&b.unobserve(g)}},[]),a("div",{className:"ul-card--matrix_question_container",children:[a("div",{className:B("ul-card--matrix_container",h&&"ul-matrix-scroll-gradient"),onScroll:()=>{(()=>{const g=u.current;g&&c(g.clientWidth+Math.abs(g.scrollLeft)<g.scrollWidth)})()},ref:u,children:a("div",{className:B(s&&"ul-card--matrix_grid_longform","ul-card--matrix_grid"),style:`--numColumns: ${l}; --numRows: ${d+1};`,children:[a("div",{})," ",e.map(g=>a("div",{className:"ul-matrix-column-label",children:g.label},g.label)),n.map(g=>a(X,{children:[a("div",{"aria-label":g.label,className:"ul-matrix-row-label",children:g.label},g.label),a("div",{className:"ul-matrix-row-options",role:"radiogroup",children:e.map((b,_)=>a("div",{className:B("ul-matrix-option-wrapper",_===l-1&&"ul-matrix-last-option"),children:a(Ke,{allowTextEntry:!1,ariaLabel:`${g.label}-${b.label}`,border:o,choiceStyle:{background:"transparent",border:"none",marginBottom:"0",padding:"0"},error:!1,id:`${g.id}-${b.value}`,isRadio:!0,isSelected:r[g.id]===b.value,onUserInputChanged:()=>t(g.id,b.value),useMobileStyling:i})},b.value))})]}))]})}),(h||m)&&a("button",{className:m&&!h?"ul-matrix-scroll-arrow left":"ul-matrix-scroll-arrow",onClick:m&&!h?g=>{g.preventDefault();const b=u.current;if(b){const _=getComputedStyle(b).direction==="rtl";b.scrollTo({left:_?b.scrollWidth-b.clientWidth:0,behavior:"smooth"})}}:g=>{g.preventDefault();const b=u.current;if(b){const _=getComputedStyle(b).direction==="rtl";b.scrollTo({left:_?b.clientWidth-b.scrollWidth:b.scrollWidth,behavior:"smooth"})}},children:a(m&&!h?Jo:Xo,{})})]})},Jo=()=>a("svg",{fill:"currentColor",height:"32",transform:"matrix(-1,0,0,1,0,0)",version:"1.1",viewBox:"0 0 256 256",width:"32",xmlns:"http://www.w3.org/2000/svg",children:a("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"})}),Xo=()=>a("svg",{fill:"currentColor",height:"32",viewBox:"0 0 256 256",width:"32",xmlns:"http://www.w3.org/2000/svg",children:a("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"})}),ei=({className:e,message:t,next:n,options:r,properties:o,questionId:i,type:s,showIndividualSubmit:d=!1,onSubmitButtonClick:l})=>{const{useMobileStyling:u,isLongFormSurvey:h,focusedQuestionId:c,setFocusedQuestionId:m}=F(x=>({useMobileStyling:x.useMobileStyling,isLongFormSurvey:H.isLongFormSurvey(x.studyType),focusedQuestionId:x.focusedQuestionId,setFocusedQuestionId:x.setFocusedQuestionId})),v=o.matrixColumn,g=o.required,b=h&&c===i,_=x=>{x.preventDefault(),x.stopPropagation(),n({value:y,questionId:i,type:s},!0),l&&l()},k=r.reduce((x,P)=>(x[P.id]=null,x),{}),[y,j]=$(k),I=x=>g&&Object.values(x).every(P=>P==null),C=(x,P)=>{h&&n({value:{...y,[x]:P},questionId:i,type:s},!I({...y,[x]:P})),j(D=>({...D,[x]:P}))},E=o.displayMatrixAsAccordion||u;return a("form",{className:B(e,!h&&"ul-card__matrix","fade-in-transition",h&&!b&&"ul-card--unfocused"),id:"text-form",onClick:()=>{b&&m(i)},onSubmit:_,children:[a(se,{message:t,properties:o}),a(pe,{properties:o,defaultBody:()=>a(X,{children:[a(me,{children:[a(E?Ko:Yo,{columns:v,onSelect:C,options:r,selectedOptions:y}),d&&a(Ge,{handleSubmit:_,isSubmitDisabled:I(y)})]}),!h&&a(_e,{children:a("div",{className:"ul-card__button-wrapper",children:a(re,{disabled:I(y),children:xe(o)})})})]})})]},i)},ti=({options:e,selectItem:t,selectedOptions:n,showCheckbox:r})=>{const{themeColor:o}=F(i=>({doc:i.viewDocument,themeColor:i.border}));return a("div",{className:"select-list",children:e.map(i=>{return a("div",{className:"select-option",onClick:d=>{t(i),d.stopPropagation()},role:"option",children:[r&&a(Ir,{divId:(s=i.id,`checkbox-div-${s}`),id:i.id,isSelected:n.includes(i),themeColor:o}),i.label]},i.id);var s})})},ni=({isMultiSelect:e=!1,multiselectText:t="choices selected",onChange:n,options:r,placeholderText:o,value:i})=>{const[s,d]=$(!1),{viewDocument:l,update:u}=F(m=>({viewDocument:m.viewDocument,update:m.update})),h=()=>{d(!s),u()};Z(()=>{var v;const m=()=>{d(!1),u()};l.addEventListener("click",m);try{(v=window.parent)==null||v.addEventListener("click",m)}catch{window.addEventListener("click",m)}return()=>{var g;l.removeEventListener("click",m);try{(g=window.parent)==null||g.removeEventListener("click",m)}catch{window.removeEventListener("click",m)}}},[l,u]);const c=i.length===0?["select-button-placeholder"]:[];return a(X,{children:[a("button",{"aria-label":"choice dropdown button",className:B("select-button",...c),onClick:m=>{m.stopPropagation(),h()},type:"button",children:[a("span",{children:i.length===0?o:i.length===1?i[0].label:`${i.length} ${t}`}),a(Cr,{})]}),s&&a(ti,{options:r,selectedOptions:i,selectItem:m=>{var b;const v=i.some(_=>_.id===m.id),g=i.some(_=>{var k;return(k=_.optionProperties)==null?void 0:k.noneOfTheAbove});(b=m.optionProperties)!=null&&b.noneOfTheAbove&&!v?n([m]):e?n(v?i.filter(_=>_.id!==m.id):g?[m]:[...i,m]):v||n([m]),e||h()},showCheckbox:e})]})},Mr=({className:e,message:t,onSubmit:n,options:r=[],properties:o,questionId:i,type:s,showIndividualSubmit:d=!1,onSubmitButtonClick:l})=>{const{border:u,useMobileStyling:h,isLongFormSurvey:c,focusedQuestionId:m,setFocusedQuestionId:v}=F(p=>({border:p.border,useMobileStyling:p.useMobileStyling,isLongFormSurvey:H.isLongFormSurvey(p.studyType),focusedQuestionId:p.focusedQuestionId,setFocusedQuestionId:p.setFocusedQuestionId})),g=c&&m===i,b=r.reduce((p,f)=>(p[f.id]={isSelected:!1},p),{}),[_,k]=$(b),y=s==="multiplechoice",j=o.required,I=r.find(p=>{var f;return(f=p.optionProperties)==null?void 0:f.noneOfTheAbove}),C=p=>(f=>Object.entries(f).some(([w,S])=>{var N;const R=r.find(O=>`${O.id}`===w),L=S.userText===void 0||S.userText.trim()==="";return((N=R==null?void 0:R.optionProperties)==null?void 0:N.allowsTextEntry)&&L&&S.isSelected}))(p)||j&&!(f=>Object.values(f).some(w=>w.isSelected))(p),E=Object.entries(_).some(([p,f])=>{var w,S;return f.isSelected&&((S=(w=r.find(R=>`${R.id}`===p))==null?void 0:w.optionProperties)==null?void 0:S.allowsTextEntry)}),x=d&&(!y||E),P=r.map(({id:p,label:f,value:w,optionProperties:S})=>{var O,V;const R=`${p}`,{allowsTextEntry:L,noneOfTheAbove:N}={allowsTextEntry:!1,noneOfTheAbove:!1,...S};return a(Ke,{allowTextEntry:L,border:u,error:!1,id:R,isRadio:y,isSelected:!!((O=_[R])!=null&&O.isSelected),label:f,noneOfTheAbove:N,onUserInputChanged:q=>{T(q.id,q.selected,q.userText,q.noneOfTheAbove),q.selected&&c&&!y&&!g&&v(i)},promptText:"Please specify",text:(V=_[p])==null?void 0:V.userText,useMobileStyling:h,value:w},R)}),D=p=>{p.preventDefault(),p.stopPropagation(),n(_,!0),l&&l()},T=(p,f,w,S)=>{const R=Object.assign({},_);if((y||S)&&f)for(const O of Object.values(R))O.isSelected=!1,delete O.userText;else I&&!S&&_[I.id].isSelected&&(R[I.id].isSelected=!1);R[p]={isSelected:f,userText:w};const L=y&&Object.entries(R).some(([O,V])=>{var q,z;return V.isSelected&&((z=(q=r.find(W=>`${W.id}`===O))==null?void 0:q.optionProperties)==null?void 0:z.allowsTextEntry)}),N=!C(R);c&&(n(R,N),y&&!L&&N&&l&&l()),k(R)};return a("form",{className:B(e,"ul-card--multiple","fade-in-transition",c&&!g&&"ul-card--unfocused"),id:"text-form",onClick:s==="multipleselect"?()=>{c&&m!==i&&s==="multipleselect"&&v(i)}:void 0,onSubmit:D,children:[a(se,{message:t,properties:o}),a(pe,{properties:o,defaultBody:()=>a(X,{children:[a(me,{children:[o.isDropdown?a(ni,{isMultiSelect:!y,multiselectText:o.dropdownMultiselectedText??"choices selected",onChange:p=>{const f={..._};for(const w of r)p.includes(w)?f[w.id].isSelected=!0:f[w.id].isSelected=!1;c&&n(f,!C(f)),k(f)},options:r,placeholderText:o.dropdownPlaceholderText??(y?"Select choice":"Select choice(s)"),value:r.filter(p=>_[p.id].isSelected)}):a("div",{className:B(te("ul-card__choices",h)),role:y?"radiogroup":"group",children:P}),x&&a(Ge,{handleSubmit:D,isSubmitDisabled:C(_)})]}),!c&&a(_e,{children:a("div",{className:"ul-card__button-wrapper",children:a(re,{disabled:C(_),onClick:D,children:xe(o)})})})]})})]},i)},ri=e=>{const{questionId:t,type:n,next:r,options:o}=e,{setFocusedQuestionId:i}=F(s=>({setFocusedQuestionId:s.setFocusedQuestionId}));return a(Mr,{...e,onSubmit:(s,d)=>{var v;const l=Object.entries(s).find(([,g])=>g.isSelected)||[void 0,void 0],[u,h]=l,c=o.find(g=>`${g.id}`===u);!((v=c==null?void 0:c.optionProperties)!=null&&v.allowsTextEntry)||h!=null&&h.userText&&h.userText.trim()!==""||i(t);const m=h!=null&&h.userText?{[u]:{userText:h.userText}}:null;r({value:c&&u?{[u]:c.value}:{},secondaryValue:m,questionId:t,type:n},d)}})},oi=e=>{const{questionId:t,type:n,next:r}=e;return a(Mr,{...e,onSubmit:(o,i)=>{const s=Object.entries(o).reduce((l,[u,h])=>(l[u]=h.isSelected,l),{}),d=Object.entries(o).reduce((l,[u,h])=>{if(!h.userText)return l;const c=l||{};return c[u]={userText:h.userText},c},null);r({value:s,secondaryValue:d,questionId:t,type:n},i)}})},ii=({className:e,labels:t,message:n,properties:r,next:o,questionId:i,type:s})=>{const[d,l]=$(null),{border:u,useMobileStyling:h,viewDocument:c,isLongFormSurvey:m,focusedQuestionId:v}=F(j=>({border:j.border,useMobileStyling:j.useMobileStyling,viewDocument:j.viewDocument,isLongFormSurvey:H.isLongFormSurvey(j.studyType),focusedQuestionId:j.focusedQuestionId})),g=m&&v===i,b=t&&t.left,_=t&&t.right,k=[...Array(11)].map((j,I)=>a("button",{className:B(te("nps-number",h),te(`nps-number-${I}`,h)),id:`option-${I}`,onClick:C=>{m&&(C.preventDefault(),C.stopPropagation(),l(I)),o({value:I,questionId:i,type:s},!0)},onKeyDown:C=>{var x,P;const E=c.querySelectorAll("button.nps-number");C.key==="ArrowRight"?(x=E[I+1])==null||x.focus():C.key==="ArrowLeft"?(P=E[I-1])==null||P.focus():C.key!=="Enter"&&C.key!==" "||(m&&(C.preventDefault(),C.stopPropagation(),l(I)),o({value:I,questionId:i,type:s},!0))},onPointerDown:C=>{C.currentTarget.style.zIndex="2",C.currentTarget.style.borderColor=u},onPointerLeave:C=>{C.currentTarget.style.zIndex="auto",C.currentTarget.style.borderColor=Y.DEFAULT_BORDER_COLOR},style:d===I?{backgroundColor:u,color:"#fff"}:void 0,tabIndex:0,children:I},I)),y=j=>{j.preventDefault(),j.stopPropagation(),o({value:null,questionId:i,type:s},!0)};return a("form",{className:B(e,"ul-card--nps","fade-in-transition",m&&!g&&"ul-card--unfocused"),children:[a(se,{message:n,properties:r}),a(pe,{properties:r,defaultBody:()=>a(X,{children:[a(me,{children:[a("div",{className:"ul-card--nps__numbers",children:k}),a("div",{className:"ul-card--nps__labels",children:[a("span",{children:b}),a("span",{children:_})]})]}),!r.required&&!m&&a(_e,{children:a("div",{className:"ul-vertical-centered-container",children:a(re,{onClick:y,children:xe(r)})})})]})})]},i)},si=({className:e,message:t,next:n,properties:r,questionId:o,type:i,showIndividualSubmit:s=!1,onSubmitButtonClick:d})=>{const{border:l,useMobileStyling:u,update:h,isLongFormSurvey:c,focusedQuestionId:m,setFocusedQuestionId:v,isPreview:g}=F(p=>({border:p.border,useMobileStyling:p.useMobileStyling,update:p.update,isLongFormSurvey:H.isLongFormSurvey(p.studyType),focusedQuestionId:p.focusedQuestionId,setFocusedQuestionId:p.setFocusedQuestionId,isPreview:p.isPreview})),[b,_]=$(""),k=ne(null),y=c&&m===o;Z(()=>{var p,f;c&&!g&&(y?(p=k.current)==null||p.focus():(f=k.current)==null||f.blur())},[c,y,g]);const j=b.trim(),I=r.required===!0&&!j,C=jr(k,()=>h()),E=p=>{const{value:f}=p.currentTarget;if(C(),p.preventDefault(),p.stopPropagation(),_(f),c){const w=f.trim().length>0;n({value:f,questionId:o,type:i},w)}},x=p=>{p.preventDefault(),p.stopPropagation(),n({value:b,questionId:o,type:i},j.length>0),d&&d()},P=r&&r.openTextPlaceholder?r.openTextPlaceholder:"",D=p=>{p.currentTarget.style.borderColor=l,v(o)},T=p=>{p.currentTarget.style.borderColor=Y.DEFAULT_BORDER_COLOR};return a("form",{className:B(e,"ul-card-text","fade-in-transition",c&&!y&&"ul-card--unfocused"),id:"text-form",onClick:()=>{c&&m!==o&&v(o)},children:[a(se,{message:t,properties:r}),a(pe,{defaultBody:()=>a("div",{className:"ul-card-text",children:a(me,{children:[a("div",{className:"ul-card-text__container",children:a("textarea",{"aria-describedby":"ul-caption","aria-labelledby":"ul-question","aria-multiline":"true","aria-placeholder":P,className:B(te("ul-card-text__input",u)),"data-gramm":"false",maxLength:5e3,name:"text",onBlur:T,onChange:E,onFocus:D,placeholder:P,ref:k,role:"textbox",tabIndex:0})}),r.footerHtml&&a("div",{className:"footer",dangerouslySetInnerHTML:{__html:r.footerHtml}}),s&&a(Ge,{handleSubmit:x,isSubmitDisabled:I}),a(_e,{children:!c&&a(re,{disabled:I,onClick:x,children:xe(r)})})]})}),properties:r})]},o)},ai=({className:e,labels:t,message:n,next:r,properties:o,questionId:i,type:s,onSubmitButtonClick:d,options:l,showIndividualSubmit:u=!1})=>{const h=ne(null),[c,m]=$(()=>(o==null?void 0:o.required)===!0),[v,g]=$(()=>l.map(S=>({...S,rank:null}))),b=de(()=>Array.from({length:l.length},(S,R)=>R+1),[l.length]),{isLongFormSurvey:_,focusedQuestionId:k,setFocusedQuestionId:y}=F(S=>({useMobileStyling:S.useMobileStyling,border:S.border,isLongFormSurvey:H.isLongFormSurvey(S.studyType),focusedQuestionId:S.focusedQuestionId,setFocusedQuestionId:S.setFocusedQuestionId})),j=_&&k===i,I=S=>{S.preventDefault(),E(v),d&&d()},C=S=>{S.preventDefault(),S.dataTransfer&&(S.dataTransfer.dropEffect="move")},E=S=>{const R={};S.reduce((L,N)=>(L[N.id]=N.rank,L),R),r({value:R,questionId:i,type:s},!0)},x=S=>{m(!1),_&&E(S)},{left:P,right:D}=t,T=l.length,p=S=>{S.preventDefault(),S.currentTarget.classList.add("is-drop-target")},f=S=>{S.currentTarget.classList.remove("is-drop-target")},w=S=>{h.current=null,S.currentTarget.classList.remove("is-dragging")};return a("form",{className:B(e,"ul-card-rank","fade-in-transition",_&&!j&&"ul-card--unfocused"),onClick:()=>{_&&k!==i&&y(i)},onSubmit:I,children:[a(se,{message:n,properties:o}),a(pe,{properties:o,defaultBody:()=>a(X,{children:[a(me,{children:[a("div",{className:"ul-card--rank__question-inner-container",children:[a("div",{className:"ul-card-rank__labels",children:a("span",{children:["1 - ",P]})}),a("ol",{className:"ul-card-rank__list",onDragOver:C,children:v.map(({id:S,label:R,rank:L},N)=>{return a("li",{className:"ul-card-rank__option",draggable:!0,onDragEnd:w,onDragEnter:p,onDragLeave:f,onDragStart:(V=N,q=>{h.current=V,q.dataTransfer&&(q.dataTransfer.effectAllowed="move",q.dataTransfer.setData("text/plain",String(V)),q.currentTarget.classList.add("is-dragging"))}),onDrop:(O=N,q=>{var W,ee;q.preventDefault(),q.currentTarget.classList.remove("is-drop-target");const z=h.current;h.current=null,(ee=(W=q.currentTarget.closest(".ul-card-rank__list"))==null?void 0:W.querySelector(".is-dragging"))==null||ee.classList.remove("is-dragging"),z!=null&&z!==O&&g(G=>{const J=G.map(be=>({...be})),[De]=J.splice(z,1);return J.splice(O,0,De),J.forEach((be,K)=>{be.rank=K+1}),x(J),J})}),children:[a("select",{"aria-label":`Rank for ${R}`,className:B("ul-card-rank__select",L==null&&"ul-card-rank__select--placeholder"),name:`rank[${S}]`,onChange:q=>((z,W)=>{g(ee=>{const G=parseInt(W),J=ee.map(K=>({...K}));J.some(K=>K.rank==null)&&J.forEach((K,Xe)=>K.rank=Xe+1);const De=J.findIndex(K=>K.id===z);if(De===-1)return ee;const be=J[De].rank;return G<be?J.forEach(K=>{K.id!==z&&K.rank>=G&&K.rank<be&&(K.rank=K.rank+1)}):G>be&&J.forEach(K=>{K.id!==z&&K.rank>be&&K.rank<=G&&(K.rank=K.rank-1)}),J[De].rank=G,J.sort((K,Xe)=>K.rank-Xe.rank),x(J),J})})(S,q.currentTarget.value),value:L??"",children:[L==null&&a("option",{className:"ul-card-rank__select-option",disabled:!0,value:"",children:"-"}),b.map(q=>a("option",{className:"ul-card-rank__select-option",value:q,children:q},q))]}),a("span",{children:R}),a("button",{"aria-label":`Drag ${R} to reorder`,className:"ul-card-rank__drag-btn",title:"Drag to reorder",type:"button",children:a("svg",{fill:"none",height:"17",viewBox:"0 0 16 17",width:"16",xmlns:"http://www.w3.org/2000/svg",children:a("path",{d:"M5.75 11.625C6.37132 11.625 6.875 12.1287 6.875 12.75C6.875 13.3713 6.37132 13.875 5.75 13.875C5.12868 13.875 4.625 13.3713 4.625 12.75C4.625 12.1287 5.12868 11.625 5.75 11.625ZM10.25 11.625C10.8713 11.625 11.375 12.1287 11.375 12.75C11.375 13.3713 10.8713 13.875 10.25 13.875C9.62868 13.875 9.125 13.3713 9.125 12.75C9.125 12.1287 9.62868 11.625 10.25 11.625ZM5.75 7.375C6.37132 7.375 6.875 7.87868 6.875 8.5C6.875 9.12132 6.37132 9.625 5.75 9.625C5.12868 9.625 4.625 9.12132 4.625 8.5C4.625 7.87868 5.12868 7.375 5.75 7.375ZM10.25 7.375C10.8713 7.375 11.375 7.87868 11.375 8.5C11.375 9.12132 10.8713 9.625 10.25 9.625C9.62868 9.625 9.125 9.12132 9.125 8.5C9.125 7.87868 9.62868 7.375 10.25 7.375ZM5.75 3.125C6.37132 3.125 6.875 3.62868 6.875 4.25C6.875 4.87132 6.37132 5.375 5.75 5.375C5.12868 5.375 4.625 4.87132 4.625 4.25C4.625 3.62868 5.12868 3.125 5.75 3.125ZM10.25 3.125C10.8713 3.125 11.375 3.62868 11.375 4.25C11.375 4.87132 10.8713 5.375 10.25 5.375C9.62868 5.375 9.125 4.87132 9.125 4.25C9.125 3.62868 9.62868 3.125 10.25 3.125Z",fill:"currentColor"})})})]},S);var O,V})}),a("div",{className:"ul-card-rank__labels",children:a("span",{children:[T," - ",D]})})]}),u&&a(Ge,{handleSubmit:I,isSubmitDisabled:c})]}),!_&&a(_e,{children:a("div",{className:"ul-card__button-wrapper",children:a(re,{disabled:c,children:xe(o)})})})]})})]},i)},li=new Set(["open","matrix","multipleselect","multiplechoice","rankorder"]),fn=({cardInstance:e,moveToNextQuestion:t,showIndividualSubmit:n,submitQuestion:r,updateCardValues:o})=>{const{isLongFormSurvey:i}=F(m=>({isLongFormSurvey:H.isLongFormSurvey(m.studyType)}));if(!e)return null;const{name:s,type:d,props:l}=e,u=n&&li.has(d),h={className:"ul-card",next:(m,v)=>r(m,v),questionId:s,type:d,showIndividualSubmit:n,...u?{next:(m,v)=>{o(m.questionId,m,v??!0)},onSubmitButtonClick:()=>t(s)}:{}},c=(()=>{switch(d){case"consentlegal":return a($o,{...h,...l});case"likert":return a(Zo,{...h,...l});case"matrix":return a(ei,{...h,...l});case"multiplechoice":return a(ri,{...h,...l});case"multipleselect":return a(oi,{...h,...l});case"nps":return a(ii,{...h,...l});case"open":return a(si,{...h,...l});case"rankorder":return a(ai,{...h,...l});case"recordedtask":return a(ki,{...h,...l});case"texturlprompt":return a(Ci,{...h,...l});case"thanks":return a(Si,{...h,...l});case"uploading":return a(Ni,{...h,...l});case"videovoice":return a(Ri,{...h,...l});default:return null}})();return c?i?a("div",{className:"ul-card-scroll-wrapper",children:c},s):c:null},di=({isSubmitDisabled:e=!1,onSubmit:t,buttonText:n})=>{var v;const{cards:r,forceBrandedLogo:o,index:i,marketingUrl:s,showSurveyBrand:d,slugName:l,surveyId:u,useMobileStyling:h}=F(g=>({cards:g.cards,forceBrandedLogo:g.forceBrandedLogo,index:g.index,marketingUrl:g.marketingUrl,showSurveyBrand:g.showSurveyBrand,slugName:g.slugName,surveyId:g.surveyId,useMobileStyling:g.useMobileStyling})),c=((v=r[i])==null?void 0:v.type)==="thanks",m=Nr({marketingUrl:s,slugName:l,surveyId:u,forceBrandedLogo:o});return a("footer",{className:B("long-form-question-footer-container",h&&"long-form-question-footer-container--mobile",c&&"long-form-question-footer-container-center"),children:[c&&o?a(Rr,{marketingUrlLink:m}):a("div",{className:"long-form-question-footer-container-logo",children:d?a(Dr,{forceBrandedLogo:o,marketingUrlLink:m}):null}),!c&&a("div",{className:B("ul-card__button-wrapper","ul-card-vertical__button-wrapper","long-form-question-footer-container-actions"),children:a(re,{className:B("long-form-button",e&&"sprig-button-disabled"),disabled:e,onClick:t,children:a("span",{className:"long-form-button-text-container",children:n??a(Dt,{stroke:"white"})})})})]})},ci=/<piped-value\b([^>]*)>.*?<\/piped-value>/gi,vn=["questionHtml","captionHtml","footerHtml"],Or=e=>!!e.props&&typeof e.props=="object"&&"properties"in e.props,st=e=>!!e.props&&typeof e.props=="object"&&"options"in e.props&&Array.isArray(e.props.options),_n=e=>["string","number"].includes(typeof e),bn=e=>e.length===0?"":e.length===1?e[0]:e.join(", "),ui=e=>{var n,r;const t=(o=>o!=null&&typeof o=="object"&&"value"in o)(e)?e.value:void 0;if(t!=null){if(e.type==="multipleselect"&&st(e)&&(o=>!!o&&typeof o=="object"&&!Array.isArray(o))(t)){const o=e.secondaryValue??null,i=e.props.options.filter(s=>t[String(s.id)]===!0).map(s=>{var d;return s.label+((d=o==null?void 0:o[String(s.id)])!=null&&d.userText?`: ${o[String(s.id)].userText}`:"")});return i.length?bn(i):"No options selected"}if(e.type==="multiplechoice"&&typeof t=="object"&&t!==null){const o=e.secondaryValue??null,i=Object.keys(t)[0];if(i){const s=e.props.options.find(d=>String(d.id)===i);return(s==null?void 0:s.label)+((n=o==null?void 0:o[i])!=null&&n.userText?`: ${(r=o==null?void 0:o[i])==null?void 0:r.userText}`:"")}}if(e.type==="matrix"&&st(e)&&(o=>{if(!Or(o))return!1;const i=o.props.properties;return!!i&&typeof i=="object"&&"matrixColumn"in i})(e)){const o=e.props.options,i=e.props.properties.matrixColumn,s=[];for(const[d,l]of Object.entries(t)){const u=o.find(g=>String(g.id)===d),h=(u==null?void 0:u.label)??d,c=_n(l)?String(l):JSON.stringify(l),m=i.find(g=>g.value===c),v=(m==null?void 0:m.label)??c;s.push(`${h}: ${v}`)}return s.join("; ")}if(e.type==="rankorder"&&st(e)){const o=e.props.options.reduce((s,d)=>(s[String(d.id)]=d.label,s),{}),i=[];for(const[s,d]of Object.entries(t)){const l=o[s];l&&(i[d-1]=l)}return bn(i)}if(_n(t)){const o=String(t).replaceAll(/[\u200B-\u200D\uFEFF]/g,"").trim();return o===""?void 0:o}try{return JSON.stringify(t)}catch{return String(t)}}},yn=(e,t)=>{const n=new RegExp(`${t}="([^"]*)"`,"i").exec(e);return(n==null?void 0:n[1])??null},pi=(e,t)=>{if(e==null)return e;let n=!1;const r=e.replace(ci,(o,i)=>{n=!0;const s=yn(i,"answer-id"),d=yn(i,"fallback-text")??"",l=s?Number(s):Number.NaN;if(Number.isFinite(l)&&Object.hasOwn(t,l)){const u=t[l];return String(u)}return d});return n?r:e},Ur=e=>{const t={};for(const n of e){const r=ui(n);r!==void 0&&(t[n.name]=r)}return t},mi=({cards:e,next:t,previousResponses:n})=>{var T;const[r,o]=$({}),[i,s]=$({}),d=de(()=>({...n,...Ur(e.map(p=>{var f,w;return{...p,value:((f=r[p.name])==null?void 0:f.value)??null,secondaryValue:((w=r[p.name])==null?void 0:w.secondaryValue)??null}}))}),[n,r,e]),l=(u=d,e.map(p=>{if(!Or(p)||p.props.properties===void 0||p.props.properties===null)return p;const f=p.props.properties;if(f===null||typeof f!="object"||!vn.some(R=>R in f))return p;let w=!1;const S={};for(const R of vn){const L=f[R];if(L!==void 0){const N=pi(L,u);S[R]=N,N!==L&&(w=!0)}}return w?{...p,props:{...p.props,properties:{...f,...S}}}:p}));var u;const{isLongFormSurvey:h,focusedQuestionId:c,setFocusedQuestionId:m}=F(p=>({isLongFormSurvey:H.isLongFormSurvey(p.studyType),focusedQuestionId:p.focusedQuestionId,setFocusedQuestionId:p.setFocusedQuestionId})),v=ne(null),g=ne(!1),b=ne(null),_=Se(p=>{var R,L;g.current=!0;const f=e.findIndex(N=>N.name===p);if(!h||p===null||f===-1)return void(g.current=!1);const w=(R=v.current)==null?void 0:R.querySelectorAll(".ul-card-scroll-wrapper")[f],S=(L=v.current)==null?void 0:L.closest(".ul-card__container");if(w&&S){if(w&&S){const N=w.getBoundingClientRect(),O=S.getBoundingClientRect(),V=N.top-O.top+S.scrollTop,q=V+N.height/2,z=window.innerHeight-157;let W;N.height>=z?W=V:W=q-S.clientHeight/2;const ee=S.clientHeight,G=S.scrollHeight-ee,J=Math.max(0,Math.min(W,G));S.scrollTo({top:J,behavior:"smooth"}),setTimeout(()=>{g.current=!1},500)}}else g.current=!1},[h,e]);function k(p,f){return p.map(w=>f[w.name])}Z(()=>{c!==null&&e.findIndex(p=>p.name===c)!==-1||m(e[0].name)},[e,c,m]);const y=p=>{if(!h)return;const f=e.findIndex(w=>w.name===p)+1;if(f<e.length){const w=e[f].name;m(w)}else m(p)};Z(()=>{h&&c!==null&&(b.current!==c?_(c):b.current=null)},[c,h,_]);const j=Se(()=>{var O,V;if(g.current)return;const p=(O=v.current)==null?void 0:O.closest(".ul-card__container");if(!p)return;const f=(V=v.current)==null?void 0:V.querySelectorAll(".ul-card-scroll-wrapper");if(!f||f.length===0)return;const w=p.getBoundingClientRect(),S=w.top+w.height/2;let R=0,L=1/0;f.forEach((q,z)=>{const W=q.getBoundingClientRect(),ee=W.top+W.height/2,G=Math.abs(S-ee);G<L&&(L=G,R=z)});const N=e[R];b.current=N.name,m(N.name)},[e,m]);Z(()=>{var f;if(!h)return;const p=((f=v.current)==null?void 0:f.closest(".ul-card__container"))||null;return p&&p.addEventListener("scroll",j,{passive:!0}),()=>{p&&p.removeEventListener("scroll",j)}},[j,h]);const I=de(()=>Object.values(i).every(p=>p),[i]),C=async(p,f,w)=>{return s(R=>({...R,[p]:w})),await(S=R=>({...R,[p]:f}),new Promise(R=>{o(L=>{const N=S(L);return R(N),N})}));var S};Z(()=>{if(!h)return;const p={};e.forEach(f=>{var S,R;const w=f;(R=(S=w.props)==null?void 0:S.properties)!=null&&R.required||(p[w.name]={value:null,questionId:w.name,type:w.type})}),o(p),s({})},[e,h]);const E=async(p,f)=>{if(h){const w=await C(p.questionId,p,f),S=x(p.type),R=P(p.type);if(S&&y(p.questionId),R&&f){const L=k(e,w);t(L)}}else t([p])},x=p=>new Set(["nps","likert","multiplechoice"]).has(p),P=p=>new Set(["videovoice","consentlegal","texturlprompt"]).has(p),D=((T=e[0])==null?void 0:T.type)==="thanks";return h?a("div",{className:"ul-card-list-container--longform",ref:v,children:[l.map((p,f)=>a(fn,{cardInstance:p,moveToNextQuestion:y,showIndividualSubmit:h&&e.length>1&&f<e.length-1,submitQuestion:E,updateCardValues:C},(p==null?void 0:p.name)||f)),!D&&a(di,{isSubmitDisabled:Object.keys(r).length<e.length||!I,onSubmit:function(){const p=k(e,r);t(p)}})]}):a(X,{children:l.map((p,f)=>a(fn,{cardInstance:p,moveToNextQuestion:y,showIndividualSubmit:h&&e.length>1&&f<e.length-1,submitQuestion:E,updateCardValues:C},(p==null?void 0:p.name)||f))})},vt=1,Hr=2,Br=3,We=e=>e.type==="av_permission",xn=e=>e.type==="screen_permission",qr=(e,t)=>e===void 0?vt:e?((n,r)=>!(We(r)?r.permissionDescriptors:[]).includes("camera")||n.getVideoTracks().length>0)(e,t)?Br:vt:Hr,kn={avStream:null,currentPage:null,mediaRecordingUids:null,nextQuestion:()=>{},passthroughData:void 0,recordingMediaTypes:void 0,screenPermissionRequested:!1,type:void 0},ue=xr(e=>({...kn,reset:()=>{e(kn)},updatePage:t=>{e(t)}}));function _t({currentPage:e,pages:t}){const{avStream:n,recordingMediaTypes:r,updatePage:o}=ue.getState(),{recorderEventEmitter:i}=F.getState();i.emit("av.permission",{"permission.descriptors":e.permissionDescriptors,"stream.ready":(s,d)=>{if(n===s)return;let l=e;if(s&&!e.permissionDescriptors.includes("camera")){const u=t.indexOf(e),h=d!=null&&d.active?u+2:u+1;d!=null&&d.active&&r&&i.emit("begin.recording",{"recording.media.types":r,"start.recording.callback":c=>o({mediaRecordingUids:c})}),l=t[h]}o({currentPage:l,avStream:s})}})}function bt({status:e}){const{nextQuestion:t,passthroughData:n,mediaRecordingUids:r,reset:o}=ue.getState(),{recorderEventEmitter:i,handleUploadUpdate:s,index:d}=F.getState(),l={value:{taskStatus:e},type:"recordedtask",questionId:(n==null?void 0:n.questionId)||1};n&&i.emit("finish.task",{"begin.callback":u=>{s({mediaRecordingUid:u,isSubmitted:!0,progressPct:0,isComplete:!1})},"progress.callback":(u,h)=>{s({mediaRecordingUid:u,progressPct:h.detail,isSubmitted:!1,isComplete:!1})},"upload.callback":u=>{u&&s({mediaRecordingUid:u,isComplete:!0,isSubmitted:!0,progressPct:100})},"passthrough.data":n,"current.index":d,"task.response":l,"task.complete.callback":u=>{l.value.taskDurationMillisecond=u,r&&(l.value.mediaRecordingUids=r),o(),t(l)}})}function Nt({pages:e,setIsRequestingPermission:t}){const{recorderEventEmitter:n,eventEmitFn:r}=F.getState(),{updatePage:o,currentPage:i,recordingMediaTypes:s,screenPermissionRequested:d}=ue.getState();if(!i)return;const l=e.indexOf(i);switch(i.type){case"av_permission":{const u=d?l+2:l+1;return d&&s&&n.emit("begin.recording",{"recording.media.types":s,"start.recording.callback":h=>{o({mediaRecordingUids:h})}}),void o({currentPage:e[u]})}case"screen_permission":return void n.emit("screen.permission",{"screen.permission.requested":t,"stream.ready.callback":(u,h)=>{const c=h?e[l+1]:i;h&&s&&n.emit("begin.recording",{"recording.media.types":s,"start.recording.callback":m=>{o({captureStream:h,mediaRecordingUids:m})}}),o({currentPage:c,screenPermissionRequested:!0,captureStream:h})}});case"start_task":return r("recorded.task.start"),n.emit("recorded.task.start"),n.emit("start.task"),void o({currentPage:e[l+1],screenPermissionRequested:!0});case"complete_task":return}}const Fr="ul-permission-graphics-container",Ar="ul-permission-body",Vr=B(Fr,"ul_recorded-task-inset-spacing"),Ye=B("ul-horizontal-button-container","ul-horizontal-button-container-left"),zr=({richTextBody:e})=>a("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:e},id:"ul-task-detail-container"}),Je=({required:e,skipButtonText:t,bottom:n=!1})=>e?null:a(re,{className:B(n&&"ul-skip-button-below","ul-button-inactive"),onClick:bt.bind(null,{status:"abandoned"}),children:t||"Skip"}),Pt=e=>{const{avStream:t,captureStream:n,recordingMediaTypes:r,updatePage:o}=ue.getState(),i=(r==null?void 0:r.includes("audio"))||(r==null?void 0:r.includes("video"));Z(()=>{const s=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(s)},[t,n,i,e,r,o])},hi=({content:e,pages:t,required:n})=>{const{buttonText:r,skipButtonText:o,taskDetail:i}=e;return Pt(t),a("div",{className:"ul-task-page",children:[i&&a(zr,{richTextBody:i}),a("div",{className:Ye,children:[a(re,{onClick:Nt.bind(null,{pages:t}),children:r}),a(Je,{required:n,skipButtonText:o})]})]},"start-task")},gi=({content:e,pages:t,properties:n})=>{const{buttonText:r,skipButtonText:o}=e;Pt(t);const i=a(pe,{properties:n,defaultBody:()=>a("div",{className:Ye,children:[a(re,{className:"ul-complete-task-button",onClick:bt.bind(null,{status:"completed"}),children:r}),a(re,{className:B("ul-button-inactive"),onClick:bt.bind(null,{status:"given.up"}),children:o})]})});return a("div",{className:"ul-task-page",children:[e.taskDetail&&a(zr,{richTextBody:e.taskDetail}),i]},"complete-task")},fi=({content:e,pages:t,required:n})=>{const{buttonText:r,skipButtonText:o}=e,[i]=F(l=>[l.tabTitle]),[s,d]=$(!1);return a("div",{children:[a("div",{className:Vr,children:[a("p",{style:{marginTop:"auto"},children:e.selectTabText}),a("div",{className:"ul-select-tab-container",children:a("p",{className:Ar,children:i})})]}),a("div",{className:n?"":Ye,children:[a(re,{disabled:s,onClick:Nt.bind(null,{pages:t,setIsRequestingPermission:d}),children:r}),a(Je,{required:n,skipButtonText:o})]})]})},vi=({content:e})=>a("div",{className:B(Fr,"ul_permission_svg_container","ul_recorded-task-inset-spacing","ul-center-horizontally"),dangerouslySetInnerHTML:{__html:e.svg}},"ul-permission-request-graphic"),_i=({content:e,pages:t,required:n})=>{const{permissionDeniedHeadline:r,permissionDeniedBody:o,skipButtonText:i,tryAgainButtonText:s}=e,d=We(t[0])?t[0]:null;return Z(()=>{const l=setInterval(()=>{d!==null&&_t({currentPage:d,pages:t})},1e3);return()=>clearInterval(l)},[d,t]),d?a("div",{children:[a("div",{className:Vr,children:a("p",{className:"ul-av-permission-denied-paragraph",children:[a("span",{className:"ul-av-permission-denied-headline",children:r}),a("span",{className:Ar,children:o})]})}),a("div",{className:Ye,children:[a(re,{onClick:_t.bind(null,{currentPage:d,pages:t}),children:s}),a(Je,{required:n,skipButtonText:i})]})]}):null},bi=({stream:e})=>a("video",{autoPlay:!0,className:B("ul_recorded-task-inset-spacing"),id:"ul-record-task-video-preview",muted:!0,ref:t=>{t&&(t.srcObject=e||null)}}),yi=({content:e,pages:t,required:n})=>{const{skipButtonText:r}=e,{avStream:o}=ue.getState();return Pt(t),a("div",{children:[a(bi,{stream:o}),a("div",{className:"ul-vertical-button-container-center",children:[a(re,{onClick:Nt.bind(null,{pages:t}),children:e.buttonText}),a(Je,{bottom:!0,required:n,skipButtonText:r})]})]})},xi=({properties:e})=>{const{pages:t,required:n}=e,{avStream:r,currentPage:o}=ue.getState();if(o===void 0)return null;switch(o==null?void 0:o.type){case"av_permission":{const i=qr(r,o);return i===vt?a(vi,{content:o}):a(i===Hr?_i:yi,{content:o,pages:t,required:n})}case"screen_permission":return a(fi,{content:o,pages:t,required:n});case"start_task":return a(hi,{content:o,pages:t,required:n});case"complete_task":return a(gi,{content:o,pages:t,properties:e});default:return null}},ki=({className:e,properties:t,next:n,questionId:r})=>{const o=F(),{surveyId:i,responseGroupUid:s,userId:d}=o,l=ue(),{screenPermissionRequested:u}=l,h=ue(b=>b.avStream);let c=ue(b=>b.currentPage);c||(c=function({pages:b,userId:_,responseGroupUid:k,surveyId:y,questionId:j,next:I}){const{updatePage:C}=ue.getState(),{eventEmitFn:E,recorderEventEmitter:x}=F.getState(),P={questionId:j,surveyId:y,visitorId:_,responseGroupUid:k};let D=0;x.emit("recorded.task.permission.screen"),E("recorded.task.permission.screen"),x.emit("permission.status",{"permission.status.callback":(p,f,w,S)=>{const R=b[D],{type:L}=R,N=["screen"];if(We(R)){const{permissionDescriptors:O}=R,V=O==null?void 0:O.includes("microphone"),q=O==null?void 0:O.includes("camera");V&&N.push("audio"),q&&N.push("video"),(p!=null&&p.active&&!q||p!=null&&p.active&&f)&&D++}xn(b[D])&&w&&(D++,x.emit("begin.recording",{"recording.media.types":N,"start.recording.callback":O=>C({mediaRecordingUids:O})})),C({currentPage:b[D],avStream:p,screenPermissionRequested:w,nextQuestion:I,type:L,passthroughData:P,recordingMediaTypes:N,captureStream:S})}});const T=b[D];return T.type==="av_permission"&&_t({currentPage:T,pages:b}),T}({questionId:r,surveyId:i,next:b=>{n(b,!0)},pages:t.pages,responseGroupUid:s,userId:d}));let m=c.headline,v=c.captionText;const g=qr(h,c);return xn(c)&&u&&(m=c.permissionDeniedHeadline,v=c.permissionDeniedCaptionText),We(c)&&g===Br&&(m=c.permissionGrantedHeadline,v=c.permissionGrantedCaptionText),a("div",{className:B(e,"ul-center-horizontally","fade-in-transition"),children:[a(se,{message:m,properties:{captionText:v}}),a(me,{children:a(xi,{properties:t})})]})};var $r=(e=>(e.CONTINUE="CONTINUE",e.EXTERNAL="EXTERNAL",e.NO_BUTTON="NO_BUTTON",e))($r||{});const wi={"{{user_id}}":"externalUserId","{{email}}":"email"},Ci=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{visitorAttributes:s,isLongFormSurvey:d}=F(g=>({visitorAttributes:g.visitorAttributes,isLongFormSurvey:H.isLongFormSurvey(g.studyType)})),l=(g,b=!1)=>{n({value:b?{skipped:!0}:void 0,questionId:o,type:i},!0)},u=g=>{g.key!=="Enter"&&g.key!==" "||n({value:void 0,questionId:o,type:i},!0)},h=((g,b={})=>{if(!g)return g;try{/^https?:\/\//i.test(g)||(g=`http://${g}`);const I=new URL(g);if(!I.protocol||I.protocol!=="http:"&&I.protocol!=="https:")return}catch{return}let _=g;const k=[];for(const[I,C]of Object.entries(wi))if(_.toLowerCase().includes(I))if(b[C]){const E=new RegExp(I,"gi");_=_.replace(E,b[C])}else k.push(I);if(k.length===0||!_.includes("?"))return _;const y=_.slice(0,_.indexOf("?")),j=_.slice(_.indexOf("?")+1).split("&").map(I=>I.split("=")).filter(I=>!k.includes(I[1]));return j.length===0?y:`${y}?${j.map(I=>I.join("=")).join("&")}`})(r&&r.buttonUrl,s),c=d&&r.promptActionType===$r.NO_BUTTON?()=>a(X,{}):()=>a(_e,{children:a("div",{className:"ul-card-button-group",children:[a("a",{className:"ul-card-text__button ul-card__text-url-prompt-button",href:h,id:"ul-card-text__button",onClick:l,onKeyPress:u,rel:"noreferrer",role:h?"link":"button",tabIndex:0,target:"_blank",children:xe(r)}),r.required===!1&&a("button",{className:"ul-card-skip__button",onClick:g=>l(0,!0),children:Rt(r)})]})});return a("div",{className:B(e,"ul-card__text-url-prompt","fade-in-transition"),children:[a(se,{message:t,properties:{questionHtml:r.questionHtml}}),a(me,{children:(m=r==null?void 0:r.richTextBody,v=r==null?void 0:r.body,m?a("div",{className:"ul-rich-text-body",dangerouslySetInnerHTML:{__html:m},id:"ul-card__text-url-body-container"}):v?a("div",{className:"ul-rich-text-body",id:"ul-card__text-url-body-container",children:(v?v.split(/\n\s*\n/g):[]).map((g,b)=>a("p",{children:g},b))}):null)}),a(pe,{defaultBody:c,properties:r})]},o);var m,v},Si=({className:e,questionId:t})=>{const{border:n,destroy:r,endCard:o,forceBrandedLogo:i}=F(l=>({border:l.border,destroy:l.destroy,endCard:l.endCard,forceBrandedLogo:l.forceBrandedLogo}));Z(()=>{setTimeout(()=>{r(Y.APP_ID)},i?4e3:2e3)},[r,i]);const s=o&&o.subheader?a("p",{className:"ul-caption",children:o.subheader}):null,d=o&&o.headline?o.headline:"";return a("div",{className:B(e,"ul-card--thanks","fade-in-transition"),children:a("div",{children:a("div",{className:"ul-card--thanks-content",children:[a("div",{className:"ul-thanks-check",children:a("svg",{"aria-labelledby":"title",fill:"none",height:"99",viewBox:"0 0 81 99",width:"81",xmlns:"http://www.w3.org/2000/svg",children:[a("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"}),a("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"}),a("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"})]})}),a(se,{message:d}),s]})})},t)},Ce="https://cdn.sprig.com",U={document:void 0,videojs:void 0},Mt=e=>e+"-loading-spiner",oe="hidden",wn=".m3u8",at="questionId",lt="ul-video-recorder-camera-off-button",dt="ul-recording-in-session",Ei=[{type:"link",content:`${Ce}/dependencies/videojs-record-4.5.0.min.css`},{type:"script",content:`${Ce}/dependencies/RecordRTC-5.6.2.js`},{type:"script",content:`${Ce}/dependencies/adapter.8.0.0.min.js`},{type:"script",content:`${Ce}/dependencies/videojs-record-4.5.0.min.js`},{type:"script",content:`${Ce}/userleap-web-upchunk-v2.2.2.js`}],Wr=[{type:"link",content:`${Ce}/dependencies/video-js-7.18.0.min.css`},{type:"script",content:`${Ce}/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
|
+
`}],Qr="-video-player",Cn="-secondary-video-player",Sn="-video-recorder";let ce,En;const ye=async({event:e,apiBase:t,headers:n,visitorId:r,envId:o,metadata:i})=>{const s=U.document.documentElement;if(!r||!o)return;const d={event:`SDK - ${e}`,visitorId:r,environmentId:o,metadata:{...i||{},screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:s.clientWidth,clientHeight:s.clientHeight,location:window.location.href,language:navigator.language}};(await fetch(`${t}/sdk/1/visitors/${r}/analytics`,{method:"POST",cache:"no-cache",headers:n,body:JSON.stringify(d)})).ok||console.warn("[Sprig] (ERR-444) Failed to track analytics",e)},he=async(e,t,n,r,o,i)=>{ye({event:`Video Error ${t}`,apiBase:n,headers:r,visitorId:o,envId:i,metadata:{errorMessage:e.message}});const s=U.document.documentElement,d={screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:s.clientWidth,clientHeight:s.clientHeight,location:window.location.href,language:navigator.language},l={action:t,err:{message:e.message,stack:e.stack},meta:d,vid:o,envId:i};(await fetch(`${n}/sdk/1/errors`,{method:"POST",cache:"no-cache",headers:{...r,"userleap-platform":"video_recorder","x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},body:JSON.stringify(l)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",e)},Zr=(e,t)=>{if(e.length===0)return t&&t();Promise.all(e.reduce((n,r)=>(n.push(((o,{type:i,content:s})=>new Promise(function(d,l){let u;i==="script"?(u=U.document.createElement("script"),u.src=s):i==="link"?(u=U.document.createElement("link"),u.rel="stylesheet",u.href=s,u.type="text/css"):(u=U.document.createElement("style"),u.innerHTML=s),u.onload=function(){d(s)},u.onerror=function(){l(s)},u.async=!1,u.id=btoa(s),o.appendChild(u)}))(U.document.head,r)),n),[])).then(()=>{U.videojs=U.document.defaultView.videojs,t&&t()}).catch(function(n){console.log(n+" failed to load")})},In=(e,t,n)=>{if(t==="start"&&(e.style.visibility="visible"),t==="none")e.style.visibility=oe;else if(t==="success")e.style.visibility=oe,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%)`}},ct=(e,t)=>{const n=U.videojs(e.id());return n==null?void 0:n.payload[t]},Gr=(e,t)=>{const n=new(U.videojs.getComponent("Component"))(e);return n.addClass("ul-buttons-panel"),t.map(r=>{n.addChild(r)}),Ii(n),n},Ii=e=>{e.children().forEach(t=>{if(ae[t.name_]){const n=Ae(ae[t.name_],`ul-${ae[t.name_]}`);t.el_.appendChild(n)}})},Ae=(e,t="")=>{const n=U.document.createElement("span");return n.className="ul-button-text",n.innerHTML=e,n.id=t,n},Kr=(e,t,n,r,o=!1,i)=>{e.addClass("ul-video-player");const s=new(U.videojs.getComponent("Component"))(e);s.addClass("ul-control-panel"),e.progressBar=s.addChild("ProgressControl"),n&&e.src(n),e.audioPlayerPlaceholder=new(U.videojs.getComponent("Component"))(e),e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");const d=n&&n.src?Di(n.src):null;!n||!o&&d?(e.audioPlayerPlaceholder.hide(),U.document.getElementById(`${e.id()}_html5_api`).style.height="100%",d&&e.poster(d)):(e.children()[0].classList.add("vjs-hidden"),U.document.getElementById(`${e.id()}_html5_api`).style.height="0px"),e.on("play",()=>{o||!n||d||Ti(e),i==null||i.play()}),e.on("pause",()=>{i==null||i.pause()}),e.on("seeked",()=>{i==null||i.currentTime(e.currentTime())}),e.on("ratechange",()=>{i==null||i.playbackRate(e.playbackRate())}),e.addChild(e.audioPlayerPlaceholder,{},1),s.addChild(t),e.addChild(s),r&&r(e)},ji=(e,t,n,r,o,i,s,d=!1)=>{En=Date.now();const l=Qe(t,{controls:!1,bigPlayButton:!1,fluid:!1,width:1280,height:720,playsinline:!0,plugins:{record:{audio:!0,video:{mandatory:{minWidth:1280,minHeight:720}},frameWidth:1280,frameHeight:720,maxLength:600,autoMuteDevice:!0}}});if(!l)return;l.payload=n;const{surveyId:u,questionId:h,responseGroupUid:c,visitorId:m,envId:v}=n;let g;const b=T=>{const p=lt,f=lt+"-audio-only";In(l.uploadProgressLabel,"none"),ce&&ce.startTime>=En&&ce.abort();const w=U.document.getElementById("ul-camera-button");T?(l.children()[0].classList.add("vjs-hidden"),j.removeClass(p),j.addClass(f),w.innerHTML=ae.TurnOnCamera,l.audioPlayerPlaceholder.removeClass("vjs-hidden"),g==null||g.getTracks().forEach(S=>{S.stop()}),window.navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then(S=>{g=S,S.getVideoTracks().forEach(R=>{R.enabled=!1}),l.record().onDeviceReady(S)}).catch(l.record().onDeviceError.bind(l.record()))):(g==null||g.getVideoTracks().forEach(S=>{S.enabled=!0}),l.children()[0].classList.remove("vjs-hidden"),l.record().getDevice(),j.removeClass(f),j.addClass(p),w.innerHTML=ae.TurnOffCamera,l.audioPlayerPlaceholder.addClass("vjs-hidden"))},_=new(U.videojs.getComponent("Button"))(l,{clickHandler:()=>{_.hasClass(oe)||(ye({event:"Video Delete Button Clicked",apiBase:r,headers:s,visitorId:m,envId:v,metadata:{questionId:h,responseGroupUid:c,surveyId:u}}),b(l.cameraOff),o(A.DELETE,{}),j.removeClass(oe),_.addClass(oe))}});_.addClass("ul-video-recorder-delete-button"),_.el_.appendChild(Ae(ae.DeleteButton,"ul-delete-button"));const k=U.document.getElementById(t),y=()=>{k.classList.contains("vjs-fullscreen")&&l.cameraOff?k.style.display="table":k.style.display="flex"};y();const j=new(U.videojs.getComponent("Button"))(l,{clickHandler:()=>{l.record().isRecording()||(l.cameraOff=!l.cameraOff,ye({event:"Video Camera Button Clicked",apiBase:r,headers:s,visitorId:n.visitorId,envId:n.envId,metadata:{questionId:h,responseGroupUid:c,surveyId:u,cameraOff:l.cameraOff}}),b(l.cameraOff),!_.hasClass(oe)&&_.addClass(oe),o(A.DELETE,{}),y())}});j.addClass(lt),j.el_.appendChild(Ae(ae.TurnOffCamera,"ul-camera-button"));const I=new(U.videojs.getComponent("Button"))(l,{clickHandler:()=>{const T=U.document.getElementById("ul-recorder-toggle");if(l.record().isRecording())l.record().stop(),T&&(T.innerHTML=ae.RecordButton),I.removeClass(dt),_.removeClass(oe);else{const p=U.document.getElementById("ul-recording-countdown-screen");if(p)p.remove(),T&&(T.innerHTML=ae.RecordButton),b(l.cameraOff),o(A.DELETE,{}),j.removeClass(oe),_.addClass(oe),I.removeClass(dt),x.show();else{I.addClass(dt),x.hide(),j.addClass(oe),_.addClass(oe),T&&(T.innerHTML=ae.StopButton);const f=U.document.createElement("div");f.id="ul-recording-countdown-screen",k.insertBefore(f,k.children[1]),f.style.height=`${k.offsetHeight}px`,Yr(l,3)}}}});I.addClass("ul-video-recorder-toggle-button"),I.el_.appendChild(Ae(ae.RecordButton,"ul-recorder-toggle"));const C=U.document.createElement("p");C.style.visibility="hidden",C.className="ul-upload-progress-label",e.appendChild(C),l.uploadProgressLabel=C;const E=Gr(l,[_,j,"PlayToggle",I,"FullscreenToggle"]),x=E.children().find(T=>T.name_==="FullscreenToggle");x.hasClass("vjs-disabled")&&x.hide();const P=E.children().find(T=>T.name_==="PlayToggle");P.hide(),_.addClass(oe),Kr(l,E,i,!1,d),l.on("stopRecord",()=>{I.hide(),P.show(),x.show(),_.removeClass(oe)}),l.on("deviceReady",()=>{I.show(),P.hide(),_.addClass(oe)}),((T,p,f,w,S)=>{const{surveyId:R,responseGroupUid:L,visitorId:N,envId:O}=T.payload;T.on("deviceError",function(){console.warn("device error: ",T.deviceErrorCode),T.deviceErrorCode.message==="Permission denied"?(T.deviceButton.addClass("permission-denied"),f&&f(A.ERROR,{type:A.PERMISSION_DENIED}),ye({event:"Video Permission Denied",apiBase:p,headers:S,visitorId:N,envId:O,metadata:{questionId:ct(T,at),responseGroupUid:L,surveyId:R}})):(f&&f(A.ERROR,{type:A.OTHER}),he(new Error(T.deviceErrorCode.message),"recorderDeviceError",p,S,N,O))}),T.on("error",function(V,q){he(q||T.error(),"recorderError",p,S,N,O)}),T.on("startRecord",function(V,q){w(T.uploadProgressLabel,"none"),ye({event:"Video Record Start",apiBase:p,headers:S,visitorId:N,envId:O,metadata:{questionId:ct(T,at),responseGroupUid:L,surveyId:R}})}),T.on("finishRecord",async function(){w(T.uploadProgressLabel,"start",0);const V=ct(T,at);if(!R){const G="internal error: missing fields in payload";return f&&f(A.ERROR,{type:A.OTHER}),he(new Error(G),"finishRecord",p,S,N,O),null}T.record().stopDevice();const q=T.cameraOff?A.MEDIA_TYPE_AUDIO:A.MEDIA_TYPE_VIDEO,z=H.v4();ye({event:"Video Record Finish",apiBase:p,headers:S,visitorId:N,envId:O,metadata:{mediaRecordingUid:z,questionId:V,responseGroupUid:L,surveyId:R,mediaType:q}});const W={surveyId:R,updatedAt:new Date().toISOString(),mediaType:q,mediaRecordingUid:z};V&&(W.questionId=V),L&&(W.responseGroupUid=L),N&&(W.visitorId=N);const ee=await(async()=>{const G=await fetch(`${p}/2/environments/integrations/upload`,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(W)});if(G.ok){const J=await G.json();return f&&f(A.UPLOAD_STARTED,{[A.UPLOAD_ID]:J.upload.id,[A.MEDIA_TYPE]:q,[A.MEDIA_RECORDING_UID]:z}),J.upload.url}return f&&f(A.ERROR,{type:A.OTHER,response:G}),he(new Error("failed to get upload response with url"),"finishRecord",p,S,N,O),null})();ee&&(ce=U.document.defaultView.UpChunk.createUpload({endpoint:ee,file:new U.document.defaultView.File([T.recordedData],`recording ${q} ${Date.now()}`),chunkSize:5120}),ce.startTime=Date.now(),ye({event:"Video Upload Start",apiBase:p,headers:S,visitorId:N,envId:O,metadata:{mediaRecordingUid:z,questionId:V,responseGroupUid:L,surveyId:R,mediaType:q,url:ee}}),ce.on("error",G=>{w(T.uploadProgressLabel,"none"),f&&f(A.UPLOAD_FINISHED,{[A.MEDIA_RECORDING_UID]:z}),he(G,"finishRecord",p,S,N,O)}),ce.on("progress",G=>{f&&f(A.UPLOAD_PROGRESS,{[A.MEDIA_RECORDING_UID]:z,[A.UPLOAD_PROGRESS_PCT]:G.detail}),w(T.uploadProgressLabel,"progress",G.detail)}),ce.on("success",()=>{w(T.uploadProgressLabel,"success"),f&&f(A.UPLOAD_FINISHED,{[A.MEDIA_RECORDING_UID]:z}),ye({event:"Video Upload Success",apiBase:p,headers:S,visitorId:N,envId:O,metadata:{mediaRecordingUid:z,questionId:V,responseGroupUid:L,surveyId:R,mediaType:q,url:ee,elapsedMs:ce.startTime&&Date.now()-ce.startTime}})}))})})(l,r,o,In,s);const D=[{name:"microphone"}];!l.cameraOff&&D.push({name:"camera"}),Promise.all(D.map(T=>{var p;return(p=navigator==null?void 0:navigator.permissions)==null?void 0:p.query(T)})).then(T=>{T.reduce((p,f)=>p&f.state==="granted",!0)&&l&&(l.deviceButton&&l.deviceButton.hide(),l.record().getDevice())}).catch(T=>{})},Yr=(e,t=3)=>{const n=U.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(()=>{Yr(e,t-1)},1e3))},Jr=e=>{const t=U.document.createElement("div");return t.className="ul-video-container",t.appendChild((n=>{const r=U.document.createElement("div");return r.className="ul-video-player-loading",r.id=Mt(n),["first","second","third","fourth"].map(o=>{const i=U.document.createElement("div");i.className=o,r.appendChild(i)}),r})(e)),t},yt=(e,t)=>{const n=U.document.createElement("video");n.id=e,n.className="video-js vjs-default-skin ul-video-player-video";const r=U.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=U.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},Ti=(e,t)=>{e.children()[0].classList.remove("vjs-hidden"),e.audioPlayerPlaceholder.hide(),U.document.getElementById(`${e.id()}_html5_api`).style.height="100%"},Qe=(e,t)=>U.document.getElementById(e)?t?U.videojs(e,t):U.videojs(e):(console.error(`Error in finding player element with ID, ${e}`),null),Li=(e,t,n,r=!1,o="https://api.sprig.com",i=document,s=null,d=null)=>{U.document=i;const l=e+Qr,u=Jr(l);return U.document.addEventListener("securitypolicyviolation",h=>{he(new Error(`Voice & Video feature violates ${h.violatedDirective} web page CSP policies for the question player.`),"playerDeviceError",o,{})}),Zr(Wr,()=>{U.document.getElementById(Mt(l)).remove(),yt(l,u);const h={playsinline:!0,playbackRates:[.5,1,1.5,2],fill:!0};try{const c=e+Cn;yt(c,u);const m=Qe(l,h),v=Qe(c,{muted:!0,...h});if(!m||!v)return;((_,k,y)=>{_.addClass(`ul${Cn}`);const j=new(U.videojs.getComponent("Component"))(_);k&&_.src(k),_.addChild(j),y&&y(_)})(v,s,d),s||v.addClass(oe);const g=Gr(m,["PlaybackRateMenuButton","PlayToggle","FullscreenToggle"]),b=g.children().find(_=>_.name_==="FullscreenToggle");b.hasClass("vjs-disabled")&&b.hide(),Kr(m,g,t,n,r,v)}catch(c){return void he(new Error(`Error when creating video player object ${c}`),"playerDeviceError",o,{})}}),u},Di=e=>{if(!e)return null;const t=e.match(/https:\/\/stream.mux.com\/(.*)/);let n=t?t[1]:null;return n.includes(wn)&&(n=n.replace(wn,"")),n?`https://image.mux.com/${n}/thumbnail.jpg?time=0`:null},A={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"},ae={PlaybackRateMenuButton:"Speed",PlayToggle:"Play",FullscreenToggle:"Expand",TurnOnCamera:"Turn on",TurnOffCamera:"Turn off",DeleteButton:"Delete",RecordButton:"Record",StopButton:"Stop",PauseButton:"Pause"},ke="ul-card-video__player_recorder",jn="ul-video-btn",ut=0,Tn=1,Ri=({className:e,message:t,next:n,properties:r,questionId:o,type:i})=>{const{apiURL:s,envId:d,handleUploadUpdate:l,headers:u,responseGroupUid:h,surveyId:c,update:m,viewDocument:v,visitorId:g}=F(p=>({apiURL:p.apiURL,envId:p.envId,handleUploadUpdate:p.handleUploadUpdate,headers:p.headers,responseGroupUid:p.responseGroupUid,surveyId:p.surveyId,update:p.update,viewDocument:p.viewDocument,visitorId:p.userId})),[b,_]=$(!1),[k,y]=$(null),[j,I]=$(null),[C,E]=$(ut),x=ne(null),P=r&&r.videoUrl;Z(()=>{const p=x.current,f=new ResizeObserver(()=>{m()});return p&&f.observe(p),()=>{p&&f.unobserve(p)}},[m]);const D=(p,f)=>{p===A.UPLOAD_STARTED?(y(f[A.UPLOAD_ID]),I(f[A.MEDIA_RECORDING_UID]),_(!0)):p===A.DELETE?(y(null),I(null),_(!1)):p===A.UPLOAD_PROGRESS?isNaN(f[A.UPLOAD_PROGRESS_PCT])?l({mediaRecordingUid:f[A.MEDIA_RECORDING_UID],isComplete:!0}):l({mediaRecordingUid:f[A.MEDIA_RECORDING_UID],progressPct:f[A.UPLOAD_PROGRESS_PCT]}):p===A.UPLOAD_FINISHED&&l({mediaRecordingUid:f[A.MEDIA_RECORDING_UID],isComplete:!0})},T=p=>{p.preventDefault(),p.stopPropagation(),document.getElementById(ke)&&(f=>{const w=f+Sn;if(U.document.getElementById(w)&&U.videojs){try{if(!U.videojs(w).record().stream)return}catch{return}U.videojs(w).record().stop(),U.videojs(w).record().stopDevice()}})(ke),k&&j?(l({mediaRecordingUid:j,isSubmitted:!0}),n({value:{mediaRecordingUid:j},questionId:o,type:i},!0)):n({value:null,questionId:o,type:i},!0)};return a("form",{className:B(e,"ul-card--video","fade-in-transition"),id:"ul-video-interview-form",children:[a(se,{message:t,properties:r}),a(me,{children:[a("div",{id:"ul-question-player-container",ref:x,style:{display:C===ut?"":"none"},children:[a("div",{id:ke,ref:p=>{if(p&&p.children.length===0&&!r.hideRecordedPrompt){const f=Li(ke,{src:P,type:"application/x-mpegURL"},void 0,r.mediaType===A.MEDIA_TYPE_AUDIO,s,v);p.appendChild(f)}}}),a(pe,{defaultBody:()=>a("button",{className:`${jn} ul-record-response-btn`,onClick:p=>{p.preventDefault(),p.stopPropagation(),document.getElementById(ke)&&(f=>{const w=Qe(f+Qr);w==null||w.pause()})(ke),E(Tn)}}),properties:r})]}),a("div",{style:{display:C===Tn?"block":"none"},children:[a("button",{className:`${jn} ul-back-question-btn`,onClick:p=>{p.preventDefault(),p.stopPropagation(),E(ut)},style:{display:r.hideRecordedPrompt?"none":"block"}}),a("div",{id:"ul-recorder-player-container",ref:p=>{if(p&&p.children.length===0){const f=((w,S={},R="https://api.userleap.com",L,N,O,V=!1,q=document)=>{U.document=q;const z=w+Sn,W=Jr(z);return U.document.addEventListener("securitypolicyviolation",ee=>{he(new Error(`Voice & Video feature violates ${ee.violatedDirective} web page CSP policies for the recorder player.`),"recorderDeviceError",R,O,S.visitorId,S.envId)}),Zr(Wr.concat(Ei),()=>{yt(z,W),U.document.getElementById(Mt(z)).remove();try{ji(W,z,S,R,L,N,O,V)}catch(ee){return void he(new Error(`Error when creating video recorder player object ${ee}`),"recorderDeviceError",R,O,S.visitorId,S.envId)}}),W})(ke,{surveyId:c,responseGroupUid:h,questionId:o,visitorId:g,envId:d},s,D,void 0,{...u,"x-ul-video-recorder-origin":"sdk"},r.mediaType===A.MEDIA_TYPE_AUDIO,v);p.appendChild(f)}}})]})]}),a(_e,{children:[a(re,{disabled:!b,onClick:T,children:xe(r)}),a("button",{className:"ul-card-text__button ul-button-inactive ul-card-skip__button",id:"ul-card-video__skip_button",onClick:T,style:{display:r.required?"none":"block",...b?{display:"none"}:{}},children:Rt(r)})]})]})},Ni=({className:e})=>{const{uploadProgress:t}=F(i=>({uploadProgress:i.uploadProgress}));let n,r;Object.values(t).filter(i=>i.isSubmitted).length>1?(n="Your responses are processing",r="Please keep this tab open until your responses are fully processed."):(n="Your response is processing",r="Please keep this tab open until your response is fully processed.");const o=Math.round(Math.min(99,...Object.values(t).filter(i=>i.isSubmitted).map(i=>i.progressPct||0)));return a("div",{className:B(e,"ul-card--uploading","fade-in-transition"),children:[a("div",{"aria-busy":"true","aria-label":"Processing...","aria-live":"polite",className:"ul-loading-spinner-container",role:"progressbar",children:a("div",{className:"ul-loading-spinner",children:[a("div",{className:"first"}),a("div",{className:"second"}),a("div",{className:"third"}),a("div",{className:"fourth"})]})}),a(se,{message:`${n} (${o}% complete)`}),a("p",{className:"ul-caption",children:r})]})},Pi=()=>{var k;const{border:e,cards:t,forceBrandedLogo:n,headers:r,index:o,marketingUrl:i,showSurveyBrand:s,slugName:d,surveyId:l,viewedCardCount:u}=F(y=>({border:y.border,cards:y.cards,forceBrandedLogo:y.forceBrandedLogo,headers:y.headers,index:y.index,marketingUrl:y.marketingUrl,showSurveyBrand:y.showSurveyBrand,slugName:y.slugName,surveyId:y.surveyId,viewedCardCount:y.viewedCardCount})),h=ne(null),c=t.filter(y=>y.type!=="uploading"&&y.type!=="thanks"),m=((y,j)=>{const I=new Set(["thanks","uploading"]);if(j>=y.length||j<0||I.has(y[j].type))return 0;const C=y.filter(x=>!I.has(x.type));if(j===C.length-1)return 1;const E={[C.length-1]:1,[-1]:0};for(let x=C.length-2;x>=j;x--){const P=C[x],D=Oo(x,P.props.routingOptions);if(D.length===0){E[x]=E[x+1]+1;continue}let T=0,p=No(P);if(p===null)return C.length-1-j;for(let f=0;f<D.length&&p.length!==0;f++){const{comparator:w,target:S,value:R}=D[f],L=p.filter(N=>{const O=Ro({value:N},P.type,N),V=kr(N,P.type);return!(O&&w==="answered"||V&&w==="partial"||!O&&!V&&w==="skipped"||w==="given_up"&&Mo(N)&&N.taskStatus==="given.up"||O&&P.type==="open"&&(w==="contains"||w==="notcontains")||O&&Po(w)&&Lt[w](N,R))});if(L.length<p.length){const N=parseInt(String(S),10);if(N!==-1&&N<=x||N>=C.length)return C.length-1-j;T=Math.max(E[N]+1,T)}p=L}p.length>0&&(T=Math.max(E[x+1]+1,T)),E[x]=T}return E[j]})(t,o),v=u+1,g=v/(v+m),b=Nr({marketingUrl:i,slugName:d,surveyId:l,forceBrandedLogo:n});Z(()=>{h.current&&(h.current.style.width=100*g+"%")},[g]);const _=((k=t[o])==null?void 0:k.type)==="thanks";return a("footer",{className:"ul-footer "+(r["userleap-platform"]==="link"?"ul-footer__link":""),children:_&&n?a(Rr,{marketingUrlLink:b}):a(X,{children:[c.length>1&&a("div",{className:"ul-progress-bar-container ul-progress-bar-container__footer",children:a("div",{className:"ul-progress-bar-current",ref:h,style:{border:`1px solid ${e||"#000"}`}})}),s?a(Dr,{forceBrandedLogo:n,marketingUrlLink:b}):null]})})},Mi=()=>{const e=F(s=>s.border),t=F(s=>s.cards),n=F(s=>s.index),r=F(s=>s.focusedQuestionId),{totalQuestions:o,fraction:i}=de(()=>{var u;const s=t.filter(h=>h.type!=="uploading"&&h.type!=="thanks"),d=s.length;if(d<=1)return{totalQuestions:d,fraction:0};if(((u=t[n])==null?void 0:u.type)==="thanks")return{totalQuestions:d,fraction:1};const l=s.findIndex(h=>h.name===r);return{totalQuestions:d,fraction:(l>=0?l:0)/d}},[t,n,r]);return o<=1?null:a("div",{className:"ul-progress-bar-container ul-progress-bar-container__header",children:a("div",{className:"ul-progress-bar-current",style:{width:100*i+"%",border:`1px solid ${e??"#000"}`}})})},Oi=()=>{const{answers:e,border:t,cards:n,close:r,configureExitOnOverlayClick:o,destroy:i,endCard:s,eventEmitFn:d,fontFamily:l,headers:u,index:h,minScrollableHeight:c,next:m,previewMode:v,productConfig:g,seen:b,showStripes:_,studyType:k,surveyId:y,update:j,useMobileStyling:I,viewDocument:C}=F(L=>({answers:L.answers,border:L.border,cards:L.cards,close:L.close,configureExitOnOverlayClick:L.configureExitOnOverlayClick,destroy:L.destroy,endCard:L.endCard,eventEmitFn:L.eventEmitFn,fontFamily:L.fontFamily,headers:L.headers,index:L.index,previewMode:L.previewMode,productConfig:L.productConfig,minScrollableHeight:L.minScrollableHeight,next:L.next,seen:L.seen,showStripes:L.showStripes,studyType:L.studyType,surveyId:L.surveyId,update:L.update,useMobileStyling:L.useMobileStyling,viewDocument:L.viewDocument})),E=ne(null),x=ne(!1),P=u["userleap-platform"],{props:D,type:T,name:p}=n[h];Z(()=>{if(window.Sprig)return window.Sprig.trackHistory=L=>F.getState().trackHistory(L),()=>{window.Sprig.trackHistory=void 0}},[]),Z(()=>{E.current&&(E.current.classList.contains("ul-app--visible")||E.current.classList.add("ul-app--visible"),!x.current&&d&&(x.current=!0,d(H.SprigEvent.SurveyAppeared,{name:H.SprigEvent.SurveyAppeared,"survey.id":y})))},[d,y]),Z(()=>{const L=()=>{C.visibilityState==="visible"&&(b(),C.removeEventListener("visibilitychange",L))};return C.addEventListener("visibilitychange",L),L(),()=>{C.removeEventListener("visibilitychange",L)}},[b,C]),Z(()=>{j()},[h,j]),Z(()=>{o(()=>r())},[r,o]);const f=de(()=>H.groupCards(n,h),[n,h]),w=Ur(n),S=Se(L=>{m({data:L,completeSurvey:()=>i(Y.APP_ID),endCard:s}),Y.resetScrollPosition(C)},[m,i,s,C]);if(e){for(const L of e)if(L.questionId===p){let N;if(T==="multiplechoice"){const O=D.options.find(({value:V})=>V===L.value);if(!O)break;N={[O.id]:O.value}}else N=L.value;S({value:N,type:T,questionId:L.questionId});break}}const R=!I&&((g==null?void 0:g.framePosition)==="center"||(g==null?void 0:g.desktopDisplay)==="center-modal"||((g==null?void 0:g.placement)||"").includes("center"));return a("div",{className:B("ul-app",H.shouldDirectEmbed(u)?"ul-app--visible":"ul-app--overlay"),dir:"auto",id:Y.APP_ID,onClick:L=>{var q;const N=window.sprigAPI,O=L.target;if(!N||!O)return;const V=[O,O.parentElement];for(const z of V)if(((q=z==null?void 0:z.tagName)==null?void 0:q.toLowerCase())==="a"){L.preventDefault();try{const W=new URL(z.href);W.protocol!=="http:"&&W.protocol!=="https:"||(N==null||N.openUrl(W.toString()))}catch(W){console.error(W)}return}},ref:E,style:{"--theme":t,...l?{fontFamily:l.replace(";","")}:{},...R?{position:"relative"}:{}},children:a("div",{className:"ul-app__container",children:a("div",{className:B(te("ul-card__container",I,k)),style:{...k!=="feedbackButton"||(g==null?void 0:g.desktopDisplay)==="center-modal"?{borderColor:t}:{},...(g==null?void 0:g.desktopDisplay)==="slider"?{margin:"0px"}:{}},children:a("div",{className:"sprig-container",style:{minHeight:c},children:[_&&a("div",{className:"ul-header__container",dir:"ltr",children:a("div",{className:"ul-header",children:"For development purposes only"})}),v&&a("div",{className:"ul-header__container",dir:"ltr",children:a("div",{className:"ul-header",children:"Preview Mode: Response will not be recorded."})}),H.isLongFormSurvey(k)&&a(Mi,{}),a("div",{className:B(Bo("ul-card-main-content",P)),children:a(mi,{cards:f,next:S,previousResponses:w})}),!H.isLongFormSurvey(k)&&a(Pi,{})]})})})})},Xr=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",Ln=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:Xr()};return new MediaRecorder(e,t)},Dn=(e,t,n)=>{n[t]=[],e.ondataavailable=function(r){n[t].push(r.data)},e.currentMediaRecordingUid=t,e.start()};function Rn(e,t,n,r,o,i){if(e&&e.state!=="inactive"){const{"begin.callback":s}=r,d=e.currentMediaRecordingUid;if(!d)return;s&&s(d),e.onstop=()=>async function(l,u,h,c,m,v,g){const b=F.getState().viewDocument,{"upload.callback":_,"progress.callback":k}=c,y={mediaType:h,updatedAt:new Date().toISOString(),mediaRecordingUid:m,...c["passthrough.data"]},j=await(async(x,P)=>{var T;const D=await fetch(P,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(x)});if(D.ok){const p=await D.json();return(T=p==null?void 0:p.upload)==null?void 0:T.url}return null})(y,l);if(!j)return void(_&&_(null,{message:"failed to get upload url"}));const I=new Blob(g,{type:Xr()});if(!b.defaultView)return;const C=new b.defaultView.File([I],`recording video ${Date.now()}`),E=v.createUpload({endpoint:j,file:C,chunkSize:5120});E.on("error",x=>{_&&_(null,x)}),E.on("progress",x=>{k&&k(m,x)}),E.on("success",()=>{_&&_(m,!0)})}(t,0,n,r,d,o,i),e.stop()}}const Ui={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&&Rn(n,t,i,e,o,this.state.chunks[n==null?void 0:n.currentMediaRecordingUid]),r!=null&&r.currentMediaRecordingUid&&Rn(r,t,"screen",e,o,this.state.chunks[r==null?void 0:r.currentMediaRecordingUid]))},handleCancelledStream(e){const t=e.getVideoTracks(),n=e.getAudioTracks();let r=t.length&&t[0];r=r||n.length&&n[0],r&&r.addEventListener("ended",()=>{[this.state.avRecorder,this.state.screenRecorder].map(o=>{o&&(o.state==="recording"&&o.stop(),o.stream.getTracks().map(i=>{i.readyState==="live"&&i.stop()}))}),Object.assign(this.state,{avStream:null,captureStream:null,avRecorder:null,screenRecorder:null})})},taskDurationMillisecond(){return this.state.startTime?new Date().getTime()-this.state.startTime.getTime():0},setUpChunk(e){this.state.UpChunk=e},configure(e,t){Object.assign(this.state,t),this.state.uploadApiEndpoint=`${t.apiURL}/2/environments/integrations/upload`,this.state.chunks={},e.on("permission.status",this.permissionStatusCallback.bind(this)),e.on("av.permission",async n=>{this.avPermissionCallback(n)}),e.on("begin.recording",this.beginRecordingCallback.bind(this)),e.on("start.task",this.startTaskCallback.bind(this)),e.on("screen.permission",async n=>{this.screenPermissionCallback(n)}),e.on("finish.task",async n=>{this.finishTaskCallback(n)})},async avPermissionCallback(e){var r,o,i;const{"stream.ready":t,"permission.descriptors":n}=e;try{(r=this.state.avStream)!=null&&r.active&&(this.state.avStream.getTracks().map(s=>s.readyState==="live"&&s.stop()),((o=this.state.captureStream)==null?void 0:o.getAudioTracks().length)===1&&this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])),this.state.avStream=await navigator.mediaDevices.getUserMedia({video:n.includes("camera"),audio:!0}),((i=this.state.captureStream)==null?void 0:i.getAudioTracks().length)===0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.avStream)}catch(s){return console.warn("Error: failed to get permissions: "+s),void(t&&t(null,null))}t&&t(this.state.avStream,this.state.captureStream)},async screenPermissionCallback(e){const{"screen.permission.requested":t,"stream.ready.callback":n}=e;t==null||t(!0);try{this.state.captureStream=await navigator.mediaDevices.getDisplayMedia({video:!0,cursor:"always",displaySurface:"browser",preferCurrentTab:!0})}catch(r){return t==null||t(!1),console.warn("Error: failed to get permissions: "+r),void(n&&n(null,null))}t==null||t(!1),this.state.avStream&&this.state.avStream.getAudioTracks().length>0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.captureStream),n&&n(this.state.avStream||null,this.state.captureStream)},beginRecordingCallback(e){const{"recording.media.types":t,"start.recording.callback":n=()=>{}}=e;if(!t)return;const r=[];if(t.includes("video")&&this.state.avStream){this.state.avRecorder=Ln(this.state.avStream);const o=H.v4();Dn(this.state.avRecorder,o,this.state.chunks),r.push(o)}if(t.includes("screen")&&this.state.captureStream){this.state.screenRecorder=Ln(this.state.captureStream);const o=H.v4();Dn(this.state.screenRecorder,o,this.state.chunks),r.push(o)}r&&n&&n(r)},async finishTaskCallback(e){const{"current.index":t,"task.response":n,"task.complete.callback":r}=e;await this.stopRecording(e),r&&r(this.taskDurationMillisecond()),this.state.cards&&this.state.hasEndCard!==void 0&&this.lookAheadAndStopStream(t,n,this.state.cards,this.state.hasEndCard)},startTaskCallback(){this.state.startTime=new Date},permissionStatusCallback(e){var r;const{"permission.status.callback":t}=e,n=this.state.avStream;t&&t(n,!!n&&(n==null?void 0:n.getVideoTracks().length)>0,!!((r=this.state.captureStream)!=null&&r.active),this.state.captureStream)},lookAheadAndStopStream(e,t,n,r){const{avRecorder:o,screenRecorder:i}=this.state,{allResponses:s}=F.getState(),d=wr({cards:n,index:e,hasEndCard:r,allResponses:s});d!==null&&n[d].type==="recordedtask"||[o,i].map(l=>{l&&(l.state==="recording"&&l.stop(),l.stream.getTracks().map(u=>{u.readyState==="live"&&u.stop()}))})}},Ve=Object.create(Ui);Object.freeze(Ve);const Hi=({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}},Bi={configure:function(e,t=!0){var k;const{answers:n,apiURL:r,endCard:o,eventEmitFn:i,fontFamilyURL:s,frame:d,previewKey:l,viewDocument:u,viewWindow:h}=e,c=H.shouldDirectEmbed(e.headers)?e.frame:u.body,m=e.UpChunk||window.UpChunk,v=H.eventEmitter,g=((y,j)=>{const I=[...y],C=new Set(["videovoice","recordedtask"]);return y.some(E=>C.has(E.type))&&I.push({name:-2,props:{routingOptions:[]},type:"uploading"}),j&&I.push({name:-1,props:{routingOptions:[]},type:"thanks"}),I})(e.cards,!!o);Ve.configure(v,{cards:g,hasEndCard:!!o,apiURL:r,UpChunk:m}),F.setState({apiURL:r,answers:n,border:e.border,index:e.startingQuestionIdx||0,cards:g,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,endCard:e.endCard,envId:e.envId,eventEmitFn:i,fontFamily:e.fontFamily,forceBrandedLogo:e.forceBrandedLogo,frame:d,headers:e.headers,hasViewedEmbed:!1,isPreview:e.isPreview,marketingUrl:"https://sprig.com",meta:Hi({mode:e.mode,viewWindow:h,viewDocument:u,trackPageViewUrl:e.trackPageViewUrl}),mode:e.mode,previewKey:l,previewMode:e.previewMode,productConfig:e.productConfig,recorder:Ve,recorderEventEmitter:v,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}=u;if(Y.setSurveyStyles({document:u,elementId:"sprig-style",styleString:`html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;min-width:200px;justify-content:center;animation:enable-transitions 0s .3s forwards;min-height:0}@keyframes enable-transitions{to{transition:opacity .2s ease-in-out}}.ul-focus-transitions-active .ul-card,.ul-card--with-transitions{transition:opacity .2s ease-in-out}.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--desktop_longFormSurvey,.ul-card__container--mobile_longFormSurvey{margin:0}.sprig-container{display:flex;flex-direction:column;width:100%;height:fit-content;flex:1 1 auto;min-height:0;justify-content:center}.ul-card__container{background:#fff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;padding:0;min-height:0;position:relative;text-align:center;word-break:normal;overflow:auto}.ul-card__container--desktop_feedbackButton{box-shadow:unset}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:center;align-self:stretch}.sprig-question-footer-container{align-items:center;width:100%;height:fit-content;display:flex;flex-direction:column;padding:12px 20px 0}.long-form-question-footer-container{position:fixed;bottom:0;left:0;width:100%;display:flex;justify-content:space-between;align-items:center;overflow:visible;z-index:1000;pointer-events:none;padding:32px}.long-form-question-footer-container--mobile{background-color:#fff;border-top:1px solid #e6e6e6;padding:16px 24px}.long-form-question-footer-container-center{justify-content:center}.long-form-question-footer-container .long-form-question-footer-container-logo{width:auto;pointer-events:auto}.long-form-question-footer-container-center .long-form-question-footer-container-logo{margin-left:0}.long-form-question-footer-container .long-form-question-footer-container-actions{display:flex;gap:8px;pointer-events:auto}.long-form-question-footer-container .long-form-question-footer-container-actions .long-form-button{display:flex;justify-content:center;align-items:center;gap:8px;padding:12px;border-radius:8px;height:40px;width:40px}.long-form-question-footer-container .long-form-question-footer-container-actions .long-form-button .long-form-button-text-container{display:flex;align-items: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,.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;z-index:2;height:fit-content}.sprig-border-bottom{border-bottom:1px solid rgba(0,0,0,.1)}.sprig-border-top{border-top:1px solid rgba(0,0,0,.1)}.question-header-container{z-index:1}.sprig-header-container{padding:16px}.question-header-button-container{display:grid;grid-template-columns:97fr 3fr;align-items:center;justify-content:space-between;width:100%;height:fit-content}.ul-card--thanks-content .question-header-button-container{justify-content:center}.sprig-question-body{padding:0 20px;min-height:0;flex-shrink:1;overflow:auto;position:relative;align-self:stretch;width:100%}.sprig-stretch{align-self:stretch}.ul-question{color:#343442;display:block;font-size:17px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-question ol,.ul-question ul,.ul-caption ol,.ul-caption ul{margin-left:1em}.ul-caption{flex:1 0 auto;font-size:14px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start;margin-top:4px}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.select-checkbox{height:16px;width:16px;display:flex;box-sizing:border-box;background-color:"transparent";align-items:center;justify-content:center;border-radius:4px;border:1px solid #b0b5b7;flex-shrink:0}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.footer{width:100%;margin-top:12px;font-size:12px;line-height:12px;color:#000000b3}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{align-self:center;box-shadow:unset;border-radius:unset;border:none!important;position:unset;width:100%}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center;align-self:stretch}.sprig-accordion{width:100%;margin-bottom:8px}.sprig-accordion-body{width:100%;overflow:hidden}.sprig-accordion-header-container{background:transparent;border:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;cursor:pointer;margin:8px 0 0;padding:0;font-family:inherit}.sprig-header-label-container{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;flex:1 1 0}.sprig-header-label{color:#343442;font-size:15px;font-weight:590;line-height:21px;text-align:start;overflow:hidden}.sprig-check-background{flex:0 0 16px;height:16px;width:16px;border-radius:8px;margin-right:8px;background-color:#efefee;display:flex;align-items:center;justify-content:center}.sprig-check{height:9px;width:9px;margin-left:-1px}.sprig-check path{stroke:#506067;stroke-width:1.5}.sprig-caret{height:20px;width:20px;transition-property:transform}.sprig-caret path{stroke:#000}.ul-card-longform__submit-button-container{display:flex;justify-content:flex-end}.ul-card-longform__submit-button-container .ul-card-longform__submit-button{display:flex;flex-direction:row;align-items:center;white-space:nowrap;gap:4px;border-radius:8px;color:#fff;cursor:pointer}.ul-card-longform__submit-button-container .ul-card-longform__submit-button:disabled{opacity:.5;cursor:not-allowed}.ul-card-list-container--longform{display:flex;flex-direction:column;gap:2rem;width:100%;align-items:center;padding-block-start:calc(40vh - 100px);padding-block-end:calc(50vh - 100px);height:auto}@media (min-height: 1200px){.ul-card-list-container--longform{padding-block-start:calc(50vh - 100px)}}.ul-card-scroll-wrapper{width:100%;max-width:100vw;position:relative;display:flex;justify-content:center}.ul-card--unfocused{opacity:.3;transition:opacity .3s ease-in-out}.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--likert__labels>span:last-child{margin-left:auto;flex:1 1 auto;min-width:0;text-align:right}.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-card--matrix_grid_longform{width:100%}.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-rank__labels{font-size:14px;font-style:normal;font-weight:600;line-height:150%}.ul-card--rank__question-inner-container{padding:0 16px}.ul-card-rank__list{list-style-type:none;padding-inline-start:0;margin:4px 0}.ul-card-rank__option{display:flex;align-items:center;padding:8px;gap:8px;align-self:stretch;border:1px solid #e2e3e1;border-radius:8px;margin-bottom:4px}.ul-card-rank__option:last-child{margin-bottom:0}.ul-card-rank__drag-btn{display:inline-flex;align-items:center;justify-content:center;line-height:0;padding:0;width:25px;height:25px;margin-left:auto;color:#0b2330;cursor:grab;background:transparent;border:0}.ul-card-rank__drag-btn:active,.ul-card-rank__option:active{cursor:grabbing}.ul-card-rank__option svg{display:block}.ul-card-rank__option.is-dragging{opacity:1;box-shadow:0 8px 25px #00000026,0 3px 10px #0000001a;z-index:1000;background:#fff;border-color:#0b2330}.ul-card-rank__option.is-drop-target{background:#0b23301a;border-radius:8px;border-color:#0b23301a}.ul-card-rank__option.is-drop-target select,.ul-card-rank__option.is-drop-target span,.ul-card-rank__option.is-drop-target button{visibility:hidden}.ul-card-rank__option span{font-size:14px;font-weight:400}.ul-card-rank__select{appearance:none;-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;height:25px;min-height:25px;border:1px solid #E2E3E1;border-radius:4px;font-size:14px;line-height:1.4;padding:2px 28px 2px 8px;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='13' viewBox='0 0 12 13' fill='none'><path d='M9.75 5L6 8.75L2.25 5' stroke='%230B2330' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");background-repeat:no-repeat;background-position:right 8px center;background-size:12px 12px;background-color:#fff;cursor:pointer}.ul-card-rank__select.ul-card-rank__select--placeholder{color:#b0b5b7}.ul-card-text{margin-top:2px;margin-bottom:3px;display:flex;flex-direction:column;justify-content:center;padding:0;width:100%}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:#fff}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:-webkit-fill-available}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#fff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button:disabled>svg path,.ul-card-text__button.sprig-button-disabled>svg path{stroke:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:15px;justify-content:center;flex-direction:column}.select-button{align-items:center;background-color:transparent;border-radius:8px;border:1px solid #0b2330;box-shadow:0 0 0 2px #c8cccc;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:#f3f3f3}.select-button:active{background-color:#eee}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;padding:4px 0;z-index:100;background-color:#fff;border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:16px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:#f3f3f3}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}form{margin-block-end:0;margin-block-start:0}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:repeating-linear-gradient(120deg,#ebebeb,#ebebeb 24px,#fff 24px,#fff 48px);border-bottom:2px solid #ebebeb;display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;margin-top:auto;flex-grow:0;width:100%;min-height:10px;height:fit-content;flex-shrink:0}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:#00000003;border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:#00000008}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:#f9c600;border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%;height:0}.close-btn{cursor:pointer;height:16px;margin-inline-end:-10px;position:relative;top:-10px;width:16px;z-index:1;align-self:flex-start;justify-self:end;flex-shrink:0}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}.ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px}.ul-progress-bar-container__footer{max-width:250px;margin:16px 0}.ul-progress-bar-container__header{position:fixed;top:80px;max-width:unset;margin:0;z-index:3}.ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{align-self:stretch;background:#00000003;border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:0;height:fit-content;line-height:16.5px;margin:0 20px;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}`}),e.customStyles&&Y.setSurveyStyles({document:u,elementId:"ul-custom-style",styleString:e.customStyles,nonce:e.styleNonce}),e.fontFamily&&s&&parent){const y=u.createElement("link");y.rel="stylesheet",y.href=s,b.appendChild(y)}if(!m&&e.cards.some(y=>y.type==="recordedtask")){const y=u.createElement("script");y.src=e.upchunkLibraryURL??"https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js",y.onload=()=>{Ve.setUpChunk(h.UpChunk)},y.onerror=()=>{console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure")},b.appendChild(y)}const _=i||((k=d.eventEmitter)==null?void 0:k.emit);_==null||_("verify.view.version",{"view.version":"2.36.0"}),c&&t&&(Te(a(Oi,{}),c),H.eventEmitter.once(H.SprigEvent.SurveyClosed,()=>{jt(c)}))}};exports.default=Bi;
|