!function(){"use strict";var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t){return e(t={exports:{}},t.exports),t.exports}var n=function(e){return e&&e.Math==Math&&e},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")(),o=function(e){try{return!!e()}catch(e){return!0}},i=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),s={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,c={f:a&&!s.call({1:2},1)?function(e){var t=a(this,e);return!!t&&t.enumerable}:s},u=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},d={}.toString,h=function(e){return d.call(e).slice(8,-1)},l="".split,f=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==h(e)?l.call(e,""):Object(e)}:Object,p=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},b=function(e){return f(p(e))},m=function(e){return"object"==typeof e?null!==e:"function"==typeof e},g=function(e,t){if(!m(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!m(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!m(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!m(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},y={}.hasOwnProperty,w=function(e,t){return y.call(e,t)},v=r.document,k=m(v)&&m(v.createElement),$=function(e){return k?v.createElement(e):{}},S=!i&&!o((function(){return 7!=Object.defineProperty($("div"),"a",{get:function(){return 7}}).a})),E=Object.getOwnPropertyDescriptor,x={f:i?E:function(e,t){e=b(e);t=g(t,!0);if(S)try{return E(e,t)}catch(e){}if(w(e,t))return u(!c.f.call(e,t),e[t])}},O=function(e){if(!m(e))throw TypeError(String(e)+" is not an object");return e},I=Object.defineProperty,L={f:i?I:function(e,t,n){O(e);t=g(t,!0);O(n);if(S)try{return I(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");"value"in n&&(e[t]=n.value);return e}},T=i?function(e,t,n){return L.f(e,t,u(1,n))}:function(e,t,n){e[t]=n;return e},_=function(e,t){try{T(r,e,t)}catch(n){r[e]=t}return t},j="__core-js_shared__",C=r[j]||_(j,{}),M=Function.toString;"function"!=typeof C.inspectSource&&(C.inspectSource=function(e){return M.call(e)});var q,W,R,P=C.inspectSource,N=r.WeakMap,A="function"==typeof N&&/native code/.test(P(N)),F=!1,U=t((function(e){(e.exports=function(e,t){return C[e]||(C[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:F?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),H=0,z=Math.random(),D=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++H+z).toString(36)},B=U("keys"),V=function(e){return B[e]||(B[e]=D(e))},J={},Q=r.WeakMap,X=function(e){return R(e)?W(e):q(e,{})},G=function(e){return function(t){var n;if(!m(t)||(n=W(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(A){var K=new Q,Y=K.get,Z=K.has,ee=K.set;q=function(e,t){ee.call(K,e,t);return t};W=function(e){return Y.call(K,e)||{}};R=function(e){return Z.call(K,e)}}else{var te=V("state");J[te]=!0;q=function(e,t){T(e,te,t);return t};W=function(e){return w(e,te)?e[te]:{}};R=function(e){return w(e,te)}}var ne={set:q,get:W,has:R,enforce:X,getterFor:G},re=(ne.set,ne.get,ne.has,ne.enforce,ne.getterFor,t((function(e){var t=ne.get,n=ne.enforce,o=String(String).split("String");(e.exports=function(e,t,i,s){var a=!!s&&!!s.unsafe,c=!!s&&!!s.enumerable,u=!!s&&!!s.noTargetGet;if("function"==typeof i){"string"!=typeof t||w(i,"name")||T(i,"name",t);n(i).source=o.join("string"==typeof t?t:"")}if(e!==r){a?!u&&e[t]&&(c=!0):delete e[t];c?e[t]=i:T(e,t,i)}else c?e[t]=i:_(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||P(this)}))}))),oe=r,ie=function(e){return"function"==typeof e?e:void 0},se=function(e,t){return arguments.length<2?ie(oe[e])||ie(r[e]):oe[e]&&oe[e][t]||r[e]&&r[e][t]},ae=Math.ceil,ce=Math.floor,ue=function(e){return isNaN(e=+e)?0:(e>0?ce:ae)(e)},de=Math.min,he=function(e){return e>0?de(ue(e),9007199254740991):0},le=Math.max,fe=Math.min,pe=function(e,t){var n=ue(e);return n<0?le(n+t,0):fe(n,t)},be=function(e){return function(t,n,r){var o,i=b(t),s=he(i.length),a=pe(r,s);if(e&&n!=n){for(;s>a;)if((o=i[a++])!=o)return!0}else for(;s>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},me={includes:be(!0),indexOf:be(!1)},ge=(me.includes,me.indexOf,me.indexOf),ye=function(e,t){var n,r=b(e),o=0,i=[];for(n in r)!w(J,n)&&w(r,n)&&i.push(n);for(;t.length>o;)w(r,n=t[o++])&&(~ge(i,n)||i.push(n));return i},we=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ve=we.concat("length","prototype"),ke={f:Object.getOwnPropertyNames||function(e){return ye(e,ve)}},$e={f:Object.getOwnPropertySymbols},Se=se("Reflect","ownKeys")||function(e){var t=ke.f(O(e)),n=$e.f;return n?t.concat(n(e)):t},Ee=function(e,t){for(var n=Se(t),r=L.f,o=x.f,i=0;io;)for(var u,d=f(arguments[o++]),h=s?qe(d).concat(s(d)):qe(d),l=h.length,p=0;l>p;){u=h[p++];i&&!a.call(d,u)||(n[u]=d[u])}return n}:Re;Me({target:"Object",stat:!0,forced:Object.assign!==Ne},{assign:Ne});var Ae=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())})),Fe=Ae&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ue=U("wks"),He=r.Symbol,ze=Fe?He:He&&He.withoutSetter||D,De=function(e){w(Ue,e)||(Ae&&w(He,e)?Ue[e]=He[e]:Ue[e]=ze("Symbol."+e));return Ue[e]},Be=De("match"),Ve=function(e){var t;return m(e)&&(void 0!==(t=e[Be])?!!t:"RegExp"==h(e))},Je=function(){var e=O(this),t="";e.global&&(t+="g");e.ignoreCase&&(t+="i");e.multiline&&(t+="m");e.dotAll&&(t+="s");e.unicode&&(t+="u");e.sticky&&(t+="y");return t},Qe=De("replace"),Xe=RegExp.prototype;Me({target:"String",proto:!0},{replaceAll:function e(t,n){var r,o,i,s,a,c,u,d,h=p(this);if(null!=t){if((r=Ve(t))&&!~String(p("flags"in Xe?t.flags:Je.call(t))).indexOf("g"))throw TypeError("`.replaceAll` does not allow non-global regexes");if(void 0!==(o=t[Qe]))return o.call(t,h,n);if(F&&r)return String(h).replace(t,n)}i=String(h);if(""===(s=String(t)))return e.call(i,/(?:)/g,n);a=i.split(s);if("function"!=typeof n)return a.join(String(n));u=(c=a[0]).length;for(d=1;dlocation,r=/^.*hsappstatic\.net\/feedback-web-renderer-ui\/static-(\d+(?:-\w+-?)*\.\d+).*$/,o=[].slice.call(document.getElementsByTagName("script")).map((e=>e.src)).filter((e=>r.test(e)))[0],i=o&&r.exec(o)?r.exec(o)[1]:"unknown",s=(/hubspot\.com$/.test(n().host),URL.createObjectURL(new Blob([])).slice(-36).replace(/-/g,"")),a=(document.location.pathname.indexOf("nps"),n().href,e=>{if(!e||""===e)return null;const t=e.split("/");return`${t[0]}//${t[2]}`}),c=(e,t)=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`,u=e=>Object.keys(e).reduce(((t,n)=>{const r=e[n];return[...t,...Array.isArray(r)?r.map((e=>c(n,e))):[c(n,r)]]}),[]).join("&"),d="PREVIEW_EDITOR",h="PREVIEW_UI",l="FETCHER",f="UI",p="change-expand",b="expand",m="focus",g="hide",y="load-survey",w="location-change",v="ready",k="reset",$="resize-popup",S="setup",E="show",x="fetched",O="update",I="load-config-only",L="config-fetched",T="show-loaded-config";var _=e=>{let t=!0,n=[];const r=(...e)=>{n.forEach((t=>{t(...e)}))};return o=>{t&&0===n.length&&(t=e(r));n.push(o);return()=>{const e=n.length;n=n.filter((e=>e!==o));t&&0===n.length&&e>0&&t()}}},j=(e,t,n={})=>_((r=>{e.addEventListener(t,r,n);return()=>{e.removeEventListener(t,r,n)}}));const C=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),M=(e,t)=>{const n=a(e);if(null===n)return()=>{};const r=new RegExp(`^${C(n)}$`),o=j(window,"message");return e=>o((({data:n,origin:o,source:i})=>{if(!n||!r.test(o))return;let s;try{s=JSON.parse(n)}catch(e){return}const{payload:a,type:c}=s;if(!a||c!==R)return;const{channel:u,payload:{messageType:d,payload:h}}=a;u===t&&e(d,h,o,i)}))},q=e=>M(document.referrer,e),W=(e,t)=>M(e.src,t);const R="hubspot-servicehub-feedback",P=(e,t,n)=>(r,o)=>{t.postMessage(JSON.stringify({payload:{channel:e,payload:{messageType:r,payload:o}},type:R}),n||"*")},N=(e,t)=>P(t,e.contentWindow,e.src),A=e=>P(e,window.parent,document.referrer),F=(e,t,n)=>{const r=W(e,t),o=N(e,t),i=r((e=>{if(e===v){n({sender:o,subscribe:r});i()}}))};var U=(e,t)=>_((n=>{const r=setInterval(n,e);return()=>{t&&t();clearInterval(r)}}));const H=(e,t)=>e===t;var z=((e,t=H,n=1e3)=>{let r,o=!0;const i=U(n,(()=>{o=!0}));return n=>i((()=>{const i=e();if(!t(i,r)){o||n(i);r=i}o=!1}))})((()=>location.href));const D="live-preview",B="preview",V="standard",J="feedback-web",Q=`${J}-fetcher`,X=`${J}-ui`,G=(e,t)=>{Object.keys(t).forEach((n=>{e.setAttribute(n,t[n])}));return e},K=(e,t={})=>G(document.createElement(e),t),Y=(e,t)=>{const n=(e.childNodes||{})[0];if(n){e.insertBefore(t,n);return e}e.appendChild(t);return e},Z=e=>e.replace(/(^ *| *$)/g,"").replace(/ +/g," "),ee=(e,t)=>{e.className=Z(`${e.className} ${t}`)},te=(e,t)=>{e.className=Z(e.className.replace(new RegExp(t,"g"),""))},ne=.4,re=350,oe=re+200,ie=480,se=450,ae=Math.max(ie,re,oe,se),ce=416,ue=420,de=544,he=768,le=600,fe="hs-feedback-ui",pe="hs-feedback-fetcher",be="hs-feedback-extended-width",me="hs-feedback-shown",ge="hs-feedback-slid-out",ye="hs-feedback-expanded",we="hs-feedback-visible-marker",ve=(e,t)=>`\n @keyframes feedback-slide-in-${e} {\n from {transform: translate(0, ${100*t}%);}\n to {transform: translate(0, 0);}\n }\n\n @keyframes feedback-slide-out-${e} {\n from {transform: translate(0, 0);}\n to {transform: translate(0, ${100*t}%);}\n }\n\n #${fe}.${e} {\n animation-name: feedback-slide-in-${e};\n }\n\n #${fe}.${e}.${ge} {\n animation-name: feedback-slide-out-${e};\n animation-fill-mode: forwards;\n }\n`,ke=`\n #${fe} {\n animation-duration: ${ne}s;\n animation-timing-function: ease-out;\n display: none;\n height: 0;\n overflow: hidden;\n position: fixed;\n z-index: 2147483647;\n max-width: 100%;\n }\n\n .hubspot.space-sword #${fe} {\n /* TODO: replace the 1211 with z-index token once available from Trellis (issue: https://git.hubteam.com/HubSpot/foundations-theming/issues/233) */\n z-index: ${window.hsFeedbackWebZIndex||1211};\n }\n\n #${fe}.${me} {\n display: block;\n }\n\n #${pe} {\n display: none\n }\n\n ${ve("hs-feedback-left",1)}\n ${ve("hs-feedback-right",1)}\n ${ve("hs-feedback-top",-1)}\n\n #${fe} > iframe {\n width: 100%;\n height: 100%;\n }\n\n #${fe}:not(.hs-feedback-top) {\n bottom: 0;\n }\n\n #${fe}.hs-feedback-left {\n left: 0;\n }\n\n #${fe}.hs-feedback-right {\n right: 0;\n }\n\n .zorse #${fe}:not(.hs-feedback-top) {\n bottom: 6px;\n }\n\n .zorse #${fe}.hs-feedback-right {\n right: 0;\n }\n\n #${fe}.hs-feedback-top {\n left: 0;\n top: 0;\n width: 100%;\n }\n\n #${fe}.hs-feedback-nps:not(.hs-feedback-top) {\n width: ${ie}px;\n }\n\n #${fe}.hs-feedback-csat:not(.hs-feedback-top) {\n width: ${re}px;\n }\n\n #${fe}.hs-feedback-csat.${be}:not(.hs-feedback-top) {\n width: ${oe}px;\n }\n\n #${fe}.hs-feedback-csat:not(.hs-feedback-top):not(.${ye}):not(.hs-feedback-mobile) {\n width: ${se}px;\n }\n\n #${fe}.hs-feedback-csat.${be}:not(.hs-feedback-top) {\n width: ${oe}px !important;\n }\n\n #${fe}.preview.hs-feedback-csat.hs-feedback-callout:not(.${ye}):not(.hs-feedback-top) {\n width: ${se}px !important;\n }\n\n #${fe}:not(.preview):not(.hs-feedback-callout):not(.hs-feedback-top):not(.hs-feedback-desktop),\n #${fe}.${ye}:not(.preview):not(.hs-feedback-top):not(.hs-feedback-desktop) {\n width: 100% !important;\n }\n\n @media only screen and (max-width: ${le}px) {\n #${fe}.preview:not(.hs-feedback-top),\n #${fe}.${ye}.preview:not(.hs-feedback-top) {\n width: 100% !important;\n }\n }\n\n #${fe}.${me} ~ #tally-widget-container,\n #${fe}.${me} ~ #wootric-modal {\n display: none !important;\n }\n\n /* hide all popups in the same position as us */\n #${fe}.hs-feedback-right.${me}:not(.hs-feedback-mobile) ~ #hubspot-messages-iframe-container,\n #${fe}.hs-feedback-right.${me}:not(.hs-feedback-mobile) ~ .leadinModal-theme-bottom-right-corner,\n #${fe}.hs-feedback-left.${me}:not(.hs-feedback-mobile) ~ .leadinModal-theme-bottom-left-corner,\n #${fe}.hs-feedback-top.${me}:not(.hs-feedback-mobile) ~ .leadinModal-theme-top {\n display: none !important;\n }\n\n /* hide leadflows when we're tablet-stretched across from them */\n @media only screen and (min-width: ${de}px) and (max-width: ${Math.max(he,ae+ue)}px) {\n #${fe}.hs-feedback-left.${me} ~ .leadinModal-theme-bottom-right-corner,\n #${fe}.hs-feedback-right.${me} ~ .leadinModal-theme-bottom-left-corner {\n display: none !important;\n }\n }\n\n /* hide messages when we're tablet-stretched across from them */\n @media only screen and (max-width: ${Math.max(he,ae+ce)}px) {\n #${fe}.hs-feedback-left.${me} ~ #hubspot-messages-iframe-container {\n display: none !important;\n }\n }\n\n\n /* repeat above rules for small screens when we're set to display on mobile */\n #${fe}.hs-feedback-mobile.hs-feedback-right.${me}:not(.hs-feedback-no-mobile) ~ #hubspot-messages-iframe-container,\n #${fe}.hs-feedback-mobile.hs-feedback-left.${me}:not(.hs-feedback-no-mobile) ~ #hubspot-messages-iframe-container,\n #${fe}.hs-feedback-mobile.hs-feedback-right.${me}:not(.hs-feedback-no-mobile) ~ .leadinModal-theme-bottom-right-corner,\n #${fe}.hs-feedback-mobile.hs-feedback-left.${me}:not(.hs-feedback-no-mobile) ~ .leadinModal-theme-bottom-left-corner,\n #${fe}.hs-feedback-mobile.hs-feedback-top.${me}:not(.hs-feedback-no-mobile) ~ .leadinModal-theme-top,\n #${fe}.hs-feedback-mobile.hs-feedback-left.${me}:not(.hs-feedback-no-mobile) ~ .leadinModal-theme-bottom-right-corner,\n #${fe}.hs-feedback-mobile.hs-feedback-right.${me}:not(.hs-feedback-no-mobile) ~ .leadinModal-theme-bottom-left-corner {\n display: none !important;\n }\n\n /* don't display us on small screens if we're set to not display on mobile */\n #${fe}.hs-feedback-mobile.hs-feedback-no-mobile {\n display: none;\n }\n`,$e=A(l),Se=1e3,Ee=()=>{const e=document.querySelector("#isc-zorse-widget")||document.querySelector("#chat-widget"),t=document.getElementById("hs-feedback-ui");if(e){const n=e.children[0];if(n){const e=n.clientWidth+20;t&&(t.style.marginRight=`${e}px`)}}else t&&(t.style.marginRight="0px")};class xe{constructor(){this.setFetcher=e=>{this.fetcher=e;this._runQueuedEvents();return this};this.initialiseUI=({iframe:e,parent:t,sender:n})=>{this.iframe=e;this.sendToIframe=n;this.iframeWrapper=t;this._runQueuedEvents();setInterval(Ee,100)};this._runQueuedEvents=()=>{const e=this.queuedEvents;this.queuedEvents=[];e.forEach((e=>e(this)))};this._onSurveyLoaded=e=>{this._setMetaData(e);this.onSurveyLoad&&this.onSurveyLoad(e)};this._queueEvent=e=>{this.queuedEvents.push(e);return this};this._push=e=>{this._queueEvent(e);this.fetcher&&this._runQueuedEvents()};this._setSurveyLanguage=e=>{this.surveyLanguage=e.config.language};this._setMetaData=e=>{this._setSurveyLanguage(e);this.config=e;return this};this._onConfigLoaded=e=>{this._setMetaData(e);this.onConfigLoaded&&this.onConfigLoaded(e);return this};this.hide=()=>{if(!this.iframeWrapper)return this._queueEvent(this.hide);ee(this.iframeWrapper,ge);window.setTimeout((()=>{te(this.iframeWrapper,me);const e=this.iframeWrapper.querySelector(`#${we}`);e&&e.remove()}),500);return this};this.show=()=>{if(!this.iframeWrapper)return this._queueEvent(this.show);te(this.iframeWrapper,ge);ee(this.iframeWrapper,me);this.iframeWrapper.querySelector(`#${we}`)||this.iframeWrapper.appendChild(K("span",{id:we}));return this};this.expand=()=>{if(!this.iframeWrapper)return this._queueEvent(this.expand);ee(this.iframeWrapper,ye);this.sendToIframe(p,!0);return this};this.minimize=()=>{if(!this.iframeWrapper)return this._queueEvent(this.minimize);te(this.iframeWrapper,ye);this.sendToIframe(p,!1);return this};this.reset=()=>{if(!this.iframeWrapper)return this._queueEvent(this.reset);this.sendToIframe(k,!1);return this};this.showOnMouseLeave=(e=!1)=>{const t=()=>{e&&this.expand();this.show();document.removeEventListener("mouseleave",t)};document.addEventListener("mouseleave",t);return this};this.showOnScroll=(e=!1)=>{const t=Math.max(document.body.offsetHeight,document.body.scrollHeight),n=.5*(t-window.innerHeight),r=()=>{e&&this.expand();this.show()};if(t===window.innerHeight){setTimeout(r,Se);return this}const o=()=>{const e=document.body.scrollTop||window.pageYOffset;if(window.innerHeight+e>n){r();document.removeEventListener("scroll",o)}};document.addEventListener("scroll",o);return this};this.loadConfigOnly=(e,t)=>{if(!this.fetcher)return this._queueEvent((()=>this.loadConfigOnly(e,t)));this.fetcher(I,{surveyType:e,surveyId:t});return this};this.loadSurvey=(e,t)=>{if(!this.fetcher)return this._queueEvent((()=>this.loadSurvey(e,t)));this.fetcher(y,{surveyType:e,surveyId:t});return this};this.showSurvey=e=>{if(!this.fetcher)return this._queueEvent((()=>this.showSurvey()));if(!e)return this;this.fetcher(T,e);return this};this.checkIsLanguageValid=e=>e===this.surveyLanguage;this.renderSurvey=()=>{if(!this.config)return this._queueEvent((()=>this.renderSurvey()));$e(x,this.config);return this};this.getSurveyConfig=()=>this.config;this.fetcher=null;this.onSurveyLoad=null;this._onReady=null;this.iframeWrapper=null;this.iframe=null;this.sendToIframe=null;this.onConfigLoaded=null;this.surveyLanguage=null;this.config=null;this.queuedEvents=window.onHsFeedbackReady||[];window.hsFeedback=this;window.onHsFeedbackReady={push:this._push}}}var Oe=xe;var Ie=e=>{const t=document.querySelector(`script[${e}]`);return t?t.getAttribute(e):null};const Le="hsWebSurveyPreview",Te="hsWebSurveyTestId",_e="data-hubspot-feedback-portal-id",je="data-hubspot-feedback-customer-portal-id",Ce="data-hubspot-feedback-env",Me="data-hubspot-feedback-hubspot-app",qe="data-hubspot-feedback-hubspot-email",We="data-hubspot-feedback-user-lang",Re="data-hubspot-feedback-client-load-only",Pe="data-hsjs-hublet",Ne={},Ae=window.location.hash,Fe=window.location.search;(()=>{if(Ae.length>0){const e=Ae.split("?");if(e.length>1)return`?${e[1]}`}return Fe})().replace(/[(?|&)]([^=]+)=([^&#]+)/g,((e,t,n)=>{Ne[t]=n}));const Ue=e=>{try{return"true"===localStorage.getItem(e)}catch(e){return!1}};function He(e=window.location.hostname){const t=e.split(".").slice(0,-2);return(t[t.length-1]||"").split("-")[1]||""}const ze=Ie(Ce),De=Ie(_e),Be=Ie(je),Ve=Ne[Le],Je=Ne[Te],Qe=Boolean(window.feedbackTestPage)||Boolean(Ve),Xe=Boolean(window.hsFeedbackPreview),Ge=Boolean(Ie(Me)),Ke=Ie(qe),Ye=Ie(We),Ze=Ie(Pe)||He(),et="true"===Ie(Re),tt=Ue("LOCAL_RENDERER"),nt=/MSIE\s/.test(navigator.userAgent)&&parseFloat(navigator.appVersion.split("MSIE")[1])<11,rt=/bot|python-requests|hubspot|phantomjs|bingpreview/i.test(navigator.userAgent);/hsWebSurveyTestId/.test(document.referrer);if(tt){const e=document.querySelector("body"),t=document.createElement("div");t.setAttribute("class","UIRibbon-sc-1wnhcos-0 hwuPWx");t.innerText="Web renderer local";t.style.top="130px";t.style.zIndex=5;e.appendChild(t)}const ot=document.head||document.getElementsByTagName("head")[0],it=e=>{const t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e));return t};const st=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;try{return new URL(e).pathname===new URL(t).pathname}catch(n){return e===t}},at=({url:e,triggerUrl:t,isShown:n,hide:r,forward:o})=>{if(n){if(t&&!st(e,t)){r();return null}return t}o(e);return t};var ct=(e,t,{onerror:n,headers:r={},withCredentials:o=!1,data:i={}}={})=>{const s=new XMLHttpRequest;s.onreadystatechange=()=>{if(s.readyState===XMLHttpRequest.DONE){const{responseText:e,status:r}=s;if(r>=200&&r<300){const n=e?JSON.parse(e):{};t(n)}else n&&n(s)}};s.open("POST",e);o&&(s.withCredentials=!0);Object.keys(r).forEach((e=>{s.setRequestHeader(e,r[e])}));s.send(JSON.stringify(i))};const ut=(e=window.document.cookie)=>{const t=/csrf.app=([^;]+);?/.exec(e);return t&&t[1]},dt=()=>({Accept:"application/json, text/javascript, */*; q=0.01","Content-type":"application/json","X-HubSpot-CSRF-hubspotapi":ut()}),ht=e=>`hubspot${e?"qa":""}.com/feedback-proxy`,lt={["NPS"]:1,["CSAT"]:3},ft=()=>location,pt=()=>{try{return window.top.innerWidth}catch(e){return innerWidth}};(e=>{ot.appendChild(it(e))})(ke);const bt=window._hsq=window._hsq||[],mt={portalId:De,isPreview:Xe,isTest:Qe},gt=t(Ze),yt=`https://${Xe&&/local/.test(ft().origin)||tt?"local":"app"}${gt}.hubspot${"prod"===ze?"":"qa"}.com`,wt={};let vt,kt="",$t=null;window.hsFeedbackLoaded||(vt=new Oe);const St=ht("prod"!==ze),Et=(e,t=(()=>{}))=>{ct(`${`https://api${gt}.${St}/v1`}/survey-config/CSAT/${e}/shown?${u({bundleVersion:i,portalId:Be||De})}`,t,{headers:dt(),withCredentials:!0})},xt=(e,t=(()=>{}))=>{try{const n=`https://api${gt}.hubspot${"prod"===ze?"":"qa"}.com`,r=ft(),o=new URL(r.href);ct(`${n}/nudge/tracking/v1/nudge-event?portalId=${De}`,t,{headers:dt(),withCredentials:!0,data:{nudgeEvents:[{app_name:o.pathname.split("/").filter(Boolean)[0]||"",event_timestamp:Date.now(),from_automated_test:document.cookie.includes("hs_selenium"),locale:document.documentElement.lang||"en-us",nudge:{type:"POPUP_CSAT",title:e||"no-title",id:"csat-feedback-survey"},session_id:window.hubspot&&window.hubspot.sessionId||"",type:"EXTERNAL_RENDERED",url:`${o.host}${o.pathname}`,xpath:""}]}})}catch(e){}},Ot=(e,t)=>{switch(e){case x:kt=t&&t.config&&t.config.question||"";Mt(f,S,{mode:V,payload:{isHubspot:Ge,portalId:De,response:t,pageTitle:document.title,pageUrl:location.href,utk:mt.utk,windowWidth:pt(),hublet:Ze,clientLoadOnly:et}});vt._onSurveyLoaded(t);break;case L:vt._onConfigLoaded(t)}},It=()=>{const e=wt[f];return e&&e.data&&e.data.parent.className.indexOf(me)>=0},Lt=A(d),Tt=e=>()=>{e(O,{pageTitle:document.title,pageUrl:ft().href,windowWidth:pt()})},_t={FETCHER:{onInit:({sender:e})=>{z((t=>{$t=at({url:t,triggerUrl:$t,isShown:It(),hide:vt.hide,forward:t=>e(w,t)})}))},handleMessages:Ot,parentAttrs:{id:pe,title:"submit hubspot feedback"},path:Q},UI:{onInit:e=>{const{sender:t}=e,n=Tt(t);z(n);j(window,"resize")(n);j(document,"focus")((()=>{t(m)}));vt.initialiseUI(e);return{client:vt}},handleMessages:(e,t)=>{Ct(f,(({parent:n})=>{switch(e){case E:{const{classes:e,displayOnScroll:r,surveyId:o,surveyLanguage:i,surveyType:s,userLocale:a}=t;if(Ge&&i!==(Ye||a)||window.disabledHsPopups&&window.disabledHsPopups.indexOf("FEEDBACK")>-1)return;const c=[...e,...Xe?["preview"]:[]].join(" ").toLowerCase();Ve||void 0===o||bt.push(["trackFeedbackView",{surveyId:o,surveyType:s}]);n.baseClasses=c;n.className=c;r?vt.showOnScroll():vt.show();$t=ft().href;if(s===lt.CSAT&&Ge){Et(o);xt(kt)}break}case b:t?ee(n,ye):te(n,ye);Lt(e,t);break;case g:vt.hide();setTimeout((()=>{n.className=n.baseClasses}),1e3);break;case $:{const{newHeight:e,newWidth:r}=t;n.style.width=r?`${r}px`:null;n.style.height=`${e}px`;break}default:Lt(e,t)}}))},parentAttrs:{id:fe,title:"submit hubspot feedback"},path:X}},jt=e=>{const{path:t,parentAttrs:n}=_t[e],r=K("iframe",{frameborder:0,title:"Submit HubSpot product feedback",src:`${yt}/${t}`}),o=K("div",n);Y(o,r);Y(document.body,o);return[r,o]},Ct=(e,t)=>{if(wt[e]){wt[e](t);return}const n=[t];wt[e]=e=>{n.push(e)};const[r,o]=jt(e);F(r,e,(({sender:t,subscribe:i})=>{const{handleMessages:s,onInit:a}=_t[e];i(s);let c={frame:r,parent:o,subscribe:i,sender:t};c=Object.assign({},c,a(c)||{});const u=e=>{e(c)};wt[e]=u;u.data=c;n.forEach(wt[e])}))},Mt=(e,t,n={})=>{Ct(e,(({sender:e})=>{e(t,n)}))},qt=({frame:e})=>{const t=N(e,h);q(d)(t);Lt(v)};if(!rt&&!nt&&!window.hsFeedbackLoaded)if(Ve||Xe){let e,t={pageUrl:ft().href};Ct(f,(n=>{const{sender:r}=n;if(Ve){e=D;t={livePreviewId:Je}}else{e=B;qt(n)}r(S,{mode:e,hublet:Ze,clientLoadOnly:et,windowWidth:pt(),payload:Object.assign({},mt,t)})}))}else if(Ge){mt.hsEmail=Ke;Ct(l,(({sender:e})=>{e(S,{email:Ke,portalId:Be,pageUrl:ft().href,targetPortalId:De,isHubspot:Ge,hublet:Ze,clientLoadOnly:et});vt.setFetcher(e)}))}else bt.push(["addCookieListener",e=>{if(!e)return;const t=e.split(".")[1];mt.utk=t;Ct(l,(e=>{const{sender:n}=e;n(S,{pageUrl:ft().href,portalId:De,utk:t,hublet:Ze,clientLoadOnly:et});vt.setFetcher(n)}))}]);window.hsFeedbackLoaded=!0}(); //# sourceMappingURL=//static.hsappstatic.net/feedback-web-renderer-ui/static-1.30864/bundles/popupInjector.js.map