import{R as y}from"./jwt-decode.esm.54a1ea22.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="5cef2cac-11fa-473e-94ce-846d06651551",e._sentryDebugIdIdentifier="sentry-dbid-5cef2cac-11fa-473e-94ce-846d06651551")}catch{}})();var B={},_={};Object.defineProperty(_,"__esModule",{value:!0});_.regionAPIs=void 0;_.regionAPIs=new Map([["us","https://api-iam.intercom.io"],["eu","https://api-iam.eu.intercom.io"],["ap","https://api-iam.au.intercom.io"]]);var l={},L=y&&y.__awaiter||function(e,o,a,i){function t(d){return d instanceof a?d:new a(function(r){r(d)})}return new(a||(a=Promise))(function(d,r){function b(s){try{h(i.next(s))}catch(f){r(f)}}function I(s){try{h(i.throw(s))}catch(f){r(f)}}function h(s){s.done?d(s.value):t(s.value).then(b,I)}h((i=i.apply(e,o||[])).next())})};Object.defineProperty(l,"__esModule",{value:!0});l.ref=l.init=void 0;const S="_intercom_npm_loader",g=function(){g.loaderQueue(arguments)};g.q=[];g.loaderQueue=function(e){g.q.push(e)};const v=function(){var e,o,a=document;if(!a.getElementById(S)){var i=a.createElement("script");i.type="text/javascript",i.async=!0,i.id=S,i.src="https://widget.intercom.io/widget/"+((e=window.intercomSettings)===null||e===void 0?void 0:e.app_id);var t=a.getElementsByTagName("script")[0];(o=t.parentNode)===null||o===void 0||o.insertBefore(i,t)}},E=()=>document.readyState==="complete"||document.readyState==="interactive",Q=()=>L(void 0,void 0,void 0,function*(){var e=window,o=e.Intercom;e.intercomSettings&&(e.intercomSettings.installation_type="npm-package"),typeof o=="function"?(o("reattach_activator"),o("update",e.intercomSettings)):(e.Intercom=g,E()?v():(document.addEventListener("readystatechange",function(){E()&&v()}),e.attachEvent?e.attachEvent("onload",v):e.addEventListener("load",v,!1)))});l.init=Q;l.ref=void 0;(function(e){var o=y&&y.__rest||function(n,u){var m={};for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&u.indexOf(c)<0&&(m[c]=n[c]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,c=Object.getOwnPropertySymbols(n);w<c.length;w++)u.indexOf(c[w])<0&&Object.prototype.propertyIsEnumerable.call(n,c[w])&&(m[c[w]]=n[c[w]]);return m};Object.defineProperty(e,"__esModule",{value:!0}),e.onUserEmailSupplied=e.showConversation=e.showTicket=e.startChecklist=e.startSurvey=e.showNews=e.showArticle=e.startTour=e.getVisitorId=e.trackEvent=e.onUnreadCountChange=e.onShow=e.onHide=e.showNewMessage=e.showMessages=e.showSpace=e.show=e.hide=e.update=e.shutdown=e.boot=e.Intercom=void 0;const a=_,i=l,t=(n,...u)=>{typeof window!==void 0&&window.Intercom?window.Intercom(n,...u):console.warn("Please ensure Intercom is setup and running on client-side!")},d=n=>{if(typeof n!="object"){console.warn("Intercom initialiser called with invalid parameters.");return}const{region:u="us"}=n,m=o(n,["region"]);typeof window<"u"&&!i.ref&&(window.intercomSettings=Object.assign(Object.assign({},m),{api_base:a.regionAPIs.get(u)}),(0,i.init)())};e.Intercom=d,e.default=e.Intercom;const r=n=>t("boot",n);e.boot=r;const b=()=>t("shutdown");e.shutdown=b;const I=n=>t("update",n);e.update=I;const h=()=>t("hide");e.hide=h;const s=()=>t("show");e.show=s;const f=n=>t("showSpace",n);e.showSpace=f;const p=()=>t("showMessages");e.showMessages=p;const C=n=>t("showNewMessage",n);e.showNewMessage=C;const k=n=>t("onHide",n);e.onHide=k;const M=n=>t("onShow",n);e.onShow=M;const O=n=>t("onUnreadCountChange",n);e.onUnreadCountChange=O;const j=(...n)=>t("trackEvent",...n);e.trackEvent=j;const N=()=>t("getVisitorId");e.getVisitorId=N;const T=n=>t("startTour",n);e.startTour=T;const P=n=>t("showArticle",n);e.showArticle=P;const U=n=>t("showNews",n);e.showNews=U;const A=n=>t("startSurvey",n);e.startSurvey=A;const D=n=>t("startChecklist",n);e.startChecklist=D;const H=n=>t("showTicket",n);e.showTicket=H;const V=n=>t("showConversation",n);e.showConversation=V;const q=n=>t("onUserEmailSupplied",n);e.onUserEmailSupplied=q})(B);export{B as d};
//# sourceMappingURL=index.c7a996a6.js.map
