posthog-js
Advanced tools
Comparing version 1.187.1 to 1.187.2
@@ -1,2 +0,2 @@ | ||
!function(){"use strict";const t="undefined"!=typeof window?window:void 0,e="undefined"!=typeof globalThis?globalThis:t,n=Array.prototype.forEach,i=null==e?void 0:e.navigator,o=null==e?void 0:e.document;null==e||e.location,null==e||e.fetch,null!=e&&e.XMLHttpRequest&&"withCredentials"in new e.XMLHttpRequest&&e.XMLHttpRequest,null==e||e.AbortController,null==i||i.userAgent;const r=null!=t?t:{},s="[PostHog.js]",l={_log:function(e){if(t&&r.POSTHOG_DEBUG&&!$(t.console)&&t.console){const r="__rrweb_original__"in t.console[e]?t.console[e].__rrweb_original__:t.console[e];for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];r(s,...i)}},info:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];l._log("log",...e)},warn:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];l._log("warn",...e)},error:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];l._log("error",...e)},critical:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];console.error(s,...e)},uninitializedWarning:t=>{l.error(`You must initialize PostHog before calling ${t}`)}},a={},c=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function u(t,e,i){if(C(t))if(n&&t.forEach===n)t.forEach(e,i);else if("length"in t&&t.length===+t.length)for(let n=0,o=t.length;n<o;n++)if(n in t&&e.call(i,t[n],n)===a)return}function _(t,e,n){if(!N(t)){if(C(t))return u(t,e,n);if(E(t)){for(const i of t.entries())if(e.call(n,i[1],i[0])===a)return}else for(const i in t)if(v.call(t,i)&&e.call(n,t[i],i)===a)return}}const h=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return u(n,(function(e){for(const n in e)void 0!==e[n]&&(t[n]=e[n])})),t};function d(t,e){return-1!==t.indexOf(e)}function m(t){const e=Object.keys(t);let n=e.length;const i=new Array(n);for(;n--;)i[n]=[e[n],t[e[n]]];return i}let f;!function(t){t.GZipJS="gzip-js",t.Base64="base64"}(f||(f={}));const g=Array.isArray,p=Object.prototype,v=p.hasOwnProperty,b=p.toString,C=g||function(t){return"[object Array]"===b.call(t)},y=t=>"function"==typeof t,k=t=>y(t)&&-1!==t.toString().indexOf("[native code]"),w=t=>{if(!y(t))return!1;return Object.getOwnPropertyNames(t.prototype||{}).some((t=>t.indexOf("__zone")))},$=t=>void 0===t,x=t=>"[object String]"==b.call(t),M=t=>null===t,N=t=>$(t)||M(t),D=t=>"[object Number]"==b.call(t),E=t=>t instanceof FormData;function O(t){return!!t&&1===t.nodeType}function A(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function S(t){return t?c(t).split(/\s+/):[]}function L(t){let e="";switch(typeof t.className){case"string":e=t.className;break;case"object":e=(t.className&&"baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";break;default:e=""}return S(e)}function T(t){let e="";return R(t)&&!P(t)&&t.childNodes&&t.childNodes.length&&_(t.childNodes,(function(t){var n,i;(function(t){return!!t&&3===t.nodeType})(t)&&t.textContent&&(e+=null!==(i=t.textContent,n=N(i)?null:c(i).split(/(\s+)/).filter((t=>W(t))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))&&void 0!==n?n:"")})),c(e)}const j=["a","button","form","input","select","textarea","label"];function R(t){for(let e=t;e.parentNode&&!A(e,"body");e=e.parentNode){const t=L(e);if(d(t,"ph-sensitive")||d(t,"ph-no-capture"))return!1}if(d(L(t),"ph-include"))return!0;const e=t.type||"";if(x(e))switch(e.toLowerCase()){case"hidden":case"password":return!1}const n=t.name||t.id||"";if(x(n)){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(n.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function P(t){return!!(A(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||A(t,"select")||A(t,"textarea")||"true"===t.getAttribute("contenteditable"))}const F="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",H=new RegExp(`^(?:${F})$`),q=new RegExp(F),z="\\d{3}-?\\d{2}-?\\d{4}",G=new RegExp(`^(${z})$`),B=new RegExp(`(${z})`);function W(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(N(t))return!1;if(x(t)){t=c(t);if((e?H:q).test((t||"").replace(/[- ]/g,"")))return!1;if((e?G:B).test(t))return!1}return!0}function X(t){let e=T(t);return e=`${e} ${I(t)}`.trim(),W(e)?e:""}function I(t){let e="";return t&&t.childNodes&&t.childNodes.length&&_(t.childNodes,(function(t){var n;if(t&&"span"===(null===(n=t.tagName)||void 0===n?void 0:n.toLowerCase()))try{const n=T(t);e=`${e} ${n}`.trim(),t.childNodes&&t.childNodes.length&&(e=`${e} ${I(t)}`.trim())}catch(t){l.error(t)}})),e}function V(t){return function(t){const e=t.map((t=>{var e,n;let i="";if(t.tag_name&&(i+=t.tag_name),t.attr_class){t.attr_class.sort();for(const e of t.attr_class)i+=`.${e.replace(/"/g,"")}`}const o={...t.text?{text:t.text}:{},"nth-child":null!==(e=t.nth_child)&&void 0!==e?e:0,"nth-of-type":null!==(n=t.nth_of_type)&&void 0!==n?n:0,...t.href?{href:t.href}:{},...t.attr_id?{attr_id:t.attr_id}:{},...t.attributes},r={};return m(o).sort(((t,e)=>{let[n]=t,[i]=e;return n.localeCompare(i)})).forEach((t=>{let[e,n]=t;return r[Z(e.toString())]=Z(n.toString())})),i+=":",i+=m(o).map((t=>{let[e,n]=t;return`${e}="${n}"`})).join(""),i}));return e.join(";")}(function(t){return t.map((t=>{var e,n;const i={text:null===(e=t.$el_text)||void 0===e?void 0:e.slice(0,400),tag_name:t.tag_name,href:null===(n=t.attr__href)||void 0===n?void 0:n.slice(0,2048),attr_class:J(t),attr_id:t.attr__id,nth_child:t.nth_child,nth_of_type:t.nth_of_type,attributes:{}};return m(t).filter((t=>{let[e]=t;return 0===e.indexOf("attr__")})).forEach((t=>{let[e,n]=t;return i.attributes[e]=n})),i}))}(t))}function Z(t){return t.replace(/"|\\"/g,'\\"')}function J(t){const e=t.attr__class;return e?C(e)?e:S(e):void 0}function U(t,e){return e.length>t?e.slice(0,t)+"...":e}function Y(t){if(t.previousElementSibling)return t.previousElementSibling;let e=t;do{e=e.previousSibling}while(e&&!O(e));return e}function K(t,e,n,i){const o=t.tagName.toLowerCase(),r={tag_name:o};j.indexOf(o)>-1&&!n&&("a"===o.toLowerCase()||"button"===o.toLowerCase()?r.$el_text=U(1024,X(t)):r.$el_text=U(1024,T(t)));const s=L(t);s.length>0&&(r.classes=s.filter((function(t){return""!==t}))),_(t.attributes,(function(n){var o;if((!P(t)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&((null==i||!i.includes(n.name))&&!e&&W(n.value)&&(o=n.name,!x(o)||"_ngcontent"!==o.substring(0,10)&&"_nghost"!==o.substring(0,7)))){let t=n.value;"class"===n.name&&(t=S(t).join(" ")),r["attr__"+n.name]=U(1024,t)}}));let l=1,a=1,c=t;for(;c=Y(c);)l++,c.tagName===t.tagName&&a++;return r.nth_child=l,r.nth_of_type=a,r}function Q(e,n){var i,r;let{e:s,maskAllElementAttributes:l,maskAllText:a,elementAttributeIgnoreList:c,elementsChainAsString:u}=n;const m=[e];let f=e;for(;f.parentNode&&!A(f,"body");)(g=f.parentNode)&&11===g.nodeType?(m.push(f.parentNode.host),f=f.parentNode.host):(m.push(f.parentNode),f=f.parentNode);var g;const p=[],v={};let b,C=!1,y=!1;if(_(m,(t=>{const e=R(t);"a"===t.tagName.toLowerCase()&&(C=t.getAttribute("href"),C=e&&C&&W(C)&&C);d(L(t),"ph-no-capture")&&(y=!0),p.push(K(t,l,a,c));const n=function(t){if(!R(t))return{};const e={};return _(t.attributes,(function(t){if(t.name&&0===t.name.indexOf("data-ph-capture-attribute")){const n=t.name.replace("data-ph-capture-attribute-",""),i=t.value;n&&i&&W(i)&&(e[n]=i)}})),e}(t);h(v,n)})),y)return{props:{},explicitNoCapture:y};if(a||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?p[0].$el_text=X(e):p[0].$el_text=T(e)),C){var k,w;p[0].attr__href=C;const e=null===(k=(t=>{const e=null==o?void 0:o.createElement("a");return $(e)?null:(e.href=t,e)})(C))||void 0===k?void 0:k.host,n=null==t||null===(w=t.location)||void 0===w?void 0:w.host;e&&n&&e!==n&&(b=C)}return{props:h({$event_type:s.type,$ce_version:1},u?{$elements_chain:V(p)}:{$elements:p},null!==(i=p[0])&&void 0!==i&&i.$el_text?{$el_text:null===(r=p[0])||void 0===r?void 0:r.$el_text}:{},b&&"click"===s.type?{$external_click_url:b}:{},v)}}const tt={};function et(t){return function(t,e){const n=tt[t];if(n)return n;let i=e[t];if(k(i)&&!w(i))return tt[t]=i.bind(e);const o=e.document;if(o&&y(o.createElement))try{const e=o.createElement("iframe");e.hidden=!0,o.head.appendChild(e);const n=e.contentWindow;n&&n[t]&&(i=n[t]),o.head.removeChild(e)}catch(e){l.warn(`Could not create sandbox iframe for ${t} check, bailing to assignableWindow.${t}: `,e)}return i&&y(i)?tt[t]=i.bind(e):i}("MutationObserver",t)}function nt(t){const e=$((n=t).target)?n.srcElement||null:null!==(i=n.target)&&void 0!==i&&i.shadowRoot?n.composedPath()[0]||null:n.target||null;var n,i;return e?{node:e,originalEvent:t,timestamp:Date.now()}:null}function it(t,e){return D(t)&&t>=e}class ot{_clicks=[];_defaultConfig=t=>({element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500,__onCapture:t});asRequiredConfig(t){var e,n,i,o;const r=this._defaultConfig((null==t?void 0:t.__onCapture)||this._captureDeadClick.bind(this));return{element_attribute_ignorelist:null!==(e=null==t?void 0:t.element_attribute_ignorelist)&&void 0!==e?e:r.element_attribute_ignorelist,scroll_threshold_ms:null!==(n=null==t?void 0:t.scroll_threshold_ms)&&void 0!==n?n:r.scroll_threshold_ms,selection_change_threshold_ms:null!==(i=null==t?void 0:t.selection_change_threshold_ms)&&void 0!==i?i:r.selection_change_threshold_ms,mutation_threshold_ms:null!==(o=null==t?void 0:t.mutation_threshold_ms)&&void 0!==o?o:r.mutation_threshold_ms,__onCapture:r.__onCapture}}constructor(t,e){this.instance=t,this._config=this.asRequiredConfig(e),this._onCapture=this._config.__onCapture}start(t){this._startClickObserver(),this._startScrollObserver(),this._startSelectionChangedObserver(),this._startMutationObserver(t)}_startMutationObserver(t){if(!this._mutationObserver){const e=et(r);this._mutationObserver=new e((t=>{this.onMutation(t)})),this._mutationObserver.observe(t,{attributes:!0,characterData:!0,childList:!0,subtree:!0})}}stop(){var t;null===(t=this._mutationObserver)||void 0===t||t.disconnect(),this._mutationObserver=void 0,r.removeEventListener("click",this._onClick),r.removeEventListener("scroll",this._onScroll,!0),r.removeEventListener("selectionchange",this._onSelectionChange)}onMutation(t){this._lastMutation=Date.now()}_startClickObserver(){r.addEventListener("click",this._onClick)}_onClick=t=>{const e=nt(t);M(e)||this._ignoreClick(e)||this._clicks.push(e),this._clicks.length&&$(this._checkClickTimer)&&(this._checkClickTimer=r.setTimeout((()=>{this._checkClicks()}),1e3))};_startScrollObserver(){r.addEventListener("scroll",this._onScroll,!0)}_onScroll=()=>{const t=Date.now();t%50==0&&this._clicks.forEach((e=>{$(e.scrollDelayMs)&&(e.scrollDelayMs=t-e.timestamp)}))};_startSelectionChangedObserver(){r.addEventListener("selectionchange",this._onSelectionChange)}_onSelectionChange=()=>{this._lastSelectionChanged=Date.now()};_ignoreClick(t){if(!t)return!0;if("__POSTHOG_TOOLBAR__"===(e=t.node).id||null!==(n=e.closest)&&void 0!==n&&n.call(e,".toolbar-global-fade-container"))return!0;var e,n;return!!this._clicks.some((e=>e.node===t.node&&Math.abs(e.timestamp-t.timestamp)<1e3))||!(!A(t.node,"html")&&O(t.node)&&!j.includes(t.node.tagName.toLowerCase()))}_checkClicks(){if(!this._clicks.length)return;clearTimeout(this._checkClickTimer),this._checkClickTimer=void 0;const t=this._clicks;this._clicks=[];for(const n of t){var e;n.mutationDelayMs=null!==(e=n.mutationDelayMs)&&void 0!==e?e:this._lastMutation&&n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0,n.absoluteDelayMs=Date.now()-n.timestamp,n.selectionChangedDelayMs=this._lastSelectionChanged&&n.timestamp<=this._lastSelectionChanged?this._lastSelectionChanged-n.timestamp:void 0;const t=it(n.scrollDelayMs,this._config.scroll_threshold_ms),i=it(n.selectionChangedDelayMs,this._config.selection_change_threshold_ms),o=it(n.mutationDelayMs,this._config.mutation_threshold_ms),r=it(n.absoluteDelayMs,1.1*this._config.mutation_threshold_ms),s=D(n.scrollDelayMs)&&n.scrollDelayMs<this._config.scroll_threshold_ms,l=D(n.mutationDelayMs)&&n.mutationDelayMs<this._config.mutation_threshold_ms,a=D(n.selectionChangedDelayMs)&&n.selectionChangedDelayMs<this._config.selection_change_threshold_ms;s||l||a||(t||o||r||i?this._onCapture(n,{$dead_click_last_mutation_timestamp:this._lastMutation,$dead_click_event_timestamp:n.timestamp,$dead_click_scroll_timeout:t,$dead_click_mutation_timeout:o,$dead_click_absolute_timeout:r,$dead_click_selection_changed_timeout:i}):n.absoluteDelayMs<this._config.mutation_threshold_ms&&this._clicks.push(n))}this._clicks.length&&$(this._checkClickTimer)&&(this._checkClickTimer=r.setTimeout((()=>{this._checkClicks()}),1e3))}_captureDeadClick(t,e){this.instance.capture("$dead_click",{...e,...Q(t.node,{e:t.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this._config.element_attribute_ignorelist,elementsChainAsString:!1}).props,$dead_click_scroll_delay_ms:t.scrollDelayMs,$dead_click_mutation_delay_ms:t.mutationDelayMs,$dead_click_absolute_delay_ms:t.absoluteDelayMs,$dead_click_selection_changed_delay_ms:t.selectionChangedDelayMs},{timestamp:new Date(t.timestamp)})}}r.__PosthogExtensions__=r.__PosthogExtensions__||{},r.__PosthogExtensions__.initDeadClicksAutocapture=(t,e)=>new ot(t,e)}(); | ||
!function(){"use strict";function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function e(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?t(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function n(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var r="undefined"!=typeof window?window:void 0,i="undefined"!=typeof globalThis?globalThis:r,a=Array.prototype.forEach,o=null==i?void 0:i.navigator,l=null==i?void 0:i.document;null==i||i.location,null==i||i.fetch,null!=i&&i.XMLHttpRequest&&"withCredentials"in new i.XMLHttpRequest&&i.XMLHttpRequest,null==i||i.AbortController,null==o||o.userAgent;var s=null!=r?r:{},c="[PostHog.js]",u={_log:function(t){if(r&&s.POSTHOG_DEBUG&&!M(r.console)&&r.console){for(var e=("__rrweb_original__"in r.console[t]?r.console[t].__rrweb_original__:r.console[t]),n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];e(c,...i)}},info:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];u._log("log",...e)},warn:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];u._log("warn",...e)},error:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];u._log("error",...e)},critical:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];console.error(c,...e)},uninitializedWarning:t=>{u.error("You must initialize PostHog before calling ".concat(t))}},_={},h=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function d(t,e,n){if(w(t))if(a&&t.forEach===a)t.forEach(e,n);else if("length"in t&&t.length===+t.length)for(var r=0,i=t.length;r<i;r++)if(r in t&&e.call(n,t[r],r)===_)return}function f(t,e,n){if(!A(t)){if(w(t))return d(t,e,n);if($(t)){for(var r of t.entries())if(e.call(n,r[1],r[0])===_)return}else for(var i in t)if(C.call(t,i)&&e.call(n,t[i],i)===_)return}}var m,v=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return d(n,(function(e){for(var n in e)void 0!==e[n]&&(t[n]=e[n])})),t};function g(t,e){return-1!==t.indexOf(e)}function p(t){for(var e=Object.keys(t),n=e.length,r=new Array(n);n--;)r[n]=[e[n],t[e[n]]];return r}!function(t){t.GZipJS="gzip-js",t.Base64="base64"}(m||(m={}));var b=Array.isArray,y=Object.prototype,C=y.hasOwnProperty,k=y.toString,w=b||function(t){return"[object Array]"===k.call(t)},O=t=>"function"==typeof t,x=t=>O(t)&&-1!==t.toString().indexOf("[native code]"),D=t=>!!O(t)&&Object.getOwnPropertyNames(t.prototype||{}).some((t=>t.indexOf("__zone"))),M=t=>void 0===t,E=t=>"[object String]"==k.call(t),N=t=>null===t,A=t=>M(t)||N(t),S=t=>"[object Number]"==k.call(t),$=t=>t instanceof FormData;function j(t){return!!t&&1===t.nodeType}function L(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function P(t){return t?h(t).split(/\s+/):[]}function T(t){var e="";switch(typeof t.className){case"string":e=t.className;break;case"object":e=(t.className&&"baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";break;default:e=""}return P(e)}function R(t){var e="";return H(t)&&!q(t)&&t.childNodes&&t.childNodes.length&&f(t.childNodes,(function(t){var n,r;(function(t){return!!t&&3===t.nodeType})(t)&&t.textContent&&(e+=null!==(r=t.textContent,n=A(r)?null:h(r).split(/(\s+)/).filter((t=>V(t))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))&&void 0!==n?n:"")})),h(e)}var F=["a","button","form","input","select","textarea","label"];function H(t){for(var e=t;e.parentNode&&!L(e,"body");e=e.parentNode){var n=T(e);if(g(n,"ph-sensitive")||g(n,"ph-no-capture"))return!1}if(g(T(t),"ph-include"))return!0;var r=t.type||"";if(E(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=t.name||t.id||"";if(E(i)){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function q(t){return!!(L(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||L(t,"select")||L(t,"textarea")||"true"===t.getAttribute("contenteditable"))}var z="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",G=new RegExp("^(?:".concat(z,")$")),B=new RegExp(z),W="\\d{3}-?\\d{2}-?\\d{4}",X=new RegExp("^(".concat(W,")$")),I=new RegExp("(".concat(W,")"));function V(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(A(t))return!1;if(E(t)){if(t=h(t),(e?G:B).test((t||"").replace(/[- ]/g,"")))return!1;if((e?X:I).test(t))return!1}return!0}function Z(t){var e=R(t);return V(e="".concat(e," ").concat(J(t)).trim())?e:""}function J(t){var e="";return t&&t.childNodes&&t.childNodes.length&&f(t.childNodes,(function(t){var n;if(t&&"span"===(null===(n=t.tagName)||void 0===n?void 0:n.toLowerCase()))try{var r=R(t);e="".concat(e," ").concat(r).trim(),t.childNodes&&t.childNodes.length&&(e="".concat(e," ").concat(J(t)).trim())}catch(t){u.error(t)}})),e}function U(t){return function(t){var n=t.map((t=>{var n,r,i="";if(t.tag_name&&(i+=t.tag_name),t.attr_class)for(var a of(t.attr_class.sort(),t.attr_class))i+=".".concat(a.replace(/"/g,""));var o=e(e(e(e({},t.text?{text:t.text}:{}),{},{"nth-child":null!==(n=t.nth_child)&&void 0!==n?n:0,"nth-of-type":null!==(r=t.nth_of_type)&&void 0!==r?r:0},t.href?{href:t.href}:{}),t.attr_id?{attr_id:t.attr_id}:{}),t.attributes),l={};return p(o).sort(((t,e)=>{var[n]=t,[r]=e;return n.localeCompare(r)})).forEach((t=>{var[e,n]=t;return l[Y(e.toString())]=Y(n.toString())})),i+=":",i+=p(o).map((t=>{var[e,n]=t;return"".concat(e,'="').concat(n,'"')})).join("")}));return n.join(";")}(function(t){return t.map((t=>{var e,n,r={text:null===(e=t.$el_text)||void 0===e?void 0:e.slice(0,400),tag_name:t.tag_name,href:null===(n=t.attr__href)||void 0===n?void 0:n.slice(0,2048),attr_class:K(t),attr_id:t.attr__id,nth_child:t.nth_child,nth_of_type:t.nth_of_type,attributes:{}};return p(t).filter((t=>{var[e]=t;return 0===e.indexOf("attr__")})).forEach((t=>{var[e,n]=t;return r.attributes[e]=n})),r}))}(t))}function Y(t){return t.replace(/"|\\"/g,'\\"')}function K(t){var e=t.attr__class;return e?w(e)?e:P(e):void 0}function Q(t,e){return e.length>t?e.slice(0,t)+"...":e}function tt(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do{e=e.previousSibling}while(e&&!j(e));return e}function et(t,e,n,r){var i=t.tagName.toLowerCase(),a={tag_name:i};F.indexOf(i)>-1&&!n&&("a"===i.toLowerCase()||"button"===i.toLowerCase()?a.$el_text=Q(1024,Z(t)):a.$el_text=Q(1024,R(t)));var o=T(t);o.length>0&&(a.classes=o.filter((function(t){return""!==t}))),f(t.attributes,(function(n){var i;if((!q(t)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&((null==r||!r.includes(n.name))&&!e&&V(n.value)&&(i=n.name,!E(i)||"_ngcontent"!==i.substring(0,10)&&"_nghost"!==i.substring(0,7)))){var o=n.value;"class"===n.name&&(o=P(o).join(" ")),a["attr__"+n.name]=Q(1024,o)}}));for(var l=1,s=1,c=t;c=tt(c);)l++,c.tagName===t.tagName&&s++;return a.nth_child=l,a.nth_of_type=s,a}function nt(t,e){for(var n,i,a,{e:o,maskAllElementAttributes:s,maskAllText:c,elementAttributeIgnoreList:u,elementsChainAsString:_}=e,h=[t],d=t;d.parentNode&&!L(d,"body");)(a=d.parentNode)&&11===a.nodeType?(h.push(d.parentNode.host),d=d.parentNode.host):(h.push(d.parentNode),d=d.parentNode);var m,p,b,y=[],C={},k=!1,w=!1;if(f(h,(t=>{var e=H(t);"a"===t.tagName.toLowerCase()&&(k=t.getAttribute("href"),k=e&&k&&V(k)&&k),g(T(t),"ph-no-capture")&&(w=!0),y.push(et(t,s,c,u));var n=function(t){if(!H(t))return{};var e={};return f(t.attributes,(function(t){if(t.name&&0===t.name.indexOf("data-ph-capture-attribute")){var n=t.name.replace("data-ph-capture-attribute-",""),r=t.value;n&&r&&V(r)&&(e[n]=r)}})),e}(t);v(C,n)})),w)return{props:{},explicitNoCapture:w};if(c||("a"===t.tagName.toLowerCase()||"button"===t.tagName.toLowerCase()?y[0].$el_text=Z(t):y[0].$el_text=R(t)),k){var O,x;y[0].attr__href=k;var D=null===(p=k,b=null==l?void 0:l.createElement("a"),O=M(b)?null:(b.href=p,b))||void 0===O?void 0:O.host,E=null==r||null===(x=r.location)||void 0===x?void 0:x.host;D&&E&&D!==E&&(m=k)}return{props:v({$event_type:o.type,$ce_version:1},_?{$elements_chain:U(y)}:{$elements:y},null!==(n=y[0])&&void 0!==n&&n.$el_text?{$el_text:null===(i=y[0])||void 0===i?void 0:i.$el_text}:{},m&&"click"===o.type?{$external_click_url:m}:{},C)}}var rt={};function it(t){return function(t,e){var n=rt[t];if(n)return n;var r=e[t];if(x(r)&&!D(r))return rt[t]=r.bind(e);var i=e.document;if(i&&O(i.createElement))try{var a=i.createElement("iframe");a.hidden=!0,i.head.appendChild(a);var o=a.contentWindow;o&&o[t]&&(r=o[t]),i.head.removeChild(a)}catch(e){u.warn("Could not create sandbox iframe for ".concat(t," check, bailing to assignableWindow.").concat(t,": "),e)}return r&&O(r)?rt[t]=r.bind(e):r}("MutationObserver",t)}function at(t){var e,n,r=M((e=t).target)?e.srcElement||null:null!==(n=e.target)&&void 0!==n&&n.shadowRoot?e.composedPath()[0]||null:e.target||null;return r?{node:r,originalEvent:t,timestamp:Date.now()}:null}function ot(t,e){return S(t)&&t>=e}class lt{asRequiredConfig(t){var e,n,r,i,a=this._defaultConfig((null==t?void 0:t.__onCapture)||this._captureDeadClick.bind(this));return{element_attribute_ignorelist:null!==(e=null==t?void 0:t.element_attribute_ignorelist)&&void 0!==e?e:a.element_attribute_ignorelist,scroll_threshold_ms:null!==(n=null==t?void 0:t.scroll_threshold_ms)&&void 0!==n?n:a.scroll_threshold_ms,selection_change_threshold_ms:null!==(r=null==t?void 0:t.selection_change_threshold_ms)&&void 0!==r?r:a.selection_change_threshold_ms,mutation_threshold_ms:null!==(i=null==t?void 0:t.mutation_threshold_ms)&&void 0!==i?i:a.mutation_threshold_ms,__onCapture:a.__onCapture}}constructor(t,e){n(this,"_clicks",[]),n(this,"_defaultConfig",(t=>({element_attribute_ignorelist:[],scroll_threshold_ms:100,selection_change_threshold_ms:100,mutation_threshold_ms:2500,__onCapture:t}))),n(this,"_onClick",(t=>{var e=at(t);N(e)||this._ignoreClick(e)||this._clicks.push(e),this._clicks.length&&M(this._checkClickTimer)&&(this._checkClickTimer=s.setTimeout((()=>{this._checkClicks()}),1e3))})),n(this,"_onScroll",(()=>{var t=Date.now();t%50==0&&this._clicks.forEach((e=>{M(e.scrollDelayMs)&&(e.scrollDelayMs=t-e.timestamp)}))})),n(this,"_onSelectionChange",(()=>{this._lastSelectionChanged=Date.now()})),this.instance=t,this._config=this.asRequiredConfig(e),this._onCapture=this._config.__onCapture}start(t){this._startClickObserver(),this._startScrollObserver(),this._startSelectionChangedObserver(),this._startMutationObserver(t)}_startMutationObserver(t){if(!this._mutationObserver){var e=it(s);this._mutationObserver=new e((t=>{this.onMutation(t)})),this._mutationObserver.observe(t,{attributes:!0,characterData:!0,childList:!0,subtree:!0})}}stop(){var t;null===(t=this._mutationObserver)||void 0===t||t.disconnect(),this._mutationObserver=void 0,s.removeEventListener("click",this._onClick),s.removeEventListener("scroll",this._onScroll,!0),s.removeEventListener("selectionchange",this._onSelectionChange)}onMutation(t){this._lastMutation=Date.now()}_startClickObserver(){s.addEventListener("click",this._onClick)}_startScrollObserver(){s.addEventListener("scroll",this._onScroll,!0)}_startSelectionChangedObserver(){s.addEventListener("selectionchange",this._onSelectionChange)}_ignoreClick(t){return!t||(!!("__POSTHOG_TOOLBAR__"===(e=t.node).id||null!==(n=e.closest)&&void 0!==n&&n.call(e,".toolbar-global-fade-container"))||(!!this._clicks.some((e=>e.node===t.node&&Math.abs(e.timestamp-t.timestamp)<1e3))||!(!L(t.node,"html")&&j(t.node)&&!F.includes(t.node.tagName.toLowerCase()))));var e,n}_checkClicks(){if(this._clicks.length){clearTimeout(this._checkClickTimer),this._checkClickTimer=void 0;var t=this._clicks;for(var e of(this._clicks=[],t)){var n;e.mutationDelayMs=null!==(n=e.mutationDelayMs)&&void 0!==n?n:this._lastMutation&&e.timestamp<=this._lastMutation?this._lastMutation-e.timestamp:void 0,e.absoluteDelayMs=Date.now()-e.timestamp,e.selectionChangedDelayMs=this._lastSelectionChanged&&e.timestamp<=this._lastSelectionChanged?this._lastSelectionChanged-e.timestamp:void 0;var r=ot(e.scrollDelayMs,this._config.scroll_threshold_ms),i=ot(e.selectionChangedDelayMs,this._config.selection_change_threshold_ms),a=ot(e.mutationDelayMs,this._config.mutation_threshold_ms),o=ot(e.absoluteDelayMs,1.1*this._config.mutation_threshold_ms),l=S(e.scrollDelayMs)&&e.scrollDelayMs<this._config.scroll_threshold_ms,c=S(e.mutationDelayMs)&&e.mutationDelayMs<this._config.mutation_threshold_ms,u=S(e.selectionChangedDelayMs)&&e.selectionChangedDelayMs<this._config.selection_change_threshold_ms;l||c||u||(r||a||o||i?this._onCapture(e,{$dead_click_last_mutation_timestamp:this._lastMutation,$dead_click_event_timestamp:e.timestamp,$dead_click_scroll_timeout:r,$dead_click_mutation_timeout:a,$dead_click_absolute_timeout:o,$dead_click_selection_changed_timeout:i}):e.absoluteDelayMs<this._config.mutation_threshold_ms&&this._clicks.push(e))}this._clicks.length&&M(this._checkClickTimer)&&(this._checkClickTimer=s.setTimeout((()=>{this._checkClicks()}),1e3))}}_captureDeadClick(t,n){this.instance.capture("$dead_click",e(e(e({},n),nt(t.node,{e:t.originalEvent,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this._config.element_attribute_ignorelist,elementsChainAsString:!1}).props),{},{$dead_click_scroll_delay_ms:t.scrollDelayMs,$dead_click_mutation_delay_ms:t.mutationDelayMs,$dead_click_absolute_delay_ms:t.absoluteDelayMs,$dead_click_selection_changed_delay_ms:t.selectionChangedDelayMs}),{timestamp:new Date(t.timestamp)})}}s.__PosthogExtensions__=s.__PosthogExtensions__||{},s.__PosthogExtensions__.initDeadClicksAutocapture=(t,e)=>new lt(t,e)}(); | ||
//# sourceMappingURL=dead-clicks-autocapture.js.map |
@@ -1,2 +0,2 @@ | ||
!function(){"use strict";const e="undefined"!=typeof window?window:void 0,n="undefined"!=typeof globalThis?globalThis:e,t=null==n?void 0:n.navigator;null==n||n.document,null==n||n.location,null==n||n.fetch,null!=n&&n.XMLHttpRequest&&"withCredentials"in new n.XMLHttpRequest&&n.XMLHttpRequest,null==n||n.AbortController,null==t||t.userAgent;const r=null!=e?e:{},o="[PostHog.js]",i={_log:function(n){if(e&&r.POSTHOG_DEBUG&&!p(e.console)&&e.console){const r="__rrweb_original__"in e.console[n]?e.console[n].__rrweb_original__:e.console[n];for(var t=arguments.length,i=new Array(t>1?t-1:0),c=1;c<t;c++)i[c-1]=arguments[c];r(o,...i)}},info:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];i._log("log",...n)},warn:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];i._log("warn",...n)},error:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];i._log("error",...n)},critical:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];console.error(o,...n)},uninitializedWarning:e=>{i.error(`You must initialize PostHog before calling ${e}`)}};let c;!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(c||(c={}));const l=["fatal","error","warning","log","info","debug"],s=Array.isArray,a=Object.prototype.toString,u=s||function(e){return"[object Array]"===a.call(e)},d=e=>"function"==typeof e,f=e=>e===Object(e)&&!u(e),p=e=>void 0===e,v=e=>"[object String]"==a.call(e),g=e=>v(e)&&0===e.trim().length,h=e=>null===e;function E(e){return!p(Event)&&x(e,Event)}function x(e,n){try{return e instanceof n}catch{return!1}}function _(e){return h(e)||!f(e)&&!d(e)}function y(e,n){return Object.prototype.toString.call(e)===`[object ${n}]`}function w(e){return y(e,"DOMError")}const m=/\(error: (.*)\)/,O=50,b="?";function j(e,n,t,r){const o={platform:"javascript",filename:e,function:"<anonymous>"===n?b:n,in_app:!0};return p(t)||(o.lineno=t),p(r)||(o.colno=r),o}const M=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,T=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,$=/\((\S*)(?::(\d+))(?::(\d+))\)/,S=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,A=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,R=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];const r=n.sort(((e,n)=>e[0]-n[0])).map((e=>e[1]));return function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const t=[],o=e.split("\n");for(let e=n;e<o.length;e++){const n=o[e];if(n.length>1024)continue;const i=m.test(n)?n.replace(m,"$1"):n;if(!i.match(/\S*Error: /)){for(const e of r){const n=e(i);if(n){t.push(n);break}}if(t.length>=O)break}}return function(e){if(!e.length)return[];const n=Array.from(e);return n.reverse(),n.slice(0,O).map((e=>({...e,filename:e.filename||D(n).filename,function:e.function||b})))}(t)}}(...[[30,e=>{const n=M.exec(e);if(n){const[,e,t,r]=n;return j(e,b,+t,+r)}const t=T.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){const e=$.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}const[e,n]=P(t[1]||b,t[2]);return j(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],[50,e=>{const n=S.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){const e=A.exec(n[3]);e&&(n[1]=n[1]||"eval",n[3]=e[1],n[4]=e[2],n[5]="")}let e=n[3],t=n[1]||b;return[t,e]=P(t,e),j(e,t,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}}]]);function D(e){return e[e.length-1]||{}}const P=(e,n)=>{const t=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return t||r?[-1!==e.indexOf("@")?e.split("@")[0]:b,t?`safari-extension:${n}`:`safari-web-extension:${n}`]:[e,n]},k=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function U(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const t=e.stacktrace||e.stack||"",r=function(e){if(e&&H.test(e.message))return 1;return 0}(e);try{const e=R(t,r);return e.slice(0,e.length-n)}catch{}return[]}const H=/Minified React error #\d+;/i;function N(e,n){var t,r;const o=U(e),i=null===(t=null==n?void 0:n.handled)||void 0===t||t,c=null!==(r=null==n?void 0:n.synthetic)&&void 0!==r&&r;return{$exception_list:[{type:null!=n&&n.overrideExceptionType?n.overrideExceptionType:e.name,value:null!=n&&n.overrideExceptionMessage?n.overrideExceptionMessage:function(e){const n=e.message;if(n.error&&"string"==typeof n.error.message)return n.error.message;return n}(e),stacktrace:{frames:o,type:"raw"},mechanism:{handled:i,synthetic:c}}],$exception_level:"error"}}function G(e,n){var t,r,o;const i=null===(t=null==n?void 0:n.handled)||void 0===t||t,c=null===(r=null==n?void 0:n.synthetic)||void 0===r||r,l={type:null!=n&&n.overrideExceptionType?n.overrideExceptionType:null!==(o=null==n?void 0:n.defaultExceptionType)&&void 0!==o?o:"Error",value:null!=n&&n.overrideExceptionMessage?n.overrideExceptionMessage:e||(null==n?void 0:n.defaultExceptionMessage),mechanism:{handled:i,synthetic:c}};if(null!=n&&n.syntheticException){const e=U(n.syntheticException,1);e.length&&(l.stacktrace={frames:e,type:"raw"})}return{$exception_list:[l],$exception_level:"error"}}function I(e,n){var t,r;const o=null===(t=null==n?void 0:n.handled)||void 0===t||t,i=null===(r=null==n?void 0:n.synthetic)||void 0===r||r,c=null!=n&&n.overrideExceptionType?n.overrideExceptionType:E(e)?e.constructor.name:"Error",s=null!=n&&n.overrideExceptionMessage?n.overrideExceptionMessage:`Non-Error exception captured with keys: ${function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40;const t=Object.keys(e);if(t.sort(),!t.length)return"[object has no keys]";for(let e=t.length;e>0;e--){const r=t.slice(0,e).join(", ");if(!(r.length>n))return e===t.length||r.length<=n?r:`${r.slice(0,n)}...`}return""}(e)}`,a={type:c,value:s,mechanism:{handled:o,synthetic:i}};if(null!=n&&n.syntheticException){const e=U(null==n?void 0:n.syntheticException,1);e.length&&(a.stacktrace={frames:e,type:"raw"})}return{$exception_list:[a],$exception_level:(u=e.level,v(u)&&!g(u)&&l.indexOf(u)>=0?e.level:"error")};var u}function z(e,n){let[t,r,o,i,c]=e,l={$exception_list:[]};const s=c||t;if(w(s)||function(e){return y(e,"DOMException")}(s)){const e=s;if(function(e){return"stack"in e}(s))l=N(s,n);else{const t=e.name||(w(e)?"DOMError":"DOMException"),r=e.message?`${t}: ${e.message}`:t,o=w(e)?"DOMError":"DOMException";l=G(r,{...n,overrideExceptionType:o,defaultExceptionMessage:r})}return"code"in e&&(l.$exception_DOMException_code=`${e.code}`),l}if(function(e){return y(e,"ErrorEvent")}(s)&&s.error)return N(s.error,n);if(function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":return!0;default:return x(e,Error)}}(s))return N(s,n);if(function(e){return y(e,"Object")}(s)||E(s)){return I(s,n)}if(p(c)&&v(t)){let e="Error",r=t;const o=t.match(k);return o&&(e=o[1],r=o[2]),G(r,{...n,overrideExceptionType:e,defaultExceptionMessage:r})}return G(s,n)}function q(e){let[n]=e;const t=function(e){if(_(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(n);return _(t)?G(`Non-Error promise rejection captured with value: ${String(t)}`,{handled:!1,synthetic:!1,overrideExceptionType:"UnhandledRejection"}):z([t],{handled:!1,overrideExceptionType:"UnhandledRejection",defaultExceptionMessage:String(t)})}const L={wrapOnError:n=>{const t=e;t||i.info("window not available, cannot wrap onerror");const r=t.onerror;return t.onerror=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];const c=z(o);return n(c),null!==(e=null==r?void 0:r(...o))&&void 0!==e&&e},t.onerror.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null===(e=t.onerror)||void 0===e||delete e.__POSTHOG_INSTRUMENTED__,t.onerror=r}},wrapUnhandledRejection:n=>{const t=e;t||i.info("window not available, cannot wrap onUnhandledRejection");const r=t.onunhandledrejection;return t.onunhandledrejection=function(){for(var e,o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];const l=q(i);return n(l),null!==(e=null==r?void 0:r.apply(t,i))&&void 0!==e&&e},t.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null===(e=t.onunhandledrejection)||void 0===e||delete e.__POSTHOG_INSTRUMENTED__,t.onunhandledrejection=r}}};r.__PosthogExtensions__=r.__PosthogExtensions__||{},r.__PosthogExtensions__.errorWrappingFunctions=L,r.__PosthogExtensions__.parseErrorAsProperties=z,r.posthogErrorWrappingFunctions=L,r.parseErrorAsProperties=z}(); | ||
!function(){"use strict";function e(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function r(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?e(Object(o),!0).forEach((function(e){n(r,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}function n(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}var t="undefined"!=typeof window?window:void 0,o="undefined"!=typeof globalThis?globalThis:t,i=null==o?void 0:o.navigator;null==o||o.document,null==o||o.location,null==o||o.fetch,null!=o&&o.XMLHttpRequest&&"withCredentials"in new o.XMLHttpRequest&&o.XMLHttpRequest,null==o||o.AbortController,null==i||i.userAgent;var a,c=null!=t?t:{},l="[PostHog.js]",u={_log:function(e){if(t&&c.POSTHOG_DEBUG&&!h(t.console)&&t.console){for(var r=("__rrweb_original__"in t.console[e]?t.console[e].__rrweb_original__:t.console[e]),n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];r(l,...o)}},info:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];u._log("log",...r)},warn:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];u._log("warn",...r)},error:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];u._log("error",...r)},critical:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];console.error(l,...r)},uninitializedWarning:e=>{u.error("You must initialize PostHog before calling ".concat(e))}};!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(a||(a={}));var s=["fatal","error","warning","log","info","debug"],d=Array.isArray,v=Object.prototype.toString,f=d||function(e){return"[object Array]"===v.call(e)},p=e=>"function"==typeof e,g=e=>e===Object(e)&&!f(e),h=e=>void 0===e,y=e=>"[object String]"==v.call(e),E=e=>y(e)&&0===e.trim().length,x=e=>null===e;function _(e){return!h(Event)&&O(e,Event)}function O(e,r){try{return e instanceof r}catch(e){return!1}}function b(e){return x(e)||!g(e)&&!p(e)}function w(e,r){return Object.prototype.toString.call(e)==="[object ".concat(r,"]")}function j(e){return w(e,"DOMError")}var m=/\(error: (.*)\)/,M=50,T="?";function S(e,r,n,t){var o={platform:"javascript",filename:e,function:"<anonymous>"===r?T:r,in_app:!0};return h(n)||(o.lineno=n),h(t)||(o.colno=t),o}var P=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,D=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,A=/\((\S*)(?::(\d+))(?::(\d+))\)/,R=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,$=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,k=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var o=n.sort(((e,r)=>e[0]-r[0])).map((e=>e[1]));return function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=[],i=e.split("\n"),a=n;a<i.length;a++){var c=i[a];if(!(c.length>1024)){var l=m.test(c)?c.replace(m,"$1"):c;if(!l.match(/\S*Error: /)){for(var u of o){var s=u(l);if(s){t.push(s);break}}if(t.length>=M)break}}}return function(e){if(!e.length)return[];var n=Array.from(e);return n.reverse(),n.slice(0,M).map((e=>r(r({},e),{},{filename:e.filename||U(n).filename,function:e.function||T})))}(t)}}(...[[30,e=>{var r=P.exec(e);if(r){var[,n,t,o]=r;return S(n,T,+t,+o)}var i=D.exec(e);if(i){if(i[2]&&0===i[2].indexOf("eval")){var a=A.exec(i[2]);a&&(i[2]=a[1],i[3]=a[2],i[4]=a[3])}var[c,l]=H(i[1]||T,i[2]);return S(l,c,i[3]?+i[3]:void 0,i[4]?+i[4]:void 0)}}],[50,e=>{var r=R.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){var n=$.exec(r[3]);n&&(r[1]=r[1]||"eval",r[3]=n[1],r[4]=n[2],r[5]="")}var t=r[3],o=r[1]||T;return[o,t]=H(o,t),S(t,o,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}}]]);function U(e){return e[e.length-1]||{}}var H=(e,r)=>{var n=-1!==e.indexOf("safari-extension"),t=-1!==e.indexOf("safari-web-extension");return n||t?[-1!==e.indexOf("@")?e.split("@")[0]:T,n?"safari-extension:".concat(r):"safari-web-extension:".concat(r)]:[e,r]},N=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;function G(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.stacktrace||e.stack||"",t=function(e){if(e&&I.test(e.message))return 1;return 0}(e);try{var o=k(n,t);return o.slice(0,o.length-r)}catch(e){}return[]}var I=/Minified React error #\d+;/i;function z(e,r){var n,t,o=G(e),i=null===(n=null==r?void 0:r.handled)||void 0===n||n,a=null!==(t=null==r?void 0:r.synthetic)&&void 0!==t&&t;return{$exception_list:[{type:null!=r&&r.overrideExceptionType?r.overrideExceptionType:e.name,value:null!=r&&r.overrideExceptionMessage?r.overrideExceptionMessage:function(e){var r=e.message;if(r.error&&"string"==typeof r.error.message)return r.error.message;return r}(e),stacktrace:{frames:o,type:"raw"},mechanism:{handled:i,synthetic:a}}],$exception_level:"error"}}function q(e,r){var n,t,o,i=null===(n=null==r?void 0:r.handled)||void 0===n||n,a=null===(t=null==r?void 0:r.synthetic)||void 0===t||t,c={type:null!=r&&r.overrideExceptionType?r.overrideExceptionType:null!==(o=null==r?void 0:r.defaultExceptionType)&&void 0!==o?o:"Error",value:null!=r&&r.overrideExceptionMessage?r.overrideExceptionMessage:e||(null==r?void 0:r.defaultExceptionMessage),mechanism:{handled:i,synthetic:a}};if(null!=r&&r.syntheticException){var l=G(r.syntheticException,1);l.length&&(c.stacktrace={frames:l,type:"raw"})}return{$exception_list:[c],$exception_level:"error"}}function L(e,r){var n,t,o,i=null===(n=null==r?void 0:r.handled)||void 0===n||n,a=null===(t=null==r?void 0:r.synthetic)||void 0===t||t,c=null!=r&&r.overrideExceptionType?r.overrideExceptionType:_(e)?e.constructor.name:"Error",l=null!=r&&r.overrideExceptionMessage?r.overrideExceptionMessage:"Non-Error ".concat("exception"," captured with keys: ",function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var t=n.length;t>0;t--){var o=n.slice(0,t).join(", ");if(!(o.length>r))return t===n.length||o.length<=r?o:"".concat(o.slice(0,r),"...")}return""}(e)),u={type:c,value:l,mechanism:{handled:i,synthetic:a}};if(null!=r&&r.syntheticException){var d=G(null==r?void 0:r.syntheticException,1);d.length&&(u.stacktrace={frames:d,type:"raw"})}return{$exception_list:[u],$exception_level:(o=e.level,y(o)&&!E(o)&&s.indexOf(o)>=0?e.level:"error")}}function W(e,n){var[t,o,i,a,c]=e,l={$exception_list:[]},u=c||t;if(j(u)||function(e){return w(e,"DOMException")}(u)){var s=u;if(function(e){return"stack"in e}(u))l=z(u,n);else{var d=s.name||(j(s)?"DOMError":"DOMException"),v=s.message?"".concat(d,": ").concat(s.message):d,f=j(s)?"DOMError":"DOMException";l=q(v,r(r({},n),{},{overrideExceptionType:f,defaultExceptionMessage:v}))}return"code"in s&&(l.$exception_DOMException_code="".concat(s.code)),l}if(function(e){return w(e,"ErrorEvent")}(u)&&u.error)return z(u.error,n);if(function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object DOMError]":return!0;default:return O(e,Error)}}(u))return z(u,n);if(function(e){return w(e,"Object")}(u)||_(u))return L(u,n);if(h(c)&&y(t)){var p="Error",g=t,E=t.match(N);return E&&(p=E[1],g=E[2]),q(g,r(r({},n),{},{overrideExceptionType:p,defaultExceptionMessage:g}))}return q(u,n)}function X(e){var[r]=e,n=function(e){if(b(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}(r);return b(n)?q("Non-Error promise rejection captured with value: ".concat(String(n)),{handled:!1,synthetic:!1,overrideExceptionType:"UnhandledRejection"}):W([n],{handled:!1,overrideExceptionType:"UnhandledRejection",defaultExceptionMessage:String(n)})}var B={wrapOnError:e=>{var r=t;r||u.info("window not available, cannot wrap onerror");var n=r.onerror;return r.onerror=function(){for(var r,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];var a=W(o);return e(a),null!==(r=null==n?void 0:n(...o))&&void 0!==r&&r},r.onerror.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null===(e=r.onerror)||void 0===e||delete e.__POSTHOG_INSTRUMENTED__,r.onerror=n}},wrapUnhandledRejection:e=>{var r=t;r||u.info("window not available, cannot wrap onUnhandledRejection");var n=r.onunhandledrejection;return r.onunhandledrejection=function(){for(var t,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var c=X(i);return e(c),null!==(t=null==n?void 0:n.apply(r,i))&&void 0!==t&&t},r.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,()=>{var e;null===(e=r.onunhandledrejection)||void 0===e||delete e.__POSTHOG_INSTRUMENTED__,r.onunhandledrejection=n}}};c.__PosthogExtensions__=c.__PosthogExtensions__||{},c.__PosthogExtensions__.errorWrappingFunctions=B,c.__PosthogExtensions__.parseErrorAsProperties=W,c.posthogErrorWrappingFunctions=B,c.parseErrorAsProperties=W}(); | ||
//# sourceMappingURL=exception-autocapture.js.map |
@@ -1,2 +0,2 @@ | ||
!function(){"use strict";const n="undefined"!=typeof window?window:void 0,o="undefined"!=typeof globalThis?globalThis:n,e=null==o?void 0:o.navigator,t=null==o?void 0:o.document;null==o||o.location,null==o||o.fetch,null!=o&&o.XMLHttpRequest&&"withCredentials"in new o.XMLHttpRequest&&o.XMLHttpRequest,null==o||o.AbortController,null==e||e.userAgent;const r=null!=n?n:{};let i;!function(n){n.GZipJS="gzip-js",n.Base64="base64"}(i||(i={}));const l="[PostHog.js]",s={_log:function(o){if(n&&r.POSTHOG_DEBUG&&void 0!==n.console&&n.console){const r="__rrweb_original__"in n.console[o]?n.console[o].__rrweb_original__:n.console[o];for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];r(l,...t)}},info:function(){for(var n=arguments.length,o=new Array(n),e=0;e<n;e++)o[e]=arguments[e];s._log("log",...o)},warn:function(){for(var n=arguments.length,o=new Array(n),e=0;e<n;e++)o[e]=arguments[e];s._log("warn",...o)},error:function(){for(var n=arguments.length,o=new Array(n),e=0;e<n;e++)o[e]=arguments[e];s._log("error",...o)},critical:function(){for(var n=arguments.length,o=new Array(n),e=0;e<n;e++)o[e]=arguments[e];console.error(l,...o)},uninitializedWarning:n=>{s.error(`You must initialize PostHog before calling ${n}`)}},a=(n,o,e)=>{if(n.config.disable_external_dependency_loading)return s.warn(`${o} was requested but loading of external scripts is disabled.`),e("Loading of external scripts is disabled");const r=()=>{if(!t)return e("document not found");const n=t.createElement("script");n.type="text/javascript",n.crossOrigin="anonymous",n.src=o,n.onload=n=>e(void 0,n),n.onerror=n=>e(n);const r=t.querySelectorAll("body > script");var i;r.length>0?null===(i=r[0].parentNode)||void 0===i||i.insertBefore(n,r[0]):t.body.appendChild(n)};null!=t&&t.body?r():null==t||t.addEventListener("DOMContentLoaded",r)};r.__PosthogExtensions__=r.__PosthogExtensions__||{},r.__PosthogExtensions__.loadExternalDependency=(n,o,e)=>{let t=`/static/${o}.js?v=${n.version}`;if("toolbar"===o){const n=3e5;t=`${t}&t=${Math.floor(Date.now()/n)*n}`}const r=n.requestRouter.endpointFor("assets",t);a(n,r,e)},r.__PosthogExtensions__.loadSiteApp=(n,o,e)=>{const t=n.requestRouter.endpointFor("api",o);a(n,t,e)}}(); | ||
!function(){"use strict";var n="undefined"!=typeof window?window:void 0,o="undefined"!=typeof globalThis?globalThis:n,e=null==o?void 0:o.navigator,r=null==o?void 0:o.document;null==o||o.location,null==o||o.fetch,null!=o&&o.XMLHttpRequest&&"withCredentials"in new o.XMLHttpRequest&&o.XMLHttpRequest,null==o||o.AbortController,null==e||e.userAgent;var t,i=null!=n?n:{};!function(n){n.GZipJS="gzip-js",n.Base64="base64"}(t||(t={}));var l="[PostHog.js]",a={_log:function(o){if(n&&i.POSTHOG_DEBUG&&void 0!==n.console&&n.console){for(var e=("__rrweb_original__"in n.console[o]?n.console[o].__rrweb_original__:n.console[o]),r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];e(l,...t)}},info:function(){for(var n=arguments.length,o=new Array(n),e=0;e<n;e++)o[e]=arguments[e];a._log("log",...o)},warn:function(){for(var n=arguments.length,o=new Array(n),e=0;e<n;e++)o[e]=arguments[e];a._log("warn",...o)},error:function(){for(var n=arguments.length,o=new Array(n),e=0;e<n;e++)o[e]=arguments[e];a._log("error",...o)},critical:function(){for(var n=arguments.length,o=new Array(n),e=0;e<n;e++)o[e]=arguments[e];console.error(l,...o)},uninitializedWarning:n=>{a.error("You must initialize PostHog before calling ".concat(n))}},s=(n,o,e)=>{if(n.config.disable_external_dependency_loading)return a.warn("".concat(o," was requested but loading of external scripts is disabled.")),e("Loading of external scripts is disabled");var t=()=>{if(!r)return e("document not found");var n=r.createElement("script");n.type="text/javascript",n.crossOrigin="anonymous",n.src=o,n.onload=n=>e(void 0,n),n.onerror=n=>e(n);var t,i=r.querySelectorAll("body > script");i.length>0?null===(t=i[0].parentNode)||void 0===t||t.insertBefore(n,i[0]):r.body.appendChild(n)};null!=r&&r.body?t():null==r||r.addEventListener("DOMContentLoaded",t)};i.__PosthogExtensions__=i.__PosthogExtensions__||{},i.__PosthogExtensions__.loadExternalDependency=(n,o,e)=>{var r="/static/".concat(o,".js")+"?v=".concat(n.version);if("toolbar"===o){var t=3e5,i=Math.floor(Date.now()/t)*t;r="".concat(r,"&t=").concat(i)}var l=n.requestRouter.endpointFor("assets",r);s(n,l,e)},i.__PosthogExtensions__.loadSiteApp=(n,o,e)=>{var r=n.requestRouter.endpointFor("api",o);s(n,r,e)}}(); | ||
//# sourceMappingURL=external-scripts-loader.js.map |
@@ -1,2 +0,2 @@ | ||
let e,n,t;!function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(e||(e={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(n||(n={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(t||(t={}));const o="undefined"!=typeof window?window:void 0,r="undefined"!=typeof globalThis?globalThis:o,i=null==r?void 0:r.navigator,l=null==r?void 0:r.document;null==r||r.location,null==r||r.fetch,null!=r&&r.XMLHttpRequest&&"withCredentials"in new r.XMLHttpRequest&&r.XMLHttpRequest,null==r||r.AbortController,null==i||i.userAgent;var a,s,u,c,d,p,_,f,h={},v=[],g=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,m=Array.isArray;function b(e,n){for(var t in n)e[t]=n[t];return e}function y(e){var n=e.parentNode;n&&n.removeChild(e)}function C(e,n,t){var o,r,i,l={};for(i in n)"key"==i?o=n[i]:"ref"==i?r=n[i]:l[i]=n[i];if(arguments.length>2&&(l.children=arguments.length>3?a.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return x(e,l,o,r,null)}function x(e,n,t,o,r){var i={type:e,props:n,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++u:r,__i:-1,__u:0};return null==r&&null!=s.vnode&&s.vnode(i),i}function k(e){return e.children}function w(e,n){this.props=e,this.context=n}function q(e,n){if(null==n)return e.__?q(e.__,e.__i+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?q(e):null}function T(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return T(e)}}function S(e){(!e.__d&&(e.__d=!0)&&c.push(e)&&!H.__r++||d!==s.debounceRendering)&&((d=s.debounceRendering)||p)(H)}function H(){var e,n,t,o,r,i,l,a,u;for(c.sort(_);e=c.shift();)e.__d&&(n=c.length,o=void 0,i=(r=(t=e).__v).__e,a=[],u=[],(l=t.__P)&&((o=b({},r)).__v=r.__v+1,s.vnode&&s.vnode(o),D(l,o,r,t.__n,void 0!==l.ownerSVGElement,32&r.__u?[i]:null,a,null==i?q(r):i,!!(32&r.__u),u),o.__.__k[o.__i]=o,V(a,o,u),o.__e!=i&&T(o)),c.length>n&&c.sort(_));H.__r=0}function L(e,n,t,o,r,i,l,a,s,u,c){var d,p,_,f,g,b=o&&o.__k||v,y=n.length;for(t.__d=s,function(e,n,t){var o,r,i,l,a,s=n.length,u=t.length,c=u,d=0;for(e.__k=[],o=0;o<s;o++)null!=(r=e.__k[o]=null==(r=n[o])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?x(null,r,null,null,r):m(r)?x(k,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?x(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=e,r.__b=e.__b+1,a=$(r,t,l=o+d,c),r.__i=a,i=null,-1!==a&&(c--,(i=t[a])&&(i.__u|=131072)),null==i||null===i.__v?(-1==a&&d--,"function"!=typeof r.type&&(r.__u|=65536)):a!==l&&(a===l+1?d++:a>l?c>s-l?d+=a-l:d--:d=a<l&&a==l-1?a-l:0,a!==o+d&&(r.__u|=65536))):(i=t[o])&&null==i.key&&i.__e&&(i.__e==e.__d&&(e.__d=q(i)),B(i,i,!1),t[o]=null,c--);if(c)for(o=0;o<u;o++)null!=(i=t[o])&&0==(131072&i.__u)&&(i.__e==e.__d&&(e.__d=q(i)),B(i,i))}(t,n,b),s=t.__d,d=0;d<y;d++)null!=(_=t.__k[d])&&"boolean"!=typeof _&&"function"!=typeof _&&(p=-1===_.__i?h:b[_.__i]||h,_.__i=d,D(e,_,p,r,i,l,a,s,u,c),f=_.__e,_.ref&&p.ref!=_.ref&&(p.ref&&Q(p.ref,null,_),c.push(_.ref,_.__c||f,_)),null==g&&null!=f&&(g=f),65536&_.__u||p.__k===_.__k?s=M(_,s,e):"function"==typeof _.type&&void 0!==_.__d?s=_.__d:f&&(s=f.nextSibling),_.__d=void 0,_.__u&=-196609);t.__d=s,t.__e=g}function M(e,n,t){var o,r;if("function"==typeof e.type){for(o=e.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=e,n=M(o[r],n,t));return n}return e.__e!=n&&(t.insertBefore(e.__e,n||null),n=e.__e),n&&n.nextSibling}function $(e,n,t,o){var r=e.key,i=e.type,l=t-1,a=t+1,s=n[t];if(null===s||s&&r==s.key&&i===s.type)return t;if(o>(null!=s&&0==(131072&s.__u)?1:0))for(;l>=0||a<n.length;){if(l>=0){if((s=n[l])&&0==(131072&s.__u)&&r==s.key&&i===s.type)return l;l--}if(a<n.length){if((s=n[a])&&0==(131072&s.__u)&&r==s.key&&i===s.type)return a;a++}}return-1}function P(e,n,t){"-"===n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||g.test(n)?t:t+"px"}function Z(e,n,t,o,r){var i;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(n in o)t&&n in t||P(e.style,n,"");if(t)for(n in t)o&&t[n]===o[n]||P(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])i=n!==(n=n.replace(/(PointerCapture)$|Capture$/,"$1")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?o?t.u=o.u:(t.u=Date.now(),e.addEventListener(n,i?N:I,i)):e.removeEventListener(n,i?N:I,i);else{if(r)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==n&&"height"!==n&&"href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&"rowSpan"!==n&&"colSpan"!==n&&"role"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!==n[4]?e.removeAttribute(n):e.setAttribute(n,t))}}function I(e){var n=this.l[e.type+!1];if(e.t){if(e.t<=n.u)return}else e.t=Date.now();return n(s.event?s.event(e):e)}function N(e){return this.l[e.type+!0](s.event?s.event(e):e)}function D(e,n,t,o,r,i,l,a,u,c){var d,p,_,f,h,v,g,y,C,x,q,T,S,H,M,$=n.type;if(void 0!==n.constructor)return null;128&t.__u&&(u=!!(32&t.__u),i=[a=n.__e=t.__e]),(d=s.__b)&&d(n);e:if("function"==typeof $)try{if(y=n.props,C=(d=$.contextType)&&o[d.__c],x=d?C?C.props.value:d.__:o,t.__c?g=(p=n.__c=t.__c).__=p.__E:("prototype"in $&&$.prototype.render?n.__c=p=new $(y,x):(n.__c=p=new w(y,x),p.constructor=$,p.render=A),C&&C.sub(p),p.props=y,p.state||(p.state={}),p.context=x,p.__n=o,_=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=$.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=b({},p.__s)),b(p.__s,$.getDerivedStateFromProps(y,p.__s))),f=p.props,h=p.state,p.__v=n,_)null==$.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==$.getDerivedStateFromProps&&y!==f&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(y,x),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(y,p.__s,x)||n.__v===t.__v)){for(n.__v!==t.__v&&(p.props=y,p.state=p.__s,p.__d=!1),n.__e=t.__e,n.__k=t.__k,n.__k.forEach((function(e){e&&(e.__=n)})),q=0;q<p._sb.length;q++)p.__h.push(p._sb[q]);p._sb=[],p.__h.length&&l.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(y,p.__s,x),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(f,h,v)}))}if(p.context=x,p.props=y,p.__P=e,p.__e=!1,T=s.__r,S=0,"prototype"in $&&$.prototype.render){for(p.state=p.__s,p.__d=!1,T&&T(n),d=p.render(p.props,p.state,p.context),H=0;H<p._sb.length;H++)p.__h.push(p._sb[H]);p._sb=[]}else do{p.__d=!1,T&&T(n),d=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++S<25);p.state=p.__s,null!=p.getChildContext&&(o=b(b({},o),p.getChildContext())),_||null==p.getSnapshotBeforeUpdate||(v=p.getSnapshotBeforeUpdate(f,h)),L(e,m(M=null!=d&&d.type===k&&null==d.key?d.props.children:d)?M:[M],n,t,o,r,i,l,a,u,c),p.base=n.__e,n.__u&=-161,p.__h.length&&l.push(p),g&&(p.__E=p.__=null)}catch(e){n.__v=null,u||null!=i?(n.__e=a,n.__u|=u?160:32,i[i.indexOf(a)]=null):(n.__e=t.__e,n.__k=t.__k),s.__e(e,n,t)}else null==i&&n.__v===t.__v?(n.__k=t.__k,n.__e=t.__e):n.__e=E(t.__e,n,t,o,r,i,l,u,c);(d=s.diffed)&&d(n)}function V(e,n,t){n.__d=void 0;for(var o=0;o<t.length;o++)Q(t[o],t[++o],t[++o]);s.__c&&s.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){s.__e(e,n.__v)}}))}function E(e,n,t,o,r,i,l,s,u){var c,d,p,_,f,v,g,b=t.props,C=n.props,x=n.type;if("svg"===x&&(r=!0),null!=i)for(c=0;c<i.length;c++)if((f=i[c])&&"setAttribute"in f==!!x&&(x?f.localName===x:3===f.nodeType)){e=f,i[c]=null;break}if(null==e){if(null===x)return document.createTextNode(C);e=r?document.createElementNS("http://www.w3.org/2000/svg",x):document.createElement(x,C.is&&C),i=null,s=!1}if(null===x)b===C||s&&e.data===C||(e.data=C);else{if(i=i&&a.call(e.childNodes),b=t.props||h,!s&&null!=i)for(b={},c=0;c<e.attributes.length;c++)b[(f=e.attributes[c]).name]=f.value;for(c in b)f=b[c],"children"==c||("dangerouslySetInnerHTML"==c?p=f:"key"===c||c in C||Z(e,c,null,f,r));for(c in C)f=C[c],"children"==c?_=f:"dangerouslySetInnerHTML"==c?d=f:"value"==c?v=f:"checked"==c?g=f:"key"===c||s&&"function"!=typeof f||b[c]===f||Z(e,c,f,b[c],r);if(d)s||p&&(d.__html===p.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),n.__k=[];else if(p&&(e.innerHTML=""),L(e,m(_)?_:[_],n,t,o,r&&"foreignObject"!==x,i,l,i?i[0]:t.__k&&q(t,0),s,u),null!=i)for(c=i.length;c--;)null!=i[c]&&y(i[c]);s||(c="value",void 0!==v&&(v!==e[c]||"progress"===x&&!v||"option"===x&&v!==b[c])&&Z(e,c,v,b[c],!1),c="checked",void 0!==g&&g!==e[c]&&Z(e,c,g,b[c],!1))}return e}function Q(e,n,t){try{"function"==typeof e?e(n):e.current=n}catch(e){s.__e(e,t)}}function B(e,n,t){var o,r;if(s.unmount&&s.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||Q(o,null,n)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){s.__e(e,n)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&B(o[r],n,t||"function"!=typeof e.type);t||null==e.__e||y(e.__e),e.__=e.__e=e.__d=void 0}function A(e,n,t){return this.constructor(e,t)}function U(e,n,t){var o,r,i,l;s.__&&s.__(e,n),r=(o="function"==typeof t)?null:n.__k,i=[],l=[],D(n,e=(!o&&t||n).__k=C(k,null,[e]),r||h,h,void 0!==n.ownerSVGElement,!o&&t?[t]:r?null:n.firstChild?a.call(n.childNodes):null,i,!o&&t?t:r?r.__e:n.firstChild,o,l),V(i,e,l)}function j(e,n,t){var o,r,i,l,s=b({},e.props);for(i in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),n)"key"==i?o=n[i]:"ref"==i?r=n[i]:s[i]=void 0===n[i]&&void 0!==l?l[i]:n[i];return arguments.length>2&&(s.children=arguments.length>3?a.call(arguments,2):t),x(e.type,s,o||e.key,r||e.ref,null)}a=v.slice,s={__e:function(e,n,t,o){for(var r,i,l;n=n.__;)if((r=n.__c)&&!r.__)try{if((i=r.constructor)&&null!=i.getDerivedStateFromError&&(r.setState(i.getDerivedStateFromError(e)),l=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,o||{}),l=r.__d),l)return r.__E=r}catch(n){e=n}throw e}},u=0,w.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=b({},this.state),"function"==typeof e&&(e=e(b({},t),this.props)),e&&b(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),S(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),S(this))},w.prototype.render=k,c=[],p="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_=function(e,n){return e.__v.__b-n.__v.__b},H.__r=0,f=0;const F=o,O="seenSurvey_";function z(e){if("#"===e[0]){const n=e.replace(/^#/,"");return"rgb("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+")"}return"rgb(255, 255, 255)"}function R(){let e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y;"#"===n[0]&&(e=z(n)),n.startsWith("rgb")&&(e=n);const t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[n.toLowerCase()];if(t&&(e=z(t)),!e)return"black";const o=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(o){const e=parseInt(o[1]),n=parseInt(o[2]),t=parseInt(o[3]);return Math.sqrt(e*e*.299+n*n*.587+t*t*.114)>127.5?"black":"white"}return"black"}const W={backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:"right"},Y="#eeeded",X=function(){var e;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;o&&(localStorage.setItem(ne(t),"true"),o.capture("survey sent",{$survey_name:t.name,$survey_id:t.id,$survey_iteration:t.current_iteration,$survey_iteration_start_date:t.current_iteration_start_date,$survey_questions:t.questions.map((e=>e.question)),sessionRecordingUrl:null===(e=o.get_session_replay_url)||void 0===e?void 0:e.call(o),...n,$set:{[te(t,"responded")]:!0}}),F.dispatchEvent(new Event("PHSurveySent")))},G=(e,n,t)=>{var o;!t&&n&&(n.capture("survey dismissed",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(o=n.get_session_replay_url)||void 0===o?void 0:o.call(n),$set:{[te(e,"dismissed")]:!0}}),localStorage.setItem(ne(e),"true"),F.dispatchEvent(new Event("PHSurveyClosed")))},J=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,n)=>e.sort-n.sort)).map((e=>e.value)),K=(e,n)=>e.length===n.length&&e.every(((e,t)=>e===n[t]))?n.reverse():n,ee=e=>(e.questions.forEach(((e,n)=>{e.originalQuestionIndex=n})),e.appearance&&e.appearance.shuffleQuestions?K(e.questions,J(e.questions)):e.questions),ne=e=>{let n=`${O}${e.id}`;return e.current_iteration&&e.current_iteration>0&&(n=`${O}${e.id}_${e.current_iteration}`),n},te=(e,n)=>{let t=`$survey_${n}/${e.id}`;return e.current_iteration&&e.current_iteration>0&&(t=`$survey_${n}/${e.id}/${e.current_iteration}`),t},oe=function(e,n){var t={__c:n="__cC"+f++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,o;return this.getChildContext||(t=[],(o={})[n]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some((function(e){e.__e=!0,S(e)}))},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t}({isPreviewMode:!1,previewPageIndex:0,handleCloseSurveyPopup:()=>{},isPopup:!0}),re=e=>{let{component:n,children:t,renderAsHtml:o,style:r}=e;return j(n,o?{dangerouslySetInnerHTML:{__html:t},style:r}:{children:t,style:r})};var ie,le,ae,se,ue=0,ce=[],de=[],pe=s.__b,_e=s.__r,fe=s.diffed,he=s.__c,ve=s.unmount;function ge(e,n){s.__h&&s.__h(le,e,ue||n),ue=0;var t=le.__H||(le.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({__V:de}),t.__[e]}function me(e){return ue=1,function(e,n,t){var o=ge(ie++,2);if(o.t=e,!o.__c&&(o.__=[Le(void 0,n),function(e){var n=o.__N?o.__N[0]:o.__[0],t=o.t(n,e);n!==t&&(o.__N=[t,o.__[1]],o.__c.setState({}))}],o.__c=le,!le.u)){var r=function(e,n,t){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter((function(e){return e.__c}));if(r.every((function(e){return!e.__N})))return!i||i.call(this,e,n,t);var l=!1;return r.forEach((function(e){if(e.__N){var n=e.__[0];e.__=e.__N,e.__N=void 0,n!==e.__[0]&&(l=!0)}})),!(!l&&o.__c.props===e)&&(!i||i.call(this,e,n,t))};le.u=!0;var i=le.shouldComponentUpdate,l=le.componentWillUpdate;le.componentWillUpdate=function(e,n,t){if(this.__e){var o=i;i=void 0,r(e,n,t),i=o}l&&l.call(this,e,n,t)},le.shouldComponentUpdate=r}return o.__N||o.__}(Le,e)}function be(e,n){var t=ge(ie++,3);!s.__s&&He(t.__H,n)&&(t.__=e,t.i=n,le.__H.__h.push(t))}function ye(e){return ue=5,Ce((function(){return{current:e}}),[])}function Ce(e,n){var t=ge(ie++,7);return He(t.__H,n)?(t.__V=e(),t.i=n,t.__h=e,t.__V):t.__}function xe(e){var n=le.context[e.__c],t=ge(ie++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(le)),n.props.value):e.__}function ke(){for(var e;e=ce.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Te),e.__H.__h.forEach(Se),e.__H.__h=[]}catch(n){e.__H.__h=[],s.__e(n,e.__v)}}s.__b=function(e){le=null,pe&&pe(e)},s.__r=function(e){_e&&_e(e),ie=0;var n=(le=e.__c).__H;n&&(ae===le?(n.__h=[],le.__h=[],n.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=de,e.__N=e.i=void 0}))):(n.__h.forEach(Te),n.__h.forEach(Se),n.__h=[],ie=0)),ae=le},s.diffed=function(e){fe&&fe(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==ce.push(n)&&se===s.requestAnimationFrame||((se=s.requestAnimationFrame)||qe)(ke)),n.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==de&&(e.__=e.__V),e.i=void 0,e.__V=de}))),ae=le=null},s.__c=function(e,n){n.some((function(e){try{e.__h.forEach(Te),e.__h=e.__h.filter((function(e){return!e.__||Se(e)}))}catch(t){n.some((function(e){e.__h&&(e.__h=[])})),n=[],s.__e(t,e.__v)}})),he&&he(e,n)},s.unmount=function(e){ve&&ve(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach((function(e){try{Te(e)}catch(e){n=e}})),t.__H=void 0,n&&s.__e(n,t.__v))};var we="function"==typeof requestAnimationFrame;function qe(e){var n,t=function(){clearTimeout(o),we&&cancelAnimationFrame(n),setTimeout(e)},o=setTimeout(t,100);we&&(n=requestAnimationFrame(t))}function Te(e){var n=le,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),le=n}function Se(e){var n=le;e.__c=e.__(),le=n}function He(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function Le(e,n){return"function"==typeof n?n(e):n}let Me;!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(Me||(Me={}));const $e=Array.isArray,Pe=Object.prototype.toString,Ze=$e||function(e){return"[object Array]"===Pe.call(e)},Ie=e=>null===e,Ne=e=>"[object Number]"==Pe.call(e);var De=0;function Ve(e,n,t,o,r,i){var l,a,u={};for(a in n)"ref"==a?l=n[a]:u[a]=n[a];var c={type:e,props:u,key:t,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--De,__i:-1,__u:0,__source:r,__self:i};if("function"==typeof e&&(l=e.defaultProps))for(a in l)void 0===u[a]&&(u[a]=l[a]);return s.vnode&&s.vnode(c),c}const Ee=Ve("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ve("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Qe=Ve("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ve("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Be=Ve("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ve("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Ae=Ve("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ve("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),Ue=Ve("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ve("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),je=Ve("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ve("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:"black"})}),Fe=Ve("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ve("g",{"clip-path":"url(#clip0_2415_6911)",children:[Ve("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Ve("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Ve("g",{mask:"url(#mask0_2415_6911)",children:[Ve("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),Ve("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),Ve("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),Ve("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),Ve("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),Ve("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),Ve("defs",{children:Ve("clipPath",{id:"clip0_2415_6911",children:Ve("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]}),Oe=Ve("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ve("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});function ze(){return Ve("a",{href:"https://posthog.com",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Fe]})}function Re(e){let{text:n,submitDisabled:t,appearance:r,onSubmit:i,link:l}=e;const{isPreviewMode:a,isPopup:s}=xe(oe),u=r.submitButtonTextColor||R(r.submitButtonColor||W.submitButtonColor);return Ve("div",{className:"bottom-section",children:[Ve("div",{className:"buttons",children:Ve("button",{className:"form-submit",disabled:t&&!a,type:"button",style:s?{color:u}:{},onClick:()=>{a||(l&&(null==o||o.open(l)),i())},children:n})}),!r.whiteLabel&&Ve(ze,{})]})}function We(e){let{question:n,description:t,descriptionContentType:o,backgroundColor:r,forceDisableHtml:i}=e;const{isPopup:l}=xe(oe);return Ve("div",{style:l?{backgroundColor:r||W.backgroundColor}:{},children:[Ve("div",{className:"survey-question",children:n}),t&&re({component:C("div",{className:"survey-question-description"}),children:t,renderAsHtml:!i&&"text"!==o})]})}function Ye(e){let{onClick:n}=e;const{isPreviewMode:t}=xe(oe);return Ve("div",{className:"cancel-btn-wrapper",onClick:n,disabled:t,children:Ve("button",{className:"form-cancel",onClick:n,disabled:t,children:je})})}function Xe(e){let{header:n,description:t,contentType:o,forceDisableHtml:r,appearance:i,onClose:l,styleOverrides:a}=e;const s=R(i.backgroundColor||W.backgroundColor),{isPopup:u}=xe(oe);return Ve(k,{children:Ve("div",{className:"thank-you-message",style:{...a},children:Ve("div",{className:"thank-you-message-container",children:[u&&Ve(Ye,{onClick:()=>l()}),Ve("h3",{className:"thank-you-message-header",style:{color:s},children:n}),t&&re({component:C("div",{className:"thank-you-message-body"}),children:t,renderAsHtml:!r&&"text"!==o,style:{color:s}}),u&&Ve(Re,{text:i.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:i,onSubmit:()=>l()})]})})})}function Ge(e){var n;const t=ye(null),[o,r]=me(null!==(n=e.defaultTextColor)&&void 0!==n?n:"black");return be((()=>{if(t.current){const e=function(e){const n=F.getComputedStyle(e).backgroundColor;if("rgba(0, 0, 0, 0)"===n)return"black";const t=n.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(!t)return"black";const o=parseInt(t[1]),r=parseInt(t[2]),i=parseInt(t[3]);return Math.sqrt(o*o*.299+r*r*.587+i*i*.114)>127.5?"black":"white"}(t.current);r(e)}}),[e.appearance,e.forceUpdate]),{ref:t,textColor:o}}function Je(e){let{question:n,forceDisableHtml:t,appearance:o,onSubmit:r}=e;const i=ye(null),[l,a]=me("");return Ve("div",{ref:i,children:[Ve(We,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,backgroundColor:o.backgroundColor,forceDisableHtml:t}),Ve("textarea",{rows:4,placeholder:null==o?void 0:o.placeholder,onInput:e=>a(e.currentTarget.value)}),Ve(Re,{text:n.buttonText||"Submit",submitDisabled:!l&&!n.optional,appearance:o,onSubmit:()=>r(l)})]})}function Ke(e){let{question:n,forceDisableHtml:t,appearance:o,onSubmit:r}=e;return Ve(k,{children:[Ve(We,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t}),Ve(Re,{text:n.buttonText||"Submit",submitDisabled:!1,link:n.link,appearance:o,onSubmit:()=>r("link clicked")})]})}function en(e){let{question:n,forceDisableHtml:t,displayQuestionIndex:o,appearance:r,onSubmit:i}=e;const l=n.scale,a=10===n.scale?0:1,[s,u]=me(null);return Ve(k,{children:[Ve(We,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t,backgroundColor:r.backgroundColor}),Ve("div",{className:"rating-section",children:[Ve("div",{className:"rating-options",children:["emoji"===n.display&&Ve("div",{className:"rating-options-emoji",children:(3===n.scale?on:rn).map(((e,n)=>{const t=n+1===s;return Ve("button",{className:`ratings-emoji question-${o}-rating-${n} ${t?"rating-active":null}`,value:n+1,type:"button",onClick:()=>{u(n+1)},style:{fill:t?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:e},n)}))}),"number"===n.display&&Ve("div",{className:"rating-options-number",style:{gridTemplateColumns:`repeat(${l-a+1}, minmax(0, 1fr))`},children:un(n.scale).map(((e,n)=>Ve(nn,{displayQuestionIndex:o,active:s===e,appearance:r,num:e,setActiveNumber:e=>{u(e)}},n)))})]}),Ve("div",{className:"rating-text",children:[Ve("div",{children:n.lowerBoundLabel}),Ve("div",{children:n.upperBoundLabel})]})]}),Ve(Re,{text:n.buttonText||(null==r?void 0:r.submitButtonText)||"Submit",submitDisabled:Ie(s)&&!n.optional,appearance:r,onSubmit:()=>i(s)})]})}function nn(e){let{num:n,active:t,displayQuestionIndex:o,appearance:r,setActiveNumber:i}=e;const{textColor:l,ref:a}=Ge({appearance:r,defaultTextColor:"black",forceUpdate:t});return Ve("button",{ref:a,className:`ratings-number question-${o}-rating-${n} ${t?"rating-active":null}`,type:"button",onClick:()=>{i(n)},style:{color:l,backgroundColor:t?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:n})}function tn(e){let{question:t,forceDisableHtml:o,displayQuestionIndex:r,appearance:i,onSubmit:l}=e;const a=ye(null),s=Ce((()=>(e=>{if(!e.shuffleOptions)return e.choices;const n=e.choices;let t="";e.hasOpenChoice&&(t=n.pop());const o=K(n,J(n));return e.hasOpenChoice&&(e.choices.push(t),o.push(t)),o})(t)),[t]),[u,c]=me(t.type===n.MultipleChoice?[]:null),[d,p]=me(!1),[_,f]=me(""),h=t.type===n.SingleChoice?"radio":"checkbox";return Ve("div",{ref:a,children:[Ve(We,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:o,backgroundColor:i.backgroundColor}),Ve("div",{className:"multiple-choice-options",children:s.map(((e,o)=>{let i="choice-option";const l=e,a=e;return t.hasOpenChoice&&o===t.choices.length-1&&(i+=" choice-option-open"),Ve("div",{className:i,children:[Ve("input",{type:h,id:`surveyQuestion${r}Choice${o}`,name:`question${r}`,value:l,disabled:!l,onInput:()=>t.hasOpenChoice&&o===t.choices.length-1?p(!d):t.type===n.SingleChoice?c(l):t.type===n.MultipleChoice&&Ze(u)?u.includes(l)?c(u.filter((e=>e!==l))):c([...u,l]):void 0}),Ve("label",{htmlFor:`surveyQuestion${r}Choice${o}`,style:{color:"black"},children:t.hasOpenChoice&&o===t.choices.length-1?Ve(k,{children:[Ve("span",{children:[a,":"]}),Ve("input",{type:"text",id:`surveyQuestion${r}Choice${o}Open`,name:`question${r}`,onInput:e=>{const o=e.currentTarget.value;return t.type===n.SingleChoice?c(o):t.type===n.MultipleChoice&&Ze(u)?f(o):void 0}})]}):a}),Ve("span",{className:"choice-check",style:{color:"black"},children:Oe})]})}))}),Ve(Re,{text:t.buttonText||"Submit",submitDisabled:(Ie(u)||Ze(u)&&!d&&0===u.length||Ze(u)&&d&&!_&&0===u.length&&!t.optional)&&!t.optional,appearance:i,onSubmit:()=>{d&&t.type===n.MultipleChoice?Ze(u)&&l([...u,_]):l(u)}})]})}const on=[Be,Qe,Ee],rn=[Ae,Be,Qe,Ee,Ue],ln=[1,2,3,4,5],an=[1,2,3,4,5,6,7],sn=[0,1,2,3,4,5,6,7,8,9,10];function un(e){switch(e){case 5:default:return ln;case 7:return an;case 10:return sn}}const cn=o,dn=l,pn=e=>{var n,t;let{survey:o,parentElement:r,previewPageIndex:i,forceDisableHtml:l}=e;const a=(e=>{const n={left:"left: 30px;",right:"right: 30px;",center:"\n left: 50%;\n transform: translateX(-50%);\n "};return`\n .survey-form, .thank-you-message {\n position: fixed;\n margin: 0px;\n bottom: 0px;\n color: black;\n font-weight: normal;\n font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n text-align: left;\n max-width: ${parseInt((null==e?void 0:e.maxWidth)||"300")}px;\n width: 100%;\n z-index: ${parseInt((null==e?void 0:e.zIndex)||"99999")};\n border: 1.5px solid ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n border-bottom: 0px;\n ${n[(null==e?void 0:e.position)||"right"]||"right: 30px;"}\n flex-direction: column;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n box-shadow: -6px 0 16px -8px rgb(0 0 0 / 8%), -9px 0 28px 0 rgb(0 0 0 / 5%), -12px 0 48px 16px rgb(0 0 0 / 3%);\n }\n \n .survey-box, .thank-you-message-container {\n padding: 20px 25px 10px;\n display: flex;\n flex-direction: column;\n border-radius: 10px;\n }\n\n .thank-you-message {\n text-align: center;\n }\n\n .form-submit[disabled] {\n opacity: 0.6;\n filter: grayscale(50%);\n cursor: not-allowed;\n }\n .survey-form textarea {\n color: #2d2d2d;\n font-size: 14px;\n font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n background: white;\n color: black;\n outline: none;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 10px;\n border-radius: 6px;\n border-color: ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n margin-top: 14px;\n width: 100%;\n box-sizing: border-box;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea {\n margin-top: 0;\n }\n .form-submit {\n box-sizing: border-box;\n margin: 0;\n font-family: inherit;\n overflow: visible;\n text-transform: none;\n position: relative;\n display: inline-block;\n font-weight: 700;\n white-space: nowrap;\n text-align: center;\n border: 1.5px solid transparent;\n cursor: pointer;\n user-select: none;\n touch-action: manipulation;\n padding: 12px;\n font-size: 14px;\n border-radius: 6px;\n outline: 0;\n background: ${(null==e?void 0:e.submitButtonColor)||"black"} !important;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);\n box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);\n width: 100%;\n }\n .form-cancel {\n display: flex;\n float: right;\n border: none;\n background: none;\n cursor: pointer;\n }\n .cancel-btn-wrapper {\n position: absolute;\n width: 35px;\n height: 35px;\n border-radius: 100%;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n background: white;\n border: 1.5px solid ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .bolded { font-weight: 600; }\n .buttons {\n display: flex;\n justify-content: center;\n }\n .footer-branding {\n font-size: 11px;\n margin-top: 10px;\n text-align: center;\n display: flex;\n justify-content: center;\n gap: 4px;\n align-items: center;\n font-weight: 500;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n text-decoration: none;\n backgroundColor: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n color: ${R((null==e?void 0:e.backgroundColor)||"#eeeded")};\n }\n .survey-question {\n font-weight: 500;\n font-size: 14px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n }\n .question-textarea-wrapper {\n display: flex;\n flex-direction: column;\n }\n .survey-question-description {\n font-size: 13px;\n padding-top: 5px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n }\n .ratings-number {\n font-size: 16px;\n font-weight: 600;\n padding: 8px 0px;\n border: none;\n }\n .ratings-number:hover {\n cursor: pointer;\n }\n .rating-options {\n margin-top: 14px;\n }\n .rating-options-number {\n display: grid;\n border-radius: 6px;\n overflow: hidden;\n border: 1.5px solid ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n }\n .rating-options-number > .ratings-number {\n border-right: 1px solid ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n }\n .rating-options-number > .ratings-number:last-of-type {\n border-right: 0px;\n }\n .rating-options-number .rating-active {\n background: ${(null==e?void 0:e.ratingButtonActiveColor)||"black"};\n }\n .rating-options-emoji {\n display: flex;\n justify-content: space-between;\n }\n .ratings-emoji {\n font-size: 16px;\n background-color: transparent;\n border: none;\n padding: 0px;\n }\n .ratings-emoji:hover {\n cursor: pointer;\n }\n .ratings-emoji.rating-active svg {\n fill: ${(null==e?void 0:e.ratingButtonActiveColor)||"black"};\n }\n .emoji-svg {\n fill: '#939393';\n }\n .rating-text {\n display: flex;\n flex-direction: row;\n font-size: 11px;\n justify-content: space-between;\n margin-top: 6px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n opacity: .60;\n }\n .multiple-choice-options {\n margin-top: 13px;\n font-size: 14px;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options {\n margin-top: 0;\n }\n .multiple-choice-options .choice-option {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n cursor: pointer;\n margin-bottom: 5px;\n position: relative;\n }\n .multiple-choice-options > .choice-option:last-of-type {\n margin-bottom: 0px;\n }\n .multiple-choice-options input {\n cursor: pointer;\n position: absolute;\n opacity: 0;\n }\n .choice-check {\n position: absolute;\n right: 10px;\n background: white;\n }\n .choice-check svg {\n display: none;\n }\n .multiple-choice-options .choice-option:hover .choice-check svg {\n display: inline-block;\n opacity: .25;\n }\n .multiple-choice-options input:checked + label + .choice-check svg {\n display: inline-block;\n opacity: 100% !important;\n }\n .multiple-choice-options input:checked + label {\n font-weight: bold;\n border: 1.5px solid rgba(0,0,0);\n }\n .multiple-choice-options input:checked + label input {\n font-weight: bold;\n }\n .multiple-choice-options label {\n width: 100%;\n cursor: pointer;\n padding: 10px;\n border: 1.5px solid rgba(0,0,0,.25);\n border-radius: 4px;\n background: white;\n }\n .multiple-choice-options .choice-option-open label {\n padding-right: 30px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n max-width: 100%;\n }\n .multiple-choice-options .choice-option-open label span {\n width: 100%;\n }\n .multiple-choice-options .choice-option-open input:disabled + label {\n opacity: 0.6;\n }\n .multiple-choice-options .choice-option-open label input {\n position: relative;\n opacity: 1;\n flex-grow: 1;\n border: 0;\n outline: 0;\n }\n .thank-you-message-body {\n margin-top: 6px;\n font-size: 14px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n }\n .thank-you-message-header {\n margin: 10px 0px 0px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n }\n .thank-you-message-container .form-submit {\n margin-top: 20px;\n margin-bottom: 10px;\n }\n .thank-you-message-countdown {\n margin-left: 6px;\n }\n .bottom-section {\n margin-top: 14px;\n }\n `})(o.appearance),s=Object.assign(dn.createElement("style"),{innerText:a});Array.from(r.children).forEach((e=>{e instanceof HTMLStyleElement&&r.removeChild(e)})),r.appendChild(s);const u=R((null===(n=o.appearance)||void 0===n?void 0:n.backgroundColor)||W.backgroundColor||"white");U(Ve(hn,{survey:o,forceDisableHtml:l,style:{position:"relative",right:0,borderBottom:`1px solid ${null===(t=o.appearance)||void 0===t?void 0:t.borderColor}`,borderRadius:10,color:u},previewPageIndex:i,removeSurveyFromFocus:()=>{},isPopup:!0},"surveys-render-preview"),r)},_n=e=>{var n;let{survey:t,root:o,forceDisableHtml:r}=e;const i=`\n .ph-survey-widget-tab {\n position: fixed;\n top: 50%;\n right: 0;\n background: ${(null===(n=t.appearance)||void 0===n?void 0:n.widgetColor)||"#e0a045"};\n color: white;\n transform: rotate(-90deg) translate(0, -100%);\n transform-origin: right top;\n min-width: 40px;\n padding: 8px 12px;\n font-weight: 500;\n border-radius: 3px 3px 0 0;\n text-align: center;\n cursor: pointer;\n z-index: 9999999;\n }\n .ph-survey-widget-tab:hover {\n padding-bottom: 13px;\n }\n .ph-survey-widget-button {\n position: fixed;\n }\n `;const l=Object.assign(dn.createElement("style"),{innerText:i});o.appendChild(l),U(Ve(gn,{forceDisableHtml:r,survey:t,readOnly:!0,removeSurveyFromFocus:()=>{}},"feedback-render-preview"),o)};function fn(e,n,t,o,r){const[i,l]=me(o||0===t),[a,s]=me(!1);return be((()=>{if(o||!n)return;const i=()=>{r(e.id),l(!1)},a=()=>{var n,t;null!==(n=e.appearance)&&void 0!==n&&n.displayThankYouMessage?(s(!0),r(e.id),null!==(t=e.appearance)&&void 0!==t&&t.autoDisappear&&setTimeout((()=>{l(!1)}),5e3)):(r(e.id),l(!1))},u=()=>{var t;l(!0),cn.dispatchEvent(new Event("PHSurveyShown")),n.capture("survey shown",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(t=n.get_session_replay_url)||void 0===t?void 0:t.call(n)}),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())};return cn.addEventListener("PHSurveyClosed",i),cn.addEventListener("PHSurveySent",a),t>0?(()=>{const e=setTimeout((()=>{u()}),t);return()=>{clearTimeout(e),cn.removeEventListener("PHSurveyClosed",i),cn.removeEventListener("PHSurveySent",a)}})():(u(),()=>{cn.removeEventListener("PHSurveyClosed",i),cn.removeEventListener("PHSurveySent",a)})}),[]),{isPopupVisible:i,isSurveySent:a,setIsPopupVisible:l}}function hn(e){var n,t,o,r,i,l;let{survey:a,forceDisableHtml:s,posthog:u,style:c,previewPageIndex:d,removeSurveyFromFocus:p,isPopup:_}=e;const f=Number.isInteger(d),h=null!==(n=a.appearance)&&void 0!==n&&n.surveyPopupDelaySeconds?1e3*a.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:v,isSurveySent:g,setIsPopupVisible:m}=fn(a,u,h,f,p),b=g||d===a.questions.length,y=null!==(t=c)&&void 0!==t&&t.left&&Ne(null===(o=c)||void 0===o?void 0:o.left)?{left:c.left-40}:{};return f&&(c=c||{},c.left="unset",c.right="unset",c.transform="unset"),v?Ve(oe.Provider,{value:{isPreviewMode:f,previewPageIndex:d,handleCloseSurveyPopup:()=>G(a,u,f),isPopup:_||!1},children:b?Ve(Xe,{header:(null===(r=a.appearance)||void 0===r?void 0:r.thankYouMessageHeader)||"Thank you!",description:(null===(i=a.appearance)||void 0===i?void 0:i.thankYouMessageDescription)||"",forceDisableHtml:!!s,contentType:null===(l=a.appearance)||void 0===l?void 0:l.thankYouMessageDescriptionContentType,appearance:a.appearance||W,styleOverrides:{...c,...y},onClose:()=>m(!1)}):Ve(vn,{survey:a,forceDisableHtml:!!s,posthog:u,styleOverrides:c})}):Ve(k,{})}function vn(e){var n,o;let{survey:r,forceDisableHtml:i,posthog:l,styleOverrides:a}=e;const s=R((null===(n=r.appearance)||void 0===n?void 0:n.backgroundColor)||W.backgroundColor),[u,c]=me({}),{isPreviewMode:d,previewPageIndex:p,handleCloseSurveyPopup:_,isPopup:f}=xe(oe),[h,v]=me(p||0),g=Ce((()=>ee(r)),[r]);be((()=>{v(null!=p?p:0)}),[p]);return Ve("form",{className:"survey-form",style:f?{color:s,borderColor:null===(o=r.appearance)||void 0===o?void 0:o.borderColor,...a}:{},children:g.map(((e,n)=>{var o;const{originalQuestionIndex:a}=e;return(d?h===a:h===n)&&Ve("div",{className:"survey-box",style:f?{backgroundColor:(null===(o=r.appearance)||void 0===o?void 0:o.backgroundColor)||W.backgroundColor}:{},children:[f&&Ve(Ye,{onClick:()=>_()}),mn({question:e,forceDisableHtml:i,displayQuestionIndex:n,appearance:r.appearance||W,onSubmit:e=>(e=>{let{res:n,originalQuestionIndex:o,displayQuestionIndex:i}=e;if(!l)return;const a=0===o?"$survey_response":`$survey_response_${o}`;if(c({...u,[a]:n}),!l.getNextSurveyStep)return void(i===r.questions.length-1?X({...u,[a]:n},r,l):v(i+1));const s=l.getNextSurveyStep(r,i,n);s===t.End?X({...u,[a]:n},r,l):v(s)})({res:e,originalQuestionIndex:a,displayQuestionIndex:n})})]})}))})}function gn(e){var n,t;let{survey:o,forceDisableHtml:r,posthog:i,readOnly:l,removeSurveyFromFocus:a}=e;const[s,u]=me(!1),[c,d]=me({}),p=ye(null);return be((()=>{var e,n;if(!l&&i){if("tab"===(null===(e=o.appearance)||void 0===e?void 0:e.widgetType)&&p.current){var t;const e=p.current.getBoundingClientRect(),n={top:"50%",left:parseInt(""+(e.right-360)),bottom:"auto",borderRadius:10,borderBottom:`1.5px solid ${(null===(t=o.appearance)||void 0===t?void 0:t.borderColor)||"#c9c6c6"}`};d(n)}if("selector"===(null===(n=o.appearance)||void 0===n?void 0:n.widgetType)){const e=dn.querySelector(o.appearance.widgetSelector||"");null==e||e.addEventListener("click",(()=>{u(!s)})),null==e||e.setAttribute("PHWidgetSurveyClickListener","true")}}}),[]),Ve(k,{children:["tab"===(null===(n=o.appearance)||void 0===n?void 0:n.widgetType)&&Ve("div",{className:"ph-survey-widget-tab",ref:p,onClick:()=>!l&&u(!s),style:{color:R(o.appearance.widgetColor)},children:[Ve("div",{className:"ph-survey-widget-tab-icon"}),(null===(t=o.appearance)||void 0===t?void 0:t.widgetLabel)||""]}),s&&Ve(hn,{posthog:i,survey:o,forceDisableHtml:r,style:c,removeSurveyFromFocus:a,isPopup:!0},"feedback-widget-survey")]})}const mn=e=>{let{question:t,forceDisableHtml:o,displayQuestionIndex:r,appearance:i,onSubmit:l}=e;const a={[n.Open]:Je,[n.Link]:Ke,[n.Rating]:en,[n.SingleChoice]:tn,[n.MultipleChoice]:tn},s={question:t,forceDisableHtml:o,appearance:i,onSubmit:l},u={[n.Open]:{},[n.Link]:{},[n.Rating]:{displayQuestionIndex:r},[n.SingleChoice]:{displayQuestionIndex:r},[n.MultipleChoice]:{displayQuestionIndex:r}};return Ve(a[t.type],{...{...s,...u[t.type]}})};export{_n as renderFeedbackWidgetPreview,pn as renderSurveysPreview}; | ||
function e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function n(n){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?e(Object(r),!0).forEach((function(e){t(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var o,r,i;!function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(o||(o={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(r||(r={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(i||(i={}));var l="undefined"!=typeof window?window:void 0,a="undefined"!=typeof globalThis?globalThis:l,c=null==a?void 0:a.navigator,s=null==a?void 0:a.document;null==a||a.location,null==a||a.fetch,null!=a&&a.XMLHttpRequest&&"withCredentials"in new a.XMLHttpRequest&&a.XMLHttpRequest,null==a||a.AbortController,null==c||c.userAgent;var u,d,p,_,f,h,v,g,m={},b=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,C=Array.isArray;function x(e,n){for(var t in n)e[t]=n[t];return e}function k(e){var n=e.parentNode;n&&n.removeChild(e)}function w(e,n,t){var o,r,i,l={};for(i in n)"key"==i?o=n[i]:"ref"==i?r=n[i]:l[i]=n[i];if(arguments.length>2&&(l.children=arguments.length>3?u.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return q(e,l,o,r,null)}function q(e,n,t,o,r){var i={type:e,props:n,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++p:r,__i:-1,__u:0};return null==r&&null!=d.vnode&&d.vnode(i),i}function T(e){return e.children}function S(e,n){this.props=e,this.context=n}function H(e,n){if(null==n)return e.__?H(e.__,e.__i+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?H(e):null}function L(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return L(e)}}function M(e){(!e.__d&&(e.__d=!0)&&_.push(e)&&!P.__r++||f!==d.debounceRendering)&&((f=d.debounceRendering)||h)(P)}function P(){var e,n,t,o,r,i,l,a,c;for(_.sort(v);e=_.shift();)e.__d&&(n=_.length,o=void 0,i=(r=(t=e).__v).__e,a=[],c=[],(l=t.__P)&&((o=x({},r)).__v=r.__v+1,d.vnode&&d.vnode(o),j(l,o,r,t.__n,void 0!==l.ownerSVGElement,32&r.__u?[i]:null,a,null==i?H(r):i,!!(32&r.__u),c),o.__.__k[o.__i]=o,O(a,o,c),o.__e!=i&&L(o)),_.length>n&&_.sort(v));P.__r=0}function Z(e,n,t,o,r,i,l,a,c,s,u){var d,p,_,f,h,v=o&&o.__k||b,g=n.length;for(t.__d=c,function(e,n,t){var o,r,i,l,a,c=n.length,s=t.length,u=s,d=0;for(e.__k=[],o=0;o<c;o++)null!=(r=e.__k[o]=null==(r=n[o])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?q(null,r,null,null,r):C(r)?q(T,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?q(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=e,r.__b=e.__b+1,a=I(r,t,l=o+d,u),r.__i=a,i=null,-1!==a&&(u--,(i=t[a])&&(i.__u|=131072)),null==i||null===i.__v?(-1==a&&d--,"function"!=typeof r.type&&(r.__u|=65536)):a!==l&&(a===l+1?d++:a>l?u>c-l?d+=a-l:d--:d=a<l&&a==l-1?a-l:0,a!==o+d&&(r.__u|=65536))):(i=t[o])&&null==i.key&&i.__e&&(i.__e==e.__d&&(e.__d=H(i)),U(i,i,!1),t[o]=null,u--);if(u)for(o=0;o<s;o++)null!=(i=t[o])&&0==(131072&i.__u)&&(i.__e==e.__d&&(e.__d=H(i)),U(i,i))}(t,n,v),c=t.__d,d=0;d<g;d++)null!=(_=t.__k[d])&&"boolean"!=typeof _&&"function"!=typeof _&&(p=-1===_.__i?m:v[_.__i]||m,_.__i=d,j(e,_,p,r,i,l,a,c,s,u),f=_.__e,_.ref&&p.ref!=_.ref&&(p.ref&&A(p.ref,null,_),u.push(_.ref,_.__c||f,_)),null==h&&null!=f&&(h=f),65536&_.__u||p.__k===_.__k?c=D(_,c,e):"function"==typeof _.type&&void 0!==_.__d?c=_.__d:f&&(c=f.nextSibling),_.__d=void 0,_.__u&=-196609);t.__d=c,t.__e=h}function D(e,n,t){var o,r;if("function"==typeof e.type){for(o=e.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=e,n=D(o[r],n,t));return n}return e.__e!=n&&(t.insertBefore(e.__e,n||null),n=e.__e),n&&n.nextSibling}function I(e,n,t,o){var r=e.key,i=e.type,l=t-1,a=t+1,c=n[t];if(null===c||c&&r==c.key&&i===c.type)return t;if(o>(null!=c&&0==(131072&c.__u)?1:0))for(;l>=0||a<n.length;){if(l>=0){if((c=n[l])&&0==(131072&c.__u)&&r==c.key&&i===c.type)return l;l--}if(a<n.length){if((c=n[a])&&0==(131072&c.__u)&&r==c.key&&i===c.type)return a;a++}}return-1}function N(e,n,t){"-"===n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||y.test(n)?t:t+"px"}function V(e,n,t,o,r){var i;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(n in o)t&&n in t||N(e.style,n,"");if(t)for(n in t)o&&t[n]===o[n]||N(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])i=n!==(n=n.replace(/(PointerCapture)$|Capture$/,"$1")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?o?t.u=o.u:(t.u=Date.now(),e.addEventListener(n,i?Q:E,i)):e.removeEventListener(n,i?Q:E,i);else{if(r)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==n&&"height"!==n&&"href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&"rowSpan"!==n&&"colSpan"!==n&&"role"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!==n[4]?e.removeAttribute(n):e.setAttribute(n,t))}}function E(e){var n=this.l[e.type+!1];if(e.t){if(e.t<=n.u)return}else e.t=Date.now();return n(d.event?d.event(e):e)}function Q(e){return this.l[e.type+!0](d.event?d.event(e):e)}function j(e,n,t,o,r,i,l,a,c,s){var u,p,_,f,h,v,g,m,b,y,k,w,q,H,L,M=n.type;if(void 0!==n.constructor)return null;128&t.__u&&(c=!!(32&t.__u),i=[a=n.__e=t.__e]),(u=d.__b)&&u(n);e:if("function"==typeof M)try{if(m=n.props,b=(u=M.contextType)&&o[u.__c],y=u?b?b.props.value:u.__:o,t.__c?g=(p=n.__c=t.__c).__=p.__E:("prototype"in M&&M.prototype.render?n.__c=p=new M(m,y):(n.__c=p=new S(m,y),p.constructor=M,p.render=F),b&&b.sub(p),p.props=m,p.state||(p.state={}),p.context=y,p.__n=o,_=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=M.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=x({},p.__s)),x(p.__s,M.getDerivedStateFromProps(m,p.__s))),f=p.props,h=p.state,p.__v=n,_)null==M.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==M.getDerivedStateFromProps&&m!==f&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(m,y),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(m,p.__s,y)||n.__v===t.__v)){for(n.__v!==t.__v&&(p.props=m,p.state=p.__s,p.__d=!1),n.__e=t.__e,n.__k=t.__k,n.__k.forEach((function(e){e&&(e.__=n)})),k=0;k<p._sb.length;k++)p.__h.push(p._sb[k]);p._sb=[],p.__h.length&&l.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(m,p.__s,y),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(f,h,v)}))}if(p.context=y,p.props=m,p.__P=e,p.__e=!1,w=d.__r,q=0,"prototype"in M&&M.prototype.render){for(p.state=p.__s,p.__d=!1,w&&w(n),u=p.render(p.props,p.state,p.context),H=0;H<p._sb.length;H++)p.__h.push(p._sb[H]);p._sb=[]}else do{p.__d=!1,w&&w(n),u=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++q<25);p.state=p.__s,null!=p.getChildContext&&(o=x(x({},o),p.getChildContext())),_||null==p.getSnapshotBeforeUpdate||(v=p.getSnapshotBeforeUpdate(f,h)),Z(e,C(L=null!=u&&u.type===T&&null==u.key?u.props.children:u)?L:[L],n,t,o,r,i,l,a,c,s),p.base=n.__e,n.__u&=-161,p.__h.length&&l.push(p),g&&(p.__E=p.__=null)}catch(e){n.__v=null,c||null!=i?(n.__e=a,n.__u|=c?160:32,i[i.indexOf(a)]=null):(n.__e=t.__e,n.__k=t.__k),d.__e(e,n,t)}else null==i&&n.__v===t.__v?(n.__k=t.__k,n.__e=t.__e):n.__e=B(t.__e,n,t,o,r,i,l,c,s);(u=d.diffed)&&u(n)}function O(e,n,t){n.__d=void 0;for(var o=0;o<t.length;o++)A(t[o],t[++o],t[++o]);d.__c&&d.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){d.__e(e,n.__v)}}))}function B(e,n,t,o,r,i,l,a,c){var s,d,p,_,f,h,v,g=t.props,b=n.props,y=n.type;if("svg"===y&&(r=!0),null!=i)for(s=0;s<i.length;s++)if((f=i[s])&&"setAttribute"in f==!!y&&(y?f.localName===y:3===f.nodeType)){e=f,i[s]=null;break}if(null==e){if(null===y)return document.createTextNode(b);e=r?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,b.is&&b),i=null,a=!1}if(null===y)g===b||a&&e.data===b||(e.data=b);else{if(i=i&&u.call(e.childNodes),g=t.props||m,!a&&null!=i)for(g={},s=0;s<e.attributes.length;s++)g[(f=e.attributes[s]).name]=f.value;for(s in g)f=g[s],"children"==s||("dangerouslySetInnerHTML"==s?p=f:"key"===s||s in b||V(e,s,null,f,r));for(s in b)f=b[s],"children"==s?_=f:"dangerouslySetInnerHTML"==s?d=f:"value"==s?h=f:"checked"==s?v=f:"key"===s||a&&"function"!=typeof f||g[s]===f||V(e,s,f,g[s],r);if(d)a||p&&(d.__html===p.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),n.__k=[];else if(p&&(e.innerHTML=""),Z(e,C(_)?_:[_],n,t,o,r&&"foreignObject"!==y,i,l,i?i[0]:t.__k&&H(t,0),a,c),null!=i)for(s=i.length;s--;)null!=i[s]&&k(i[s]);a||(s="value",void 0!==h&&(h!==e[s]||"progress"===y&&!h||"option"===y&&h!==g[s])&&V(e,s,h,g[s],!1),s="checked",void 0!==v&&v!==e[s]&&V(e,s,v,g[s],!1))}return e}function A(e,n,t){try{"function"==typeof e?e(n):e.current=n}catch(e){d.__e(e,t)}}function U(e,n,t){var o,r;if(d.unmount&&d.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||A(o,null,n)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){d.__e(e,n)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&U(o[r],n,t||"function"!=typeof e.type);t||null==e.__e||k(e.__e),e.__=e.__e=e.__d=void 0}function F(e,n,t){return this.constructor(e,t)}function $(e,n,t){var o,r,i,l;d.__&&d.__(e,n),r=(o="function"==typeof t)?null:n.__k,i=[],l=[],j(n,e=(!o&&t||n).__k=w(T,null,[e]),r||m,m,void 0!==n.ownerSVGElement,!o&&t?[t]:r?null:n.firstChild?u.call(n.childNodes):null,i,!o&&t?t:r?r.__e:n.firstChild,o,l),O(i,e,l)}function z(e,n,t){var o,r,i,l,a=x({},e.props);for(i in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),n)"key"==i?o=n[i]:"ref"==i?r=n[i]:a[i]=void 0===n[i]&&void 0!==l?l[i]:n[i];return arguments.length>2&&(a.children=arguments.length>3?u.call(arguments,2):t),q(e.type,a,o||e.key,r||e.ref,null)}u=b.slice,d={__e:function(e,n,t,o){for(var r,i,l;n=n.__;)if((r=n.__c)&&!r.__)try{if((i=r.constructor)&&null!=i.getDerivedStateFromError&&(r.setState(i.getDerivedStateFromError(e)),l=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,o||{}),l=r.__d),l)return r.__E=r}catch(n){e=n}throw e}},p=0,S.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=x({},this.state),"function"==typeof e&&(e=e(x({},t),this.props)),e&&x(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),M(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),M(this))},S.prototype.render=T,_=[],h="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,v=function(e,n){return e.__v.__b-n.__v.__b},P.__r=0,g=0;var R=l,W="seenSurvey_";function Y(e){if("#"===e[0]){var n=e.replace(/^#/,"");return"rgb("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+")"}return"rgb(255, 255, 255)"}function X(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J;"#"===n[0]&&(e=Y(n)),n.startsWith("rgb")&&(e=n);var t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[n.toLowerCase()];if(t&&(e=Y(t)),!e)return"black";var o=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(o){var r=parseInt(o[1]),i=parseInt(o[2]),l=parseInt(o[3]);return Math.sqrt(r*r*.299+i*i*.587+l*l*.114)>127.5?"black":"white"}return"black"}var G={backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:"right"},J="#eeeded",K=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;r&&(localStorage.setItem(re(o),"true"),r.capture("survey sent",n(n({$survey_name:o.name,$survey_id:o.id,$survey_iteration:o.current_iteration,$survey_iteration_start_date:o.current_iteration_start_date,$survey_questions:o.questions.map((e=>e.question)),sessionRecordingUrl:null===(e=r.get_session_replay_url)||void 0===e?void 0:e.call(r)},t),{},{$set:{[ie(o,"responded")]:!0}})),R.dispatchEvent(new Event("PHSurveySent")))},ee=(e,n,t)=>{var o;!t&&n&&(n.capture("survey dismissed",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(o=n.get_session_replay_url)||void 0===o?void 0:o.call(n),$set:{[ie(e,"dismissed")]:!0}}),localStorage.setItem(re(e),"true"),R.dispatchEvent(new Event("PHSurveyClosed")))},ne=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,n)=>e.sort-n.sort)).map((e=>e.value)),te=(e,n)=>e.length===n.length&&e.every(((e,t)=>e===n[t]))?n.reverse():n,oe=e=>(e.questions.forEach(((e,n)=>{e.originalQuestionIndex=n})),e.appearance&&e.appearance.shuffleQuestions?te(e.questions,ne(e.questions)):e.questions),re=e=>{var n="".concat(W).concat(e.id);return e.current_iteration&&e.current_iteration>0&&(n="".concat(W).concat(e.id,"_").concat(e.current_iteration)),n},ie=(e,n)=>{var t="$survey_".concat(n,"/").concat(e.id);return e.current_iteration&&e.current_iteration>0&&(t="$survey_".concat(n,"/").concat(e.id,"/").concat(e.current_iteration)),t},le=function(e,n){var t={__c:n="__cC"+g++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,o;return this.getChildContext||(t=[],(o={})[n]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some((function(e){e.__e=!0,M(e)}))},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t}({isPreviewMode:!1,previewPageIndex:0,handleCloseSurveyPopup:()=>{},isPopup:!0}),ae=e=>{var{component:n,children:t,renderAsHtml:o,style:r}=e;return z(n,o?{dangerouslySetInnerHTML:{__html:t},style:r}:{children:t,style:r})};var ce,se,ue,de,pe=0,_e=[],fe=[],he=d.__b,ve=d.__r,ge=d.diffed,me=d.__c,be=d.unmount;function ye(e,n){d.__h&&d.__h(se,e,pe||n),pe=0;var t=se.__H||(se.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({__V:fe}),t.__[e]}function Ce(e){return pe=1,function(e,n,t){var o=ye(ce++,2);if(o.t=e,!o.__c&&(o.__=[De(void 0,n),function(e){var n=o.__N?o.__N[0]:o.__[0],t=o.t(n,e);n!==t&&(o.__N=[t,o.__[1]],o.__c.setState({}))}],o.__c=se,!se.u)){var r=function(e,n,t){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter((function(e){return e.__c}));if(r.every((function(e){return!e.__N})))return!i||i.call(this,e,n,t);var l=!1;return r.forEach((function(e){if(e.__N){var n=e.__[0];e.__=e.__N,e.__N=void 0,n!==e.__[0]&&(l=!0)}})),!(!l&&o.__c.props===e)&&(!i||i.call(this,e,n,t))};se.u=!0;var i=se.shouldComponentUpdate,l=se.componentWillUpdate;se.componentWillUpdate=function(e,n,t){if(this.__e){var o=i;i=void 0,r(e,n,t),i=o}l&&l.call(this,e,n,t)},se.shouldComponentUpdate=r}return o.__N||o.__}(De,e)}function xe(e,n){var t=ye(ce++,3);!d.__s&&Ze(t.__H,n)&&(t.__=e,t.i=n,se.__H.__h.push(t))}function ke(e){return pe=5,we((function(){return{current:e}}),[])}function we(e,n){var t=ye(ce++,7);return Ze(t.__H,n)?(t.__V=e(),t.i=n,t.__h=e,t.__V):t.__}function qe(e){var n=se.context[e.__c],t=ye(ce++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(se)),n.props.value):e.__}function Te(){for(var e;e=_e.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Me),e.__H.__h.forEach(Pe),e.__H.__h=[]}catch(n){e.__H.__h=[],d.__e(n,e.__v)}}d.__b=function(e){se=null,he&&he(e)},d.__r=function(e){ve&&ve(e),ce=0;var n=(se=e.__c).__H;n&&(ue===se?(n.__h=[],se.__h=[],n.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=fe,e.__N=e.i=void 0}))):(n.__h.forEach(Me),n.__h.forEach(Pe),n.__h=[],ce=0)),ue=se},d.diffed=function(e){ge&&ge(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==_e.push(n)&&de===d.requestAnimationFrame||((de=d.requestAnimationFrame)||Le)(Te)),n.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==fe&&(e.__=e.__V),e.i=void 0,e.__V=fe}))),ue=se=null},d.__c=function(e,n){n.some((function(e){try{e.__h.forEach(Me),e.__h=e.__h.filter((function(e){return!e.__||Pe(e)}))}catch(t){n.some((function(e){e.__h&&(e.__h=[])})),n=[],d.__e(t,e.__v)}})),me&&me(e,n)},d.unmount=function(e){be&&be(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach((function(e){try{Me(e)}catch(e){n=e}})),t.__H=void 0,n&&d.__e(n,t.__v))};var Se,He="function"==typeof requestAnimationFrame;function Le(e){var n,t=function(){clearTimeout(o),He&&cancelAnimationFrame(n),setTimeout(e)},o=setTimeout(t,100);He&&(n=requestAnimationFrame(t))}function Me(e){var n=se,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),se=n}function Pe(e){var n=se;e.__c=e.__(),se=n}function Ze(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function De(e,n){return"function"==typeof n?n(e):n}!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(Se||(Se={}));var Ie=Array.isArray,Ne=Object.prototype.toString,Ve=Ie||function(e){return"[object Array]"===Ne.call(e)},Ee=e=>null===e,Qe=e=>"[object Number]"==Ne.call(e),je=0;function Oe(e,n,t,o,r,i){var l,a,c={};for(a in n)"ref"==a?l=n[a]:c[a]=n[a];var s={type:e,props:c,key:t,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--je,__i:-1,__u:0,__source:r,__self:i};if("function"==typeof e&&(l=e.defaultProps))for(a in l)void 0===c[a]&&(c[a]=l[a]);return d.vnode&&d.vnode(s),s}var Be=Oe("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Oe("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Ae=Oe("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Oe("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Ue=Oe("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Oe("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Fe=Oe("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Oe("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),$e=Oe("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Oe("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),ze=Oe("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Oe("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:"black"})}),Re=Oe("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Oe("g",{"clip-path":"url(#clip0_2415_6911)",children:[Oe("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Oe("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Oe("g",{mask:"url(#mask0_2415_6911)",children:[Oe("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),Oe("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),Oe("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),Oe("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),Oe("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),Oe("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),Oe("defs",{children:Oe("clipPath",{id:"clip0_2415_6911",children:Oe("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]}),We=Oe("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Oe("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});function Ye(){return Oe("a",{href:"https://posthog.com",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Re]})}function Xe(e){var{text:n,submitDisabled:t,appearance:o,onSubmit:r,link:i}=e,{isPreviewMode:a,isPopup:c}=qe(le),s=o.submitButtonTextColor||X(o.submitButtonColor||G.submitButtonColor);return Oe("div",{className:"bottom-section",children:[Oe("div",{className:"buttons",children:Oe("button",{className:"form-submit",disabled:t&&!a,type:"button",style:c?{color:s}:{},onClick:()=>{a||(i&&(null==l||l.open(i)),r())},children:n})}),!o.whiteLabel&&Oe(Ye,{})]})}function Ge(e){var{question:n,description:t,descriptionContentType:o,backgroundColor:r,forceDisableHtml:i}=e,{isPopup:l}=qe(le);return Oe("div",{style:l?{backgroundColor:r||G.backgroundColor}:{},children:[Oe("div",{className:"survey-question",children:n}),t&&ae({component:w("div",{className:"survey-question-description"}),children:t,renderAsHtml:!i&&"text"!==o})]})}function Je(e){var{onClick:n}=e,{isPreviewMode:t}=qe(le);return Oe("div",{className:"cancel-btn-wrapper",onClick:n,disabled:t,children:Oe("button",{className:"form-cancel",onClick:n,disabled:t,children:ze})})}function Ke(e){var{header:t,description:o,contentType:r,forceDisableHtml:i,appearance:l,onClose:a,styleOverrides:c}=e,s=X(l.backgroundColor||G.backgroundColor),{isPopup:u}=qe(le);return Oe(T,{children:Oe("div",{className:"thank-you-message",style:n({},c),children:Oe("div",{className:"thank-you-message-container",children:[u&&Oe(Je,{onClick:()=>a()}),Oe("h3",{className:"thank-you-message-header",style:{color:s},children:t}),o&&ae({component:w("div",{className:"thank-you-message-body"}),children:o,renderAsHtml:!i&&"text"!==r,style:{color:s}}),u&&Oe(Xe,{text:l.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:l,onSubmit:()=>a()})]})})})}function en(e){var n,t=ke(null),[o,r]=Ce(null!==(n=e.defaultTextColor)&&void 0!==n?n:"black");return xe((()=>{if(t.current){var e=function(e){var n=R.getComputedStyle(e).backgroundColor;if("rgba(0, 0, 0, 0)"===n)return"black";var t=n.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(!t)return"black";var o=parseInt(t[1]),r=parseInt(t[2]),i=parseInt(t[3]);return Math.sqrt(o*o*.299+r*r*.587+i*i*.114)>127.5?"black":"white"}(t.current);r(e)}}),[e.appearance,e.forceUpdate]),{ref:t,textColor:o}}function nn(e){var{question:n,forceDisableHtml:t,appearance:o,onSubmit:r}=e,i=ke(null),[l,a]=Ce("");return Oe("div",{ref:i,children:[Oe(Ge,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,backgroundColor:o.backgroundColor,forceDisableHtml:t}),Oe("textarea",{rows:4,placeholder:null==o?void 0:o.placeholder,onInput:e=>a(e.currentTarget.value)}),Oe(Xe,{text:n.buttonText||"Submit",submitDisabled:!l&&!n.optional,appearance:o,onSubmit:()=>r(l)})]})}function tn(e){var{question:n,forceDisableHtml:t,appearance:o,onSubmit:r}=e;return Oe(T,{children:[Oe(Ge,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t}),Oe(Xe,{text:n.buttonText||"Submit",submitDisabled:!1,link:n.link,appearance:o,onSubmit:()=>r("link clicked")})]})}function on(e){var{question:n,forceDisableHtml:t,displayQuestionIndex:o,appearance:r,onSubmit:i}=e,l=n.scale,a=10===n.scale?0:1,[c,s]=Ce(null);return Oe(T,{children:[Oe(Ge,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t,backgroundColor:r.backgroundColor}),Oe("div",{className:"rating-section",children:[Oe("div",{className:"rating-options",children:["emoji"===n.display&&Oe("div",{className:"rating-options-emoji",children:(3===n.scale?an:cn).map(((e,n)=>{var t=n+1===c;return Oe("button",{className:"ratings-emoji question-".concat(o,"-rating-").concat(n," ").concat(t?"rating-active":null),value:n+1,type:"button",onClick:()=>{s(n+1)},style:{fill:t?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:e},n)}))}),"number"===n.display&&Oe("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat(".concat(l-a+1,", minmax(0, 1fr))")},children:pn(n.scale).map(((e,n)=>Oe(rn,{displayQuestionIndex:o,active:c===e,appearance:r,num:e,setActiveNumber:e=>{s(e)}},n)))})]}),Oe("div",{className:"rating-text",children:[Oe("div",{children:n.lowerBoundLabel}),Oe("div",{children:n.upperBoundLabel})]})]}),Oe(Xe,{text:n.buttonText||(null==r?void 0:r.submitButtonText)||"Submit",submitDisabled:Ee(c)&&!n.optional,appearance:r,onSubmit:()=>i(c)})]})}function rn(e){var{num:n,active:t,displayQuestionIndex:o,appearance:r,setActiveNumber:i}=e,{textColor:l,ref:a}=en({appearance:r,defaultTextColor:"black",forceUpdate:t});return Oe("button",{ref:a,className:"ratings-number question-".concat(o,"-rating-").concat(n," ").concat(t?"rating-active":null),type:"button",onClick:()=>{i(n)},style:{color:l,backgroundColor:t?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:n})}function ln(e){var{question:n,forceDisableHtml:t,displayQuestionIndex:o,appearance:i,onSubmit:l}=e,a=ke(null),c=we((()=>(e=>{if(!e.shuffleOptions)return e.choices;var n=e.choices,t="";e.hasOpenChoice&&(t=n.pop());var o=te(n,ne(n));return e.hasOpenChoice&&(e.choices.push(t),o.push(t)),o})(n)),[n]),[s,u]=Ce(n.type===r.MultipleChoice?[]:null),[d,p]=Ce(!1),[_,f]=Ce(""),h=n.type===r.SingleChoice?"radio":"checkbox";return Oe("div",{ref:a,children:[Oe(Ge,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t,backgroundColor:i.backgroundColor}),Oe("div",{className:"multiple-choice-options",children:c.map(((e,t)=>{var i="choice-option",l=e,a=e;return n.hasOpenChoice&&t===n.choices.length-1&&(i+=" choice-option-open"),Oe("div",{className:i,children:[Oe("input",{type:h,id:"surveyQuestion".concat(o,"Choice").concat(t),name:"question".concat(o),value:l,disabled:!l,onInput:()=>n.hasOpenChoice&&t===n.choices.length-1?p(!d):n.type===r.SingleChoice?u(l):n.type===r.MultipleChoice&&Ve(s)?s.includes(l)?u(s.filter((e=>e!==l))):u([...s,l]):void 0}),Oe("label",{htmlFor:"surveyQuestion".concat(o,"Choice").concat(t),style:{color:"black"},children:n.hasOpenChoice&&t===n.choices.length-1?Oe(T,{children:[Oe("span",{children:[a,":"]}),Oe("input",{type:"text",id:"surveyQuestion".concat(o,"Choice").concat(t,"Open"),name:"question".concat(o),onInput:e=>{var t=e.currentTarget.value;return n.type===r.SingleChoice?u(t):n.type===r.MultipleChoice&&Ve(s)?f(t):void 0}})]}):a}),Oe("span",{className:"choice-check",style:{color:"black"},children:We})]})}))}),Oe(Xe,{text:n.buttonText||"Submit",submitDisabled:(Ee(s)||Ve(s)&&!d&&0===s.length||Ve(s)&&d&&!_&&0===s.length&&!n.optional)&&!n.optional,appearance:i,onSubmit:()=>{d&&n.type===r.MultipleChoice?Ve(s)&&l([...s,_]):l(s)}})]})}var an=[Ue,Ae,Be],cn=[Fe,Ue,Ae,Be,$e],sn=[1,2,3,4,5],un=[1,2,3,4,5,6,7],dn=[0,1,2,3,4,5,6,7,8,9,10];function pn(e){switch(e){case 5:default:return sn;case 7:return un;case 10:return dn}}var _n=l,fn=s,hn=e=>{var n,t,o,{survey:r,parentElement:i,previewPageIndex:l,forceDisableHtml:a}=e,c=(o=r.appearance,'\n .survey-form, .thank-you-message {\n position: fixed;\n margin: 0px;\n bottom: 0px;\n color: black;\n font-weight: normal;\n font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n text-align: left;\n max-width: '.concat(parseInt((null==o?void 0:o.maxWidth)||"300"),"px;\n width: 100%;\n z-index: ").concat(parseInt((null==o?void 0:o.zIndex)||"99999"),";\n border: 1.5px solid ").concat((null==o?void 0:o.borderColor)||"#c9c6c6",";\n border-bottom: 0px;\n ").concat({left:"left: 30px;",right:"right: 30px;",center:"\n left: 50%;\n transform: translateX(-50%);\n "}[(null==o?void 0:o.position)||"right"]||"right: 30px;","\n flex-direction: column;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",';\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n box-shadow: -6px 0 16px -8px rgb(0 0 0 / 8%), -9px 0 28px 0 rgb(0 0 0 / 5%), -12px 0 48px 16px rgb(0 0 0 / 3%);\n }\n \n .survey-box, .thank-you-message-container {\n padding: 20px 25px 10px;\n display: flex;\n flex-direction: column;\n border-radius: 10px;\n }\n\n .thank-you-message {\n text-align: center;\n }\n\n .form-submit[disabled] {\n opacity: 0.6;\n filter: grayscale(50%);\n cursor: not-allowed;\n }\n .survey-form textarea {\n color: #2d2d2d;\n font-size: 14px;\n font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n background: white;\n color: black;\n outline: none;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 10px;\n border-radius: 6px;\n border-color: ').concat((null==o?void 0:o.borderColor)||"#c9c6c6",";\n margin-top: 14px;\n width: 100%;\n box-sizing: border-box;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea {\n margin-top: 0;\n }\n .form-submit {\n box-sizing: border-box;\n margin: 0;\n font-family: inherit;\n overflow: visible;\n text-transform: none;\n position: relative;\n display: inline-block;\n font-weight: 700;\n white-space: nowrap;\n text-align: center;\n border: 1.5px solid transparent;\n cursor: pointer;\n user-select: none;\n touch-action: manipulation;\n padding: 12px;\n font-size: 14px;\n border-radius: 6px;\n outline: 0;\n background: ").concat((null==o?void 0:o.submitButtonColor)||"black"," !important;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);\n box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);\n width: 100%;\n }\n .form-cancel {\n display: flex;\n float: right;\n border: none;\n background: none;\n cursor: pointer;\n }\n .cancel-btn-wrapper {\n position: absolute;\n width: 35px;\n height: 35px;\n border-radius: 100%;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n background: white;\n border: 1.5px solid ").concat((null==o?void 0:o.borderColor)||"#c9c6c6",";\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .bolded { font-weight: 600; }\n .buttons {\n display: flex;\n justify-content: center;\n }\n .footer-branding {\n font-size: 11px;\n margin-top: 10px;\n text-align: center;\n display: flex;\n justify-content: center;\n gap: 4px;\n align-items: center;\n font-weight: 500;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n text-decoration: none;\n backgroundColor: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n color: ").concat(X((null==o?void 0:o.backgroundColor)||"#eeeded"),";\n }\n .survey-question {\n font-weight: 500;\n font-size: 14px;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n }\n .question-textarea-wrapper {\n display: flex;\n flex-direction: column;\n }\n .survey-question-description {\n font-size: 13px;\n padding-top: 5px;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n }\n .ratings-number {\n font-size: 16px;\n font-weight: 600;\n padding: 8px 0px;\n border: none;\n }\n .ratings-number:hover {\n cursor: pointer;\n }\n .rating-options {\n margin-top: 14px;\n }\n .rating-options-number {\n display: grid;\n border-radius: 6px;\n overflow: hidden;\n border: 1.5px solid ").concat((null==o?void 0:o.borderColor)||"#c9c6c6",";\n }\n .rating-options-number > .ratings-number {\n border-right: 1px solid ").concat((null==o?void 0:o.borderColor)||"#c9c6c6",";\n }\n .rating-options-number > .ratings-number:last-of-type {\n border-right: 0px;\n }\n .rating-options-number .rating-active {\n background: ").concat((null==o?void 0:o.ratingButtonActiveColor)||"black",";\n }\n .rating-options-emoji {\n display: flex;\n justify-content: space-between;\n }\n .ratings-emoji {\n font-size: 16px;\n background-color: transparent;\n border: none;\n padding: 0px;\n }\n .ratings-emoji:hover {\n cursor: pointer;\n }\n .ratings-emoji.rating-active svg {\n fill: ").concat((null==o?void 0:o.ratingButtonActiveColor)||"black",";\n }\n .emoji-svg {\n fill: '#939393';\n }\n .rating-text {\n display: flex;\n flex-direction: row;\n font-size: 11px;\n justify-content: space-between;\n margin-top: 6px;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n opacity: .60;\n }\n .multiple-choice-options {\n margin-top: 13px;\n font-size: 14px;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options {\n margin-top: 0;\n }\n .multiple-choice-options .choice-option {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n cursor: pointer;\n margin-bottom: 5px;\n position: relative;\n }\n .multiple-choice-options > .choice-option:last-of-type {\n margin-bottom: 0px;\n }\n .multiple-choice-options input {\n cursor: pointer;\n position: absolute;\n opacity: 0;\n }\n .choice-check {\n position: absolute;\n right: 10px;\n background: white;\n }\n .choice-check svg {\n display: none;\n }\n .multiple-choice-options .choice-option:hover .choice-check svg {\n display: inline-block;\n opacity: .25;\n }\n .multiple-choice-options input:checked + label + .choice-check svg {\n display: inline-block;\n opacity: 100% !important;\n }\n .multiple-choice-options input:checked + label {\n font-weight: bold;\n border: 1.5px solid rgba(0,0,0);\n }\n .multiple-choice-options input:checked + label input {\n font-weight: bold;\n }\n .multiple-choice-options label {\n width: 100%;\n cursor: pointer;\n padding: 10px;\n border: 1.5px solid rgba(0,0,0,.25);\n border-radius: 4px;\n background: white;\n }\n .multiple-choice-options .choice-option-open label {\n padding-right: 30px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n max-width: 100%;\n }\n .multiple-choice-options .choice-option-open label span {\n width: 100%;\n }\n .multiple-choice-options .choice-option-open input:disabled + label {\n opacity: 0.6;\n }\n .multiple-choice-options .choice-option-open label input {\n position: relative;\n opacity: 1;\n flex-grow: 1;\n border: 0;\n outline: 0;\n }\n .thank-you-message-body {\n margin-top: 6px;\n font-size: 14px;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n }\n .thank-you-message-header {\n margin: 10px 0px 0px;\n background: ").concat((null==o?void 0:o.backgroundColor)||"#eeeded",";\n }\n .thank-you-message-container .form-submit {\n margin-top: 20px;\n margin-bottom: 10px;\n }\n .thank-you-message-countdown {\n margin-left: 6px;\n }\n .bottom-section {\n margin-top: 14px;\n }\n ")),s=Object.assign(fn.createElement("style"),{innerText:c});Array.from(i.children).forEach((e=>{e instanceof HTMLStyleElement&&i.removeChild(e)})),i.appendChild(s);var u=X((null===(n=r.appearance)||void 0===n?void 0:n.backgroundColor)||G.backgroundColor||"white");$(Oe(gn,{survey:r,forceDisableHtml:a,style:{position:"relative",right:0,borderBottom:"1px solid ".concat(null===(t=r.appearance)||void 0===t?void 0:t.borderColor),borderRadius:10,color:u},previewPageIndex:l,removeSurveyFromFocus:()=>{},isPopup:!0},"surveys-render-preview"),i)},vn=e=>{var n,t,{survey:o,root:r,forceDisableHtml:i}=e,l=(t=null===(n=o.appearance)||void 0===n?void 0:n.widgetColor,"\n .ph-survey-widget-tab {\n position: fixed;\n top: 50%;\n right: 0;\n background: ".concat(t||"#e0a045",";\n color: white;\n transform: rotate(-90deg) translate(0, -100%);\n transform-origin: right top;\n min-width: 40px;\n padding: 8px 12px;\n font-weight: 500;\n border-radius: 3px 3px 0 0;\n text-align: center;\n cursor: pointer;\n z-index: 9999999;\n }\n .ph-survey-widget-tab:hover {\n padding-bottom: 13px;\n }\n .ph-survey-widget-button {\n position: fixed;\n }\n ")),a=Object.assign(fn.createElement("style"),{innerText:l});r.appendChild(a),$(Oe(bn,{forceDisableHtml:i,survey:o,readOnly:!0,removeSurveyFromFocus:()=>{}},"feedback-render-preview"),r)};function gn(e){var t,o,r,i,l,a,{survey:c,forceDisableHtml:s,posthog:u,style:d,previewPageIndex:p,removeSurveyFromFocus:_,isPopup:f}=e,h=Number.isInteger(p),v=null!==(t=c.appearance)&&void 0!==t&&t.surveyPopupDelaySeconds?1e3*c.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:g,isSurveySent:m,setIsPopupVisible:b}=function(e,n,t,o,r){var[i,l]=Ce(o||0===t),[a,c]=Ce(!1);return xe((()=>{if(!o&&n){var i,a=()=>{r(e.id),l(!1)},s=()=>{var n,t;null!==(n=e.appearance)&&void 0!==n&&n.displayThankYouMessage?(c(!0),r(e.id),null!==(t=e.appearance)&&void 0!==t&&t.autoDisappear&&setTimeout((()=>{l(!1)}),5e3)):(r(e.id),l(!1))},u=()=>{var t;l(!0),_n.dispatchEvent(new Event("PHSurveyShown")),n.capture("survey shown",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(t=n.get_session_replay_url)||void 0===t?void 0:t.call(n)}),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())};return _n.addEventListener("PHSurveyClosed",a),_n.addEventListener("PHSurveySent",s),t>0?(i=setTimeout((()=>{u()}),t),()=>{clearTimeout(i),_n.removeEventListener("PHSurveyClosed",a),_n.removeEventListener("PHSurveySent",s)}):(u(),()=>{_n.removeEventListener("PHSurveyClosed",a),_n.removeEventListener("PHSurveySent",s)})}}),[]),{isPopupVisible:i,isSurveySent:a,setIsPopupVisible:l}}(c,u,v,h,_),y=m||p===c.questions.length,C=null!==(o=d)&&void 0!==o&&o.left&&Qe(null===(r=d)||void 0===r?void 0:r.left)?{left:d.left-40}:{};return h&&((d=d||{}).left="unset",d.right="unset",d.transform="unset"),g?Oe(le.Provider,{value:{isPreviewMode:h,previewPageIndex:p,handleCloseSurveyPopup:()=>ee(c,u,h),isPopup:f||!1},children:y?Oe(Ke,{header:(null===(i=c.appearance)||void 0===i?void 0:i.thankYouMessageHeader)||"Thank you!",description:(null===(l=c.appearance)||void 0===l?void 0:l.thankYouMessageDescription)||"",forceDisableHtml:!!s,contentType:null===(a=c.appearance)||void 0===a?void 0:a.thankYouMessageDescriptionContentType,appearance:c.appearance||G,styleOverrides:n(n({},d),C),onClose:()=>b(!1)}):Oe(mn,{survey:c,forceDisableHtml:!!s,posthog:u,styleOverrides:d})}):Oe(T,{})}function mn(e){var t,o,{survey:r,forceDisableHtml:l,posthog:a,styleOverrides:c}=e,s=X((null===(t=r.appearance)||void 0===t?void 0:t.backgroundColor)||G.backgroundColor),[u,d]=Ce({}),{isPreviewMode:p,previewPageIndex:_,handleCloseSurveyPopup:f,isPopup:h}=qe(le),[v,g]=Ce(_||0),m=we((()=>oe(r)),[r]);xe((()=>{g(null!=_?_:0)}),[_]);return Oe("form",{className:"survey-form",style:h?n({color:s,borderColor:null===(o=r.appearance)||void 0===o?void 0:o.borderColor},c):{},children:m.map(((e,t)=>{var o,{originalQuestionIndex:c}=e;return(p?v===c:v===t)&&Oe("div",{className:"survey-box",style:h?{backgroundColor:(null===(o=r.appearance)||void 0===o?void 0:o.backgroundColor)||G.backgroundColor}:{},children:[h&&Oe(Je,{onClick:()=>f()}),yn({question:e,forceDisableHtml:l,displayQuestionIndex:t,appearance:r.appearance||G,onSubmit:e=>(e=>{var{res:t,originalQuestionIndex:o,displayQuestionIndex:l}=e;if(a){var c=0===o?"$survey_response":"$survey_response_".concat(o);if(d(n(n({},u),{},{[c]:t})),a.getNextSurveyStep){var s=a.getNextSurveyStep(r,l,t);s===i.End?K(n(n({},u),{},{[c]:t}),r,a):g(s)}else l===r.questions.length-1?K(n(n({},u),{},{[c]:t}),r,a):g(l+1)}})({res:e,originalQuestionIndex:c,displayQuestionIndex:t})})]})}))})}function bn(e){var n,t,{survey:o,forceDisableHtml:r,posthog:i,readOnly:l,removeSurveyFromFocus:a}=e,[c,s]=Ce(!1),[u,d]=Ce({}),p=ke(null);return xe((()=>{var e,n;if(!l&&i){if("tab"===(null===(e=o.appearance)||void 0===e?void 0:e.widgetType)&&p.current){var t,r=p.current.getBoundingClientRect(),a={top:"50%",left:parseInt("".concat(r.right-360)),bottom:"auto",borderRadius:10,borderBottom:"1.5px solid ".concat((null===(t=o.appearance)||void 0===t?void 0:t.borderColor)||"#c9c6c6")};d(a)}if("selector"===(null===(n=o.appearance)||void 0===n?void 0:n.widgetType)){var u=fn.querySelector(o.appearance.widgetSelector||"");null==u||u.addEventListener("click",(()=>{s(!c)})),null==u||u.setAttribute("PHWidgetSurveyClickListener","true")}}}),[]),Oe(T,{children:["tab"===(null===(n=o.appearance)||void 0===n?void 0:n.widgetType)&&Oe("div",{className:"ph-survey-widget-tab",ref:p,onClick:()=>!l&&s(!c),style:{color:X(o.appearance.widgetColor)},children:[Oe("div",{className:"ph-survey-widget-tab-icon"}),(null===(t=o.appearance)||void 0===t?void 0:t.widgetLabel)||""]}),c&&Oe(gn,{posthog:i,survey:o,forceDisableHtml:r,style:u,removeSurveyFromFocus:a,isPopup:!0},"feedback-widget-survey")]})}var yn=e=>{var{question:t,forceDisableHtml:o,displayQuestionIndex:i,appearance:l,onSubmit:a}=e,c={[r.Open]:nn,[r.Link]:tn,[r.Rating]:on,[r.SingleChoice]:ln,[r.MultipleChoice]:ln},s={question:t,forceDisableHtml:o,appearance:l,onSubmit:a},u={[r.Open]:{},[r.Link]:{},[r.Rating]:{displayQuestionIndex:i},[r.SingleChoice]:{displayQuestionIndex:i},[r.MultipleChoice]:{displayQuestionIndex:i}},d=c[t.type],p=n(n({},s),u[t.type]);return Oe(d,n({},p))};export{vn as renderFeedbackWidgetPreview,hn as renderSurveysPreview}; | ||
//# sourceMappingURL=surveys-preview.js.map |
@@ -1,2 +0,2 @@ | ||
!function(){"use strict";let e,n,t;!function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(e||(e={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(n||(n={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(t||(t={}));const o="undefined"!=typeof window?window:void 0,r="undefined"!=typeof globalThis?globalThis:o,i=null==r?void 0:r.navigator,l=null==r?void 0:r.document;null==r||r.location,null==r||r.fetch,null!=r&&r.XMLHttpRequest&&"withCredentials"in new r.XMLHttpRequest&&r.XMLHttpRequest,null==r||r.AbortController,null==i||i.userAgent;const a=null!=o?o:{};var s,u,c,d,p,_,f,h,v={},g=[],m=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,y=Array.isArray;function b(e,n){for(var t in n)e[t]=n[t];return e}function C(e){var n=e.parentNode;n&&n.removeChild(e)}function x(e,n,t){var o,r,i,l={};for(i in n)"key"==i?o=n[i]:"ref"==i?r=n[i]:l[i]=n[i];if(arguments.length>2&&(l.children=arguments.length>3?s.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return k(e,l,o,r,null)}function k(e,n,t,o,r){var i={type:e,props:n,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++c:r,__i:-1,__u:0};return null==r&&null!=u.vnode&&u.vnode(i),i}function w(e){return e.children}function S(e,n){this.props=e,this.context=n}function q(e,n){if(null==n)return e.__?q(e.__,e.__i+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?q(e):null}function T(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return T(e)}}function H(e){(!e.__d&&(e.__d=!0)&&d.push(e)&&!P.__r++||p!==u.debounceRendering)&&((p=u.debounceRendering)||_)(P)}function P(){var e,n,t,o,r,i,l,a,s;for(d.sort(f);e=d.shift();)e.__d&&(n=d.length,o=void 0,i=(r=(t=e).__v).__e,a=[],s=[],(l=t.__P)&&((o=b({},r)).__v=r.__v+1,u.vnode&&u.vnode(o),D(l,o,r,t.__n,void 0!==l.ownerSVGElement,32&r.__u?[i]:null,a,null==i?q(r):i,!!(32&r.__u),s),o.__.__k[o.__i]=o,N(a,o,s),o.__e!=i&&T(o)),d.length>n&&d.sort(f));P.__r=0}function L(e,n,t,o,r,i,l,a,s,u,c){var d,p,_,f,h,m=o&&o.__k||g,b=n.length;for(t.__d=s,function(e,n,t){var o,r,i,l,a,s=n.length,u=t.length,c=u,d=0;for(e.__k=[],o=0;o<s;o++)null!=(r=e.__k[o]=null==(r=n[o])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?k(null,r,null,null,r):y(r)?k(w,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?k(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=e,r.__b=e.__b+1,a=M(r,t,l=o+d,c),r.__i=a,i=null,-1!==a&&(c--,(i=t[a])&&(i.__u|=131072)),null==i||null===i.__v?(-1==a&&d--,"function"!=typeof r.type&&(r.__u|=65536)):a!==l&&(a===l+1?d++:a>l?c>s-l?d+=a-l:d--:d=a<l&&a==l-1?a-l:0,a!==o+d&&(r.__u|=65536))):(i=t[o])&&null==i.key&&i.__e&&(i.__e==e.__d&&(e.__d=q(i)),B(i,i,!1),t[o]=null,c--);if(c)for(o=0;o<u;o++)null!=(i=t[o])&&0==(131072&i.__u)&&(i.__e==e.__d&&(e.__d=q(i)),B(i,i))}(t,n,m),s=t.__d,d=0;d<b;d++)null!=(_=t.__k[d])&&"boolean"!=typeof _&&"function"!=typeof _&&(p=-1===_.__i?v:m[_.__i]||v,_.__i=d,D(e,_,p,r,i,l,a,s,u,c),f=_.__e,_.ref&&p.ref!=_.ref&&(p.ref&&V(p.ref,null,_),c.push(_.ref,_.__c||f,_)),null==h&&null!=f&&(h=f),65536&_.__u||p.__k===_.__k?s=$(_,s,e):"function"==typeof _.type&&void 0!==_.__d?s=_.__d:f&&(s=f.nextSibling),_.__d=void 0,_.__u&=-196609);t.__d=s,t.__e=h}function $(e,n,t){var o,r;if("function"==typeof e.type){for(o=e.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=e,n=$(o[r],n,t));return n}return e.__e!=n&&(t.insertBefore(e.__e,n||null),n=e.__e),n&&n.nextSibling}function M(e,n,t,o){var r=e.key,i=e.type,l=t-1,a=t+1,s=n[t];if(null===s||s&&r==s.key&&i===s.type)return t;if(o>(null!=s&&0==(131072&s.__u)?1:0))for(;l>=0||a<n.length;){if(l>=0){if((s=n[l])&&0==(131072&s.__u)&&r==s.key&&i===s.type)return l;l--}if(a<n.length){if((s=n[a])&&0==(131072&s.__u)&&r==s.key&&i===s.type)return a;a++}}return-1}function I(e,n,t){"-"===n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||m.test(n)?t:t+"px"}function E(e,n,t,o,r){var i;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(n in o)t&&n in t||I(e.style,n,"");if(t)for(n in t)o&&t[n]===o[n]||I(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])i=n!==(n=n.replace(/(PointerCapture)$|Capture$/,"$1")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?o?t.u=o.u:(t.u=Date.now(),e.addEventListener(n,i?Z:F,i)):e.removeEventListener(n,i?Z:F,i);else{if(r)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==n&&"height"!==n&&"href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&"rowSpan"!==n&&"colSpan"!==n&&"role"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!==n[4]?e.removeAttribute(n):e.setAttribute(n,t))}}function F(e){var n=this.l[e.type+!1];if(e.t){if(e.t<=n.u)return}else e.t=Date.now();return n(u.event?u.event(e):e)}function Z(e){return this.l[e.type+!0](u.event?u.event(e):e)}function D(e,n,t,o,r,i,l,a,s,c){var d,p,_,f,h,v,g,m,C,x,k,q,T,H,P,$=n.type;if(void 0!==n.constructor)return null;128&t.__u&&(s=!!(32&t.__u),i=[a=n.__e=t.__e]),(d=u.__b)&&d(n);e:if("function"==typeof $)try{if(m=n.props,C=(d=$.contextType)&&o[d.__c],x=d?C?C.props.value:d.__:o,t.__c?g=(p=n.__c=t.__c).__=p.__E:("prototype"in $&&$.prototype.render?n.__c=p=new $(m,x):(n.__c=p=new S(m,x),p.constructor=$,p.render=Q),C&&C.sub(p),p.props=m,p.state||(p.state={}),p.context=x,p.__n=o,_=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=$.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=b({},p.__s)),b(p.__s,$.getDerivedStateFromProps(m,p.__s))),f=p.props,h=p.state,p.__v=n,_)null==$.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==$.getDerivedStateFromProps&&m!==f&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(m,x),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(m,p.__s,x)||n.__v===t.__v)){for(n.__v!==t.__v&&(p.props=m,p.state=p.__s,p.__d=!1),n.__e=t.__e,n.__k=t.__k,n.__k.forEach((function(e){e&&(e.__=n)})),k=0;k<p._sb.length;k++)p.__h.push(p._sb[k]);p._sb=[],p.__h.length&&l.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(m,p.__s,x),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(f,h,v)}))}if(p.context=x,p.props=m,p.__P=e,p.__e=!1,q=u.__r,T=0,"prototype"in $&&$.prototype.render){for(p.state=p.__s,p.__d=!1,q&&q(n),d=p.render(p.props,p.state,p.context),H=0;H<p._sb.length;H++)p.__h.push(p._sb[H]);p._sb=[]}else do{p.__d=!1,q&&q(n),d=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++T<25);p.state=p.__s,null!=p.getChildContext&&(o=b(b({},o),p.getChildContext())),_||null==p.getSnapshotBeforeUpdate||(v=p.getSnapshotBeforeUpdate(f,h)),L(e,y(P=null!=d&&d.type===w&&null==d.key?d.props.children:d)?P:[P],n,t,o,r,i,l,a,s,c),p.base=n.__e,n.__u&=-161,p.__h.length&&l.push(p),g&&(p.__E=p.__=null)}catch(e){n.__v=null,s||null!=i?(n.__e=a,n.__u|=s?160:32,i[i.indexOf(a)]=null):(n.__e=t.__e,n.__k=t.__k),u.__e(e,n,t)}else null==i&&n.__v===t.__v?(n.__k=t.__k,n.__e=t.__e):n.__e=A(t.__e,n,t,o,r,i,l,s,c);(d=u.diffed)&&d(n)}function N(e,n,t){n.__d=void 0;for(var o=0;o<t.length;o++)V(t[o],t[++o],t[++o]);u.__c&&u.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){u.__e(e,n.__v)}}))}function A(e,n,t,o,r,i,l,a,u){var c,d,p,_,f,h,g,m=t.props,b=n.props,x=n.type;if("svg"===x&&(r=!0),null!=i)for(c=0;c<i.length;c++)if((f=i[c])&&"setAttribute"in f==!!x&&(x?f.localName===x:3===f.nodeType)){e=f,i[c]=null;break}if(null==e){if(null===x)return document.createTextNode(b);e=r?document.createElementNS("http://www.w3.org/2000/svg",x):document.createElement(x,b.is&&b),i=null,a=!1}if(null===x)m===b||a&&e.data===b||(e.data=b);else{if(i=i&&s.call(e.childNodes),m=t.props||v,!a&&null!=i)for(m={},c=0;c<e.attributes.length;c++)m[(f=e.attributes[c]).name]=f.value;for(c in m)f=m[c],"children"==c||("dangerouslySetInnerHTML"==c?p=f:"key"===c||c in b||E(e,c,null,f,r));for(c in b)f=b[c],"children"==c?_=f:"dangerouslySetInnerHTML"==c?d=f:"value"==c?h=f:"checked"==c?g=f:"key"===c||a&&"function"!=typeof f||m[c]===f||E(e,c,f,m[c],r);if(d)a||p&&(d.__html===p.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),n.__k=[];else if(p&&(e.innerHTML=""),L(e,y(_)?_:[_],n,t,o,r&&"foreignObject"!==x,i,l,i?i[0]:t.__k&&q(t,0),a,u),null!=i)for(c=i.length;c--;)null!=i[c]&&C(i[c]);a||(c="value",void 0!==h&&(h!==e[c]||"progress"===x&&!h||"option"===x&&h!==m[c])&&E(e,c,h,m[c],!1),c="checked",void 0!==g&&g!==e[c]&&E(e,c,g,m[c],!1))}return e}function V(e,n,t){try{"function"==typeof e?e(n):e.current=n}catch(e){u.__e(e,t)}}function B(e,n,t){var o,r;if(u.unmount&&u.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||V(o,null,n)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){u.__e(e,n)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&B(o[r],n,t||"function"!=typeof e.type);t||null==e.__e||C(e.__e),e.__=e.__e=e.__d=void 0}function Q(e,n,t){return this.constructor(e,t)}function W(e,n,t){var o,r,i,l;u.__&&u.__(e,n),r=(o="function"==typeof t)?null:n.__k,i=[],l=[],D(n,e=(!o&&t||n).__k=x(w,null,[e]),r||v,v,void 0!==n.ownerSVGElement,!o&&t?[t]:r?null:n.firstChild?s.call(n.childNodes):null,i,!o&&t?t:r?r.__e:n.firstChild,o,l),N(i,e,l)}function j(e,n,t){var o,r,i,l,a=b({},e.props);for(i in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),n)"key"==i?o=n[i]:"ref"==i?r=n[i]:a[i]=void 0===n[i]&&void 0!==l?l[i]:n[i];return arguments.length>2&&(a.children=arguments.length>3?s.call(arguments,2):t),k(e.type,a,o||e.key,r||e.ref,null)}s=g.slice,u={__e:function(e,n,t,o){for(var r,i,l;n=n.__;)if((r=n.__c)&&!r.__)try{if((i=r.constructor)&&null!=i.getDerivedStateFromError&&(r.setState(i.getDerivedStateFromError(e)),l=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,o||{}),l=r.__d),l)return r.__E=r}catch(n){e=n}throw e}},c=0,S.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=b({},this.state),"function"==typeof e&&(e=e(b({},t),this.props)),e&&b(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),H(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),H(this))},S.prototype.render=w,d=[],_="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f=function(e,n){return e.__v.__b-n.__v.__b},P.__r=0,h=0;const U=o,O=l,R="seenSurvey_",z=e=>{const n={left:"left: 30px;",right:"right: 30px;",center:"\n left: 50%;\n transform: translateX(-50%);\n "};return`\n .survey-form, .thank-you-message {\n position: fixed;\n margin: 0px;\n bottom: 0px;\n color: black;\n font-weight: normal;\n font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n text-align: left;\n max-width: ${parseInt((null==e?void 0:e.maxWidth)||"300")}px;\n width: 100%;\n z-index: ${parseInt((null==e?void 0:e.zIndex)||"99999")};\n border: 1.5px solid ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n border-bottom: 0px;\n ${n[(null==e?void 0:e.position)||"right"]||"right: 30px;"}\n flex-direction: column;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n box-shadow: -6px 0 16px -8px rgb(0 0 0 / 8%), -9px 0 28px 0 rgb(0 0 0 / 5%), -12px 0 48px 16px rgb(0 0 0 / 3%);\n }\n \n .survey-box, .thank-you-message-container {\n padding: 20px 25px 10px;\n display: flex;\n flex-direction: column;\n border-radius: 10px;\n }\n\n .thank-you-message {\n text-align: center;\n }\n\n .form-submit[disabled] {\n opacity: 0.6;\n filter: grayscale(50%);\n cursor: not-allowed;\n }\n .survey-form textarea {\n color: #2d2d2d;\n font-size: 14px;\n font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n background: white;\n color: black;\n outline: none;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 10px;\n border-radius: 6px;\n border-color: ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n margin-top: 14px;\n width: 100%;\n box-sizing: border-box;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea {\n margin-top: 0;\n }\n .form-submit {\n box-sizing: border-box;\n margin: 0;\n font-family: inherit;\n overflow: visible;\n text-transform: none;\n position: relative;\n display: inline-block;\n font-weight: 700;\n white-space: nowrap;\n text-align: center;\n border: 1.5px solid transparent;\n cursor: pointer;\n user-select: none;\n touch-action: manipulation;\n padding: 12px;\n font-size: 14px;\n border-radius: 6px;\n outline: 0;\n background: ${(null==e?void 0:e.submitButtonColor)||"black"} !important;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);\n box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);\n width: 100%;\n }\n .form-cancel {\n display: flex;\n float: right;\n border: none;\n background: none;\n cursor: pointer;\n }\n .cancel-btn-wrapper {\n position: absolute;\n width: 35px;\n height: 35px;\n border-radius: 100%;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n background: white;\n border: 1.5px solid ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .bolded { font-weight: 600; }\n .buttons {\n display: flex;\n justify-content: center;\n }\n .footer-branding {\n font-size: 11px;\n margin-top: 10px;\n text-align: center;\n display: flex;\n justify-content: center;\n gap: 4px;\n align-items: center;\n font-weight: 500;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n text-decoration: none;\n backgroundColor: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n color: ${G((null==e?void 0:e.backgroundColor)||"#eeeded")};\n }\n .survey-question {\n font-weight: 500;\n font-size: 14px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n }\n .question-textarea-wrapper {\n display: flex;\n flex-direction: column;\n }\n .survey-question-description {\n font-size: 13px;\n padding-top: 5px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n }\n .ratings-number {\n font-size: 16px;\n font-weight: 600;\n padding: 8px 0px;\n border: none;\n }\n .ratings-number:hover {\n cursor: pointer;\n }\n .rating-options {\n margin-top: 14px;\n }\n .rating-options-number {\n display: grid;\n border-radius: 6px;\n overflow: hidden;\n border: 1.5px solid ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n }\n .rating-options-number > .ratings-number {\n border-right: 1px solid ${(null==e?void 0:e.borderColor)||"#c9c6c6"};\n }\n .rating-options-number > .ratings-number:last-of-type {\n border-right: 0px;\n }\n .rating-options-number .rating-active {\n background: ${(null==e?void 0:e.ratingButtonActiveColor)||"black"};\n }\n .rating-options-emoji {\n display: flex;\n justify-content: space-between;\n }\n .ratings-emoji {\n font-size: 16px;\n background-color: transparent;\n border: none;\n padding: 0px;\n }\n .ratings-emoji:hover {\n cursor: pointer;\n }\n .ratings-emoji.rating-active svg {\n fill: ${(null==e?void 0:e.ratingButtonActiveColor)||"black"};\n }\n .emoji-svg {\n fill: '#939393';\n }\n .rating-text {\n display: flex;\n flex-direction: row;\n font-size: 11px;\n justify-content: space-between;\n margin-top: 6px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n opacity: .60;\n }\n .multiple-choice-options {\n margin-top: 13px;\n font-size: 14px;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options {\n margin-top: 0;\n }\n .multiple-choice-options .choice-option {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n cursor: pointer;\n margin-bottom: 5px;\n position: relative;\n }\n .multiple-choice-options > .choice-option:last-of-type {\n margin-bottom: 0px;\n }\n .multiple-choice-options input {\n cursor: pointer;\n position: absolute;\n opacity: 0;\n }\n .choice-check {\n position: absolute;\n right: 10px;\n background: white;\n }\n .choice-check svg {\n display: none;\n }\n .multiple-choice-options .choice-option:hover .choice-check svg {\n display: inline-block;\n opacity: .25;\n }\n .multiple-choice-options input:checked + label + .choice-check svg {\n display: inline-block;\n opacity: 100% !important;\n }\n .multiple-choice-options input:checked + label {\n font-weight: bold;\n border: 1.5px solid rgba(0,0,0);\n }\n .multiple-choice-options input:checked + label input {\n font-weight: bold;\n }\n .multiple-choice-options label {\n width: 100%;\n cursor: pointer;\n padding: 10px;\n border: 1.5px solid rgba(0,0,0,.25);\n border-radius: 4px;\n background: white;\n }\n .multiple-choice-options .choice-option-open label {\n padding-right: 30px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n max-width: 100%;\n }\n .multiple-choice-options .choice-option-open label span {\n width: 100%;\n }\n .multiple-choice-options .choice-option-open input:disabled + label {\n opacity: 0.6;\n }\n .multiple-choice-options .choice-option-open label input {\n position: relative;\n opacity: 1;\n flex-grow: 1;\n border: 0;\n outline: 0;\n }\n .thank-you-message-body {\n margin-top: 6px;\n font-size: 14px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n }\n .thank-you-message-header {\n margin: 10px 0px 0px;\n background: ${(null==e?void 0:e.backgroundColor)||"#eeeded"};\n }\n .thank-you-message-container .form-submit {\n margin-top: 20px;\n margin-bottom: 10px;\n }\n .thank-you-message-countdown {\n margin-left: 6px;\n }\n .bottom-section {\n margin-top: 14px;\n }\n `};function Y(e){if("#"===e[0]){const n=e.replace(/^#/,"");return"rgb("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+")"}return"rgb(255, 255, 255)"}function G(){let e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J;"#"===n[0]&&(e=Y(n)),n.startsWith("rgb")&&(e=n);const t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[n.toLowerCase()];if(t&&(e=Y(t)),!e)return"black";const o=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(o){const e=parseInt(o[1]),n=parseInt(o[2]),t=parseInt(o[3]);return Math.sqrt(e*e*.299+n*n*.587+t*t*.114)>127.5?"black":"white"}return"black"}const X={backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:"right"},J="#eeeded",K=function(){var e;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;o&&(localStorage.setItem(ie(t),"true"),o.capture("survey sent",{$survey_name:t.name,$survey_id:t.id,$survey_iteration:t.current_iteration,$survey_iteration_start_date:t.current_iteration_start_date,$survey_questions:t.questions.map((e=>e.question)),sessionRecordingUrl:null===(e=o.get_session_replay_url)||void 0===e?void 0:e.call(o),...n,$set:{[le(t,"responded")]:!0}}),U.dispatchEvent(new Event("PHSurveySent")))},ee=(e,n,t)=>{var o;!t&&n&&(n.capture("survey dismissed",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(o=n.get_session_replay_url)||void 0===o?void 0:o.call(n),$set:{[le(e,"dismissed")]:!0}}),localStorage.setItem(ie(e),"true"),U.dispatchEvent(new Event("PHSurveyClosed")))},ne=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,n)=>e.sort-n.sort)).map((e=>e.value)),te=(e,n)=>e.length===n.length&&e.every(((e,t)=>e===n[t]))?n.reverse():n,oe=e=>(e.questions.forEach(((e,n)=>{e.originalQuestionIndex=n})),e.appearance&&e.appearance.shuffleQuestions?te(e.questions,ne(e.questions)):e.questions),re=e=>{var n,t;return!(null===(n=e.conditions)||void 0===n||null===(t=n.events)||void 0===t||!t.repeatedActivation||!(e=>{var n,t,o,r,i,l;return null!=(null===(n=e.conditions)||void 0===n||null===(t=n.events)||void 0===t||null===(o=t.values)||void 0===o?void 0:o.length)&&(null===(r=e.conditions)||void 0===r||null===(i=r.events)||void 0===i||null===(l=i.values)||void 0===l?void 0:l.length)>0})(e))},ie=e=>{let n=`${R}${e.id}`;return e.current_iteration&&e.current_iteration>0&&(n=`${R}${e.id}_${e.current_iteration}`),n},le=(e,n)=>{let t=`$survey_${n}/${e.id}`;return e.current_iteration&&e.current_iteration>0&&(t=`$survey_${n}/${e.id}/${e.current_iteration}`),t},ae=function(e,n){var t={__c:n="__cC"+h++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,o;return this.getChildContext||(t=[],(o={})[n]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some((function(e){e.__e=!0,H(e)}))},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t}({isPreviewMode:!1,previewPageIndex:0,handleCloseSurveyPopup:()=>{},isPopup:!0}),se=e=>{let{component:n,children:t,renderAsHtml:o,style:r}=e;return j(n,o?{dangerouslySetInnerHTML:{__html:t},style:r}:{children:t,style:r})},ue=l;var ce,de,pe,_e,fe=0,he=[],ve=[],ge=u.__b,me=u.__r,ye=u.diffed,be=u.__c,Ce=u.unmount;function xe(e,n){u.__h&&u.__h(de,e,fe||n),fe=0;var t=de.__H||(de.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({__V:ve}),t.__[e]}function ke(e){return fe=1,function(e,n,t){var o=xe(ce++,2);if(o.t=e,!o.__c&&(o.__=[Ee(void 0,n),function(e){var n=o.__N?o.__N[0]:o.__[0],t=o.t(n,e);n!==t&&(o.__N=[t,o.__[1]],o.__c.setState({}))}],o.__c=de,!de.u)){var r=function(e,n,t){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter((function(e){return e.__c}));if(r.every((function(e){return!e.__N})))return!i||i.call(this,e,n,t);var l=!1;return r.forEach((function(e){if(e.__N){var n=e.__[0];e.__=e.__N,e.__N=void 0,n!==e.__[0]&&(l=!0)}})),!(!l&&o.__c.props===e)&&(!i||i.call(this,e,n,t))};de.u=!0;var i=de.shouldComponentUpdate,l=de.componentWillUpdate;de.componentWillUpdate=function(e,n,t){if(this.__e){var o=i;i=void 0,r(e,n,t),i=o}l&&l.call(this,e,n,t)},de.shouldComponentUpdate=r}return o.__N||o.__}(Ee,e)}function we(e,n){var t=xe(ce++,3);!u.__s&&Ie(t.__H,n)&&(t.__=e,t.i=n,de.__H.__h.push(t))}function Se(e){return fe=5,qe((function(){return{current:e}}),[])}function qe(e,n){var t=xe(ce++,7);return Ie(t.__H,n)?(t.__V=e(),t.i=n,t.__h=e,t.__V):t.__}function Te(e){var n=de.context[e.__c],t=xe(ce++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(de)),n.props.value):e.__}function He(){for(var e;e=he.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach($e),e.__H.__h.forEach(Me),e.__H.__h=[]}catch(n){e.__H.__h=[],u.__e(n,e.__v)}}u.__b=function(e){de=null,ge&&ge(e)},u.__r=function(e){me&&me(e),ce=0;var n=(de=e.__c).__H;n&&(pe===de?(n.__h=[],de.__h=[],n.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=ve,e.__N=e.i=void 0}))):(n.__h.forEach($e),n.__h.forEach(Me),n.__h=[],ce=0)),pe=de},u.diffed=function(e){ye&&ye(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==he.push(n)&&_e===u.requestAnimationFrame||((_e=u.requestAnimationFrame)||Le)(He)),n.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==ve&&(e.__=e.__V),e.i=void 0,e.__V=ve}))),pe=de=null},u.__c=function(e,n){n.some((function(e){try{e.__h.forEach($e),e.__h=e.__h.filter((function(e){return!e.__||Me(e)}))}catch(t){n.some((function(e){e.__h&&(e.__h=[])})),n=[],u.__e(t,e.__v)}})),be&&be(e,n)},u.unmount=function(e){Ce&&Ce(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach((function(e){try{$e(e)}catch(e){n=e}})),t.__H=void 0,n&&u.__e(n,t.__v))};var Pe="function"==typeof requestAnimationFrame;function Le(e){var n,t=function(){clearTimeout(o),Pe&&cancelAnimationFrame(n),setTimeout(e)},o=setTimeout(t,100);Pe&&(n=requestAnimationFrame(t))}function $e(e){var n=de,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),de=n}function Me(e){var n=de;e.__c=e.__(),de=n}function Ie(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function Ee(e,n){return"function"==typeof n?n(e):n}const Fe="[PostHog.js]",Ze={_log:function(e){if(o&&a.POSTHOG_DEBUG&&!Be(o.console)&&o.console){const i="__rrweb_original__"in o.console[e]?o.console[e].__rrweb_original__:o.console[e];for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];i(Fe,...t)}},info:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];Ze._log("log",...n)},warn:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];Ze._log("warn",...n)},error:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];Ze._log("error",...n)},critical:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];console.error(Fe,...n)},uninitializedWarning:e=>{Ze.error(`You must initialize PostHog before calling ${e}`)}};let De;!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(De||(De={}));const Ne=Array.isArray,Ae=Object.prototype.toString,Ve=Ne||function(e){return"[object Array]"===Ae.call(e)},Be=e=>void 0===e,Qe=e=>null===e,We=e=>"[object Number]"==Ae.call(e);var je=0;function Ue(e,n,t,o,r,i){var l,a,s={};for(a in n)"ref"==a?l=n[a]:s[a]=n[a];var c={type:e,props:s,key:t,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--je,__i:-1,__u:0,__source:r,__self:i};if("function"==typeof e&&(l=e.defaultProps))for(a in l)void 0===s[a]&&(s[a]=l[a]);return u.vnode&&u.vnode(c),c}const Oe=Ue("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ue("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Re=Ue("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ue("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),ze=Ue("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ue("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Ye=Ue("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ue("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),Ge=Ue("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Ue("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Xe=Ue("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ue("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:"black"})}),Je=Ue("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ue("g",{"clip-path":"url(#clip0_2415_6911)",children:[Ue("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Ue("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Ue("g",{mask:"url(#mask0_2415_6911)",children:[Ue("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),Ue("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),Ue("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),Ue("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),Ue("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),Ue("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),Ue("defs",{children:Ue("clipPath",{id:"clip0_2415_6911",children:Ue("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]}),Ke=Ue("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ue("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});function en(){return Ue("a",{href:"https://posthog.com",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Je]})}function nn(e){let{text:n,submitDisabled:t,appearance:r,onSubmit:i,link:l}=e;const{isPreviewMode:a,isPopup:s}=Te(ae),u=r.submitButtonTextColor||G(r.submitButtonColor||X.submitButtonColor);return Ue("div",{className:"bottom-section",children:[Ue("div",{className:"buttons",children:Ue("button",{className:"form-submit",disabled:t&&!a,type:"button",style:s?{color:u}:{},onClick:()=>{a||(l&&(null==o||o.open(l)),i())},children:n})}),!r.whiteLabel&&Ue(en,{})]})}function tn(e){let{question:n,description:t,descriptionContentType:o,backgroundColor:r,forceDisableHtml:i}=e;const{isPopup:l}=Te(ae);return Ue("div",{style:l?{backgroundColor:r||X.backgroundColor}:{},children:[Ue("div",{className:"survey-question",children:n}),t&&se({component:x("div",{className:"survey-question-description"}),children:t,renderAsHtml:!i&&"text"!==o})]})}function on(e){let{onClick:n}=e;const{isPreviewMode:t}=Te(ae);return Ue("div",{className:"cancel-btn-wrapper",onClick:n,disabled:t,children:Ue("button",{className:"form-cancel",onClick:n,disabled:t,children:Xe})})}function rn(e){let{header:n,description:t,contentType:o,forceDisableHtml:r,appearance:i,onClose:l,styleOverrides:a}=e;const s=G(i.backgroundColor||X.backgroundColor),{isPopup:u}=Te(ae);return Ue(w,{children:Ue("div",{className:"thank-you-message",style:{...a},children:Ue("div",{className:"thank-you-message-container",children:[u&&Ue(on,{onClick:()=>l()}),Ue("h3",{className:"thank-you-message-header",style:{color:s},children:n}),t&&se({component:x("div",{className:"thank-you-message-body"}),children:t,renderAsHtml:!r&&"text"!==o,style:{color:s}}),u&&Ue(nn,{text:i.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:i,onSubmit:()=>l()})]})})})}function ln(e){var n;const t=Se(null),[o,r]=ke(null!==(n=e.defaultTextColor)&&void 0!==n?n:"black");return we((()=>{if(t.current){const e=function(e){const n=U.getComputedStyle(e).backgroundColor;if("rgba(0, 0, 0, 0)"===n)return"black";const t=n.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(!t)return"black";const o=parseInt(t[1]),r=parseInt(t[2]),i=parseInt(t[3]);return Math.sqrt(o*o*.299+r*r*.587+i*i*.114)>127.5?"black":"white"}(t.current);r(e)}}),[e.appearance,e.forceUpdate]),{ref:t,textColor:o}}function an(e){let{question:n,forceDisableHtml:t,appearance:o,onSubmit:r}=e;const i=Se(null),[l,a]=ke("");return Ue("div",{ref:i,children:[Ue(tn,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,backgroundColor:o.backgroundColor,forceDisableHtml:t}),Ue("textarea",{rows:4,placeholder:null==o?void 0:o.placeholder,onInput:e=>a(e.currentTarget.value)}),Ue(nn,{text:n.buttonText||"Submit",submitDisabled:!l&&!n.optional,appearance:o,onSubmit:()=>r(l)})]})}function sn(e){let{question:n,forceDisableHtml:t,appearance:o,onSubmit:r}=e;return Ue(w,{children:[Ue(tn,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t}),Ue(nn,{text:n.buttonText||"Submit",submitDisabled:!1,link:n.link,appearance:o,onSubmit:()=>r("link clicked")})]})}function un(e){let{question:n,forceDisableHtml:t,displayQuestionIndex:o,appearance:r,onSubmit:i}=e;const l=n.scale,a=10===n.scale?0:1,[s,u]=ke(null);return Ue(w,{children:[Ue(tn,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t,backgroundColor:r.backgroundColor}),Ue("div",{className:"rating-section",children:[Ue("div",{className:"rating-options",children:["emoji"===n.display&&Ue("div",{className:"rating-options-emoji",children:(3===n.scale?pn:_n).map(((e,n)=>{const t=n+1===s;return Ue("button",{className:`ratings-emoji question-${o}-rating-${n} ${t?"rating-active":null}`,value:n+1,type:"button",onClick:()=>{u(n+1)},style:{fill:t?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:e},n)}))}),"number"===n.display&&Ue("div",{className:"rating-options-number",style:{gridTemplateColumns:`repeat(${l-a+1}, minmax(0, 1fr))`},children:gn(n.scale).map(((e,n)=>Ue(cn,{displayQuestionIndex:o,active:s===e,appearance:r,num:e,setActiveNumber:e=>{u(e)}},n)))})]}),Ue("div",{className:"rating-text",children:[Ue("div",{children:n.lowerBoundLabel}),Ue("div",{children:n.upperBoundLabel})]})]}),Ue(nn,{text:n.buttonText||(null==r?void 0:r.submitButtonText)||"Submit",submitDisabled:Qe(s)&&!n.optional,appearance:r,onSubmit:()=>i(s)})]})}function cn(e){let{num:n,active:t,displayQuestionIndex:o,appearance:r,setActiveNumber:i}=e;const{textColor:l,ref:a}=ln({appearance:r,defaultTextColor:"black",forceUpdate:t});return Ue("button",{ref:a,className:`ratings-number question-${o}-rating-${n} ${t?"rating-active":null}`,type:"button",onClick:()=>{i(n)},style:{color:l,backgroundColor:t?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:n})}function dn(e){let{question:t,forceDisableHtml:o,displayQuestionIndex:r,appearance:i,onSubmit:l}=e;const a=Se(null),s=qe((()=>(e=>{if(!e.shuffleOptions)return e.choices;const n=e.choices;let t="";e.hasOpenChoice&&(t=n.pop());const o=te(n,ne(n));return e.hasOpenChoice&&(e.choices.push(t),o.push(t)),o})(t)),[t]),[u,c]=ke(t.type===n.MultipleChoice?[]:null),[d,p]=ke(!1),[_,f]=ke(""),h=t.type===n.SingleChoice?"radio":"checkbox";return Ue("div",{ref:a,children:[Ue(tn,{question:t.question,description:t.description,descriptionContentType:t.descriptionContentType,forceDisableHtml:o,backgroundColor:i.backgroundColor}),Ue("div",{className:"multiple-choice-options",children:s.map(((e,o)=>{let i="choice-option";const l=e,a=e;return t.hasOpenChoice&&o===t.choices.length-1&&(i+=" choice-option-open"),Ue("div",{className:i,children:[Ue("input",{type:h,id:`surveyQuestion${r}Choice${o}`,name:`question${r}`,value:l,disabled:!l,onInput:()=>t.hasOpenChoice&&o===t.choices.length-1?p(!d):t.type===n.SingleChoice?c(l):t.type===n.MultipleChoice&&Ve(u)?u.includes(l)?c(u.filter((e=>e!==l))):c([...u,l]):void 0}),Ue("label",{htmlFor:`surveyQuestion${r}Choice${o}`,style:{color:"black"},children:t.hasOpenChoice&&o===t.choices.length-1?Ue(w,{children:[Ue("span",{children:[a,":"]}),Ue("input",{type:"text",id:`surveyQuestion${r}Choice${o}Open`,name:`question${r}`,onInput:e=>{const o=e.currentTarget.value;return t.type===n.SingleChoice?c(o):t.type===n.MultipleChoice&&Ve(u)?f(o):void 0}})]}):a}),Ue("span",{className:"choice-check",style:{color:"black"},children:Ke})]})}))}),Ue(nn,{text:t.buttonText||"Submit",submitDisabled:(Qe(u)||Ve(u)&&!d&&0===u.length||Ve(u)&&d&&!_&&0===u.length&&!t.optional)&&!t.optional,appearance:i,onSubmit:()=>{d&&t.type===n.MultipleChoice?Ve(u)&&l([...u,_]):l(u)}})]})}const pn=[ze,Re,Oe],_n=[Ye,ze,Re,Oe,Ge],fn=[1,2,3,4,5],hn=[1,2,3,4,5,6,7],vn=[0,1,2,3,4,5,6,7,8,9,10];function gn(e){switch(e){case 5:default:return fn;case 7:return hn;case 10:return vn}}const mn=o,yn=l;class bn{constructor(e){this.posthog=e,this.surveyInFocus=null}canShowNextEventBasedSurvey=()=>{const e=yn.querySelectorAll("div[class^=PostHogSurvey]");var n;return!(e.length>0)||1===(null===(n=e[e.length-1].shadowRoot)||void 0===n?void 0:n.childElementCount)};handlePopoverSurvey=e=>{var n;const t=null===(n=e.conditions)||void 0===n?void 0:n.seenSurveyWaitPeriodInDays,o=localStorage.getItem("lastSeenSurveyDate");if(t&&o){const e=new Date,n=Math.abs(e.getTime()-new Date(o).getTime());if(Math.ceil(n/864e5)<t)return}const r=(e=>!!localStorage.getItem(ie(e))&&!re(e))(e);if(!r){this.addSurveyToFocus(e.id);const n=((e,n,t)=>{const o=O.createElement("div");o.className=`PostHogSurvey${n}`;const r=o.attachShadow({mode:"open"});if(e){const n=Object.assign(O.createElement("style"),{innerText:e});r.appendChild(n)}return O.body.appendChild(o),r})(z(null==e?void 0:e.appearance),e.id);W(Ue(kn,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!0},"popover-survey"),n)}};handleWidget=e=>{const n=function(e){var n;const t=ue.createElement("div");t.className=`PostHogWidget${e.id}`;const o=t.attachShadow({mode:"open"}),r=`\n .ph-survey-widget-tab {\n position: fixed;\n top: 50%;\n right: 0;\n background: ${(null===(n=e.appearance)||void 0===n?void 0:n.widgetColor)||"#e0a045"};\n color: white;\n transform: rotate(-90deg) translate(0, -100%);\n transform-origin: right top;\n min-width: 40px;\n padding: 8px 12px;\n font-weight: 500;\n border-radius: 3px 3px 0 0;\n text-align: center;\n cursor: pointer;\n z-index: 9999999;\n }\n .ph-survey-widget-tab:hover {\n padding-bottom: 13px;\n }\n .ph-survey-widget-button {\n position: fixed;\n }\n `;return o.append(Object.assign(ue.createElement("style"),{innerText:r})),ue.body.appendChild(t),o}(e),t=z(e.appearance);n.appendChild(Object.assign(yn.createElement("style"),{innerText:t})),W(Ue(Sn,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus},"feedback-survey"),n)};handleWidgetSelector=e=>{var n;const t=(null===(n=e.appearance)||void 0===n?void 0:n.widgetSelector)&&yn.querySelector(e.appearance.widgetSelector);if(t)if(0===yn.querySelectorAll(`.PostHogWidget${e.id}`).length)this.handleWidget(e);else if(1===yn.querySelectorAll(`.PostHogWidget${e.id}`).length&&!t.getAttribute("PHWidgetSurveyClickListener")){var o,r;const n=null===(o=yn.querySelector(`.PostHogWidget${e.id}`))||void 0===o||null===(r=o.shadowRoot)||void 0===r?void 0:r.querySelector(".survey-form");t.addEventListener("click",(()=>{n&&(n.style.display="none"===n.style.display?"block":"none",n.addEventListener("PHSurveyClosed",(()=>{this.removeSurveyFromFocus(e.id),n.style.display="none"})))})),t.setAttribute("PHWidgetSurveyClickListener","true")}};sortSurveysByAppearanceDelay(e){return e.sort(((e,n)=>{var t,o;return((null===(t=e.appearance)||void 0===t?void 0:t.surveyPopupDelaySeconds)||0)-((null===(o=n.appearance)||void 0===o?void 0:o.surveyPopupDelaySeconds)||0)}))}canRenderSurvey=n=>{const t={visible:!1};if(n.end_date)return t.disabledReason=`survey was completed on ${n.end_date}`,t;if(n.type!=e.Popover)return t.disabledReason="Only Popover survey types can be rendered",t;if(!(!n.linked_flag_key||this.posthog.featureFlags.isFeatureEnabled(n.linked_flag_key)))return t.disabledReason=`linked feature flag ${n.linked_flag_key} is false`,t;if(!(!n.targeting_flag_key||this.posthog.featureFlags.isFeatureEnabled(n.targeting_flag_key)))return t.disabledReason=`targeting feature flag ${n.targeting_flag_key} is false`,t;return!n.internal_targeting_flag_key||this.posthog.featureFlags.isFeatureEnabled(n.internal_targeting_flag_key)?(t.visible=!0,t):(t.disabledReason=`internal targeting feature flag ${n.internal_targeting_flag_key} is false`,t)};renderSurvey=(e,n)=>{W(Ue(kn,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!1},"popover-survey"),n)};callSurveysAndEvaluateDisplayLogic=(()=>{var n=this;return function(){var t;let o=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(t=n.posthog)||void 0===t||t.getActiveMatchingSurveys((t=>{const o=t.filter((e=>"api"!==e.type));n.sortSurveysByAppearanceDelay(o).forEach((t=>{if(Qe(n.surveyInFocus)){var o,r,i;if(t.type===e.Widget)"tab"===(null===(o=t.appearance)||void 0===o?void 0:o.widgetType)&&0===yn.querySelectorAll(`.PostHogWidget${t.id}`).length&&n.handleWidget(t),"selector"===(null===(r=t.appearance)||void 0===r?void 0:r.widgetType)&&null!==(i=t.appearance)&&void 0!==i&&i.widgetSelector&&n.handleWidgetSelector(t);t.type===e.Popover&&n.canShowNextEventBasedSurvey()&&n.handlePopoverSurvey(t)}}))}),o)}})();addSurveyToFocus=e=>{Qe(this.surveyInFocus)||Ze.error(`Survey ${[...this.surveyInFocus]} already in focus. Cannot add survey ${e}.`),this.surveyInFocus=e};removeSurveyFromFocus=e=>{this.surveyInFocus!==e&&Ze.error(`Survey ${e} is not in focus. Cannot remove survey ${e}.`),this.surveyInFocus=null};getTestAPI(){return{addSurveyToFocus:this.addSurveyToFocus,removeSurveyFromFocus:this.removeSurveyFromFocus,surveyInFocus:this.surveyInFocus,canShowNextEventBasedSurvey:this.canShowNextEventBasedSurvey,handleWidget:this.handleWidget,handlePopoverSurvey:this.handlePopoverSurvey,handleWidgetSelector:this.handleWidgetSelector,sortSurveysByAppearanceDelay:this.sortSurveysByAppearanceDelay}}}function Cn(e){if(!yn||!mn)return;const n=new bn(e);return n.callSurveysAndEvaluateDisplayLogic(!0),setInterval((()=>{n.callSurveysAndEvaluateDisplayLogic(!1)}),1e3),n}function xn(e,n,t,o,r){const[i,l]=ke(o||0===t),[a,s]=ke(!1);return we((()=>{if(o||!n)return;const i=()=>{r(e.id),l(!1)},a=()=>{var n,t;null!==(n=e.appearance)&&void 0!==n&&n.displayThankYouMessage?(s(!0),r(e.id),null!==(t=e.appearance)&&void 0!==t&&t.autoDisappear&&setTimeout((()=>{l(!1)}),5e3)):(r(e.id),l(!1))},u=()=>{var t;l(!0),mn.dispatchEvent(new Event("PHSurveyShown")),n.capture("survey shown",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(t=n.get_session_replay_url)||void 0===t?void 0:t.call(n)}),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())};return mn.addEventListener("PHSurveyClosed",i),mn.addEventListener("PHSurveySent",a),t>0?(()=>{const e=setTimeout((()=>{u()}),t);return()=>{clearTimeout(e),mn.removeEventListener("PHSurveyClosed",i),mn.removeEventListener("PHSurveySent",a)}})():(u(),()=>{mn.removeEventListener("PHSurveyClosed",i),mn.removeEventListener("PHSurveySent",a)})}),[]),{isPopupVisible:i,isSurveySent:a,setIsPopupVisible:l}}function kn(e){var n,t,o,r,i,l;let{survey:a,forceDisableHtml:s,posthog:u,style:c,previewPageIndex:d,removeSurveyFromFocus:p,isPopup:_}=e;const f=Number.isInteger(d),h=null!==(n=a.appearance)&&void 0!==n&&n.surveyPopupDelaySeconds?1e3*a.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:v,isSurveySent:g,setIsPopupVisible:m}=xn(a,u,h,f,p),y=g||d===a.questions.length,b=null!==(t=c)&&void 0!==t&&t.left&&We(null===(o=c)||void 0===o?void 0:o.left)?{left:c.left-40}:{};return f&&(c=c||{},c.left="unset",c.right="unset",c.transform="unset"),v?Ue(ae.Provider,{value:{isPreviewMode:f,previewPageIndex:d,handleCloseSurveyPopup:()=>ee(a,u,f),isPopup:_||!1},children:y?Ue(rn,{header:(null===(r=a.appearance)||void 0===r?void 0:r.thankYouMessageHeader)||"Thank you!",description:(null===(i=a.appearance)||void 0===i?void 0:i.thankYouMessageDescription)||"",forceDisableHtml:!!s,contentType:null===(l=a.appearance)||void 0===l?void 0:l.thankYouMessageDescriptionContentType,appearance:a.appearance||X,styleOverrides:{...c,...b},onClose:()=>m(!1)}):Ue(wn,{survey:a,forceDisableHtml:!!s,posthog:u,styleOverrides:c})}):Ue(w,{})}function wn(e){var n,o;let{survey:r,forceDisableHtml:i,posthog:l,styleOverrides:a}=e;const s=G((null===(n=r.appearance)||void 0===n?void 0:n.backgroundColor)||X.backgroundColor),[u,c]=ke({}),{isPreviewMode:d,previewPageIndex:p,handleCloseSurveyPopup:_,isPopup:f}=Te(ae),[h,v]=ke(p||0),g=qe((()=>oe(r)),[r]);we((()=>{v(null!=p?p:0)}),[p]);return Ue("form",{className:"survey-form",style:f?{color:s,borderColor:null===(o=r.appearance)||void 0===o?void 0:o.borderColor,...a}:{},children:g.map(((e,n)=>{var o;const{originalQuestionIndex:a}=e;return(d?h===a:h===n)&&Ue("div",{className:"survey-box",style:f?{backgroundColor:(null===(o=r.appearance)||void 0===o?void 0:o.backgroundColor)||X.backgroundColor}:{},children:[f&&Ue(on,{onClick:()=>_()}),qn({question:e,forceDisableHtml:i,displayQuestionIndex:n,appearance:r.appearance||X,onSubmit:e=>(e=>{let{res:n,originalQuestionIndex:o,displayQuestionIndex:i}=e;if(!l)return;const a=0===o?"$survey_response":`$survey_response_${o}`;if(c({...u,[a]:n}),!l.getNextSurveyStep)return void(i===r.questions.length-1?K({...u,[a]:n},r,l):v(i+1));const s=l.getNextSurveyStep(r,i,n);s===t.End?K({...u,[a]:n},r,l):v(s)})({res:e,originalQuestionIndex:a,displayQuestionIndex:n})})]})}))})}function Sn(e){var n,t;let{survey:o,forceDisableHtml:r,posthog:i,readOnly:l,removeSurveyFromFocus:a}=e;const[s,u]=ke(!1),[c,d]=ke({}),p=Se(null);return we((()=>{var e,n;if(!l&&i){if("tab"===(null===(e=o.appearance)||void 0===e?void 0:e.widgetType)&&p.current){var t;const e=p.current.getBoundingClientRect(),n={top:"50%",left:parseInt(""+(e.right-360)),bottom:"auto",borderRadius:10,borderBottom:`1.5px solid ${(null===(t=o.appearance)||void 0===t?void 0:t.borderColor)||"#c9c6c6"}`};d(n)}if("selector"===(null===(n=o.appearance)||void 0===n?void 0:n.widgetType)){const e=yn.querySelector(o.appearance.widgetSelector||"");null==e||e.addEventListener("click",(()=>{u(!s)})),null==e||e.setAttribute("PHWidgetSurveyClickListener","true")}}}),[]),Ue(w,{children:["tab"===(null===(n=o.appearance)||void 0===n?void 0:n.widgetType)&&Ue("div",{className:"ph-survey-widget-tab",ref:p,onClick:()=>!l&&u(!s),style:{color:G(o.appearance.widgetColor)},children:[Ue("div",{className:"ph-survey-widget-tab-icon"}),(null===(t=o.appearance)||void 0===t?void 0:t.widgetLabel)||""]}),s&&Ue(kn,{posthog:i,survey:o,forceDisableHtml:r,style:c,removeSurveyFromFocus:a,isPopup:!0},"feedback-widget-survey")]})}const qn=e=>{let{question:t,forceDisableHtml:o,displayQuestionIndex:r,appearance:i,onSubmit:l}=e;const a={[n.Open]:an,[n.Link]:sn,[n.Rating]:un,[n.SingleChoice]:dn,[n.MultipleChoice]:dn},s={question:t,forceDisableHtml:o,appearance:i,onSubmit:l},u={[n.Open]:{},[n.Link]:{},[n.Rating]:{displayQuestionIndex:r},[n.SingleChoice]:{displayQuestionIndex:r},[n.MultipleChoice]:{displayQuestionIndex:r}};return Ue(a[t.type],{...{...s,...u[t.type]}})};a.__PosthogExtensions__=a.__PosthogExtensions__||{},a.__PosthogExtensions__.canActivateRepeatedly=re,a.__PosthogExtensions__.generateSurveys=Cn,a.extendPostHogWithSurveys=Cn}(); | ||
!function(){"use strict";function e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function n(n){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?e(Object(r),!0).forEach((function(e){t(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var o,r,i;!function(e){e.Popover="popover",e.API="api",e.Widget="widget"}(o||(o={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(r||(r={})),function(e){e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question"}(i||(i={}));var l="undefined"!=typeof window?window:void 0,a="undefined"!=typeof globalThis?globalThis:l,s=null==a?void 0:a.navigator,c=null==a?void 0:a.document;null==a||a.location,null==a||a.fetch,null!=a&&a.XMLHttpRequest&&"withCredentials"in new a.XMLHttpRequest&&a.XMLHttpRequest,null==a||a.AbortController,null==s||s.userAgent;var u,d,p,_,f,v,h,g,y=null!=l?l:{},m={},b=[],C=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,x=Array.isArray;function k(e,n){for(var t in n)e[t]=n[t];return e}function w(e){var n=e.parentNode;n&&n.removeChild(e)}function S(e,n,t){var o,r,i,l={};for(i in n)"key"==i?o=n[i]:"ref"==i?r=n[i]:l[i]=n[i];if(arguments.length>2&&(l.children=arguments.length>3?u.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===l[i]&&(l[i]=e.defaultProps[i]);return q(e,l,o,r,null)}function q(e,n,t,o,r){var i={type:e,props:n,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++p:r,__i:-1,__u:0};return null==r&&null!=d.vnode&&d.vnode(i),i}function T(e){return e.children}function H(e,n){this.props=e,this.context=n}function P(e,n){if(null==n)return e.__?P(e.__,e.__i+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?P(e):null}function L(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return L(e)}}function M(e){(!e.__d&&(e.__d=!0)&&_.push(e)&&!I.__r++||f!==d.debounceRendering)&&((f=d.debounceRendering)||v)(I)}function I(){var e,n,t,o,r,i,l,a,s;for(_.sort(h);e=_.shift();)e.__d&&(n=_.length,o=void 0,i=(r=(t=e).__v).__e,a=[],s=[],(l=t.__P)&&((o=k({},r)).__v=r.__v+1,d.vnode&&d.vnode(o),B(l,o,r,t.__n,void 0!==l.ownerSVGElement,32&r.__u?[i]:null,a,null==i?P(r):i,!!(32&r.__u),s),o.__.__k[o.__i]=o,O(a,o,s),o.__e!=i&&L(o)),_.length>n&&_.sort(h));I.__r=0}function E(e,n,t,o,r,i,l,a,s,c,u){var d,p,_,f,v,h=o&&o.__k||b,g=n.length;for(t.__d=s,function(e,n,t){var o,r,i,l,a,s=n.length,c=t.length,u=c,d=0;for(e.__k=[],o=0;o<s;o++)null!=(r=e.__k[o]=null==(r=n[o])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?q(null,r,null,null,r):x(r)?q(T,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?q(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=e,r.__b=e.__b+1,a=F(r,t,l=o+d,u),r.__i=a,i=null,-1!==a&&(u--,(i=t[a])&&(i.__u|=131072)),null==i||null===i.__v?(-1==a&&d--,"function"!=typeof r.type&&(r.__u|=65536)):a!==l&&(a===l+1?d++:a>l?u>s-l?d+=a-l:d--:d=a<l&&a==l-1?a-l:0,a!==o+d&&(r.__u|=65536))):(i=t[o])&&null==i.key&&i.__e&&(i.__e==e.__d&&(e.__d=P(i)),W(i,i,!1),t[o]=null,u--);if(u)for(o=0;o<c;o++)null!=(i=t[o])&&0==(131072&i.__u)&&(i.__e==e.__d&&(e.__d=P(i)),W(i,i))}(t,n,h),s=t.__d,d=0;d<g;d++)null!=(_=t.__k[d])&&"boolean"!=typeof _&&"function"!=typeof _&&(p=-1===_.__i?m:h[_.__i]||m,_.__i=d,B(e,_,p,r,i,l,a,s,c,u),f=_.__e,_.ref&&p.ref!=_.ref&&(p.ref&&j(p.ref,null,_),u.push(_.ref,_.__c||f,_)),null==v&&null!=f&&(v=f),65536&_.__u||p.__k===_.__k?s=D(_,s,e):"function"==typeof _.type&&void 0!==_.__d?s=_.__d:f&&(s=f.nextSibling),_.__d=void 0,_.__u&=-196609);t.__d=s,t.__e=v}function D(e,n,t){var o,r;if("function"==typeof e.type){for(o=e.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=e,n=D(o[r],n,t));return n}return e.__e!=n&&(t.insertBefore(e.__e,n||null),n=e.__e),n&&n.nextSibling}function F(e,n,t,o){var r=e.key,i=e.type,l=t-1,a=t+1,s=n[t];if(null===s||s&&r==s.key&&i===s.type)return t;if(o>(null!=s&&0==(131072&s.__u)?1:0))for(;l>=0||a<n.length;){if(l>=0){if((s=n[l])&&0==(131072&s.__u)&&r==s.key&&i===s.type)return l;l--}if(a<n.length){if((s=n[a])&&0==(131072&s.__u)&&r==s.key&&i===s.type)return a;a++}}return-1}function Z(e,n,t){"-"===n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||C.test(n)?t:t+"px"}function N(e,n,t,o,r){var i;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof o&&(e.style.cssText=o=""),o)for(n in o)t&&n in t||Z(e.style,n,"");if(t)for(n in t)o&&t[n]===o[n]||Z(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])i=n!==(n=n.replace(/(PointerCapture)$|Capture$/,"$1")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+i]=t,t?o?t.u=o.u:(t.u=Date.now(),e.addEventListener(n,i?V:A,i)):e.removeEventListener(n,i?V:A,i);else{if(r)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==n&&"height"!==n&&"href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&"rowSpan"!==n&&"colSpan"!==n&&"role"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!==n[4]?e.removeAttribute(n):e.setAttribute(n,t))}}function A(e){var n=this.l[e.type+!1];if(e.t){if(e.t<=n.u)return}else e.t=Date.now();return n(d.event?d.event(e):e)}function V(e){return this.l[e.type+!0](d.event?d.event(e):e)}function B(e,n,t,o,r,i,l,a,s,c){var u,p,_,f,v,h,g,y,m,b,C,w,S,q,P,L=n.type;if(void 0!==n.constructor)return null;128&t.__u&&(s=!!(32&t.__u),i=[a=n.__e=t.__e]),(u=d.__b)&&u(n);e:if("function"==typeof L)try{if(y=n.props,m=(u=L.contextType)&&o[u.__c],b=u?m?m.props.value:u.__:o,t.__c?g=(p=n.__c=t.__c).__=p.__E:("prototype"in L&&L.prototype.render?n.__c=p=new L(y,b):(n.__c=p=new H(y,b),p.constructor=L,p.render=U),m&&m.sub(p),p.props=y,p.state||(p.state={}),p.context=b,p.__n=o,_=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=L.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=k({},p.__s)),k(p.__s,L.getDerivedStateFromProps(y,p.__s))),f=p.props,v=p.state,p.__v=n,_)null==L.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==L.getDerivedStateFromProps&&y!==f&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(y,b),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(y,p.__s,b)||n.__v===t.__v)){for(n.__v!==t.__v&&(p.props=y,p.state=p.__s,p.__d=!1),n.__e=t.__e,n.__k=t.__k,n.__k.forEach((function(e){e&&(e.__=n)})),C=0;C<p._sb.length;C++)p.__h.push(p._sb[C]);p._sb=[],p.__h.length&&l.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(y,p.__s,b),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(f,v,h)}))}if(p.context=b,p.props=y,p.__P=e,p.__e=!1,w=d.__r,S=0,"prototype"in L&&L.prototype.render){for(p.state=p.__s,p.__d=!1,w&&w(n),u=p.render(p.props,p.state,p.context),q=0;q<p._sb.length;q++)p.__h.push(p._sb[q]);p._sb=[]}else do{p.__d=!1,w&&w(n),u=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++S<25);p.state=p.__s,null!=p.getChildContext&&(o=k(k({},o),p.getChildContext())),_||null==p.getSnapshotBeforeUpdate||(h=p.getSnapshotBeforeUpdate(f,v)),E(e,x(P=null!=u&&u.type===T&&null==u.key?u.props.children:u)?P:[P],n,t,o,r,i,l,a,s,c),p.base=n.__e,n.__u&=-161,p.__h.length&&l.push(p),g&&(p.__E=p.__=null)}catch(e){n.__v=null,s||null!=i?(n.__e=a,n.__u|=s?160:32,i[i.indexOf(a)]=null):(n.__e=t.__e,n.__k=t.__k),d.__e(e,n,t)}else null==i&&n.__v===t.__v?(n.__k=t.__k,n.__e=t.__e):n.__e=Q(t.__e,n,t,o,r,i,l,s,c);(u=d.diffed)&&u(n)}function O(e,n,t){n.__d=void 0;for(var o=0;o<t.length;o++)j(t[o],t[++o],t[++o]);d.__c&&d.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){d.__e(e,n.__v)}}))}function Q(e,n,t,o,r,i,l,a,s){var c,d,p,_,f,v,h,g=t.props,y=n.props,b=n.type;if("svg"===b&&(r=!0),null!=i)for(c=0;c<i.length;c++)if((f=i[c])&&"setAttribute"in f==!!b&&(b?f.localName===b:3===f.nodeType)){e=f,i[c]=null;break}if(null==e){if(null===b)return document.createTextNode(y);e=r?document.createElementNS("http://www.w3.org/2000/svg",b):document.createElement(b,y.is&&y),i=null,a=!1}if(null===b)g===y||a&&e.data===y||(e.data=y);else{if(i=i&&u.call(e.childNodes),g=t.props||m,!a&&null!=i)for(g={},c=0;c<e.attributes.length;c++)g[(f=e.attributes[c]).name]=f.value;for(c in g)f=g[c],"children"==c||("dangerouslySetInnerHTML"==c?p=f:"key"===c||c in y||N(e,c,null,f,r));for(c in y)f=y[c],"children"==c?_=f:"dangerouslySetInnerHTML"==c?d=f:"value"==c?v=f:"checked"==c?h=f:"key"===c||a&&"function"!=typeof f||g[c]===f||N(e,c,f,g[c],r);if(d)a||p&&(d.__html===p.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),n.__k=[];else if(p&&(e.innerHTML=""),E(e,x(_)?_:[_],n,t,o,r&&"foreignObject"!==b,i,l,i?i[0]:t.__k&&P(t,0),a,s),null!=i)for(c=i.length;c--;)null!=i[c]&&w(i[c]);a||(c="value",void 0!==v&&(v!==e[c]||"progress"===b&&!v||"option"===b&&v!==g[c])&&N(e,c,v,g[c],!1),c="checked",void 0!==h&&h!==e[c]&&N(e,c,h,g[c],!1))}return e}function j(e,n,t){try{"function"==typeof e?e(n):e.current=n}catch(e){d.__e(e,t)}}function W(e,n,t){var o,r;if(d.unmount&&d.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||j(o,null,n)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){d.__e(e,n)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(r=0;r<o.length;r++)o[r]&&W(o[r],n,t||"function"!=typeof e.type);t||null==e.__e||w(e.__e),e.__=e.__e=e.__d=void 0}function U(e,n,t){return this.constructor(e,t)}function R(e,n,t){var o,r,i,l;d.__&&d.__(e,n),r=(o="function"==typeof t)?null:n.__k,i=[],l=[],B(n,e=(!o&&t||n).__k=S(T,null,[e]),r||m,m,void 0!==n.ownerSVGElement,!o&&t?[t]:r?null:n.firstChild?u.call(n.childNodes):null,i,!o&&t?t:r?r.__e:n.firstChild,o,l),O(i,e,l)}function $(e,n,t){var o,r,i,l,a=k({},e.props);for(i in e.type&&e.type.defaultProps&&(l=e.type.defaultProps),n)"key"==i?o=n[i]:"ref"==i?r=n[i]:a[i]=void 0===n[i]&&void 0!==l?l[i]:n[i];return arguments.length>2&&(a.children=arguments.length>3?u.call(arguments,2):t),q(e.type,a,o||e.key,r||e.ref,null)}u=b.slice,d={__e:function(e,n,t,o){for(var r,i,l;n=n.__;)if((r=n.__c)&&!r.__)try{if((i=r.constructor)&&null!=i.getDerivedStateFromError&&(r.setState(i.getDerivedStateFromError(e)),l=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,o||{}),l=r.__d),l)return r.__E=r}catch(n){e=n}throw e}},p=0,H.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=k({},this.state),"function"==typeof e&&(e=e(k({},t),this.props)),e&&k(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),M(this))},H.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),M(this))},H.prototype.render=T,_=[],v="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,h=function(e,n){return e.__v.__b-n.__v.__b},I.__r=0,g=0;var z=l,Y=c,G="seenSurvey_",X=e=>'\n .survey-form, .thank-you-message {\n position: fixed;\n margin: 0px;\n bottom: 0px;\n color: black;\n font-weight: normal;\n font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n text-align: left;\n max-width: '.concat(parseInt((null==e?void 0:e.maxWidth)||"300"),"px;\n width: 100%;\n z-index: ").concat(parseInt((null==e?void 0:e.zIndex)||"99999"),";\n border: 1.5px solid ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n border-bottom: 0px;\n ").concat({left:"left: 30px;",right:"right: 30px;",center:"\n left: 50%;\n transform: translateX(-50%);\n "}[(null==e?void 0:e.position)||"right"]||"right: 30px;","\n flex-direction: column;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",';\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n box-shadow: -6px 0 16px -8px rgb(0 0 0 / 8%), -9px 0 28px 0 rgb(0 0 0 / 5%), -12px 0 48px 16px rgb(0 0 0 / 3%);\n }\n \n .survey-box, .thank-you-message-container {\n padding: 20px 25px 10px;\n display: flex;\n flex-direction: column;\n border-radius: 10px;\n }\n\n .thank-you-message {\n text-align: center;\n }\n\n .form-submit[disabled] {\n opacity: 0.6;\n filter: grayscale(50%);\n cursor: not-allowed;\n }\n .survey-form textarea {\n color: #2d2d2d;\n font-size: 14px;\n font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n background: white;\n color: black;\n outline: none;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 10px;\n border-radius: 6px;\n border-color: ').concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n margin-top: 14px;\n width: 100%;\n box-sizing: border-box;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea {\n margin-top: 0;\n }\n .form-submit {\n box-sizing: border-box;\n margin: 0;\n font-family: inherit;\n overflow: visible;\n text-transform: none;\n position: relative;\n display: inline-block;\n font-weight: 700;\n white-space: nowrap;\n text-align: center;\n border: 1.5px solid transparent;\n cursor: pointer;\n user-select: none;\n touch-action: manipulation;\n padding: 12px;\n font-size: 14px;\n border-radius: 6px;\n outline: 0;\n background: ").concat((null==e?void 0:e.submitButtonColor)||"black"," !important;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);\n box-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);\n width: 100%;\n }\n .form-cancel {\n display: flex;\n float: right;\n border: none;\n background: none;\n cursor: pointer;\n }\n .cancel-btn-wrapper {\n position: absolute;\n width: 35px;\n height: 35px;\n border-radius: 100%;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n background: white;\n border: 1.5px solid ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .bolded { font-weight: 600; }\n .buttons {\n display: flex;\n justify-content: center;\n }\n .footer-branding {\n font-size: 11px;\n margin-top: 10px;\n text-align: center;\n display: flex;\n justify-content: center;\n gap: 4px;\n align-items: center;\n font-weight: 500;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n text-decoration: none;\n backgroundColor: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n color: ").concat(K((null==e?void 0:e.backgroundColor)||"#eeeded"),";\n }\n .survey-question {\n font-weight: 500;\n font-size: 14px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n }\n .question-textarea-wrapper {\n display: flex;\n flex-direction: column;\n }\n .survey-question-description {\n font-size: 13px;\n padding-top: 5px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n }\n .ratings-number {\n font-size: 16px;\n font-weight: 600;\n padding: 8px 0px;\n border: none;\n }\n .ratings-number:hover {\n cursor: pointer;\n }\n .rating-options {\n margin-top: 14px;\n }\n .rating-options-number {\n display: grid;\n border-radius: 6px;\n overflow: hidden;\n border: 1.5px solid ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n }\n .rating-options-number > .ratings-number {\n border-right: 1px solid ").concat((null==e?void 0:e.borderColor)||"#c9c6c6",";\n }\n .rating-options-number > .ratings-number:last-of-type {\n border-right: 0px;\n }\n .rating-options-number .rating-active {\n background: ").concat((null==e?void 0:e.ratingButtonActiveColor)||"black",";\n }\n .rating-options-emoji {\n display: flex;\n justify-content: space-between;\n }\n .ratings-emoji {\n font-size: 16px;\n background-color: transparent;\n border: none;\n padding: 0px;\n }\n .ratings-emoji:hover {\n cursor: pointer;\n }\n .ratings-emoji.rating-active svg {\n fill: ").concat((null==e?void 0:e.ratingButtonActiveColor)||"black",";\n }\n .emoji-svg {\n fill: '#939393';\n }\n .rating-text {\n display: flex;\n flex-direction: row;\n font-size: 11px;\n justify-content: space-between;\n margin-top: 6px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n opacity: .60;\n }\n .multiple-choice-options {\n margin-top: 13px;\n font-size: 14px;\n }\n .survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options {\n margin-top: 0;\n }\n .multiple-choice-options .choice-option {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 13px;\n cursor: pointer;\n margin-bottom: 5px;\n position: relative;\n }\n .multiple-choice-options > .choice-option:last-of-type {\n margin-bottom: 0px;\n }\n .multiple-choice-options input {\n cursor: pointer;\n position: absolute;\n opacity: 0;\n }\n .choice-check {\n position: absolute;\n right: 10px;\n background: white;\n }\n .choice-check svg {\n display: none;\n }\n .multiple-choice-options .choice-option:hover .choice-check svg {\n display: inline-block;\n opacity: .25;\n }\n .multiple-choice-options input:checked + label + .choice-check svg {\n display: inline-block;\n opacity: 100% !important;\n }\n .multiple-choice-options input:checked + label {\n font-weight: bold;\n border: 1.5px solid rgba(0,0,0);\n }\n .multiple-choice-options input:checked + label input {\n font-weight: bold;\n }\n .multiple-choice-options label {\n width: 100%;\n cursor: pointer;\n padding: 10px;\n border: 1.5px solid rgba(0,0,0,.25);\n border-radius: 4px;\n background: white;\n }\n .multiple-choice-options .choice-option-open label {\n padding-right: 30px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n max-width: 100%;\n }\n .multiple-choice-options .choice-option-open label span {\n width: 100%;\n }\n .multiple-choice-options .choice-option-open input:disabled + label {\n opacity: 0.6;\n }\n .multiple-choice-options .choice-option-open label input {\n position: relative;\n opacity: 1;\n flex-grow: 1;\n border: 0;\n outline: 0;\n }\n .thank-you-message-body {\n margin-top: 6px;\n font-size: 14px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n }\n .thank-you-message-header {\n margin: 10px 0px 0px;\n background: ").concat((null==e?void 0:e.backgroundColor)||"#eeeded",";\n }\n .thank-you-message-container .form-submit {\n margin-top: 20px;\n margin-bottom: 10px;\n }\n .thank-you-message-countdown {\n margin-left: 6px;\n }\n .bottom-section {\n margin-top: 14px;\n }\n ");function J(e){if("#"===e[0]){var n=e.replace(/^#/,"");return"rgb("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+")"}return"rgb(255, 255, 255)"}function K(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ne;"#"===n[0]&&(e=J(n)),n.startsWith("rgb")&&(e=n);var t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[n.toLowerCase()];if(t&&(e=J(t)),!e)return"black";var o=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(o){var r=parseInt(o[1]),i=parseInt(o[2]),l=parseInt(o[3]);return Math.sqrt(r*r*.299+i*i*.587+l*l*.114)>127.5?"black":"white"}return"black"}var ee={backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:"right"},ne="#eeeded",te=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;r&&(localStorage.setItem(se(o),"true"),r.capture("survey sent",n(n({$survey_name:o.name,$survey_id:o.id,$survey_iteration:o.current_iteration,$survey_iteration_start_date:o.current_iteration_start_date,$survey_questions:o.questions.map((e=>e.question)),sessionRecordingUrl:null===(e=r.get_session_replay_url)||void 0===e?void 0:e.call(r)},t),{},{$set:{[ce(o,"responded")]:!0}})),z.dispatchEvent(new Event("PHSurveySent")))},oe=(e,n,t)=>{var o;!t&&n&&(n.capture("survey dismissed",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(o=n.get_session_replay_url)||void 0===o?void 0:o.call(n),$set:{[ce(e,"dismissed")]:!0}}),localStorage.setItem(se(e),"true"),z.dispatchEvent(new Event("PHSurveyClosed")))},re=e=>e.map((e=>({sort:Math.floor(10*Math.random()),value:e}))).sort(((e,n)=>e.sort-n.sort)).map((e=>e.value)),ie=(e,n)=>e.length===n.length&&e.every(((e,t)=>e===n[t]))?n.reverse():n,le=e=>(e.questions.forEach(((e,n)=>{e.originalQuestionIndex=n})),e.appearance&&e.appearance.shuffleQuestions?ie(e.questions,re(e.questions)):e.questions),ae=e=>{var n,t;return!(null===(n=e.conditions)||void 0===n||null===(t=n.events)||void 0===t||!t.repeatedActivation||!(e=>{var n,t,o,r,i,l;return null!=(null===(n=e.conditions)||void 0===n||null===(t=n.events)||void 0===t||null===(o=t.values)||void 0===o?void 0:o.length)&&(null===(r=e.conditions)||void 0===r||null===(i=r.events)||void 0===i||null===(l=i.values)||void 0===l?void 0:l.length)>0})(e))},se=e=>{var n="".concat(G).concat(e.id);return e.current_iteration&&e.current_iteration>0&&(n="".concat(G).concat(e.id,"_").concat(e.current_iteration)),n},ce=(e,n)=>{var t="$survey_".concat(n,"/").concat(e.id);return e.current_iteration&&e.current_iteration>0&&(t="$survey_".concat(n,"/").concat(e.id,"/").concat(e.current_iteration)),t},ue=function(e,n){var t={__c:n="__cC"+g++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,o;return this.getChildContext||(t=[],(o={})[n]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some((function(e){e.__e=!0,M(e)}))},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t}({isPreviewMode:!1,previewPageIndex:0,handleCloseSurveyPopup:()=>{},isPopup:!0}),de=e=>{var{component:n,children:t,renderAsHtml:o,style:r}=e;return $(n,o?{dangerouslySetInnerHTML:{__html:t},style:r}:{children:t,style:r})},pe=c;var _e,fe,ve,he,ge=0,ye=[],me=[],be=d.__b,Ce=d.__r,xe=d.diffed,ke=d.__c,we=d.unmount;function Se(e,n){d.__h&&d.__h(fe,e,ge||n),ge=0;var t=fe.__H||(fe.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({__V:me}),t.__[e]}function qe(e){return ge=1,function(e,n,t){var o=Se(_e++,2);if(o.t=e,!o.__c&&(o.__=[Ne(void 0,n),function(e){var n=o.__N?o.__N[0]:o.__[0],t=o.t(n,e);n!==t&&(o.__N=[t,o.__[1]],o.__c.setState({}))}],o.__c=fe,!fe.u)){var r=function(e,n,t){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter((function(e){return e.__c}));if(r.every((function(e){return!e.__N})))return!i||i.call(this,e,n,t);var l=!1;return r.forEach((function(e){if(e.__N){var n=e.__[0];e.__=e.__N,e.__N=void 0,n!==e.__[0]&&(l=!0)}})),!(!l&&o.__c.props===e)&&(!i||i.call(this,e,n,t))};fe.u=!0;var i=fe.shouldComponentUpdate,l=fe.componentWillUpdate;fe.componentWillUpdate=function(e,n,t){if(this.__e){var o=i;i=void 0,r(e,n,t),i=o}l&&l.call(this,e,n,t)},fe.shouldComponentUpdate=r}return o.__N||o.__}(Ne,e)}function Te(e,n){var t=Se(_e++,3);!d.__s&&Ze(t.__H,n)&&(t.__=e,t.i=n,fe.__H.__h.push(t))}function He(e){return ge=5,Pe((function(){return{current:e}}),[])}function Pe(e,n){var t=Se(_e++,7);return Ze(t.__H,n)?(t.__V=e(),t.i=n,t.__h=e,t.__V):t.__}function Le(e){var n=fe.context[e.__c],t=Se(_e++,9);return t.c=e,n?(null==t.__&&(t.__=!0,n.sub(fe)),n.props.value):e.__}function Me(){for(var e;e=ye.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(De),e.__H.__h.forEach(Fe),e.__H.__h=[]}catch(n){e.__H.__h=[],d.__e(n,e.__v)}}d.__b=function(e){fe=null,be&&be(e)},d.__r=function(e){Ce&&Ce(e),_e=0;var n=(fe=e.__c).__H;n&&(ve===fe?(n.__h=[],fe.__h=[],n.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=me,e.__N=e.i=void 0}))):(n.__h.forEach(De),n.__h.forEach(Fe),n.__h=[],_e=0)),ve=fe},d.diffed=function(e){xe&&xe(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==ye.push(n)&&he===d.requestAnimationFrame||((he=d.requestAnimationFrame)||Ee)(Me)),n.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==me&&(e.__=e.__V),e.i=void 0,e.__V=me}))),ve=fe=null},d.__c=function(e,n){n.some((function(e){try{e.__h.forEach(De),e.__h=e.__h.filter((function(e){return!e.__||Fe(e)}))}catch(t){n.some((function(e){e.__h&&(e.__h=[])})),n=[],d.__e(t,e.__v)}})),ke&&ke(e,n)},d.unmount=function(e){we&&we(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach((function(e){try{De(e)}catch(e){n=e}})),t.__H=void 0,n&&d.__e(n,t.__v))};var Ie="function"==typeof requestAnimationFrame;function Ee(e){var n,t=function(){clearTimeout(o),Ie&&cancelAnimationFrame(n),setTimeout(e)},o=setTimeout(t,100);Ie&&(n=requestAnimationFrame(t))}function De(e){var n=fe,t=e.__c;"function"==typeof t&&(e.__c=void 0,t()),fe=n}function Fe(e){var n=fe;e.__c=e.__(),fe=n}function Ze(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function Ne(e,n){return"function"==typeof n?n(e):n}var Ae,Ve="[PostHog.js]",Be={_log:function(e){if(l&&y.POSTHOG_DEBUG&&!We(l.console)&&l.console){for(var n=("__rrweb_original__"in l.console[e]?l.console[e].__rrweb_original__:l.console[e]),t=arguments.length,o=new Array(t>1?t-1:0),r=1;r<t;r++)o[r-1]=arguments[r];n(Ve,...o)}},info:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];Be._log("log",...n)},warn:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];Be._log("warn",...n)},error:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];Be._log("error",...n)},critical:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];console.error(Ve,...n)},uninitializedWarning:e=>{Be.error("You must initialize PostHog before calling ".concat(e))}};!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(Ae||(Ae={}));var Oe=Array.isArray,Qe=Object.prototype.toString,je=Oe||function(e){return"[object Array]"===Qe.call(e)},We=e=>void 0===e,Ue=e=>null===e,Re=e=>"[object Number]"==Qe.call(e),$e=0;function ze(e,n,t,o,r,i){var l,a,s={};for(a in n)"ref"==a?l=n[a]:s[a]=n[a];var c={type:e,props:s,key:t,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--$e,__i:-1,__u:0,__source:r,__self:i};if("function"==typeof e&&(l=e.defaultProps))for(a in l)void 0===s[a]&&(s[a]=l[a]);return d.vnode&&d.vnode(c),c}var Ye=ze("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:ze("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Ge=ze("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:ze("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Xe=ze("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:ze("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Je=ze("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:ze("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),Ke=ze("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:ze("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),en=ze("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ze("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:"black"})}),nn=ze("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[ze("g",{"clip-path":"url(#clip0_2415_6911)",children:[ze("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:ze("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),ze("g",{mask:"url(#mask0_2415_6911)",children:[ze("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),ze("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),ze("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),ze("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),ze("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),ze("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),ze("defs",{children:ze("clipPath",{id:"clip0_2415_6911",children:ze("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]}),tn=ze("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ze("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});function on(){return ze("a",{href:"https://posthog.com",target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",nn]})}function rn(e){var{text:n,submitDisabled:t,appearance:o,onSubmit:r,link:i}=e,{isPreviewMode:a,isPopup:s}=Le(ue),c=o.submitButtonTextColor||K(o.submitButtonColor||ee.submitButtonColor);return ze("div",{className:"bottom-section",children:[ze("div",{className:"buttons",children:ze("button",{className:"form-submit",disabled:t&&!a,type:"button",style:s?{color:c}:{},onClick:()=>{a||(i&&(null==l||l.open(i)),r())},children:n})}),!o.whiteLabel&&ze(on,{})]})}function ln(e){var{question:n,description:t,descriptionContentType:o,backgroundColor:r,forceDisableHtml:i}=e,{isPopup:l}=Le(ue);return ze("div",{style:l?{backgroundColor:r||ee.backgroundColor}:{},children:[ze("div",{className:"survey-question",children:n}),t&&de({component:S("div",{className:"survey-question-description"}),children:t,renderAsHtml:!i&&"text"!==o})]})}function an(e){var{onClick:n}=e,{isPreviewMode:t}=Le(ue);return ze("div",{className:"cancel-btn-wrapper",onClick:n,disabled:t,children:ze("button",{className:"form-cancel",onClick:n,disabled:t,children:en})})}function sn(e){var{header:t,description:o,contentType:r,forceDisableHtml:i,appearance:l,onClose:a,styleOverrides:s}=e,c=K(l.backgroundColor||ee.backgroundColor),{isPopup:u}=Le(ue);return ze(T,{children:ze("div",{className:"thank-you-message",style:n({},s),children:ze("div",{className:"thank-you-message-container",children:[u&&ze(an,{onClick:()=>a()}),ze("h3",{className:"thank-you-message-header",style:{color:c},children:t}),o&&de({component:S("div",{className:"thank-you-message-body"}),children:o,renderAsHtml:!i&&"text"!==r,style:{color:c}}),u&&ze(rn,{text:l.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:l,onSubmit:()=>a()})]})})})}function cn(e){var n,t=He(null),[o,r]=qe(null!==(n=e.defaultTextColor)&&void 0!==n?n:"black");return Te((()=>{if(t.current){var e=function(e){var n=z.getComputedStyle(e).backgroundColor;if("rgba(0, 0, 0, 0)"===n)return"black";var t=n.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(!t)return"black";var o=parseInt(t[1]),r=parseInt(t[2]),i=parseInt(t[3]);return Math.sqrt(o*o*.299+r*r*.587+i*i*.114)>127.5?"black":"white"}(t.current);r(e)}}),[e.appearance,e.forceUpdate]),{ref:t,textColor:o}}function un(e){var{question:n,forceDisableHtml:t,appearance:o,onSubmit:r}=e,i=He(null),[l,a]=qe("");return ze("div",{ref:i,children:[ze(ln,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,backgroundColor:o.backgroundColor,forceDisableHtml:t}),ze("textarea",{rows:4,placeholder:null==o?void 0:o.placeholder,onInput:e=>a(e.currentTarget.value)}),ze(rn,{text:n.buttonText||"Submit",submitDisabled:!l&&!n.optional,appearance:o,onSubmit:()=>r(l)})]})}function dn(e){var{question:n,forceDisableHtml:t,appearance:o,onSubmit:r}=e;return ze(T,{children:[ze(ln,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t}),ze(rn,{text:n.buttonText||"Submit",submitDisabled:!1,link:n.link,appearance:o,onSubmit:()=>r("link clicked")})]})}function pn(e){var{question:n,forceDisableHtml:t,displayQuestionIndex:o,appearance:r,onSubmit:i}=e,l=n.scale,a=10===n.scale?0:1,[s,c]=qe(null);return ze(T,{children:[ze(ln,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t,backgroundColor:r.backgroundColor}),ze("div",{className:"rating-section",children:[ze("div",{className:"rating-options",children:["emoji"===n.display&&ze("div",{className:"rating-options-emoji",children:(3===n.scale?vn:hn).map(((e,n)=>{var t=n+1===s;return ze("button",{className:"ratings-emoji question-".concat(o,"-rating-").concat(n," ").concat(t?"rating-active":null),value:n+1,type:"button",onClick:()=>{c(n+1)},style:{fill:t?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:e},n)}))}),"number"===n.display&&ze("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat(".concat(l-a+1,", minmax(0, 1fr))")},children:bn(n.scale).map(((e,n)=>ze(_n,{displayQuestionIndex:o,active:s===e,appearance:r,num:e,setActiveNumber:e=>{c(e)}},n)))})]}),ze("div",{className:"rating-text",children:[ze("div",{children:n.lowerBoundLabel}),ze("div",{children:n.upperBoundLabel})]})]}),ze(rn,{text:n.buttonText||(null==r?void 0:r.submitButtonText)||"Submit",submitDisabled:Ue(s)&&!n.optional,appearance:r,onSubmit:()=>i(s)})]})}function _n(e){var{num:n,active:t,displayQuestionIndex:o,appearance:r,setActiveNumber:i}=e,{textColor:l,ref:a}=cn({appearance:r,defaultTextColor:"black",forceUpdate:t});return ze("button",{ref:a,className:"ratings-number question-".concat(o,"-rating-").concat(n," ").concat(t?"rating-active":null),type:"button",onClick:()=>{i(n)},style:{color:l,backgroundColor:t?r.ratingButtonActiveColor:r.ratingButtonColor,borderColor:r.borderColor},children:n})}function fn(e){var{question:n,forceDisableHtml:t,displayQuestionIndex:o,appearance:i,onSubmit:l}=e,a=He(null),s=Pe((()=>(e=>{if(!e.shuffleOptions)return e.choices;var n=e.choices,t="";e.hasOpenChoice&&(t=n.pop());var o=ie(n,re(n));return e.hasOpenChoice&&(e.choices.push(t),o.push(t)),o})(n)),[n]),[c,u]=qe(n.type===r.MultipleChoice?[]:null),[d,p]=qe(!1),[_,f]=qe(""),v=n.type===r.SingleChoice?"radio":"checkbox";return ze("div",{ref:a,children:[ze(ln,{question:n.question,description:n.description,descriptionContentType:n.descriptionContentType,forceDisableHtml:t,backgroundColor:i.backgroundColor}),ze("div",{className:"multiple-choice-options",children:s.map(((e,t)=>{var i="choice-option",l=e,a=e;return n.hasOpenChoice&&t===n.choices.length-1&&(i+=" choice-option-open"),ze("div",{className:i,children:[ze("input",{type:v,id:"surveyQuestion".concat(o,"Choice").concat(t),name:"question".concat(o),value:l,disabled:!l,onInput:()=>n.hasOpenChoice&&t===n.choices.length-1?p(!d):n.type===r.SingleChoice?u(l):n.type===r.MultipleChoice&&je(c)?c.includes(l)?u(c.filter((e=>e!==l))):u([...c,l]):void 0}),ze("label",{htmlFor:"surveyQuestion".concat(o,"Choice").concat(t),style:{color:"black"},children:n.hasOpenChoice&&t===n.choices.length-1?ze(T,{children:[ze("span",{children:[a,":"]}),ze("input",{type:"text",id:"surveyQuestion".concat(o,"Choice").concat(t,"Open"),name:"question".concat(o),onInput:e=>{var t=e.currentTarget.value;return n.type===r.SingleChoice?u(t):n.type===r.MultipleChoice&&je(c)?f(t):void 0}})]}):a}),ze("span",{className:"choice-check",style:{color:"black"},children:tn})]})}))}),ze(rn,{text:n.buttonText||"Submit",submitDisabled:(Ue(c)||je(c)&&!d&&0===c.length||je(c)&&d&&!_&&0===c.length&&!n.optional)&&!n.optional,appearance:i,onSubmit:()=>{d&&n.type===r.MultipleChoice?je(c)&&l([...c,_]):l(c)}})]})}var vn=[Xe,Ge,Ye],hn=[Je,Xe,Ge,Ye,Ke],gn=[1,2,3,4,5],yn=[1,2,3,4,5,6,7],mn=[0,1,2,3,4,5,6,7,8,9,10];function bn(e){switch(e){case 5:default:return gn;case 7:return yn;case 10:return mn}}var Cn=l,xn=c;class kn{constructor(e){var n=this;t(this,"canShowNextEventBasedSurvey",(()=>{var e,n=xn.querySelectorAll("div[class^=PostHogSurvey]");return!(n.length>0)||1===(null===(e=n[n.length-1].shadowRoot)||void 0===e?void 0:e.childElementCount)})),t(this,"handlePopoverSurvey",(e=>{var n,t=null===(n=e.conditions)||void 0===n?void 0:n.seenSurveyWaitPeriodInDays,o=localStorage.getItem("lastSeenSurveyDate");if(t&&o){var r=new Date,i=Math.abs(r.getTime()-new Date(o).getTime());if(Math.ceil(i/864e5)<t)return}var l=(e=>!!localStorage.getItem(se(e))&&!ae(e))(e);if(!l){this.addSurveyToFocus(e.id);var a=((e,n,t)=>{var o=Y.createElement("div");o.className="PostHogSurvey".concat(n);var r=o.attachShadow({mode:"open"});if(e){var i=Object.assign(Y.createElement("style"),{innerText:e});r.appendChild(i)}return Y.body.appendChild(o),r})(X(null==e?void 0:e.appearance),e.id);R(ze(Sn,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!0},"popover-survey"),a)}})),t(this,"handleWidget",(e=>{var n=function(e){var n,t=pe.createElement("div");t.className="PostHogWidget".concat(e.id);var o,r=t.attachShadow({mode:"open"}),i=(o=null===(n=e.appearance)||void 0===n?void 0:n.widgetColor,"\n .ph-survey-widget-tab {\n position: fixed;\n top: 50%;\n right: 0;\n background: ".concat(o||"#e0a045",";\n color: white;\n transform: rotate(-90deg) translate(0, -100%);\n transform-origin: right top;\n min-width: 40px;\n padding: 8px 12px;\n font-weight: 500;\n border-radius: 3px 3px 0 0;\n text-align: center;\n cursor: pointer;\n z-index: 9999999;\n }\n .ph-survey-widget-tab:hover {\n padding-bottom: 13px;\n }\n .ph-survey-widget-button {\n position: fixed;\n }\n "));return r.append(Object.assign(pe.createElement("style"),{innerText:i})),pe.body.appendChild(t),r}(e),t=X(e.appearance);n.appendChild(Object.assign(xn.createElement("style"),{innerText:t})),R(ze(Tn,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus},"feedback-survey"),n)})),t(this,"handleWidgetSelector",(e=>{var n,t=(null===(n=e.appearance)||void 0===n?void 0:n.widgetSelector)&&xn.querySelector(e.appearance.widgetSelector);if(t)if(0===xn.querySelectorAll(".PostHogWidget".concat(e.id)).length)this.handleWidget(e);else if(1===xn.querySelectorAll(".PostHogWidget".concat(e.id)).length&&!t.getAttribute("PHWidgetSurveyClickListener")){var o,r,i=null===(o=xn.querySelector(".PostHogWidget".concat(e.id)))||void 0===o||null===(r=o.shadowRoot)||void 0===r?void 0:r.querySelector(".survey-form");t.addEventListener("click",(()=>{i&&(i.style.display="none"===i.style.display?"block":"none",i.addEventListener("PHSurveyClosed",(()=>{this.removeSurveyFromFocus(e.id),i.style.display="none"})))})),t.setAttribute("PHWidgetSurveyClickListener","true")}})),t(this,"canRenderSurvey",(e=>{var n={visible:!1};return e.end_date?(n.disabledReason="survey was completed on ".concat(e.end_date),n):e.type!=o.Popover?(n.disabledReason="Only Popover survey types can be rendered",n):!e.linked_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.linked_flag_key)?!e.targeting_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.targeting_flag_key)?!e.internal_targeting_flag_key||this.posthog.featureFlags.isFeatureEnabled(e.internal_targeting_flag_key)?(n.visible=!0,n):(n.disabledReason="internal targeting feature flag ".concat(e.internal_targeting_flag_key," is false"),n):(n.disabledReason="targeting feature flag ".concat(e.targeting_flag_key," is false"),n):(n.disabledReason="linked feature flag ".concat(e.linked_flag_key," is false"),n)})),t(this,"renderSurvey",((e,n)=>{R(ze(Sn,{posthog:this.posthog,survey:e,removeSurveyFromFocus:this.removeSurveyFromFocus,isPopup:!1},"popover-survey"),n)})),t(this,"callSurveysAndEvaluateDisplayLogic",(function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(e=n.posthog)||void 0===e||e.getActiveMatchingSurveys((e=>{var t=e.filter((e=>"api"!==e.type));n.sortSurveysByAppearanceDelay(t).forEach((e=>{if(Ue(n.surveyInFocus)){var t,r,i;if(e.type===o.Widget)"tab"===(null===(t=e.appearance)||void 0===t?void 0:t.widgetType)&&0===xn.querySelectorAll(".PostHogWidget".concat(e.id)).length&&n.handleWidget(e),"selector"===(null===(r=e.appearance)||void 0===r?void 0:r.widgetType)&&null!==(i=e.appearance)&&void 0!==i&&i.widgetSelector&&n.handleWidgetSelector(e);e.type===o.Popover&&n.canShowNextEventBasedSurvey()&&n.handlePopoverSurvey(e)}}))}),t)})),t(this,"addSurveyToFocus",(e=>{Ue(this.surveyInFocus)||Be.error("Survey ".concat([...this.surveyInFocus]," already in focus. Cannot add survey ").concat(e,".")),this.surveyInFocus=e})),t(this,"removeSurveyFromFocus",(e=>{this.surveyInFocus!==e&&Be.error("Survey ".concat(e," is not in focus. Cannot remove survey ").concat(e,".")),this.surveyInFocus=null})),this.posthog=e,this.surveyInFocus=null}sortSurveysByAppearanceDelay(e){return e.sort(((e,n)=>{var t,o;return((null===(t=e.appearance)||void 0===t?void 0:t.surveyPopupDelaySeconds)||0)-((null===(o=n.appearance)||void 0===o?void 0:o.surveyPopupDelaySeconds)||0)}))}getTestAPI(){return{addSurveyToFocus:this.addSurveyToFocus,removeSurveyFromFocus:this.removeSurveyFromFocus,surveyInFocus:this.surveyInFocus,canShowNextEventBasedSurvey:this.canShowNextEventBasedSurvey,handleWidget:this.handleWidget,handlePopoverSurvey:this.handlePopoverSurvey,handleWidgetSelector:this.handleWidgetSelector,sortSurveysByAppearanceDelay:this.sortSurveysByAppearanceDelay}}}function wn(e){if(xn&&Cn){var n=new kn(e);return n.callSurveysAndEvaluateDisplayLogic(!0),setInterval((()=>{n.callSurveysAndEvaluateDisplayLogic(!1)}),1e3),n}}function Sn(e){var t,o,r,i,l,a,{survey:s,forceDisableHtml:c,posthog:u,style:d,previewPageIndex:p,removeSurveyFromFocus:_,isPopup:f}=e,v=Number.isInteger(p),h=null!==(t=s.appearance)&&void 0!==t&&t.surveyPopupDelaySeconds?1e3*s.appearance.surveyPopupDelaySeconds:0,{isPopupVisible:g,isSurveySent:y,setIsPopupVisible:m}=function(e,n,t,o,r){var[i,l]=qe(o||0===t),[a,s]=qe(!1);return Te((()=>{if(!o&&n){var i,a=()=>{r(e.id),l(!1)},c=()=>{var n,t;null!==(n=e.appearance)&&void 0!==n&&n.displayThankYouMessage?(s(!0),r(e.id),null!==(t=e.appearance)&&void 0!==t&&t.autoDisappear&&setTimeout((()=>{l(!1)}),5e3)):(r(e.id),l(!1))},u=()=>{var t;l(!0),Cn.dispatchEvent(new Event("PHSurveyShown")),n.capture("survey shown",{$survey_name:e.name,$survey_id:e.id,$survey_iteration:e.current_iteration,$survey_iteration_start_date:e.current_iteration_start_date,sessionRecordingUrl:null===(t=n.get_session_replay_url)||void 0===t?void 0:t.call(n)}),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString())};return Cn.addEventListener("PHSurveyClosed",a),Cn.addEventListener("PHSurveySent",c),t>0?(i=setTimeout((()=>{u()}),t),()=>{clearTimeout(i),Cn.removeEventListener("PHSurveyClosed",a),Cn.removeEventListener("PHSurveySent",c)}):(u(),()=>{Cn.removeEventListener("PHSurveyClosed",a),Cn.removeEventListener("PHSurveySent",c)})}}),[]),{isPopupVisible:i,isSurveySent:a,setIsPopupVisible:l}}(s,u,h,v,_),b=y||p===s.questions.length,C=null!==(o=d)&&void 0!==o&&o.left&&Re(null===(r=d)||void 0===r?void 0:r.left)?{left:d.left-40}:{};return v&&((d=d||{}).left="unset",d.right="unset",d.transform="unset"),g?ze(ue.Provider,{value:{isPreviewMode:v,previewPageIndex:p,handleCloseSurveyPopup:()=>oe(s,u,v),isPopup:f||!1},children:b?ze(sn,{header:(null===(i=s.appearance)||void 0===i?void 0:i.thankYouMessageHeader)||"Thank you!",description:(null===(l=s.appearance)||void 0===l?void 0:l.thankYouMessageDescription)||"",forceDisableHtml:!!c,contentType:null===(a=s.appearance)||void 0===a?void 0:a.thankYouMessageDescriptionContentType,appearance:s.appearance||ee,styleOverrides:n(n({},d),C),onClose:()=>m(!1)}):ze(qn,{survey:s,forceDisableHtml:!!c,posthog:u,styleOverrides:d})}):ze(T,{})}function qn(e){var t,o,{survey:r,forceDisableHtml:l,posthog:a,styleOverrides:s}=e,c=K((null===(t=r.appearance)||void 0===t?void 0:t.backgroundColor)||ee.backgroundColor),[u,d]=qe({}),{isPreviewMode:p,previewPageIndex:_,handleCloseSurveyPopup:f,isPopup:v}=Le(ue),[h,g]=qe(_||0),y=Pe((()=>le(r)),[r]);Te((()=>{g(null!=_?_:0)}),[_]);return ze("form",{className:"survey-form",style:v?n({color:c,borderColor:null===(o=r.appearance)||void 0===o?void 0:o.borderColor},s):{},children:y.map(((e,t)=>{var o,{originalQuestionIndex:s}=e;return(p?h===s:h===t)&&ze("div",{className:"survey-box",style:v?{backgroundColor:(null===(o=r.appearance)||void 0===o?void 0:o.backgroundColor)||ee.backgroundColor}:{},children:[v&&ze(an,{onClick:()=>f()}),Hn({question:e,forceDisableHtml:l,displayQuestionIndex:t,appearance:r.appearance||ee,onSubmit:e=>(e=>{var{res:t,originalQuestionIndex:o,displayQuestionIndex:l}=e;if(a){var s=0===o?"$survey_response":"$survey_response_".concat(o);if(d(n(n({},u),{},{[s]:t})),a.getNextSurveyStep){var c=a.getNextSurveyStep(r,l,t);c===i.End?te(n(n({},u),{},{[s]:t}),r,a):g(c)}else l===r.questions.length-1?te(n(n({},u),{},{[s]:t}),r,a):g(l+1)}})({res:e,originalQuestionIndex:s,displayQuestionIndex:t})})]})}))})}function Tn(e){var n,t,{survey:o,forceDisableHtml:r,posthog:i,readOnly:l,removeSurveyFromFocus:a}=e,[s,c]=qe(!1),[u,d]=qe({}),p=He(null);return Te((()=>{var e,n;if(!l&&i){if("tab"===(null===(e=o.appearance)||void 0===e?void 0:e.widgetType)&&p.current){var t,r=p.current.getBoundingClientRect(),a={top:"50%",left:parseInt("".concat(r.right-360)),bottom:"auto",borderRadius:10,borderBottom:"1.5px solid ".concat((null===(t=o.appearance)||void 0===t?void 0:t.borderColor)||"#c9c6c6")};d(a)}if("selector"===(null===(n=o.appearance)||void 0===n?void 0:n.widgetType)){var u=xn.querySelector(o.appearance.widgetSelector||"");null==u||u.addEventListener("click",(()=>{c(!s)})),null==u||u.setAttribute("PHWidgetSurveyClickListener","true")}}}),[]),ze(T,{children:["tab"===(null===(n=o.appearance)||void 0===n?void 0:n.widgetType)&&ze("div",{className:"ph-survey-widget-tab",ref:p,onClick:()=>!l&&c(!s),style:{color:K(o.appearance.widgetColor)},children:[ze("div",{className:"ph-survey-widget-tab-icon"}),(null===(t=o.appearance)||void 0===t?void 0:t.widgetLabel)||""]}),s&&ze(Sn,{posthog:i,survey:o,forceDisableHtml:r,style:u,removeSurveyFromFocus:a,isPopup:!0},"feedback-widget-survey")]})}var Hn=e=>{var{question:t,forceDisableHtml:o,displayQuestionIndex:i,appearance:l,onSubmit:a}=e,s={[r.Open]:un,[r.Link]:dn,[r.Rating]:pn,[r.SingleChoice]:fn,[r.MultipleChoice]:fn},c={question:t,forceDisableHtml:o,appearance:l,onSubmit:a},u={[r.Open]:{},[r.Link]:{},[r.Rating]:{displayQuestionIndex:i},[r.SingleChoice]:{displayQuestionIndex:i},[r.MultipleChoice]:{displayQuestionIndex:i}},d=s[t.type],p=n(n({},c),u[t.type]);return ze(d,n({},p))};y.__PosthogExtensions__=y.__PosthogExtensions__||{},y.__PosthogExtensions__.canActivateRepeatedly=ae,y.__PosthogExtensions__.generateSurveys=wn,y.extendPostHogWithSurveys=wn}(); | ||
//# sourceMappingURL=surveys.js.map |
@@ -1,2 +0,2 @@ | ||
!function(){"use strict";const t="undefined"!=typeof window?window:void 0,e="undefined"!=typeof globalThis?globalThis:t,n=null==e?void 0:e.navigator;null==e||e.document,null==e||e.location,null==e||e.fetch,null!=e&&e.XMLHttpRequest&&"withCredentials"in new e.XMLHttpRequest&&e.XMLHttpRequest,null==e||e.AbortController,null==n||n.userAgent;const o=null!=t?t:{};let s;!function(t){t.GZipJS="gzip-js",t.Base64="base64"}(s||(s={}));function i(t,e,n){try{if(!(e in t))return()=>{};const o=t[e],s=n(o);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__posthog_wrapped__:{enumerable:!1,value:!0}})),t[e]=s,()=>{t[e]=o}}catch{return()=>{}}}const l=(t,e)=>{const{sessionId:n,windowId:o}=t.checkAndGetSessionAndWindowId(!0);e.headers.set("X-POSTHOG-SESSION-ID",n),e.headers.set("X-POSTHOG-WINDOW-ID",o)};o.__PosthogExtensions__=o.__PosthogExtensions__||{};const c={_patchFetch:e=>i(t,"fetch",(t=>async function(n,o){const s=new Request(n,o);return l(e,s),t(s)})),_patchXHR:e=>i(t.XMLHttpRequest.prototype,"open",(t=>function(n,o){let s=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0,c=arguments.length>4?arguments[4]:void 0;const u=new Request(o);return l(e,u),t.call(this,n,u.url,s,i,c)}))};o.__PosthogExtensions__.tracingHeadersPatchFns=c,o.postHogTracingHeadersPatchFns=c}(); | ||
!function(){"use strict";function t(t,e,n,o,r,i,s){try{var u=t[i](s),a=u.value}catch(t){return void n(t)}u.done?e(a):Promise.resolve(a).then(o,r)}var e="undefined"!=typeof window?window:void 0,n="undefined"!=typeof globalThis?globalThis:e,o=null==n?void 0:n.navigator;null==n||n.document,null==n||n.location,null==n||n.fetch,null!=n&&n.XMLHttpRequest&&"withCredentials"in new n.XMLHttpRequest&&n.XMLHttpRequest,null==n||n.AbortController,null==o||o.userAgent;var r,i=null!=e?e:{};!function(t){t.GZipJS="gzip-js",t.Base64="base64"}(r||(r={}));function s(t,e,n){try{if(!(e in t))return()=>{};var o=t[e],r=n(o);return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__posthog_wrapped__:{enumerable:!1,value:!0}})),t[e]=r,()=>{t[e]=o}}catch(t){return()=>{}}}var u=(t,e)=>{var{sessionId:n,windowId:o}=t.checkAndGetSessionAndWindowId(!0);e.headers.set("X-POSTHOG-SESSION-ID",n),e.headers.set("X-POSTHOG-WINDOW-ID",o)};i.__PosthogExtensions__=i.__PosthogExtensions__||{};var a={_patchFetch:n=>s(e,"fetch",(e=>function(){var o,r=(o=function*(t,o){var r=new Request(t,o);return u(n,r),e(r)},function(){var e=this,n=arguments;return new Promise((function(r,i){var s=o.apply(e,n);function u(e){t(s,r,i,u,a,"next",e)}function a(e){t(s,r,i,u,a,"throw",e)}u(void 0)}))});return function(t,e){return r.apply(this,arguments)}}())),_patchXHR:t=>s(e.XMLHttpRequest.prototype,"open",(e=>function(n,o){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0,a=new Request(o);return u(t,a),e.call(this,n,a.url,r,i,s)}))};i.__PosthogExtensions__.tracingHeadersPatchFns=a,i.postHogTracingHeadersPatchFns=a}(); | ||
//# sourceMappingURL=tracing-headers.js.map |
@@ -1,2 +0,2 @@ | ||
!function(){"use strict";var e,t,n,r=-1,i=function(e){addEventListener("pageshow",(function(t){t.persisted&&(r=t.timeStamp,e(t))}),!0)},a=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},o=function(){var e=a();return e&&e.activationStart||0},c=function(e,t){var n=a(),i="navigate";return r>=0?i="back-forward-cache":n&&(document.prerendering||o()>0?i="prerender":document.wasDiscarded?i="restore":n.type&&(i=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:i}},s=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},u=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},d=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},f=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},l=function(e){var t=!1;return function(){t||(e(),t=!0)}},p=-1,m=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},v=function(e){"hidden"===document.visibilityState&&p>-1&&(p="visibilitychange"===e.type?e.timeStamp:0,h())},g=function(){addEventListener("visibilitychange",v,!0),addEventListener("prerenderingchange",v,!0)},h=function(){removeEventListener("visibilitychange",v,!0),removeEventListener("prerenderingchange",v,!0)},y=function(){return p<0&&(p=m(),g(),i((function(){setTimeout((function(){p=m(),g()}),0)}))),{get firstHiddenTime(){return p}}},T=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},E=[1800,3e3],b=function(e,t){t=t||{},T((function(){var n,r=y(),a=c("FCP"),f=s("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(f.disconnect(),e.startTime<r.firstHiddenTime&&(a.value=Math.max(e.startTime-o(),0),a.entries.push(e),n(!0)))}))}));f&&(n=u(e,a,E,t.reportAllChanges),i((function(r){a=c("FCP"),n=u(e,a,E,t.reportAllChanges),d((function(){a.value=performance.now()-r.timeStamp,n(!0)}))})))}))},S=[.1,.25],C=[2500,4e3],L={},w=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},M=function(e){if("loading"===document.readyState)return"loading";var t=w();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},P=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},I=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?"#"+r.id:P(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},k=-1,A=function(e,t){var n=w(),r="navigate";return k>=0?r="back-forward-cache":n&&(document.prerendering||function(){var e=w();return e&&e.activationStart||0}()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:-1,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},_=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},x=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},H=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},q=0,D=1/0,O=0,R=function(e){e.forEach((function(e){e.interactionId&&(D=Math.min(D,e.interactionId),O=Math.max(O,e.interactionId),q=O?(O-D)/7+1:0)}))},F=function(){"interactionCount"in performance||e||(e=_("event",R,{type:"event",buffered:!0,durationThreshold:0}))},N=[],B=new Map,W=0,j=function(){return(e?q:performance.interactionCount||0)-W},X=[],V=function(e){if(X.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=N[N.length-1],n=B.get(e.interactionId);if(n||N.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};B.set(r.id,r),N.push(r)}N.sort((function(e,t){return t.latency-e.latency})),N.length>10&&N.splice(10).forEach((function(e){return B.delete(e.id)}))}}},z=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=function(e){var t=!1;return function(){t||(e(),t=!0)}}(e),"hidden"===document.visibilityState?e():(n=t(e),H(e)),n},U=[200,500],G=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()}((function(){var n;F();var r,i=A("INP"),a=function(e){z((function(){e.forEach(V);var t,n=(t=Math.min(N.length-1,Math.floor(j()/50)),N[t]);n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())}))},o=_("event",a,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=x(e,i,U,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),H((function(){a(o.takeRecords()),r(!0)})),function(e){addEventListener("pageshow",(function(t){t.persisted&&(k=t.timeStamp,e(t))}),!0)}((function(){W=0,N.length=0,B.clear(),i=A("INP"),r=x(e,i,U,t.reportAllChanges)})))})))},J=[],K=[],Q=new WeakMap,Y=new Map,Z=-1,$=function(e){J=J.concat(e),ee()},ee=function(){Z<0&&(Z=z(te))},te=function(){Y.size>10&&Y.forEach((function(e,t){B.has(t)||Y.delete(t)}));var e=N.map((function(e){return Q.get(e.entries[0])})),t=K.length-50;K=K.filter((function(n,r){return r>=t||e.includes(n)}));for(var r=new Set,i=0;i<K.length;i++){var a=K[i];ne(a.startTime,a.processingEnd).forEach((function(e){r.add(e)}))}for(var o=0;o<50;o++){var c=J[J.length-1-o];if(!c||c.startTime<n)break;r.add(c)}J=Array.from(r),Z=-1};X.push((function(e){e.interactionId&&e.target&&!Y.has(e.interactionId)&&Y.set(e.interactionId,e.target)}),(function(e){var t,r=e.startTime+e.duration;n=Math.max(n,e.processingEnd);for(var i=K.length-1;i>=0;i--){var a=K[i];if(Math.abs(r-a.renderTime)<=8){(t=a).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:r,entries:[e]},K.push(t)),(e.interactionId||"first-input"===e.entryType)&&Q.set(e,t),ee()}));var ne=function(e,t){for(var n,r=[],i=0;n=J[i];i++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r};const re="undefined"!=typeof window?window:void 0,ie="undefined"!=typeof globalThis?globalThis:re,ae=null==ie?void 0:ie.navigator;null==ie||ie.document,null==ie||ie.location,null==ie||ie.fetch,null!=ie&&ie.XMLHttpRequest&&"withCredentials"in new ie.XMLHttpRequest&&ie.XMLHttpRequest,null==ie||ie.AbortController,null==ae||ae.userAgent;const oe=null!=re?re:{},ce={onLCP:function(e,t){t=t||{},T((function(){var n,r=y(),a=c("LCP"),p=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(a.value=Math.max(e.startTime-o(),0),a.entries=[e],n())}))},m=s("largest-contentful-paint",p);if(m){n=u(e,a,C,t.reportAllChanges);var v=l((function(){L[a.id]||(p(m.takeRecords()),m.disconnect(),L[a.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=l(e),"hidden"===document.visibilityState?e():(n=t(e),f(e)),n}(v)}),!0)})),f(v),i((function(r){a=c("LCP"),n=u(e,a,C,t.reportAllChanges),d((function(){a.value=performance.now()-r.timeStamp,L[a.id]=!0,n(!0)}))}))}}))},onCLS:function(e,t){t=t||{},b(l((function(){var n,r=c("CLS",0),a=0,o=[],l=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=o[0],n=o[o.length-1];a&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(a+=e.value,o.push(e)):(a=e.value,o=[e])}})),a>r.value&&(r.value=a,r.entries=o,n())},p=s("layout-shift",l);p&&(n=u(e,r,S,t.reportAllChanges),f((function(){l(p.takeRecords()),n(!0)})),i((function(){a=0,r=c("CLS",0),n=u(e,r,S,t.reportAllChanges),d((function(){return n()}))})),setTimeout(n,0))})))},onFCP:b,onINP:function(e,n){t||(t=_("long-animation-frame",$)),G((function(t){var n=function(e){var t=e.entries[0],n=Q.get(t),r=t.processingStart,i=n.processingEnd,a=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),o=ne(t.startTime,i),c=e.entries.find((function(e){return e.target})),s=c&&c.target||Y.get(t.interactionId),u=[t.startTime+t.duration,i].concat(o.map((function(e){return e.startTime+e.duration}))),d=Math.max.apply(Math,u),f={interactionTarget:I(s),interactionTargetElement:s,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:d,processedEventEntries:a,longAnimationFrameEntries:o,inputDelay:r-t.startTime,processingDuration:i-r,presentationDelay:Math.max(d-i,0),loadState:M(t.startTime)};return Object.assign(e,{attribution:f})}(t);e(n)}),n)}};oe.__PosthogExtensions__=oe.__PosthogExtensions__||{},oe.__PosthogExtensions__.postHogWebVitalsCallbacks=ce,oe.postHogWebVitalsCallbacks=ce}(); | ||
!function(){"use strict";var e,t,n,r=-1,i=function(e){addEventListener("pageshow",(function(t){t.persisted&&(r=t.timeStamp,e(t))}),!0)},a=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},o=function(){var e=a();return e&&e.activationStart||0},c=function(e,t){var n=a(),i="navigate";return r>=0?i="back-forward-cache":n&&(document.prerendering||o()>0?i="prerender":document.wasDiscarded?i="restore":n.type&&(i=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:i}},s=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},u=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},d=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},f=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},l=function(e){var t=!1;return function(){t||(e(),t=!0)}},p=-1,m=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},v=function(e){"hidden"===document.visibilityState&&p>-1&&(p="visibilitychange"===e.type?e.timeStamp:0,h())},g=function(){addEventListener("visibilitychange",v,!0),addEventListener("prerenderingchange",v,!0)},h=function(){removeEventListener("visibilitychange",v,!0),removeEventListener("prerenderingchange",v,!0)},y=function(){return p<0&&(p=m(),g(),i((function(){setTimeout((function(){p=m(),g()}),0)}))),{get firstHiddenTime(){return p}}},T=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},E=[1800,3e3],b=function(e,t){t=t||{},T((function(){var n,r=y(),a=c("FCP"),f=s("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(f.disconnect(),e.startTime<r.firstHiddenTime&&(a.value=Math.max(e.startTime-o(),0),a.entries.push(e),n(!0)))}))}));f&&(n=u(e,a,E,t.reportAllChanges),i((function(r){a=c("FCP"),n=u(e,a,E,t.reportAllChanges),d((function(){a.value=performance.now()-r.timeStamp,n(!0)}))})))}))},S=[.1,.25],C=[2500,4e3],L={},w=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},M=function(e){if("loading"===document.readyState)return"loading";var t=w();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},P=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},I=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?"#"+r.id:P(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},k=-1,A=function(e,t){var n=w(),r="navigate";return k>=0?r="back-forward-cache":n&&(document.prerendering||function(){var e=w();return e&&e.activationStart||0}()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:-1,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},_=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},x=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},H=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},q=0,D=1/0,O=0,R=function(e){e.forEach((function(e){e.interactionId&&(D=Math.min(D,e.interactionId),O=Math.max(O,e.interactionId),q=O?(O-D)/7+1:0)}))},F=function(){"interactionCount"in performance||e||(e=_("event",R,{type:"event",buffered:!0,durationThreshold:0}))},N=[],B=new Map,W=0,j=function(){return(e?q:performance.interactionCount||0)-W},X=[],V=function(e){if(X.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=N[N.length-1],n=B.get(e.interactionId);if(n||N.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};B.set(r.id,r),N.push(r)}N.sort((function(e,t){return t.latency-e.latency})),N.length>10&&N.splice(10).forEach((function(e){return B.delete(e.id)}))}}},z=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=function(e){var t=!1;return function(){t||(e(),t=!0)}}(e),"hidden"===document.visibilityState?e():(n=t(e),H(e)),n},U=[200,500],G=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()}((function(){var n;F();var r,i=A("INP"),a=function(e){z((function(){e.forEach(V);var t,n=(t=Math.min(N.length-1,Math.floor(j()/50)),N[t]);n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())}))},o=_("event",a,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=x(e,i,U,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),H((function(){a(o.takeRecords()),r(!0)})),function(e){addEventListener("pageshow",(function(t){t.persisted&&(k=t.timeStamp,e(t))}),!0)}((function(){W=0,N.length=0,B.clear(),i=A("INP"),r=x(e,i,U,t.reportAllChanges)})))})))},J=[],K=[],Q=new WeakMap,Y=new Map,Z=-1,$=function(e){J=J.concat(e),ee()},ee=function(){Z<0&&(Z=z(te))},te=function(){Y.size>10&&Y.forEach((function(e,t){B.has(t)||Y.delete(t)}));var e=N.map((function(e){return Q.get(e.entries[0])})),t=K.length-50;K=K.filter((function(n,r){return r>=t||e.includes(n)}));for(var r=new Set,i=0;i<K.length;i++){var a=K[i];ne(a.startTime,a.processingEnd).forEach((function(e){r.add(e)}))}for(var o=0;o<50;o++){var c=J[J.length-1-o];if(!c||c.startTime<n)break;r.add(c)}J=Array.from(r),Z=-1};X.push((function(e){e.interactionId&&e.target&&!Y.has(e.interactionId)&&Y.set(e.interactionId,e.target)}),(function(e){var t,r=e.startTime+e.duration;n=Math.max(n,e.processingEnd);for(var i=K.length-1;i>=0;i--){var a=K[i];if(Math.abs(r-a.renderTime)<=8){(t=a).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:r,entries:[e]},K.push(t)),(e.interactionId||"first-input"===e.entryType)&&Q.set(e,t),ee()}));var ne=function(e,t){for(var n,r=[],i=0;n=J[i];i++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},re="undefined"!=typeof window?window:void 0,ie="undefined"!=typeof globalThis?globalThis:re,ae=null==ie?void 0:ie.navigator;null==ie||ie.document,null==ie||ie.location,null==ie||ie.fetch,null!=ie&&ie.XMLHttpRequest&&"withCredentials"in new ie.XMLHttpRequest&&ie.XMLHttpRequest,null==ie||ie.AbortController,null==ae||ae.userAgent;var oe=null!=re?re:{},ce={onLCP:function(e,t){t=t||{},T((function(){var n,r=y(),a=c("LCP"),p=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(a.value=Math.max(e.startTime-o(),0),a.entries=[e],n())}))},m=s("largest-contentful-paint",p);if(m){n=u(e,a,C,t.reportAllChanges);var v=l((function(){L[a.id]||(p(m.takeRecords()),m.disconnect(),L[a.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=l(e),"hidden"===document.visibilityState?e():(n=t(e),f(e)),n}(v)}),!0)})),f(v),i((function(r){a=c("LCP"),n=u(e,a,C,t.reportAllChanges),d((function(){a.value=performance.now()-r.timeStamp,L[a.id]=!0,n(!0)}))}))}}))},onCLS:function(e,t){t=t||{},b(l((function(){var n,r=c("CLS",0),a=0,o=[],l=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=o[0],n=o[o.length-1];a&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(a+=e.value,o.push(e)):(a=e.value,o=[e])}})),a>r.value&&(r.value=a,r.entries=o,n())},p=s("layout-shift",l);p&&(n=u(e,r,S,t.reportAllChanges),f((function(){l(p.takeRecords()),n(!0)})),i((function(){a=0,r=c("CLS",0),n=u(e,r,S,t.reportAllChanges),d((function(){return n()}))})),setTimeout(n,0))})))},onFCP:b,onINP:function(e,n){t||(t=_("long-animation-frame",$)),G((function(t){var n=function(e){var t=e.entries[0],n=Q.get(t),r=t.processingStart,i=n.processingEnd,a=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),o=ne(t.startTime,i),c=e.entries.find((function(e){return e.target})),s=c&&c.target||Y.get(t.interactionId),u=[t.startTime+t.duration,i].concat(o.map((function(e){return e.startTime+e.duration}))),d=Math.max.apply(Math,u),f={interactionTarget:I(s),interactionTargetElement:s,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:d,processedEventEntries:a,longAnimationFrameEntries:o,inputDelay:r-t.startTime,processingDuration:i-r,presentationDelay:Math.max(d-i,0),loadState:M(t.startTime)};return Object.assign(e,{attribution:f})}(t);e(n)}),n)}};oe.__PosthogExtensions__=oe.__PosthogExtensions__||{},oe.__PosthogExtensions__.postHogWebVitalsCallbacks=ce,oe.postHogWebVitalsCallbacks=ce}(); | ||
//# sourceMappingURL=web-vitals.js.map |
{ | ||
"name": "posthog-js", | ||
"version": "1.187.1", | ||
"version": "1.187.2", | ||
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/PostHog/posthog-js", |
{ | ||
"name": "posthog-js", | ||
"version": "1.187.1", | ||
"version": "1.187.2", | ||
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/PostHog/posthog-js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18783811
42124