@sprig-technologies/sprig-bundled 2.48.1 → 2.48.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";const I=require("./index-BzHQzSxf.cjs");var he,x,sr,ee,ft,ir,$e,ar,me={},ur=[],mn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ee=Array.isArray;function Q(e,t){for(var r in t)e[r]=t[r];return e}function lr(e){var t=e.parentNode;t&&t.removeChild(e)}function U(e,t,r){var o,n,s,i={};for(s in t)s=="key"?o=t[s]:s=="ref"?n=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?he.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return fe(e,i,o,n,null)}function fe(e,t,r,o,n){var s={type:e,props:t,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:n??++sr,__i:-1,__u:0};return n==null&&x.vnode!=null&&x.vnode(s),s}function cr(){return{current:null}}function D(e){return e.children}function B(e,t){this.props=e,this.context=t}function ue(e,t){if(t==null)return e.__?ue(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?ue(e):null}function dr(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return dr(e)}}function We(e){(!e.__d&&(e.__d=!0)&&ee.push(e)&&!xe.__r++||ft!==x.debounceRendering)&&((ft=x.debounceRendering)||ir)(xe)}function xe(){var e,t,r,o,n,s,i,u,a;for(ee.sort($e);e=ee.shift();)e.__d&&(t=ee.length,o=void 0,s=(n=(r=e).__v).__e,u=[],a=[],(i=r.__P)&&((o=Q({},n)).__v=n.__v+1,x.vnode&&x.vnode(o),et(i,o,n,r.__n,i.ownerSVGElement!==void 0,32&n.__u?[s]:null,u,s??ue(n),!!(32&n.__u),a),o.__.__k[o.__i]=o,fr(u,o,a),o.__e!=s&&dr(o)),ee.length>t&&ee.sort($e));xe.__r=0}function pr(e,t,r,o,n,s,i,u,a,c,d){var l,f,p,b,m,y=o&&o.__k||ur,g=t.length;for(r.__d=a,function(_,C,k){var S,h,v,A,w,N=C.length,L=k.length,T=L,O=0;for(_.__k=[],S=0;S<N;S++)(h=_.__k[S]=(h=C[S])==null||typeof h=="boolean"||typeof h=="function"?null:typeof h=="string"||typeof h=="number"||typeof h=="bigint"||h.constructor==String?fe(null,h,null,null,h):Ee(h)?fe(D,{children:h},null,null,null):h.constructor===void 0&&h.__b>0?fe(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)!=null?(h.__=_,h.__b=_.__b+1,w=vn(h,k,A=S+O,T),h.__i=w,v=null,w!==-1&&(T--,(v=k[w])&&(v.__u|=131072)),v==null||v.__v===null?(w==-1&&O--,typeof h.type!="function"&&(h.__u|=65536)):w!==A&&(w===A+1?O++:w>A?T>N-A?O+=w-A:O--:O=w<A&&w==A-1?w-A:0,w!==S+O&&(h.__u|=65536))):(v=k[S])&&v.key==null&&v.__e&&(v.__e==_.__d&&(_.__d=ue(v)),Qe(v,v,!1),k[S]=null,T--);if(T)for(S=0;S<L;S++)(v=k[S])!=null&&!(131072&v.__u)&&(v.__e==_.__d&&(_.__d=ue(v)),Qe(v,v))}(r,t,y),a=r.__d,l=0;l<g;l++)(p=r.__k[l])!=null&&typeof p!="boolean"&&typeof p!="function"&&(f=p.__i===-1?me:y[p.__i]||me,p.__i=l,et(e,p,f,n,s,i,u,a,c,d),b=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&tt(f.ref,null,p),d.push(p.ref,p.__c||b,p)),m==null&&b!=null&&(m=b),65536&p.__u||f.__k===p.__k?a=_r(p,a,e):typeof p.type=="function"&&p.__d!==void 0?a=p.__d:b&&(a=b.nextSibling),p.__d=void 0,p.__u&=-196609);r.__d=a,r.__e=m}function _r(e,t,r){var o,n;if(typeof e.type=="function"){for(o=e.__k,n=0;o&&n<o.length;n++)o[n]&&(o[n].__=e,t=_r(o[n],t,r));return t}return e.__e!=t&&(r.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function G(e,t){return t=t||[],e==null||typeof e=="boolean"||(Ee(e)?e.some(function(r){G(r,t)}):t.push(e)),t}function vn(e,t,r,o){var n=e.key,s=e.type,i=r-1,u=r+1,a=t[r];if(a===null||a&&n==a.key&&s===a.type)return r;if(o>(a==null||131072&a.__u?0:1))for(;i>=0||u<t.length;){if(i>=0){if((a=t[i])&&!(131072&a.__u)&&n==a.key&&s===a.type)return i;i--}if(u<t.length){if((a=t[u])&&!(131072&a.__u)&&n==a.key&&s===a.type)return u;u++}}return-1}function mt(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||mn.test(t)?r:r+"px"}function Ce(e,t,r,o,n){var s;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)r&&t in r||mt(e.style,t,"");if(r)for(t in r)o&&r[t]===o[t]||mt(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")s=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+s]=r,r?o?r.u=o.u:(r.u=Date.now(),e.addEventListener(t,s?yt:vt,s)):e.removeEventListener(t,s?yt:vt,s);else{if(n)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]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function vt(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(x.event?x.event(e):e)}function yt(e){return this.l[e.type+!0](x.event?x.event(e):e)}function et(e,t,r,o,n,s,i,u,a,c){var d,l,f,p,b,m,y,g,_,C,k,S,h,v,A,w=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(a=!!(32&r.__u),s=[u=t.__e=r.__e]),(d=x.__b)&&d(t);e:if(typeof w=="function")try{if(g=t.props,_=(d=w.contextType)&&o[d.__c],C=d?_?_.props.value:d.__:o,r.__c?y=(l=t.__c=r.__c).__=l.__E:("prototype"in w&&w.prototype.render?t.__c=l=new w(g,C):(t.__c=l=new B(g,C),l.constructor=w,l.render=hn),_&&_.sub(l),l.props=g,l.state||(l.state={}),l.context=C,l.__n=o,f=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),w.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Q({},l.__s)),Q(l.__s,w.getDerivedStateFromProps(g,l.__s))),p=l.props,b=l.state,l.__v=t,f)w.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(w.getDerivedStateFromProps==null&&g!==p&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(g,C),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(g,l.__s,C)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(l.props=g,l.state=l.__s,l.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(N){N&&(N.__=t)}),k=0;k<l._sb.length;k++)l.__h.push(l._sb[k]);l._sb=[],l.__h.length&&i.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(g,l.__s,C),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(p,b,m)})}if(l.context=C,l.props=g,l.__P=e,l.__e=!1,S=x.__r,h=0,"prototype"in w&&w.prototype.render){for(l.state=l.__s,l.__d=!1,S&&S(t),d=l.render(l.props,l.state,l.context),v=0;v<l._sb.length;v++)l.__h.push(l._sb[v]);l._sb=[]}else do l.__d=!1,S&&S(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++h<25);l.state=l.__s,l.getChildContext!=null&&(o=Q(Q({},o),l.getChildContext())),f||l.getSnapshotBeforeUpdate==null||(m=l.getSnapshotBeforeUpdate(p,b)),pr(e,Ee(A=d!=null&&d.type===D&&d.key==null?d.props.children:d)?A:[A],t,r,o,n,s,i,u,a,c),l.base=t.__e,t.__u&=-161,l.__h.length&&i.push(l),y&&(l.__E=l.__=null)}catch(N){t.__v=null,a||s!=null?(t.__e=u,t.__u|=a?160:32,s[s.indexOf(u)]=null):(t.__e=r.__e,t.__k=r.__k),x.__e(N,t,r)}else s==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=yn(r.__e,t,r,o,n,s,i,a,c);(d=x.diffed)&&d(t)}function fr(e,t,r){t.__d=void 0;for(var o=0;o<r.length;o++)tt(r[o],r[++o],r[++o]);x.__c&&x.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(s){s.call(n)})}catch(s){x.__e(s,n.__v)}})}function yn(e,t,r,o,n,s,i,u,a){var c,d,l,f,p,b,m,y=r.props,g=t.props,_=t.type;if(_==="svg"&&(n=!0),s!=null){for(c=0;c<s.length;c++)if((p=s[c])&&"setAttribute"in p==!!_&&(_?p.localName===_:p.nodeType===3)){e=p,s[c]=null;break}}if(e==null){if(_===null)return document.createTextNode(g);e=n?document.createElementNS("http://www.w3.org/2000/svg",_):document.createElement(_,g.is&&g),s=null,u=!1}if(_===null)y===g||u&&e.data===g||(e.data=g);else{if(s=s&&he.call(e.childNodes),y=r.props||me,!u&&s!=null)for(y={},c=0;c<e.attributes.length;c++)y[(p=e.attributes[c]).name]=p.value;for(c in y)p=y[c],c=="children"||(c=="dangerouslySetInnerHTML"?l=p:c==="key"||c in g||Ce(e,c,null,p,n));for(c in g)p=g[c],c=="children"?f=p:c=="dangerouslySetInnerHTML"?d=p:c=="value"?b=p:c=="checked"?m=p:c==="key"||u&&typeof p!="function"||y[c]===p||Ce(e,c,p,y[c],n);if(d)u||l&&(d.__html===l.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(l&&(e.innerHTML=""),pr(e,Ee(f)?f:[f],t,r,o,n&&_!=="foreignObject",s,i,s?s[0]:r.__k&&ue(r,0),u,a),s!=null)for(c=s.length;c--;)s[c]!=null&&lr(s[c]);u||(c="value",b!==void 0&&(b!==e[c]||_==="progress"&&!b||_==="option"&&b!==y[c])&&Ce(e,c,b,y[c],!1),c="checked",m!==void 0&&m!==e[c]&&Ce(e,c,m,y[c],!1))}return e}function tt(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(o){x.__e(o,r)}}function Qe(e,t,r){var o,n;if(x.unmount&&x.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||tt(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(s){x.__e(s,t)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(n=0;n<o.length;n++)o[n]&&Qe(o[n],t,r||typeof e.type!="function");r||e.__e==null||lr(e.__e),e.__=e.__e=e.__d=void 0}function hn(e,t,r){return this.constructor(e,r)}function le(e,t,r){var o,n,s,i;x.__&&x.__(e,t),n=(o=typeof r=="function")?null:r&&r.__k||t.__k,s=[],i=[],et(t,e=(!o&&r||t).__k=U(D,null,[e]),n||me,me,t.ownerSVGElement!==void 0,!o&&r?[r]:n?null:t.firstChild?he.call(t.childNodes):null,s,!o&&r?r:n?n.__e:t.firstChild,o,i),fr(s,e,i)}function mr(e,t){le(e,t,mr)}function gn(e,t,r){var o,n,s,i,u=Q({},e.props);for(s in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)s=="key"?o=t[s]:s=="ref"?n=t[s]:u[s]=t[s]===void 0&&i!==void 0?i[s]:t[s];return arguments.length>2&&(u.children=arguments.length>3?he.call(arguments,2):r),fe(e.type,u,o||e.key,n||e.ref,null)}function rt(e,t){var r={__c:t="__cC"+ar++,__:e,Consumer:function(o,n){return o.children(n)},Provider:function(o){var n,s;return this.getChildContext||(n=[],(s={})[t]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(i){this.props.value!==i.value&&n.some(function(u){u.__e=!0,We(u)})},this.sub=function(i){n.push(i);var u=i.componentWillUnmount;i.componentWillUnmount=function(){n.splice(n.indexOf(i),1),u&&u.call(i)}}),o.children}};return r.Provider.__=r.Consumer.contextType=r}he=ur.slice,x={__e:function(e,t,r,o){for(var n,s,i;t=t.__;)if((n=t.__c)&&!n.__)try{if((s=n.constructor)&&s.getDerivedStateFromError!=null&&(n.setState(s.getDerivedStateFromError(e)),i=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,o||{}),i=n.__d),i)return n.__E=n}catch(u){e=u}throw e}},sr=0,B.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Q({},this.state),typeof e=="function"&&(e=e(Q({},r),this.props)),e&&Q(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),We(this))},B.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),We(this))},B.prototype.render=D,ee=[],ir=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$e=function(e,t){return e.__v.__b-t.__v.__b},xe.__r=0,ar=0;var bn=0;function R(e,t,r,o,n,s){var i,u,a={};for(u in t)u=="ref"?i=t[u]:a[u]=t[u];var c={type:e,props:a,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--bn,__i:-1,__u:0,__source:n,__self:s};if(typeof e=="function"&&(i=e.defaultProps))for(u in i)a[u]===void 0&&(a[u]=i[u]);return x.vnode&&x.vnode(c),c}var Z,P,Pe,ht,ce=0,vr=[],we=[],gt=x.__b,bt=x.__r,Ct=x.diffed,wt=x.__c,kt=x.unmount;function te(e,t){x.__h&&x.__h(P,e,ce||t),ce=0;var r=P.__H||(P.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:we}),r.__[e]}function J(e){return ce=1,nt(gr,e)}function nt(e,t,r){var o=te(Z++,2);if(o.t=e,!o.__c&&(o.__=[r?r(t):gr(void 0,t),function(u){var a=o.__N?o.__N[0]:o.__[0],c=o.t(a,u);a!==c&&(o.__N=[c,o.__[1]],o.__c.setState({}))}],o.__c=P,!P.u)){var n=function(u,a,c){if(!o.__c.__H)return!0;var d=o.__c.__H.__.filter(function(f){return f.__c});if(d.every(function(f){return!f.__N}))return!s||s.call(this,u,a,c);var l=!1;return d.forEach(function(f){if(f.__N){var p=f.__[0];f.__=f.__N,f.__N=void 0,p!==f.__[0]&&(l=!0)}}),!(!l&&o.__c.props===u)&&(!s||s.call(this,u,a,c))};P.u=!0;var s=P.shouldComponentUpdate,i=P.componentWillUpdate;P.componentWillUpdate=function(u,a,c){if(this.__e){var d=s;s=void 0,n(u,a,c),s=d}i&&i.call(this,u,a,c)},P.shouldComponentUpdate=n}return o.__N||o.__}function j(e,t){var r=te(Z++,3);!x.__s&&it(r.__H,t)&&(r.__=e,r.i=t,P.__H.__h.push(r))}function pe(e,t){var r=te(Z++,4);!x.__s&&it(r.__H,t)&&(r.__=e,r.i=t,P.__h.push(r))}function Y(e){return ce=5,X(function(){return{current:e}},[])}function yr(e,t,r){ce=6,pe(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function X(e,t){var r=te(Z++,7);return it(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ve(e,t){return ce=8,X(function(){return e},t)}function ot(e){var t=P.context[e.__c],r=te(Z++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(P)),t.props.value):e.__}function st(e,t){x.useDebugValue&&x.useDebugValue(t?t(e):e)}function hr(){var e=te(Z++,11);if(!e.__){for(var t=P.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Cn(){for(var e;e=vr.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ke),e.__H.__h.forEach(Ge),e.__H.__h=[]}catch(t){e.__H.__h=[],x.__e(t,e.__v)}}x.__b=function(e){P=null,gt&&gt(e)},x.__r=function(e){bt&&bt(e),Z=0;var t=(P=e.__c).__H;t&&(Pe===P?(t.__h=[],P.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=we,r.__N=r.i=void 0})):(t.__h.forEach(ke),t.__h.forEach(Ge),t.__h=[],Z=0)),Pe=P},x.diffed=function(e){Ct&&Ct(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(vr.push(t)!==1&&ht===x.requestAnimationFrame||((ht=x.requestAnimationFrame)||wn)(Cn)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==we&&(r.__=r.__V),r.i=void 0,r.__V=we})),Pe=P=null},x.__c=function(e,t){t.some(function(r){try{r.__h.forEach(ke),r.__h=r.__h.filter(function(o){return!o.__||Ge(o)})}catch(o){t.some(function(n){n.__h&&(n.__h=[])}),t=[],x.__e(o,r.__v)}}),wt&&wt(e,t)},x.unmount=function(e){kt&&kt(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(o){try{ke(o)}catch(n){t=n}}),r.__H=void 0,t&&x.__e(t,r.__v))};var St=typeof requestAnimationFrame=="function";function wn(e){var t,r=function(){clearTimeout(o),St&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(r,100);St&&(t=requestAnimationFrame(r))}function ke(e){var t=P,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),P=t}function Ge(e){var t=P;e.__c=e.__(),P=t}function it(e,t){return!e||e.length!==t.length||t.some(function(r,o){return r!==e[o]})}function gr(e,t){return typeof t=="function"?t(e):t}function br(e,t){for(var r in t)e[r]=t[r];return e}function Ze(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var o in t)if(o!=="__source"&&e[o]!==t[o])return!0;return!1}function Re(e){this.props=e}function Cr(e,t){function r(n){var s=this.props.ref,i=s==n.ref;return!i&&s&&(s.call?s(null):s.current=null),t?!t(this.props,n)||!i:Ze(this.props,n)}function o(n){return this.shouldComponentUpdate=r,U(e,n)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}(Re.prototype=new B).isPureReactComponent=!0,Re.prototype.shouldComponentUpdate=function(e,t){return Ze(this.props,e)||Ze(this.state,t)};var xt=x.__b;x.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xt&&xt(e)};var kn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function at(e){function t(r){var o=br({},r);return delete o.ref,e(o,r.ref||null)}return t.$$typeof=kn,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Rt=function(e,t){return e==null?null:G(G(e).map(t))},wr={map:Rt,forEach:Rt,count:function(e){return e?G(e).length:0},only:function(e){var t=G(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:G},Sn=x.__e;x.__e=function(e,t,r,o){if(e.then){for(var n,s=t;s=s.__;)if((n=s.__c)&&n.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),n.__c(e,t)}Sn(e,t,r,o)};var It=x.unmount;function kr(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),e.__c.__H=null),(e=br({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(o){return kr(o,t,r)})),e}function Sr(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(o){return Sr(o,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function ae(){this.__u=0,this.t=null,this.__b=null}function xr(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Le(e){var t,r,o;function n(s){if(t||(t=e()).then(function(i){r=i.default||i},function(i){o=i}),o)throw o;if(!r)throw t;return U(r,s)}return n.displayName="Lazy",n.__f=!0,n}function se(){this.u=null,this.o=null}x.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),It&&It(e)},(ae.prototype=new B).__c=function(e,t){var r=t.__c,o=this;o.t==null&&(o.t=[]),o.t.push(r);var n=xr(o.__v),s=!1,i=function(){s||(s=!0,r.__R=null,n?n(u):u())};r.__R=i;var u=function(){if(!--o.__u){if(o.state.__a){var a=o.state.__a;o.__v.__k[0]=Sr(a,a.__c.__P,a.__c.__O)}var c;for(o.setState({__a:o.__b=null});c=o.t.pop();)c.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(i,i)},ae.prototype.componentWillUnmount=function(){this.t=[]},ae.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=kr(this.__b,r,o.__O=o.__P)}this.__b=null}var n=t.__a&&U(D,null,e.fallback);return n&&(n.__u&=-33),[U(D,null,t.__a?null:e.children),n]};var At=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function xn(e){return this.getChildContext=function(){return e.context},e.children}function Rn(e){var t=this,r=e.i;t.componentWillUnmount=function(){le(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(o){this.childNodes.push(o),t.i.appendChild(o)},insertBefore:function(o,n){this.childNodes.push(o),t.i.appendChild(o)},removeChild:function(o){this.childNodes.splice(this.childNodes.indexOf(o)>>>1,1),t.i.removeChild(o)}}),le(U(xn,{context:t.context},e.__v),t.l)}function Rr(e,t){var r=U(Rn,{__v:e,i:t});return r.containerInfo=t,r}(se.prototype=new B).__a=function(e){var t=this,r=xr(t.__v),o=t.o.get(e);return o[0]++,function(n){var s=function(){t.props.revealOrder?(o.push(n),At(t,e,o)):n()};r?r(s):s()}},se.prototype.render=function(e){this.u=null,this.o=new Map;var t=G(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},se.prototype.componentDidUpdate=se.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){At(e,r,t)})};var Ir=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,In=/^(?: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]/,An=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,En=/[A-Z0-9]/g,Ln=typeof document<"u",Nn=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Ar(e,t,r){return t.__k==null&&(t.textContent=""),le(e,t),typeof r=="function"&&r(),e?e.__c:null}function Er(e,t,r){return mr(e,t),typeof r=="function"&&r(),e?e.__c:null}B.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(B.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Et=x.event;function Tn(){}function Pn(){return this.cancelBubble}function On(){return this.defaultPrevented}x.event=function(e){return Et&&(e=Et(e)),e.persist=Tn,e.isPropagationStopped=Pn,e.isDefaultPrevented=On,e.nativeEvent=e};var ut,Vn={enumerable:!1,configurable:!0,get:function(){return this.class}},Lt=x.vnode;x.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,o=t.type,n={};for(var s in r){var i=r[s];if(!(s==="value"&&"defaultValue"in r&&i==null||Ln&&s==="children"&&o==="noscript"||s==="class"||s==="className")){var u=s.toLowerCase();s==="defaultValue"&&"value"in r&&r.value==null?s="value":s==="download"&&i===!0?i="":u==="ondoubleclick"?s="ondblclick":u!=="onchange"||o!=="input"&&o!=="textarea"||Nn(r.type)?u==="onfocus"?s="onfocusin":u==="onblur"?s="onfocusout":An.test(s)?s=u:o.indexOf("-")===-1&&In.test(s)?s=s.replace(En,"-$&").toLowerCase():i===null&&(i=void 0):u=s="oninput",u==="oninput"&&n[s=u]&&(s="oninputCapture"),n[s]=i}}o=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=G(r.children).forEach(function(a){a.props.selected=n.value.indexOf(a.props.value)!=-1})),o=="select"&&n.defaultValue!=null&&(n.value=G(r.children).forEach(function(a){a.props.selected=n.multiple?n.defaultValue.indexOf(a.props.value)!=-1:n.defaultValue==a.props.value})),r.class&&!r.className?(n.class=r.class,Object.defineProperty(n,"className",Vn)):(r.className&&!r.class||r.class&&r.className)&&(n.class=n.className=r.className),t.props=n}(e),e.$$typeof=Ir,Lt&&Lt(e)};var Nt=x.__r;x.__r=function(e){Nt&&Nt(e),ut=e.__c};var Tt=x.diffed;x.diffed=function(e){Tt&&Tt(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),ut=null};var Lr={ReactCurrentDispatcher:{current:{readContext:function(e){return ut.__n[e.__c].props.value}}}};function Nr(e){return U.bind(null,e)}function ge(e){return!!e&&e.$$typeof===Ir}function Tr(e){return ge(e)&&e.type===D}function Pr(e){return ge(e)?gn.apply(null,arguments):e}function Ie(e){return!!e.__k&&(le(null,e),!0)}function Or(e){return e&&(e.base||e.nodeType===1&&e)||null}var Vr=function(e,t){return e(t)},qr=function(e,t){return e(t)},Mr=D;function lt(e){e()}function Ur(e){return e}function Hr(){return[!1,lt]}var jr=pe,Dr=ge;function Fr(e,t){var r=t(),o=J({h:{__:r,v:t}}),n=o[0].h,s=o[1];return pe(function(){n.__=r,n.v=t,Oe(n)&&s({h:n})},[e,r,t]),j(function(){return Oe(n)&&s({h:n}),e(function(){Oe(n)&&s({h:n})})},[e]),r}function Oe(e){var t,r,o=e.v,n=e.__;try{var s=o();return!((t=n)===(r=s)&&(t!==0||1/t==1/r)||t!=t&&r!=r)}catch{return!0}}var Br={useState:J,useId:hr,useReducer:nt,useEffect:j,useLayoutEffect:pe,useInsertionEffect:jr,useTransition:Hr,useDeferredValue:Ur,useSyncExternalStore:Fr,startTransition:lt,useRef:Y,useImperativeHandle:yr,useMemo:X,useCallback:ve,useContext:ot,useDebugValue:st,version:"17.0.2",Children:wr,render:Ar,hydrate:Er,unmountComponentAtNode:Ie,createPortal:Rr,createElement:U,createContext:rt,createFactory:Nr,cloneElement:Pr,createRef:cr,Fragment:D,isValidElement:ge,isElement:Dr,isFragment:Tr,findDOMNode:Or,Component:B,PureComponent:Re,memo:Cr,forwardRef:at,flushSync:qr,unstable_batchedUpdates:Vr,StrictMode:Mr,Suspense:ae,SuspenseList:se,lazy:Le,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Lr};const qn=Object.freeze(Object.defineProperty({__proto__:null,Children:wr,Component:B,Fragment:D,PureComponent:Re,StrictMode:Mr,Suspense:ae,SuspenseList:se,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Lr,cloneElement:Pr,createContext:rt,createElement:U,createFactory:Nr,createPortal:Rr,createRef:cr,default:Br,findDOMNode:Or,flushSync:qr,forwardRef:at,hydrate:Er,isElement:Dr,isFragment:Tr,isValidElement:ge,lazy:Le,memo:Cr,render:Ar,startTransition:lt,unmountComponentAtNode:Ie,unstable_batchedUpdates:Vr,useCallback:ve,useContext:ot,useDebugValue:st,useDeferredValue:Ur,useEffect:j,useErrorBoundary:function(e){var t=te(Z++,10),r=J();return t.__=e,P.componentDidCatch||(P.componentDidCatch=function(o,n){t.__&&t.__(o,n),r[1](o)}),[r[0],function(){r[1](void 0)}]},useId:hr,useImperativeHandle:yr,useInsertionEffect:jr,useLayoutEffect:pe,useMemo:X,useReducer:nt,useRef:Y,useState:J,useSyncExternalStore:Fr,useTransition:Hr,version:"17.0.2"},Symbol.toStringTag,{value:"Module"})),Pt=e=>{let t;const r=new Set,o=(i,u)=>{const a=typeof i=="function"?i(t):i;if(!Object.is(a,t)){const c=t;t=u??typeof a!="object"?a:Object.assign({},t,a),r.forEach(d=>d(t,c))}},n=()=>t,s={setState:o,getState:n,subscribe:i=>(r.add(i),()=>r.delete(i)),destroy:()=>r.clear()};return t=e(o,n,s),s};function Mn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Un(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}),r}var Ot={exports:{}},Ve={};const $r=Un(qn);var Vt,qt,Mt,Ut,Ht={exports:{}},qe={};function Hn(){return qt||(qt=1,Ht.exports=function(){if(Vt)return qe;Vt=1;var e=$r,t=typeof Object.is=="function"?Object.is:function(a,c){return a===c&&(a!==0||1/a==1/c)||a!=a&&c!=c},r=e.useState,o=e.useEffect,n=e.useLayoutEffect,s=e.useDebugValue;function i(a){var c=a.getSnapshot;a=a.value;try{var d=c();return!t(a,d)}catch{return!0}}var u=typeof window>"u"||window.document===void 0||window.document.createElement===void 0?function(a,c){return c()}:function(a,c){var d=c(),l=r({inst:{value:d,getSnapshot:c}}),f=l[0].inst,p=l[1];return n(function(){f.value=d,f.getSnapshot=c,i(f)&&p({inst:f})},[a,d,c]),o(function(){return i(f)&&p({inst:f}),a(function(){i(f)&&p({inst:f})})},[a]),s(d),d};return qe.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,qe}()),Ht.exports}var jn=(Ut||(Ut=1,Ot.exports=function(){if(Mt)return Ve;Mt=1;var e=$r,t=Hn(),r=typeof Object.is=="function"?Object.is:function(a,c){return a===c&&(a!==0||1/a==1/c)||a!=a&&c!=c},o=t.useSyncExternalStore,n=e.useRef,s=e.useEffect,i=e.useMemo,u=e.useDebugValue;return Ve.useSyncExternalStoreWithSelector=function(a,c,d,l,f){var p=n(null);if(p.current===null){var b={hasValue:!1,value:null};p.current=b}else b=p.current;p=i(function(){function y(S){if(!C){if(C=!0,g=S,S=l(S),f!==void 0&&b.hasValue){var h=b.value;if(f(h,S))return _=h}return _=S}if(h=_,r(g,S))return h;var v=l(S);return f!==void 0&&f(h,v)?h:(g=S,_=v)}var g,_,C=!1,k=d===void 0?null:d;return[function(){return y(c())},k===null?void 0:function(){return y(k())}]},[c,d,l,f]);var m=o(a,p[0],p[1]);return s(function(){b.hasValue=!0,b.value=m},[m]),u(m),m},Ve}()),Ot.exports);const Dn=Mn(jn),{useSyncExternalStoreWithSelector:Fn}=Dn,jt=e=>{const t=typeof e=="function"?(o=>o?Pt(o):Pt)(e):e,r=(o,n)=>function(s,i=s.getState,u){const a=Fn(s.subscribe,s.getState,s.getServerState||s.getState,i,u);return st(a),a}(t,o,n);return Object.assign(r,t),r},Wr=e=>e?jt(e):jt;var Qr=(e=>(e.RIGHT="right",e.LEFT="left",e))(Qr||{});const Me=e=>e!=null&&typeof e=="object"&&typeof Reflect.get(e,"taskStatus")=="string",Dt=e=>e!=null&&typeof e=="object"&&!Array.isArray(e)&&Object.values(e).every(t=>t===null||typeof t=="string"),Ft=e=>e!=null&&typeof e=="object"&&!Array.isArray(e)&&Object.values(e).every(t=>t===null||typeof t=="number"),Bt=e=>Array.isArray(e)&&e.every(t=>Array.isArray(t)&&t.every(r=>{if(typeof r!="object"||r===null)return!1;const o=Reflect.get(r,"selected");return o==="left"||o==="right"||o===null})),Ke=(e,t)=>{const{allowUndefined:r=!0,rejectBooleanRecord:o=!1}=t??{};if(e===void 0)return r;if(e===null||typeof e=="string"||typeof e=="number"||Array.isArray(e))return!0;if(typeof e=="object"&&e!==null){if(o){const n=Object.values(e);if(n.length>0&&n.every(s=>typeof s=="boolean"))return!1}return!0}return!1},ze=(e,t)=>{var r;if(t===null)return null;if(e.type==="texturlprompt")return(o=>o===void 0||typeof o=="object"&&o!==null&&"skipped"in o)(t)?t:void 0;if(t===void 0)return null;if(e.type==="consentlegal")return typeof t=="object"&&"submitted"in t&&t.submitted===!0?t:null;if(e.type==="multipleselect"){const o=(r=e.props)==null?void 0:r.options;if(Array.isArray(o)&&(n=>typeof n=="object"&&n!==null&&!Array.isArray(n)&&Object.values(n).every(s=>typeof s=="boolean"))(t)){const n=t;return o.reduce((s,i)=>(n[String(i.id)]&&s.push(i.value),s),[])}}if(e.type==="multiplechoice"){if(typeof t=="object"&&t!==null&&!Array.isArray(t)){if(Object.keys(t).length===0)return null;const o=Object.values(t).find(n=>n!==!1&&n!==void 0);if(o!==void 0)return o}return Ke(t,{allowUndefined:!1,rejectBooleanRecord:!0})?t:null}return Ke(t,{allowUndefined:!1,rejectBooleanRecord:!0})?t:null},Bn=/<piped-value\b([^>]*)>.*?<\/piped-value>/gis,$t=["questionHtml","captionHtml","footerHtml","richTextBody"],Je=e=>!!e.props&&typeof e.props=="object"&&"properties"in e.props,Ue=e=>!!e.props&&typeof e.props=="object"&&"options"in e.props&&Array.isArray(e.props.options),Wt=e=>["string","number"].includes(typeof e),Qt=e=>e.length===0?"":e.length===1?e[0]:e.join(", "),$n=e=>{var r,o;const t=(n=>n!=null&&typeof n=="object"&&"value"in n)(e)?e.value:void 0;if(t!=null){if(e.type==="multipleselect"&&Ue(e)&&(n=>!!n&&typeof n=="object"&&!Array.isArray(n))(t)){const n=e.secondaryValue??null,s=e.props.options.filter(i=>t[String(i.id)]===!0).map(i=>{var u;return i.label+((u=n==null?void 0:n[String(i.id)])!=null&&u.userText?`: ${n[String(i.id)].userText}`:"")});return s.length?Qt(s):"No options selected"}if(e.type==="multiplechoice"&&typeof t=="object"&&t!==null){const n=Object.keys(t);if(n.length===0)return"No options selected";const s=e.secondaryValue??null,i=n[0];if(i){const u=e.props.options.find(a=>String(a.id)===i);return(u==null?void 0:u.label)+((r=s==null?void 0:s[i])!=null&&r.userText?`: ${(o=s==null?void 0:s[i])==null?void 0:o.userText}`:"")}}if(e.type==="matrix"&&Ue(e)&&(n=>{if(!Je(n))return!1;const s=n.props.properties;return!!s&&typeof s=="object"&&"matrixColumn"in s})(e)){const n=e.props.options,s=e.props.properties.matrixColumn,i=[];for(const[u,a]of Object.entries(t)){const c=n.find(b=>String(b.id)===u),d=(c==null?void 0:c.label)??u,l=Wt(a)?String(a):JSON.stringify(a),f=s.find(b=>b.value===l),p=(f==null?void 0:f.label)??l;i.push(`${d}: ${p}`)}return i.join("; ")}if(e.type==="rankorder"&&Ue(e)){const n=e.props.options.reduce((i,u)=>(i[String(u.id)]=u.label,i),{}),s=[];for(const[i,u]of Object.entries(t)){const a=n[i];a&&(s[u-1]=a)}return Qt(s)}if(Wt(t)){const n=String(t).replaceAll(/[\u200B-\u200D\uFEFF]/g,"").trim();return n===""?void 0:n}try{return JSON.stringify(t)}catch{return String(t)}}},Gt=(e,t)=>{const r=new RegExp(`${t}="([^"]*)"`,"i").exec(e);return(r==null?void 0:r[1])??null},Wn=(e,t)=>{if(e==null)return e;let r=!1;const o=e.replace(Bn,(n,s)=>{r=!0;const i=Gt(s,"answer-id"),u=Gt(s,"fallback-text")??"";if(!i)return u;const a=i.startsWith("attr-")?i:Number(i);if(Object.hasOwn(t,a)){const c=t[a];return String(c)}return u});return r?o:e},Ye=(e,t)=>{const r={};if(t)for(const[o,n]of Object.entries(t))typeof n=="string"?r[`attr-${o}`]=n:n!=null&&(r[`attr-${o}`]=JSON.stringify(n));for(const o of e){const n=$n(o);n!==void 0&&(r[o.name]=n)}return r},Qn=(e,t,r)=>{switch(t){case"videovoice":return!!(e!=null&&e.value);case"open":return!!r;case"multipleselect":return!!(r&&Object.keys(r).length);case"recordedtask":return r!==null&&typeof r=="object"&&"taskStatus"in r&&r.taskStatus==="completed";case"texturlprompt":return!e.value;case"consentlegal":case"nps":case"likert":return r!==null;case"multiplechoice":return r!==void 0;case"matrix":return!!(r&&Object.values(r).every(o=>o!==null));default:return!0}},Gr=(e,t)=>{if(t==="matrix"&&e&&typeof e=="object"){const r=Object.keys(e).length,o=Object.values(e).filter(n=>n!==null).length;return o>0&&o<r}return!1},Ae=e=>e==null?"":typeof e=="object"?JSON.stringify(e):typeof e=="string"?e:String(e),ie={eq:(e,t)=>Number(e)===Number(t),neq:(e,t)=>!ie.eq(e,t),gt:(e,t)=>Number(e)>Number(t),gte:(e,t)=>Number(e)>=Number(t),lt:(e,t)=>Number(e)<Number(t),lte:(e,t)=>Number(e)<=Number(t),list_exact(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;const r=(o,n)=>String(o).localeCompare(String(n));return e.slice().sort(r).join(",")===t.slice().sort(r).join(",")},list_all:(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&!t.some(r=>!e.includes(r)),list_alo(e,t){if(!Array.isArray(t))return!1;const r=Array.isArray(e)?e:[e],o=new Set(r);return t.some(n=>o.has(n))},list_dni(e,t){if(!Array.isArray(t))return!1;const r=Array.isArray(e)?e:[e],o=new Set(r);return t.every(n=>!o.has(n))},contains(e,t){const r=Ae(e).toLowerCase(),o=Ae(t).toLowerCase();return r.includes(o)},notcontains:(e,t)=>!ie.contains(e,t)},ct=(e,t,r)=>r>0?t?e.length-3:e.length-2:t?e.length-2:e.length-1,ye={eq:(e,t)=>e==t,neq:(e,t)=>!ye.eq(e,t),gt:(e,t)=>Number(e)>Number(t),gte:(e,t)=>Number(e)>=Number(t),lt:(e,t)=>Number(e)<Number(t),lte:(e,t)=>Number(e)<=Number(t),list_exact(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;const r=(o,n)=>String(o).localeCompare(String(n));return e.slice().sort(r).join(",")===t.slice().sort(r).join(",")},list_all:(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&!t.some(r=>!e.includes(r)),list_alo(e,t){if(!Array.isArray(t))return!1;const r=Array.isArray(e)?e:[e],o=new Set(r);return t.some(n=>o.has(n))},list_dni(e,t){if(!Array.isArray(t))return!1;const r=Array.isArray(e)?e:[e],o=new Set(r);return t.every(n=>!o.has(n))},contains(e,t){const r=String(e??"").toLowerCase(),o=String(t??"").toLowerCase();return r.includes(o)},notcontains:(e,t)=>!ye.contains(e,t)},Gn=e=>e in ye,Ne=1,Zr=2,Zn=e=>{var o,n,s;switch(e.type){case"multipleselect":return e&&e.props&&e.props.options?e.props.options.length>13?e.props.options.map(i=>[i.value]):(t=e.props.options.map(i=>i.value),r=!e.props.properties.required,t.reduce((i,u)=>i.concat(i.map(a=>[...a,u])),[[]]).filter(i=>r||i.length>0)):null;case"multiplechoice":{if(!e||!e.props||!e.props.options)return null;const i=e.props.options.map(u=>u.value);return e.props.properties.required||i.push(void 0),i}case"matrix":{if(!((o=e==null?void 0:e.props)!=null&&o.options))return null;const i=e.props.properties.matrixColumn,u=e.props.options,a=u.reduce((d,l)=>(d[l.id]=null,d),{}),c=[{...a,[u[0].id]:i[0].value},u.reduce((d,l)=>(d[l.id]=i[0].value,d),{})];return e.props.properties.required||c.push(a),c}case"likert":{const i=Number((s=(n=e.props)==null?void 0:n.properties)==null?void 0:s.range)||5;return[...Array.from(new Array(i).keys()).map(a=>a+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 i=[{taskStatus:"completed"},{taskStatus:"given.up"}];return e.props.properties.required||i.push({taskStatus:"abandoned"}),i}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,r},Kn=e=>typeof e=="object"&&e!==null&&"taskStatus"in e,zn=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&"comparator"in e&&"questionIndex"in e,Kr=(e,t)=>{const r=[];for(const o of e)Array.isArray(o)?r.push(...Kr(o,t)):zn(o)&&o.questionIndex===t&&r.push(o);return r},Jn=(e,t=[])=>t.reduce((r,o)=>{const{group:n,target:s}=o;if(!(n!=null&&n.length))return[...r];const i=Kr(n,e).map(u=>{const{comparator:a,value:c}=u;return{comparator:a,target:s,value:c}});return[...r,...i]},[]),zr=({cards:e,index:t,hasEndCard:r,allResponses:o,uploadProgress:n={},surveyVisitorAttributes:s={}})=>{var d;if(t>=e.length||t<0)return null;let i=t+1;const u=e[t].props.routingOptions||[];for(const l of u){if(!Jr(l))continue;const{group:f,target:p}=l;if(en({group:f,allResponses:o,cards:e,surveyVisitorAttributes:s})){i=p===-1&&r?e.length-1:p;break}}const a=e.findIndex(l=>l.type==="uploading"),c=ct(e,r,a);for(;i!==null&&i!==-1&&i<=c;){const l=e[i],f=((d=l==null?void 0:l.props)==null?void 0:d.displayLogic)||[];if(f.length>0&&!dt({displayLogic:f,allResponses:o,cards:e,surveyVisitorAttributes:s})){i++;continue}if(l!=null&&l.parentId){const p=e.findIndex(b=>b.name===l.parentId);if(p>-1){const b=e[p],m=o[p],y=de({comparator:"answered",type:b.type,response:m}),g=b.type==="matrix"&&de({comparator:"partial",type:b.type,response:m});if(!(y||g)){i++;continue}}}break}return t>=c||i===-1||i!==null&&i>c?a>0&&Object.values(n).some(f=>f.isSubmitted&&!f.isComplete)?a:r?e.length-1:null:i===-1?null:i},Jr=e=>typeof e=="object"&&e!==null&&"group"in e,Yr=e=>e===Ne||e===Zr,Zt=({segment:e,allResponses:t,cards:r,surveyVisitorAttributes:o})=>Array.isArray(e)?Xr({segments:e,allResponses:t,cards:r,surveyVisitorAttributes:o}):!Yr(e)&&!!(n=>typeof n=="object"&&n!==null&&!Array.isArray(n)&&"comparator"in n)(e)&&(({rule:n,allResponses:s,cards:i,surveyVisitorAttributes:u})=>{if(n.questionIndex===void 0||typeof n.questionIndex=="number"&&n.questionIndex>=s.length)return!1;const a=(({rule:c,allResponses:d,cards:l,surveyVisitorAttributes:f})=>{if(c.questionIndex===void 0)return null;if(typeof(p=c.questionIndex)=="string"&&p.startsWith("attr-")){const m=(y=>y.slice(5))(c.questionIndex);return m in f?{response:f[m],type:"AttributeCheck"}:null}var p;const b=c.questionIndex;return{response:d[b],type:l[b].type}})({rule:n,allResponses:s,cards:i,surveyVisitorAttributes:u});return a!==null&&!!de({comparator:n.comparator,response:a.response,type:a.type,value:n.value})})({rule:e,allResponses:t,cards:r,surveyVisitorAttributes:o}),Xr=({segments:e,allResponses:t,cards:r,surveyVisitorAttributes:o})=>{if(!e||e.length===0)return!1;let n=Zt({segment:e[0],allResponses:t,cards:r,surveyVisitorAttributes:o}),s=1;for(;s<e.length;){const i=e[s];if(!Yr(i)||(s+=1,s>=e.length))return!1;const u=Zt({segment:e[s],allResponses:t,cards:r,surveyVisitorAttributes:o});s+=1,n=i===Ne?n&&u:n||u}return n},dt=({displayLogic:e,allResponses:t,cards:r,surveyVisitorAttributes:o})=>e.some(n=>!!Jr(n)&&en({group:n.group,allResponses:t,cards:r,surveyVisitorAttributes:o})),en=({group:e,allResponses:t,cards:r,surveyVisitorAttributes:o})=>Xr({segments:e,allResponses:t,cards:r,surveyVisitorAttributes:o}),de=({comparator:e,response:t,type:r,value:o})=>{if(r==="AttributeCheck")return((s,i,u)=>{const a=Ae(i),c=Ae(u),d=Number(i),l=Number(u),f=!Number.isNaN(d)&&a===String(d),p=!Number.isNaN(l)&&c===String(l),b=f&&p;switch(s){case"eq":return b?d===l:a.toLowerCase()===c.toLowerCase();case"neq":return b?d!==l:a.toLowerCase()!==c.toLowerCase();case"contains":case"notcontains":return ie[s](a,c);case"gt":case"gte":case"lt":case"lte":return b?ie[s](d,l):ie[s](a.localeCompare(c),0);case"list_exact":case"list_all":case"list_alo":case"list_dni":{const m=Array.isArray(i)?i:[i],y=Array.isArray(u)?u:[u];return ie[s](m,y)}default:return!1}})(e,t,o);if(!Ke(t))return!1;const n=t;if(e==="answered")switch(r){case"texturlprompt":return n===void 0;case"consentlegal":return n&&(s=>s===null||s!==void 0&&typeof s=="object"&&"submitted"in s&&typeof s.submitted=="boolean")(n)&&n.submitted===!0;case"recordedtask":return Me(n)&&n.taskStatus==="completed";case"likert":case"nps":return Number.isInteger(n);case"rankorder":return Ft(n)&&Object.values(n).every(s=>s!==null);case"matrix":return Dt(n)&&Object.values(n).every(s=>s!==null);case"maxdiff":return Bt(n)&&n.every(s=>{if(!Array.isArray(s))return!1;const i=s.some(a=>a.selected==="left"),u=s.some(a=>a.selected==="right");return i&&u});case"multiplechoice":return!!n;case"multipleselect":return n&&Array.isArray(n)&&(n.length??0)>0;case"open":case"aidynamicstandalone":return typeof n=="string"&&!!n;case"videovoice":return(s=>s!=null&&typeof s=="object"&&"mediaRecordingUid"in s&&typeof s.mediaRecordingUid=="string")(n)&&!!n.mediaRecordingUid;default:return!1}if(e==="given_up")return r!=="recordedtask"||Me(n)&&n.taskStatus==="given.up";if(e==="partial")return Gr(n,r);if(e==="skipped")switch(r){case"texturlprompt":return(s=>s!==null&&(s===void 0||typeof s=="object"))(n)&&!!(typeof n=="object"&&n!==null&&"skipped"in n&&n.skipped);case"consentlegal":case"likert":case"nps":case"videovoice":return n===null;case"recordedtask":return Me(n)&&n.taskStatus==="abandoned";case"open":case"aidynamicstandalone":return n===null||typeof n=="string"&&n.length===0;case"multiplechoice":return n==null;case"multipleselect":return n===null||Array.isArray(n)&&n.length===0;case"matrix":return n===null||Dt(n)&&Object.values(n).every(s=>s===null);case"maxdiff":return n===null||!Bt(n)||n.some(s=>{if(!Array.isArray(s))return!0;const i=s.some(a=>a.selected==="left"),u=s.some(a=>a.selected==="right");return!(i&&u)});case"rankorder":return n===null||Ft(n)&&Object.values(n).includes(null);default:return!1}return o!==void 0&&ye[e](n,o)};var tn=(e=>(e.CONTINUE="CONTINUE",e.EXTERNAL="EXTERNAL",e.NO_BUTTON="NO_BUTTON",e))(tn||{}),z=(e=>(e.failure="failure",e.success="success",e.inFlight="inFlight",e))(z||{}),rn=(e=>(e.Unlimited="Unlimited",e.Maximum="Maximum",e.Range="Range",e))(rn||{});const Yn=e=>{var t,r,o,n,s,i,u,a,c;switch(e.type){case"rankorder":case"multipleselect":case"multiplechoice":return(r=(t=e==null?void 0:e.props)==null?void 0:t.options)==null?void 0:r.map(d=>d.label);case"nps":return"1-10";case"likert":return`1-${((n=(o=e==null?void 0:e.props)==null?void 0:o.properties)==null?void 0:n.range)??5}`;case"matrix":return{matrixColumns:(u=(i=(s=e==null?void 0:e.props)==null?void 0:s.properties)==null?void 0:i.matrixColumn)==null?void 0:u.map(d=>d.label),matrixRows:(c=(a=e==null?void 0:e.props)==null?void 0:a.options)==null?void 0:c.map(d=>d.label)};default:return}},Xn=new Set(["rankorder","multipleselect","multiplechoice","matrix","likert","nps","open","aidynamicfollowup","aidynamicstandalone"]),Kt=({cards:e,combinedReadableRawResponses:t,targetQuestionId:r,generateQuestionType:o})=>{let n=1,s=1;const i=e.reduce((u,a)=>{if(a.name>0&&Xn.has(a.type)){if(r===a.name&&(s=n,o==="aidynamicstandalone"))return n++,u;if((a.type==="aidynamicfollowup"||a.type==="aidynamicstandalone")&&a.props.loading!==z.success)return u;const c="properties"in a.props&&a.props.properties&&"captionText"in a.props.properties?a.props.properties.captionText:void 0,d=(l=>l.type!=="uploading"&&l.type!=="thanks")(a)?{order:n++,question:a.props.message,questionDescription:c,questionType:a.type,response:t==null?void 0:t[a.name],options:Yn(a)}:{order:n++,questionType:a.type,response:t==null?void 0:t[a.name]};u.push(d)}return u},[]);return{targetQuestionOrder:s,questionsResponses:i}},zt=e=>{var t;return"props"in e&&"loading"in e.props&&((t=e==null?void 0:e.props)==null?void 0:t.loading)!==void 0},He=(e,t,r)=>{let o=!1;const n=e.map(s=>s&&s.parentId===t?(o=!0,r(s)):s);return o?n:e},je=(e,t,r)=>{let o=!1;const n=e.map(s=>s&&s.name===t?(o=!0,r(s)):s);return o?n:e},Jt=e=>{const{props:t}=e;return t&&"message"in t&&"properties"in t?{...e,props:{...t,loading:z.inFlight}}:e},Yt=({isPreview:e,apiURL:t,envId:r,userId:o,headers:n})=>e?{url:`${t}/sdk/1/environments/${r}/dynamic-question-preview`,visitorIdHeader:"0"}:{url:`${t}/sdk/1/environments/${r}/visitors/${o}/dynamic-question`,visitorIdHeader:n["x-ul-visitor-id"]},eo=(e,t)=>{const r=t[e];return typeof r!="number"?null:r},nn=(e,t)=>Array.isArray(e)?e.map(r=>nn(r,t)):(r=>typeof r=="object"&&r!==null&&!Array.isArray(r)&&"questionUid"in r)(e)?{...e,questionIndex:eo(e.questionUid,t)}:e,to=e=>e===Ne||e===Zr,Xt=({segment:e,allResponses:t,cards:r,currentIndex:o})=>Array.isArray(e)?on({constraintGroup:e,allResponses:t,cards:r,currentIndex:o}):typeof e!="number"&&!!(n=>typeof n=="object"&&n!==null&&!Array.isArray(n)&&"questionIndex"in n)(e)&&(({constraint:n,allResponses:s,cards:i,currentIndex:u})=>{const{questionIndex:a}=n;if(a===null)return!1;if(!Object.hasOwn(s,a))return!(u>a)||n.comparisonType==="skipped";const c=i[a];return c!==void 0&&!!de({comparator:n.comparisonType,response:s[a],type:c.type,value:n.value})})({constraint:e,allResponses:t,cards:r,currentIndex:o}),on=({constraintGroup:e,allResponses:t,cards:r,currentIndex:o})=>{if(e.length===0)return!1;let n=Xt({segment:e[0],allResponses:t,cards:r,currentIndex:o}),s=1;for(;s<e.length;){const i=e[s];if(typeof i!="number"||!to(i)||(s+=1,s>=e.length))return!1;const u=Xt({segment:e[s],allResponses:t,cards:r,currentIndex:o});s+=1,n=i===Ne?n&&u:n||u}return n},sn=e=>e.length>0&&e.every(t=>t.quotaFilled||!t.quotaMatched),ro=({quotas:e,quotaMessages:t})=>{if(e.length!==0)return e.every(r=>!r.quotaMatched)?t==null?void 0:t.disqualified:sn(e)?t==null?void 0:t.filled:void 0},er=e=>200+90*e+16*e,De=new Set(["thanks","uploading"]),$=Wr()((e,t)=>({providerPersona:void 0,showProviderPersona:!1,addResponseGroupMeta:void 0,allResponses:[],allResponsesRaw:{},answers:void 0,apiURL:"",avatars:{agentAvatar:{"1x":"","2x":""},respondentAvatar:{"1x":"","2x":""}},border:"#2f2e2c",cards:[],cardIndexByName:{},quotaEndcardText:void 0,quotaMessages:void 0,quotas:[],close:async(r=I.APP_ID)=>{const o=t(),{fadeout:n,remove:s,trackHistory:i,studyType:u}=o;await n(r),Fe(o)||i({event:"closed"}),I.breadcrumbsLogger.info("SurveyClosing",{surveyId:o.surveyId}),I.ConflictingWidgets.enable(),s({initiator:I.DismissReason.Closed,studyType:u})},configureExitOnOverlayClick:()=>{},customMetadata:{},destroy:async r=>{const{eventEmitFn:o,fadeout:n,remove:s,studyType:i,surveyId:u}=t();o("survey.complete",u),await n(r),I.ConflictingWidgets.enable(),s({initiator:I.DismissReason.Complete,studyType:i})},enableCspTrustedTypes:!1,endCard:{headline:""},envId:"",eventEmitFn:I.eventEmitter.emit.bind(I.eventEmitter),fadeout:async r=>{const{eventEmitFn:o,headers:n,viewDocument:s}=t();return I.shouldDirectEmbed(n)?Promise.resolve():(o(I.SprigEvent.SurveyFadingOut),new Promise(i=>{const u=s.getElementById(r);u?(u.addEventListener("transitionend",()=>{i()}),u.classList.remove("ul-app--visible")):i()}))},forceBrandedLogo:!1,frame:document.createElement("iframe"),handleClickEmbedButton:r=>{const{cards:o,eventEmitFn:n,index:s}=t();n(r,{qid:o[s].name,props:o[s].props}),e(()=>({hasViewedEmbed:!0}))},handleUploadUpdate:({mediaRecordingUid:r,isComplete:o,progressPct:n,isSubmitted:s})=>{var p,b,m;const{cards:i,destroy:u,index:a,uploadProgress:c}=t(),d=o||((p=c[r])==null?void 0:p.isComplete),l={...c,[r]:{progressPct:d?100:n||((b=c[r])==null?void 0:b.progressPct),isComplete:d,isSubmitted:s||((m=c[r])==null?void 0:m.isSubmitted)}};if(e({uploadProgress:l}),i[a].type!=="uploading")return;const f=Object.entries(c).every(([y,g])=>!g.isSubmitted||g.isComplete||r==y&&o);if(f&&a>=i.length-1)return u(I.APP_ID);e({index:f?a+1:a,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,isConversationalUI:!1,isPreview:!1,layout:"default",marketingUrl:"https://sprig.com",meta:{ch:0,cw:0,l:"",mode:null,p:"",sh:0,sw:0},mode:void 0,next:r=>{const{allResponses:o,cards:n,eventEmitFn:s,index:i,quotaMessages:u,quotas:a,responseGroupUid:c,submit:d,trackHistory:l,uploadProgress:f,viewedCardCount:p}=t(),b=Array.isArray(r.data)?r.data:[r.data],m=Date.now(),y=[...n],g={response:[],responseGroupUid:c,questionIndex:i};let _=null;const C=o.slice(0);let k=i;b.forEach((A,w)=>{const N=Math.floor(A.questionId),L=y.findIndex(M=>M.name===N),T=L>=0?y[L]:y[i+w],O={value:A.value,questionId:N,answeredAt:m,...A.secondaryValue!==void 0&&{secondaryValue:A.secondaryValue},...A.questionText!==void 0&&{questionText:A.questionText}},H=O.value;(M=>M&&!De.has(M.type))(T)&&(T.value=H,T.secondaryValue=O.secondaryValue||null),g.response.push(O);const q=L>=0?L:i+w;C[q]=ze(T,H),q>k&&(k=q)}),_=zr({cards:y,index:k,hasEndCard:!!r.endCard,uploadProgress:f,allResponses:C,surveyVisitorAttributes:t().surveyVisitorAttributes});const S=(({quotas:A,allResponses:w,cards:N,currentIndex:L})=>A.map(T=>T.quotaMatched?{...T,quotaMatched:on({constraintGroup:T.constraintGroup,allResponses:w,cards:N,currentIndex:L})}:T))({quotas:a,allResponses:C,cards:y,currentIndex:_??k+1});if(sn(S)){const A=y.findIndex(w=>w.type==="thanks");_=A>=0?A:null}e({allResponses:C,quotaEndcardText:ro({quotas:S,quotaMessages:u}),quotas:S}),(_===null||De.has(y[_].type))&&(g.completedAt=m);const h=d(g);if(_===null)return void r.completeSurvey();_&&!De.has(y[_].type)&&h.finally(()=>{l({event:"seen",index:_})});const v=y[_];y[_]&&s&&s("survey.question",{qid:v.name,props:v.props}),e({cards:y,hasViewedEmbed:!1,index:_,viewedCardCount:p+1})},pendingRemoveIframeReason:null,previewKey:null,recorder:()=>{},recorderEventEmitter:I.eventEmitter,resolveTrackedPromise:()=>{const{removeIframeIfReady:r}=t();e(o=>({unresolvedRequestCount:o.unresolvedRequestCount-1})),r()},responseGroupUid:"",remove:({initiator:r,studyType:o})=>{const{eventEmitFn:n,removeIframeIfReady:s,surveyId:i}=t();e({pendingRemoveIframeReason:r,studyType:o}),n(I.SprigEvent.SurveyCloseRequested,{name:I.SprigEvent.SurveyCloseRequested,initiator:r,studyType:o,"survey.id":i}),s()},removeIframeIfReady:()=>{const{eventEmitFn:r,pendingRemoveIframeReason:o,unresolvedRequestCount:n,studyType:s,surveyId:i}=t();o&&n===0&&(r(I.SprigEvent.SurveyWillClose,{name:I.SprigEvent.SurveyWillClose,initiator:o,studyType:s,"survey.id":i}),e({pendingRemoveIframeReason:null,studyType:s}))},seen:async()=>{const{trackHistory:r}=t();return r({event:"seen",isNew:!0})},createDynamicStandaloneQuestion:async({questionId:r})=>{var f,p,b;let o=!1;if(e(m=>{const y=m.cards.find(g=>(g==null?void 0:g.name)===r);return!(y!=null&&y.name)||zt(y)?m:(o=!0,{cards:je(m.cards,r,Jt)})}),!o)return;const n=t(),{targetQuestionOrder:s,questionsResponses:i}=Kt({cards:n.cards,combinedReadableRawResponses:n.allResponsesRaw,targetQuestionId:r,generateQuestionType:"aidynamicstandalone"}),u={surveyId:n.surveyId,responseGroupUid:n.responseGroupUid,standaloneQuestionOrder:s,questionsResponses:i,standaloneQuestionId:r,customMetadata:n.customMetadata,meta:n.meta,previewKey:n.previewKey,isPreview:n.isPreview};let a=!1;const c=()=>{if(a)return;a=!0;const m=t(),y=m.cards.find(({name:g})=>g===r);if(e(g=>({cards:je(g.cards,r,_=>{const{props:C}=_;return C&&"message"in C&&"properties"in C?{..._,value:"",props:{...C,loading:z.failure,properties:{...C.properties,required:!1}}}:_})})),I.isLongFormSurvey(m.studyType)&&(y!=null&&y.groupId)){const g=m.cards.reduce((k,S)=>((S==null?void 0:S.groupId)===y.groupId&&k.push(S),k),[]),_=g.findIndex(k=>k.name===y.name),C=_+1;if(C<g.length){const k=g[C].name;m.setFocusedQuestionId(k)}else{const k=g[_-1].name;m.setFocusedQuestionId(k)}}else m.next({data:{value:"",questionId:y.name,type:y.type},completeSurvey:()=>m.destroy(I.APP_ID),endCard:m.endCard})},d=new AbortController,l=setTimeout(()=>{d.abort(),c();const m=new Error("Timeout reached—question skipped");n.trackPromise(oe(n,"aidynamicstandalone",m))},3e3);try{const{url:m,visitorIdHeader:y}=Yt(n),g=await n.trackPromise(I.sprigFetch(m,{body:JSON.stringify(u),headers:{...n.headers,"x-ul-visitor-id":y},method:"POST",signal:d.signal}));if(!g.ok||!((b=(p=(f=g==null?void 0:g.json)==null?void 0:f.props)==null?void 0:p.message)!=null&&b.length))return c(),void await n.trackPromise(oe(n,"dynamicQuestion",g.error));if(a)return;a=!0,e(_=>({cards:je(_.cards,r,C=>{const k=C.props;return k&&"message"in k&&"properties"in k?{...C,props:{...k,loading:z.success,message:g.json.props.message}}:C})}))}finally{clearTimeout(l)}},createDynamicFollowupQuestion:async({parentQuestionId:r,parentResponseConfig:o})=>{var m,y,g;let n=!1;e(_=>{const C=_.cards.find(k=>(k==null?void 0:k.parentId)===r);return!(C!=null&&C.name)||zt(C)?_:(n=!0,{cards:He(_.cards,r,Jt)})});const s=t(),i={...s.allResponsesRaw,...o||{}},{targetQuestionOrder:u,questionsResponses:a}=Kt({cards:s.cards,combinedReadableRawResponses:i,targetQuestionId:r,generateQuestionType:"aidynamicfollowup"}),c=s.cards.find(_=>_.parentId===r&&_.type==="aidynamicfollowup");if(!n||!c)return;const d={surveyId:s.surveyId,responseGroupUid:s.responseGroupUid,parentQuestionOrder:u,questionsResponses:a,childQuestionId:c.name,customMetadata:s.customMetadata,meta:s.meta,previewKey:s.previewKey,isPreview:s.isPreview};let l=!1;const f=()=>{if(l)return;l=!0;const _=t(),C=_.cards.find(k=>k.parentId===r);if(e(k=>({cards:He(k.cards,r,S=>{const{props:h}=S;return h&&"message"in h&&"properties"in h?{...S,value:"",props:{...h,loading:z.failure,properties:{...h.properties,required:!1}}}:S})})),I.isLongFormSurvey(_.studyType)&&(C!=null&&C.groupId)){const k=_.cards.reduce((v,A)=>((A==null?void 0:A.groupId)===C.groupId&&v.push(A),v),[]),S=k.findIndex(v=>v.name===C.name),h=S+1;if(h<k.length){const v=k[h].name;_.setFocusedQuestionId(v)}else{const v=k[S-1].name;_.setFocusedQuestionId(v)}}else _.next({data:{value:"",questionId:C.name,type:C.type},completeSurvey:()=>_.destroy(I.APP_ID),endCard:_.endCard})},p=new AbortController,b=setTimeout(()=>{p.abort(),f();const _=new Error("Timeout reached—question skipped");s.trackPromise(oe(s,"dynamicFollowUpQuestion",_))},3e3);try{const{url:_,visitorIdHeader:C}=Yt(s),k=await s.trackPromise(I.sprigFetch(_,{body:JSON.stringify(d),headers:{...s.headers,"x-ul-visitor-id":C},method:"POST",signal:p.signal}));if(!k.ok||!((g=(y=(m=k==null?void 0:k.json)==null?void 0:m.props)==null?void 0:y.message)!=null&&g.length))return f(),void await s.trackPromise(oe(s,"dynamicQuestion",k.error));if(l)return;l=!0,e(S=>({cards:He(S.cards,r,h=>{const v=h.props;return v&&"message"in v&&"properties"in v?{...h,props:{...v,loading:z.success,message:k.json.props.message}}:h})}))}finally{clearTimeout(b)}},setAllResponsesRaw:r=>e({allResponsesRaw:r}),slugName:null,showStripes:!1,showSurveyBrand:!1,showSurveyLogo:!1,startingQuestionIdx:null,styleNonce:"",submit:async({completedAt:r,questionIndex:o,response:n,responseGroupUid:s})=>{const i=t();if(!s||Fe(i))return;const u={responseGroupUid:s,meta:i.meta,customMetadata:i.customMetadata,responses:n,completedAt:r,previewKey:i.previewKey};if(typeof i.addResponseGroupMeta=="function")try{const c=await i.addResponseGroupMeta();typeof c=="object"&&c!==null?u.meta={...u.meta,...c}:I.breadcrumbsLogger.error("addResponseGroupMeta must return an object")}catch(c){I.breadcrumbsLogger.error("addResponseGroupMeta promise failed",c)}const a=await i.trackPromise(I.sprigFetch(`${i.apiURL}/sdk/1/environments/${i.envId}/visitors/${i.userId}/responses/submit`,{body:JSON.stringify(u),headers:i.headers,method:"POST"}));a.ok?n.forEach((c,d)=>{i.eventEmitFn(I.SprigEvent.QuestionAnswered,{...c,questionIndex:o?o+d:void 0,"survey.id":i.surveyId})}):a.reportError&&(console.warn("[Sprig] (ERR-427) Failed to submit response",a.error),await i.trackPromise(oe(i,"submitResponse",a.error)))},surveyId:0,surveyVisitorAttributes:{},tabTitle:"",trackHistory:async({event:r,index:o,isNew:n=!1})=>{const s=t();if(Fe(s))return;const{cards:i,index:u}=s;let a=o??u,c=i[a];for(;c;){const d={sid:s.surveyId,qid:Math.floor(c.name),action:r,vid:s.userId,eid:s.envId,isNew:n,responseGroupUid:s.responseGroupUid,previewKey:s.previewKey},l=await s.trackPromise(I.sprigFetch(`${s.apiURL}/sdk/1/visitors/${s.userId}/surveys/${s.surveyId}/history`,{method:"POST",headers:s.headers,body:JSON.stringify(d)}));!l.ok&&l.reportError&&(console.warn("[Sprig] (ERR-428) Failed to track survey event",l.error),await s.trackPromise(oe(s,"trackHistory",l.error)));const f=i[a+1];if(!c.groupId||!(f!=null&&f.groupId)||f.groupId!==c.groupId)break;a++,c=f,n=!1}},trackPromise:async r=>{const{resolveTrackedPromise:o}=t();return e(n=>({unresolvedRequestCount:n.unresolvedRequestCount+1})),r.then(n=>(o(),n)).catch(n=>{throw o(),n})},unresolvedRequestCount:0,update:()=>{var S,h,v;const{cards:r,index:o,headers:n,eventEmitFn:s,frame:i,useMobileStyling:u,surveyId:a,studyType:c,viewDocument:d,isConversationalUI:l}=t(),f=n["userleap-platform"]==="web",p=I.shouldDirectEmbed(n),b=r[o],m=I.isLongFormSurvey(c)?!!d.querySelector(".ul-card--matrix-expandable"):b.type==="matrix"&&!(b.props.properties.displayMatrixAsAccordion||u),y=!u&&m;!p&&!u&&((S=i==null?void 0:i.setWidth)==null||S.call(i,I.DEFAULT_WIDTH_PX));const[g,_]=I.calculateFrameDimensions(d,f&&!u,p),C=l&&g<532?532:g,k=((A,w,N)=>{if(!N)return w;const L=A.querySelector(".ul-card-scroll-wrapper:has(.ul-card--matrix-expandable)");if(!I.isHTMLElement(L)||L.offsetWidth<=600)return w;const T=A.querySelector(".ul-card--matrix_grid"),O=I.isHTMLElement(T)?T.scrollWidth:0;return Math.max(w,L.offsetWidth+(w-O))})(d,_,y);if(p)return s(I.SprigEvent.SurveyHeight,{name:I.SprigEvent.SurveyHeight,contentFrameHeight:C,"survey.id":a}),void s(I.SprigEvent.SurveyWidth,{name:I.SprigEvent.SurveyWidth,contentFrameWidth:k,"survey.id":a});(h=i.setHeight)==null||h.call(i,C),y&&((v=i.setWidth)==null||v.call(i,k))},uploadingCardViewed:!1,uploadProgress:{},useDesktopPrototype:void 0,useMobileStyling:!1,userId:"",viewDocument:window.document,viewedCardCount:0,focusedQuestionId:null,setFocusedQuestionId:r=>e({focusedQuestionId:r})})),Fe=e=>{var t;return!e.userId||((t=e==null?void 0:e.meta)==null?void 0:t.mode)==="test"||e.isPreview},oe=async(e,t,r)=>{const{mode:o,userId:n,envId:s,apiURL:i,headers:u,viewDocument:a}=e,c=a.documentElement,d={mode:o,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:c.clientWidth,clientHeight:c.clientHeight,location:window.location.href,language:window.navigator.language},l={action:t,err:{message:`${r==null?void 0:r.name} - ${r==null?void 0:r.message}`,stack:r==null?void 0:r.stack},meta:d,vid:n,envId:s};(await I.sprigFetch(`${i}/sdk/1/errors`,{method:"POST",headers:Object.assign({"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},u),body:JSON.stringify(l)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",r)},no=()=>{const{cards:e,close:t,endCard:r,headers:o,index:n}=$(u=>({cards:u.cards,close:u.close,endCard:u.endCard,headers:u.headers,index:u.index,useMobileStyling:u.useMobileStyling})),s=e.length,i=X(()=>()=>t(I.APP_ID),[t]);return["email","link"].includes(o["userleap-platform"])||r&&n+1===s?null:R("div",{"aria-label":"Close button",className:"close-btn",onClick:i,onKeyPress:u=>{u.key==="Enter"&&i()},role:"button",tabIndex:0,children:R("svg",{fill:"none",height:"16px",viewBox:"0 0 13 13",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:R("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:"currentColor"})})})},an=e=>U("svg",{fill:"none",height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e},U("path",{d:"M17 10L12 15L7 10",stroke:"#0B2330",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})),un=e=>U("svg",{fill:"none",height:10,viewBox:"0 0 10 10",width:10,xmlns:"http://www.w3.org/2000/svg",...e},U("path",{d:"M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005",stroke:"white",strokeLinecap:"round",strokeWidth:2})),oo=({visible:e})=>R("div",{className:"sprig-check-background",style:{opacity:e?1:0},children:R(un,{className:"sprig-check"})}),tr="250ms",so=at(({animate:e,children:t,header:r,isOpen:o,onClick:n,showHeaderCheck:s},i)=>{const u=$(m=>m.update),a=Y(null),[c,d]=J(0),[l,f]=J("none"),[p,b]=J(!0);return j(()=>{var y;const m=(y=a.current)==null?void 0:y.getBoundingClientRect();d(o&&m?m.height:0)},[o]),j(()=>{u()},[c,u]),j(()=>{!c&&o||!p||b(!1),f(e&&!p?`height ${tr} ease`:"none")},[e,p,c,o]),R("div",{className:"sprig-accordion",ref:i,children:[R("button",{className:"sprig-accordion-header-container",onClick:n,type:"button",children:[R("div",{className:"sprig-header-label-container",children:[R("span",{className:"sprig-header-label",children:r}),R(oo,{visible:s})]}),R(an,{className:"sprig-caret",style:{transitionDuration:e?tr:"0",transform:o?"rotate(-180deg)":"none"}})]}),R("div",{className:"sprig-accordion-body",style:{transition:l,height:c},children:R("div",{ref:a,children:t})})]})}),pt=({style:e,stroke:t="black"})=>R("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[R("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),R("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),Se=(...e)=>e.filter(Boolean).join(" "),ln=(e,t,r)=>{const o=t?"--mobile":"--desktop";return`${e+o} ${e+(r?`${o}_${r}`:"")} ${e}`},io=(e,t)=>`${e} ${e}__${t}`,cn=({logoOnly:e=!1,style:t={}})=>R("svg",{alt:(e?"Powered by ":"")+"Sprig",className:"sprig-logo",fill:"none",height:"15",style:{display:"block",...t},viewBox:e?"79 0 31 15":"0 0 112 15",width:e?"35":"112",xmlns:"http://www.w3.org/2000/svg",children:[!e&&R("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:"currentColor"}),R("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:"currentColor"}),R("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:"currentColor"}),R("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:"currentColor"}),R("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:"currentColor"}),R("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:"currentColor"})]}),dn=({forceBrandedLogo:e,marketingUrlLink:t})=>R("div",{className:e?"yellow-footer-logo":"",children:R("a",{href:t,rel:"noreferrer",target:"_blank",children:R("div",{style:{display:"flex"},children:[R(cn,{logoOnly:!1}),e&&R(pt,{style:{display:"block",margin:"auto 0 auto 4px",transform:"rotateY(0deg) rotate(-45deg)"}})]})})}),pn=({marketingUrlLink:e})=>R("a",{dir:"ltr",href:e,rel:"noreferrer",target:"_blank",children:R("div",{className:"thank-you-card-link",children:[R("div",{className:"sprig-box-logo",children:R(cn,{logoOnly:!0,style:{margin:"auto"}})}),R("div",{children:R("p",{children:["Capture insights about your own product",R(pt,{style:{display:"inline-flex",marginInlineStart:"4px",verticalAlign:"middle"}})]})})]})}),_n=({marketingUrl:e,slugName:t,surveyId:r,forceBrandedLogo:o})=>`${e}?utm_source=survey_branding&utm_medium=website&utm_campaign=${t}&utm_content=${r}${o?"&utm_term=poweredby_pill":""}`,ao=()=>{var g;const{border:e,cards:t,forceBrandedLogo:r,headers:o,index:n,marketingUrl:s,showSurveyBrand:i,slugName:u,surveyId:a,viewedCardCount:c}=$(_=>({border:_.border,cards:_.cards,forceBrandedLogo:_.forceBrandedLogo,headers:_.headers,index:_.index,marketingUrl:_.marketingUrl,showSurveyBrand:_.showSurveyBrand,slugName:_.slugName,surveyId:_.surveyId,viewedCardCount:_.viewedCardCount})),d=Y(null),l=t.filter(_=>_.type!=="uploading"&&_.type!=="thanks"),f=((_,C)=>{const k=new Set(["thanks","uploading"]);if(C>=_.length||C<0||k.has(_[C].type))return 0;const S=_.filter(v=>!k.has(v.type));if(C===S.length-1)return 1;const h={[S.length-1]:1,[-1]:0};for(let v=S.length-2;v>=C;v--){const A=S[v],w=(A.props.routingOptions??[]).filter(H=>typeof H=="object"&&H!==null&&"group"in H),N=Jn(v,w);if(N.length===0){h[v]=h[v+1]+1;continue}let L=0;const T=Zn(A);if(T===null)return S.length-1-C;let O=T;for(const H of N){if(O.length===0)break;const{comparator:q,target:M,value:re}=H,K=O.filter(V=>{const ne=Qn({value:V},A.type,V),E=Gr(V,A.type);return!(ne&&q==="answered"||E&&q==="partial"||!ne&&!E&&q==="skipped"||q==="given_up"&&Kn(V)&&V.taskStatus==="given.up"||ne&&A.type==="open"&&(q==="contains"||q==="notcontains")||ne&&Gn(q)&&ye[q](V,re))});if(K.length<O.length){const V=Number.parseInt(String(M),10);if(V!==-1&&V<=v||V>=S.length)return S.length-1-C;L=Math.max(h[V]+1,L)}O=K}O.length>0&&(L=Math.max(h[v+1]+1,L)),h[v]=L}return h[C]})(t,n),p=c+1,b=p/(p+f),m=_n({marketingUrl:s,slugName:u,surveyId:a,forceBrandedLogo:r});j(()=>{d.current&&(d.current.style.width=100*b+"%")},[b]);const y=((g=t[n])==null?void 0:g.type)==="thanks";return R("footer",{className:"ul-footer "+(o["userleap-platform"]==="link"?"ul-footer__link":""),children:y&&r?R(pn,{marketingUrlLink:m}):R(D,{children:[l.length>1&&R("div",{className:"ul-progress-bar-container ul-progress-bar-container__footer",children:R("div",{className:"ul-progress-bar-current",ref:d,style:{border:`1px solid ${e||"#2f2e2c"}`}})}),i?R(dn,{forceBrandedLogo:r,marketingUrlLink:m}):null]})})},uo=()=>{const{border:e,cards:t,index:r,focusedQuestionId:o,isConversationalUI:n,showSurveyLogo:s}=$(a=>({border:a.border,cards:a.cards,index:a.index,focusedQuestionId:a.focusedQuestionId,isConversationalUI:a.isConversationalUI,showSurveyLogo:a.showSurveyLogo})),{totalQuestions:i,fraction:u}=X(()=>{var l;const a=t.filter(f=>f.type!=="uploading"&&f.type!=="thanks"),c=a.length;if(c<=1)return{totalQuestions:c,fraction:0};if(((l=t[r])==null?void 0:l.type)==="thanks")return{totalQuestions:c,fraction:1};let d=0;return d=n?r+1:a.findIndex(f=>f.name===o),{totalQuestions:c,fraction:d/(c+1)}},[t,r,o,n]);return i<=1?null:R("div",{className:"ul-progress-bar-container ul-progress-bar-container__header"+(s?"":" ul-progress-bar-container--no-branding"),children:R("div",{className:"ul-progress-bar-current",style:{width:100*u+"%",border:`1px solid ${e??"#2f2e2c"}`}})})},lo=Le(async()=>({default:(await Promise.resolve().then(()=>require("./index-Cvesqg_C.cjs"))).PageCard})),co=Le(()=>Promise.resolve().then(()=>require("./conversational-ui-7CP-cLZe.cjs"))),po=()=>{const{answers:e,border:t,cards:r,close:o,configureExitOnOverlayClick:n,destroy:s,endCard:i,eventEmitFn:u,fontFamily:a,headers:c,isConversationalUI:d,experimentFlags:l,index:f,next:p,previewKey:b,productConfig:m,seen:y,showStripes:g,studyType:_,surveyId:C,surveyVisitorAttributes:k,update:S,useMobileStyling:h,viewDocument:v}=$(E=>({answers:E.answers,border:E.border,cards:E.cards,close:E.close,configureExitOnOverlayClick:E.configureExitOnOverlayClick,destroy:E.destroy,endCard:E.endCard,eventEmitFn:E.eventEmitFn,fontFamily:E.fontFamily,headers:E.headers,index:E.index,isConversationalUI:E.isConversationalUI,experimentFlags:E.experimentFlags,previewKey:E.previewKey,productConfig:E.productConfig,next:E.next,seen:E.seen,showStripes:E.showStripes,studyType:E.studyType,surveyId:E.surveyId,surveyVisitorAttributes:E.surveyVisitorAttributes,update:E.update,useMobileStyling:E.useMobileStyling,viewDocument:E.viewDocument})),A=Y(null),w=Y(!1),N=Y(!1),L=c["userleap-platform"],T=l==null?void 0:l["sdk-new-convo-ui"],{props:O,type:H,name:q}=r[f];j(()=>{if(window.Sprig)return window.Sprig.trackHistory=E=>$.getState().trackHistory(E),()=>{window.Sprig.trackHistory=void 0}},[]),j(()=>{A.current&&(A.current.classList.contains("ul-app--visible")||A.current.classList.add("ul-app--visible"),!w.current&&u&&(w.current=!0,u(I.SprigEvent.SurveyAppeared,{name:I.SprigEvent.SurveyAppeared,"survey.id":C})))},[u,C]),j(()=>{const E=()=>{v.visibilityState==="visible"&&(y(),v.removeEventListener("visibilitychange",E))};return v.addEventListener("visibilitychange",E),E(),()=>{v.removeEventListener("visibilitychange",E)}},[y,v]);const M=ve(async()=>{if(!v)return;const E=v.getElementById("conversational-ui-styles");if(!d&&E)return E.remove(),void(N.current=!1);if(d&&!E){const W=await(F=!!T,F?Promise.resolve().then(()=>require("./conversational-v2-styles-DLvybr0T.cjs")):Promise.resolve().then(()=>require("./conversational-styles-DKmvloou.cjs")));I.setSurveyStyles({document:v,elementId:"conversational-ui-styles",styleString:W.default}),requestAnimationFrame(()=>{S()}),N.current=!0}var F},[v,d,S]);j(()=>{n(()=>o())},[o,n]),j(()=>{M()},[M,v]);const re=X(()=>I.groupCards(r,f),[r,f]),K=Ye(r,k),V=ve(E=>{p({data:E,completeSurvey:()=>s(I.APP_ID),endCard:i}),I.resetScrollPosition(v)},[p,s,i,v]);if(e){for(const E of e)if(E.questionId===q){let F;if(H==="multiplechoice"){const W=O.options.find(({value:Te})=>Te===E.value);if(!W)break;F={[W.id]:W.value}}else F=E.value;V({value:F,type:H,questionId:E.questionId});break}}const ne=!h&&((m==null?void 0:m.framePosition)==="center"||(m==null?void 0:m.desktopDisplay)==="center-modal"||((m==null?void 0:m.placement)||"").includes("center"));return R("div",{className:Se("ul-app",I.shouldDirectEmbed(c)?"ul-app--visible":"ul-app--overlay"),dir:"auto",id:I.APP_ID,onClick:E=>{var _t;const F=window.sprigAPI,W=E.target;if(!F||!W)return;const Te=[W,W.parentElement];for(const be of Te)if(((_t=be==null?void 0:be.tagName)==null?void 0:_t.toLowerCase())==="a"){E.preventDefault();try{const _e=new URL(be.href);_e.protocol!=="http:"&&_e.protocol!=="https:"||(F==null||F.openUrl(_e.toString()))}catch(_e){console.error(_e)}return}},ref:A,style:{"--theme":t,...a?{fontFamily:a.replace(";","")}:{},...ne?{position:"relative"}:{}},children:R("div",{className:"ul-app__container",children:R("div",{className:Se(ln("ul-card__container",h,_)),style:{..._!=="feedbackButton"||(m==null?void 0:m.desktopDisplay)==="center-modal"?{borderColor:t}:{},...(m==null?void 0:m.desktopDisplay)==="slider"?{margin:"0px"}:{}},children:[R("div",{className:"sprig-container",children:[g&&R("div",{className:"ul-header__container",dir:"ltr",children:R("div",{className:"ul-header",children:"For development purposes only"})}),b&&R("div",{className:"ul-header__container",dir:"ltr",children:R("div",{className:"ul-header",children:"Preview Mode: Response will not be recorded."})}),I.isLongFormSurvey(_)&&R(uo,{}),R("div",{className:Se(io("ul-card-main-content",L)),children:R(ae,d?{fallback:null,children:R(co,{cards:r,next:V,previousResponses:K})}:{fallback:null,children:R(lo,{cards:re,next:V,previousResponses:K})})}),!I.isLongFormSurvey(_)&&R(ao,{})]}),!d&&R(no,{})]})})})},fn=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",rr=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:fn()};return new MediaRecorder(e,t)},nr=(e,t,r)=>{r[t]=[],e.ondataavailable=function(o){r[t].push(o.data)},e.currentMediaRecordingUid=t,e.start()};function or(e,t,r,o,n,s){if(e&&e.state!=="inactive"){const{"begin.callback":i}=o,u=e.currentMediaRecordingUid;if(!u)return;i&&i(u),e.onstop=()=>async function(a,c,d,l,f,p,b){const m=$.getState().viewDocument,{"upload.callback":y,"progress.callback":g}=l,_={mediaType:d,updatedAt:new Date().toISOString(),mediaRecordingUid:f,...l["passthrough.data"]},C=await(async(v,A)=>{var N;const w=await fetch(A,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(v)});if(w.ok){const L=await w.json();return(N=L==null?void 0:L.upload)==null?void 0:N.url}return null})(_,a);if(!C)return void(y&&y(null,{message:"failed to get upload url"}));const k=new Blob(b,{type:fn()});if(!m.defaultView)return;const S=new m.defaultView.File([k],`recording video ${Date.now()}`),h=p.createUpload({endpoint:C,file:S,chunkSize:5120});h.on("error",v=>{y&&y(null,v)}),h.on("progress",v=>{g&&g(f,v)}),h.on("success",()=>{y&&y(f,!0)})}(t,0,r,o,u,n,s),e.stop()}}const _o={state:{chunks:{}},stopRecording(e){const{uploadApiEndpoint:t,avRecorder:r,screenRecorder:o,UpChunk:n}=this.state,s=this.state.avStream&&this.state.avStream.getVideoTracks().length>0?"video":"audio";this.state.chunks&&t&&n&&(r!=null&&r.currentMediaRecordingUid&&or(r,t,s,e,n,this.state.chunks[r==null?void 0:r.currentMediaRecordingUid]),o!=null&&o.currentMediaRecordingUid&&or(o,t,"screen",e,n,this.state.chunks[o==null?void 0:o.currentMediaRecordingUid]))},handleCancelledStream(e){const t=e.getVideoTracks(),r=e.getAudioTracks();let o=t.length&&t[0];o=o||r.length&&r[0],o&&o.addEventListener("ended",()=>{[this.state.avRecorder,this.state.screenRecorder].map(n=>{n&&(n.state==="recording"&&n.stop(),n.stream.getTracks().map(s=>{s.readyState==="live"&&s.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 r=>{this.avPermissionCallback(r)}),e.on("begin.recording",this.beginRecordingCallback.bind(this)),e.on("start.task",this.startTaskCallback.bind(this)),e.on("screen.permission",async r=>{this.screenPermissionCallback(r)}),e.on("finish.task",async r=>{this.finishTaskCallback(r)})},async avPermissionCallback(e){var o,n,s;const{"stream.ready":t,"permission.descriptors":r}=e;try{(o=this.state.avStream)!=null&&o.active&&(this.state.avStream.getTracks().map(i=>i.readyState==="live"&&i.stop()),((n=this.state.captureStream)==null?void 0:n.getAudioTracks().length)===1&&this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])),this.state.avStream=await navigator.mediaDevices.getUserMedia({video:r.includes("camera"),audio:!0}),((s=this.state.captureStream)==null?void 0:s.getAudioTracks().length)===0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.avStream)}catch(i){return console.warn("Error: failed to get permissions: "+i),void(t&&t(null,null))}t&&t(this.state.avStream,this.state.captureStream)},async screenPermissionCallback(e){const{"screen.permission.requested":t,"stream.ready.callback":r}=e;t==null||t(!0);try{this.state.captureStream=await navigator.mediaDevices.getDisplayMedia({video:!0,cursor:"always",displaySurface:"browser",preferCurrentTab:!0})}catch(o){return t==null||t(!1),console.warn("Error: failed to get permissions: "+o),void(r&&r(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),r&&r(this.state.avStream||null,this.state.captureStream)},beginRecordingCallback(e){const{"recording.media.types":t,"start.recording.callback":r=()=>{}}=e;if(!t)return;const o=[];if(t.includes("video")&&this.state.avStream){this.state.avRecorder=rr(this.state.avStream);const n=I.v4();nr(this.state.avRecorder,n,this.state.chunks),o.push(n)}if(t.includes("screen")&&this.state.captureStream){this.state.screenRecorder=rr(this.state.captureStream);const n=I.v4();nr(this.state.screenRecorder,n,this.state.chunks),o.push(n)}o&&r&&r(o)},async finishTaskCallback(e){const{"current.index":t,"task.response":r,"task.complete.callback":o}=e;await this.stopRecording(e),o&&o(this.taskDurationMillisecond()),this.state.cards&&this.state.hasEndCard!==void 0&&this.lookAheadAndStopStream(t,r,this.state.cards,this.state.hasEndCard)},startTaskCallback(){this.state.startTime=new Date},permissionStatusCallback(e){var o;const{"permission.status.callback":t}=e,r=this.state.avStream;t&&t(r,!!r&&(r==null?void 0:r.getVideoTracks().length)>0,!!((o=this.state.captureStream)!=null&&o.active),this.state.captureStream)},lookAheadAndStopStream(e,t,r,o){const{avRecorder:n,screenRecorder:s}=this.state,{allResponses:i,surveyVisitorAttributes:u}=$.getState(),a=zr({cards:r,index:e,hasEndCard:o,allResponses:i,surveyVisitorAttributes:u});a!==null&&r[a].type==="recordedtask"||[n,s].map(c=>{c&&(c.state==="recording"&&c.stop(),c.stream.getTracks().map(d=>{d.readyState==="live"&&d.stop()}))})}},Xe=Object.create(_o);Object.freeze(Xe);const fo=({mode:e=null,viewWindow:t,viewDocument:r,trackPageViewUrl:o})=>{const n=r.documentElement;let s;try{s=t.parent.location.href}catch{s=t.location.href}return{mode:e,sw:t.screen.width,sh:t.screen.height,cw:n.clientWidth,ch:n.clientHeight,p:o??s,l:t.navigator.language}};let Be=!1;const mo={configure:function(e,t=!0){var v,A;const{answers:r,apiURL:o,endCard:n,eventEmitFn:s,fontFamilyURL:i,frame:u,previewKey:a,viewDocument:c,viewWindow:d}=e,l=I.shouldDirectEmbed(e.headers)?e.frame:c.body,f=e.UpChunk||window.UpChunk,p=I.eventEmitter,b=((w,N)=>{const L=[...w],T=new Set(["videovoice","recordedtask"]);return w.some(O=>T.has(O.type))&&L.push({name:-2,props:{routingOptions:[],displayLogic:[]},type:"uploading"}),N&&L.push({name:-1,props:{routingOptions:[],displayLogic:[]},type:"thanks"}),L})(e.cards,!!n),m=Object.fromEntries(b.map((w,N)=>[w.name,N])),y=(({quotas:w,cardIndexByName:N})=>w===void 0?[]:w.map(L=>({...L,constraintGroup:L.constraintGroup.map(T=>nn(T,N)),quotaMatched:!0})))({quotas:e.quotas,cardIndexByName:m});Xe.configure(p,{cards:b,hasEndCard:!!n,apiURL:o,UpChunk:f});const g=e.layout==="conversational",_=(({cards:w,hasEndCard:N,allResponses:L=[],surveyVisitorAttributes:T={},startingQuestionIdx:O=0})=>{var re,K;const H=w.findIndex(V=>V.type==="uploading"),q=ct(w,N,H);let M=Math.min(Math.max(0,O??0),q);for(;M<=q&&((K=(re=w[M])==null?void 0:re.props)!=null&&K.displayLogic)&&w[M].props.displayLogic.length>0;){const V=w[M].props.displayLogic||[];if(dt({displayLogic:V,allResponses:L,cards:w,surveyVisitorAttributes:T}))break;M++}return Math.min(M,q)})({cards:b,hasEndCard:!!n,allResponses:[],surveyVisitorAttributes:e.surveyVisitorAttributes??{},startingQuestionIdx:e.startingQuestionIdx}),C=e.useBranding??!0?e.border:I.DEFAULT_BORDER_COLOR;$.setState({experimentFlags:e.experimentFlags??{},addResponseGroupMeta:e.addResponseGroupMeta,apiURL:o,answers:r,avatars:e.avatars,border:C,index:_,isConversationalUI:g,cards:b,cardIndexByName:m,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,enableCspTrustedTypes:e.enableCspTrustedTypes,endCard:e.endCard,envId:e.envId,eventEmitFn:s,fontFamily:e.fontFamily,forceBrandedLogo:e.forceBrandedLogo,frame:u,headers:e.headers,hasViewedEmbed:!1,isPreview:e.previewMode,layout:e.layout,marketingUrl:"https://sprig.com",meta:fo({mode:e.mode,viewWindow:d,viewDocument:c,trackPageViewUrl:e.trackPageViewUrl}),mode:e.mode,previewKey:a,productConfig:e.productConfig,quotaEndcardText:void 0,quotaMessages:e.quotaMessages,providerPersona:e.providerPersona??void 0,quotas:y,recorder:Xe,recorderEventEmitter:p,responseGroupUid:e.responseGroupUid,showProviderPersona:e.showProviderPersona??!1,showStripes:e.showStripes,showSurveyBrand:e.showSurveyBrand,showSurveyLogo:e.showSurveyLogo??!1,slugName:e.slugName,startingQuestionIdx:e.startingQuestionIdx,styleNonce:e.styleNonce,studyType:e.studyType,surveyId:e.surveyId,surveyVisitorAttributes:e.surveyVisitorAttributes,tabTitle:e.tabTitle,uploadingCardViewed:!1,uploadProgress:{},useMobileStyling:e.useMobileStyling,useDesktopPrototype:e.useDesktopPrototype,userId:e.userId,viewDocument:e.viewDocument,visitorAttributes:e.visitorAttributes,viewedCardCount:_});const{head:k}=c;var S;if(I.setSurveyStyles({document:c,elementId:"sprig-style",styleString:""}),(S=!!((v=e.experimentFlags)!=null&&v["sdk-new-survey-ui"]),S?Promise.resolve().then(()=>require("./index-1BOPr1FN.cjs")):Promise.resolve().then(()=>require("./index-ElJgds4s.cjs"))).then(w=>{I.setSurveyStyles({document:c,elementId:"sprig-style",styleString:w.default})}),e.customStyles&&I.setSurveyStyles({document:c,elementId:"ul-custom-style",styleString:e.customStyles,nonce:e.styleNonce}),e.fontFamily&&i&&parent){const w=c.createElement("link");w.rel="stylesheet",w.href=i,k.appendChild(w)}const h=s||((A=u.eventEmitter)==null?void 0:A.emit);h==null||h("verify.view.version",{"view.version":"2.48.1"}),l&&t&&(Be&&Ie(l),le(R(po,{}),l),Be=!0,I.eventEmitter.once(I.SprigEvent.SurveyClosed,()=>{Ie(l),Be=!1}))}},vo=Object.freeze(Object.defineProperty({__proto__:null,default:mo},Symbol.toStringTag,{value:"Module"}));exports.Accordion=so,exports.Arrow=pt,exports.DynamicQuestionLoadingStates=z,exports.F=X,exports.F$1=rt,exports.MaxDiffChoice=Qr,exports.MaxSelectModes=rn,exports.PromptActionTypeEnum=tn,exports.SprigBrandLogo=dn,exports.SvgCaret=an,exports.SvgCheckmark=un,exports.T=ve,exports.ThankYouLink=pn,exports._=Y,exports.appCardHasPropertiesWithRequired=function(e){const t=e.props;if(t===null||typeof t!="object")return!1;const r=Reflect.get(t,"properties");return typeof r=="object"&&r!==null&&"required"in r},exports.buildMarketingUrl=_n,exports.buildReadableResponseMap=Ye,exports.buildResponsesArrayForDisplayLogic=({storeAllResponses:e,cards:t,cardValues:r,cardIndexByName:o})=>{const n=e?[...e]:[];if(o===void 0)return n;for(const s of t){const i=o[s.name];if(typeof i!="number")continue;const u=r[s.name];(u==null?void 0:u.value)!==void 0&&(n[i]=ze(s,u.value))}return n},exports.cc=Se,exports.create=Wr,exports.g=D,exports.getButtonText=e=>(e==null?void 0:e.buttonText)||"Next",exports.getClasses=ln,exports.getProcessedQuestionText=e=>{var t;return Je(e)&&((t=e.props.properties)!=null&&t.questionHtml)&&typeof e.props.properties.questionHtml=="string"?e.props.properties.questionHtml.replace(/<[^>]*>/g,"").trim():e.props&&"message"in e.props&&typeof e.props.message=="string"?e.props.message.trim():e.props&&"questionHtml"in e.props&&typeof e.props.questionHtml=="string"?e.props.questionHtml.replace(/<[^>]*>/g,"").trim():""},exports.getSkipButtonText=e=>(e==null?void 0:e.skipButtonText)||"Skip",exports.h=J,exports.isLastQuestion=(e,t)=>{const r=t.findIndex(s=>s.type==="uploading"),o=t.some(s=>s.type==="thanks"),n=t.findIndex(s=>s.name===e);return n===-1?!1:n===ct(t,o,r)},exports.p=j,exports.pipeReadableResponsesIntoCards=(e,t)=>e.map(r=>{if(!Je(r)||r.props.properties===void 0||r.props.properties===null)return r;const o=r.props.properties;if(o===null||typeof o!="object"||!$t.some(i=>i in o))return r;let n=!1;const s={};for(const i of $t){const u=o[i];if(u!==void 0){const a=Wn(u,t);s[i]=a,a!==u&&(n=!0)}}return n?{...r,props:{...r.props,properties:{...o,...s}}}:r}),exports.q=ot,exports.shouldMatrixUseAccordionDueToSize=(e,t)=>er(e)>(r=>Math.min(1200,.9*r))(t),exports.shouldMatrixUseFillLayout=(e,t)=>t>600&&er(e)<600,exports.someDisplayLogicOptionMatches=dt,exports.triggerFollowUpQuestionGeneration=({displayCard:e,response:t,createDynamicFollowupQuestion:r})=>{if(e&&((e==null?void 0:e.childId)??0)>0){const o=ze(e,t==null?void 0:t.value),n=de({comparator:"answered",type:e.type,response:o}),s=e.type==="matrix"&&de({comparator:"partial",type:e.type,response:o});if(n||s){const i=Ye([e].map(u=>({...u,value:(t==null?void 0:t.value)??null,secondaryValue:(t==null?void 0:t.secondaryValue)??null})));r({parentQuestionId:e==null?void 0:e.name,parentResponseConfig:i})}}},exports.u=R,exports.useConfig=$,exports.view=vo,exports.wn=Br,exports.y=pe;
1
+ "use strict";const I=require("./index-ChvOme6P.cjs");var he,x,sr,ee,ft,ir,$e,ar,me={},ur=[],mn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ee=Array.isArray;function Q(e,t){for(var r in t)e[r]=t[r];return e}function lr(e){var t=e.parentNode;t&&t.removeChild(e)}function U(e,t,r){var o,n,s,i={};for(s in t)s=="key"?o=t[s]:s=="ref"?n=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?he.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return fe(e,i,o,n,null)}function fe(e,t,r,o,n){var s={type:e,props:t,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:n??++sr,__i:-1,__u:0};return n==null&&x.vnode!=null&&x.vnode(s),s}function cr(){return{current:null}}function D(e){return e.children}function B(e,t){this.props=e,this.context=t}function ue(e,t){if(t==null)return e.__?ue(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?ue(e):null}function dr(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return dr(e)}}function We(e){(!e.__d&&(e.__d=!0)&&ee.push(e)&&!xe.__r++||ft!==x.debounceRendering)&&((ft=x.debounceRendering)||ir)(xe)}function xe(){var e,t,r,o,n,s,i,u,a;for(ee.sort($e);e=ee.shift();)e.__d&&(t=ee.length,o=void 0,s=(n=(r=e).__v).__e,u=[],a=[],(i=r.__P)&&((o=Q({},n)).__v=n.__v+1,x.vnode&&x.vnode(o),et(i,o,n,r.__n,i.ownerSVGElement!==void 0,32&n.__u?[s]:null,u,s??ue(n),!!(32&n.__u),a),o.__.__k[o.__i]=o,fr(u,o,a),o.__e!=s&&dr(o)),ee.length>t&&ee.sort($e));xe.__r=0}function pr(e,t,r,o,n,s,i,u,a,c,d){var l,f,p,b,m,y=o&&o.__k||ur,g=t.length;for(r.__d=a,function(_,C,k){var S,h,v,A,w,N=C.length,L=k.length,T=L,O=0;for(_.__k=[],S=0;S<N;S++)(h=_.__k[S]=(h=C[S])==null||typeof h=="boolean"||typeof h=="function"?null:typeof h=="string"||typeof h=="number"||typeof h=="bigint"||h.constructor==String?fe(null,h,null,null,h):Ee(h)?fe(D,{children:h},null,null,null):h.constructor===void 0&&h.__b>0?fe(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)!=null?(h.__=_,h.__b=_.__b+1,w=vn(h,k,A=S+O,T),h.__i=w,v=null,w!==-1&&(T--,(v=k[w])&&(v.__u|=131072)),v==null||v.__v===null?(w==-1&&O--,typeof h.type!="function"&&(h.__u|=65536)):w!==A&&(w===A+1?O++:w>A?T>N-A?O+=w-A:O--:O=w<A&&w==A-1?w-A:0,w!==S+O&&(h.__u|=65536))):(v=k[S])&&v.key==null&&v.__e&&(v.__e==_.__d&&(_.__d=ue(v)),Qe(v,v,!1),k[S]=null,T--);if(T)for(S=0;S<L;S++)(v=k[S])!=null&&!(131072&v.__u)&&(v.__e==_.__d&&(_.__d=ue(v)),Qe(v,v))}(r,t,y),a=r.__d,l=0;l<g;l++)(p=r.__k[l])!=null&&typeof p!="boolean"&&typeof p!="function"&&(f=p.__i===-1?me:y[p.__i]||me,p.__i=l,et(e,p,f,n,s,i,u,a,c,d),b=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&tt(f.ref,null,p),d.push(p.ref,p.__c||b,p)),m==null&&b!=null&&(m=b),65536&p.__u||f.__k===p.__k?a=_r(p,a,e):typeof p.type=="function"&&p.__d!==void 0?a=p.__d:b&&(a=b.nextSibling),p.__d=void 0,p.__u&=-196609);r.__d=a,r.__e=m}function _r(e,t,r){var o,n;if(typeof e.type=="function"){for(o=e.__k,n=0;o&&n<o.length;n++)o[n]&&(o[n].__=e,t=_r(o[n],t,r));return t}return e.__e!=t&&(r.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function G(e,t){return t=t||[],e==null||typeof e=="boolean"||(Ee(e)?e.some(function(r){G(r,t)}):t.push(e)),t}function vn(e,t,r,o){var n=e.key,s=e.type,i=r-1,u=r+1,a=t[r];if(a===null||a&&n==a.key&&s===a.type)return r;if(o>(a==null||131072&a.__u?0:1))for(;i>=0||u<t.length;){if(i>=0){if((a=t[i])&&!(131072&a.__u)&&n==a.key&&s===a.type)return i;i--}if(u<t.length){if((a=t[u])&&!(131072&a.__u)&&n==a.key&&s===a.type)return u;u++}}return-1}function mt(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||mn.test(t)?r:r+"px"}function Ce(e,t,r,o,n){var s;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)r&&t in r||mt(e.style,t,"");if(r)for(t in r)o&&r[t]===o[t]||mt(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")s=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+s]=r,r?o?r.u=o.u:(r.u=Date.now(),e.addEventListener(t,s?yt:vt,s)):e.removeEventListener(t,s?yt:vt,s);else{if(n)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]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function vt(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(x.event?x.event(e):e)}function yt(e){return this.l[e.type+!0](x.event?x.event(e):e)}function et(e,t,r,o,n,s,i,u,a,c){var d,l,f,p,b,m,y,g,_,C,k,S,h,v,A,w=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(a=!!(32&r.__u),s=[u=t.__e=r.__e]),(d=x.__b)&&d(t);e:if(typeof w=="function")try{if(g=t.props,_=(d=w.contextType)&&o[d.__c],C=d?_?_.props.value:d.__:o,r.__c?y=(l=t.__c=r.__c).__=l.__E:("prototype"in w&&w.prototype.render?t.__c=l=new w(g,C):(t.__c=l=new B(g,C),l.constructor=w,l.render=hn),_&&_.sub(l),l.props=g,l.state||(l.state={}),l.context=C,l.__n=o,f=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),w.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Q({},l.__s)),Q(l.__s,w.getDerivedStateFromProps(g,l.__s))),p=l.props,b=l.state,l.__v=t,f)w.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(w.getDerivedStateFromProps==null&&g!==p&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(g,C),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(g,l.__s,C)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(l.props=g,l.state=l.__s,l.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(N){N&&(N.__=t)}),k=0;k<l._sb.length;k++)l.__h.push(l._sb[k]);l._sb=[],l.__h.length&&i.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(g,l.__s,C),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(p,b,m)})}if(l.context=C,l.props=g,l.__P=e,l.__e=!1,S=x.__r,h=0,"prototype"in w&&w.prototype.render){for(l.state=l.__s,l.__d=!1,S&&S(t),d=l.render(l.props,l.state,l.context),v=0;v<l._sb.length;v++)l.__h.push(l._sb[v]);l._sb=[]}else do l.__d=!1,S&&S(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++h<25);l.state=l.__s,l.getChildContext!=null&&(o=Q(Q({},o),l.getChildContext())),f||l.getSnapshotBeforeUpdate==null||(m=l.getSnapshotBeforeUpdate(p,b)),pr(e,Ee(A=d!=null&&d.type===D&&d.key==null?d.props.children:d)?A:[A],t,r,o,n,s,i,u,a,c),l.base=t.__e,t.__u&=-161,l.__h.length&&i.push(l),y&&(l.__E=l.__=null)}catch(N){t.__v=null,a||s!=null?(t.__e=u,t.__u|=a?160:32,s[s.indexOf(u)]=null):(t.__e=r.__e,t.__k=r.__k),x.__e(N,t,r)}else s==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=yn(r.__e,t,r,o,n,s,i,a,c);(d=x.diffed)&&d(t)}function fr(e,t,r){t.__d=void 0;for(var o=0;o<r.length;o++)tt(r[o],r[++o],r[++o]);x.__c&&x.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(s){s.call(n)})}catch(s){x.__e(s,n.__v)}})}function yn(e,t,r,o,n,s,i,u,a){var c,d,l,f,p,b,m,y=r.props,g=t.props,_=t.type;if(_==="svg"&&(n=!0),s!=null){for(c=0;c<s.length;c++)if((p=s[c])&&"setAttribute"in p==!!_&&(_?p.localName===_:p.nodeType===3)){e=p,s[c]=null;break}}if(e==null){if(_===null)return document.createTextNode(g);e=n?document.createElementNS("http://www.w3.org/2000/svg",_):document.createElement(_,g.is&&g),s=null,u=!1}if(_===null)y===g||u&&e.data===g||(e.data=g);else{if(s=s&&he.call(e.childNodes),y=r.props||me,!u&&s!=null)for(y={},c=0;c<e.attributes.length;c++)y[(p=e.attributes[c]).name]=p.value;for(c in y)p=y[c],c=="children"||(c=="dangerouslySetInnerHTML"?l=p:c==="key"||c in g||Ce(e,c,null,p,n));for(c in g)p=g[c],c=="children"?f=p:c=="dangerouslySetInnerHTML"?d=p:c=="value"?b=p:c=="checked"?m=p:c==="key"||u&&typeof p!="function"||y[c]===p||Ce(e,c,p,y[c],n);if(d)u||l&&(d.__html===l.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(l&&(e.innerHTML=""),pr(e,Ee(f)?f:[f],t,r,o,n&&_!=="foreignObject",s,i,s?s[0]:r.__k&&ue(r,0),u,a),s!=null)for(c=s.length;c--;)s[c]!=null&&lr(s[c]);u||(c="value",b!==void 0&&(b!==e[c]||_==="progress"&&!b||_==="option"&&b!==y[c])&&Ce(e,c,b,y[c],!1),c="checked",m!==void 0&&m!==e[c]&&Ce(e,c,m,y[c],!1))}return e}function tt(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(o){x.__e(o,r)}}function Qe(e,t,r){var o,n;if(x.unmount&&x.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||tt(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(s){x.__e(s,t)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(n=0;n<o.length;n++)o[n]&&Qe(o[n],t,r||typeof e.type!="function");r||e.__e==null||lr(e.__e),e.__=e.__e=e.__d=void 0}function hn(e,t,r){return this.constructor(e,r)}function le(e,t,r){var o,n,s,i;x.__&&x.__(e,t),n=(o=typeof r=="function")?null:r&&r.__k||t.__k,s=[],i=[],et(t,e=(!o&&r||t).__k=U(D,null,[e]),n||me,me,t.ownerSVGElement!==void 0,!o&&r?[r]:n?null:t.firstChild?he.call(t.childNodes):null,s,!o&&r?r:n?n.__e:t.firstChild,o,i),fr(s,e,i)}function mr(e,t){le(e,t,mr)}function gn(e,t,r){var o,n,s,i,u=Q({},e.props);for(s in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)s=="key"?o=t[s]:s=="ref"?n=t[s]:u[s]=t[s]===void 0&&i!==void 0?i[s]:t[s];return arguments.length>2&&(u.children=arguments.length>3?he.call(arguments,2):r),fe(e.type,u,o||e.key,n||e.ref,null)}function rt(e,t){var r={__c:t="__cC"+ar++,__:e,Consumer:function(o,n){return o.children(n)},Provider:function(o){var n,s;return this.getChildContext||(n=[],(s={})[t]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(i){this.props.value!==i.value&&n.some(function(u){u.__e=!0,We(u)})},this.sub=function(i){n.push(i);var u=i.componentWillUnmount;i.componentWillUnmount=function(){n.splice(n.indexOf(i),1),u&&u.call(i)}}),o.children}};return r.Provider.__=r.Consumer.contextType=r}he=ur.slice,x={__e:function(e,t,r,o){for(var n,s,i;t=t.__;)if((n=t.__c)&&!n.__)try{if((s=n.constructor)&&s.getDerivedStateFromError!=null&&(n.setState(s.getDerivedStateFromError(e)),i=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,o||{}),i=n.__d),i)return n.__E=n}catch(u){e=u}throw e}},sr=0,B.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Q({},this.state),typeof e=="function"&&(e=e(Q({},r),this.props)),e&&Q(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),We(this))},B.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),We(this))},B.prototype.render=D,ee=[],ir=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$e=function(e,t){return e.__v.__b-t.__v.__b},xe.__r=0,ar=0;var bn=0;function R(e,t,r,o,n,s){var i,u,a={};for(u in t)u=="ref"?i=t[u]:a[u]=t[u];var c={type:e,props:a,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--bn,__i:-1,__u:0,__source:n,__self:s};if(typeof e=="function"&&(i=e.defaultProps))for(u in i)a[u]===void 0&&(a[u]=i[u]);return x.vnode&&x.vnode(c),c}var Z,P,Pe,ht,ce=0,vr=[],we=[],gt=x.__b,bt=x.__r,Ct=x.diffed,wt=x.__c,kt=x.unmount;function te(e,t){x.__h&&x.__h(P,e,ce||t),ce=0;var r=P.__H||(P.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:we}),r.__[e]}function J(e){return ce=1,nt(gr,e)}function nt(e,t,r){var o=te(Z++,2);if(o.t=e,!o.__c&&(o.__=[r?r(t):gr(void 0,t),function(u){var a=o.__N?o.__N[0]:o.__[0],c=o.t(a,u);a!==c&&(o.__N=[c,o.__[1]],o.__c.setState({}))}],o.__c=P,!P.u)){var n=function(u,a,c){if(!o.__c.__H)return!0;var d=o.__c.__H.__.filter(function(f){return f.__c});if(d.every(function(f){return!f.__N}))return!s||s.call(this,u,a,c);var l=!1;return d.forEach(function(f){if(f.__N){var p=f.__[0];f.__=f.__N,f.__N=void 0,p!==f.__[0]&&(l=!0)}}),!(!l&&o.__c.props===u)&&(!s||s.call(this,u,a,c))};P.u=!0;var s=P.shouldComponentUpdate,i=P.componentWillUpdate;P.componentWillUpdate=function(u,a,c){if(this.__e){var d=s;s=void 0,n(u,a,c),s=d}i&&i.call(this,u,a,c)},P.shouldComponentUpdate=n}return o.__N||o.__}function j(e,t){var r=te(Z++,3);!x.__s&&it(r.__H,t)&&(r.__=e,r.i=t,P.__H.__h.push(r))}function pe(e,t){var r=te(Z++,4);!x.__s&&it(r.__H,t)&&(r.__=e,r.i=t,P.__h.push(r))}function Y(e){return ce=5,X(function(){return{current:e}},[])}function yr(e,t,r){ce=6,pe(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function X(e,t){var r=te(Z++,7);return it(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ve(e,t){return ce=8,X(function(){return e},t)}function ot(e){var t=P.context[e.__c],r=te(Z++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(P)),t.props.value):e.__}function st(e,t){x.useDebugValue&&x.useDebugValue(t?t(e):e)}function hr(){var e=te(Z++,11);if(!e.__){for(var t=P.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Cn(){for(var e;e=vr.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ke),e.__H.__h.forEach(Ge),e.__H.__h=[]}catch(t){e.__H.__h=[],x.__e(t,e.__v)}}x.__b=function(e){P=null,gt&&gt(e)},x.__r=function(e){bt&&bt(e),Z=0;var t=(P=e.__c).__H;t&&(Pe===P?(t.__h=[],P.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=we,r.__N=r.i=void 0})):(t.__h.forEach(ke),t.__h.forEach(Ge),t.__h=[],Z=0)),Pe=P},x.diffed=function(e){Ct&&Ct(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(vr.push(t)!==1&&ht===x.requestAnimationFrame||((ht=x.requestAnimationFrame)||wn)(Cn)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==we&&(r.__=r.__V),r.i=void 0,r.__V=we})),Pe=P=null},x.__c=function(e,t){t.some(function(r){try{r.__h.forEach(ke),r.__h=r.__h.filter(function(o){return!o.__||Ge(o)})}catch(o){t.some(function(n){n.__h&&(n.__h=[])}),t=[],x.__e(o,r.__v)}}),wt&&wt(e,t)},x.unmount=function(e){kt&&kt(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(o){try{ke(o)}catch(n){t=n}}),r.__H=void 0,t&&x.__e(t,r.__v))};var St=typeof requestAnimationFrame=="function";function wn(e){var t,r=function(){clearTimeout(o),St&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(r,100);St&&(t=requestAnimationFrame(r))}function ke(e){var t=P,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),P=t}function Ge(e){var t=P;e.__c=e.__(),P=t}function it(e,t){return!e||e.length!==t.length||t.some(function(r,o){return r!==e[o]})}function gr(e,t){return typeof t=="function"?t(e):t}function br(e,t){for(var r in t)e[r]=t[r];return e}function Ze(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var o in t)if(o!=="__source"&&e[o]!==t[o])return!0;return!1}function Re(e){this.props=e}function Cr(e,t){function r(n){var s=this.props.ref,i=s==n.ref;return!i&&s&&(s.call?s(null):s.current=null),t?!t(this.props,n)||!i:Ze(this.props,n)}function o(n){return this.shouldComponentUpdate=r,U(e,n)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}(Re.prototype=new B).isPureReactComponent=!0,Re.prototype.shouldComponentUpdate=function(e,t){return Ze(this.props,e)||Ze(this.state,t)};var xt=x.__b;x.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xt&&xt(e)};var kn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function at(e){function t(r){var o=br({},r);return delete o.ref,e(o,r.ref||null)}return t.$$typeof=kn,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Rt=function(e,t){return e==null?null:G(G(e).map(t))},wr={map:Rt,forEach:Rt,count:function(e){return e?G(e).length:0},only:function(e){var t=G(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:G},Sn=x.__e;x.__e=function(e,t,r,o){if(e.then){for(var n,s=t;s=s.__;)if((n=s.__c)&&n.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),n.__c(e,t)}Sn(e,t,r,o)};var It=x.unmount;function kr(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),e.__c.__H=null),(e=br({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(o){return kr(o,t,r)})),e}function Sr(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(o){return Sr(o,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function ae(){this.__u=0,this.t=null,this.__b=null}function xr(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Le(e){var t,r,o;function n(s){if(t||(t=e()).then(function(i){r=i.default||i},function(i){o=i}),o)throw o;if(!r)throw t;return U(r,s)}return n.displayName="Lazy",n.__f=!0,n}function se(){this.u=null,this.o=null}x.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),It&&It(e)},(ae.prototype=new B).__c=function(e,t){var r=t.__c,o=this;o.t==null&&(o.t=[]),o.t.push(r);var n=xr(o.__v),s=!1,i=function(){s||(s=!0,r.__R=null,n?n(u):u())};r.__R=i;var u=function(){if(!--o.__u){if(o.state.__a){var a=o.state.__a;o.__v.__k[0]=Sr(a,a.__c.__P,a.__c.__O)}var c;for(o.setState({__a:o.__b=null});c=o.t.pop();)c.forceUpdate()}};o.__u++||32&t.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(i,i)},ae.prototype.componentWillUnmount=function(){this.t=[]},ae.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=kr(this.__b,r,o.__O=o.__P)}this.__b=null}var n=t.__a&&U(D,null,e.fallback);return n&&(n.__u&=-33),[U(D,null,t.__a?null:e.children),n]};var At=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function xn(e){return this.getChildContext=function(){return e.context},e.children}function Rn(e){var t=this,r=e.i;t.componentWillUnmount=function(){le(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(o){this.childNodes.push(o),t.i.appendChild(o)},insertBefore:function(o,n){this.childNodes.push(o),t.i.appendChild(o)},removeChild:function(o){this.childNodes.splice(this.childNodes.indexOf(o)>>>1,1),t.i.removeChild(o)}}),le(U(xn,{context:t.context},e.__v),t.l)}function Rr(e,t){var r=U(Rn,{__v:e,i:t});return r.containerInfo=t,r}(se.prototype=new B).__a=function(e){var t=this,r=xr(t.__v),o=t.o.get(e);return o[0]++,function(n){var s=function(){t.props.revealOrder?(o.push(n),At(t,e,o)):n()};r?r(s):s()}},se.prototype.render=function(e){this.u=null,this.o=new Map;var t=G(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},se.prototype.componentDidUpdate=se.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){At(e,r,t)})};var Ir=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,In=/^(?: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]/,An=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,En=/[A-Z0-9]/g,Ln=typeof document<"u",Nn=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Ar(e,t,r){return t.__k==null&&(t.textContent=""),le(e,t),typeof r=="function"&&r(),e?e.__c:null}function Er(e,t,r){return mr(e,t),typeof r=="function"&&r(),e?e.__c:null}B.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(B.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Et=x.event;function Tn(){}function Pn(){return this.cancelBubble}function On(){return this.defaultPrevented}x.event=function(e){return Et&&(e=Et(e)),e.persist=Tn,e.isPropagationStopped=Pn,e.isDefaultPrevented=On,e.nativeEvent=e};var ut,Vn={enumerable:!1,configurable:!0,get:function(){return this.class}},Lt=x.vnode;x.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,o=t.type,n={};for(var s in r){var i=r[s];if(!(s==="value"&&"defaultValue"in r&&i==null||Ln&&s==="children"&&o==="noscript"||s==="class"||s==="className")){var u=s.toLowerCase();s==="defaultValue"&&"value"in r&&r.value==null?s="value":s==="download"&&i===!0?i="":u==="ondoubleclick"?s="ondblclick":u!=="onchange"||o!=="input"&&o!=="textarea"||Nn(r.type)?u==="onfocus"?s="onfocusin":u==="onblur"?s="onfocusout":An.test(s)?s=u:o.indexOf("-")===-1&&In.test(s)?s=s.replace(En,"-$&").toLowerCase():i===null&&(i=void 0):u=s="oninput",u==="oninput"&&n[s=u]&&(s="oninputCapture"),n[s]=i}}o=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=G(r.children).forEach(function(a){a.props.selected=n.value.indexOf(a.props.value)!=-1})),o=="select"&&n.defaultValue!=null&&(n.value=G(r.children).forEach(function(a){a.props.selected=n.multiple?n.defaultValue.indexOf(a.props.value)!=-1:n.defaultValue==a.props.value})),r.class&&!r.className?(n.class=r.class,Object.defineProperty(n,"className",Vn)):(r.className&&!r.class||r.class&&r.className)&&(n.class=n.className=r.className),t.props=n}(e),e.$$typeof=Ir,Lt&&Lt(e)};var Nt=x.__r;x.__r=function(e){Nt&&Nt(e),ut=e.__c};var Tt=x.diffed;x.diffed=function(e){Tt&&Tt(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),ut=null};var Lr={ReactCurrentDispatcher:{current:{readContext:function(e){return ut.__n[e.__c].props.value}}}};function Nr(e){return U.bind(null,e)}function ge(e){return!!e&&e.$$typeof===Ir}function Tr(e){return ge(e)&&e.type===D}function Pr(e){return ge(e)?gn.apply(null,arguments):e}function Ie(e){return!!e.__k&&(le(null,e),!0)}function Or(e){return e&&(e.base||e.nodeType===1&&e)||null}var Vr=function(e,t){return e(t)},qr=function(e,t){return e(t)},Mr=D;function lt(e){e()}function Ur(e){return e}function Hr(){return[!1,lt]}var jr=pe,Dr=ge;function Fr(e,t){var r=t(),o=J({h:{__:r,v:t}}),n=o[0].h,s=o[1];return pe(function(){n.__=r,n.v=t,Oe(n)&&s({h:n})},[e,r,t]),j(function(){return Oe(n)&&s({h:n}),e(function(){Oe(n)&&s({h:n})})},[e]),r}function Oe(e){var t,r,o=e.v,n=e.__;try{var s=o();return!((t=n)===(r=s)&&(t!==0||1/t==1/r)||t!=t&&r!=r)}catch{return!0}}var Br={useState:J,useId:hr,useReducer:nt,useEffect:j,useLayoutEffect:pe,useInsertionEffect:jr,useTransition:Hr,useDeferredValue:Ur,useSyncExternalStore:Fr,startTransition:lt,useRef:Y,useImperativeHandle:yr,useMemo:X,useCallback:ve,useContext:ot,useDebugValue:st,version:"17.0.2",Children:wr,render:Ar,hydrate:Er,unmountComponentAtNode:Ie,createPortal:Rr,createElement:U,createContext:rt,createFactory:Nr,cloneElement:Pr,createRef:cr,Fragment:D,isValidElement:ge,isElement:Dr,isFragment:Tr,findDOMNode:Or,Component:B,PureComponent:Re,memo:Cr,forwardRef:at,flushSync:qr,unstable_batchedUpdates:Vr,StrictMode:Mr,Suspense:ae,SuspenseList:se,lazy:Le,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Lr};const qn=Object.freeze(Object.defineProperty({__proto__:null,Children:wr,Component:B,Fragment:D,PureComponent:Re,StrictMode:Mr,Suspense:ae,SuspenseList:se,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Lr,cloneElement:Pr,createContext:rt,createElement:U,createFactory:Nr,createPortal:Rr,createRef:cr,default:Br,findDOMNode:Or,flushSync:qr,forwardRef:at,hydrate:Er,isElement:Dr,isFragment:Tr,isValidElement:ge,lazy:Le,memo:Cr,render:Ar,startTransition:lt,unmountComponentAtNode:Ie,unstable_batchedUpdates:Vr,useCallback:ve,useContext:ot,useDebugValue:st,useDeferredValue:Ur,useEffect:j,useErrorBoundary:function(e){var t=te(Z++,10),r=J();return t.__=e,P.componentDidCatch||(P.componentDidCatch=function(o,n){t.__&&t.__(o,n),r[1](o)}),[r[0],function(){r[1](void 0)}]},useId:hr,useImperativeHandle:yr,useInsertionEffect:jr,useLayoutEffect:pe,useMemo:X,useReducer:nt,useRef:Y,useState:J,useSyncExternalStore:Fr,useTransition:Hr,version:"17.0.2"},Symbol.toStringTag,{value:"Module"})),Pt=e=>{let t;const r=new Set,o=(i,u)=>{const a=typeof i=="function"?i(t):i;if(!Object.is(a,t)){const c=t;t=u??typeof a!="object"?a:Object.assign({},t,a),r.forEach(d=>d(t,c))}},n=()=>t,s={setState:o,getState:n,subscribe:i=>(r.add(i),()=>r.delete(i)),destroy:()=>r.clear()};return t=e(o,n,s),s};function Mn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Un(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}),r}var Ot={exports:{}},Ve={};const $r=Un(qn);var Vt,qt,Mt,Ut,Ht={exports:{}},qe={};function Hn(){return qt||(qt=1,Ht.exports=function(){if(Vt)return qe;Vt=1;var e=$r,t=typeof Object.is=="function"?Object.is:function(a,c){return a===c&&(a!==0||1/a==1/c)||a!=a&&c!=c},r=e.useState,o=e.useEffect,n=e.useLayoutEffect,s=e.useDebugValue;function i(a){var c=a.getSnapshot;a=a.value;try{var d=c();return!t(a,d)}catch{return!0}}var u=typeof window>"u"||window.document===void 0||window.document.createElement===void 0?function(a,c){return c()}:function(a,c){var d=c(),l=r({inst:{value:d,getSnapshot:c}}),f=l[0].inst,p=l[1];return n(function(){f.value=d,f.getSnapshot=c,i(f)&&p({inst:f})},[a,d,c]),o(function(){return i(f)&&p({inst:f}),a(function(){i(f)&&p({inst:f})})},[a]),s(d),d};return qe.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,qe}()),Ht.exports}var jn=(Ut||(Ut=1,Ot.exports=function(){if(Mt)return Ve;Mt=1;var e=$r,t=Hn(),r=typeof Object.is=="function"?Object.is:function(a,c){return a===c&&(a!==0||1/a==1/c)||a!=a&&c!=c},o=t.useSyncExternalStore,n=e.useRef,s=e.useEffect,i=e.useMemo,u=e.useDebugValue;return Ve.useSyncExternalStoreWithSelector=function(a,c,d,l,f){var p=n(null);if(p.current===null){var b={hasValue:!1,value:null};p.current=b}else b=p.current;p=i(function(){function y(S){if(!C){if(C=!0,g=S,S=l(S),f!==void 0&&b.hasValue){var h=b.value;if(f(h,S))return _=h}return _=S}if(h=_,r(g,S))return h;var v=l(S);return f!==void 0&&f(h,v)?h:(g=S,_=v)}var g,_,C=!1,k=d===void 0?null:d;return[function(){return y(c())},k===null?void 0:function(){return y(k())}]},[c,d,l,f]);var m=o(a,p[0],p[1]);return s(function(){b.hasValue=!0,b.value=m},[m]),u(m),m},Ve}()),Ot.exports);const Dn=Mn(jn),{useSyncExternalStoreWithSelector:Fn}=Dn,jt=e=>{const t=typeof e=="function"?(o=>o?Pt(o):Pt)(e):e,r=(o,n)=>function(s,i=s.getState,u){const a=Fn(s.subscribe,s.getState,s.getServerState||s.getState,i,u);return st(a),a}(t,o,n);return Object.assign(r,t),r},Wr=e=>e?jt(e):jt;var Qr=(e=>(e.RIGHT="right",e.LEFT="left",e))(Qr||{});const Me=e=>e!=null&&typeof e=="object"&&typeof Reflect.get(e,"taskStatus")=="string",Dt=e=>e!=null&&typeof e=="object"&&!Array.isArray(e)&&Object.values(e).every(t=>t===null||typeof t=="string"),Ft=e=>e!=null&&typeof e=="object"&&!Array.isArray(e)&&Object.values(e).every(t=>t===null||typeof t=="number"),Bt=e=>Array.isArray(e)&&e.every(t=>Array.isArray(t)&&t.every(r=>{if(typeof r!="object"||r===null)return!1;const o=Reflect.get(r,"selected");return o==="left"||o==="right"||o===null})),Ke=(e,t)=>{const{allowUndefined:r=!0,rejectBooleanRecord:o=!1}=t??{};if(e===void 0)return r;if(e===null||typeof e=="string"||typeof e=="number"||Array.isArray(e))return!0;if(typeof e=="object"&&e!==null){if(o){const n=Object.values(e);if(n.length>0&&n.every(s=>typeof s=="boolean"))return!1}return!0}return!1},ze=(e,t)=>{var r;if(t===null)return null;if(e.type==="texturlprompt")return(o=>o===void 0||typeof o=="object"&&o!==null&&"skipped"in o)(t)?t:void 0;if(t===void 0)return null;if(e.type==="consentlegal")return typeof t=="object"&&"submitted"in t&&t.submitted===!0?t:null;if(e.type==="multipleselect"){const o=(r=e.props)==null?void 0:r.options;if(Array.isArray(o)&&(n=>typeof n=="object"&&n!==null&&!Array.isArray(n)&&Object.values(n).every(s=>typeof s=="boolean"))(t)){const n=t;return o.reduce((s,i)=>(n[String(i.id)]&&s.push(i.value),s),[])}}if(e.type==="multiplechoice"){if(typeof t=="object"&&t!==null&&!Array.isArray(t)){if(Object.keys(t).length===0)return null;const o=Object.values(t).find(n=>n!==!1&&n!==void 0);if(o!==void 0)return o}return Ke(t,{allowUndefined:!1,rejectBooleanRecord:!0})?t:null}return Ke(t,{allowUndefined:!1,rejectBooleanRecord:!0})?t:null},Bn=/<piped-value\b([^>]*)>.*?<\/piped-value>/gis,$t=["questionHtml","captionHtml","footerHtml","richTextBody"],Je=e=>!!e.props&&typeof e.props=="object"&&"properties"in e.props,Ue=e=>!!e.props&&typeof e.props=="object"&&"options"in e.props&&Array.isArray(e.props.options),Wt=e=>["string","number"].includes(typeof e),Qt=e=>e.length===0?"":e.length===1?e[0]:e.join(", "),$n=e=>{var r,o;const t=(n=>n!=null&&typeof n=="object"&&"value"in n)(e)?e.value:void 0;if(t!=null){if(e.type==="multipleselect"&&Ue(e)&&(n=>!!n&&typeof n=="object"&&!Array.isArray(n))(t)){const n=e.secondaryValue??null,s=e.props.options.filter(i=>t[String(i.id)]===!0).map(i=>{var u;return i.label+((u=n==null?void 0:n[String(i.id)])!=null&&u.userText?`: ${n[String(i.id)].userText}`:"")});return s.length?Qt(s):"No options selected"}if(e.type==="multiplechoice"&&typeof t=="object"&&t!==null){const n=Object.keys(t);if(n.length===0)return"No options selected";const s=e.secondaryValue??null,i=n[0];if(i){const u=e.props.options.find(a=>String(a.id)===i);return(u==null?void 0:u.label)+((r=s==null?void 0:s[i])!=null&&r.userText?`: ${(o=s==null?void 0:s[i])==null?void 0:o.userText}`:"")}}if(e.type==="matrix"&&Ue(e)&&(n=>{if(!Je(n))return!1;const s=n.props.properties;return!!s&&typeof s=="object"&&"matrixColumn"in s})(e)){const n=e.props.options,s=e.props.properties.matrixColumn,i=[];for(const[u,a]of Object.entries(t)){const c=n.find(b=>String(b.id)===u),d=(c==null?void 0:c.label)??u,l=Wt(a)?String(a):JSON.stringify(a),f=s.find(b=>b.value===l),p=(f==null?void 0:f.label)??l;i.push(`${d}: ${p}`)}return i.join("; ")}if(e.type==="rankorder"&&Ue(e)){const n=e.props.options.reduce((i,u)=>(i[String(u.id)]=u.label,i),{}),s=[];for(const[i,u]of Object.entries(t)){const a=n[i];a&&(s[u-1]=a)}return Qt(s)}if(Wt(t)){const n=String(t).replaceAll(/[\u200B-\u200D\uFEFF]/g,"").trim();return n===""?void 0:n}try{return JSON.stringify(t)}catch{return String(t)}}},Gt=(e,t)=>{const r=new RegExp(`${t}="([^"]*)"`,"i").exec(e);return(r==null?void 0:r[1])??null},Wn=(e,t)=>{if(e==null)return e;let r=!1;const o=e.replace(Bn,(n,s)=>{r=!0;const i=Gt(s,"answer-id"),u=Gt(s,"fallback-text")??"";if(!i)return u;const a=i.startsWith("attr-")?i:Number(i);if(Object.hasOwn(t,a)){const c=t[a];return String(c)}return u});return r?o:e},Ye=(e,t)=>{const r={};if(t)for(const[o,n]of Object.entries(t))typeof n=="string"?r[`attr-${o}`]=n:n!=null&&(r[`attr-${o}`]=JSON.stringify(n));for(const o of e){const n=$n(o);n!==void 0&&(r[o.name]=n)}return r},Qn=(e,t,r)=>{switch(t){case"videovoice":return!!(e!=null&&e.value);case"open":return!!r;case"multipleselect":return!!(r&&Object.keys(r).length);case"recordedtask":return r!==null&&typeof r=="object"&&"taskStatus"in r&&r.taskStatus==="completed";case"texturlprompt":return!e.value;case"consentlegal":case"nps":case"likert":return r!==null;case"multiplechoice":return r!==void 0;case"matrix":return!!(r&&Object.values(r).every(o=>o!==null));default:return!0}},Gr=(e,t)=>{if(t==="matrix"&&e&&typeof e=="object"){const r=Object.keys(e).length,o=Object.values(e).filter(n=>n!==null).length;return o>0&&o<r}return!1},Ae=e=>e==null?"":typeof e=="object"?JSON.stringify(e):typeof e=="string"?e:String(e),ie={eq:(e,t)=>Number(e)===Number(t),neq:(e,t)=>!ie.eq(e,t),gt:(e,t)=>Number(e)>Number(t),gte:(e,t)=>Number(e)>=Number(t),lt:(e,t)=>Number(e)<Number(t),lte:(e,t)=>Number(e)<=Number(t),list_exact(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;const r=(o,n)=>String(o).localeCompare(String(n));return e.slice().sort(r).join(",")===t.slice().sort(r).join(",")},list_all:(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&!t.some(r=>!e.includes(r)),list_alo(e,t){if(!Array.isArray(t))return!1;const r=Array.isArray(e)?e:[e],o=new Set(r);return t.some(n=>o.has(n))},list_dni(e,t){if(!Array.isArray(t))return!1;const r=Array.isArray(e)?e:[e],o=new Set(r);return t.every(n=>!o.has(n))},contains(e,t){const r=Ae(e).toLowerCase(),o=Ae(t).toLowerCase();return r.includes(o)},notcontains:(e,t)=>!ie.contains(e,t)},ct=(e,t,r)=>r>0?t?e.length-3:e.length-2:t?e.length-2:e.length-1,ye={eq:(e,t)=>e==t,neq:(e,t)=>!ye.eq(e,t),gt:(e,t)=>Number(e)>Number(t),gte:(e,t)=>Number(e)>=Number(t),lt:(e,t)=>Number(e)<Number(t),lte:(e,t)=>Number(e)<=Number(t),list_exact(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;const r=(o,n)=>String(o).localeCompare(String(n));return e.slice().sort(r).join(",")===t.slice().sort(r).join(",")},list_all:(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&!t.some(r=>!e.includes(r)),list_alo(e,t){if(!Array.isArray(t))return!1;const r=Array.isArray(e)?e:[e],o=new Set(r);return t.some(n=>o.has(n))},list_dni(e,t){if(!Array.isArray(t))return!1;const r=Array.isArray(e)?e:[e],o=new Set(r);return t.every(n=>!o.has(n))},contains(e,t){const r=String(e??"").toLowerCase(),o=String(t??"").toLowerCase();return r.includes(o)},notcontains:(e,t)=>!ye.contains(e,t)},Gn=e=>e in ye,Ne=1,Zr=2,Zn=e=>{var o,n,s;switch(e.type){case"multipleselect":return e&&e.props&&e.props.options?e.props.options.length>13?e.props.options.map(i=>[i.value]):(t=e.props.options.map(i=>i.value),r=!e.props.properties.required,t.reduce((i,u)=>i.concat(i.map(a=>[...a,u])),[[]]).filter(i=>r||i.length>0)):null;case"multiplechoice":{if(!e||!e.props||!e.props.options)return null;const i=e.props.options.map(u=>u.value);return e.props.properties.required||i.push(void 0),i}case"matrix":{if(!((o=e==null?void 0:e.props)!=null&&o.options))return null;const i=e.props.properties.matrixColumn,u=e.props.options,a=u.reduce((d,l)=>(d[l.id]=null,d),{}),c=[{...a,[u[0].id]:i[0].value},u.reduce((d,l)=>(d[l.id]=i[0].value,d),{})];return e.props.properties.required||c.push(a),c}case"likert":{const i=Number((s=(n=e.props)==null?void 0:n.properties)==null?void 0:s.range)||5;return[...Array.from(new Array(i).keys()).map(a=>a+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 i=[{taskStatus:"completed"},{taskStatus:"given.up"}];return e.props.properties.required||i.push({taskStatus:"abandoned"}),i}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,r},Kn=e=>typeof e=="object"&&e!==null&&"taskStatus"in e,zn=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&"comparator"in e&&"questionIndex"in e,Kr=(e,t)=>{const r=[];for(const o of e)Array.isArray(o)?r.push(...Kr(o,t)):zn(o)&&o.questionIndex===t&&r.push(o);return r},Jn=(e,t=[])=>t.reduce((r,o)=>{const{group:n,target:s}=o;if(!(n!=null&&n.length))return[...r];const i=Kr(n,e).map(u=>{const{comparator:a,value:c}=u;return{comparator:a,target:s,value:c}});return[...r,...i]},[]),zr=({cards:e,index:t,hasEndCard:r,allResponses:o,uploadProgress:n={},surveyVisitorAttributes:s={}})=>{var d;if(t>=e.length||t<0)return null;let i=t+1;const u=e[t].props.routingOptions||[];for(const l of u){if(!Jr(l))continue;const{group:f,target:p}=l;if(en({group:f,allResponses:o,cards:e,surveyVisitorAttributes:s})){i=p===-1&&r?e.length-1:p;break}}const a=e.findIndex(l=>l.type==="uploading"),c=ct(e,r,a);for(;i!==null&&i!==-1&&i<=c;){const l=e[i],f=((d=l==null?void 0:l.props)==null?void 0:d.displayLogic)||[];if(f.length>0&&!dt({displayLogic:f,allResponses:o,cards:e,surveyVisitorAttributes:s})){i++;continue}if(l!=null&&l.parentId){const p=e.findIndex(b=>b.name===l.parentId);if(p>-1){const b=e[p],m=o[p],y=de({comparator:"answered",type:b.type,response:m}),g=b.type==="matrix"&&de({comparator:"partial",type:b.type,response:m});if(!(y||g)){i++;continue}}}break}return t>=c||i===-1||i!==null&&i>c?a>0&&Object.values(n).some(f=>f.isSubmitted&&!f.isComplete)?a:r?e.length-1:null:i===-1?null:i},Jr=e=>typeof e=="object"&&e!==null&&"group"in e,Yr=e=>e===Ne||e===Zr,Zt=({segment:e,allResponses:t,cards:r,surveyVisitorAttributes:o})=>Array.isArray(e)?Xr({segments:e,allResponses:t,cards:r,surveyVisitorAttributes:o}):!Yr(e)&&!!(n=>typeof n=="object"&&n!==null&&!Array.isArray(n)&&"comparator"in n)(e)&&(({rule:n,allResponses:s,cards:i,surveyVisitorAttributes:u})=>{if(n.questionIndex===void 0||typeof n.questionIndex=="number"&&n.questionIndex>=s.length)return!1;const a=(({rule:c,allResponses:d,cards:l,surveyVisitorAttributes:f})=>{if(c.questionIndex===void 0)return null;if(typeof(p=c.questionIndex)=="string"&&p.startsWith("attr-")){const m=(y=>y.slice(5))(c.questionIndex);return m in f?{response:f[m],type:"AttributeCheck"}:null}var p;const b=c.questionIndex;return{response:d[b],type:l[b].type}})({rule:n,allResponses:s,cards:i,surveyVisitorAttributes:u});return a!==null&&!!de({comparator:n.comparator,response:a.response,type:a.type,value:n.value})})({rule:e,allResponses:t,cards:r,surveyVisitorAttributes:o}),Xr=({segments:e,allResponses:t,cards:r,surveyVisitorAttributes:o})=>{if(!e||e.length===0)return!1;let n=Zt({segment:e[0],allResponses:t,cards:r,surveyVisitorAttributes:o}),s=1;for(;s<e.length;){const i=e[s];if(!Yr(i)||(s+=1,s>=e.length))return!1;const u=Zt({segment:e[s],allResponses:t,cards:r,surveyVisitorAttributes:o});s+=1,n=i===Ne?n&&u:n||u}return n},dt=({displayLogic:e,allResponses:t,cards:r,surveyVisitorAttributes:o})=>e.some(n=>!!Jr(n)&&en({group:n.group,allResponses:t,cards:r,surveyVisitorAttributes:o})),en=({group:e,allResponses:t,cards:r,surveyVisitorAttributes:o})=>Xr({segments:e,allResponses:t,cards:r,surveyVisitorAttributes:o}),de=({comparator:e,response:t,type:r,value:o})=>{if(r==="AttributeCheck")return((s,i,u)=>{const a=Ae(i),c=Ae(u),d=Number(i),l=Number(u),f=!Number.isNaN(d)&&a===String(d),p=!Number.isNaN(l)&&c===String(l),b=f&&p;switch(s){case"eq":return b?d===l:a.toLowerCase()===c.toLowerCase();case"neq":return b?d!==l:a.toLowerCase()!==c.toLowerCase();case"contains":case"notcontains":return ie[s](a,c);case"gt":case"gte":case"lt":case"lte":return b?ie[s](d,l):ie[s](a.localeCompare(c),0);case"list_exact":case"list_all":case"list_alo":case"list_dni":{const m=Array.isArray(i)?i:[i],y=Array.isArray(u)?u:[u];return ie[s](m,y)}default:return!1}})(e,t,o);if(!Ke(t))return!1;const n=t;if(e==="answered")switch(r){case"texturlprompt":return n===void 0;case"consentlegal":return n&&(s=>s===null||s!==void 0&&typeof s=="object"&&"submitted"in s&&typeof s.submitted=="boolean")(n)&&n.submitted===!0;case"recordedtask":return Me(n)&&n.taskStatus==="completed";case"likert":case"nps":return Number.isInteger(n);case"rankorder":return Ft(n)&&Object.values(n).every(s=>s!==null);case"matrix":return Dt(n)&&Object.values(n).every(s=>s!==null);case"maxdiff":return Bt(n)&&n.every(s=>{if(!Array.isArray(s))return!1;const i=s.some(a=>a.selected==="left"),u=s.some(a=>a.selected==="right");return i&&u});case"multiplechoice":return!!n;case"multipleselect":return n&&Array.isArray(n)&&(n.length??0)>0;case"open":case"aidynamicstandalone":return typeof n=="string"&&!!n;case"videovoice":return(s=>s!=null&&typeof s=="object"&&"mediaRecordingUid"in s&&typeof s.mediaRecordingUid=="string")(n)&&!!n.mediaRecordingUid;default:return!1}if(e==="given_up")return r!=="recordedtask"||Me(n)&&n.taskStatus==="given.up";if(e==="partial")return Gr(n,r);if(e==="skipped")switch(r){case"texturlprompt":return(s=>s!==null&&(s===void 0||typeof s=="object"))(n)&&!!(typeof n=="object"&&n!==null&&"skipped"in n&&n.skipped);case"consentlegal":case"likert":case"nps":case"videovoice":return n===null;case"recordedtask":return Me(n)&&n.taskStatus==="abandoned";case"open":case"aidynamicstandalone":return n===null||typeof n=="string"&&n.length===0;case"multiplechoice":return n==null;case"multipleselect":return n===null||Array.isArray(n)&&n.length===0;case"matrix":return n===null||Dt(n)&&Object.values(n).every(s=>s===null);case"maxdiff":return n===null||!Bt(n)||n.some(s=>{if(!Array.isArray(s))return!0;const i=s.some(a=>a.selected==="left"),u=s.some(a=>a.selected==="right");return!(i&&u)});case"rankorder":return n===null||Ft(n)&&Object.values(n).includes(null);default:return!1}return o!==void 0&&ye[e](n,o)};var tn=(e=>(e.CONTINUE="CONTINUE",e.EXTERNAL="EXTERNAL",e.NO_BUTTON="NO_BUTTON",e))(tn||{}),z=(e=>(e.failure="failure",e.success="success",e.inFlight="inFlight",e))(z||{}),rn=(e=>(e.Unlimited="Unlimited",e.Maximum="Maximum",e.Range="Range",e))(rn||{});const Yn=e=>{var t,r,o,n,s,i,u,a,c;switch(e.type){case"rankorder":case"multipleselect":case"multiplechoice":return(r=(t=e==null?void 0:e.props)==null?void 0:t.options)==null?void 0:r.map(d=>d.label);case"nps":return"1-10";case"likert":return`1-${((n=(o=e==null?void 0:e.props)==null?void 0:o.properties)==null?void 0:n.range)??5}`;case"matrix":return{matrixColumns:(u=(i=(s=e==null?void 0:e.props)==null?void 0:s.properties)==null?void 0:i.matrixColumn)==null?void 0:u.map(d=>d.label),matrixRows:(c=(a=e==null?void 0:e.props)==null?void 0:a.options)==null?void 0:c.map(d=>d.label)};default:return}},Xn=new Set(["rankorder","multipleselect","multiplechoice","matrix","likert","nps","open","aidynamicfollowup","aidynamicstandalone"]),Kt=({cards:e,combinedReadableRawResponses:t,targetQuestionId:r,generateQuestionType:o})=>{let n=1,s=1;const i=e.reduce((u,a)=>{if(a.name>0&&Xn.has(a.type)){if(r===a.name&&(s=n,o==="aidynamicstandalone"))return n++,u;if((a.type==="aidynamicfollowup"||a.type==="aidynamicstandalone")&&a.props.loading!==z.success)return u;const c="properties"in a.props&&a.props.properties&&"captionText"in a.props.properties?a.props.properties.captionText:void 0,d=(l=>l.type!=="uploading"&&l.type!=="thanks")(a)?{order:n++,question:a.props.message,questionDescription:c,questionType:a.type,response:t==null?void 0:t[a.name],options:Yn(a)}:{order:n++,questionType:a.type,response:t==null?void 0:t[a.name]};u.push(d)}return u},[]);return{targetQuestionOrder:s,questionsResponses:i}},zt=e=>{var t;return"props"in e&&"loading"in e.props&&((t=e==null?void 0:e.props)==null?void 0:t.loading)!==void 0},He=(e,t,r)=>{let o=!1;const n=e.map(s=>s&&s.parentId===t?(o=!0,r(s)):s);return o?n:e},je=(e,t,r)=>{let o=!1;const n=e.map(s=>s&&s.name===t?(o=!0,r(s)):s);return o?n:e},Jt=e=>{const{props:t}=e;return t&&"message"in t&&"properties"in t?{...e,props:{...t,loading:z.inFlight}}:e},Yt=({isPreview:e,apiURL:t,envId:r,userId:o,headers:n})=>e?{url:`${t}/sdk/1/environments/${r}/dynamic-question-preview`,visitorIdHeader:"0"}:{url:`${t}/sdk/1/environments/${r}/visitors/${o}/dynamic-question`,visitorIdHeader:n["x-ul-visitor-id"]},eo=(e,t)=>{const r=t[e];return typeof r!="number"?null:r},nn=(e,t)=>Array.isArray(e)?e.map(r=>nn(r,t)):(r=>typeof r=="object"&&r!==null&&!Array.isArray(r)&&"questionUid"in r)(e)?{...e,questionIndex:eo(e.questionUid,t)}:e,to=e=>e===Ne||e===Zr,Xt=({segment:e,allResponses:t,cards:r,currentIndex:o})=>Array.isArray(e)?on({constraintGroup:e,allResponses:t,cards:r,currentIndex:o}):typeof e!="number"&&!!(n=>typeof n=="object"&&n!==null&&!Array.isArray(n)&&"questionIndex"in n)(e)&&(({constraint:n,allResponses:s,cards:i,currentIndex:u})=>{const{questionIndex:a}=n;if(a===null)return!1;if(!Object.hasOwn(s,a))return!(u>a)||n.comparisonType==="skipped";const c=i[a];return c!==void 0&&!!de({comparator:n.comparisonType,response:s[a],type:c.type,value:n.value})})({constraint:e,allResponses:t,cards:r,currentIndex:o}),on=({constraintGroup:e,allResponses:t,cards:r,currentIndex:o})=>{if(e.length===0)return!1;let n=Xt({segment:e[0],allResponses:t,cards:r,currentIndex:o}),s=1;for(;s<e.length;){const i=e[s];if(typeof i!="number"||!to(i)||(s+=1,s>=e.length))return!1;const u=Xt({segment:e[s],allResponses:t,cards:r,currentIndex:o});s+=1,n=i===Ne?n&&u:n||u}return n},sn=e=>e.length>0&&e.every(t=>t.quotaFilled||!t.quotaMatched),ro=({quotas:e,quotaMessages:t})=>{if(e.length!==0)return e.every(r=>!r.quotaMatched)?t==null?void 0:t.disqualified:sn(e)?t==null?void 0:t.filled:void 0},er=e=>200+90*e+16*e,De=new Set(["thanks","uploading"]),$=Wr()((e,t)=>({providerPersona:void 0,showProviderPersona:!1,addResponseGroupMeta:void 0,allResponses:[],allResponsesRaw:{},answers:void 0,apiURL:"",avatars:{agentAvatar:{"1x":"","2x":""},respondentAvatar:{"1x":"","2x":""}},border:"#2f2e2c",cards:[],cardIndexByName:{},quotaEndcardText:void 0,quotaMessages:void 0,quotas:[],close:async(r=I.APP_ID)=>{const o=t(),{fadeout:n,remove:s,trackHistory:i,studyType:u}=o;await n(r),Fe(o)||i({event:"closed"}),I.breadcrumbsLogger.info("SurveyClosing",{surveyId:o.surveyId}),I.ConflictingWidgets.enable(),s({initiator:I.DismissReason.Closed,studyType:u})},configureExitOnOverlayClick:()=>{},customMetadata:{},destroy:async r=>{const{eventEmitFn:o,fadeout:n,remove:s,studyType:i,surveyId:u}=t();o("survey.complete",u),await n(r),I.ConflictingWidgets.enable(),s({initiator:I.DismissReason.Complete,studyType:i})},enableCspTrustedTypes:!1,endCard:{headline:""},envId:"",eventEmitFn:I.eventEmitter.emit.bind(I.eventEmitter),fadeout:async r=>{const{eventEmitFn:o,headers:n,viewDocument:s}=t();return I.shouldDirectEmbed(n)?Promise.resolve():(o(I.SprigEvent.SurveyFadingOut),new Promise(i=>{const u=s.getElementById(r);u?(u.addEventListener("transitionend",()=>{i()}),u.classList.remove("ul-app--visible")):i()}))},forceBrandedLogo:!1,frame:document.createElement("iframe"),handleClickEmbedButton:r=>{const{cards:o,eventEmitFn:n,index:s}=t();n(r,{qid:o[s].name,props:o[s].props}),e(()=>({hasViewedEmbed:!0}))},handleUploadUpdate:({mediaRecordingUid:r,isComplete:o,progressPct:n,isSubmitted:s})=>{var p,b,m;const{cards:i,destroy:u,index:a,uploadProgress:c}=t(),d=o||((p=c[r])==null?void 0:p.isComplete),l={...c,[r]:{progressPct:d?100:n||((b=c[r])==null?void 0:b.progressPct),isComplete:d,isSubmitted:s||((m=c[r])==null?void 0:m.isSubmitted)}};if(e({uploadProgress:l}),i[a].type!=="uploading")return;const f=Object.entries(c).every(([y,g])=>!g.isSubmitted||g.isComplete||r==y&&o);if(f&&a>=i.length-1)return u(I.APP_ID);e({index:f?a+1:a,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,isConversationalUI:!1,isPreview:!1,layout:"default",marketingUrl:"https://sprig.com",meta:{ch:0,cw:0,l:"",mode:null,p:"",sh:0,sw:0},mode:void 0,next:r=>{const{allResponses:o,cards:n,eventEmitFn:s,index:i,quotaMessages:u,quotas:a,responseGroupUid:c,submit:d,trackHistory:l,uploadProgress:f,viewedCardCount:p}=t(),b=Array.isArray(r.data)?r.data:[r.data],m=Date.now(),y=[...n],g={response:[],responseGroupUid:c,questionIndex:i};let _=null;const C=o.slice(0);let k=i;b.forEach((A,w)=>{const N=Math.floor(A.questionId),L=y.findIndex(M=>M.name===N),T=L>=0?y[L]:y[i+w],O={value:A.value,questionId:N,answeredAt:m,...A.secondaryValue!==void 0&&{secondaryValue:A.secondaryValue},...A.questionText!==void 0&&{questionText:A.questionText}},H=O.value;(M=>M&&!De.has(M.type))(T)&&(T.value=H,T.secondaryValue=O.secondaryValue||null),g.response.push(O);const q=L>=0?L:i+w;C[q]=ze(T,H),q>k&&(k=q)}),_=zr({cards:y,index:k,hasEndCard:!!r.endCard,uploadProgress:f,allResponses:C,surveyVisitorAttributes:t().surveyVisitorAttributes});const S=(({quotas:A,allResponses:w,cards:N,currentIndex:L})=>A.map(T=>T.quotaMatched?{...T,quotaMatched:on({constraintGroup:T.constraintGroup,allResponses:w,cards:N,currentIndex:L})}:T))({quotas:a,allResponses:C,cards:y,currentIndex:_??k+1});if(sn(S)){const A=y.findIndex(w=>w.type==="thanks");_=A>=0?A:null}e({allResponses:C,quotaEndcardText:ro({quotas:S,quotaMessages:u}),quotas:S}),(_===null||De.has(y[_].type))&&(g.completedAt=m);const h=d(g);if(_===null)return void r.completeSurvey();_&&!De.has(y[_].type)&&h.finally(()=>{l({event:"seen",index:_})});const v=y[_];y[_]&&s&&s("survey.question",{qid:v.name,props:v.props}),e({cards:y,hasViewedEmbed:!1,index:_,viewedCardCount:p+1})},pendingRemoveIframeReason:null,previewKey:null,recorder:()=>{},recorderEventEmitter:I.eventEmitter,resolveTrackedPromise:()=>{const{removeIframeIfReady:r}=t();e(o=>({unresolvedRequestCount:o.unresolvedRequestCount-1})),r()},responseGroupUid:"",remove:({initiator:r,studyType:o})=>{const{eventEmitFn:n,removeIframeIfReady:s,surveyId:i}=t();e({pendingRemoveIframeReason:r,studyType:o}),n(I.SprigEvent.SurveyCloseRequested,{name:I.SprigEvent.SurveyCloseRequested,initiator:r,studyType:o,"survey.id":i}),s()},removeIframeIfReady:()=>{const{eventEmitFn:r,pendingRemoveIframeReason:o,unresolvedRequestCount:n,studyType:s,surveyId:i}=t();o&&n===0&&(r(I.SprigEvent.SurveyWillClose,{name:I.SprigEvent.SurveyWillClose,initiator:o,studyType:s,"survey.id":i}),e({pendingRemoveIframeReason:null,studyType:s}))},seen:async()=>{const{trackHistory:r}=t();return r({event:"seen",isNew:!0})},createDynamicStandaloneQuestion:async({questionId:r})=>{var f,p,b;let o=!1;if(e(m=>{const y=m.cards.find(g=>(g==null?void 0:g.name)===r);return!(y!=null&&y.name)||zt(y)?m:(o=!0,{cards:je(m.cards,r,Jt)})}),!o)return;const n=t(),{targetQuestionOrder:s,questionsResponses:i}=Kt({cards:n.cards,combinedReadableRawResponses:n.allResponsesRaw,targetQuestionId:r,generateQuestionType:"aidynamicstandalone"}),u={surveyId:n.surveyId,responseGroupUid:n.responseGroupUid,standaloneQuestionOrder:s,questionsResponses:i,standaloneQuestionId:r,customMetadata:n.customMetadata,meta:n.meta,previewKey:n.previewKey,isPreview:n.isPreview};let a=!1;const c=()=>{if(a)return;a=!0;const m=t(),y=m.cards.find(({name:g})=>g===r);if(e(g=>({cards:je(g.cards,r,_=>{const{props:C}=_;return C&&"message"in C&&"properties"in C?{..._,value:"",props:{...C,loading:z.failure,properties:{...C.properties,required:!1}}}:_})})),I.isLongFormSurvey(m.studyType)&&(y!=null&&y.groupId)){const g=m.cards.reduce((k,S)=>((S==null?void 0:S.groupId)===y.groupId&&k.push(S),k),[]),_=g.findIndex(k=>k.name===y.name),C=_+1;if(C<g.length){const k=g[C].name;m.setFocusedQuestionId(k)}else{const k=g[_-1].name;m.setFocusedQuestionId(k)}}else m.next({data:{value:"",questionId:y.name,type:y.type},completeSurvey:()=>m.destroy(I.APP_ID),endCard:m.endCard})},d=new AbortController,l=setTimeout(()=>{d.abort(),c();const m=new Error("Timeout reached—question skipped");n.trackPromise(oe(n,"aidynamicstandalone",m))},3e3);try{const{url:m,visitorIdHeader:y}=Yt(n),g=await n.trackPromise(I.sprigFetch(m,{body:JSON.stringify(u),headers:{...n.headers,"x-ul-visitor-id":y},method:"POST",signal:d.signal}));if(!g.ok||!((b=(p=(f=g==null?void 0:g.json)==null?void 0:f.props)==null?void 0:p.message)!=null&&b.length))return c(),void await n.trackPromise(oe(n,"dynamicQuestion",g.error));if(a)return;a=!0,e(_=>({cards:je(_.cards,r,C=>{const k=C.props;return k&&"message"in k&&"properties"in k?{...C,props:{...k,loading:z.success,message:g.json.props.message}}:C})}))}finally{clearTimeout(l)}},createDynamicFollowupQuestion:async({parentQuestionId:r,parentResponseConfig:o})=>{var m,y,g;let n=!1;e(_=>{const C=_.cards.find(k=>(k==null?void 0:k.parentId)===r);return!(C!=null&&C.name)||zt(C)?_:(n=!0,{cards:He(_.cards,r,Jt)})});const s=t(),i={...s.allResponsesRaw,...o||{}},{targetQuestionOrder:u,questionsResponses:a}=Kt({cards:s.cards,combinedReadableRawResponses:i,targetQuestionId:r,generateQuestionType:"aidynamicfollowup"}),c=s.cards.find(_=>_.parentId===r&&_.type==="aidynamicfollowup");if(!n||!c)return;const d={surveyId:s.surveyId,responseGroupUid:s.responseGroupUid,parentQuestionOrder:u,questionsResponses:a,childQuestionId:c.name,customMetadata:s.customMetadata,meta:s.meta,previewKey:s.previewKey,isPreview:s.isPreview};let l=!1;const f=()=>{if(l)return;l=!0;const _=t(),C=_.cards.find(k=>k.parentId===r);if(e(k=>({cards:He(k.cards,r,S=>{const{props:h}=S;return h&&"message"in h&&"properties"in h?{...S,value:"",props:{...h,loading:z.failure,properties:{...h.properties,required:!1}}}:S})})),I.isLongFormSurvey(_.studyType)&&(C!=null&&C.groupId)){const k=_.cards.reduce((v,A)=>((A==null?void 0:A.groupId)===C.groupId&&v.push(A),v),[]),S=k.findIndex(v=>v.name===C.name),h=S+1;if(h<k.length){const v=k[h].name;_.setFocusedQuestionId(v)}else{const v=k[S-1].name;_.setFocusedQuestionId(v)}}else _.next({data:{value:"",questionId:C.name,type:C.type},completeSurvey:()=>_.destroy(I.APP_ID),endCard:_.endCard})},p=new AbortController,b=setTimeout(()=>{p.abort(),f();const _=new Error("Timeout reached—question skipped");s.trackPromise(oe(s,"dynamicFollowUpQuestion",_))},3e3);try{const{url:_,visitorIdHeader:C}=Yt(s),k=await s.trackPromise(I.sprigFetch(_,{body:JSON.stringify(d),headers:{...s.headers,"x-ul-visitor-id":C},method:"POST",signal:p.signal}));if(!k.ok||!((g=(y=(m=k==null?void 0:k.json)==null?void 0:m.props)==null?void 0:y.message)!=null&&g.length))return f(),void await s.trackPromise(oe(s,"dynamicQuestion",k.error));if(l)return;l=!0,e(S=>({cards:He(S.cards,r,h=>{const v=h.props;return v&&"message"in v&&"properties"in v?{...h,props:{...v,loading:z.success,message:k.json.props.message}}:h})}))}finally{clearTimeout(b)}},setAllResponsesRaw:r=>e({allResponsesRaw:r}),slugName:null,showStripes:!1,showSurveyBrand:!1,showSurveyLogo:!1,startingQuestionIdx:null,styleNonce:"",submit:async({completedAt:r,questionIndex:o,response:n,responseGroupUid:s})=>{const i=t();if(!s||Fe(i))return;const u={responseGroupUid:s,meta:i.meta,customMetadata:i.customMetadata,responses:n,completedAt:r,previewKey:i.previewKey};if(typeof i.addResponseGroupMeta=="function")try{const c=await i.addResponseGroupMeta();typeof c=="object"&&c!==null?u.meta={...u.meta,...c}:I.breadcrumbsLogger.error("addResponseGroupMeta must return an object")}catch(c){I.breadcrumbsLogger.error("addResponseGroupMeta promise failed",c)}const a=await i.trackPromise(I.sprigFetch(`${i.apiURL}/sdk/1/environments/${i.envId}/visitors/${i.userId}/responses/submit`,{body:JSON.stringify(u),headers:i.headers,method:"POST"}));a.ok?n.forEach((c,d)=>{i.eventEmitFn(I.SprigEvent.QuestionAnswered,{...c,questionIndex:o?o+d:void 0,"survey.id":i.surveyId})}):a.reportError&&(console.warn("[Sprig] (ERR-427) Failed to submit response",a.error),await i.trackPromise(oe(i,"submitResponse",a.error)))},surveyId:0,surveyVisitorAttributes:{},tabTitle:"",trackHistory:async({event:r,index:o,isNew:n=!1})=>{const s=t();if(Fe(s))return;const{cards:i,index:u}=s;let a=o??u,c=i[a];for(;c;){const d={sid:s.surveyId,qid:Math.floor(c.name),action:r,vid:s.userId,eid:s.envId,isNew:n,responseGroupUid:s.responseGroupUid,previewKey:s.previewKey},l=await s.trackPromise(I.sprigFetch(`${s.apiURL}/sdk/1/visitors/${s.userId}/surveys/${s.surveyId}/history`,{method:"POST",headers:s.headers,body:JSON.stringify(d)}));!l.ok&&l.reportError&&(console.warn("[Sprig] (ERR-428) Failed to track survey event",l.error),await s.trackPromise(oe(s,"trackHistory",l.error)));const f=i[a+1];if(!c.groupId||!(f!=null&&f.groupId)||f.groupId!==c.groupId)break;a++,c=f,n=!1}},trackPromise:async r=>{const{resolveTrackedPromise:o}=t();return e(n=>({unresolvedRequestCount:n.unresolvedRequestCount+1})),r.then(n=>(o(),n)).catch(n=>{throw o(),n})},unresolvedRequestCount:0,update:()=>{var S,h,v;const{cards:r,index:o,headers:n,eventEmitFn:s,frame:i,useMobileStyling:u,surveyId:a,studyType:c,viewDocument:d,isConversationalUI:l}=t(),f=n["userleap-platform"]==="web",p=I.shouldDirectEmbed(n),b=r[o],m=I.isLongFormSurvey(c)?!!d.querySelector(".ul-card--matrix-expandable"):b.type==="matrix"&&!(b.props.properties.displayMatrixAsAccordion||u),y=!u&&m;!p&&!u&&((S=i==null?void 0:i.setWidth)==null||S.call(i,I.DEFAULT_WIDTH_PX));const[g,_]=I.calculateFrameDimensions(d,f&&!u,p),C=l&&g<532?532:g,k=((A,w,N)=>{if(!N)return w;const L=A.querySelector(".ul-card-scroll-wrapper:has(.ul-card--matrix-expandable)");if(!I.isHTMLElement(L)||L.offsetWidth<=600)return w;const T=A.querySelector(".ul-card--matrix_grid"),O=I.isHTMLElement(T)?T.scrollWidth:0;return Math.max(w,L.offsetWidth+(w-O))})(d,_,y);if(p)return s(I.SprigEvent.SurveyHeight,{name:I.SprigEvent.SurveyHeight,contentFrameHeight:C,"survey.id":a}),void s(I.SprigEvent.SurveyWidth,{name:I.SprigEvent.SurveyWidth,contentFrameWidth:k,"survey.id":a});(h=i.setHeight)==null||h.call(i,C),y&&((v=i.setWidth)==null||v.call(i,k))},uploadingCardViewed:!1,uploadProgress:{},useDesktopPrototype:void 0,useMobileStyling:!1,userId:"",viewDocument:window.document,viewedCardCount:0,focusedQuestionId:null,setFocusedQuestionId:r=>e({focusedQuestionId:r})})),Fe=e=>{var t;return!e.userId||((t=e==null?void 0:e.meta)==null?void 0:t.mode)==="test"||e.isPreview},oe=async(e,t,r)=>{const{mode:o,userId:n,envId:s,apiURL:i,headers:u,viewDocument:a}=e,c=a.documentElement,d={mode:o,screenWidth:window.screen.width,screenHeight:window.screen.height,clientWidth:c.clientWidth,clientHeight:c.clientHeight,location:window.location.href,language:window.navigator.language},l={action:t,err:{message:`${r==null?void 0:r.name} - ${r==null?void 0:r.message}`,stack:r==null?void 0:r.stack},meta:d,vid:n,envId:s};(await I.sprigFetch(`${i}/sdk/1/errors`,{method:"POST",headers:Object.assign({"x-ul-error":window.btoa(`userleap-${Date.now()}-error`)},u),body:JSON.stringify(l)})).ok||console.warn("[Sprig] (ERR-444) Failed to report error to API",r)},no=()=>{const{cards:e,close:t,endCard:r,headers:o,index:n}=$(u=>({cards:u.cards,close:u.close,endCard:u.endCard,headers:u.headers,index:u.index,useMobileStyling:u.useMobileStyling})),s=e.length,i=X(()=>()=>t(I.APP_ID),[t]);return["email","link"].includes(o["userleap-platform"])||r&&n+1===s?null:R("div",{"aria-label":"Close button",className:"close-btn",onClick:i,onKeyPress:u=>{u.key==="Enter"&&i()},role:"button",tabIndex:0,children:R("svg",{fill:"none",height:"16px",viewBox:"0 0 13 13",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:R("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:"currentColor"})})})},an=e=>U("svg",{fill:"none",height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e},U("path",{d:"M17 10L12 15L7 10",stroke:"#0B2330",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})),un=e=>U("svg",{fill:"none",height:10,viewBox:"0 0 10 10",width:10,xmlns:"http://www.w3.org/2000/svg",...e},U("path",{d:"M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005",stroke:"white",strokeLinecap:"round",strokeWidth:2})),oo=({visible:e})=>R("div",{className:"sprig-check-background",style:{opacity:e?1:0},children:R(un,{className:"sprig-check"})}),tr="250ms",so=at(({animate:e,children:t,header:r,isOpen:o,onClick:n,showHeaderCheck:s},i)=>{const u=$(m=>m.update),a=Y(null),[c,d]=J(0),[l,f]=J("none"),[p,b]=J(!0);return j(()=>{var y;const m=(y=a.current)==null?void 0:y.getBoundingClientRect();d(o&&m?m.height:0)},[o]),j(()=>{u()},[c,u]),j(()=>{!c&&o||!p||b(!1),f(e&&!p?`height ${tr} ease`:"none")},[e,p,c,o]),R("div",{className:"sprig-accordion",ref:i,children:[R("button",{className:"sprig-accordion-header-container",onClick:n,type:"button",children:[R("div",{className:"sprig-header-label-container",children:[R("span",{className:"sprig-header-label",children:r}),R(oo,{visible:s})]}),R(an,{className:"sprig-caret",style:{transitionDuration:e?tr:"0",transform:o?"rotate(-180deg)":"none"}})]}),R("div",{className:"sprig-accordion-body",style:{transition:l,height:c},children:R("div",{ref:a,children:t})})]})}),pt=({style:e,stroke:t="black"})=>R("svg",{fill:"none",height:"10",style:e,viewBox:"0 0 12 10",width:"12",xmlns:"http://www.w3.org/2000/svg",children:[R("path",{d:"M1.47839 5.2085L10.9384 5.2085",stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"}),R("path",{d:"M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845",stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.35"})]}),Se=(...e)=>e.filter(Boolean).join(" "),ln=(e,t,r)=>{const o=t?"--mobile":"--desktop";return`${e+o} ${e+(r?`${o}_${r}`:"")} ${e}`},io=(e,t)=>`${e} ${e}__${t}`,cn=({logoOnly:e=!1,style:t={}})=>R("svg",{alt:(e?"Powered by ":"")+"Sprig",className:"sprig-logo",fill:"none",height:"15",style:{display:"block",...t},viewBox:e?"79 0 31 15":"0 0 112 15",width:e?"35":"112",xmlns:"http://www.w3.org/2000/svg",children:[!e&&R("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:"currentColor"}),R("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:"currentColor"}),R("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:"currentColor"}),R("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:"currentColor"}),R("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:"currentColor"}),R("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:"currentColor"})]}),dn=({forceBrandedLogo:e,marketingUrlLink:t})=>R("div",{className:e?"yellow-footer-logo":"",children:R("a",{href:t,rel:"noreferrer",target:"_blank",children:R("div",{style:{display:"flex"},children:[R(cn,{logoOnly:!1}),e&&R(pt,{style:{display:"block",margin:"auto 0 auto 4px",transform:"rotateY(0deg) rotate(-45deg)"}})]})})}),pn=({marketingUrlLink:e})=>R("a",{dir:"ltr",href:e,rel:"noreferrer",target:"_blank",children:R("div",{className:"thank-you-card-link",children:[R("div",{className:"sprig-box-logo",children:R(cn,{logoOnly:!0,style:{margin:"auto"}})}),R("div",{children:R("p",{children:["Capture insights about your own product",R(pt,{style:{display:"inline-flex",marginInlineStart:"4px",verticalAlign:"middle"}})]})})]})}),_n=({marketingUrl:e,slugName:t,surveyId:r,forceBrandedLogo:o})=>`${e}?utm_source=survey_branding&utm_medium=website&utm_campaign=${t}&utm_content=${r}${o?"&utm_term=poweredby_pill":""}`,ao=()=>{var g;const{border:e,cards:t,forceBrandedLogo:r,headers:o,index:n,marketingUrl:s,showSurveyBrand:i,slugName:u,surveyId:a,viewedCardCount:c}=$(_=>({border:_.border,cards:_.cards,forceBrandedLogo:_.forceBrandedLogo,headers:_.headers,index:_.index,marketingUrl:_.marketingUrl,showSurveyBrand:_.showSurveyBrand,slugName:_.slugName,surveyId:_.surveyId,viewedCardCount:_.viewedCardCount})),d=Y(null),l=t.filter(_=>_.type!=="uploading"&&_.type!=="thanks"),f=((_,C)=>{const k=new Set(["thanks","uploading"]);if(C>=_.length||C<0||k.has(_[C].type))return 0;const S=_.filter(v=>!k.has(v.type));if(C===S.length-1)return 1;const h={[S.length-1]:1,[-1]:0};for(let v=S.length-2;v>=C;v--){const A=S[v],w=(A.props.routingOptions??[]).filter(H=>typeof H=="object"&&H!==null&&"group"in H),N=Jn(v,w);if(N.length===0){h[v]=h[v+1]+1;continue}let L=0;const T=Zn(A);if(T===null)return S.length-1-C;let O=T;for(const H of N){if(O.length===0)break;const{comparator:q,target:M,value:re}=H,K=O.filter(V=>{const ne=Qn({value:V},A.type,V),E=Gr(V,A.type);return!(ne&&q==="answered"||E&&q==="partial"||!ne&&!E&&q==="skipped"||q==="given_up"&&Kn(V)&&V.taskStatus==="given.up"||ne&&A.type==="open"&&(q==="contains"||q==="notcontains")||ne&&Gn(q)&&ye[q](V,re))});if(K.length<O.length){const V=Number.parseInt(String(M),10);if(V!==-1&&V<=v||V>=S.length)return S.length-1-C;L=Math.max(h[V]+1,L)}O=K}O.length>0&&(L=Math.max(h[v+1]+1,L)),h[v]=L}return h[C]})(t,n),p=c+1,b=p/(p+f),m=_n({marketingUrl:s,slugName:u,surveyId:a,forceBrandedLogo:r});j(()=>{d.current&&(d.current.style.width=100*b+"%")},[b]);const y=((g=t[n])==null?void 0:g.type)==="thanks";return R("footer",{className:"ul-footer "+(o["userleap-platform"]==="link"?"ul-footer__link":""),children:y&&r?R(pn,{marketingUrlLink:m}):R(D,{children:[l.length>1&&R("div",{className:"ul-progress-bar-container ul-progress-bar-container__footer",children:R("div",{className:"ul-progress-bar-current",ref:d,style:{border:`1px solid ${e||"#2f2e2c"}`}})}),i?R(dn,{forceBrandedLogo:r,marketingUrlLink:m}):null]})})},uo=()=>{const{border:e,cards:t,index:r,focusedQuestionId:o,isConversationalUI:n,showSurveyLogo:s}=$(a=>({border:a.border,cards:a.cards,index:a.index,focusedQuestionId:a.focusedQuestionId,isConversationalUI:a.isConversationalUI,showSurveyLogo:a.showSurveyLogo})),{totalQuestions:i,fraction:u}=X(()=>{var l;const a=t.filter(f=>f.type!=="uploading"&&f.type!=="thanks"),c=a.length;if(c<=1)return{totalQuestions:c,fraction:0};if(((l=t[r])==null?void 0:l.type)==="thanks")return{totalQuestions:c,fraction:1};let d=0;return d=n?r+1:a.findIndex(f=>f.name===o),{totalQuestions:c,fraction:d/(c+1)}},[t,r,o,n]);return i<=1?null:R("div",{className:"ul-progress-bar-container ul-progress-bar-container__header"+(s?"":" ul-progress-bar-container--no-branding"),children:R("div",{className:"ul-progress-bar-current",style:{width:100*u+"%",border:`1px solid ${e??"#2f2e2c"}`}})})},lo=Le(async()=>({default:(await Promise.resolve().then(()=>require("./index-B7NitBSW.cjs"))).PageCard})),co=Le(()=>Promise.resolve().then(()=>require("./conversational-ui-C-9W5X81.cjs"))),po=()=>{const{answers:e,border:t,cards:r,close:o,configureExitOnOverlayClick:n,destroy:s,endCard:i,eventEmitFn:u,fontFamily:a,headers:c,isConversationalUI:d,experimentFlags:l,index:f,next:p,previewKey:b,productConfig:m,seen:y,showStripes:g,studyType:_,surveyId:C,surveyVisitorAttributes:k,update:S,useMobileStyling:h,viewDocument:v}=$(E=>({answers:E.answers,border:E.border,cards:E.cards,close:E.close,configureExitOnOverlayClick:E.configureExitOnOverlayClick,destroy:E.destroy,endCard:E.endCard,eventEmitFn:E.eventEmitFn,fontFamily:E.fontFamily,headers:E.headers,index:E.index,isConversationalUI:E.isConversationalUI,experimentFlags:E.experimentFlags,previewKey:E.previewKey,productConfig:E.productConfig,next:E.next,seen:E.seen,showStripes:E.showStripes,studyType:E.studyType,surveyId:E.surveyId,surveyVisitorAttributes:E.surveyVisitorAttributes,update:E.update,useMobileStyling:E.useMobileStyling,viewDocument:E.viewDocument})),A=Y(null),w=Y(!1),N=Y(!1),L=c["userleap-platform"],T=l==null?void 0:l["sdk-new-convo-ui"],{props:O,type:H,name:q}=r[f];j(()=>{if(window.Sprig)return window.Sprig.trackHistory=E=>$.getState().trackHistory(E),()=>{window.Sprig.trackHistory=void 0}},[]),j(()=>{A.current&&(A.current.classList.contains("ul-app--visible")||A.current.classList.add("ul-app--visible"),!w.current&&u&&(w.current=!0,u(I.SprigEvent.SurveyAppeared,{name:I.SprigEvent.SurveyAppeared,"survey.id":C})))},[u,C]),j(()=>{const E=()=>{v.visibilityState==="visible"&&(y(),v.removeEventListener("visibilitychange",E))};return v.addEventListener("visibilitychange",E),E(),()=>{v.removeEventListener("visibilitychange",E)}},[y,v]);const M=ve(async()=>{if(!v)return;const E=v.getElementById("conversational-ui-styles");if(!d&&E)return E.remove(),void(N.current=!1);if(d&&!E){const W=await(F=!!T,F?Promise.resolve().then(()=>require("./conversational-v2-styles-DEGzqtgO.cjs")):Promise.resolve().then(()=>require("./conversational-styles-DKmvloou.cjs")));I.setSurveyStyles({document:v,elementId:"conversational-ui-styles",styleString:W.default}),requestAnimationFrame(()=>{S()}),N.current=!0}var F},[v,d,S]);j(()=>{n(()=>o())},[o,n]),j(()=>{M()},[M,v]);const re=X(()=>I.groupCards(r,f),[r,f]),K=Ye(r,k),V=ve(E=>{p({data:E,completeSurvey:()=>s(I.APP_ID),endCard:i}),I.resetScrollPosition(v)},[p,s,i,v]);if(e){for(const E of e)if(E.questionId===q){let F;if(H==="multiplechoice"){const W=O.options.find(({value:Te})=>Te===E.value);if(!W)break;F={[W.id]:W.value}}else F=E.value;V({value:F,type:H,questionId:E.questionId});break}}const ne=!h&&((m==null?void 0:m.framePosition)==="center"||(m==null?void 0:m.desktopDisplay)==="center-modal"||((m==null?void 0:m.placement)||"").includes("center"));return R("div",{className:Se("ul-app",I.shouldDirectEmbed(c)?"ul-app--visible":"ul-app--overlay"),dir:"auto",id:I.APP_ID,onClick:E=>{var _t;const F=window.sprigAPI,W=E.target;if(!F||!W)return;const Te=[W,W.parentElement];for(const be of Te)if(((_t=be==null?void 0:be.tagName)==null?void 0:_t.toLowerCase())==="a"){E.preventDefault();try{const _e=new URL(be.href);_e.protocol!=="http:"&&_e.protocol!=="https:"||(F==null||F.openUrl(_e.toString()))}catch(_e){console.error(_e)}return}},ref:A,style:{"--theme":t,...a?{fontFamily:a.replace(";","")}:{},...ne?{position:"relative"}:{}},children:R("div",{className:"ul-app__container",children:R("div",{className:Se(ln("ul-card__container",h,_)),style:{..._!=="feedbackButton"||(m==null?void 0:m.desktopDisplay)==="center-modal"?{borderColor:t}:{},...(m==null?void 0:m.desktopDisplay)==="slider"?{margin:"0px"}:{}},children:[R("div",{className:"sprig-container",children:[g&&R("div",{className:"ul-header__container",dir:"ltr",children:R("div",{className:"ul-header",children:"For development purposes only"})}),b&&R("div",{className:"ul-header__container",dir:"ltr",children:R("div",{className:"ul-header",children:"Preview Mode: Response will not be recorded."})}),I.isLongFormSurvey(_)&&R(uo,{}),R("div",{className:Se(io("ul-card-main-content",L)),children:R(ae,d?{fallback:null,children:R(co,{cards:r,next:V,previousResponses:K})}:{fallback:null,children:R(lo,{cards:re,next:V,previousResponses:K})})}),!I.isLongFormSurvey(_)&&R(ao,{})]}),!d&&R(no,{})]})})})},fn=()=>MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",rr=e=>{const t={audioBitsPerSecond:128e3,videoBitsPerSecond:25e5,mimeType:fn()};return new MediaRecorder(e,t)},nr=(e,t,r)=>{r[t]=[],e.ondataavailable=function(o){r[t].push(o.data)},e.currentMediaRecordingUid=t,e.start()};function or(e,t,r,o,n,s){if(e&&e.state!=="inactive"){const{"begin.callback":i}=o,u=e.currentMediaRecordingUid;if(!u)return;i&&i(u),e.onstop=()=>async function(a,c,d,l,f,p,b){const m=$.getState().viewDocument,{"upload.callback":y,"progress.callback":g}=l,_={mediaType:d,updatedAt:new Date().toISOString(),mediaRecordingUid:f,...l["passthrough.data"]},C=await(async(v,A)=>{var N;const w=await fetch(A,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(v)});if(w.ok){const L=await w.json();return(N=L==null?void 0:L.upload)==null?void 0:N.url}return null})(_,a);if(!C)return void(y&&y(null,{message:"failed to get upload url"}));const k=new Blob(b,{type:fn()});if(!m.defaultView)return;const S=new m.defaultView.File([k],`recording video ${Date.now()}`),h=p.createUpload({endpoint:C,file:S,chunkSize:5120});h.on("error",v=>{y&&y(null,v)}),h.on("progress",v=>{g&&g(f,v)}),h.on("success",()=>{y&&y(f,!0)})}(t,0,r,o,u,n,s),e.stop()}}const _o={state:{chunks:{}},stopRecording(e){const{uploadApiEndpoint:t,avRecorder:r,screenRecorder:o,UpChunk:n}=this.state,s=this.state.avStream&&this.state.avStream.getVideoTracks().length>0?"video":"audio";this.state.chunks&&t&&n&&(r!=null&&r.currentMediaRecordingUid&&or(r,t,s,e,n,this.state.chunks[r==null?void 0:r.currentMediaRecordingUid]),o!=null&&o.currentMediaRecordingUid&&or(o,t,"screen",e,n,this.state.chunks[o==null?void 0:o.currentMediaRecordingUid]))},handleCancelledStream(e){const t=e.getVideoTracks(),r=e.getAudioTracks();let o=t.length&&t[0];o=o||r.length&&r[0],o&&o.addEventListener("ended",()=>{[this.state.avRecorder,this.state.screenRecorder].map(n=>{n&&(n.state==="recording"&&n.stop(),n.stream.getTracks().map(s=>{s.readyState==="live"&&s.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 r=>{this.avPermissionCallback(r)}),e.on("begin.recording",this.beginRecordingCallback.bind(this)),e.on("start.task",this.startTaskCallback.bind(this)),e.on("screen.permission",async r=>{this.screenPermissionCallback(r)}),e.on("finish.task",async r=>{this.finishTaskCallback(r)})},async avPermissionCallback(e){var o,n,s;const{"stream.ready":t,"permission.descriptors":r}=e;try{(o=this.state.avStream)!=null&&o.active&&(this.state.avStream.getTracks().map(i=>i.readyState==="live"&&i.stop()),((n=this.state.captureStream)==null?void 0:n.getAudioTracks().length)===1&&this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])),this.state.avStream=await navigator.mediaDevices.getUserMedia({video:r.includes("camera"),audio:!0}),((s=this.state.captureStream)==null?void 0:s.getAudioTracks().length)===0&&this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]),this.handleCancelledStream(this.state.avStream)}catch(i){return console.warn("Error: failed to get permissions: "+i),void(t&&t(null,null))}t&&t(this.state.avStream,this.state.captureStream)},async screenPermissionCallback(e){const{"screen.permission.requested":t,"stream.ready.callback":r}=e;t==null||t(!0);try{this.state.captureStream=await navigator.mediaDevices.getDisplayMedia({video:!0,cursor:"always",displaySurface:"browser",preferCurrentTab:!0})}catch(o){return t==null||t(!1),console.warn("Error: failed to get permissions: "+o),void(r&&r(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),r&&r(this.state.avStream||null,this.state.captureStream)},beginRecordingCallback(e){const{"recording.media.types":t,"start.recording.callback":r=()=>{}}=e;if(!t)return;const o=[];if(t.includes("video")&&this.state.avStream){this.state.avRecorder=rr(this.state.avStream);const n=I.v4();nr(this.state.avRecorder,n,this.state.chunks),o.push(n)}if(t.includes("screen")&&this.state.captureStream){this.state.screenRecorder=rr(this.state.captureStream);const n=I.v4();nr(this.state.screenRecorder,n,this.state.chunks),o.push(n)}o&&r&&r(o)},async finishTaskCallback(e){const{"current.index":t,"task.response":r,"task.complete.callback":o}=e;await this.stopRecording(e),o&&o(this.taskDurationMillisecond()),this.state.cards&&this.state.hasEndCard!==void 0&&this.lookAheadAndStopStream(t,r,this.state.cards,this.state.hasEndCard)},startTaskCallback(){this.state.startTime=new Date},permissionStatusCallback(e){var o;const{"permission.status.callback":t}=e,r=this.state.avStream;t&&t(r,!!r&&(r==null?void 0:r.getVideoTracks().length)>0,!!((o=this.state.captureStream)!=null&&o.active),this.state.captureStream)},lookAheadAndStopStream(e,t,r,o){const{avRecorder:n,screenRecorder:s}=this.state,{allResponses:i,surveyVisitorAttributes:u}=$.getState(),a=zr({cards:r,index:e,hasEndCard:o,allResponses:i,surveyVisitorAttributes:u});a!==null&&r[a].type==="recordedtask"||[n,s].map(c=>{c&&(c.state==="recording"&&c.stop(),c.stream.getTracks().map(d=>{d.readyState==="live"&&d.stop()}))})}},Xe=Object.create(_o);Object.freeze(Xe);const fo=({mode:e=null,viewWindow:t,viewDocument:r,trackPageViewUrl:o})=>{const n=r.documentElement;let s;try{s=t.parent.location.href}catch{s=t.location.href}return{mode:e,sw:t.screen.width,sh:t.screen.height,cw:n.clientWidth,ch:n.clientHeight,p:o??s,l:t.navigator.language}};let Be=!1;const mo={configure:function(e,t=!0){var v,A;const{answers:r,apiURL:o,endCard:n,eventEmitFn:s,fontFamilyURL:i,frame:u,previewKey:a,viewDocument:c,viewWindow:d}=e,l=I.shouldDirectEmbed(e.headers)?e.frame:c.body,f=e.UpChunk||window.UpChunk,p=I.eventEmitter,b=((w,N)=>{const L=[...w],T=new Set(["videovoice","recordedtask"]);return w.some(O=>T.has(O.type))&&L.push({name:-2,props:{routingOptions:[],displayLogic:[]},type:"uploading"}),N&&L.push({name:-1,props:{routingOptions:[],displayLogic:[]},type:"thanks"}),L})(e.cards,!!n),m=Object.fromEntries(b.map((w,N)=>[w.name,N])),y=(({quotas:w,cardIndexByName:N})=>w===void 0?[]:w.map(L=>({...L,constraintGroup:L.constraintGroup.map(T=>nn(T,N)),quotaMatched:!0})))({quotas:e.quotas,cardIndexByName:m});Xe.configure(p,{cards:b,hasEndCard:!!n,apiURL:o,UpChunk:f});const g=e.layout==="conversational",_=(({cards:w,hasEndCard:N,allResponses:L=[],surveyVisitorAttributes:T={},startingQuestionIdx:O=0})=>{var re,K;const H=w.findIndex(V=>V.type==="uploading"),q=ct(w,N,H);let M=Math.min(Math.max(0,O??0),q);for(;M<=q&&((K=(re=w[M])==null?void 0:re.props)!=null&&K.displayLogic)&&w[M].props.displayLogic.length>0;){const V=w[M].props.displayLogic||[];if(dt({displayLogic:V,allResponses:L,cards:w,surveyVisitorAttributes:T}))break;M++}return Math.min(M,q)})({cards:b,hasEndCard:!!n,allResponses:[],surveyVisitorAttributes:e.surveyVisitorAttributes??{},startingQuestionIdx:e.startingQuestionIdx}),C=e.useBranding??!0?e.border:I.DEFAULT_BORDER_COLOR;$.setState({experimentFlags:e.experimentFlags??{},addResponseGroupMeta:e.addResponseGroupMeta,apiURL:o,answers:r,avatars:e.avatars,border:C,index:_,isConversationalUI:g,cards:b,cardIndexByName:m,configureExitOnOverlayClick:e.configureExitOnOverlayClick,customMetadata:e.customMetadata,enableCspTrustedTypes:e.enableCspTrustedTypes,endCard:e.endCard,envId:e.envId,eventEmitFn:s,fontFamily:e.fontFamily,forceBrandedLogo:e.forceBrandedLogo,frame:u,headers:e.headers,hasViewedEmbed:!1,isPreview:e.previewMode,layout:e.layout,marketingUrl:"https://sprig.com",meta:fo({mode:e.mode,viewWindow:d,viewDocument:c,trackPageViewUrl:e.trackPageViewUrl}),mode:e.mode,previewKey:a,productConfig:e.productConfig,quotaEndcardText:void 0,quotaMessages:e.quotaMessages,providerPersona:e.providerPersona??void 0,quotas:y,recorder:Xe,recorderEventEmitter:p,responseGroupUid:e.responseGroupUid,showProviderPersona:e.showProviderPersona??!1,showStripes:e.showStripes,showSurveyBrand:e.showSurveyBrand,showSurveyLogo:e.showSurveyLogo??!1,slugName:e.slugName,startingQuestionIdx:e.startingQuestionIdx,styleNonce:e.styleNonce,studyType:e.studyType,surveyId:e.surveyId,surveyVisitorAttributes:e.surveyVisitorAttributes,tabTitle:e.tabTitle,uploadingCardViewed:!1,uploadProgress:{},useMobileStyling:e.useMobileStyling,useDesktopPrototype:e.useDesktopPrototype,userId:e.userId,viewDocument:e.viewDocument,visitorAttributes:e.visitorAttributes,viewedCardCount:_});const{head:k}=c;var S;if(I.setSurveyStyles({document:c,elementId:"sprig-style",styleString:""}),(S=!!((v=e.experimentFlags)!=null&&v["sdk-new-survey-ui"]),S?Promise.resolve().then(()=>require("./index-JFHEvyUo.cjs")):Promise.resolve().then(()=>require("./index-ElJgds4s.cjs"))).then(w=>{I.setSurveyStyles({document:c,elementId:"sprig-style",styleString:w.default})}),e.customStyles&&I.setSurveyStyles({document:c,elementId:"ul-custom-style",styleString:e.customStyles,nonce:e.styleNonce}),e.fontFamily&&i&&parent){const w=c.createElement("link");w.rel="stylesheet",w.href=i,k.appendChild(w)}const h=s||((A=u.eventEmitter)==null?void 0:A.emit);h==null||h("verify.view.version",{"view.version":"2.48.2"}),l&&t&&(Be&&Ie(l),le(R(po,{}),l),Be=!0,I.eventEmitter.once(I.SprigEvent.SurveyClosed,()=>{Ie(l),Be=!1}))}},vo=Object.freeze(Object.defineProperty({__proto__:null,default:mo},Symbol.toStringTag,{value:"Module"}));exports.Accordion=so,exports.Arrow=pt,exports.DynamicQuestionLoadingStates=z,exports.F=X,exports.F$1=rt,exports.MaxDiffChoice=Qr,exports.MaxSelectModes=rn,exports.PromptActionTypeEnum=tn,exports.SprigBrandLogo=dn,exports.SvgCaret=an,exports.SvgCheckmark=un,exports.T=ve,exports.ThankYouLink=pn,exports._=Y,exports.appCardHasPropertiesWithRequired=function(e){const t=e.props;if(t===null||typeof t!="object")return!1;const r=Reflect.get(t,"properties");return typeof r=="object"&&r!==null&&"required"in r},exports.buildMarketingUrl=_n,exports.buildReadableResponseMap=Ye,exports.buildResponsesArrayForDisplayLogic=({storeAllResponses:e,cards:t,cardValues:r,cardIndexByName:o})=>{const n=e?[...e]:[];if(o===void 0)return n;for(const s of t){const i=o[s.name];if(typeof i!="number")continue;const u=r[s.name];(u==null?void 0:u.value)!==void 0&&(n[i]=ze(s,u.value))}return n},exports.cc=Se,exports.create=Wr,exports.g=D,exports.getButtonText=e=>(e==null?void 0:e.buttonText)||"Next",exports.getClasses=ln,exports.getProcessedQuestionText=e=>{var t;return Je(e)&&((t=e.props.properties)!=null&&t.questionHtml)&&typeof e.props.properties.questionHtml=="string"?e.props.properties.questionHtml.replace(/<[^>]*>/g,"").trim():e.props&&"message"in e.props&&typeof e.props.message=="string"?e.props.message.trim():e.props&&"questionHtml"in e.props&&typeof e.props.questionHtml=="string"?e.props.questionHtml.replace(/<[^>]*>/g,"").trim():""},exports.getSkipButtonText=e=>(e==null?void 0:e.skipButtonText)||"Skip",exports.h=J,exports.isLastQuestion=(e,t)=>{const r=t.findIndex(s=>s.type==="uploading"),o=t.some(s=>s.type==="thanks"),n=t.findIndex(s=>s.name===e);return n===-1?!1:n===ct(t,o,r)},exports.p=j,exports.pipeReadableResponsesIntoCards=(e,t)=>e.map(r=>{if(!Je(r)||r.props.properties===void 0||r.props.properties===null)return r;const o=r.props.properties;if(o===null||typeof o!="object"||!$t.some(i=>i in o))return r;let n=!1;const s={};for(const i of $t){const u=o[i];if(u!==void 0){const a=Wn(u,t);s[i]=a,a!==u&&(n=!0)}}return n?{...r,props:{...r.props,properties:{...o,...s}}}:r}),exports.q=ot,exports.shouldMatrixUseAccordionDueToSize=(e,t)=>er(e)>(r=>Math.min(1200,.9*r))(t),exports.shouldMatrixUseFillLayout=(e,t)=>t>600&&er(e)<600,exports.someDisplayLogicOptionMatches=dt,exports.triggerFollowUpQuestionGeneration=({displayCard:e,response:t,createDynamicFollowupQuestion:r})=>{if(e&&((e==null?void 0:e.childId)??0)>0){const o=ze(e,t==null?void 0:t.value),n=de({comparator:"answered",type:e.type,response:o}),s=e.type==="matrix"&&de({comparator:"partial",type:e.type,response:o});if(n||s){const i=Ye([e].map(u=>({...u,value:(t==null?void 0:t.value)??null,secondaryValue:(t==null?void 0:t.secondaryValue)??null})));r({parentQuestionId:e==null?void 0:e.name,parentResponseConfig:i})}}},exports.u=R,exports.useConfig=$,exports.view=vo,exports.wn=Br,exports.y=pe;
package/package.json CHANGED
@@ -30,5 +30,5 @@
30
30
  ],
31
31
  "author": "Sprig",
32
32
  "license": "SEE LICENSE IN LICENSE.md",
33
- "version": "2.48.1"
33
+ "version": "2.48.2"
34
34
  }
@@ -1,4 +0,0 @@
1
- const t = '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-card-text__button{background-color:var(--theme);border-radius:8px;padding:11px 16px;gap:5px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px}.ul-card-text__button:hover{opacity:.8}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{opacity:.4;cursor:not-allowed}.ul-card-text__button.ul-button-inactive{background-color:transparent;color:#5d696f}.ul-card-skip__button{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}.sprig-question-footer-container{padding:0;align-items:center}.ul-card__button-checkmark{display:flex;align-items:center;font-size:15px;gap:5px;padding:11px 16px;border-radius:8px;background-color:var(--theme);color:#fff}.ul-card__button-checkmark:disabled{background-color:var(--theme);opacity:.5;color:#fff}.ul-card__button-checkmark:disabled>svg path{stroke:#fff}.ul-conversational-ui{width:100%;height:100%;display:flex;flex-direction:column;min-height:500px;font-size:15px;position:relative}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:right;align-self:stretch}.conversational-close-btn{position:fixed;top:20px;right:16px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:50%;cursor:pointer;z-index:1000}.conversational-close-btn:hover{background:var(--chat-close-hover-bg)}.chat-container{flex:1;display:flex;flex-direction:column;align-items:center}.chat-messages{flex:1;display:flex;flex-direction:column;max-width:600px;width:100%;padding:36px 16px 44px;gap:8px;box-sizing:border-box}.chat-message-no-response{font-style:italic;color:var(--chat-msg-no-response)}.chat-card .choice{margin-bottom:0;background-color:var(--chat-choice-bg);padding:0;line-height:2;border:none;min-height:28px}.chat-card .choice.ul-select-active-dynamic-style{border:none}.chat-bubble-container{display:flex;flex-direction:row;align-items:flex-start;width:100%;animation:fadeInUp .3s ease-out}.chat-bubble-container .chat-avatar{display:none}.chat-left{align-self:flex-start;width:auto;justify-content:flex-start}.chat-container .chat-bubble-container.chat-left.chat-no-avatar .chat-bubble{margin-left:0}.chat-right{align-self:flex-end;width:100%;justify-content:flex-end;margin-top:8px}.sprig-question-body{word-wrap:break-word;position:relative;border-radius:8px;box-sizing:border-box;max-width:448px;gap:8px;padding:0;overflow:unset}.chat-bubble-text-only{width:auto;max-width:286px}.chat-bubble.chat-bubble-right:has(.likert-number,.likert-smiley,.likert-star,.nps-number){width:100%}.chat-bubble.chat-bubble-right .chat-message-text{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:var(--text-color);background:var(--chat-right-bg)}.chat-bubble-left{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:var(--text-color);background:var(--chat-left-bg)}.chat-bubble.chat-bubble-right:has(.answered-card) .sprig-question-body{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:var(--text-color);background:var(--chat-right-bg)}.chat-bubble.chat-bubble-right:not(:has(.chat-bubble-text-only)) .sprig-question-body{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:var(--text-color);background:var(--chat-right-bg)}.chat-message-text{line-height:1.4;margin:0;text-align:left;color:var(--text-color);font-size:14px;font-weight:400;word-wrap:break-word}.chat-persona-label{margin-top:-4px;text-align:left;color:var(--chat-end-text);font-size:14px;font-weight:400;line-height:140%}.chat-card-container{padding:0;background:transparent}@media (max-width: 600px){.conversational-ui .long-form-question-footer-container-logo{position:unset}}.chat-card-container .chat-card{display:flex;flex-direction:column;gap:8px}.chat-thanks-card{background:transparent;box-shadow:none;text-align:center}.end-of-survey-text{text-align:center;color:var(--chat-end-text);font-size:14px;margin-top:8px;font-weight:400}.answered-card{pointer-events:none;opacity:.7;position:relative}.footer{width:100%;margin-top:12px;font-size:12px;font-weight:400;line-height:12px;color:var(--chat-footer)}.answered-card:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:var(--chat-answered-overlay-bg);pointer-events:none;border-radius:inherit}.answered-card button,.answered-card input,.answered-card textarea,.answered-card select{pointer-events:none}.answered-card:not(.ul-card__consent-legal):not(.ul-card__text-url-prompt) .ul-card-button-group *{display:none}.sprig-question-footer-container{padding:0;align-items:end}.chat-card.ul-card--video .sprig-question-footer-container{flex-direction:row;justify-content:flex-end;align-items:center}.ul-card-text__button{font-size:13px}@keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.chat-bubble-container.chat-left.chat-no-avatar .chat-bubble{margin-left:42px}.ul-card-vertical__button-wrapper{align-items:end}.ul-card-skip__button{padding:0 16px}.sprig-stretch{padding:16px;display:flex;flex-direction:column;gap:8px;border-radius:8px;background:var(--consent-sprig-stretch-bg)}.sprig-stretch input{background-color:var(--consent-input-bg)}.ul-card--likert__numbers{background-color:#fff;display:flex;width:100%;box-sizing:border-box;flex-wrap:nowrap;justify-content:space-between;align-items:center}.ul-card--likert__numbers>button{padding:5px 4px}.ul-card--likert__numbers:has(.likert-star,.likert-smiley){background-color:transparent;justify-content:space-between;gap:2px}.likert-smiley>svg{scale:1.176}.ul-card--likert__numbers .likert-star,.ul-card--likert__numbers .likert-smiley{min-width:24px;min-height:57px;max-width:38px;max-height:38px;flex:0 1 auto;transition:height .2s,width .2s}.ul-card--likert__labels{font-weight:400;color:var(--text-color);text-align:center;word-break:break-word;font-size:.95rem}.likert-number,.likert-smiley,.likert-star{min-height:57px;max-height:57px;box-sizing:border-box;flex:1 1 auto;display:flex;align-items:center;justify-content:center;transition:height .2s,width .2s,font-size .2s}.sprig-question-body:has(.likert-number,.likert-smiley,.likert-star){max-width:100%;padding:0 .5rem;display:flex;flex-direction:column}.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:700px}@media (min-width: 1200px){.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:900px}}@media (max-width: 768px){.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:100%;width:100%;padding:0 4px}}.chat-card-container .ul-card--matrix_container{max-width:100%;overflow-x:auto}.chat-card-container .ul-card--matrix_grid{min-width:100%}.chat-card-container .ul-card__matrix{width:100%}.chat-card-container .choice-label-container{gap:8px}@media (max-width: 768px){.sprig-header-label-container,.sprig-header-label,.choice{font-size:14px}.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:100%;width:100%}.chat-card-container .ul-card--matrix_container{overflow-x:auto;-webkit-overflow-scrolling:touch}}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-conversational-ui .chat-card-container .chat-card.ul-card--nps{width:100%;min-width:262px;max-width:500px;box-sizing:border-box}.ul-conversational-ui .ul-card--nps__numbers{background-color:#fff}.ul-conversational-ui .ul-card--nps__numbers>button{padding:5px 4px}.ul-conversational-ui .nps-number{color:var(--text-color);border:2px solid var(--nps-number-border)}@media (max-width: 768px){.ul-conversational-ui .nps-number{font-size:16px;height:35px}.ul-conversational-ui .ul-card--nps__labels{font-size:12px;font-weight:400;color:var(--text-color)}}@media (min-width: 769px){.ul-conversational-ui .nps-number{font-size:20px;height:40px}.ul-conversational-ui .ul-card--nps__labels{font-size:14px;font-weight:400;color:#2f2e2c}}.ul-card-rank__option{text-align:left;background:#0000000d;margin-bottom:8px}.ul-card-rank__option.is-dragging{background-color:#0000000d;border:none}.ul-card-rank__labels{font-weight:400;color:var(--text-color)}@media (min-width: 1200px){.ul-card--rank__question-inner-container{max-width:900px}}@media (max-width: 768px){.ul-card--rank__question-inner-container{min-width:0;max-width:100%;width:100%;font-size:14px}.ul-card-rank__labels{font-size:14px}.ul-card-rank__option>span{font-size:14px}.ul-card-rank__option>select{font-size:14px}}.select-button{align-items:center;background-color:var(--select-button-bg);border-radius:8px;border:1px solid #E8E7E6;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:var(--select-button-hover)}.select-button:active{background-color:var(--select-button-bg)}.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:var(--select-list-bg);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:8px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:var(--select-checkbox-hover-bg)}.chat-card .select-checkbox{border:1px solid var(--select-checkbox-border);background-color:var(--select-checkbox-bg);margin-top:6px}.chat-card .select-radio{box-shadow:unset;border:1px solid var(--select-checkbox-border);background-color:var(--select-radio-bg);margin-top:6px}.chat-card .select-radio.ul-select-active-dynamic-style{border:1px solid var(--select-checkbox-border);background-color:var(--select-radio-active-bg);box-shadow:inset 0 0 1px 3px #fff}.ul-card-text{margin-top:2px;margin-bottom:3px;gap:8px;display:flex;flex-direction:column;justify-content:center;padding:0;width:100%}.ul-card-text__container{align-items:center;box-sizing:border-box;display:flex;justify-content:center;margin-bottom:12px;flex:1 1 auto;flex-direction:row;border-radius:8px;gap:0;width:auto;min-width:180px;max-width:100%}@media (max-width: 768px){.ul-card-text__container{max-width:100%;width:100%;margin-bottom:8px}}.ul-card-text__container textarea{border-radius:8px;width:60vw;box-sizing:border-box}.ul-card-text__container textarea:focus{border:1px solid #0B2330}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px;background-color:var(--text-card-input-bg)}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px;background-color:var(--text-card-input-bg)}.ul-card-text__input{background-color:var(--text-card-input-bg);box-sizing:border-box;color:var(--text-color);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:8px;resize:none;width:100%;border-radius:3px;line-height:20px;overflow-wrap:break-word;min-width:180px;max-width:100%;border-color:var(--text-card-border)}@media (max-width: 768px){.ul-card-text__input{min-width:0;max-width:100%;width:100%;font-size:14px}}.ul-card-text__input::placeholder{color:#6c6c6e80;background-color:var(--text-card-input-bg)}.ul-card-text__input:focus{outline:none;background-color:var(--text-card-input-bg)}.ul-card-text__input--desktop:hover:not(:focus){background-color:var(--text-card-input-bg)}@media (max-width: 768px){.ul-card-text__input{font-size:16px}}.ul-card__text-url-prompt .sprig-question-body{padding:0}.ul-card__text-url-prompt .ul-card-button-group{padding:10px}.chat-card.ul-card__text-url-prompt .ul-card-button-group{align-items:flex-end;padding:0}@keyframes flashingDot{0%{background-color:#262136}50%,to{background-color:#f8f9fa}}.thinking-dots-container{display:flex;justify-content:center;align-items:flex-end;position:relative;width:18px;margin-top:.5em}.thinking-dot{position:relative;width:3px;height:3px;border-radius:5px;background-color:#262136;color:#262136;animation:flashingDot 1s infinite linear alternate;animation-delay:.5s}.thinking-dot:before,.thinking-dot:after{content:"";display:inline-block;position:absolute;top:0;width:3px;height:3px;border-radius:5px;background-color:#262136;color:#262136;animation:flashingDot 1s infinite alternate}.thinking-dot:before{left:-5px;animation-delay:0s}.thinking-dot:after{left:5px;animation-delay:1s}[id^=ul-card-video__player_recorder],[id^=ul-card-video__question_player]{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.answered-card [id^=ul-card-video__player_recorder] .ul-control-panel{display:none!important}html{--root-bg: #e8e7e6;--root-input-bg: #ffffff;--root-input-border: #e8e7e6;--root-input-border-dark: #333;--chat-close-hover-bg: rgba(255, 255, 255, .5);--chat-msg-no-response: #666;--chat-right-bg: var(--root-bg);--chat-left-bg: #F7F6F5;--chat-end-text: #999;--chat-footer: #000000;--chat-answered-overlay-bg: rgba(255, 255, 255, .3);--chat-choice-bg: unset;--consent-sprig-stretch-bg: var(--root-bg);--consent-input-bg: var(--root-bg);--text-card-input-bg: var(--root-input-bg);--text-card-border: var(--root-input-border);--select-checkbox-bg: #fff;--select-checkbox-hover-bg: var(--root-input-bg);--select-checkbox-border: var(--root-input-border-dark);--select-radio-bg: var(--root-input-bg);--select-radio-active-bg: #000;--select-radio-active-border-bg: var(--root-bg);--select-list-bg: #fff;--select-button-bg: #fff;--select-button-hover: #f2f2f2;--select-option-bg: #fff;--select-multiselect-checkbox-label-bg: var(--root-bg);--nps-number-border: var(--root-input-border);--nps-unselected: #fff}';
2
- export {
3
- t as default
4
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.default='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-card-text__button{background-color:var(--theme);border-radius:8px;padding:11px 16px;gap:5px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px}.ul-card-text__button:hover{opacity:.8}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{opacity:.4;cursor:not-allowed}.ul-card-text__button.ul-button-inactive{background-color:transparent;color:#5d696f}.ul-card-skip__button{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}.sprig-question-footer-container{padding:0;align-items:center}.ul-card__button-checkmark{display:flex;align-items:center;font-size:15px;gap:5px;padding:11px 16px;border-radius:8px;background-color:var(--theme);color:#fff}.ul-card__button-checkmark:disabled{background-color:var(--theme);opacity:.5;color:#fff}.ul-card__button-checkmark:disabled>svg path{stroke:#fff}.ul-conversational-ui{width:100%;height:100%;display:flex;flex-direction:column;min-height:500px;font-size:15px;position:relative}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:right;align-self:stretch}.conversational-close-btn{position:fixed;top:20px;right:16px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:50%;cursor:pointer;z-index:1000}.conversational-close-btn:hover{background:var(--chat-close-hover-bg)}.chat-container{flex:1;display:flex;flex-direction:column;align-items:center}.chat-messages{flex:1;display:flex;flex-direction:column;max-width:600px;width:100%;padding:36px 16px 44px;gap:8px;box-sizing:border-box}.chat-message-no-response{font-style:italic;color:var(--chat-msg-no-response)}.chat-card .choice{margin-bottom:0;background-color:var(--chat-choice-bg);padding:0;line-height:2;border:none;min-height:28px}.chat-card .choice.ul-select-active-dynamic-style{border:none}.chat-bubble-container{display:flex;flex-direction:row;align-items:flex-start;width:100%;animation:fadeInUp .3s ease-out}.chat-bubble-container .chat-avatar{display:none}.chat-left{align-self:flex-start;width:auto;justify-content:flex-start}.chat-container .chat-bubble-container.chat-left.chat-no-avatar .chat-bubble{margin-left:0}.chat-right{align-self:flex-end;width:100%;justify-content:flex-end;margin-top:8px}.sprig-question-body{word-wrap:break-word;position:relative;border-radius:8px;box-sizing:border-box;max-width:448px;gap:8px;padding:0;overflow:unset}.chat-bubble-text-only{width:auto;max-width:286px}.chat-bubble.chat-bubble-right:has(.likert-number,.likert-smiley,.likert-star,.nps-number){width:100%}.chat-bubble.chat-bubble-right .chat-message-text{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:var(--text-color);background:var(--chat-right-bg)}.chat-bubble-left{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:var(--text-color);background:var(--chat-left-bg)}.chat-bubble.chat-bubble-right:has(.answered-card) .sprig-question-body{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:var(--text-color);background:var(--chat-right-bg)}.chat-bubble.chat-bubble-right:not(:has(.chat-bubble-text-only)) .sprig-question-body{border-radius:8px;word-wrap:break-word;position:relative;padding:16px;color:var(--text-color);background:var(--chat-right-bg)}.chat-message-text{line-height:1.4;margin:0;text-align:left;color:var(--text-color);font-size:14px;font-weight:400;word-wrap:break-word}.chat-persona-label{margin-top:-4px;text-align:left;color:var(--chat-end-text);font-size:14px;font-weight:400;line-height:140%}.chat-card-container{padding:0;background:transparent}@media (max-width: 600px){.conversational-ui .long-form-question-footer-container-logo{position:unset}}.chat-card-container .chat-card{display:flex;flex-direction:column;gap:8px}.chat-thanks-card{background:transparent;box-shadow:none;text-align:center}.end-of-survey-text{text-align:center;color:var(--chat-end-text);font-size:14px;margin-top:8px;font-weight:400}.answered-card{pointer-events:none;opacity:.7;position:relative}.footer{width:100%;margin-top:12px;font-size:12px;font-weight:400;line-height:12px;color:var(--chat-footer)}.answered-card:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:var(--chat-answered-overlay-bg);pointer-events:none;border-radius:inherit}.answered-card button,.answered-card input,.answered-card textarea,.answered-card select{pointer-events:none}.answered-card:not(.ul-card__consent-legal):not(.ul-card__text-url-prompt) .ul-card-button-group *{display:none}.sprig-question-footer-container{padding:0;align-items:end}.chat-card.ul-card--video .sprig-question-footer-container{flex-direction:row;justify-content:flex-end;align-items:center}.ul-card-text__button{font-size:13px}@keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.chat-bubble-container.chat-left.chat-no-avatar .chat-bubble{margin-left:42px}.ul-card-vertical__button-wrapper{align-items:end}.ul-card-skip__button{padding:0 16px}.sprig-stretch{padding:16px;display:flex;flex-direction:column;gap:8px;border-radius:8px;background:var(--consent-sprig-stretch-bg)}.sprig-stretch input{background-color:var(--consent-input-bg)}.ul-card--likert__numbers{background-color:#fff;display:flex;width:100%;box-sizing:border-box;flex-wrap:nowrap;justify-content:space-between;align-items:center}.ul-card--likert__numbers>button{padding:5px 4px}.ul-card--likert__numbers:has(.likert-star,.likert-smiley){background-color:transparent;justify-content:space-between;gap:2px}.likert-smiley>svg{scale:1.176}.ul-card--likert__numbers .likert-star,.ul-card--likert__numbers .likert-smiley{min-width:24px;min-height:57px;max-width:38px;max-height:38px;flex:0 1 auto;transition:height .2s,width .2s}.ul-card--likert__labels{font-weight:400;color:var(--text-color);text-align:center;word-break:break-word;font-size:.95rem}.likert-number,.likert-smiley,.likert-star{min-height:57px;max-height:57px;box-sizing:border-box;flex:1 1 auto;display:flex;align-items:center;justify-content:center;transition:height .2s,width .2s,font-size .2s}.sprig-question-body:has(.likert-number,.likert-smiley,.likert-star){max-width:100%;padding:0 .5rem;display:flex;flex-direction:column}.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:700px}@media (min-width: 1200px){.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:900px}}@media (max-width: 768px){.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:100%;width:100%;padding:0 4px}}.chat-card-container .ul-card--matrix_container{max-width:100%;overflow-x:auto}.chat-card-container .ul-card--matrix_grid{min-width:100%}.chat-card-container .ul-card__matrix{width:100%}.chat-card-container .choice-label-container{gap:8px}@media (max-width: 768px){.sprig-header-label-container,.sprig-header-label,.choice{font-size:14px}.chat-card-container:has(.ul-card__matrix),.chat-card-container:has([class*=matrix]){min-width:280px;max-width:100%;width:100%}.chat-card-container .ul-card--matrix_container{overflow-x:auto;-webkit-overflow-scrolling:touch}}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-conversational-ui .chat-card-container .chat-card.ul-card--nps{width:100%;min-width:262px;max-width:500px;box-sizing:border-box}.ul-conversational-ui .ul-card--nps__numbers{background-color:#fff}.ul-conversational-ui .ul-card--nps__numbers>button{padding:5px 4px}.ul-conversational-ui .nps-number{color:var(--text-color);border:2px solid var(--nps-number-border)}@media (max-width: 768px){.ul-conversational-ui .nps-number{font-size:16px;height:35px}.ul-conversational-ui .ul-card--nps__labels{font-size:12px;font-weight:400;color:var(--text-color)}}@media (min-width: 769px){.ul-conversational-ui .nps-number{font-size:20px;height:40px}.ul-conversational-ui .ul-card--nps__labels{font-size:14px;font-weight:400;color:#2f2e2c}}.ul-card-rank__option{text-align:left;background:#0000000d;margin-bottom:8px}.ul-card-rank__option.is-dragging{background-color:#0000000d;border:none}.ul-card-rank__labels{font-weight:400;color:var(--text-color)}@media (min-width: 1200px){.ul-card--rank__question-inner-container{max-width:900px}}@media (max-width: 768px){.ul-card--rank__question-inner-container{min-width:0;max-width:100%;width:100%;font-size:14px}.ul-card-rank__labels{font-size:14px}.ul-card-rank__option>span{font-size:14px}.ul-card-rank__option>select{font-size:14px}}.select-button{align-items:center;background-color:var(--select-button-bg);border-radius:8px;border:1px solid #E8E7E6;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:var(--select-button-hover)}.select-button:active{background-color:var(--select-button-bg)}.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:var(--select-list-bg);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:8px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:var(--select-checkbox-hover-bg)}.chat-card .select-checkbox{border:1px solid var(--select-checkbox-border);background-color:var(--select-checkbox-bg);margin-top:6px}.chat-card .select-radio{box-shadow:unset;border:1px solid var(--select-checkbox-border);background-color:var(--select-radio-bg);margin-top:6px}.chat-card .select-radio.ul-select-active-dynamic-style{border:1px solid var(--select-checkbox-border);background-color:var(--select-radio-active-bg);box-shadow:inset 0 0 1px 3px #fff}.ul-card-text{margin-top:2px;margin-bottom:3px;gap:8px;display:flex;flex-direction:column;justify-content:center;padding:0;width:100%}.ul-card-text__container{align-items:center;box-sizing:border-box;display:flex;justify-content:center;margin-bottom:12px;flex:1 1 auto;flex-direction:row;border-radius:8px;gap:0;width:auto;min-width:180px;max-width:100%}@media (max-width: 768px){.ul-card-text__container{max-width:100%;width:100%;margin-bottom:8px}}.ul-card-text__container textarea{border-radius:8px;width:60vw;box-sizing:border-box}.ul-card-text__container textarea:focus{border:1px solid #0B2330}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px;background-color:var(--text-card-input-bg)}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px;background-color:var(--text-card-input-bg)}.ul-card-text__input{background-color:var(--text-card-input-bg);box-sizing:border-box;color:var(--text-color);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:8px;resize:none;width:100%;border-radius:3px;line-height:20px;overflow-wrap:break-word;min-width:180px;max-width:100%;border-color:var(--text-card-border)}@media (max-width: 768px){.ul-card-text__input{min-width:0;max-width:100%;width:100%;font-size:14px}}.ul-card-text__input::placeholder{color:#6c6c6e80;background-color:var(--text-card-input-bg)}.ul-card-text__input:focus{outline:none;background-color:var(--text-card-input-bg)}.ul-card-text__input--desktop:hover:not(:focus){background-color:var(--text-card-input-bg)}@media (max-width: 768px){.ul-card-text__input{font-size:16px}}.ul-card__text-url-prompt .sprig-question-body{padding:0}.ul-card__text-url-prompt .ul-card-button-group{padding:10px}.chat-card.ul-card__text-url-prompt .ul-card-button-group{align-items:flex-end;padding:0}@keyframes flashingDot{0%{background-color:#262136}50%,to{background-color:#f8f9fa}}.thinking-dots-container{display:flex;justify-content:center;align-items:flex-end;position:relative;width:18px;margin-top:.5em}.thinking-dot{position:relative;width:3px;height:3px;border-radius:5px;background-color:#262136;color:#262136;animation:flashingDot 1s infinite linear alternate;animation-delay:.5s}.thinking-dot:before,.thinking-dot:after{content:"";display:inline-block;position:absolute;top:0;width:3px;height:3px;border-radius:5px;background-color:#262136;color:#262136;animation:flashingDot 1s infinite alternate}.thinking-dot:before{left:-5px;animation-delay:0s}.thinking-dot:after{left:5px;animation-delay:1s}[id^=ul-card-video__player_recorder],[id^=ul-card-video__question_player]{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.answered-card [id^=ul-card-video__player_recorder] .ul-control-panel{display:none!important}html{--root-bg: #e8e7e6;--root-input-bg: #ffffff;--root-input-border: #e8e7e6;--root-input-border-dark: #333;--chat-close-hover-bg: rgba(255, 255, 255, .5);--chat-msg-no-response: #666;--chat-right-bg: var(--root-bg);--chat-left-bg: #F7F6F5;--chat-end-text: #999;--chat-footer: #000000;--chat-answered-overlay-bg: rgba(255, 255, 255, .3);--chat-choice-bg: unset;--consent-sprig-stretch-bg: var(--root-bg);--consent-input-bg: var(--root-bg);--text-card-input-bg: var(--root-input-bg);--text-card-border: var(--root-input-border);--select-checkbox-bg: #fff;--select-checkbox-hover-bg: var(--root-input-bg);--select-checkbox-border: var(--root-input-border-dark);--select-radio-bg: var(--root-input-bg);--select-radio-active-bg: #000;--select-radio-active-border-bg: var(--root-bg);--select-list-bg: #fff;--select-button-bg: #fff;--select-button-hover: #f2f2f2;--select-option-bg: #fff;--select-multiselect-checkbox-label-bg: var(--root-bg);--nps-number-border: var(--root-input-border);--nps-unselected: #fff}';