!function(){"use strict";var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n=function(t){return t&&t.Math==Math&&t},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")(),o=function(t){try{return!!t()}catch(t){return!0}},i=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,a={f:u&&!c.call({1:2},1)?function(t){var e=u(this,t);return!!e&&e.enumerable}:c},s=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},f={}.toString,l=function(t){return f.call(t).slice(8,-1)},p="".split,g=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==l(t)?p.call(t,""):Object(t)}:Object,d=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},y=function(t){return g(d(t))},h=function(t){return"object"==typeof t?null!==t:"function"==typeof t},b=function(t,e){if(!h(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!h(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!h(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!h(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},v={}.hasOwnProperty,m=function(t,e){return v.call(t,e)},O=r.document,w=h(O)&&h(O.createElement),S=function(t){return w?O.createElement(t):{}},j=!i&&!o((function(){return 7!=Object.defineProperty(S("div"),"a",{get:function(){return 7}}).a})),E=Object.getOwnPropertyDescriptor,I={f:i?E:function(t,e){t=y(t);e=b(e,!0);if(j)try{return E(t,e)}catch(t){}if(m(t,e))return s(!a.f.call(t,e),t[e])}},$=function(t){if(!h(t))throw TypeError(String(t)+" is not an object");return t},k=Object.defineProperty,x={f:i?k:function(t,e,n){$(t);e=b(e,!0);$(n);if(j)try{return k(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");"value"in n&&(t[e]=n.value);return t}},T=i?function(t,e,n){return x.f(t,e,s(1,n))}:function(t,e,n){t[e]=n;return t},P=function(t,e){try{T(r,t,e)}catch(n){r[t]=e}return e},C="__core-js_shared__",N=r[C]||P(C,{}),R=Function.toString;"function"!=typeof N.inspectSource&&(N.inspectSource=function(t){return R.call(t)});var A,L,M,F=N.inspectSource,D=r.WeakMap,q="function"==typeof D&&/native code/.test(F(D)),H=!1,U=e((function(t){(t.exports=function(t,e){return N[t]||(N[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:H?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),_=0,G=Math.random(),B=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++_+G).toString(36)},V=U("keys"),X=function(t){return V[t]||(V[t]=B(t))},z={},J=r.WeakMap,K=function(t){return M(t)?L(t):A(t,{})},W=function(t){return function(e){var n;if(!h(e)||(n=L(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}};if(q){var Y=new J,Q=Y.get,Z=Y.has,tt=Y.set;A=function(t,e){tt.call(Y,t,e);return e};L=function(t){return Q.call(Y,t)||{}};M=function(t){return Z.call(Y,t)}}else{var et=X("state");z[et]=!0;A=function(t,e){T(t,et,e);return e};L=function(t){return m(t,et)?t[et]:{}};M=function(t){return m(t,et)}}var nt={set:A,get:L,has:M,enforce:K,getterFor:W},rt=(nt.set,nt.get,nt.has,nt.enforce,nt.getterFor,e((function(t){var e=nt.get,n=nt.enforce,o=String(String).split("String");(t.exports=function(t,e,i,c){var u=!!c&&!!c.unsafe,a=!!c&&!!c.enumerable,s=!!c&&!!c.noTargetGet;if("function"==typeof i){"string"!=typeof e||m(i,"name")||T(i,"name",e);n(i).source=o.join("string"==typeof e?e:"")}if(t!==r){u?!s&&t[e]&&(a=!0):delete t[e];a?t[e]=i:T(t,e,i)}else a?t[e]=i:P(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||F(this)}))}))),ot=r,it=function(t){return"function"==typeof t?t:void 0},ct=function(t,e){return arguments.length<2?it(ot[t])||it(r[t]):ot[t]&&ot[t][e]||r[t]&&r[t][e]},ut=Math.ceil,at=Math.floor,st=function(t){return isNaN(t=+t)?0:(t>0?at:ut)(t)},ft=Math.min,lt=function(t){return t>0?ft(st(t),9007199254740991):0},pt=Math.max,gt=Math.min,dt=function(t,e){var n=st(t);return n<0?pt(n+e,0):gt(n,e)},yt=function(t){return function(e,n,r){var o,i=y(e),c=lt(i.length),u=dt(r,c);if(t&&n!=n){for(;c>u;)if((o=i[u++])!=o)return!0}else for(;c>u;u++)if((t||u in i)&&i[u]===n)return t||u||0;return!t&&-1}},ht={includes:yt(!0),indexOf:yt(!1)},bt=(ht.includes,ht.indexOf,ht.indexOf),vt=function(t,e){var n,r=y(t),o=0,i=[];for(n in r)!m(z,n)&&m(r,n)&&i.push(n);for(;e.length>o;)m(r,n=e[o++])&&(~bt(i,n)||i.push(n));return i},mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ot=mt.concat("length","prototype"),wt={f:Object.getOwnPropertyNames||function(t){return vt(t,Ot)}},St={f:Object.getOwnPropertySymbols},jt=ct("Reflect","ownKeys")||function(t){var e=wt.f($(t)),n=St.f;return n?e.concat(n(t)):e},Et=function(t,e){for(var n=jt(e),r=x.f,o=I.f,i=0;io;)for(var s,f=g(arguments[o++]),l=c?At(f).concat(c(f)):At(f),p=l.length,d=0;p>d;){s=l[d++];i&&!u.call(f,s)||(n[s]=f[s])}return n}:Mt;Rt({target:"Object",stat:!0,forced:Object.assign!==Dt},{assign:Dt});var qt=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())})),Ht=qt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ut=U("wks"),_t=r.Symbol,Gt=Ht?_t:_t&&_t.withoutSetter||B,Bt=function(t){m(Ut,t)||(qt&&m(_t,t)?Ut[t]=_t[t]:Ut[t]=Gt("Symbol."+t));return Ut[t]},Vt=Bt("match"),Xt=function(t){var e;return h(t)&&(void 0!==(e=t[Vt])?!!e:"RegExp"==l(t))},zt=function(){var t=$(this),e="";t.global&&(e+="g");t.ignoreCase&&(e+="i");t.multiline&&(e+="m");t.dotAll&&(e+="s");t.unicode&&(e+="u");t.sticky&&(e+="y");return e},Jt=Bt("replace"),Kt=RegExp.prototype;Rt({target:"String",proto:!0},{replaceAll:function t(e,n){var r,o,i,c,u,a,s,f,l=d(this);if(null!=e){if((r=Xt(e))&&!~String(d("flags"in Kt?e.flags:zt.call(e))).indexOf("g"))throw TypeError("`.replaceAll` does not allow non-global regexes");if(void 0!==(o=e[Jt]))return o.call(e,l,n);if(H&&r)return String(l).replace(e,n)}i=String(l);if(""===(c=String(e)))return t.call(i,/(?:)/g,n);u=i.split(c);if("function"!=typeof n)return u.join(String(n));s=(a=u[0]).length;for(f=1;f=0||(o[n]=t[n])}return o}const e="na1";function n(t=""){return t&&t!==e?`-${t}`:""}const r="FETCHER",o="load-survey",i="location-change",c="ready",u="setup",a="fetched",s="load-config-only",f="config-fetched",l="show-loaded-config",p=()=>location,g=/^.*hsappstatic\.net\/feedback-web-renderer-ui\/static-(\d+(?:-\w+-?)*\.\d+).*$/,d=[].slice.call(document.getElementsByTagName("script")).map((t=>t.src)).filter((t=>g.test(t)))[0],y=d&&g.exec(d)?g.exec(d)[1]:"unknown",h=!/hubspot\.com$/.test(p().host),b=URL.createObjectURL(new Blob([])).slice(-36).replace(/-/g,"");document.location.pathname.indexOf("nps"),p().href;var v=(t,e,{onerror:n,headers:r={},withCredentials:o=!1}={})=>{const i=new XMLHttpRequest;i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE){const{responseText:t,status:r}=i;if(r>=200&&r<300){const n=t?JSON.parse(t):{};e(n)}else n&&n(i)}};i.open("GET",t);o&&(i.withCredentials=!0);Object.keys(r).forEach((t=>{i.setRequestHeader(t,r[t])}));i.send()};const m="CSAT",O="NPS",w="INFINITE";function S(t){var e=j(t,"string");return"symbol"==typeof e?e:String(e)}function j(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}const E="FEEDBACK_IGNORED",I="&",$=t=>{let e;try{e=localStorage.getItem(t)}catch(t){console.error(t)}if(!e)return!1;if(new Date(e)>new Date)return!0;try{localStorage.removeItem(t)}catch(t){console.error(t)}return!1};Object.keys(localStorage||{}).forEach((t=>{0===t.indexOf(E)&&$(t)}));const k=(t,e,n,r)=>{const o=[E,t,e,n].join(I);return r!==w&&$(o)},x=t=>new RegExp(`FEEDBACK_IGNORED&(CSAT|NPS)&(\\d+)&${t}`),T=e=>{const n=x(e);return Object.keys(localStorage||{}).reduce(((r,o)=>{const i=o.match(n);if(null===i)return r;const c=parseInt(i[2],10),u=i[1];if(!k(u,c,e))return r;const{[u]:a}=r,s=t(r,[u].map(S));return Object.assign({},s,{[u]:[...a,c].sort()})}),{[m]:[],[O]:[]})},P=t=>{if(!t||""===t)return null;const e=t.split("/");return`${e[0]}//${e[2]}`},C=(t,e)=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`,N=t=>Object.keys(t).reduce(((e,n)=>{const r=t[n];return[...e,...Array.isArray(r)?r.map((t=>C(n,t))):[C(n,r)]]}),[]).join("&");var R=t=>{let e=!0,n=[];const r=(...t)=>{n.forEach((e=>{e(...t)}))};return o=>{e&&0===n.length&&(e=t(r));n.push(o);return()=>{const t=n.length;n=n.filter((t=>t!==o));e&&0===n.length&&t>0&&e()}}},A=(t,e,n={})=>R((r=>{t.addEventListener(e,r,n);return()=>{t.removeEventListener(e,r,n)}}));const L=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),M=(t,e)=>{const n=P(t);if(null===n)return()=>{};const r=new RegExp(`^${L(n)}$`),o=A(window,"message");return t=>o((({data:n,origin:o,source:i})=>{if(!n||!r.test(o))return;let c;try{c=JSON.parse(n)}catch(t){return}const{payload:u,type:a}=c;if(!u||a!==D)return;const{channel:s,payload:{messageType:f,payload:l}}=u;s===e&&t(f,l,o,i)}))},F=t=>M(document.referrer,t);const D="hubspot-servicehub-feedback",q=(t,e,n)=>(r,o)=>{e.postMessage(JSON.stringify({payload:{channel:t,payload:{messageType:r,payload:o}},type:D}),n||"*")},H=t=>q(t,window.parent,document.referrer),U=(t=window.document.cookie)=>{const e=/csrf.app=([^;]+);?/.exec(t);return e&&e[1]},_=()=>({Accept:"application/json, text/javascript, */*; q=0.01","Content-type":"application/json","X-HubSpot-CSRF-hubspotapi":U()}),G=t=>`hubspot${t?"qa":""}.com/feedback-proxy`,B=["customerPortalId","portalId"],V=["customerPortalId","portalId"],X=["pageUrl","isHubspot","hublet","clientLoadOnly"];let z,J,K,W;const Y=`hubapi${h?"qa":""}.com/feedback`,Q=G(h),Z=H(r),tt=[];let et;const nt=()=>{const t=T(J.portalId);return Object.keys(t).reduce(((e,n)=>Object.assign({},e,{[`excludedIds.${n}`]:t[n]})),{})},rt=t=>{et=!1;at();t.config&&Z(a,t)},ot=t=>{t.config&&Z(a,t)},it=t=>{if(!t.config)return;const{portalId:e}=J;Z(f,Object.assign({},t,{config:Object.assign({},t.config,{portalId:e})}))},ct=(e,r=(()=>{}),o=(()=>{}))=>{const i=`https://api${n(z)}.${Q}/v1`,{customerPortalId:c,portalId:u}=J,a=t(J,B),s=Object.assign({},a,{bundleVersion:y,portalId:c||u});v(`${i}/survey-config/CSAT/${e}/can-show?${N(s)}`,r,{headers:_(),withCredentials:!0,onerror:o})},ut=(e,r,o=(()=>{}))=>{et=!0;const{customerPortalId:i,portalId:c}=J,u=t(J,V),a=Object.assign({},u,{bundleVersion:y,portalId:i||c}),s=n(z);v(`${`https://api${s}.${Q}/v1`}/survey-config/${e}/${r}?${N(a)}`,o,{headers:_(),withCredentials:!0})},at=()=>{if(!J.portalId)return;if(K&&W)return;if(et||0===tt.length)return;et=!0;const t=tt.shift(),e=nt(),r=Object.assign({},J,{bundleVersion:y,currentUrl:t,pageUrl:t},e);if(!r.portalId)return;let o={"X-HS-Referer":t};K&&(o=Object.assign({},o,_()));const i=n(z);v(`${K?`https://api${i}.${Q}/v1/survey-config/web`:`https://feedback${i}.${Y}/public/v1/web-config`}?${N(r)}`,rt,{headers:o,withCredentials:K})},st=(e,n)=>{switch(e){case u:{const{pageUrl:e,isHubspot:r,hublet:o,clientLoadOnly:i}=n,c=t(n,X);tt.push(e);z=o;J=c;K=r;W=i;break}case s:{const{surveyType:t,surveyId:e}=n;ut(t,e,it);break}case i:tt.push(n);break;case o:{const{surveyType:t,surveyId:e}=n;"CSAT"===t?ct(e,(({allowed:n})=>{n&&ut(t,e,rt)}),(()=>{ut(t,e,rt)})):ut(t,e,rt);break}case l:ot(n)}at()};F(r)(st);Z(c)}(); //# sourceMappingURL=//static.hsappstatic.net/feedback-web-renderer-ui/static-1.30864/bundles/fetcher.js.map