1"use strict";(self.webpackChunkgatsby_starter_website_future=self.webpackChunkgatsby_starter_website_future||[]).push([[1182],{31182:function(e,n,t){t.r(n),t.d(n,{init:function(){return m},plugin:function(){return w}});var i=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:r(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),r=function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},o=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(n){e(n)}),this.queue=[])},e}(),l=function(){return l=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},l.apply(this,arguments)};function s(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],i=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var i,r,o=t.call(e),l=[];try{for(;(void 0===n||n-- >0)&&!(i=o.next()).done;)l.push(i.value)}catch(s){r={error:s}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(r)throw r.error}}return l}var u=function(e,n){var t,i,r=typeof e;if(r!==typeof n)return!1;try{for(var o=s(["string","number","boolean","undefined"]),l=o.next();!l.done;l=o.next()){if(l.value===r)return e===n}}catch(v){t={error:v}}finally{try{l&&!l.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}if(null==e&&null==n)return!0;if(null==e||null==n||e.length!==n.length)return!1;var a=Array.isArray(e),c=Array.isArray(n);if(a!==c)return!1;if(!a||!c){var d=Object.keys(e).sort(),g=Object.keys(n).sort();if(!u(d,g))return!1;var f=!0;return Object.keys(e).forEach(function(t){u(e[t],n[t])||(f=!1)}),f}for(var p=0;p<e.length;p++)if(!u(e[p],n[p]))return!1;return!0};Object.entries||(Object.entries=function(e){for(var n=Object.keys(e),t=n.length,i=new Array(t);t--;)i[t]=[n[t],e[n[t]]];return i});var c=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,n=l({},this.identity.userProperties),t=l(l({},this.identity),{userProperties:n});return{setUserId:function(e){return t.userId=e,this},setDeviceId:function(e){return t.deviceId=e,this},setUserProperties:function(e){return t.userProperties=e,this},setOptOut:function(e){return t.optOut=e,this},updateUserProperties:function(e){var n,i,r,o,l,u,c=t.userProperties||{};try{for(var d=s(Object.entries(e)),g=d.next();!g.done;g=d.next()){var f=a(g.value,2),p=f[0],v=f[1];switch(p){case"$set":try{for(var h=(r=void 0,s(Object.entries(v))),y=h.next();!y.done;y=h.next()){var m=a(y.value,2),w=m[0],b=m[1];c[w]=b}}catch(U){r={error:U}}finally{try{y&&!y.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}break;case"$unset":try{for(var _=(l=void 0,s(Object.keys(v))),I=_.next();!I.done;I=_.next()){delete c[w=I.value]}}catch(U){l={error:U}}finally{try{I&&!I.done&&(u=_.return)&&u.call(_)}finally{if(l)throw l.error}}break;case"$clearAll":c={}}}}catch(U){n={error:U}}finally{try{g&&!g.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}return t.userProperties=c,this},commit:function(){return e.setIdentity(t),this}}},e.prototype.getIdentity=function(){return l({},this.identity)},e.prototype.setIdentity=function(e){var n=l({},this.identity);this.identity=l({},e),u(n,this.identity)||this.listeners.forEach(function(n){n(e)})},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),d=typeof globalThis<"u"?globalThis:typeof window<"u"?window:self,g=function(){function e(){this.identityStore=new c,this.eventBridge=new o,this.applicationContextProvider=new i}return e.getInstance=function(n){return d.analyticsConnectorInstances||(d.analyticsConnectorInstances={}),d.analyticsConnectorInstances[n]||(d.analyticsConnectorInstances[n]=new e),d.analyticsConnectorInstances[n]},e}(),f=["boot"],p=Symbol.for("amplitude-engagement-plugin-caller");var v,h=((v=h||{}).Local="https://local.amplitude.com:3010/",v.Staging="https://apps.stag2.amplitude.com/",v.Production="https://app.amplitude.com/",v.ProductionEU="https://app.eu.amplitude.com/",v);var y=((e=>{if(typeof window<"u"&&window.opener)for(let n of Object.values(h))window.opener.postMessage({message:e},n)})("ENGAGEMENT_SNIPPET"),function(e){var n,t,i,r,o,l,s,a,u,c,d;let v=typeof window<"u"?window.engagement:void 0,h=!1,y={_q:null!=(n=null==v?void 0:v._q)?n:[],_configuration:{apiKey:null!=(i=null==(t=null==v?void 0:v._configuration)?void 0:t.apiKey)?i:"",serverUrl:null==(r=null==v?void 0:v._configuration)?void 0:r.serverUrl,chatUrl:null==(o=null==v?void 0:v._configuration)?void 0:o.chatUrl,mediaUrl:null==(l=null==v?void 0:v._configuration)?void 0:l.mediaUrl,serverZone:null!=(a=null==(s=null==v?void 0:v._configuration)?void 0:s.serverZone)?a:"US",autoRefreshIntervalSeconds:null==(u=null==v?void 0:v._configuration)?void 0:u.autoRefreshIntervalSeconds,integrations:null==(c=null==v?void 0:v._configuration)?void 0:c.integrations,options:{...null==(d=null==v?void 0:v._configuration)?void 0:d.options}},init(n,t){var i,r,o,l;if(y._configuration.apiKey)return void console.log("Engagement SDK has already been initialized. Ignoring additional init call.");if(!0===(null==t?void 0:t.skip))return console.log("Engagement SDK init skipped via `skip: true`. The SDK bundle will not be loaded."),void(h=!0);if(h&&(y._q.length=0),h=!1,null!=t&&t.useEngagementDomain){let e="EU"===(null!=(i=t.serverZone)?i:y._configuration.serverZone),n="amplitudeengagement.com";t.serverUrl||(t.serverUrl=e?`https://gs.eu.${n}`:`https://gs.${n}`),t.chatUrl||(t.chatUrl=e?`https://houston-chat.eu.${n}`:`https://houston-chat.${n}`),t.mediaUrl||(t.mediaUrl=e?`https://engagement-static.eu.${n}`:`https://engagement-static.${n}`),t.cdnUrl||(t.cdnUrl=e?`https://cdn.eu.${n}`:`https://cdn.${n}`)}let s;if(y._configuration={...y._configuration,...t,apiKey:n,options:{splitting:!0,...y._configuration.options,...null==t?void 0:t.options}},null!=(o=null==(r=y._configuration)?void 0:r.options)&&o.logger&&y._configuration.options.logger.enable(null!=(l=y._configuration.options.logLevel)?l:2),null!=t&&t.cdnUrl)s=y._configuration.options.splitting?`${t.cdnUrl}/engagement-browser/prod/split/index.js`:t.cdnUrl+"/engagement-browser/prod/index.min.js.gz";else{let e="EU"===y._configuration.serverZone?"https://cdn.eu.amplitude.com":"https://cdn.amplitude.com";s=y._configuration.options.splitting?`${e}/engagement-browser/prod/split/index.js`:`${e}/engagement-browser/prod/index.min.js.gz`}let a=null,u=()=>{if(h=!0,a&&(clearTimeout(a),a=null),y._q&&y._q.length>0)for(console.warn(`Engagement SDK failed to load within ${c}
1ms. Resolving pending calls gracefully.`);y._q.length>0;){let e=y._q.shift();if(!e)continue;let n=e[0],t=f.includes(n);if(console.warn(`Engagement SDK method '${n}' still in queue (isAsyncMethod=${t}); attempting to resolve as no-op.`),t&&e[1]instanceof Function&&e[2]instanceof Function){let t=e[1];console.warn(`Engagement SDK method '${n}' resolved as no-op due to script loading failure`),t(void 0)}}};e(s,y._configuration.options.splitting?"module":void 0,null==t?void 0:t.nonce,u);let c=1e4;a=setTimeout(()=>{u()},c)},plugin(e){let n=y.init,t=null==e?void 0:e.token,i=!0===(null==e?void 0:e.skip),r=(e,n,i)=>{let r=i.getIdentity(),o="function"==typeof t?t():t;return{user_id:e.getUserId(),device_id:e.getDeviceId(),version:n.appVersion,user_properties:r.userProperties,getSessionId:e.getSessionId,...o?{token:o}:{}}};return{name:"@amplitude/engagement-browser",type:"enrichment",async setup(t,o){var l;if(i)return void n(t.apiKey,{skip:!0});let s=null!=(l=t.instanceName)?l:"$default_instance",a=g.getInstance(s).identityStore;y._configuration._installedViaPlugin=!0,n(t.apiKey,{serverZone:t.serverZone,...e,options:{logLevel:t.logLevel,logger:t.loggerProvider,...null==e?void 0:e.options}});let u=[{track:e=>{o.track(e)}}];await window.engagement.boot({user:()=>r(o,t,a),integrations:u},p),a.addIdentityListener(e=>{var n,i,l,s;null!=(n=window.engagement)&&n._.user&&null!=(i=window.engagement)&&i._analytics.hasBooted?(null==(s=null==(l=window.engagement)?void 0:l._.user)?void 0:s.user_id)!==e.userId?(window.engagement.shutdown(p),window.engagement.boot({user:()=>r(o,t,a),integrations:u},p)):window.engagement._setUserProperties(e.userProperties):console.warn("Engagement SDK not booted. Ignoring identity change.")})},async execute(e){return i||window.engagement.forwardEvent(e),e}}}},m=y;return new Proxy(y,{get:function(e,n){return n in m?m[n]:"then"!==n?"gs"===n||"rc"===n||"assistant"===n?new Proxy({},{get:function(e,t){return function(){let e=Array.from(arguments),i=`${n}.${t}`;e.unshift(i),y._q.push(e)}}}):f.includes(n)?function(){let e=Array.prototype.slice.call(arguments);return new Promise((t,i)=>{e.unshift(n,t,i),y._q.push(e),h&&t(void 0)})}:function(){let e=Array.prototype.slice.call(arguments);e.unshift(n),y._q.push(e)}:void 0}})}((e,n,t,i)=>function(e,n,t,i){for(let r of e){let e=document.createElement("script");e.src=r,e.id="engagement-sdk-bundle",t&&e.setAttribute("nonce",t),n&&e.setAttribute("type",n),i&&(e.onerror=i);let o=document.getElementsByTagName("head")[0];o&&o.appendChild(e)}}([e||"https://cdn.amplitude.com/engagement-browser/prod/index.min.js.gz"],n,t,i))),m=(e,n
1)=>{typeof window<"u"&&!window.engagement&&(window.engagement=y),y.init(e,n)},w=e=>(typeof window<"u"&&!window.engagement&&(window.engagement=y),y.plugin(e))}}]); 2//# sourceMappingURL=1182-e5cef013982ded0e770d.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.