PageSourceSearch

https://www.reutersconnect.com/_next/static/chunks/3ew0a9f2d365n.js

js reutersconnect.com collected 2026-09-24 17:36:37 UTC 71,489 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,520658,t=>{"use strict";var e=t.i(377421),n=t.i(84106);t.i(479578);var r=t.i(254667);t.i(502878);var i=t.i(415478);let o=(0,n.createContext)(null);t.s(["AnalyticsViewModel",0,function({viewModel:t,children:i}){let{identify:a,group:s,track:u,page:c,isReady:l,reset:d,getUser:h}=t,f=(0,n.useMemo)(()=>({isReady:l,identify:t=>{a(t).catch(t=>{r.baseLogger.error(t,"Error in identify method:")})},group:t=>{s(t).catch(t=>{r.baseLogger.error(t,"Error in group method:")})},track:(t,e)=>{u(t,e).catch(t=>{r.baseLogger.error(t,"Error in track method:")})},trackPromise:(t,e)=>u(t,e),page:(t,e)=>{c(t,e).catch(t=>{r.baseLogger.error(t,"Error in page method:")})},reset:()=>d(),getUser:h}),[l,c,u,a,s,d,h]);return(0,e.jsx)(o.Provider,{value:f,children:i})},"useAnalytics",0,function(){return(0,i.useViewModel)(o,{hookName:"useAnalytics",providerName:"AnalyticsViewModel"})}])},195873,t=>{"use strict";var e=t.i(377421),n=t.i(84106);let r=(0,n.createContext)(null);function i(){return(0,n.useContext)(r)}t.s(["PageCategoryOverride",0,function({category:t}){let e=i();return(0,n.useLayoutEffect)(()=>{if(e)return e.register(t)},[t,e]),null},"PageCategoryOverrideProvider",0,function({children:t}){let i=(0,n.useRef)([]),o=(0,n.useMemo)(()=>({peek:()=>i.current.at(-1)?.value??null,register:t=>{let e;return e={token:Symbol("category-override"),value:t},i.current.push(e),()=>{var t;return t=e.token,void(i.current=i.current.filter(e=>e.token!==t))}}}),[]);return(0,e.jsx)(r.Provider,{value:o,children:t})},"usePageCategoryOverrideApi",0,i])},978871,t=>{"use strict";var e=t.i(84106),n=t.i(520658),r=t.i(195873);t.s(["useAnalyticsAutoPageView",0,function(t){let i=(0,e.useRef)(null),{page:o,isReady:a}=(0,n.useAnalytics)(),s=(0,r.usePageCategoryOverrideApi)();(0,e.useEffect)(()=>{if(t!==i.current&&a){var e,n;let r,a=(e=document.title,n=t,{name:function(t){if(!t)return"";let e=t.split("|");return e.length>0?e[0].trim():""}(e),category:(r=n.split("/").filter(t=>t)).length>0?r[0]:""});a&&o(a.name,{category:s?.peek()??a.category}),i.current=t}},[t,o,a,s])}],978871)},289716,t=>{"use strict";t.i(252167),(function(){if("u"<typeof document)return!1;let t=document.location.hostname;if("www.reutersconnect.com"!==t&&"staging.reutersconnect.com"!==t)return!1;let e=document.cookie.split(";").map(t=>t.trim().split("=",1)[0]),n=["OptanonConsent","OptanonAlertBoxClosed"].filter(t=>e.indexOf(t)!==e.lastIndexOf(t));if(0===n.length)return!1;for(let e of n){let n=`${e}=; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Max-Age=0; Path=/`;document.cookie=n,document.cookie=`${n}; Domain=${t}`}return!0}).toString(),t.i(448617),t.i(727041),t.s([],289716)},39656,t=>{"use strict";var e,n,r=t.i(824627),i=t.i(829589);function o(){return void 0!==i.default&&i.default.env?i.default.env:{}}var a=t.i(868474),s=t.i(531209),u=t.i(36400);function c(t,e,n,r){var i,o=[t,e,n,r],a=(0,u.isPlainObject)(t)?t.event:t;if(!a||!(0,u.isString)(a))throw Error("Event missing");var s=(0,u.isPlainObject)(t)?null!=(i=t.properties)?i:{}:(0,u.isPlainObject)(e)?e:{},c={};return(0,u.isFunction)(n)||(c=null!=n?n:{}),(0,u.isPlainObject)(t)&&!(0,u.isFunction)(e)&&(c=null!=e?e:{}),[a,s,c,o.find(u.isFunction)]}function l(t,e,n,r,i){var o,a,s=null,c=null,l=[t,e,n,r,i],d=l.filter(u.isString);void 0!==d[0]&&void 0!==d[1]&&(s=d[0],c=d[1]),1===d.length&&(s=null,c=d[0]);var h=l.find(u.isFunction),f=l.filter(function(t){return null===c?(0,u.isPlainObject)(t):(0,u.isPlainObject)(t)||null===t}),p=null!=(o=f[0])?o:{},g=null!=(a=f[1])?a:{};return[s,c,p,g,h]}var d=function(t){return function(){for(var e,n,r,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];for(var a={},s=["callback","options","traits","id"],c=0;c<i.length;c++){var l=i[c],d=s.pop();if("id"===d){if((0,u.isString)(l)||(0,u.isNumber)(l)){a.id=l.toString();continue}if(null==l)continue;d=s.pop()}if(("traits"===d||"options"===d)&&(null==l||(0,u.isPlainObject)(l))&&(a[d]=l),(0,u.isFunction)(l)){a.callback=l;break}}return[null!=(e=a.id)?e:t.id(),null!=(n=a.traits)?n:{},null!=(r=a.options)?r:{},a.callback]}};
1function h(t,e,n,r){(0,u.isNumber)(t)&&(t=t.toString()),(0,u.isNumber)(e)&&(e=e.toString());var i=[t,e,n,r],o=i.filter(u.isString),a=o[0],s=void 0===a?t:a,c=o[1],l=i.filter(u.isPlainObject)[0];return[s,void 0===c?null:c,void 0===l?{}:l,i.find(u.isFunction)]}var f=t.i(914974),p=t.i(219943),g=t.i(306593),v=t.i(329888),y=t.i(808982),_=function(t,e,n,r,i,o){return{__t:"bpc",c:e,p:r,u:t,s:n,t:i,r:o}},m=Object.keys(_("","","","","","")),b=function(t){var e=t.indexOf("#");return -1===e?t:t.slice(0,e)},w=function(t){try{return new URL(t).pathname}catch(e){return"/"===t[0]?t:"/"+t}},S=function(t){var e=t.c,n=t.p,r=t.s,i=t.u,o=t.r,a=t.t,s=e?w(e):n,u=e?e.indexOf("?")>-1?e:e+r:b(i);return{path:s,referrer:o,search:r,title:a,url:u}},C=function(){var t=document.querySelector("link[rel='canonical']");return _(location.href,t&&t.getAttribute("href")||void 0,location.search,location.pathname,document.title,document.referrer)},E=function(t,e){void 0===e&&(e=S(C()));var n,i,o,a=t.context;"page"===t.type&&(o=t.properties&&(n=t.properties,i=Object.keys(e),Object.assign.apply(Object,(0,r.__spreadArray)([{}],i.map(function(t){var e;if(n&&Object.prototype.hasOwnProperty.call(n,t))return(e={})[t]=n[t],e}),!1))),t.properties=(0,r.__assign)((0,r.__assign)((0,r.__assign)({},e),t.properties),t.name?{name:t.name}:{})),a.page=(0,r.__assign)((0,r.__assign)((0,r.__assign)({},e),o),a.page)},A=t.i(163007),O=function(t){function e(e,n){var r=t.call(this,"".concat(e," ").concat(n))||this;return r.field=e,r}return(0,r.__extends)(e,t),e}(Error),M="is not a string",k="is not an object",I=function(t){var e,n;this.settings=t,this.createMessageId=t.createMessageId,this.onEventMethodCall=null!=(e=t.onEventMethodCall)?e:function(){},this.onFinishedEvent=null!=(n=t.onFinishedEvent)?n:function(){}},P=function(t){function e(e){var n=t.call(this,{createMessageId:function(){return"ajs-next-".concat(Date.now(),"-").concat((0,y.v4)())},onEventMethodCall:function(t){var e=t.options;n.maybeUpdateAnonId(e)},onFinishedEvent:function(t){return n.addIdentity(t),t}})||this;return n.user=e,n}return(0,r.__extends)(e,t),e.prototype.maybeUpdateAnonId=function(t){(null==t?void 0:t.anonymousId)&&this.user.anonymousId(t.anonymousId)},e.prototype.addIdentity=function(t){this.user.id()&&(t.userId=this.user.id()),this.user.anonymousId()&&(t.anonymousId=this.user.anonymousId())},e.prototype.track=function(e,n,r,i,o){var a=t.prototype.track.call(this,e,n,r,i);return E(a,o),a},e.prototype.page=function(e,n,r,i,o,a){var s=t.prototype.page.call(this,e,n,r,i,o);return E(s,a),s},e.prototype.screen=function(e,n,r,i,o,a){var s=t.prototype.screen.call(this,e,n,r,i,o);return E(s,a),s},e.prototype.identify=function(e,n,r,i,o){var a=t.prototype.identify.call(this,e,n,r,i);return E(a,o),a},e.prototype.group=function(e,n,r,i,o){var a=t.prototype.group.call(this,e,n,r,i);return E(a,o),a},e.prototype.alias=function(e,n,r,i,o){var a=t.prototype.alias.call(this,e,n,r,i);return E(a,o),a},e}(function(){function t(t){this.settings=new I(t)}return t.prototype.track=function(t,e,n,i){return this.settings.onEventMethodCall({type:"track",options:n}),this.normalize((0,r.__assign)((0,r.__assign)({},this.baseEvent()),{event:t,type:"track",properties:null!=e?e:{},options:(0,r.__assign)({},n),integrations:(0,r.__assign)({},i)}))},t.prototype.page=function(t,e,n,i,o){this.settings.onEventMethodCall({type:"page",options:i});var a,s={type:"page",properties:(0,r.__assign)({},n),options:(0,r.__assign)({},i),integrations:(0,r.__assign)({},o)};return null!==t&&(s.category=t,s.properties=null!=(a=s.properties)?a:{},s.properties.category=t),null!==e&&(s.name=e),this.normalize((0,r.__assign)((0,r.__assign)({},this.baseEvent()),s))},t.prototype.screen=function(t,e,n,i,o){this.settings.onEventMethodCall({type:"screen",options:i});var a={type:"screen",properties:(0,r.__assign)({},n),options:(0,r.__assign)({},i),integrations:(0,r.__assign)({},o)};return null!==t&&(a.category=t),null!==e&&(a.name=e),this.normalize((0,r.__assign)((0,r.__assign)({},this.baseEvent()),a))},t.prototype.identify=function(t,e,n,i){return this.settings.onEventMethodCall({type:"identify",options:n}),this.normalize((0,r.__assign)((0,r.__assign)({},this.baseEvent()),{type:"identify",userId:t,traits:null!=e?e:{},options:(0,r.__assign)({},n),integrations:i}))},t.prototype.group=function(t,e,n,i){return this.settings.onEventMethodCall({type:"group",options:n}),this.normalize((0,r.__assign)((0,r.__assign)({},this.baseEvent()),{type:"group",traits:null!=e?e:{},options:(0,r.__assign)({},n),integrations:(0,r.__assign)({},i),groupId:t}))},t.prototype.alias=function(t,e,n,i){this.settings.onEventMethodCall({type:"alias",options:n});var o={userId:t,type:"alias",options:(0,r.__assign)({},n),integrations:(0,r.__assign)({},i)};return(null!==e&&(o.previousId=e),void 0===t)?this.normalize((0,r.__assign)((0,r.__assign)({},o),this.baseEvent())):this.normalize((0,r.__assign)((0,r.__assign)({},this.baseEvent()),o))},t.prototype.baseEvent=function(){return{integrations:{},options:{}}},t.prototype.context=function(t){var e,n=["userId","anonymousId","timestamp","messageId"];delete t.integrations;var r=Object.keys(t),i=null!=(e=t.context)?e:{},o={};return r.forEach(function(e){"context"!==e&&(n.includes(e)?(0,A.dset)(o,e,t[e]):(0,A.dset)(i,e,t[e]))}),[i,o]},t.prototype.normalize=function(t){var e,n,i,o=Object.keys(null!=(n=t.integrations)?n:{}).reduce(function(e,n){var i,o;return(0,r.__assign)((0,r.__assign)({},e),((i={})[n]=!!(null==(o=t.integrations)?void 0:o[n]),i))},{});e=t.options||{},t.options=Object.keys(e).filter(function(t){return function(t,e){return void 0!==e}(t,e[t])}).reduce(function(t,n){return t[n]=e[n],t},{});var a=(0,r.__assign)((0,r.__assign)({}
1,o),null==(i=t.options)?void 0:i.integrations),s=t.options?this.context(t.options):[],c=s[0],l=s[1],d=t.options,h=(0,r.__rest)(t,["options"]),f=(0,r.__assign)((0,r.__assign)((0,r.__assign)((0,r.__assign)({timestamp:new Date},h),{context:c,integrations:a}),l),{messageId:d.messageId||this.settings.createMessageId()});return this.settings.onFinishedEvent(f),!function(t){if(!(0,u.exists)(t))throw new O("Event","is nil");if("object"!=typeof t)throw new O("Event",k);if(!(0,u.isString)(t.type))throw new O(".type",M);if(!(0,u.isString)(t.messageId))throw new O(".messageId",M);if("track"===t.type){if(!(0,u.isString)(t.event))throw new O(".event",M);if(!(0,u.isPlainObject)(t.properties))throw new O(".properties",k)}["group","identify"].includes(t.type)&&function(t){if(!(0,u.isPlainObject)(t.traits))throw new O(".traits",k)}(t)}(f),f},t}()),j=function(t){return"addMiddleware"in t&&"destination"===t.type},x=t.i(279210),D=t.i(899950),L=t.i(631286),N=function(){var t,e,n=0;return{done:function(){return t},run:function(r){var i=r();return"object"==typeof i&&null!==i&&"then"in i&&"function"==typeof i.then&&(1==++n&&(t=new Promise(function(t){return e=t})),i.finally(function(){return 0==--n&&e()})),i}}},R=t.i(247919),T=function(t){function e(e){return t.call(this,"string"==typeof e?new x.PersistedPriorityQueue(4,e):e)||this}return(0,r.__extends)(e,t),e.prototype.flush=function(){return(0,r.__awaiter)(this,void 0,void 0,function(){return(0,r.__generator)(this,function(e){return(0,f.isOffline)()?[2,[]]:[2,t.prototype.flush.call(this)]})})},e}(function(t){function e(e){var n=t.call(this)||this;return n.criticalTasks=N(),n.plugins=[],n.failedInitializations=[],n.flushing=!1,n.queue=e,n.queue.on(D.ON_REMOVE_FROM_FUTURE,function(){n.scheduleFlush(0)}),n}return(0,r.__extends)(e,t),e.prototype.register=function(t,e,n){return(0,r.__awaiter)(this,void 0,void 0,function(){var i,o,a=this;return(0,r.__generator)(this,function(r){switch(r.label){case 0:if(this.plugins.push(e),i=function(n){a.failedInitializations.push(e.name),a.emit("initialization_failure",e),console.warn(e.name,n),t.log("warn","Failed to load destination",{plugin:e.name,error:n}),a.plugins=a.plugins.filter(function(t){return t!==e})},"destination"!==e.type||"Segment.io"===e.name)return[3,1];return e.load(t,n).catch(i),[3,4];case 1:return r.trys.push([1,3,,4]),[4,e.load(t,n)];case 2:return r.sent(),[3,4];case 3:return o=r.sent(),i(o),[3,4];case 4:return[2]}})})},e.prototype.deregister=function(t,e,n){return(0,r.__awaiter)(this,void 0,void 0,function(){var i;return(0,r.__generator)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,3,,4]),!e.unload)return[3,2];return[4,Promise.resolve(e.unload(t,n))];case 1:r.sent(),r.label=2;case 2:return this.plugins=this.plugins.filter(function(t){return t.name!==e.name}),[3,4];case 3:return i=r.sent(),t.log("warn","Failed to unload destination",{plugin:e.name,error:i}),[3,4];case 4:return[2]}})})},e.prototype.dispatch=function(t){return(0,r.__awaiter)(this,void 0,void 0,function(){var e;return(0,r.__generator)(this,function(n){return t.log("debug","Dispatching"),t.stats.increment("message_dispatched"),this.queue.push(t),e=this.subscribeToDelivery(t),this.scheduleFlush(0),[2,e]})})},e.prototype.subscribeToDelivery=function(t){return(0,r.__awaiter)(this,void 0,void 0,function(){var e=this;return(0,r.__generator)(this,function(n){return[2,new Promise(function(n){var r=function(i,o){i.isSame(t)&&(e.off("flush",r),n(i))};e.on("flush",r)})]})})},e.prototype.dispatchSingle=function(t){return(0,r.__awaiter)(this,void 0,void 0,function(){var e=this;return(0,r.__generator)(this,function(n){return t.log("debug","Dispatching"),t.stats.increment("message_dispatched"),this.queue.updateAttempts(t),t.attempts=1,[2,this.deliver(t).catch(function(n){return e.enqueuRetry(n,t)?e.subscribeToDelivery(t):(t.setFailedDelivery({reason:n}),t)})]})})},e.prototype.isEmpty=function(){return 0===this.queue.length},e.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))},e.prototype.deliver=function(t){return(0,r.__awaiter)(this,void 0,void 0,function(){var e,n,i,o;return(0,r.__generator)(this,function(r){switch(r.label){case 0:return[4,this.criticalTasks.done()];case 1:r.sent(),e=Date.now(),r.label=2;case 2:return r.trys.push([2,4,,5]),[4,this.flushOne(t)];
1case 3:return t=r.sent(),n=Date.now()-e,this.emit("delivery_success",t),t.stats.gauge("delivered",n),t.log("debug","Delivered",t.event),[2,t];case 4:throw o=i=r.sent(),t.log("error","Failed to deliver",o),this.emit("delivery_failure",t,o),t.stats.increment("delivery_failed"),i;case 5:return[2]}})})},e.prototype.enqueuRetry=function(t,e){return!!(!(t instanceof L.ContextCancelation)||t.retry)&&this.queue.pushWithBackoff(e)},e.prototype.flush=function(){return(0,r.__awaiter)(this,void 0,void 0,function(){var t,e;return(0,r.__generator)(this,function(n){switch(n.label){case 0:if(0===this.queue.length||!(t=this.queue.pop()))return[2,[]];t.attempts=this.queue.getAttempts(t),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deliver(t)];case 2:return t=n.sent(),this.emit("flush",t,!0),[3,4];case 3:return e=n.sent(),this.enqueuRetry(e,t)||(t.setFailedDelivery({reason:e}),this.emit("flush",t,!1)),[2,[]];case 4:return[2,[t]]}})})},e.prototype.isReady=function(){return!0},e.prototype.availableExtensions=function(t){var e,n,i=(e="type",n={},this.plugins.filter(function(e){if("destination"!==e.type&&"Segment.io"!==e.name)return!0;var n,r,i,o=void 0;return null==(n=e.alternativeNames)||n.forEach(function(e){void 0!==t[e]&&(o=t[e])}),null!=(i=null!=(r=t[e.name])?r:o)?i:!1!==("Segment.io"===e.name||t.All)}).forEach(function(t){var i,o=void 0;if("string"==typeof e){var a=t[e];o="string"!=typeof a?JSON.stringify(a):a}else e instanceof Function&&(o=e(t));void 0!==o&&(n[o]=(0,r.__spreadArray)((0,r.__spreadArray)([],null!=(i=n[o])?i:[],!0),[t],!1))}),n),o=i.before,a=i.enrichment,s=i.destination,u=i.after;return{before:void 0===o?[]:o,enrichment:void 0===a?[]:a,destinations:void 0===s?[]:s,after:void 0===u?[]:u}},e.prototype.flushOne=function(t){var e,n;return(0,r.__awaiter)(this,void 0,void 0,function(){var i,o,a,s,u,c,l,d,h,f,p,g,v;return(0,r.__generator)(this,function(r){switch(r.label){case 0:if(!this.isReady())throw Error("Not ready");t.attempts>1&&this.emit("delivery_retry",t),o=(i=this.availableExtensions(null!=(e=t.event.integrations)?e:{})).before,a=i.enrichment,s=0,u=o,r.label=1;case 1:if(!(s<u.length))return[3,4];return c=u[s],[4,(0,R.ensure)(t,c)];case 2:(l=r.sent())instanceof L.CoreContext&&(t=l),this.emit("message_enriched",t,c),r.label=3;case 3:return s++,[3,1];case 4:d=0,h=a,r.label=5;case 5:if(!(d<h.length))return[3,8];return f=h[d],[4,(0,R.attempt)(t,f)];case 6:(l=r.sent())instanceof L.CoreContext&&(t=l),this.emit("message_enriched",t,f),r.label=7;case 7:return d++,[3,5];case 8:return g=(p=this.availableExtensions(null!=(n=t.event.integrations)?n:{})).destinations,v=p.after,[4,new Promise(function(e,n){setTimeout(function(){Promise.all(g.map(function(e){return(0,R.attempt)(t,e)})).then(e).catch(n)},0)})];case 9:return r.sent(),t.stats.increment("message_delivered"),this.emit("message_delivered",t),[4,Promise.all(v.map(function(e){return(0,R.attempt)(t,e)}))];case 10:return r.sent(),[2,t]}})})},e}(v.Emitter));function F(t){for(var e=t.constructor.prototype,n=0,r=Object.getOwnPropertyNames(e);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(t.constructor.prototype,i);o&&"function"==typeof o.value&&(t[i]=t[i].bind(t))}}return t}var U=function(t,e,n,r){console.warn("".concat(t.constructor.name,": Can't ").concat(e,' key "').concat(n,'" | Err: ').concat(r))},K=function(){function t(t){this.stores=t}return t.prototype.get=function(t){for(var e=null,n=0,r=this.stores;n<r.length;n++){var i=r[n];try{if(null!=(e=i.get(t)))return e}catch(e){U(i,"get",t,e)}}return null},t.prototype.set=function(t,e){this.stores.forEach(function(n){try{n.set(t,e)}catch(e){U(n,"set",t,e)}})},t.prototype.clear=function(t){this.stores.forEach(function(e){try{e.remove(t)}catch(n){U(e,"remove",t,n)}})},t.prototype.getAndSync=function(t){var e=this.get(t),n="number"==typeof e?e.toString():e;return this.set(t,n),n},t}(),q=function(){function t(){this.cache={}}return t.prototype.get=function(t){var e;return null!=(e=this.cache[t])?e:null},t.prototype.set=function(t,e){this.cache[t]=e},t.prototype.remove=function(t){delete this.cache[t]},t}(),z={Cookie:"cookie",LocalStorage:"localStorage",Memory:"memory"};function B(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var G=function t(e,n){function r(t,r,i){if("u">typeof document){"number"==typeof(i=B({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decode
1URIComponent).replace(/[()]/g,escape);var o="";for(var a in i)i[a]&&(o+="; "+a,!0!==i[a]&&(o+="="+i[a].split(";")[0]));return document.cookie=t+"="+e.write(r,t)+o}}return Object.create({set:r,get:function(t){if("u">typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(r[s]=e.read(a,s),t===s)break}catch(t){}}return t?r[t]:r}},remove:function(t,e){r(t,"",B({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,B({},this.attributes,e))},withConverter:function(e){return t(B({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function V(t){var e=function(t){try{return new URL(t)}catch(t){return}}(t);if(e)for(var n=function(t){var e=t.hostname.split("."),n=e[e.length-1],r=[];if(4===e.length&&parseInt(n,10)>0||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<n.length;++r){var i="__tld__",o=n[r],a={domain:"."+o};try{if(G.set(i,"1",a),G.get(i))return G.remove(i,a),o}catch(t){return}}}var W=function(){function t(e){void 0===e&&(e=t.defaults),this.options=(0,r.__assign)((0,r.__assign)({},t.defaults),e)}return Object.defineProperty(t,"defaults",{get:function(){return{maxage:365,domain:V(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),t.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},t.prototype.get=function(t){var e;try{var n=G.get(t);if(null==n)return null;try{return null!=(e=JSON.parse(n))?e:null}catch(t){return null!=n?n:null}}catch(t){return null}},t.prototype.set=function(t,e){"string"==typeof e?G.set(t,e,this.opts()):null===e?G.remove(t,this.opts()):G.set(t,JSON.stringify(e),this.opts())},t.prototype.remove=function(t){return G.remove(t,this.opts())},t}(),J=function(){function t(){}return t.prototype.localStorageWarning=function(t,e){console.warn("Unable to access ".concat(t,", localStorage may be ").concat(e))},t.prototype.get=function(t){var e;try{var n=localStorage.getItem(t);if(null===n)return null;try{return null!=(e=JSON.parse(n))?e:null}catch(t){return null!=n?n:null}}catch(e){return this.localStorageWarning(t,"unavailable"),null}},t.prototype.set=function(t,e){try{localStorage.setItem(t,JSON.stringify(e))}catch(e){this.localStorageWarning(t,"full")}},t.prototype.remove=function(t){try{return localStorage.removeItem(t)}catch(e){this.localStorageWarning(t,"unavailable")}},t}();function $(t){return t&&t.stores&&Array.isArray(t.stores)&&t.stores.every(function(t){return Object.values(z).includes(t)})}function Q(t){return t.map(function(t){var e,n;switch("object"==typeof t&&void 0!==t.name?(e=t.name,n=t.settings):e=t,e){case z.Cookie:return new W(n);case z.LocalStorage:return new J;case z.Memory:return new q;default:throw Error("Unknown Store Type: ".concat(t))}})}function H(t,e){return t.map(function(t){return e&&t===z.Cookie?{name:t,settings:e}:t})}var Y={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},Z=function(){function t(t,e){void 0===t&&(t=Y);var n,i,o,a,s=this;this.options={},this.id=function(t){if(s.options.disable)return null;var e=s.identityStore.getAndSync(s.idKey);void 0!==t&&(s.identityStore.set(s.idKey,t),t!==e&&null!==e&&null!==t&&s.anonymousId(null));var n=s.identityStore.getAndSync(s.idKey);if(n)return n;var r=s.legacyUserStore.get(Y.cookie.oldKey);return r?"object"==typeof r?r.id:r:null},this.anonymousId=function(t){var e,n;if(s.options.disable)return null;if(void 0===t){var r=null!=(e=s.identityStore.getAndSync(s.anonKey))?e:null==(n=s.legacySIO())?void 0:n[0];if(r)return r}return null===t?s.identityStore.set(s.anonKey,null):s.identityStore.set(s.anonKey,null!=t?t:(0,y.v4)()),s.identityStore.getAndSync(s.anonKey)},this.traits=function(t){var e;if(!s.options.disable)return null===t&&(t={}),t&&s.traitsStore.set(s.traitsKey,null!=t?t:{}),null!=(e=s.traitsStore.get(s.traitsKey))?e:{}},this.options=(0,r.__assign)((0,r.__assign)({},Y),t),this.cookieOptions=e,this.idKey=null!=(i=null==(n=t.cookie)?void 0:n.key)?i:Y.cookie.ke
1y,this.traitsKey=null!=(a=null==(o=t.localStorage)?void 0:o.key)?a:Y.localStorage.key,this.anonKey="ajs_anonymous_id",this.identityStore=this.createStorage(this.options,e),this.legacyUserStore=this.createStorage(this.options,e,function(t){return t===z.Cookie}),this.traitsStore=this.createStorage(this.options,e,function(t){return t!==z.Cookie});var u=this.legacyUserStore.get(Y.cookie.oldKey);u&&"object"==typeof u&&(u.id&&this.id(u.id),u.traits&&this.traits(u.traits)),F(this)}return t.prototype.legacySIO=function(){var t=this.legacyUserStore.get("_sio");if(!t)return null;var e=t.split("----");return[e[0],e[1]]},t.prototype.identify=function(t,e){if(!this.options.disable){e=null!=e?e:{};var n=this.id();(null===n||n===t)&&(e=(0,r.__assign)((0,r.__assign)({},this.traits()),e)),t&&this.id(t),this.traits(e)}},t.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},t.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},t.prototype.load=function(){return new t(this.options,this.cookieOptions)},t.prototype.save=function(){return!0},t.prototype.createStorage=function(t,e,n){var r=[z.LocalStorage,z.Cookie,z.Memory];return t.disable?new K([]):t.persist?(void 0!==t.storage&&null!==t.storage&&$(t.storage)&&(r=t.storage.stores),t.localStorageFallbackDisabled&&(r=r.filter(function(t){return t!==z.LocalStorage})),n&&(r=r.filter(n)),new K(Q(H(r,e)))):new K([new q])},t.defaults=Y,t}(),X={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},tt=function(t){function e(e,n){void 0===e&&(e=X);var i=t.call(this,(0,r.__assign)((0,r.__assign)({},X),e),n)||this;return i.anonymousId=function(t){},F(i),i}return(0,r.__extends)(e,t),e}(Z),te=t.i(494451),tn=t.i(213129),tr=t.i(569398),ti=t.i(18011),to=function(t,e,n){n.getAndRemove(t).forEach(function(t){tf(e,t).catch(console.error)})},ta=to.bind(void 0,"on"),ts=to.bind(void 0,"setAnonymousId"),tu=function(t,e){Object.keys(e.calls).forEach(function(n){e.getAndRemove(n).forEach(function(e){setTimeout(function(){tf(t,e).catch(console.error)},0)})})},tc=function(t){if(tl(t))return S(t.pop())},tl=function(t){var e=t[t.length-1];if(!(0,u.isPlainObject)(e)||"bpc"!==e.__t)return!1;for(var n in e)if(!m.includes(n))return!1;return!0},td=function(t,e,n,r){void 0===n&&(n=function(){}),void 0===r&&(r=console.error),this.method=t,this.resolve=n,this.reject=r,this.called=!1,this.args=e},th=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._callMap={},this.add.apply(this,t)}return Object.defineProperty(t.prototype,"calls",{get:function(){return this._pushSnippetWindowBuffer(),this._callMap},set:function(t){this._callMap=t},enumerable:!1,configurable:!0}),t.prototype.get=function(t){var e;return null!=(e=this.calls[t])?e:[]},t.prototype.getAndRemove=function(t){var e=this.get(t);return this.calls[t]=[],e},t.prototype.add=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach(function(e){["track","screen","alias","group","page","identify"].includes(e.method)&&!tl(e.args)&&(e.args=(0,r.__spreadArray)((0,r.__spreadArray)([],e.args,!0),[C()],!1)),t.calls[e.method]?t.calls[e.method].push(e):t.calls[e.method]=[e]})},t.prototype.clear=function(){this._pushSnippetWindowBuffer(),this.calls={}},t.prototype.toArray=function(){var t;return(t=[]).concat.apply(t,Object.values(this.calls))},t.prototype._pushSnippetWindowBuffer=function(){if("npm"!==(0,ti.getVersionType)()){var t=(0,tr.getGlobalAnalytics)();if(Array.isArray(t)){var e=t.splice(0,t.length).map(function(t){return new td(t[0],t.slice(1))});this.add.apply(this,e)}}},t}();function tf(t,e){return(0,r.__awaiter)(this,void 0,void 0,function(){var n,i;return(0,r.__generator)(this,function(r){switch(r.label){case 0:var o;if(r.trys.push([0,3,,4]),e.called)return[2,void 0];if(e.called=!0,!("object"==typeof(o=n=t[e.method].apply(t,e.args))&&null!==o&&"then"in o&&"function"==typeof o.then))return[3,2];return[4,n];case 1:r.sent(),r.label=2;case 2:return e.resolve(n),[3,4];case 3:return i=r.sent(),e.reject(i),[3,4];case 4:return[2]}})})}var tp=function(){function t(t){var e=this;this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=te.ver
1sion,this._preInitBuffer=new th,this._promise=t(this._preInitBuffer),this._promise.then(function(t){var n=t[0],r=t[1];e.instance=n,e.ctx=r}).catch(function(){})}return t.prototype.then=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).then.apply(t,e)},t.prototype.catch=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).catch.apply(t,e)},t.prototype.finally=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).finally.apply(t,e)},t.prototype._createMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.instance?Promise.resolve((n=e.instance)[t].apply(n,r)):new Promise(function(n,i){e._preInitBuffer.add(new td(t,r,n,i))})}},t.prototype._createChainableMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.instance?(n=e.instance)[t].apply(n,r):e._preInitBuffer.add(new td(t,r)),e}},t}(),tg=t.i(476582),tv=function(t){var e=!1;window.addEventListener("pagehide",function(){e||t(e=!0)}),document.addEventListener("visibilitychange",function(){if("hidden"==document.visibilityState){if(e)return;e=!0}else e=!1;t(e)})},ty=function(t){function e(e,n){var r=t.call(this,e)||this;return r.retryTimeout=n,r.name="RateLimitError",r}return(0,r.__extends)(e,t),e}(Error);function t_(t){return(encodeURI(JSON.stringify(t)).split(/%..|./).length-1)/1024}var tm=t.i(506352);function tb(t,e,n,i){var o=this;t||setTimeout(function(){return(0,r.__awaiter)(o,void 0,void 0,function(){var t,o;return(0,r.__generator)(this,function(a){switch(a.label){case 0:return t=!0,[4,function(t,e){return(0,r.__awaiter)(this,void 0,void 0,function(){var n,i=this;return(0,r.__generator)(this,function(o){switch(o.label){case 0:if(n=[],(0,f.isOffline)())return[2,e];return[4,(0,tm.pWhile)(function(){return e.length>0&&!(0,f.isOffline)()},function(){return(0,r.__awaiter)(i,void 0,void 0,function(){var i;return(0,r.__generator)(this,function(r){switch(r.label){case 0:if(!(i=e.pop()))return[2];return[4,(0,R.attempt)(i,t)];case 1:return r.sent()instanceof p.Context||n.push(i),[2]}})})})];case 1:return o.sent(),n.map(function(t){return e.pushWithBackoff(t)}),[2,e]}})})}(n,e)];case 1:return o=a.sent(),t=!1,e.todo>0&&i(t,o,n,i),[2]}})})},5e3*Math.random())}var tw=t.i(651150),tS=function(t){return"Segment.io"===t.name},tC="This is being deprecated and will be not be available in future releases of Analytics JS",tE=(0,tn.getGlobal)(),tA=null==tE?void 0:tE.analytics,tO=function(){function t(t,e){var n;this.timeout=300,this._getSegmentPluginMetadata=function(){var t;return null==(t=e.plugins.find(tS))?void 0:t.metadata},this.writeKey=t.writeKey,this.cdnSettings=null!=(n=t.cdnSettings)?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.call(this))?void 0:e.apiHost},enumerable:!1,configurable:!0}),t}();function tM(){console.warn(tC)}var tk=function(e){function n(t,n,i,o,a){var s,u,c,l,d,h,f=this;(f=e.call(this)||this)._debug=!1,f.initialized=!1,f.user=function(){return f._user},f.init=f.initialize.bind(f),f.log=tM,f.addIntegrationMiddleware=tM,f.listeners=tM,f.addEventListener=tM,f.removeAllListeners=tM,f.removeListener=tM,f.removeEventListener=tM,f.hasListeners=tM,f.add=tM,f.addIntegration=tM;var p=null==n?void 0:n.cookie,g=null!=(d=null==n?void 0:n.disableClientPersistence)&&d;f.queue=null!=i?i:(s="".concat(t.writeKey,":event-queue"),void 0===(u=null==n?void 0:n.retryQueue)&&(u=!1),void 0===(c=g)&&(c=!1),l=u?10:1,new T(c?new D.PriorityQueue(l,[]):new x.PersistedPriorityQueue(l,s))),f.settings=new tO(t,f.queue);var v=null==n?void 0:n.storage;return f._universalStorage=f.createStore(g,v,p),f._user=null!=o?o:new Z((0,r.__assign)({persist:!g,storage:null==n?void 0:n.storage},null==n?void 0:n.user),p).load(),f._group=null!=a?a:new tt((0,r.__assign)({persist:!g,storage:null==n?void 0:n.storage},null==n?void 0:n.group),p).load(),f.eventFactory=new P(f._user),f.integrations=null!=(h=null==n?void 0:n.integrations)?h:{},f.options=null!=n?n:{},F(f),f}return(0,r.__extends)(n,e),n.prototype.createStore=function(t,e,n){return new K(t?[new q]:e&&$(e)?Q(H(e.stores,n)
1):Q([z.LocalStorage,{name:z.Cookie,settings:n},z.Memory]))},Object.defineProperty(n.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),n.prototype.track=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,r.__awaiter)(this,void 0,void 0,function(){var e,n,i,o,a,s,u,l=this;return(0,r.__generator)(this,function(r){return e=tc(t),i=(n=c.apply(void 0,t))[0],o=n[1],a=n[2],s=n[3],u=this.eventFactory.track(i,o,a,this.integrations,e),[2,this._dispatch(u,s).then(function(t){return l.emit("track",i,t.event.properties,t.event.options),t})]})})},n.prototype.page=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,r.__awaiter)(this,void 0,void 0,function(){var e,n,i,o,a,s,u,c,d=this;return(0,r.__generator)(this,function(r){return e=tc(t),i=(n=l.apply(void 0,t))[0],o=n[1],a=n[2],s=n[3],u=n[4],c=this.eventFactory.page(i,o,a,s,this.integrations,e),[2,this._dispatch(c,u).then(function(t){return d.emit("page",i,o,t.event.properties,t.event.options),t})]})})},n.prototype.identify=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,r.__awaiter)(this,void 0,void 0,function(){var e,n,i,o,a,s,u,c=this;return(0,r.__generator)(this,function(r){return e=tc(t),i=(n=d(this._user).apply(void 0,t))[0],o=n[1],a=n[2],s=n[3],this._user.identify(i,o),u=this.eventFactory.identify(this._user.id(),this._user.traits(),a,this.integrations,e),[2,this._dispatch(u,s).then(function(t){return c.emit("identify",t.event.userId,t.event.traits,t.event.options),t})]})})},n.prototype.group=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=tc(e);if(0===e.length)return this._group;var i=d(this._group).apply(void 0,e),o=i[0],a=i[1],s=i[2],u=i[3];this._group.identify(o,a);var c=this._group.id(),l=this._group.traits(),h=this.eventFactory.group(c,l,s,this.integrations,r);return this._dispatch(h,u).then(function(e){return t.emit("group",e.event.groupId,e.event.traits,e.event.options),e})},n.prototype.alias=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,r.__awaiter)(this,void 0,void 0,function(){var e,n,i,o,a,s,u,c=this;return(0,r.__generator)(this,function(r){return e=tc(t),i=(n=h.apply(void 0,t))[0],o=n[1],a=n[2],s=n[3],u=this.eventFactory.alias(i,o,a,this.integrations,e),[2,this._dispatch(u,s).then(function(t){return c.emit("alias",i,o,t.event.options),t})]})})},n.prototype.screen=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,r.__awaiter)(this,void 0,void 0,function(){var e,n,i,o,a,s,u,c,d=this;return(0,r.__generator)(this,function(r){return e=tc(t),i=(n=l.apply(void 0,t))[0],o=n[1],a=n[2],s=n[3],u=n[4],c=this.eventFactory.screen(i,o,a,s,this.integrations,e),[2,this._dispatch(c,u).then(function(t){return d.emit("screen",i,o,t.event.properties,t.event.options),t})]})})},n.prototype.trackClick=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(0,r.__awaiter)(this,void 0,void 0,function(){var n;return(0,r.__generator)(this,function(i){switch(i.label){case 0:return[4,t.A(18947)];case 1:return[2,(n=i.sent().link).call.apply(n,(0,r.__spreadArray)([this],e,!1))]}})})},n.prototype.trackLink=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(0,r.__awaiter)(this,void 0,void 0,function(){var n;return(0,r.__generator)(this,function(i){switch(i.label){case 0:return[4,t.A(18947)];case 1:return[2,(n=i.sent().link).call.apply(n,(0,r.__spreadArray)([this],e,!1))]}})})},n.prototype.trackSubmit=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(0,r.__awaiter)(this,void 0,void 0,function(){var n;return(0,r.__generator)(this,function(i){switch(i.label){case 0:return[4,t.A(18947)];case 1:return[2,(n=i.sent().form).call.apply(n,(0,r.__spreadArray)([this],e,!1))]}})})},n.prototype.trackForm=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(0,r.__awaiter)(this,void 0,void 0,function(){var n;return(0,r.__generator)(this,function(i){switch(i.label){case 0:return[4,t.A(18947)];case 1:return[2,(n=i.sent().form).call.apply(n,(0,r.__spreadArray)([this],e,!1))]}})})},n.prototype.register=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,r.__awaiter)(this,void 0,void 0,function(){var e,n=this;return(0,r.__generator)(this,function(r){switch(r.label){case 0:return e=p.Context.system(),[4,Promise.all(t.map(function(t){return n.queue.register(e,t,n)}))];case 1:return r.sent(),[2,e]}})})},n.prototype.deregister=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,r.__awaiter)(this,void 0,void 0,function(){var e,n=this;return(0,r.__generator)(this,function(r){switch(r.label){case 0:return e=p.Context.system(),[4,Promise.all(t.map(function(t){var r=n.queue.plugins.find(function(e){return e.name===t});if(r)return n.queue.deregister(e,r,n);e.log("warn","plugin ".concat(t," not found"))}))];case 1:return r.sent(),[2,e]}})})},n.prototype.debug=function(t){return!1===t&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=t,this},n.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit
1("reset")},n.prototype.timeout=function(t){this.settings.timeout=t},n.prototype._dispatch=function(t,e){return(0,r.__awaiter)(this,void 0,void 0,function(){var n;return(0,r.__generator)(this,function(i){return(n=new p.Context(t),(0,f.isOffline)()&&!this.options.retryQueue)?[2,n]:[2,function(t,e,n,i){return(0,r.__awaiter)(this,void 0,void 0,function(){var o,a;return(0,r.__generator)(this,function(r){switch(r.label){case 0:if(n.emit("dispatch_start",t),o=Date.now(),!e.isEmpty())return[3,2];return[4,e.dispatchSingle(t)];case 1:return a=r.sent(),[3,4];case 2:return[4,e.dispatch(t)];case 3:a=r.sent(),r.label=4;case 4:var s,u;if(!(null==i?void 0:i.callback))return[3,6];return[4,(0,g.invokeCallback)(a,i.callback,(s=o,Math.max((null!=(u=i.timeout)?u:300)-(Date.now()-s),0)))];case 5:a=r.sent(),r.label=6;case 6:return(null==i?void 0:i.debug)&&a.flush(),[2,a]}})})}(n,this.queue,this,{callback:e,debug:this._debug,timeout:this.settings.timeout})]})})},n.prototype.addSourceMiddleware=function(e){return(0,r.__awaiter)(this,void 0,void 0,function(){var n=this;return(0,r.__generator)(this,function(i){switch(i.label){case 0:return[4,this.queue.criticalTasks.run(function(){return(0,r.__awaiter)(n,void 0,void 0,function(){var n,i,o;return(0,r.__generator)(this,function(r){switch(r.label){case 0:return[4,t.A(483953)];case 1:return n=r.sent().sourceMiddlewarePlugin,i={},this.queue.plugins.forEach(function(t){if("destination"===t.type)return i[t.name]=!0}),o=n(e,i),[4,this.register(o)];case 2:return r.sent(),[2]}})})})];case 1:return i.sent(),[2,this]}})})},n.prototype.addDestinationMiddleware=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this.queue.plugins.filter(j).forEach(function(n){("*"===t||n.name.toLowerCase()===t.toLowerCase())&&n.addMiddleware.apply(n,e)}),Promise.resolve(this)},n.prototype.setAnonymousId=function(t){return this._user.anonymousId(t)},n.prototype.queryString=function(e){return(0,r.__awaiter)(this,void 0,void 0,function(){return(0,r.__generator)(this,function(n){switch(n.label){case 0:if(!1===this.options.useQueryString)return[2,[]];return[4,t.A(679804)];case 1:return[2,(0,n.sent().queryString)(this,e)]}})})},n.prototype.use=function(t){return t(this),this},n.prototype.ready=function(t){return void 0===t&&(t=function(t){return t}),(0,r.__awaiter)(this,void 0,void 0,function(){return(0,r.__generator)(this,function(e){return[2,Promise.all(this.queue.plugins.map(function(t){return t.ready?t.ready():Promise.resolve()})).then(function(e){return t(e),e})]})})},n.prototype.noConflict=function(){return console.warn(tC),(0,tr.setGlobalAnalytics)(null!=tA?tA:this),this},n.prototype.normalize=function(t){return console.warn(tC),this.eventFactory.normalize(t)},Object.defineProperty(n.prototype,"failedInitializations",{get:function(){return console.warn(tC),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"VERSION",{get:function(){return te.version},enumerable:!1,configurable:!0}),n.prototype.initialize=function(t,e){return(0,r.__awaiter)(this,void 0,void 0,function(){return(0,r.__generator)(this,function(t){return console.warn(tC),[2,Promise.resolve(this)]})})},n.prototype.pageview=function(t){return(0,r.__awaiter)(this,void 0,void 0,function(){return(0,r.__generator)(this,function(e){switch(e.label){case 0:return console.warn(tC),[4,this.page({path:t})];case 1:return e.sent(),[2,this]}})})},Object.defineProperty(n.prototype,"plugins",{get:function(){var t;return console.warn(tC),null!=(t=this._plugins)?t:{}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"Integrations",{get:function(){return console.warn(tC),this.queue.plugins.filter(function(t){return"destination"===t.type}).reduce(function(t,e){var n="".concat(e.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return t;var i=r.Integration;return i?t[e.name]=i:t[e.name]=r,t},{})},enumerable:!1,configurable:!0}),n.prototype.push=function(t){var e=t.shift();(!e||this[e])&&this[e].apply(this,t)},n}(v.Emitter),tI=function(t){function e(){var e=t.call(this,{writeKey:""},{disableClientPersistence:!0})||this;return e.initialized=!0,e}return(0,r.__extends)(e,t),e}(tk),tP=t.i(891452),tj=t.i(522927),tx=t.i(254299),tD=function(t){try{var e=new URLSearchParams;return Object.entries(t).forEach(function(t){var n=t[0],r=t[1];Array.isArray(r)?r.forEach(function(t){return e.append(n,t)}):e.append(n,r)}),e.toString()}catch(t){return""}},tL=new function(){var t=this;this.name="Page Enrichment",this.type="before",this.version="0.1.0",this.isLoaded=function(){return!0},this.load=function(e,n){return(0,r.__awaiter)(t,void 0,void 0,function(){var t;return(0,r.__generator)(this,function(e){switch(e.label){case 0:this.instance=n,e.label=1;case 1:return e.trys.push([1,3,,4]),t=this,[4,function(t){return(0,r.__awaiter)(this,void 0,void 0,function(){var e;return(0,r.__generator)(this,function(n){return(e=navigator.userAgentData)?t?[2,e.getHighEntropyValues(t).cat
1ch(function(){return e.toJSON()})]:[2,e.toJSON()]:[2,void 0]})})}(this.instance.options.highEntropyValuesClientHints)];case 2:return t.userAgentData=e.sent(),[3,4];case 3:return e.sent(),[3,4];case 4:return[2,Promise.resolve()]}})})},this.enrich=function(n){var i,o,a,s,u,c,l=n.event.context,d=l.page.search||"",h="object"==typeof d?tD(d):d;l.userAgent=navigator.userAgent,l.userAgentData=t.userAgentData;var f=navigator.userLanguage||navigator.language;void 0===l.locale&&void 0!==f&&(l.locale=f),null!=l.library||(l.library={name:"analytics.js",version:"".concat("web"===(0,ti.getVersionType)()?"next":"npm:next","-").concat(te.version)}),h&&!l.campaign&&((i=h).startsWith("?")&&(i=i.substring(1)),l.campaign=(i=i.replace(/\?/g,"&")).split("&").reduce(function(t,e){var n=e.split("="),r=n[0],i=n[1];if(r.includes("utm_")&&r.length>4){var o=r.slice(4);"campaign"===o&&(o="name"),t[o]=(0,tx.gracefulDecodeURIComponent)(void 0===i?"":i)}return t},{}));var p=function(){var t=G.get("_ga");if(t&&t.startsWith("amp"))return t}();p&&(l.amp={id:p}),s=(a=new K(null!=(c=t.instance.options.disableClientPersistence)&&c?[]:[new W(function(){if(e)return e;var t=V(window.location.href);return e={expires:31536e6,secure:!1,path:"/"},t&&(e.domain=t),e}())])).get("s:context.referrer"),(u=null!=(o=function(t){var e={btid:"dataxu",urid:"millennial-media"};t.startsWith("?")&&(t=t.substring(1));for(var n=(t=t.replace(/\?/g,"&")).split("&"),r=0;r<n.length;r++){var i=n[r].split("="),o=i[0],a=i[1];if(e[o])return{id:a,type:e[o]}}}(h))?o:s)&&(l&&(l.referrer=(0,r.__assign)((0,r.__assign)({},l.referrer),u)),a.set("s:context.referrer",u));try{l.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){}return n},this.track=this.enrich,this.identify=this.enrich,this.page=this.enrich,this.group=this.enrich,this.alias=this.enrich,this.screen=this.enrich},tN=t.i(460385),tR=t.i(435240),tT=t.i(577248),tF=function(){function t(t,e){this.version="1.0.0",this.alternativeNames=[],this.loadPromise=(0,tj.createDeferred)(),this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=e,this.name=t,this.type=e.type,this.alternativeNames.push(e.name)}return t.prototype.addMiddleware=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];"destination"===this.type&&(t=this.middleware).push.apply(t,e)},t.prototype.transform=function(t){return(0,r.__awaiter)(this,void 0,void 0,function(){var e;return(0,r.__generator)(this,function(n){switch(n.label){case 0:return[4,(0,tR.applyDestinationMiddleware)(this.name,t.event,this.middleware)];case 1:return null===(e=n.sent())&&t.cancel(new L.ContextCancelation({retry:!1,reason:"dropped by destination middleware"})),[2,new p.Context(e)]}})})},t.prototype._createMethod=function(t){var e=this;return function(n){return(0,r.__awaiter)(e,void 0,void 0,function(){var e,i;return(0,r.__generator)(this,function(r){switch(r.label){case 0:if(!this.action[t])return[2,n];if(e=n,"destination"!==this.type)return[3,2];return[4,this.transform(n)];case 1:e=r.sent(),r.label=2;case 2:return r.trys.push([2,5,,6]),[4,this.ready()];case 3:if(!r.sent())throw Error("Something prevented the destination from getting ready");return(0,tT.recordIntegrationMetric)(n,{integrationName:this.action.name,methodName:t,type:"action"}),[4,this.action[t](e)];case 4:return r.sent(),[3,6];case 5:throw i=r.sent(),(0,tT.recordIntegrationMetric)(n,{integrationName:this.action.name,methodName:t,type:"action",didError:!0}),i;case 6:return[2,n]}})})}},t.prototype.isLoaded=function(){return this.action.isLoaded()},t.prototype.ready=function(){return(0,r.__awaiter)(this,void 0,void 0,function(){return(0,r.__generator)(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.loadPromise.promise];case 1:return t.sent(),[2,!0];case 2:return t.sent(),[2,!1];case 3:return[2]}})})},t.prototype.load=function(t,e){return(0,r.__awaiter)(this,void 0,void 0,function(){var n,i,o,a;return(0,r.__generator)(this,function(r){switch(r.label){case 0:if(this.loadPromise.isSettled())return[2,this.loadPromise.promise];r.label=1;case 1:return r.trys.push([1,3,,4]),(0,tT.recordIntegrationMetric)(t,{integrationName:this.action.name,methodName:"load",type:"action"}),n=this.action.load(t,e),o=(i=this.loadPromise).resolve,[4,n];case 2:return o.apply(i,[r.sent()]),[2,n];case 3:throw a=r.sent(),(0,tT.recordIntegrationMetric)(t,{integrationName:this.action.name,methodName:"load",type:"action",didError:!0}),this.loadPromise.reject(a),a;case 4:return[2]}})})},t.prototype.unload=function(t,e){var n,r;return null==(r=(n=this.action).unload)?void 0:r.call(n,t,e)},t}(),tU=(0,tn.getGlobal)(),tK=null!=(n=tU.__SEGMENT_INSPECTOR__)?n:tU.__SEGMENT_INSPECTOR__={},tq=function(t){var e;return null==(e=tK.attach)?void 0:e.call(tK,t)},tz=t.i(667195),tB=function(e){function n(){var n=this,i=(0,tj.createDeferred)(),u=i.promise,c=i.resolve;return(n=e.call(this,function(e){return u.then(function(n){return function(e,n,i){var u,c,l,d,h,g,v,y,_,m,b;return void 0===n&&(n={}),(0,r.__awaiter)(this,void 0,void 0,function(){var w,S,C,E,A,O,M,k,I,P,j,L;return(0,r.__generator)(this,function(N){switch(N.label){case 0:if(!0===n.disable)return[2,[new tI,p.Context.system()]];if(n.globalAnalyticsKey&&(0,tr.setGlobalAnalyticsKey)(n.globalAnalyticsKey),e.cdnURL&&(0,a.setGlobalCDNUrl)(e.cdnURL),n.initialPageview&&i.add(new td("page",[])),w=null!=(u=e.cdnURL)?u:(0,a.getCDN)(),null==(c=e.cdnSettings))return[3,1];return C=c,[3,3];case 1:var R,T;return[4,(R=e.writeKey,T=w,(0,s.fetch)("".concat(T,"/v1/projects/").concat(R,"/settings")).then(function(t){return t.ok?t.json():t.text().then(function(t){throw Error(t)})}).catch(function(t){throw console.error(t.message),t}))];case 2:C=N.sent(),N.label=3;case 3:if(S=C,n.updateCDNSettings&&(S=n.updateCDNSettings(S)),"function"!=typeof n.disable)return[3,5];return[4,n.disable(S)];case 4:if(N.sent())return[2,[new tI,p.Context.system()]];N.label=5;case 5:return E=null==(d=null==(l=S.integrations["Segment.io"])?void 0:l.retryQueue)||d,n=(0,r.__assign)({retryQueue:E},n),tq(A=new tk((0,r.__assign)((0,r.__assign)({},e),{cdnSettings:S,cdnURL:w}),n)),O=null!=(h=e.plugins)?h:[],M=null!=(g=e.classicIntegrations)?g:[],k=null==(v=n.integrations)?void 0:v["Segment.io"],tz.Stats.initRemoteMetrics((0,r.__assign)((0,r.__assign)({},S.metrics),{host:null!=(y=null==k?void 0:k.apiHost)?y:null==(_=S.metrics)?void 0:_.host,protocol:null==k?void 0:k.protocol})),[4,function(e,n,i,u,c,l,d){var h,g,v;return void 0===c&&(c=[]),(0,r.__awaiter)(this,void 0,void 0,function(){var y,_,m,b,w,S,C,E,A,O,M,k,I,P,j=this;return(0,r.__generator)(this,function(L){var N,R,T;switch(L.label){case 0:if(ts(i,d),ta(i,d),y=null==c?void 0:c.filter(function(t){return"object"==typeof t}),_=null==c?void 0:c.filter(function(t){return"function"==typeof t&&"string"==typeof t.pluginName}),"test"===o().NODE_ENV||!((null!=(T=null==(R=null==(N=n.middlewareSettings)?void 0:N.routingRules)?void 0:R.length)?T:0)>0))return[3,2];return[4,t.A(860409).then(function(t){return t.tsubMiddleware(n.middlewareSettings.routingRules)})];case 1:return b=L.sent(),[3,3];case 2:b=void 0,L.label=3;case 3:if(m=b,("test"===o().NODE_ENV||!(Object.keys(n.integrations).length>1))&&!(l.length>0))return[3,5];return[4,t.A(94539).then(function(t){return t.ajsDestinations(e,n,i.integrations,u,m,l)})];case 4:return S=L.sent(),[3,6];case 5:S=[],L.label=6;case 6:if(w=S,!n.legacyVideoPluginsEnabled)return[3,8];return[4,t.A(207037).then(function(t){return t.loadLegacyVideoPlugins(i)})];case 7:L.sent(),L.label=8;case 8:if(!(null==(h=u.plan)?void 0:h.track))return[3,10];return[4,t.A(129128).then(function(t){var e;return t.schemaFilter(null==(e=u.plan)?void 0:e.track,n)})];case 9:return E=L.sent(),[3,11];case 10:E=void 0,L.label=11;case 11:return C=E,A=(0,tP.mergedOptions)(n,u),[4,(function(t,e,n,i,o,s){var u,c,l;return(0,r.__awaiter)(this,void 0,void 0,function(){var d,h,f=this;return(0,r.__generator)(this,function(p){switch(p.label){case 0:return d=[],h=null!=(c=null==(u=t.middlewareSettings)?void 0:u.routingRules)?c:[],[4,Promise.all((null!=(l=t.remotePlugins)?l:[]).map(function(t){return(0,r.__awaiter)(f,void 0,void 0,function(){var u,c,l,f,p;return(0,r.__generator)(this,function(g){switch(g.label){case 0:var v,y;if(v=e[t.creationName],y=e[t.name],!1===e.All&&!v&&!y||!1===v||!1===y||0)return[2];g.label=1;case 1:if(g.trys.push([1,6,,7]),c=null==s?void 0:s.find(function(e){return e.pluginName===t.name}))return[3,3];return[4,function(t,e){return(0,r.__awaiter)(this,void 0,void 0,function(){var n,i,o,s,u,c;return(0,r.__generator)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,9,,10]),n=RegExp("https://cdn.segment.(com|build)"),i=(0,a.getCDN)(),!e)return[3,6];s=(o=t.url.split("/"))[o.length-2],u=t.url.replace(s,btoa(s).replace(/=/g,"")),r.label=1;case 1:return r.trys.push([1,3,,5]),[4,(0,tN.loadScript)(u.replace(n,i))];case 2:case 4:return r.sent(),[3,5];case 3:return r.sent(),[4,(0,tN.loadScript)(t.url.replace(n,i))];case 5:return[3,8];case 6:return[4,(0,tN.loadScript)(t.url.replace(n,i))];case 7:r.sent(),r.label=8;case 8:if("function"==typeof window[t.libraryName])return[2,window[t.libraryName]];return[3,10];case 9:throw c=r.sent(),console.error("Failed to create PluginFactory",t),c;case 10:return[2]}})})}(t,null==i?void 0:i.obfuscate)];case 2:c=g.sent(),g.label=3;case 3:if(!(u=c))return[3,5];return[4,u((0,r.__assign)((0,r.__assign)({}
1,t.settings),n[t.name]))];case 4:!function(t){if(!Array.isArray(t))throw Error("Not a valid list of plugins");var e=["load","isLoaded","name","version","type"];t.forEach(function(t){e.forEach(function(e){var n;if(void 0===t[e])throw Error("Plugin: ".concat(null!=(n=t.name)?n:"unknown"," missing required function ").concat(e))})})}(f=Array.isArray(l=g.sent())?l:[l]),p=h.filter(function(e){return e.destinationName===t.creationName}),f.forEach(function(e){var n=new tF(t.creationName,e);p.length&&o&&n.addMiddleware(o),d.push(n)}),g.label=5;case 5:return[3,7];case 6:return console.warn("Failed to load Remote Plugin",g.sent()),[3,7];case 7:return[2]}})})}))];case 1:return p.sent(),[2,d.filter(Boolean)]}})})})(n,i.integrations,A,u,m,_).catch(function(){return[]})];case 12:if(O=L.sent(),M=(0,r.__spreadArray)((0,r.__spreadArray)([tL],w,!0),O,!0),C&&M.push(C),(null==(g=u.integrations)?void 0:g.All)===!1&&!u.integrations["Segment.io"]||u.integrations&&!1===u.integrations["Segment.io"])return[3,14];return I=(k=M).push,[4,function(t,e,n){window.addEventListener("pagehide",function(){l.push.apply(l,Array.from(d)),d.clear()});var i,o,a,u,c=null!=(o=null==e?void 0:e.apiKey)?o:"",l=t.options.disableClientPersistence?new D.PriorityQueue(t.queue.queue.maxAttempts,[]):new x.PersistedPriorityQueue(t.queue.queue.maxAttempts,"".concat(c,":dest-Segment.io")),d=new Set,h=null!=(a=null==e?void 0:e.apiHost)?a:tw.SEGMENT_API_HOST,g=null!=(u=null==e?void 0:e.protocol)?u:"https",v="".concat(g,"://").concat(h),y=null==e?void 0:e.deliveryStrategy,_=(null==y?void 0:y.strategy)==="batching"?function(t,e){var n,i,o,a=[],u=!1,c=null!=(n=null==e?void 0:e.size)?n:10,l=null!=(i=null==e?void 0:e.timeout)?i:5e3,d=0;function h(n){if(0!==n.length){var i,o=null==(i=n[0])?void 0:i.writeKey,a=n.map(function(t){return t.sentAt,(0,r.__rest)(t,["sentAt"])});return(0,s.fetch)("https://".concat(t,"/b"),{keepalive:(null==e?void 0:e.keepalive)||u,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({writeKey:o,batch:a,sentAt:new Date().toISOString()})}).then(function(t){var e;if(t.status>=500)throw Error("Bad response from server: ".concat(t.status));if(429===t.status){var n=null==(e=t.headers)?void 0:e.get("x-ratelimit-reset"),r="string"==typeof n?1e3*parseInt(n):l;throw new ty("Rate limit exceeded: ".concat(t.status),r)}})}}function f(t){var n;return void 0===t&&(t=1),(0,r.__awaiter)(this,void 0,void 0,function(){var i;return(0,r.__generator)(this,function(o){return a.length?(i=a,a=[],[2,null==(n=h(i))?void 0:n.catch(function(n){var o;p.Context.system().log("error","Error sending batch",n),t<=(null!=(o=null==e?void 0:e.maxRetries)?o:10)&&("RateLimitError"===n.name&&(d=n.retryTimeout),a.push.apply(a,i),a.map(function(e){"_metadata"in e&&(e._metadata=(0,r.__assign)((0,r.__assign)({},e._metadata),{retryCount:t}))}),g(t+1))})]):[2]})})}function g(t){void 0===t&&(t=1),o||(o=setTimeout(function(){o=void 0,f(t).catch(console.error)},d||l),d=0)}return tv(function(t){if((u=t)&&a.length){var e,n;Promise.all((e=[],n=0,a.forEach(function(t){t_(e[n])>=64&&n++,e[n]?e[n].push(t):e[n]=[t]}),e).map(h)).catch(console.error)}}),{dispatch:function(t,n){return(0,r.__awaiter)(this,void 0,void 0,function(){return(0,r.__generator)(this,function(t){return a.push(n),[2,a.length>=c||t_(a)>=450||(null==e?void 0:e.keepalive)&&t_(a)>=54||u?f():g()]})})}}}(h,y.config):(i=null==y?void 0:y.config,{dispatch:function(t,e){return(0,s.fetch)(t,{keepalive:null==i?void 0:i.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(e)}).then(function(t){var e;if(t.status>=500)throw Error("Bad response from server: ".concat(t.status));if(429===t.status){var n=null==(e=t.headers)?void 0:e.get("x-ratelimit-reset"),r=n?1e3*parseInt(n):5e3;throw new ty("Rate limit exceeded: ".concat(t.status),r)}})}});function m(i){return(0,r.__awaiter)(this,void 0,void 0,function(){var o,a;return(0,r.__generator)(this,function(s){var u,c,h,p,g,y;return(0,f.isOffline)()?(l.push(i),tb(!1,l,b,tb),[2,i]):(d.add(i),o=i.event.type.charAt(0),a=(0,tg.toFacade)(i.event).json(),"track"===i.event.type&&delete a.traits,"alias"===i.event.type&&(u=a,y=t.user(),u.previousId=null!=(p=null!=(h=null!=(c=u.previousId)?c:u.from)?h:y.id())?p:y.anonymousId(),u.userId=null!=(g=u.userId)?g:u.to,delete u.from,delete u.to,a=u),[2,_.dispatch("".concat(v,"/").concat(o),function(t,e,n,i,o){var a,s=t.user();delete e.options,e.writeKey=null==n?void 0:n.apiKey,e.userId=e.userId||s.id(),e.anonymousId=e.anonymousId||s.anonymousId(),e.sentAt=new Date;var u=t.queue.failedInitializations||[];u.length>0&&(e._metadata={failedInitializations:u}),null!=o&&(o.attempts>1&&(e._metadata=(0,r.__assign)((0,r.__assign)({},e._metadata),{retryCount:o.attempts})),o.attempts++);var c=[],l=[];for(var d in i){var h=i[d];"Segment.io"===d&&c.push(d),"bundled"===h.bundlingStatus&&c.push(d),"unbundled"===h.bundlingStatus&&l.push(d)}for(var f=0,p=(null==n?void 0:n.unbundledIntegrations)||[];f<p.length;f++){var g=p[f];l.includes(g)||l.push(g)}var v=null!=(a=null==n?void 0:n.maybeBundledConfigIds)?a:{},y=[];
1return c.sort().forEach(function(t){var e;(null!=(e=v[t])?e:[]).forEach(function(t){y.push(t)})}),(null==n?void 0:n.addBundledMetadata)!==!1&&(e._metadata=(0,r.__assign)((0,r.__assign)({},e._metadata),{bundled:c.sort(),unbundled:l.sort(),bundledIds:y})),e}(t,a,e,n,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 tb(!1,l,b,tb),i}).finally(function(){d.delete(i)})])})})}var b={metadata:{writeKey:c,apiHost:h,protocol:g},name:"Segment.io",type:"destination",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:m,identify:m,page:m,alias:m,group:m,screen:m};return l.todo&&tb(!1,l,b,tb),b}(i,A["Segment.io"],n.integrations)];case 13:I.apply(k,[L.sent()]),L.label=14;case 14:return[4,i.register.apply(i,(0,r.__spreadArray)((0,r.__spreadArray)([],M,!1),y,!1))];case 15:return P=L.sent(),[4,(0,r.__awaiter)(void 0,void 0,void 0,function(){var t,e;return(0,r.__generator)(this,function(n){switch(n.label){case 0:t=0,e=d.getAndRemove("register"),n.label=1;case 1:if(!(t<e.length))return[3,4];return[4,tf(i,e[t]).catch(console.error)];case 2:n.sent(),n.label=3;case 3:return t++,[3,1];case 4:return[2]}})})];case 16:if(L.sent(),!Object.entries(null!=(v=n.enabledMiddleware)?v:{}).some(function(t){return t[1]}))return[3,18];return[4,t.A(904886).then(function(t){var e=t.remoteMiddlewares;return(0,r.__awaiter)(j,void 0,void 0,function(){return(0,r.__generator)(this,function(t){switch(t.label){case 0:return[4,e(P,n,u.obfuscate)];case 1:return[2,Promise.all(t.sent().map(function(t){return i.addSourceMiddleware(t)}))]}})})})];case 17:L.sent(),L.label=18;case 18:return[2,P]}})})}(e.writeKey,S,A,n,O,M,i)];case 6:if(I=N.sent(),P=null!=(m=window.location.search)?m:"",j=null!=(b=window.location.hash)?b:"",!(L=P.length?P:j.replace(/(?=#).*(?=\?)/,"")).includes("ajs_"))return[3,8];return[4,A.queryString(L).catch(console.error)];case 7:N.sent(),N.label=8;case 8:return A.initialized=!0,A.emit("initialize",e,n),[4,function(t,e){return(0,r.__awaiter)(this,void 0,void 0,function(){return(0,r.__generator)(this,function(n){switch(n.label){case 0:return[4,(0,r.__awaiter)(void 0,void 0,void 0,function(){var n,i;return(0,r.__generator)(this,function(r){switch(r.label){case 0:n=0,i=e.getAndRemove("addSourceMiddleware"),r.label=1;case 1:if(!(n<i.length))return[3,4];return[4,tf(t,i[n]).catch(console.error)];case 2:r.sent(),r.label=3;case 3:return n++,[3,1];case 4:return[2]}})})];case 1:return n.sent(),tu(t,e),[2]}})})}(A,i)];case 9:return N.sent(),[2,[A,I]]}})})}(n[0],n[1],e)})})||this)._resolveLoadStart=function(t,e){return c([t,e])},n}return(0,r.__extends)(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}(tp);t.i(479578);var tG=t.i(254667);t.i(289716);var tV=t.i(469498);class tW extends Error{constructor(t,e){super(e),this.name=t}}class tJ extends tW{constructor(t,e){2==arguments.length&&(t+=` (Received: ${JSON.stringify(e)})`),super("ValidationError",`[Validation] ${t}`)}}function t$(t,e){if("function"!=typeof t)throw new tJ(`${e} is not a function`,t)}function tQ(t,e){if(null===t||"object"!=typeof t)throw new tJ(`${e} is not an object`,t)}function tH(t){let e=!0;if(t&&"object"==typeof t&&!Array.isArray(t)){for(let n in e=!1,t)if("boolean"!=typeof t[n]){e=!0;break}}if(e)throw new tJ("Consent Categories should be {[categoryName: string]: boolean}",t)}let tY=new class{get debugLoggingEnabled(){return!0===window.SEGMENT_CONSENT_WRAPPER_DEBUG_MODE}enableDebugLogging(){window.SEGMENT_CONSENT_WRAPPER_DEBUG_MODE=!0}debug(...t){this.debugLoggingEnabled&&console.log("[consent wrapper debug]",...t)}};class tZ{constructor(){this.isAbortCalled=!1,this.isLoadCalled=!1,this.abortLoadOptions={loadSegmentNormally:!0},this.loadOptions={consentModel:"opt-in"}}load(t){this.isLoadCalled=!0,this.loadOptions={...this.loadOptions,...t},tY.debug("ctx.load called",this.loadOptions)}abort(t){this.isAbortCalled=!0,this.abortLoadOptions={...this.abortLoadOptions,...t},tY.debug("Abort consent wrapper",this.loadOptions)}validate(){if(this.isAbortCalled&&this.isLoadCalled)throw new tJ("both abort and load should not be called")}}let tX=(t,...e)=>{let n=e.reduce((t,e)=>n=>e(t(n)),t=>t);return(...e)=>n(t(...e))},t0=t=>Array.from(new Set(Object.values(t).reduce((t,e)=>t.concat(e)))),t1=(t,e)=>!!e&&!e.hasUnmappedDestinations&&Object.keys(t).filter(e=>t[e]).every(t=>!e.allCategories.includes(t)),t4=(t,e,n,r={})=>{let{integrationCategoryMappings:i,shouldEnableIntegration:o}=r,a=(i?i[t]:(t=>{if(t&&"object"==typeof t&&"consentSettings"in t&&"object"==typeof t.consentSettings&&t.consentSettings&&"categories"in t.consentSettings&&Array.isArray(t.consentSettings.categories))return t.consentSettings.categories||void 0})(e.integrations[t]))??[];return o?o(a,n,{creationName:t}):!a||!a.length||a.every(t=>n[t])};class t2{get analytics(){return t3(this.uninitializedAnalytics)}get cdnSettings(){return this.cdnSettingsDeferred.promise}async getAllCategories(){return(this.settings.integrationCategoryMappings?t0(this.settings.integrationCategoryMappings):(await this.cdnSettings).consentSettings?.allCategories)??[]}async getCategories(){let t=await this.settings.getCategories();return tH(t),t}constructor(t,e){this.cdnSettingsDeferred=(0,tj.createDeferred)(),this.createDisableOption=(t,e)=>!0===e||(n=>t1(t,n.consentSettings)||"function"==typeof e&&e(n)),function(t){if(tQ(t,"analytics"),!("load"in t)||!("addSourceMiddleware"in t)||!("addDestinationMiddleware"in t)||!("track"in t))throw new tJ("analytics is not an Analytics instance",t)}(t),this.settings=e,this.uninitializedAnalytics=t,this.ogAnalyticsLoad=t.load.bind(t)}async loadWithFilteredDeviceModeDestinations(...[t,e]){let n=await this.getCategories(),r=t=>((t,e,n)=>{let{remotePlugins:r,integrations:i}=t,{integrationCategoryMappings:o,shouldEnableIntegration:a}=n,s={...t,remotePlugins:[...r||[]],integrations:{...i}},u=n=>t4(n,t,e,{integrationCategoryMappings:o,shouldEnableIntegration:a});for(let t in i)u(t)?tY.debug(`Enabled (opt-in): ${t}`):(tY.debug(`Disabled (opt-in): ${t}`),s.remotePlugins=r?.filter(e=>e.creationName!==t),delete s.integrations[t]);return s})(t,n,{shouldEnableIntegration:this.settings.shouldEnableIntegration,integrationCategoryMappings:this.settings.integrationCategoryMappings});return this.load(t,{...e,updateCDNSettings:tX(r,e?.updateCDNSettings??(t=>t)),disable:this.createDisableOption(n,e?.disable)})}load(...[t,e]){return this.ogAnalyticsLoad(t,{...e,updateCDNSettings:tX(e?.updateCDNSettings||(t=>t),t=>(tY.debug("CDN settings loaded",t),this.cdnSettingsDeferred.resolve(t),t))})}replaceLoadMethod(t){this.analytics.load=t}page(){this.analytics.page()}configureBlockingMiddlewareForOptOut(){var t,e,n;let r,i;t=this.cdnSettings,e=this.analytics,n={integrationCategoryMappings:this.settings.integrationCategoryMappings,shouldEnableIntegration:this.settings.shouldEnableIntegration},r=async({integration:e,payload:r,next:i})=>{let o=await t,a=r.obj.context.consent.categoryPreferences,s=!t4(e,o,a,n);if(tY.debug(`Destination middleware called: ${e}`,{DROPPED:s,categoryPreferences:a,payload:r.obj,filterSettings:n}),s)return null;i(r)},e.addDestinationMiddleware("*",r),i=async({payload:e,next:r})=>{let i=await t,o=e.obj.context.consent.categoryPreferences,a=n.integrationCategoryMappings?{hasUnmappedDestinations:!1,allCategories:t0(n.integrationCategoryMappings)}:i.consentSettings,s=t1(o,a);if(tY.debug("Source middleware called",{DROPPED:s,categoryPreferences:o,payload:e.obj,filterSettings:n,consentSettings:a}),s)return null;r(e)},e.addSourceMiddleware(i)}configureConsentStampingMiddleware(){var t;let{pruneUnmappedCategories:e}=this.settings,n=(t=async()=>{let t=await this.getCategories();if(e){var n=await this.getAllCategories();if(!n.length)throw new tJ("Invariant: No consent categories defined in Segment",[]);return n.reduce((e,n)=>(n in t&&(e[n]=t[n]),e),{})}return t},async({payload:e,next:n})=>{e.obj.context.consent={...e.obj.context.consent,categoryPreferences:await t()},n(e)});this.analytics.addSourceMiddleware(n)}consentChange(t){tY.debug("Consent change",t);try{tH(t)}catch(t){return console.error(t)}this.analytics.track("Segment Consent Preference Updated",void 0,{consent:{categoryPreferences:t}})}}let t3=t=>{if(Array.isArray(t)){let e=t._loadOptions??{}
1,n=window[e?.globalAnalyticsKey??"analytics"];if(n?.initialized)return n}return t};async function t8(t,e){return new Promise((n,r)=>{if(t())return void n();let i=()=>setTimeout(()=>{t()?n():i()},e);i()})}function t5(t){return t.reduce((t,e)=>({...t,[`C${e}`]:!0}),{})}let t6=((...[t])=>{if("object"!=typeof t||!t)throw new tJ("Options should be an object",t);t$(t.getCategories,"getCategories"),t.shouldLoadSegment&&t$(t.shouldLoadSegment,"shouldLoadSegment"),t.shouldEnableIntegration&&t$(t.shouldEnableIntegration,"shouldEnableIntegration"),t.shouldDisableSegment&&t$(t.shouldDisableSegment,"shouldDisableSegment"),t.integrationCategoryMappings&&tQ(t.integrationCategoryMappings,"integrationCategoryMappings"),t.registerOnConsentChanged&&t$(t.registerOnConsentChanged,"registerOnConsentChanged");let{shouldDisableSegment:e,getCategories:n,shouldLoadSegment:r,integrationCategoryMappings:i,shouldEnableIntegration:o,registerOnConsentChanged:a,shouldLoadWrapper:s,enableDebugLogging:u}=t;return t=>{let c=new t2(t,{integrationCategoryMappings:i,shouldEnableIntegration:o,getCategories:n});u&&tY.enableDebugLogging();let l=s?.()||Promise.resolve();l.then(()=>{a?.(t=>c.consentChange(t))});let d=async(t,n)=>{if(n?.initialPageview&&(c.page(),n={...n,initialPageview:!1}),await e?.())return;await l;let i=await (async()=>{let t=new tZ;return await r?.(t),t.validate(),t})();if(i.isAbortCalled){i.abortLoadOptions?.loadSegmentNormally===!0&&c.load(t,n);return}if(c.configureConsentStampingMiddleware(),"opt-in"===i.loadOptions.consentModel)return void await c.loadWithFilteredDeviceModeDestinations(t,n);if("opt-out"===i.loadOptions.consentModel){c.configureBlockingMiddlewareForOptOut(),c.load(t,n);return}var o=i.loadOptions.consentModel;throw Error(`Unhandled discriminated union member: ${JSON.stringify(o)}`)};return c.replaceLoadMethod(d),t}})({shouldLoadWrapper:async()=>{await t8(()=>void 0!==window.OnetrustActiveGroups,500)},getCategories:()=>t5(window.OnetrustActiveGroups?.split(",").filter(Boolean)||[]),registerOnConsentChanged:t=>{window.addEventListener("OneTrustGroupsUpdated",()=>{t(t5(window.OnetrustActiveGroups?.split(",").filter(Boolean)??[]))})}}),t7=new tB,t9=new tB;t.s(["analyticsBrowser",0,t7,"disabledAnalyticsBrowser",0,t9,"loadAnalytics",0,(t,e)=>{t7.ready(e).catch(t=>{tG.baseLogger.error(t,"ANALYTICS_LOAD_ERROR")}),t7.addSourceMiddleware(({payload:t,next:e})=>{let n=window.OnetrustActiveGroups??null;(0,tV.isPerformanceCookiesAllowed)(n)&&e(t)}),t6(t7).load(t).catch(t=>{tG.baseLogger.error(t,"ANALYTICS_LOAD_ERROR")}),t9.load(t,{disable:!0}).catch(t=>{tG.baseLogger.error(t,"ANALYTICS_LOAD_ERROR")})}],39656)},286731,t=>{"use strict";var e=t.i(377421),n=t.i(84106);t.i(479578);var r=t.i(254667);t.i(289716);var i=t.i(727041),o=t.i(448617),a=t.i(520658),s=t.i(39656);let u=["ajs_anonymous_id","ajs_user_id","ajs_group_id"];t.s(["SegmentAnalyticsViewModel",0,function({analyticsCfg:{writeKey:t},countryGeo:c,children:l}){let{isFunctionalCookiesAllowed:d}=(0,o.usePrivacySettings)(),h=(0,n.useMemo)(()=>d?s.analyticsBrowser:s.disabledAnalyticsBrowser,[d]),f=(0,n.useRef)(d);(0,n.useEffect)(()=>{f.current&&!d&&s.analyticsBrowser.reset().catch(t=>{r.baseLogger.error(t,"ANALYTICS_RESET_ERROR")}).finally(()=>{for(let t of u)(0,i.complexCookieRemove)({name:t,domain:window.location.hostname})}),f.current=d},[d]);let[p,g]=(0,n.useState)(null),[v,y]=(0,n.useState)(!0),[_,m]=(0,n.useState)(null),b=(0,n.useCallback)((t,e)=>h.track(t,e,{traits:{countryGeo:c??""}}),[h,c]),w=(0,n.useCallback)((t,e)=>h.page(t,e,{traits:{countryGeo:c??""}}),[h,c]),S=function({isAllowed:t,writeKey:e}){let r=function(t,e){let[r,i]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{t&&!r&&e&&(0,s.loadAnalytics)({writeKey:e},()=>{i(!0)})},[e,r,t]),r}(t,e),[i,o]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{t?r&&o(!0):o(!1)},[r,t]),i}({isAllowed:d,writeKey:t}),C=(0,n.useCallback)(t=>S?h.identify(t.userId,t.traits,t.options):Promise.resolve({}),[h,S]),E=(0,n.useCallback)(t=>S?h.group(t.groupId,t.traits,t.options):Promise.resolve({}),[h,S]),A=(0,n.useCallback)(()=>h.reset(),[h]);(0,n.useEffect)(()=>
1{if(!S){y(!1),g(null),m(null);return}let t=!1;return y(!0),m(null),h.user().then(e=>{if(t)return;if(!e){g(null),y(!1);return}let n=e.id?.()??void 0,r=e.anonymousId?.()??void 0,i=e.traits?.()??void 0;n||r||null!=i?g({userId:n,anonymousId:r,traits:i}):g(null),y(!1)}).catch(e=>{t||(r.baseLogger.error(e,"Error retrieving analytics user identity:"),m(e instanceof Error?e:Error(String(e))),g(null),y(!1))}),()=>{t=!0}},[h,S]);let O=(0,n.useCallback)(()=>({user:p,loading:v,error:_}),[p,v,_]),M=(0,n.useMemo)(()=>({reset:A,track:b,page:w,identify:C,group:E,isReady:S,getUser:O}),[A,b,w,C,E,S,O]);return(0,e.jsx)(a.AnalyticsViewModel,{viewModel:M,children:l})}])},164883,t=>{"use strict";t.i(520658),t.i(978871),t.i(195873);var e=t.i(798784);e.z.object({utm_source:e.z.string().optional(),utm_medium:e.z.string().optional(),utm_campaign:e.z.string().optional(),utm_term:e.z.string().optional(),utm_content:e.z.string().optional()}),t.i(39656),t.i(286731),t.s([],164883)}]);

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.