!function(){var t,e,n,r,i={8878:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(325));function o(t,e){return function(){var n=this.traits(),r=this.properties?this.properties():{};return i.default(n,"address."+t)||i.default(n,t)||(e?i.default(n,"address."+e):null)||(e?i.default(n,e):null)||i.default(r,"address."+t)||i.default(r,t)||(e?i.default(r,"address."+e):null)||(e?i.default(r,e):null)}}e.default=function(t){t.zip=o("postalCode","zip"),t.country=o("country"),t.street=o("street"),t.state=o("state"),t.city=o("city"),t.region=o("region")}},4780:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Alias=void 0;var i=r(n(1285)),o=n(9512);function s(t,e){o.Facade.call(this,t,e)}e.Alias=s,i.default(s,o.Facade),s.prototype.action=function(){return"alias"},s.prototype.type=s.prototype.action,s.prototype.previousId=function(){return this.field("previousId")||this.field("from")},s.prototype.from=s.prototype.previousId,s.prototype.userId=function(){return this.field("userId")||this.field("to")},s.prototype.to=s.prototype.userId},4814:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.clone=void 0,e.clone=function t(e){if("[object Object]"===Object.prototype.toString.call(e)){var n={};for(var r in e)n[r]=t(e[r]);return n}return Array.isArray(e)?e.map(t):e}},5257:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=void 0;var i=r(n(1285)),o=n(9512);function s(t,e){o.Facade.call(this,t,e)}e.Delete=s,i.default(s,o.Facade),s.prototype.type=function(){return"delete"}},9512:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Facade=void 0;var i=r(n(8878)),o=n(4814),s=r(n(2272)),u=r(n(5870)),a=r(n(325)),c=r(n(6279));function l(t,e){e=e||{},this.raw=o.clone(t),"clone"in e||(e.clone=!0),e.clone&&(t=o.clone(t)),"traverse"in e||(e.traverse=!0),t.timestamp="timestamp"in t?u.default(t.timestamp):new Date,e.traverse&&c.default(t),this.opts=e,this.obj=t}e.Facade=l;var p=l.prototype;function f(t){return o.clone(t)}p.proxy=function(t){var e=t.split("."),n=this[t=e.shift()]||this.field(t);return n?("function"==typeof n&&(n=n.call(this)||{}),0===e.length||(n=a.default(n,e.join("."))),this.opts.clone?f(n):n):n},p.field=function(t){var e=this.obj[t];return this.opts.clone?f(e):e},l.proxy=function(t){return function(){return this.proxy(t)}},l.field=function(t){return function(){return this.field(t)}},l.multi=function(t){return function(){var e=this.proxy(t+"s");if(Array.isArray(e))return e;var n=this.proxy(t);return n&&(n=[this.opts.clone?o.clone(n):n]),n||[]}},l.one=function(t){return function(){var e=this.proxy(t);if(e)return e;var n=this.proxy(t+"s");return Array.isArray(n)?n[0]:void 0}},p.json=function(){var t=this.opts.clone?o.clone(this.obj):this.obj;return this.type&&(t.type=this.type()),t},p.rawEvent=function(){return this.raw},p.options=function(t){var e=this.obj.options||this.obj.context||{},n=this.opts.clone?o.clone(e):e;if(!t)return n;if(this.enabled(t)){var r=this.integrations(),i=r[t]||a.default(r,t);return"object"!=typeof i&&(i=a.default(this.options(),t)),"object"==typeof i?i:{}}},p.context=p.options,p.enabled=function(t){var e=this.proxy("options.providers.all");"boolean"!=typeof e&&(e=this.proxy("options.all")),"boolean"!=typeof e&&(e=this.proxy("integrations.all")),"boolean"!=typeof e&&(e=!0);var n=e&&s.default(t),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(t)&&(n=r.providers[t]),r.hasOwnProperty(t)){var i=r[t];n="boolean"!=typeof i||i}return!!n},p.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},p.active=function(){var t=this.proxy("options.active");return null==t&&(t=!0),t},p.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},p.sessionId=p.anonymousId,p.groupId=l.proxy("options.groupId"),p.traits=function(t){var e=this.proxy("options.traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();null!=i&&(e[t[r]]=i,delete e[r])}return e},p.library=function(){var t=this.proxy("options.library");return t?"string"==typeof t?{name:t,version:null}:t:{name:"unknown",version:null}},p.device=function(){var t=this.proxy("context.device");"object"==typeof t&&null!==t||(t={});var e=this.library().name;return t.type||(e.indexOf("ios")>-1&&(t.type="ios"),e.indexOf("android")>-1&&(t.type="android")),t},p.userAgent=l.proxy("context.userAgent"),p.timezone=l.proxy("context.timezone"),p.timestamp=l.field("timestamp"),p.channel=l.field("channel"),p.ip=l.proxy("context.ip"),p.userId=l.field("userId"),i.default(p)},615:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Group=void 0;var i=r(n(1285)),o=r(n(4554)),s=r(n(5870)),u=n(9512);function a(t,e){u.Facade.call(this,t,e)}e.Group=a,i.default(a,u.Facade);var c=a.prototype;c.action=function(){return"group"},c.type=c.action,c.groupId=u.Facade.field("groupId"),c.created=function(){var t=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(t)return s.default(t)},c.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.groupId();return o.default(e)?e:void 0},c.traits=function(t){var e=this.properties(),n=this.groupId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(e[t[r]]=i,delete e[r])}return e},c.name=u.Facade.proxy("traits.name"),c.industry=u.Facade.proxy("traits.industry"),c.employees=u.Facade.proxy("traits.employees"),c.properties=function(){return this.field("traits")||this.field("properties")||{}}},4705:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Identify=void 0;var i=n(9512),o=r(n(325)),s=r(n(1285)),u=r(n(4554)),a=r(n(5870)),c=function(t){return t.trim()};function l(t,e){i.Facade.call(this,t,e)}e.Identify=l,s.default(l,i.Facade);var p=l.prototype;p.action=function(){return"identify"},p.type=p.action,p.traits=function(t){var e=this.field("traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(e[t[r]]=i,r!==t[r]&&delete e[r])}return e},p.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.userId();return u.default(e)?e:void 0},p.created=function(){var t=this.proxy("traits.created")||this.proxy("traits.createdAt");if(t)return a.default(t)},p.companyCreated=function(){var t=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(t)return a.default(t)},p.companyName=function(){return this.proxy("traits.company.name")},p.name=function(){var t=this.proxy("traits.name");if("string"==typeof t)return c(t);var e=this.firstName(),n=this.lastName();return e&&n?c(e+" "+n):void 0},p.firstName=function(){var t=this.proxy("traits.firstName");if("string"==typeof t)return c(t);var e=this.proxy("traits.name");return"string"==typeof e?c(e).split(" ")[0]:void 0},p.lastName=function(){var t=this.proxy("traits.lastName");if("string"==typeof t)return c(t);var e=this.proxy("traits.name");if("string"==typeof e){var n=c(e).indexOf(" ");if(-1!==n)return c(e.substr(n+1))}},p.uid=function(){return this.userId()||this.username()||this.email()},p.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},p.age=function(){var t=this.birthday(),e=o.default(this.traits(),"age");return null!=e?e:t instanceof Date?(new Date).getFullYear()-t.getFullYear():void 0},p.avatar=function(){var t=this.traits();return o.default(t,"avatar")||o.default(t,"photoUrl")||o.default(t,"avatarUrl")},p.position=function(){var t=this.traits();return o.default(t,"position")||o.default(t,"jobTitle")},p.username=i.Facade.proxy("traits.username"),p.website=i.Facade.one("traits.website"),p.websites=i.Facade.multi("traits.website"),p.phone=i.Facade.one("traits.phone"),p.phones=i.Facade.multi("traits.phone"),p.address=i.Facade.proxy("traits.address"),p.gender=i.Facade.proxy("traits.gender"),p.birthday=i.Facade.proxy("traits.birthday")},4122:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0){var c=!1,l=function(){c||(c=!0,s.flush().catch(a),c=!1,setTimeout(l,s.flushTimer))};l()}}return t.prototype.increment=function(t,e){if(t.includes("analytics_js.")&&0!==e.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=function(t,e,n){var i=e.reduce((function(t,e){var n=e.split(":"),r=n[0],i=n[1];return t[r]=i,t}),{});return{type:"Counter",metric:t,value:1,tags:(0,r.pi)((0,r.pi)({},i),{library:"analytics.js",library_version:"web"===n?"next-".concat(o.i):"npm:next-".concat(o.i)})}}(t,e,(0,s.B)());this.queue.push(n),t.includes("error")&&this.flush().catch(a)}},t.prototype.flush=function(){return(0,r.mG)(this,void 0,Promise,(function(){var t=this;return(0,r.Jh)(this,(function(e){switch(e.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(e){a(e),t.sampleRate=0}))];case 1:return e.sent(),[2]}}))}))},t.prototype.send=function(){return(0,r.mG)(this,void 0,Promise,(function(){var t,e,n;return(0,r.Jh)(this,(function(r){return t={series:this.queue},this.queue=[],e={"Content-Type":"text/plain"},n="".concat(this.protocol,"://").concat(this.host,"/m"),[2,(0,i.h)(n,{headers:e,body:JSON.stringify(t),method:"POST"})]}))}))},t}()},4278:function(t,e,n){"use strict";n.d(e,{i:function(){return r}});var r="1.76.0"},584:function(t,e,n){"use strict";n.d(e,{M:function(){return r}});try{window.analyticsWriteKey="3vRBBadZlO53w9y4lTHnLCkRXvpO2XoF"}catch(t){}function r(){if(void 0!==window.analyticsWriteKey)return window.analyticsWriteKey!==["__","WRITE","_","KEY","__"].join("")?window.analyticsWriteKey:void 0}},4759:function(t,e,n){"use strict";function r(t,e){return e=e||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],s=[],u={},a=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(JSON.parse(i.responseText))},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:a,headers:{keys:function(){return o},entries:function(){return s},get:function(t){return u[t.toLowerCase()]},has:function(t){return t.toLowerCase()in u}}}};for(var c in i.open(e.method||"get",t,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(t,e,n){o.push(e=e.toLowerCase()),s.push([e,n]),u[e]=u[e]?u[e]+","+n:n})),n(a())},i.onerror=r,i.withCredentials="include"==e.credentials,e.headers)i.setRequestHeader(c,e.headers[c]);i.send(e.body||null)}))}n.d(e,{h:function(){return o}});var i=n(3744),o=function(){for(var t=[],e=0;et}(o);if(s)return u.setItem(r,JSON.stringify((new Date).getTime()+50)),e(),void u.removeItem(r);!s&&n<3?setTimeout((function(){p(t,e,n+1)}),50):console.error("Unable to retrieve lock")}var f=function(t){function e(e,n){var i=t.call(this,e,[])||this,o="persisted-queue:v1:".concat(n,":items"),s="persisted-queue:v1:".concat(n,":seen"),f=[],d={};return p(n,(function(){try{f=a(o),d=c(s),l(o),l(s),i.queue=(0,r.ev)((0,r.ev)([],f,!0),i.queue,!0),i.seen=(0,r.pi)((0,r.pi)({},d),i.seen)}catch(t){console.error(t)}})),window.addEventListener("pagehide",(function(){if(i.todo>0){var t=(0,r.ev)((0,r.ev)([],i.queue,!0),i.future,!0);try{p(n,(function(){!function(t,e){var n=a(t),i=(0,r.ev)((0,r.ev)([],e,!0),n,!0).reduce((function(t,e){var n;return(0,r.pi)((0,r.pi)({},t),((n={})[e.id]=e,n))}),{});u.setItem(t,JSON.stringify(Object.values(i)))}(o,t),function(t,e){var n=c(t);u.setItem(t,JSON.stringify((0,r.pi)((0,r.pi)({},n),e)))}(s,i.seen)}))}catch(t){console.error(t)}}})),i}return(0,r.ZT)(e,t),e}(i.Z)},9950:function(t,e,n){"use strict";n.d(e,{D:function(){return i}});var r=n(4122);function i(t,e){var n=new r.Facade(t,e);return"track"===t.type&&(n=new r.Track(t,e)),"identify"===t.type&&(n=new r.Identify(t,e)),"page"===t.type&&(n=new r.Page(t,e)),"alias"===t.type&&(n=new r.Alias(t,e)),"group"===t.type&&(n=new r.Group(t,e)),"screen"===t.type&&(n=new r.Screen(t,e)),Object.defineProperty(n,"obj",{value:t,writable:!0}),n}},6175:function(t,e,n){"use strict";n.d(e,{B:function(){return o},X:function(){return i}});var r="npm";function i(t){r=t}function o(){return r}},6338:function(t,e,n){"use strict";n.r(e),n.d(e,{applyDestinationMiddleware:function(){return s},sourceMiddlewarePlugin:function(){return u}});var r=n(5163),i=n(1494),o=n(9950);function s(t,e,n){return(0,r.mG)(this,void 0,Promise,(function(){function i(e,n){return(0,r.mG)(this,void 0,Promise,(function(){var i,s,u;return(0,r.Jh)(this,(function(a){switch(a.label){case 0:return i=!1,s=null,[4,n({payload:(0,o.D)(e,{clone:!0,traverse:!1}),integration:t,next:function(t){i=!0,null===t&&(s=null),t&&(s=t.obj)}})];case 1:return a.sent(),i||null===s||(s.integrations=(0,r.pi)((0,r.pi)({},e.integrations),((u={})[t]=!1,u))),[2,s]}}))}))}var s,u,a,c,l;return(0,r.Jh)(this,(function(t){switch(t.label){case 0:s=(0,o.D)(e,{clone:!0,traverse:!1}).rawEvent(),u=0,a=n,t.label=1;case 1:return u0&&i[i.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]1){var t=this._logs.reduce((function(t,e){var n,r,i,s=(0,o.pi)((0,o.pi)({},e),{json:JSON.stringify(e.extras,null," "),extras:e.extras});delete s.time;var u=null!==(i=null===(r=e.time)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"";return t[u]&&(u="".concat(u,"-").concat(Math.random())),(0,o.pi)((0,o.pi)({},t),((n={})[u]=s,n))}),{});console.table?console.table(t):console.log(t)}else this.logs.forEach((function(t){var e=t.level,n=t.message,r=t.extras;"info"===e||"debug"===e?console.log(n,null!=r?r:""):console[e](n,null!=r?r:"")}));this._logs=[]},t}(),u=n(417),a=function(t){var e,n,r;this.retry=null===(e=t.retry)||void 0===e||e,this.type=null!==(n=t.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=t.reason)&&void 0!==r?r:""},c=function(){function t(t,e,n,i){void 0===e&&(e=(0,r.v4)()),void 0===n&&(n=new u.i),void 0===i&&(i=new s),this.attempts=0,this.event=t,this._id=e,this.logger=i,this.stats=n}return t.system=function(){},t.prototype.isSame=function(t){return t.id===this.id},t.prototype.cancel=function(t){if(t)throw t;throw new a({reason:"Context Cancel"})},t.prototype.log=function(t,e,n){this.logger.log(t,e,n)},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),t.prototype.updateEvent=function(t,e){var n;if("integrations"===t.split(".")[0]){var r=t.split(".")[1];if(!1===(null===(n=this.event.integrations)||void 0===n?void 0:n[r]))return this.event}return(0,i.N)(this.event,t,e),this.event},t.prototype.failedDelivery=function(){return this._failedDelivery},t.prototype.setFailedDelivery=function(t){this._failedDelivery=t},t.prototype.logs=function(){return this.logger.logs},t.prototype.flush=function(){this.logger.flush(),this.stats.flush()},t.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},t}()},3098:function(t,e,n){"use strict";n.d(e,{M:function(){return o},Z:function(){return s}});var r=n(5163),i=n(7830);var o="onRemoveFromFuture",s=function(t){function e(e,n,r){var i=t.call(this)||this;return i.future=[],i.maxAttempts=e,i.queue=n,i.seen=null!=r?r:{},i}return(0,r.ZT)(e,t),e.prototype.push=function(){for(var t=this,e=[],n=0;nt.maxAttempts||t.includes(e))&&(t.queue.push(e),!0)}));return this.queue=this.queue.sort((function(e,n){return t.getAttempts(e)-t.getAttempts(n)})),r},e.prototype.pushWithBackoff=function(t,e){var n=this;if(void 0===e&&(e=0),0==e&&0===this.getAttempts(t))return this.push(t)[0];var r=this.updateAttempts(t);if(r>this.maxAttempts||this.includes(t))return!1;var i=function(t){var e=Math.random()+1,n=t.minTimeout,r=void 0===n?500:n,i=t.factor,o=void 0===i?2:i,s=t.attempt,u=t.maxTimeout,a=void 0===u?1/0:u;return Math.min(e*r*Math.pow(o,s),a)}({attempt:r-1});return e>0&&ithis.maxListeners&&(console.warn("Event Emitter: Possible memory leak detected; ".concat(String(t)," has exceeded ").concat(this.maxListeners," listeners.")),this.warned=!0)},t.prototype.on=function(t,e){return this.callbacks[t]?(this.callbacks[t].push(e),this.warnIfPossibleMemoryLeak(t)):this.callbacks[t]=[e],this},t.prototype.once=function(t,e){var n=this,r=function(){for(var i=[],o=0;o256){for(r=Array(e=256);e--;)r[e]=256*Math.random()|0;e=i=0}for(;e<16;e++)t=r[i+e],n+=6==e?o[15&t|64]:8==e?o[63&t|128]:o[t],1&e&&e>1&&e<11&&(n+="-");return i++,n}},380:function(t,e,n){"use strict";function r(t,e,n){e.split&&(e=e.split("."));for(var r,i,o=0,s=e.length,u=t;o-1?t:t+e}(r,o):-1===(n=(e=s).indexOf("#"))?e:e.slice(0,n);return{path:c,referrer:u,search:o,title:a,url:l}},_=function(){var t=document.querySelector("link[rel='canonical']");return g(location.href,t&&t.getAttribute("href")||void 0,location.search,location.pathname,document.title,document.referrer)},x=function(e,n){void 0===n&&(n=w(_()));var r,i,o,s=e.context;"page"===e.type&&(r=e.properties&&(i=e.properties,o=Object.keys(n),Object.assign.apply(Object,(0,t.ev)([{}],o.map((function(t){var e;if(i&&Object.prototype.hasOwnProperty.call(i,t))return(e={})[t]=i[t],e})),!1))),e.properties=(0,t.pi)((0,t.pi)((0,t.pi)({},n),e.properties),e.name?{name:e.name}:{})),s.page=(0,t.pi)((0,t.pi)((0,t.pi)({},n),r),s.page)},S=s(380),P=function(e){function n(t,n){var r=e.call(this,"".concat(t," ").concat(n))||this;return r.field=t,r}return(0,t.ZT)(n,e),n}(Error),j="is not a string",I="is not an object",k="is nil";function O(t){!function(t){if(!(0,o.Gg)(t))throw new P("Event",k);if("object"!=typeof t)throw new P("Event",I)}(t),function(t){if(!(0,o.HD)(t.type))throw new P(".type",j)}(t),function(t){if(!(0,o.HD)(t.messageId))throw new P(".messageId",j)}(t),"track"===t.type&&(function(t){if(!(0,o.HD)(t.event))throw new P(".event",j)}(t),function(t){if(!(0,o.PO)(t.properties))throw new P(".properties",I)}(t)),["group","identify"].includes(t.type)&&function(t){if(!(0,o.PO)(t.traits))throw new P(".traits",I)}(t)}var M=function(t){var e,n;this.settings=t,this.createMessageId=t.createMessageId,this.onEventMethodCall=null!==(e=t.onEventMethodCall)&&void 0!==e?e:function(){},this.onFinishedEvent=null!==(n=t.onFinishedEvent)&&void 0!==n?n:function(){}},E=function(){function e(t){this.settings=new M(t)}return e.prototype.track=function(e,n,r,i){return this.settings.onEventMethodCall({type:"track",options:r}),this.normalize((0,t.pi)((0,t.pi)({},this.baseEvent()),{event:e,type:"track",properties:null!=n?n:{},options:(0,t.pi)({},r),integrations:(0,t.pi)({},i)}))},e.prototype.page=function(e,n,r,i,o){var s;this.settings.onEventMethodCall({type:"page",options:i});var u={type:"page",properties:(0,t.pi)({},r),options:(0,t.pi)({},i),integrations:(0,t.pi)({},o)};return null!==e&&(u.category=e,u.properties=null!==(s=u.properties)&&void 0!==s?s:{},u.properties.category=e),null!==n&&(u.name=n),this.normalize((0,t.pi)((0,t.pi)({},this.baseEvent()),u))},e.prototype.screen=function(e,n,r,i,o){this.settings.onEventMethodCall({type:"screen",options:i});var s={type:"screen",properties:(0,t.pi)({},r),options:(0,t.pi)({},i),integrations:(0,t.pi)({},o)};return null!==e&&(s.category=e),null!==n&&(s.name=n),this.normalize((0,t.pi)((0,t.pi)({},this.baseEvent()),s))},e.prototype.identify=function(e,n,r,i){return this.settings.onEventMethodCall({type:"identify",options:r}),this.normalize((0,t.pi)((0,t.pi)({},this.baseEvent()),{type:"identify",userId:e,traits:null!=n?n:{},options:(0,t.pi)({},r),integrations:i}))},e.prototype.group=function(e,n,r,i){return this.settings.onEventMethodCall({type:"group",options:r}),this.normalize((0,t.pi)((0,t.pi)({},this.baseEvent()),{type:"group",traits:null!=n?n:{},options:(0,t.pi)({},r),integrations:(0,t.pi)({},i),groupId:e}))},e.prototype.alias=function(e,n,r,i){this.settings.onEventMethodCall({type:"alias",options:r});var o={userId:e,type:"alias",options:(0,t.pi)({},r),integrations:(0,t.pi)({},i)};return null!==n&&(o.previousId=n),void 0===e?this.normalize((0,t.pi)((0,t.pi)({},o),this.baseEvent())):this.normalize((0,t.pi)((0,t.pi)({},this.baseEvent()),o))},e.prototype.baseEvent=function(){return{integrations:{},options:{}}},e.prototype.context=function(t){var e,n=["userId","anonymousId","timestamp","messageId"];delete t.integrations;var r=Object.keys(t),i=null!==(e=t.context)&&void 0!==e?e:{},o={};return r.forEach((function(e){"context"!==e&&(n.includes(e)?(0,S.N)(o,e,t[e]):(0,S.N)(i,e,t[e]))})),[i,o]},e.prototype.normalize=function(e){var n,r,i,o,s=Object.keys(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(n,r){var i,o;return(0,t.pi)((0,t.pi)({},n),((i={})[r]=Boolean(null===(o=e.integrations)||void 0===o?void 0:o[r]),i))}),{});e.options=(i=e.options||{},o=function(t,e){return void 0!==e},Object.keys(i).filter((function(t){return o(t,i[t])})).reduce((function(t,e){return t[e]=i[e],t}),{}));var u=(0,t.pi)((0,t.pi)({},s),null===(r=e.options)||void 0===r?void 0:r.integrations),a=e.options?this.context(e.options):[],c=a[0],l=a[1],p=e.options,f=(0,t._T)(e,["options"]),d=(0,t.pi)((0,t.pi)((0,t.pi)((0,t.pi)({timestamp:new Date},f),{context:c,integrations:u}),l),{messageId:p.messageId||this.settings.createMessageId()});return this.settings.onFinishedEvent(d),O(d),d},e}(),A=function(e){function n(t){var n=e.call(this,{createMessageId:function(){return"ajs-next-".concat(Date.now(),"-").concat((0,m.v4)())},onEventMethodCall:function(t){var e=t.options;n.maybeUpdateAnonId(e)},onFinishedEvent:function(t){return n.addIdentity(t),t}})||this;return n.user=t,n}return(0,t.ZT)(n,e),n.prototype.maybeUpdateAnonId=function(t){(null==t?void 0:t.anonymousId)&&this.user.anonymousId(t.anonymousId)},n.prototype.addIdentity=function(t){this.user.id()&&(t.userId=this.user.id()),this.user.anonymousId()&&(t.anonymousId=this.user.anonymousId())},n.prototype.track=function(t,n,r,i,o){var s=e.prototype.track.call(this,t,n,r,i);return x(s,o),s},n.prototype.page=function(t,n,r,i,o,s){var u=e.prototype.page.call(this,t,n,r,i,o);return x(u,s),u},n.prototype.screen=function(t,n,r,i,o,s){var u=e.prototype.screen.call(this,t,n,r,i,o);return x(u,s),u},n.prototype.identify=function(t,n,r,i,o){var s=e.prototype.identify.call(this,t,n,r,i);return x(s,o),s},n.prototype.group=function(t,n,r,i,o){var s=e.prototype.group.call(this,t,n,r,i);return x(s,o),s},n.prototype.alias=function(t,n,r,i,o){var s=e.prototype.alias.call(this,t,n,r,i);return x(s,o),s},n}(E),F=function(t){return"addMiddleware"in t&&"destination"===t.type},D=s(3061);var T=s(3098),J=s(1494),C=s(6096),q=function(e){function n(t){var n,r,i,o=e.call(this)||this;return o.criticalTasks=(i=0,{done:function(){return n},run:function(t){var e,o=t();return"object"==typeof(e=o)&&null!==e&&"then"in e&&"function"==typeof e.then&&(1==++i&&(n=new Promise((function(t){return r=t}))),o.finally((function(){return 0==--i&&r()}))),o}}),o.plugins=[],o.failedInitializations=[],o.flushing=!1,o.queue=t,o.queue.on(T.M,(function(){o.scheduleFlush(0)})),o}return(0,t.ZT)(n,e),n.prototype.register=function(e,n,r){return(0,t.mG)(this,void 0,void 0,(function(){var i,o,s=this;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:return this.plugins.push(n),i=function(t){s.failedInitializations.push(n.name),s.emit("initialization_failure",n),console.warn(n.name,t),e.log("warn","Failed to load destination",{plugin:n.name,error:t}),s.plugins=s.plugins.filter((function(t){return t!==n}))},"destination"!==n.type||"Segment.io"===n.name?[3,1]:(n.load(e,r).catch(i),[3,4]);case 1:return t.trys.push([1,3,,4]),[4,n.load(e,r)];case 2:return t.sent(),[3,4];case 3:return o=t.sent(),i(o),[3,4];case 4:return[2]}}))}))},n.prototype.deregister=function(e,n,r){return(0,t.mG)(this,void 0,void 0,(function(){var i;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),n.unload?[4,Promise.resolve(n.unload(e,r))]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.plugins=this.plugins.filter((function(t){return t.name!==n.name})),[3,4];case 3:return i=t.sent(),e.log("warn","Failed to unload destination",{plugin:n.name,error:i}),[3,4];case 4:return[2]}}))}))},n.prototype.dispatch=function(e){return(0,t.mG)(this,void 0,void 0,(function(){var n;return(0,t.Jh)(this,(function(t){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.push(e),n=this.subscribeToDelivery(e),this.scheduleFlush(0),[2,n]}))}))},n.prototype.subscribeToDelivery=function(e){return(0,t.mG)(this,void 0,void 0,(function(){var n=this;return(0,t.Jh)(this,(function(t){return[2,new Promise((function(t){var r=function(i,o){i.isSame(e)&&(n.off("flush",r),t(i))};n.on("flush",r)}))]}))}))},n.prototype.dispatchSingle=function(e){return(0,t.mG)(this,void 0,void 0,(function(){var n=this;return(0,t.Jh)(this,(function(t){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.updateAttempts(e),e.attempts=1,[2,this.deliver(e).catch((function(t){return n.enqueuRetry(t,e)?n.subscribeToDelivery(e):(e.setFailedDelivery({reason:t}),e)}))]}))}))},n.prototype.isEmpty=function(){return 0===this.queue.length},n.prototype.scheduleFlush=function(t){var e=this;void 0===t&&(t=500),this.flushing||(this.flushing=!0,setTimeout((function(){e.flush().then((function(){setTimeout((function(){e.flushing=!1,e.queue.length&&e.scheduleFlush(0)}),0)}))}),t))},n.prototype.deliver=function(e){return(0,t.mG)(this,void 0,void 0,(function(){var n,r,i,o;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:return[4,this.criticalTasks.done()];case 1:t.sent(),n=Date.now(),t.label=2;case 2:return t.trys.push([2,4,,5]),[4,this.flushOne(e)];case 3:return e=t.sent(),r=Date.now()-n,this.emit("delivery_success",e),e.stats.gauge("delivered",r),e.log("debug","Delivered",e.event),[2,e];case 4:throw i=t.sent(),o=i,e.log("error","Failed to deliver",o),this.emit("delivery_failure",e,o),e.stats.increment("delivery_failed"),i;case 5:return[2]}}))}))},n.prototype.enqueuRetry=function(t,e){return!(t instanceof J.Y&&!t.retry)&&this.queue.pushWithBackoff(e)},n.prototype.flush=function(){return(0,t.mG)(this,void 0,void 0,(function(){var e,n;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:if(0===this.queue.length)return[2,[]];if(!(e=this.queue.pop()))return[2,[]];e.attempts=this.queue.getAttempts(e),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.deliver(e)];case 2:return e=t.sent(),this.emit("flush",e,!0),[3,4];case 3:return n=t.sent(),this.enqueuRetry(n,e)||(e.setFailedDelivery({reason:n}),this.emit("flush",e,!1)),[2,[]];case 4:return[2,[e]]}}))}))},n.prototype.isReady=function(){return!0},n.prototype.availableExtensions=function(e){var n,r,i=this.plugins.filter((function(t){var n,r,i;if("destination"!==t.type&&"Segment.io"!==t.name)return!0;var o=void 0;return null===(n=t.alternativeNames)||void 0===n||n.forEach((function(t){void 0!==e[t]&&(o=e[t])})),null!==(i=null!==(r=e[t.name])&&void 0!==r?r:o)&&void 0!==i?i:!1!==("Segment.io"===t.name||e.All)})),o=(n="type",r={},i.forEach((function(e){var i,o=void 0;if("string"==typeof n){var s=e[n];o="string"!=typeof s?JSON.stringify(s):s}else n instanceof Function&&(o=n(e));void 0!==o&&(r[o]=(0,t.ev)((0,t.ev)([],null!==(i=r[o])&&void 0!==i?i:[],!0),[e],!1))})),r),s=o.before,u=void 0===s?[]:s,a=o.enrichment,c=void 0===a?[]:a,l=o.destination,p=void 0===l?[]:l,f=o.after;return{before:u,enrichment:c,destinations:p,after:void 0===f?[]:f}},n.prototype.flushOne=function(e){var n,r;return(0,t.mG)(this,void 0,void 0,(function(){var i,o,s,u,a,c,l,p,f,d,h,v,y,m;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:if(!this.isReady())throw new Error("Not ready");e.attempts>1&&this.emit("delivery_retry",e),i=this.availableExtensions(null!==(n=e.event.integrations)&&void 0!==n?n:{}),o=i.before,s=i.enrichment,u=0,a=o,t.label=1;case 1:return u0)return r;if(e.length<=1)return r;for(var i=e.length-2;i>=0;--i)r.push(e.slice(i).join("."));return r}(e),r=0;r=500)throw new Error("Bad response from server: ".concat(t.status));if(429===t.status){var n=null===(e=t.headers)||void 0===e?void 0:e.get("x-ratelimit-reset"),r="string"==typeof n?1e3*parseInt(n):f;throw new gt("Rate limit exceeded: ".concat(t.status),r)}}))}}function y(e){var r;return void 0===e&&(e=1),(0,t.mG)(this,void 0,Promise,(function(){var i;return(0,t.Jh)(this,(function(o){return c.length?(i=c,c=[],[2,null===(r=v(i))||void 0===r?void 0:r.catch((function(r){var o;d._.system().log("error","Error sending batch",r),e<=(null!==(o=null==n?void 0:n.maxRetries)&&void 0!==o?o:10)&&("RateLimitError"===r.name&&(h=r.retryTimeout),c.push.apply(c,i),c.map((function(n){if("_metadata"in n){var r=n;r._metadata=(0,t.pi)((0,t.pi)({},r._metadata),{retryCount:e})}})),m(e+1))}))]):[2]}))}))}function m(t){void 0===t&&(t=1),s||(s=setTimeout((function(){s=void 0,y(t).catch(console.error)}),h||f),h=0)}return u=function(t){if((l=t)&&c.length){var e=function(t){var e=[],n=0;return t.forEach((function(t){bt(e[n])>=64&&n++,e[n]?e[n].push(t):e[n]=[t]})),e}(c).map(v);Promise.all(e).catch(console.error)}},a=!1,window.addEventListener("pagehide",(function(){a||u(a=!0)})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(a)return;a=!0}else a=!1;u(a)})),{dispatch:function(e,r){return(0,t.mG)(this,void 0,Promise,(function(){var e;return(0,t.Jh)(this,(function(t){return c.push(r),e=c.length>=p||function(t){return bt(t)>=450}(c)||(null==n?void 0:n.keepalive)&&function(t){return bt(t)>=54}(c),[2,e||l?y():m()]}))}))}}}function _t(e,n,r,i,o){var s,u=e.user();delete n.options,n.writeKey=null==r?void 0:r.apiKey,n.userId=n.userId||u.id(),n.anonymousId=n.anonymousId||u.anonymousId(),n.sentAt=new Date;var a=e.queue.failedInitializations||[];a.length>0&&(n._metadata={failedInitializations:a}),null!=o&&(o.attempts>1&&(n._metadata=(0,t.pi)((0,t.pi)({},n._metadata),{retryCount:o.attempts})),o.attempts++);var c=[],l=[];for(var p in i){var f=i[p];"Segment.io"===p&&c.push(p),"bundled"===f.bundlingStatus&&c.push(p),"unbundled"===f.bundlingStatus&&l.push(p)}for(var d=0,h=(null==r?void 0:r.unbundledIntegrations)||[];d0&&!(0,f.s)()}),(function(){return(0,t.mG)(i,void 0,void 0,(function(){var i,o;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:return(i=n.pop())?[4,(0,C.a)(i,e)]:[2];case 1:return o=t.sent(),o instanceof d._||r.push(i),[2]}}))}))}))];case 1:return o.sent(),r.map((function(t){return n.pushWithBackoff(t)})),[2,n]}}))}))}function Pt(e,n,r,i){var o=this;e||setTimeout((function(){return(0,t.mG)(o,void 0,void 0,(function(){var e,o;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:return e=!0,[4,St(r,n)];case 1:return o=t.sent(),e=!1,n.todo>0&&i(e,o,r,i),[2]}}))}))}),5e3*Math.random())}var jt=s(4328);var It=function(t){return"Segment.io"===t.name};function kt(e,n,r){var o,s,u;window.addEventListener("pagehide",(function(){l.push.apply(l,Array.from(p)),p.clear()}));var a,c=null!==(o=null==n?void 0:n.apiKey)&&void 0!==o?o:"",l=e.options.disableClientPersistence?new T.Z(e.queue.queue.maxAttempts,[]):new D.$(e.queue.queue.maxAttempts,"".concat(c,":dest-Segment.io")),p=new Set,d=!1,h=null!==(s=null==n?void 0:n.apiHost)&&void 0!==s?s:jt.U,v=null!==(u=null==n?void 0:n.protocol)&&void 0!==u?u:"https",y="".concat(v,"://").concat(h),m=null==n?void 0:n.deliveryStrategy,g="batching"===(null==m?void 0:m.strategy)?wt(h,m.config):(a=null==m?void 0:m.config,{dispatch:function(t,e){return(0,i.h)(t,{keepalive:null==a?void 0:a.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(e)}).then((function(t){var e;if(t.status>=500)throw new Error("Bad response from server: ".concat(t.status));if(429===t.status){var n=null===(e=t.headers)||void 0===e?void 0:e.get("x-ratelimit-reset"),r=n?1e3*parseInt(n):5e3;throw new gt("Rate limit exceeded: ".concat(t.status),r)}}))}});function b(i){return(0,t.mG)(this,void 0,Promise,(function(){var o,s;return(0,t.Jh)(this,(function(t){return(0,f.s)()?(l.push(i),Pt(d,l,w,Pt),[2,i]):(p.add(i),o=i.event.type.charAt(0),s=(0,mt.D)(i.event).json(),"track"===i.event.type&&delete s.traits,"alias"===i.event.type&&(s=function(t,e){var n,r,i,o,s=t.user();return e.previousId=null!==(i=null!==(r=null!==(n=e.previousId)&&void 0!==n?n:e.from)&&void 0!==r?r:s.id())&&void 0!==i?i:s.anonymousId(),e.userId=null!==(o=e.userId)&&void 0!==o?o:e.to,delete e.from,delete e.to,e}(e,s)),[2,g.dispatch("".concat(y,"/").concat(o),_t(e,s,n,r,i)).then((function(){return i})).catch((function(t){if(i.log("error","Error sending event",t),"RateLimitError"===t.name){var e=t.retryTimeout;l.pushWithBackoff(i,e)}else l.pushWithBackoff(i);return Pt(d,l,w,Pt),i})).finally((function(){p.delete(i)}))])}))}))}var w={metadata:{writeKey:c,apiHost:h,protocol:v},name:"Segment.io",type:"destination",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:b,identify:b,page:b,alias:b,group:b,screen:b};return l.todo&&Pt(d,l,w,Pt),w}var Ot="This is being deprecated and will be not be available in future releases of Analytics JS",Mt=(0,it.R)(),Et=null==Mt?void 0:Mt.analytics;var At=function(){function t(t,e){var n;this.timeout=300,this._getSegmentPluginMetadata=function(){var t;return null===(t=e.plugins.find(It))||void 0===t?void 0:t.metadata},this.writeKey=t.writeKey,this.cdnSettings=null!==(n=t.cdnSettings)&&void 0!==n?n:{integrations:{},edgeFunction:{}},this.cdnURL=t.cdnURL}return Object.defineProperty(t.prototype,"apiHost",{get:function(){var t,e;return null===(e=null===(t=this._getSegmentPluginMetadata)||void 0===t?void 0:t.call(this))||void 0===e?void 0:e.apiHost},enumerable:!1,configurable:!0}),t}();function Ft(){console.warn(Ot)}var Dt,Tt=function(e){function n(n,r,i,o,s){var u,a,c=this;(c=e.call(this)||this)._debug=!1,c.initialized=!1,c.user=function(){return c._user},c.init=c.initialize.bind(c),c.log=Ft,c.addIntegrationMiddleware=Ft,c.listeners=Ft,c.addEventListener=Ft,c.removeAllListeners=Ft,c.removeListener=Ft,c.removeEventListener=Ft,c.hasListeners=Ft,c.add=Ft,c.addIntegration=Ft;var l=null==r?void 0:r.cookie,p=null!==(u=null==r?void 0:r.disableClientPersistence)&&void 0!==u&&u;c.queue=null!=i?i:function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var r=e?10:1,i=n?new T.Z(r,[]):new D.$(r,t);return new G(i)}("".concat(n.writeKey,":event-queue"),null==r?void 0:r.retryQueue,p),c.settings=new At(n,c.queue);var f=null==r?void 0:r.storage;return c._universalStorage=c.createStore(p,f,l),c._user=null!=o?o:new tt((0,t.pi)({persist:!p,storage:null==r?void 0:r.storage},null==r?void 0:r.user),l).load(),c._group=null!=s?s:new nt((0,t.pi)({persist:!p,storage:null==r?void 0:r.storage},null==r?void 0:r.group),l).load(),c.eventFactory=new A(c._user),c.integrations=null!==(a=null==r?void 0:r.integrations)&&void 0!==a?a:{},c.options=null!=r?r:{},N(c),c}return(0,t.ZT)(n,e),n.prototype.createStore=function(t,e,n){return t?new z([new K]):e&&U(e)?new z(Q($(e.stores,n))):new z(Q([L.LocalStorage,{name:L.Cookie,settings:n},L.Memory]))},Object.defineProperty(n.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),n.prototype.track=function(){for(var e=[],n=0;n4){var s=r.slice(4);"campaign"===s&&(s="name"),t[s]=(0,Gt.a)(o)}return t}),{})}(a));var l=function(){var t=W.get("_ga");if(t&&t.startsWith("amp"))return t}();l&&(s.amp={id:l}),function(e,n,r){var i,o=new z(r?[]:[new V(Lt())]),s=o.get("s:context.referrer"),u=null!==(i=function(t){var e={btid:"dataxu",urid:"millennial-media"};t.startsWith("?")&&(t=t.substring(1));for(var n=0,r=(t=t.replace(/\?/g,"&")).split("&");n0}(n)?[4,s.e(604).then(s.bind(s,669)).then((function(t){return t.tsubMiddleware(n.middlewareSettings.routingRules)}))]:[3,2];case 1:return y=O.sent(),[3,3];case 2:y=void 0,O.label=3;case 3:return v=y,M=n,"test"!==r().NODE_ENV&&Object.keys(M.integrations).length>1||a.length>0?[4,s.e(464).then(s.bind(s,3162)).then((function(t){return t.ajsDestinations(e,n,i.integrations,o,v,a)}))]:[3,5];case 4:return g=O.sent(),[3,6];case 5:g=[],O.label=6;case 6:return m=g,n.legacyVideoPluginsEnabled?[4,s.e(150).then(s.bind(s,9141)).then((function(t){return t.loadLegacyVideoPlugins(i)}))]:[3,8];case 7:O.sent(),O.label=8;case 8:return(null===(l=o.plan)||void 0===l?void 0:l.track)?[4,s.e(493).then(s.bind(s,5081)).then((function(t){var e;return t.schemaFilter(null===(e=o.plan)||void 0===e?void 0:e.track,n)}))]:[3,10];case 9:return w=O.sent(),[3,11];case 10:w=void 0,O.label=11;case 11:return b=w,_=(0,Ct.o)(n,o),[4,Yt(n,i.integrations,_,o,v,h).catch((function(){return[]}))];case 12:return x=O.sent(),S=(0,t.ev)((0,t.ev)([Ut],m,!0),x,!0),b&&S.push(b),!1===(null===(p=o.integrations)||void 0===p?void 0:p.All)&&!o.integrations["Segment.io"]||o.integrations&&!1===o.integrations["Segment.io"]?[3,14]:(j=(P=S).push,[4,kt(i,_["Segment.io"],n.integrations)]);case 13:j.apply(P,[O.sent()]),O.label=14;case 14:return[4,i.register.apply(i,(0,t.ev)((0,t.ev)([],S,!1),d,!1))];case 15:return I=O.sent(),[4,at(i,c)];case 16:return O.sent(),Object.entries(null!==(f=n.enabledMiddleware)&&void 0!==f?f:{}).some((function(t){return t[1]}))?[4,s.e(214).then(s.bind(s,9568)).then((function(e){var r=e.remoteMiddlewares;return(0,t.mG)(k,void 0,void 0,(function(){var e,s;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:return[4,r(I,n,o.obfuscate)];case 1:return e=t.sent(),s=e.map((function(t){return i.addSourceMiddleware(t)})),[2,Promise.all(s)]}}))}))}))]:[3,18];case 17:O.sent(),O.label=18;case 18:return[2,I]}var M}))}))}function ee(n,r,o){var s,u,a,c,l,p,f,h,v,y,m;return void 0===r&&(r={}),(0,t.mG)(this,void 0,Promise,(function(){var g,b,w,_,x,S,P,j,I,k,O,M;return(0,t.Jh)(this,(function(E){switch(E.label){case 0:return!0===r.disable?[2,[new Jt,d._.system()]]:(r.globalAnalyticsKey&&(0,ot.jV)(r.globalAnalyticsKey),n.cdnURL&&(0,e.UH)(n.cdnURL),r.initialPageview&&o.add(new dt("page",[])),g=null!==(s=n.cdnURL)&&void 0!==s?s:(0,e.Vl)(),null===(u=n.cdnSettings)||void 0===u?[3,1]:(w=u,[3,3]));case 1:return[4,(A=n.writeKey,F=g,(0,i.h)("".concat(F,"/v1/projects/").concat(A,"/settings")).then((function(t){return t.ok?t.json():t.text().then((function(t){throw new Error(t)}))})).catch((function(t){throw console.error(t.message),t})))];case 2:w=E.sent(),E.label=3;case 3:return b=w,r.updateCDNSettings&&(b=r.updateCDNSettings(b)),"function"!=typeof r.disable?[3,5]:[4,r.disable(b)];case 4:if(E.sent())return[2,[new Jt,d._.system()]];E.label=5;case 5:return _=null===(c=null===(a=b.integrations["Segment.io"])||void 0===a?void 0:a.retryQueue)||void 0===c||c,r=(0,t.pi)({retryQueue:_},r),function(t){var e;null===(e=Qt.attach)||void 0===e||e.call(Qt,t)}(x=new Tt((0,t.pi)((0,t.pi)({},n),{cdnSettings:b,cdnURL:g}),r)),S=null!==(l=n.plugins)&&void 0!==l?l:[],P=null!==(p=n.classicIntegrations)&&void 0!==p?p:[],j=null===(f=r.integrations)||void 0===f?void 0:f["Segment.io"],$t.j.initRemoteMetrics((0,t.pi)((0,t.pi)({},b.metrics),{host:null!==(h=null==j?void 0:j.apiHost)&&void 0!==h?h:null===(v=b.metrics)||void 0===v?void 0:v.host,protocol:null==j?void 0:j.protocol})),[4,te(n.writeKey,b,x,r,S,P,o)];case 6:return I=E.sent(),k=null!==(y=window.location.search)&&void 0!==y?y:"",O=null!==(m=window.location.hash)&&void 0!==m?m:"",(M=k.length?k:O.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,x.queryString(M).catch(console.error)]:[3,8];case 7:E.sent(),E.label=8;case 8:return x.initialized=!0,x.emit("initialize",n,r),[4,Xt(x,o)];case 9:return E.sent(),[2,[x,I]]}var A,F}))}))}var ne=function(e){function n(){var t=this,n=(0,qt.d)(),r=n.promise,i=n.resolve;return t=e.call(this,(function(t){return r.then((function(e){return ee(e[0],e[1],t)}))}))||this,t._resolveLoadStart=function(t,e){return i([t,e])},t}return(0,t.ZT)(n,e),n.prototype.load=function(t,e){return void 0===e&&(e={}),this._resolveLoadStart(t,e),this},n.load=function(t,e){return void 0===e&&(e={}),(new n).load(t,e)},n.standalone=function(t,e){return n.load({writeKey:t},e).then((function(t){return t[0]}))},n}(yt),re=s(584);function ie(){var e,n;return(0,t.mG)(this,void 0,Promise,(function(){var r,i,o;return(0,t.Jh)(this,(function(t){switch(t.label){case 0:return r=function(){var t;if((0,re.M)())return(0,re.M)();var e=(0,ot.wI)();if(null==e?void 0:e._writeKey)return e._writeKey;for(var n=/http.*\/analytics\.js\/v1\/([^/]*)(\/platform)?\/analytics.*/,r=void 0,i=0,o=Array.prototype.slice.call(document.querySelectorAll("script"));i=parseInt(o)}()){var fe=document.createElement("script");fe.setAttribute("src","https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.7.0/polyfill.min.js"),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(function(){return document.body.appendChild(fe)})):document.body.appendChild(fe),fe.onload=function(){le(ie)}}else le(ie)}(),window.AnalyticsNext=u}(); //# sourceMappingURL=standalone.js.map