@local-logic/sdks-app 1.0.0-beta.63 → 1.0.0-beta.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{auto-track-legacy.da6c816b.js → auto-track-legacy.269efe9b.js} +1 -1
- package/dist/assets/{auto-track.eb9f6124.js → auto-track.c37e0d3b.js} +1 -1
- package/dist/assets/{chevron_right-legacy.9c3cc21f.js → chevron_right-legacy.033240dd.js} +1 -1
- package/dist/assets/{chevron_right.fb385c69.js → chevron_right.8fd46579.js} +1 -1
- package/dist/assets/{index-legacy.47699ec2.js → index-legacy.0a49913a.js} +1 -1
- package/dist/assets/{index-legacy.950259c1.js → index-legacy.0c2f7789.js} +1 -1
- package/dist/assets/index-legacy.454d6b85.js +1 -0
- package/dist/assets/{index-legacy.a93cb4c9.js → index-legacy.4f4a4e33.js} +1 -1
- package/dist/assets/index-legacy.551562bd.js +1 -0
- package/dist/assets/{index-legacy.be3959fa.js → index-legacy.66c83248.js} +1 -1
- package/dist/assets/{index-legacy.135dc6d5.js → index-legacy.7eeeaae3.js} +1 -1
- package/dist/assets/{index-legacy.89990463.js → index-legacy.aea891d0.js} +1 -1
- package/dist/assets/index-legacy.d79d4f3f.js +1 -0
- package/dist/assets/{index.b12d6d41.js → index.1ac1c1e5.js} +1 -1
- package/dist/assets/{index.13b63793.js → index.2237f849.js} +1 -1
- package/dist/assets/{index.640e9b13.js → index.29eac88c.js} +1 -1
- package/dist/assets/{index.e715a798.js → index.52dad948.js} +3 -3
- package/dist/assets/{index.a5ecf254.js → index.83934545.js} +1 -1
- package/dist/assets/index.8aa5be65.js +1 -0
- package/dist/assets/{index.aa11245d.js → index.c619070b.js} +2 -2
- package/dist/assets/{index.272abe7a.js → index.cfad1558.js} +1 -1
- package/dist/assets/{index.1ec746cf.js → index.ec9a25d9.js} +1 -1
- package/dist/assets/index.umd-legacy.bba28c1f.js +1 -0
- package/dist/assets/{index.umd.d290c63d.js → index.umd.b87321db.js} +1 -1
- package/dist/index.html +2 -2
- package/dist/types/sdks/DataExplorer/components/Map/index.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/components/Map/index.js +4 -0
- package/dist/types/sdks/DataExplorer/components/Map/index.js.map +1 -1
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/Score/POIs/index.d.ts.map +1 -1
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/Score/POIs/index.js +4 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/Score/POIs/index.js.map +1 -1
- package/dist/types/sdks/LocalContent/Map/Markers/index.d.ts.map +1 -1
- package/dist/types/sdks/LocalContent/Map/Markers/index.js +4 -0
- package/dist/types/sdks/LocalContent/Map/Markers/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/index-legacy.0e09fe55.js +0 -1
- package/dist/assets/index-legacy.6bf49d03.js +0 -1
- package/dist/assets/index-legacy.75d6e70a.js +0 -1
- package/dist/assets/index.61d8a46d.js +0 -1
- package/dist/assets/index.umd-legacy.95a59f90.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Dn=Object.defineProperty;var Fn=(e,t,r)=>t in e?Dn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var dr=(e,t,r)=>(Fn(e,typeof t!="symbol"?t+"":t,r),r);import{u as jt,p as jn,s as kn,M as pr,a as Rn,$ as Nn,b as Bn,c as zn,d as Un,S as qn,e as Vn,f as Kn,g as Gn,m as Wn,N as Jn,P as Zn}from"./chevron_right.fb385c69.js";import{_ as te,a as I,b as S,c as M,d as D,e as Hn,f as N,g as K,R as re,r as $,w as jr,j as x,B as ze,h as kt,u as Se,i as Rt,p as je,s as T,y as P,F as Nt,k as B,l as gt,I as ge,m as z,n as ot,N as Ge,X as We,U as kr,A as Rr,x as St,O as Qn,o as Fe,q as Yn,C as Qe,t as Xn,v as ei,z as ti}from"./index.a5ecf254.js";function de(e){return typeof e=="string"}function Mt(e){return typeof e=="number"}function we(e){return typeof e=="function"}function G(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()==="object"}function ri(e){var t,r,n,i=(n=(r=(t=e.userId)!==null&&t!==void 0?t:e.anonymousId)!==null&&r!==void 0?r:e.groupId)!==null&&n!==void 0?n:e.previousId;return de(i)}var Le=function(e){te(t,e);function t(r,n){var i=e.call(this,n)||this;return i.field=r,i}return t}(Error);function me(e){var t,r=e&&e.event&&e.event.type,n=e.event;if(n===void 0)throw new Le("event","Event is missing");if(!de(r))throw new Le("event","Event is not a string");if(r==="track"&&!de(n.event))throw new Le("event","Event is not a string");var i=(t=n.properties)!==null&&t!==void 0?t:n.traits;if(r!=="alias"&&!G(i))throw new Le("properties","properties is not an object");if(!ri(n))throw new Le("userId","Missing userId or anonymousId");return e}var ni={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:me,identify:me,page:me,alias:me,group:me,screen:me};function ii(e,t,r,n){var i,o=[e,t,r,n],a=G(e)?e.event:e;if(!a||!de(a))throw new Error("Event missing");var s=G(e)?(i=e.properties)!==null&&i!==void 0?i:{}:G(t)?t:{},u={};G(t)&&!we(r)&&(u=r!=null?r:{}),G(e)&&!we(t)&&(u=t!=null?t:{});var d=o.find(we);return[a,s,u,d]}function hr(e,t,r,n,i){var o,a,s=null,u=null,d=[e,t,r,n,i],h=d.filter(de);h[0]!==void 0&&h[1]!==void 0&&(s=h[0],u=h[1]),h.length===1&&(s=null,u=h[0]);var m=d.find(we),_=d.filter(function(C){return u===null?G(C):G(C)||C===null}),y=(o=_[0])!==null&&o!==void 0?o:{},b=(a=_[1])!==null&&a!==void 0?a:{};return[s,u,y,b,m]}var vr=function(e){return function(){for(var t,r,n,i,o,a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var u=null;u=(n=(t=a.find(de))!==null&&t!==void 0?t:(r=a.find(Mt))===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:e.id();var d=a.filter(function(y){return u===null?G(y):G(y)||y===null}),h=(i=d[0])!==null&&i!==void 0?i:{},m=(o=d[1])!==null&&o!==void 0?o:{},_=a.find(we);return[u,h,m,_]}};function oi(e,t,r,n){Mt(e)&&(e=e.toString()),Mt(t)&&(t=t.toString());var i=[e,t,r,n],o=i.filter(de),a=o[0],s=a===void 0?e:a,u=o[1],d=u===void 0?null:u,h=i.filter(G)[0],m=h===void 0?{}:h,_=i.find(we);return[s,d,m,_]}function at(e){return Promise.resolve(e)}function ai(e,t){return new Promise(function(r,n){var i=setTimeout(function(){n(Error("Promise timed out"))},t);e.then(function(o){return clearTimeout(i),r(o)}).catch(n)})}function si(e){return new Promise(function(t){return setTimeout(t,e)})}function ui(e,t,r,n){var i=function(){try{return at(t(e))}catch(o){return Promise.reject(o)}};return si(r).then(function(){return ai(i(),n!=null?n:1e3)}).catch(function(o){e==null||e.log("warn","Callback Error",{error:o}),e==null||e.stats.increment("callback_error")}).then(function(){return e})}function Bt(){return typeof window<"u"}function Ls(){return!Bt()}function Nr(){return Bt()?window.navigator.onLine:!0}function rt(){return!Nr()}var ce=256,Ye=[],Je;for(;ce--;)Ye[ce]=(ce+256).toString(16).substring(1);function zt(){var e=0,t,r="";if(!Je||ce+16>256){for(Je=Array(e=256);e--;)Je[e]=256*Math.random()|0;e=ce=0}for(;e<16;e++)t=Je[ce+e],e==6?r+=Ye[t&15|64]:e==8?r+=Ye[t&63|128]:r+=Ye[t],e&1&&e>1&&e<11&&(r+="-");return ce++,r}function nt(e,t,r){t.split&&(t=t.split("."));for(var n=0,i=t.length,o=e,a,s;n<i&&(s=t[n++],!(s==="__proto__"||s==="constructor"||s==="prototype"));)o=o[s]=n===i?r:typeof(a=o[s])==typeof t?a:t[n]*0!==0||!!~(""+t[n]).indexOf(".")?{}:[]}const $s=Object.freeze(Object.defineProperty({__proto__:null,dset:nt},Symbol.toStringTag,{value:"Module"}));var ci=function(){function e(){var t=this;this._logs=[],this.log=function(r,n,i){var o=new Date;t._logs.push({level:r,message:n,time:o,extras:i})}}return Object.defineProperty(e.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),e.prototype.flush=function(){if(this.logs.length>1){var t=this._logs.reduce(function(r,n){var i,o,a,s=I(I({},n),{json:JSON.stringify(n.extras,null," "),extras:n.extras});delete s.time;var u=(a=(o=n.time)===null||o===void 0?void 0:o.toISOString())!==null&&a!==void 0?a:"";return r[u]&&(u="".concat(u,"-").concat(Math.random())),I(I({},r),(i={},i[u]=s,i))},{});console.table?console.table(t):console.log(t)}else this.logs.forEach(function(r){var n=r.level,i=r.message,o=r.extras;n==="info"||n==="debug"?console.log(i,o!=null?o:""):console[n](i,o!=null?o:"")});this._logs=[]},e}();const li=ci;var fi=function(e){var t={gauge:"g",counter:"c"};return t[e]},di=function(){function e(t){this.metrics=[],this.remoteMetrics=t}return e.prototype.increment=function(t,r,n){var i;r===void 0&&(r=1),this.metrics.push({metric:t,value:r,tags:n!=null?n:[],type:"counter",timestamp:Date.now()}),(i=this.remoteMetrics)===null||i===void 0||i.increment(t,n!=null?n:[])},e.prototype.gauge=function(t,r,n){this.metrics.push({metric:t,value:r,tags:n!=null?n:[],type:"gauge",timestamp:Date.now()})},e.prototype.flush=function(){var t=this.metrics.map(function(r){return I(I({},r),{tags:r.tags.join(",")})});console.table?console.table(t):console.log(t),this.metrics=[]},e.prototype.serialize=function(){return this.metrics.map(function(t){return{m:t.metric,v:t.value,t:t.tags,k:fi(t.type),e:t.timestamp}})},e}();const pi=di;function Me(e,t){return t=t||{},new Promise(function(r,n){var i=new XMLHttpRequest,o=[],a=[],s={},u=function(){return{ok:(i.status/100|0)==2,statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return a},get:function(h){return s[h.toLowerCase()]},has:function(h){return h.toLowerCase()in s}}}};for(var d in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(h,m,_){o.push(m=m.toLowerCase()),a.push([m,_]),s[m]=s[m]?s[m]+","+_:_}),r(u())},i.onerror=n,i.withCredentials=t.credentials=="include",t.headers)i.setRequestHeader(d,t.headers[d]);i.send(t.body||null)})}var xe="1.44.0";/*! js-cookie v3.0.1 | MIT */function Ze(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var hi={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Pt(e,t){function r(i,o,a){if(!(typeof document>"u")){a=Ze({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var u in a)!a[u]||(s+="; "+u,a[u]!==!0&&(s+="="+a[u].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+s}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],a={},s=0;s<o.length;s++){var u=o[s].split("="),d=u.slice(1).join("=");try{var h=decodeURIComponent(u[0]);if(a[h]=e.read(d,h),i===h)break}catch(m){}}return i?a[i]:a}}return Object.create({set:r,get:n,remove:function(i,o){r(i,"",Ze({},o,{expires:-1}))},withAttributes:function(i){return Pt(this.converter,Ze({},this.attributes,i))},withConverter:function(i){return Pt(Ze({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var q=Pt(hi,{path:"/"});function vi(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function gi(e){var t=e.hostname,r=t.split("."),n=r[r.length-1],i=[];if(r.length===4&&parseInt(n,10)>0||r.length<=1)return i;for(var o=r.length-2;o>=0;--o)i.push(r.slice(o).join("."));return i}function mi(e){try{return new URL(e)}catch(t){return}}function Br(e){var t=mi(e);if(!!t)for(var r=gi(t),n=0;n<r.length;++n){var i="__tld__",o=r[n],a={domain:"."+o};try{if(q.set(i,"1",a),q.get(i))return q.remove(i,a),o}catch(s){return}}}var $e;function yi(){if($e)return $e;var e=Br(window.location.href);return $e={expires:31536e6,secure:!1,path:"/"},e&&($e.domain=e),$e}var _i="npm";function zr(){return _i}function bi(){var e=q.get("_ga");if(e&&e.startsWith("amp"))return e}function wi(e){return e.startsWith("?")&&(e=e.substring(1)),e=e.replace(/\?/g,"&"),e.split("&").reduce(function(t,r){var n=r.split("="),i=n[0],o=n[1],a=o===void 0?"":o;if(i.includes("utm_")&&i.length>4){var s=i.substr(4);s==="campaign"&&(s="name"),t[s]=vi(a)}return t},{})}function Ci(e){var t={btid:"dataxu",urid:"millennial-media"};e.startsWith("?")&&(e=e.substring(1)),e=e.replace(/\?/g,"&");for(var r=e.split("&"),n=0,i=r;n<i.length;n++){var o=i[n],a=o.split("="),s=a[0],u=a[1];if(t[s])return{id:u,type:t[s]}}}function xi(e,t,r){var n=q.get("s:context.referrer"),i=Ci(e);n=n?JSON.parse(n):void 0,i=i!=null?i:n,i&&(t&&(t.referrer=I(I({},t.referrer),i)),r||q.set("s:context.referrer",JSON.stringify(i),yi()))}function Ii(e,t,r,n){var i,o,a,s,u=e.user(),d=window.location.search;t.context=(o=(i=t.context)!==null&&i!==void 0?i:t.options)!==null&&o!==void 0?o:{};var h=t.context,m=t.anonymousId;delete t.options,t.writeKey=r==null?void 0:r.apiKey,h.userAgent=window.navigator.userAgent;var _=navigator.userLanguage||navigator.language;if(typeof h.locale>"u"&&typeof _<"u"&&(h.locale=_),!h.library){var y=zr();y==="web"?h.library={name:"analytics.js",version:"next-".concat(xe)}:h.library={name:"analytics.js",version:"npm:next-".concat(xe)}}d&&!h.campaign&&(h.campaign=wi(d)),xi(d,h,(a=e.options.disableClientPersistence)!==null&&a!==void 0?a:!1),t.userId=t.userId||u.id(),t.anonymousId=u.anonymousId(m),t.sentAt=new Date;var b=e.queue.failedInitializations||[];b.length>0&&(t._metadata={failedInitializations:b});var C=[],w=[];for(var v in n){var g=n[v];v==="Segment.io"&&C.push(v),g.bundlingStatus==="bundled"&&C.push(v),g.bundlingStatus==="unbundled"&&w.push(v)}for(var l=0,c=(r==null?void 0:r.unbundledIntegrations)||[];l<c.length;l++){var p=c[l];w.includes(p)||w.push(p)}var f=(s=r==null?void 0:r.maybeBundledConfigIds)!==null&&s!==void 0?s:{},A=[];C.sort().forEach(function(L){var k;((k=f[L])!==null&&k!==void 0?k:[]).forEach(function(H){A.push(H)})}),(r==null?void 0:r.addBundledMetadata)!==!1&&(t._metadata=I(I({},t._metadata),{bundled:C.sort(),unbundled:w.sort(),bundledIds:A}));var E=bi();return E&&(h.amp={id:E}),t}function mt(e){console.error("Error sending segment performance metrics",e)}var Si=function(){function e(t){var r=this,n,i,o,a;if(this.host=(n=t==null?void 0:t.host)!==null&&n!==void 0?n:"api.segment.io/v1",this.sampleRate=(i=t==null?void 0:t.sampleRate)!==null&&i!==void 0?i:1,this.flushTimer=(o=t==null?void 0:t.flushTimer)!==null&&o!==void 0?o:30*1e3,this.maxQueueSize=(a=t==null?void 0:t.maxQueueSize)!==null&&a!==void 0?a:20,this.queue=[],this.sampleRate>0){var s=!1,u=function(){s||(s=!0,r.flush().catch(mt),s=!1,setTimeout(u,r.flushTimer))};u()}}return e.prototype.increment=function(t,r){if(!!t.includes("analytics_js.")&&r.length!==0&&!(Math.random()>this.sampleRate)&&!(this.queue.length>=this.maxQueueSize)){var n=r.reduce(function(o,a){var s=a.split(":"),u=s[0],d=s[1];return o[u]=d,o},{});n.library="analytics.js";var i=zr();i==="web"?n.library_version="next-".concat(xe):n.library_version="npm:next-".concat(xe),this.queue.push({type:"Counter",metric:t,value:1,tags:n}),t.includes("error")&&this.flush().catch(mt)}},e.prototype.flush=function(){return S(this,void 0,void 0,function(){var t=this;return M(this,function(r){switch(r.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch(function(n){mt(n),t.sampleRate=0})];case 1:return r.sent(),[2]}})})},e.prototype.send=function(){return S(this,void 0,void 0,function(){var t,r,n;return M(this,function(i){return t={series:this.queue},this.queue=[],r={"Content-Type":"text/plain"},n="https://".concat(this.host,"/m"),[2,Me(n,{headers:r,body:JSON.stringify(t),method:"POST"})]})})},e}(),pe=function(){function e(t){var r,n,i;this.retry=(r=t.retry)!==null&&r!==void 0?r:!0,this.type=(n=t.type)!==null&&n!==void 0?n:"plugin Error",this.reason=(i=t.reason)!==null&&i!==void 0?i:""}return e}(),gr,X=function(){function e(t,r){this.logger=new li,this.cancel=function(n){throw n||new pe({reason:"Context Cancel"})},this._attempts=0,this._event=t,this._id=r!=null?r:zt(),this.stats=new pi(gr)}return e.initMetrics=function(t){gr=new Si(t)},e.system=function(){return new e({type:"track",event:"system"})},e.prototype.isSame=function(t){return t._id===this._id},e.prototype.log=function(t,r,n){this.logger.log(t,r,n)},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"event",{get:function(){return this._event},set:function(t){this._event=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attempts",{get:function(){return this._attempts},set:function(t){this._attempts=t},enumerable:!1,configurable:!0}),e.prototype.updateEvent=function(t,r){var n;if(t.split(".")[0]==="integrations"){var i=t.split(".")[1];if(((n=this._event.integrations)===null||n===void 0?void 0:n[i])===!1)return this._event}return nt(this._event,t,r),this._event},e.prototype.failedDelivery=function(){return this._failedDelivery},e.prototype.setFailedDelivery=function(t){this._failedDelivery=t},e.prototype.logs=function(){return this.logger.logs},e.prototype.flush=function(){this.logger.flush(),this.stats.flush()},e.prototype.toJSON=function(){return{id:this._id,event:this._event,logs:this.logger.logs,metrics:this.stats.metrics}},e}(),Ut=function(){function e(){this.callbacks={}}return e.prototype.on=function(t,r){return this.callbacks[t]?this.callbacks[t].push(r):this.callbacks[t]=[r],this},e.prototype.once=function(t,r){var n=this,i=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];n.off(t,i),r.apply(n,o)};return this.on(t,i),this},e.prototype.off=function(t,r){var n,i=(n=this.callbacks[t])!==null&&n!==void 0?n:[],o=i.filter(function(a){return a!==r});return this.callbacks[t]=o,this},e.prototype.emit=function(t){for(var r=this,n,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];var a=(n=this.callbacks[t])!==null&&n!==void 0?n:[];return a.forEach(function(s){s.apply(r,i)}),this},e}(),se={},ne={},qt={},Ue={exports:{}};(function(e){e.exports=t(r),e.exports.find=e.exports,e.exports.replace=function(s,u,d,h){return t(i).call(this,s,u,d,h),s},e.exports.del=function(s,u,d){return t(n).call(this,s,u,null,d),s};function t(s){return function(u,d,h,m){var _=m&&a(m.normalizer)?m.normalizer:o;d=_(d);for(var y,b=!1;!b;)C();function C(){for(y in u){var w=_(y);if(d.indexOf(w)===0){var v=d.substr(w.length);if(v.charAt(0)==="."||v.length===0){d=v.substr(1);var g=u[y];if(g==null){b=!0;return}if(!d.length){b=!0;return}u=g;return}}}y=void 0,b=!0}if(!!y)return u==null?u:s(u,y,h)}}function r(s,u){if(s.hasOwnProperty(u))return s[u]}function n(s,u){return s.hasOwnProperty(u)&&delete s[u],s}function i(s,u,d){return s.hasOwnProperty(u)&&(s[u]=d),s}function o(s){return s.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}function a(s){return typeof s=="function"}})(Ue);var Mi=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qt,"__esModule",{value:!0});var ae=Mi(Ue.exports);function ye(e,t){return function(){var r=this.traits(),n=this.properties?this.properties():{};return ae.default(r,"address."+e)||ae.default(r,e)||(t?ae.default(r,"address."+t):null)||(t?ae.default(r,t):null)||ae.default(n,"address."+e)||ae.default(n,e)||(t?ae.default(n,"address."+t):null)||(t?ae.default(n,t):null)}}function Pi(e){e.zip=ye("postalCode","zip"),e.country=ye("country"),e.street=ye("street"),e.state=ye("state"),e.city=ye("city"),e.region=ye("region")}qt.default=Pi;var st={};Object.defineProperty(st,"__esModule",{value:!0});st.clone=void 0;function At(e){if(Object.prototype.toString.call(e)==="[object Object]"){var t={};for(var r in e)t[r]=At(e[r]);return t}else return Array.isArray(e)?e.map(At):e}st.clone=At;var Vt={};Object.defineProperty(Vt,"__esModule",{value:!0});var Ai={Salesforce:!0};function Oi(e){return!Ai[e]}Vt.default=Oi;var ut={},Ur=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;ut.parse=function(e){var t=[1,5,6,7,11,12],r=Ur.exec(e),n=0;if(!r)return new Date(e);for(var i=0,o;o=t[i];i++)r[o]=parseInt(r[o],10)||0;r[2]=parseInt(r[2],10)||1,r[3]=parseInt(r[3],10)||1,r[2]--,r[8]=r[8]?(r[8]+"00").substring(0,3):0,r[4]===" "?n=new Date().getTimezoneOffset():r[9]!=="Z"&&r[10]&&(n=r[11]*60+r[12],r[10]==="+"&&(n=0-n));var a=Date.UTC(r[1],r[2],r[3],r[5],r[6]+n,r[7],r[8]);return new Date(a)};ut.is=function(e,t){return typeof e!="string"||t&&/^\d{4}-\d{2}-\d{2}/.test(e)===!1?!1:Ur.test(e)};var Kt={},Ei=/\d{13}/;Kt.is=function(e){return Ei.test(e)};Kt.parse=function(e){return e=parseInt(e,10),new Date(e)};var Gt={},Li=/\d{10}/;Gt.is=function(e){return Li.test(e)};Gt.parse=function(e){var t=parseInt(e,10)*1e3;return new Date(t)};var mr=ut,yr=Kt,_r=Gt,$i=Object.prototype,qr=$i.toString;function Ti(e){return qr.call(e)==="[object Date]"}function Di(e){return qr.call(e)==="[object Number]"}var Wt=function(t){return Ti(t)?t:Di(t)?new Date(Fi(t)):mr.is(t)?mr.parse(t):yr.is(t)?yr.parse(t):_r.is(t)?_r.parse(t):new Date(t)};function Fi(e){return e<315576e5?e*1e3:e}var br=ut,ji=Jt;function Jt(e,t){return t===void 0&&(t=!0),e&&typeof e=="object"?ki(e,t):Array.isArray(e)?Ri(e,t):br.is(e,t)?br.parse(e):e}function ki(e,t){return Object.keys(e).forEach(function(r){e[r]=Jt(e[r],t)}),e}function Ri(e,t){return e.forEach(function(r,n){e[n]=Jt(r,t)}),e}var qe=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ne,"__esModule",{value:!0});ne.Facade=void 0;var Ni=qe(qt),Ie=st,Bi=qe(Vt),zi=qe(Wt),Ot=qe(Ue.exports),Ui=qe(ji);function V(e,t){t=t||{},this.raw=Ie.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=Ie.clone(e)),"traverse"in t||(t.traverse=!0),"timestamp"in e?e.timestamp=zi.default(e.timestamp):e.timestamp=new Date,t.traverse&&Ui.default(e),this.opts=t,this.obj=e}ne.Facade=V;var F=V.prototype;F.proxy=function(e){var t=e.split(".");e=t.shift();var r=this[e]||this.field(e);return r&&(typeof r=="function"&&(r=r.call(this)||{}),t.length===0?this.opts.clone?Et(r):r:(r=Ot.default(r,t.join(".")),this.opts.clone?Et(r):r))};F.field=function(e){var t=this.obj[e];return this.opts.clone?Et(t):t};V.proxy=function(e){return function(){return this.proxy(e)}};V.field=function(e){return function(){return this.field(e)}};V.multi=function(e){return function(){var t=this.proxy(e+"s");if(Array.isArray(t))return t;var r=this.proxy(e);return r&&(r=[this.opts.clone?Ie.clone(r):r]),r||[]}};V.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var r=this.proxy(e+"s");if(Array.isArray(r))return r[0]}};F.json=function(){var e=this.opts.clone?Ie.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e};F.rawEvent=function(){return this.raw};F.options=function(e){var t=this.obj.options||this.obj.context||{},r=this.opts.clone?Ie.clone(t):t;if(!e)return r;if(!!this.enabled(e)){var n=this.integrations(),i=n[e]||Ot.default(n,e);return typeof i!="object"&&(i=Ot.default(this.options(),e)),typeof i=="object"?i:{}}};F.context=F.options;F.enabled=function(e){var t=this.proxy("options.providers.all");typeof t!="boolean"&&(t=this.proxy("options.all")),typeof t!="boolean"&&(t=this.proxy("integrations.all")),typeof t!="boolean"&&(t=!0);var r=t&&Bi.default(e),n=this.integrations();if(n.providers&&n.providers.hasOwnProperty(e)&&(r=n.providers[e]),n.hasOwnProperty(e)){var i=n[e];typeof i=="boolean"?r=i:r=!0}return!!r};F.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()};F.active=function(){var e=this.proxy("options.active");return e==null&&(e=!0),e};F.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")};F.sessionId=F.anonymousId;F.groupId=V.proxy("options.groupId");F.traits=function(e){var t=this.proxy("options.traits")||{},r=this.userId();e=e||{},r&&(t.id=r);for(var n in e){var i=this[n]==null?this.proxy("options.traits."+n):this[n]();i!=null&&(t[e[n]]=i,delete t[n])}return t};F.library=function(){var e=this.proxy("options.library");return e?typeof e=="string"?{name:e,version:null}:e:{name:"unknown",version:null}};F.device=function(){var e=this.proxy("context.device");(typeof e!="object"||e===null)&&(e={});var t=this.library().name;return e.type||(t.indexOf("ios")>-1&&(e.type="ios"),t.indexOf("android")>-1&&(e.type="android")),e};F.userAgent=V.proxy("context.userAgent");F.timezone=V.proxy("context.timezone");F.timestamp=V.field("timestamp");F.channel=V.field("channel");F.ip=V.proxy("context.ip");F.userId=V.field("userId");Ni.default(F);function Et(e){return Ie.clone(e)}var ct={},oe={exports:{}};typeof Object.create=="function"?oe.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:oe.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}};var qi=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ct,"__esModule",{value:!0});ct.Alias=void 0;var Vi=qi(oe.exports),Vr=ne;function W(e,t){Vr.Facade.call(this,e,t)}ct.Alias=W;Vi.default(W,Vr.Facade);W.prototype.action=function(){return"alias"};W.prototype.type=W.prototype.action;W.prototype.previousId=function(){return this.field("previousId")||this.field("from")};W.prototype.from=W.prototype.previousId;W.prototype.userId=function(){return this.field("userId")||this.field("to")};W.prototype.to=W.prototype.userId;var lt={},Pe={};Object.defineProperty(Pe,"__esModule",{value:!0});var Ki=/.+\@.+\..+/;function Gi(e){return Ki.test(e)}Pe.default=Gi;var Zt=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lt,"__esModule",{value:!0});lt.Group=void 0;var Wi=Zt(oe.exports),Ji=Zt(Pe),Zi=Zt(Wt),Ae=ne;function Ht(e,t){Ae.Facade.call(this,e,t)}lt.Group=Ht;Wi.default(Ht,Ae.Facade);var J=Ht.prototype;J.action=function(){return"group"};J.type=J.action;J.groupId=Ae.Facade.field("groupId");J.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return Zi.default(e)};J.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();if(Ji.default(t))return t};J.traits=function(e){var t=this.properties(),r=this.groupId();e=e||{},r&&(t.id=r);for(var n in e){var i=this[n]==null?this.proxy("traits."+n):this[n]();i!=null&&(t[e[n]]=i,delete t[n])}return t};J.name=Ae.Facade.proxy("traits.name");J.industry=Ae.Facade.proxy("traits.industry");J.employees=Ae.Facade.proxy("traits.employees");J.properties=function(){return this.field("traits")||this.field("properties")||{}};var Ve={},ft=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.Identify=void 0;var ie=ne,Ce=ft(Ue.exports),Hi=ft(oe.exports),Qi=ft(Pe),Kr=ft(Wt),le=function(e){return e.trim()};function Qt(e,t){ie.Facade.call(this,e,t)}Ve.Identify=Qt;Hi.default(Qt,ie.Facade);var j=Qt.prototype;j.action=function(){return"identify"};j.type=j.action;j.traits=function(e){var t=this.field("traits")||{},r=this.userId();e=e||{},r&&(t.id=r);for(var n in e){var i=this[n]==null?this.proxy("traits."+n):this[n]();i!=null&&(t[e[n]]=i,n!==e[n]&&delete t[n])}return t};j.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();if(Qi.default(t))return t};j.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return Kr.default(e)};j.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return Kr.default(e)};j.companyName=function(){return this.proxy("traits.company.name")};j.name=function(){var e=this.proxy("traits.name");if(typeof e=="string")return le(e);var t=this.firstName(),r=this.lastName();if(t&&r)return le(t+" "+r)};j.firstName=function(){var e=this.proxy("traits.firstName");if(typeof e=="string")return le(e);var t=this.proxy("traits.name");if(typeof t=="string")return le(t).split(" ")[0]};j.lastName=function(){var e=this.proxy("traits.lastName");if(typeof e=="string")return le(e);var t=this.proxy("traits.name");if(typeof t=="string"){var r=le(t).indexOf(" ");if(r!==-1)return le(t.substr(r+1))}};j.uid=function(){return this.userId()||this.username()||this.email()};j.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")};j.age=function(){var e=this.birthday(),t=Ce.default(this.traits(),"age");if(t!=null)return t;if(e instanceof Date){var r=new Date;return r.getFullYear()-e.getFullYear()}};j.avatar=function(){var e=this.traits();return Ce.default(e,"avatar")||Ce.default(e,"photoUrl")||Ce.default(e,"avatarUrl")};j.position=function(){var e=this.traits();return Ce.default(e,"position")||Ce.default(e,"jobTitle")};j.username=ie.Facade.proxy("traits.username");j.website=ie.Facade.one("traits.website");j.websites=ie.Facade.multi("traits.website");j.phone=ie.Facade.one("traits.phone");j.phones=ie.Facade.multi("traits.phone");j.address=ie.Facade.proxy("traits.address");j.gender=ie.Facade.proxy("traits.gender");j.birthday=ie.Facade.proxy("traits.birthday");var Oe={},Yt=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.Track=void 0;var Yi=Yt(oe.exports),R=ne,Xi=Ve,eo=Yt(Pe),Gr=Yt(Ue.exports);function Xt(e,t){R.Facade.call(this,e,t)}Oe.Track=Xt;Yi.default(Xt,R.Facade);var O=Xt.prototype;O.action=function(){return"track"};O.type=O.action;O.event=R.Facade.field("event");O.value=R.Facade.proxy("properties.value");O.category=R.Facade.proxy("properties.category");O.id=R.Facade.proxy("properties.id");O.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")};O.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")};O.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")};O.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")};O.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")};O.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")};O.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")};O.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")};O.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")};O.sku=R.Facade.proxy("properties.sku");O.tax=R.Facade.proxy("properties.tax");O.name=R.Facade.proxy("properties.name");O.price=R.Facade.proxy("properties.price");O.total=R.Facade.proxy("properties.total");O.repeat=R.Facade.proxy("properties.repeat");O.coupon=R.Facade.proxy("properties.coupon");O.shipping=R.Facade.proxy("properties.shipping");O.discount=R.Facade.proxy("properties.discount");O.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")};O.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")};O.description=R.Facade.proxy("properties.description");O.plan=R.Facade.proxy("properties.plan");O.subtotal=function(){var e=Gr.default(this.properties(),"subtotal"),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var r=this.tax();r&&(t-=r),r=this.shipping(),r&&(t-=r),r=this.discount(),r&&(t+=r)}return t};O.products=function(){var e=this.properties(),t=Gr.default(e,"products");return Array.isArray(t)?t.filter(function(r){return r!==null}):[]};O.quantity=function(){var e=this.obj.properties||{};return e.quantity||1};O.currency=function(){var e=this.obj.properties||{};return e.currency||"USD"};O.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")};O.query=R.Facade.proxy("options.query");O.properties=function(e){var t=this.field("properties")||{};e=e||{};for(var r in e){var n=this[r]==null?this.proxy("properties."+r):this[r]();n!=null&&(t[e[r]]=n,delete t[r])}return t};O.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()};O.email=function(){var e=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(e)return e;var t=this.userId();if(eo.default(t))return t};O.revenue=function(){var e=this.proxy("properties.revenue"),t=this.event(),r=/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i;return!e&&t&&t.match(r)&&(e=this.proxy("properties.total")),to(e)};O.cents=function(){var e=this.revenue();return typeof e!="number"?this.value()||0:e*100};O.identify=function(){var e=this.json();return e.traits=this.traits(),new Xi.Identify(e,this.opts)};function to(e){if(!!e){if(typeof e=="number")return e;if(typeof e=="string"&&(e=e.replace(/\$/g,""),e=parseFloat(e),!isNaN(e)))return e}}var Ke={},Wr=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.Page=void 0;var ro=Wr(oe.exports),ve=ne,no=Oe,io=Wr(Pe);function er(e,t){ve.Facade.call(this,e,t)}Ke.Page=er;ro.default(er,ve.Facade);var U=er.prototype;U.action=function(){return"page"};U.type=U.action;U.category=ve.Facade.field("category");U.name=ve.Facade.field("name");U.title=ve.Facade.proxy("properties.title");U.path=ve.Facade.proxy("properties.path");U.url=ve.Facade.proxy("properties.url");U.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")};U.properties=function(e){var t=this.field("properties")||{},r=this.category(),n=this.name();e=e||{},r&&(t.category=r),n&&(t.name=n);for(var i in e){var o=this[i]==null?this.proxy("properties."+i):this[i]();o!=null&&(t[e[i]]=o,i!==e[i]&&delete t[i])}return t};U.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();if(io.default(t))return t};U.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t};U.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"};U.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new no.Track(t,this.opts)};var dt={},oo=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dt,"__esModule",{value:!0});dt.Screen=void 0;var ao=oo(oe.exports),Jr=Ke,so=Oe;function he(e,t){Jr.Page.call(this,e,t)}dt.Screen=he;ao.default(he,Jr.Page);he.prototype.action=function(){return"screen"};he.prototype.type=he.prototype.action;he.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"};he.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new so.Track(t,this.opts)};var pt={},uo=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pt,"__esModule",{value:!0});pt.Delete=void 0;var co=uo(oe.exports),Zr=ne;function tr(e,t){Zr.Facade.call(this,e,t)}pt.Delete=tr;co.default(tr,Zr.Facade);tr.prototype.type=function(){return"delete"};(function(e){var t=D&&D.__assign||function(){return t=Object.assign||function(h){for(var m,_=1,y=arguments.length;_<y;_++){m=arguments[_];for(var b in m)Object.prototype.hasOwnProperty.call(m,b)&&(h[b]=m[b])}return h},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=e.Screen=e.Page=e.Track=e.Identify=e.Group=e.Alias=e.Facade=void 0;var r=ne;Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return r.Facade}});var n=ct;Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return n.Alias}});var i=lt;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return i.Group}});var o=Ve;Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}});var a=Oe;Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return a.Track}});var s=Ke;Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return s.Page}});var u=dt;Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return u.Screen}});var d=pt;Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return d.Delete}}),e.default=t(t({},r.Facade),{Alias:n.Alias,Group:i.Group,Identify:o.Identify,Track:a.Track,Page:s.Page,Screen:u.Screen,Delete:d.Delete})})(se);var Hr={exports:{}};(function(e,t){(function(r){e.exports=r()})(function(r){var n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function i(v,g){var l=v[0],c=v[1],p=v[2],f=v[3];l+=(c&p|~c&f)+g[0]-680876936|0,l=(l<<7|l>>>25)+c|0,f+=(l&c|~l&p)+g[1]-389564586|0,f=(f<<12|f>>>20)+l|0,p+=(f&l|~f&c)+g[2]+606105819|0,p=(p<<17|p>>>15)+f|0,c+=(p&f|~p&l)+g[3]-1044525330|0,c=(c<<22|c>>>10)+p|0,l+=(c&p|~c&f)+g[4]-176418897|0,l=(l<<7|l>>>25)+c|0,f+=(l&c|~l&p)+g[5]+1200080426|0,f=(f<<12|f>>>20)+l|0,p+=(f&l|~f&c)+g[6]-1473231341|0,p=(p<<17|p>>>15)+f|0,c+=(p&f|~p&l)+g[7]-45705983|0,c=(c<<22|c>>>10)+p|0,l+=(c&p|~c&f)+g[8]+1770035416|0,l=(l<<7|l>>>25)+c|0,f+=(l&c|~l&p)+g[9]-1958414417|0,f=(f<<12|f>>>20)+l|0,p+=(f&l|~f&c)+g[10]-42063|0,p=(p<<17|p>>>15)+f|0,c+=(p&f|~p&l)+g[11]-1990404162|0,c=(c<<22|c>>>10)+p|0,l+=(c&p|~c&f)+g[12]+1804603682|0,l=(l<<7|l>>>25)+c|0,f+=(l&c|~l&p)+g[13]-40341101|0,f=(f<<12|f>>>20)+l|0,p+=(f&l|~f&c)+g[14]-1502002290|0,p=(p<<17|p>>>15)+f|0,c+=(p&f|~p&l)+g[15]+1236535329|0,c=(c<<22|c>>>10)+p|0,l+=(c&f|p&~f)+g[1]-165796510|0,l=(l<<5|l>>>27)+c|0,f+=(l&p|c&~p)+g[6]-1069501632|0,f=(f<<9|f>>>23)+l|0,p+=(f&c|l&~c)+g[11]+643717713|0,p=(p<<14|p>>>18)+f|0,c+=(p&l|f&~l)+g[0]-373897302|0,c=(c<<20|c>>>12)+p|0,l+=(c&f|p&~f)+g[5]-701558691|0,l=(l<<5|l>>>27)+c|0,f+=(l&p|c&~p)+g[10]+38016083|0,f=(f<<9|f>>>23)+l|0,p+=(f&c|l&~c)+g[15]-660478335|0,p=(p<<14|p>>>18)+f|0,c+=(p&l|f&~l)+g[4]-405537848|0,c=(c<<20|c>>>12)+p|0,l+=(c&f|p&~f)+g[9]+568446438|0,l=(l<<5|l>>>27)+c|0,f+=(l&p|c&~p)+g[14]-1019803690|0,f=(f<<9|f>>>23)+l|0,p+=(f&c|l&~c)+g[3]-187363961|0,p=(p<<14|p>>>18)+f|0,c+=(p&l|f&~l)+g[8]+1163531501|0,c=(c<<20|c>>>12)+p|0,l+=(c&f|p&~f)+g[13]-1444681467|0,l=(l<<5|l>>>27)+c|0,f+=(l&p|c&~p)+g[2]-51403784|0,f=(f<<9|f>>>23)+l|0,p+=(f&c|l&~c)+g[7]+1735328473|0,p=(p<<14|p>>>18)+f|0,c+=(p&l|f&~l)+g[12]-1926607734|0,c=(c<<20|c>>>12)+p|0,l+=(c^p^f)+g[5]-378558|0,l=(l<<4|l>>>28)+c|0,f+=(l^c^p)+g[8]-2022574463|0,f=(f<<11|f>>>21)+l|0,p+=(f^l^c)+g[11]+1839030562|0,p=(p<<16|p>>>16)+f|0,c+=(p^f^l)+g[14]-35309556|0,c=(c<<23|c>>>9)+p|0,l+=(c^p^f)+g[1]-1530992060|0,l=(l<<4|l>>>28)+c|0,f+=(l^c^p)+g[4]+1272893353|0,f=(f<<11|f>>>21)+l|0,p+=(f^l^c)+g[7]-155497632|0,p=(p<<16|p>>>16)+f|0,c+=(p^f^l)+g[10]-1094730640|0,c=(c<<23|c>>>9)+p|0,l+=(c^p^f)+g[13]+681279174|0,l=(l<<4|l>>>28)+c|0,f+=(l^c^p)+g[0]-358537222|0,f=(f<<11|f>>>21)+l|0,p+=(f^l^c)+g[3]-722521979|0,p=(p<<16|p>>>16)+f|0,c+=(p^f^l)+g[6]+76029189|0,c=(c<<23|c>>>9)+p|0,l+=(c^p^f)+g[9]-640364487|0,l=(l<<4|l>>>28)+c|0,f+=(l^c^p)+g[12]-421815835|0,f=(f<<11|f>>>21)+l|0,p+=(f^l^c)+g[15]+530742520|0,p=(p<<16|p>>>16)+f|0,c+=(p^f^l)+g[2]-995338651|0,c=(c<<23|c>>>9)+p|0,l+=(p^(c|~f))+g[0]-198630844|0,l=(l<<6|l>>>26)+c|0,f+=(c^(l|~p))+g[7]+1126891415|0,f=(f<<10|f>>>22)+l|0,p+=(l^(f|~c))+g[14]-1416354905|0,p=(p<<15|p>>>17)+f|0,c+=(f^(p|~l))+g[5]-57434055|0,c=(c<<21|c>>>11)+p|0,l+=(p^(c|~f))+g[12]+1700485571|0,l=(l<<6|l>>>26)+c|0,f+=(c^(l|~p))+g[3]-1894986606|0,f=(f<<10|f>>>22)+l|0,p+=(l^(f|~c))+g[10]-1051523|0,p=(p<<15|p>>>17)+f|0,c+=(f^(p|~l))+g[1]-2054922799|0,c=(c<<21|c>>>11)+p|0,l+=(p^(c|~f))+g[8]+1873313359|0,l=(l<<6|l>>>26)+c|0,f+=(c^(l|~p))+g[15]-30611744|0,f=(f<<10|f>>>22)+l|0,p+=(l^(f|~c))+g[6]-1560198380|0,p=(p<<15|p>>>17)+f|0,c+=(f^(p|~l))+g[13]+1309151649|0,c=(c<<21|c>>>11)+p|0,l+=(p^(c|~f))+g[4]-145523070|0,l=(l<<6|l>>>26)+c|0,f+=(c^(l|~p))+g[11]-1120210379|0,f=(f<<10|f>>>22)+l|0,p+=(l^(f|~c))+g[2]+718787259|0,p=(p<<15|p>>>17)+f|0,c+=(f^(p|~l))+g[9]-343485551|0,c=(c<<21|c>>>11)+p|0,v[0]=l+v[0]|0,v[1]=c+v[1]|0,v[2]=p+v[2]|0,v[3]=f+v[3]|0}function o(v){var g=[],l;for(l=0;l<64;l+=4)g[l>>2]=v.charCodeAt(l)+(v.charCodeAt(l+1)<<8)+(v.charCodeAt(l+2)<<16)+(v.charCodeAt(l+3)<<24);return g}function a(v){var g=[],l;for(l=0;l<64;l+=4)g[l>>2]=v[l]+(v[l+1]<<8)+(v[l+2]<<16)+(v[l+3]<<24);return g}function s(v){var g=v.length,l=[1732584193,-271733879,-1732584194,271733878],c,p,f,A,E,L;for(c=64;c<=g;c+=64)i(l,o(v.substring(c-64,c)));for(v=v.substring(c-64),p=v.length,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c=0;c<p;c+=1)f[c>>2]|=v.charCodeAt(c)<<(c%4<<3);if(f[c>>2]|=128<<(c%4<<3),c>55)for(i(l,f),c=0;c<16;c+=1)f[c]=0;return A=g*8,A=A.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(A[2],16),L=parseInt(A[1],16)||0,f[14]=E,f[15]=L,i(l,f),l}function u(v){var g=v.length,l=[1732584193,-271733879,-1732584194,271733878],c,p,f,A,E,L;for(c=64;c<=g;c+=64)i(l,a(v.subarray(c-64,c)));for(v=c-64<g?v.subarray(c-64):new Uint8Array(0),p=v.length,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c=0;c<p;c+=1)f[c>>2]|=v[c]<<(c%4<<3);if(f[c>>2]|=128<<(c%4<<3),c>55)for(i(l,f),c=0;c<16;c+=1)f[c]=0;return A=g*8,A=A.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(A[2],16),L=parseInt(A[1],16)||0,f[14]=E,f[15]=L,i(l,f),l}function d(v){var g="",l;for(l=0;l<4;l+=1)g+=n[v>>l*8+4&15]+n[v>>l*8&15];return g}function h(v){var g;for(g=0;g<v.length;g+=1)v[g]=d(v[g]);return v.join("")}h(s("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function v(g,l){return g=g|0||0,g<0?Math.max(g+l,0):Math.min(g,l)}ArrayBuffer.prototype.slice=function(g,l){var c=this.byteLength,p=v(g,c),f=c,A,E,L,k;return l!==r&&(f=v(l,c)),p>f?new ArrayBuffer(0):(A=f-p,E=new ArrayBuffer(A),L=new Uint8Array(E),k=new Uint8Array(this,p,A),L.set(k),E)}}();function m(v){return/[\u0080-\uFFFF]/.test(v)&&(v=unescape(encodeURIComponent(v))),v}function _(v,g){var l=v.length,c=new ArrayBuffer(l),p=new Uint8Array(c),f;for(f=0;f<l;f+=1)p[f]=v.charCodeAt(f);return g?p:c}function y(v){return String.fromCharCode.apply(null,new Uint8Array(v))}function b(v,g,l){var c=new Uint8Array(v.byteLength+g.byteLength);return c.set(new Uint8Array(v)),c.set(new Uint8Array(g),v.byteLength),l?c:c.buffer}function C(v){var g=[],l=v.length,c;for(c=0;c<l-1;c+=2)g.push(parseInt(v.substr(c,2),16));return String.fromCharCode.apply(String,g)}function w(){this.reset()}return w.prototype.append=function(v){return this.appendBinary(m(v)),this},w.prototype.appendBinary=function(v){this._buff+=v,this._length+=v.length;var g=this._buff.length,l;for(l=64;l<=g;l+=64)i(this._hash,o(this._buff.substring(l-64,l)));return this._buff=this._buff.substring(l-64),this},w.prototype.end=function(v){var g=this._buff,l=g.length,c,p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f;for(c=0;c<l;c+=1)p[c>>2]|=g.charCodeAt(c)<<(c%4<<3);return this._finish(p,l),f=h(this._hash),v&&(f=C(f)),this.reset(),f},w.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},w.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},w.prototype.setState=function(v){return this._buff=v.buff,this._length=v.length,this._hash=v.hash,this},w.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},w.prototype._finish=function(v,g){var l=g,c,p,f;if(v[l>>2]|=128<<(l%4<<3),l>55)for(i(this._hash,v),l=0;l<16;l+=1)v[l]=0;c=this._length*8,c=c.toString(16).match(/(.*?)(.{0,8})$/),p=parseInt(c[2],16),f=parseInt(c[1],16)||0,v[14]=p,v[15]=f,i(this._hash,v)},w.hash=function(v,g){return w.hashBinary(m(v),g)},w.hashBinary=function(v,g){var l=s(v),c=h(l);return g?C(c):c},w.ArrayBuffer=function(){this.reset()},w.ArrayBuffer.prototype.append=function(v){var g=b(this._buff.buffer,v,!0),l=g.length,c;for(this._length+=v.byteLength,c=64;c<=l;c+=64)i(this._hash,a(g.subarray(c-64,c)));return this._buff=c-64<l?new Uint8Array(g.buffer.slice(c-64)):new Uint8Array(0),this},w.ArrayBuffer.prototype.end=function(v){var g=this._buff,l=g.length,c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],p,f;for(p=0;p<l;p+=1)c[p>>2]|=g[p]<<(p%4<<3);return this._finish(c,l),f=h(this._hash),v&&(f=C(f)),this.reset(),f},w.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},w.ArrayBuffer.prototype.getState=function(){var v=w.prototype.getState.call(this);return v.buff=y(v.buff),v},w.ArrayBuffer.prototype.setState=function(v){return v.buff=_(v.buff,!0),w.prototype.setState.call(this,v)},w.ArrayBuffer.prototype.destroy=w.prototype.destroy,w.ArrayBuffer.prototype._finish=w.prototype._finish,w.ArrayBuffer.hash=function(v,g){var l=u(new Uint8Array(v)),c=h(l);return g?C(c):c},w})})(Hr);const lo=Hr.exports;var fo=function(){function e(t){this.user=t}return e.prototype.track=function(t,r,n,i){return this.normalize(I(I({},this.baseEvent()),{event:t,type:"track",properties:r,options:I({},n),integrations:I({},i)}))},e.prototype.page=function(t,r,n,i,o){var a,s={type:"page",properties:I({},n),options:I({},i),integrations:I({},o)};return t!==null&&(s.category=t,s.properties=(a=s.properties)!==null&&a!==void 0?a:{},s.properties.category=t),r!==null&&(s.name=r),this.normalize(I(I({},this.baseEvent()),s))},e.prototype.screen=function(t,r,n,i,o){var a={type:"screen",properties:I({},n),options:I({},i),integrations:I({},o)};return t!==null&&(a.category=t),r!==null&&(a.name=r),this.normalize(I(I({},this.baseEvent()),a))},e.prototype.identify=function(t,r,n,i){return this.normalize(I(I({},this.baseEvent()),{type:"identify",userId:t,traits:r,options:I({},n),integrations:I({},i)}))},e.prototype.group=function(t,r,n,i){return this.normalize(I(I({},this.baseEvent()),{type:"group",traits:r,options:I({},n),integrations:I({},i),groupId:t}))},e.prototype.alias=function(t,r,n,i){var o={userId:t,type:"alias",options:I({},n),integrations:I({},i)};return r!==null&&(o.previousId=r),t===void 0?this.normalize(I(I({},o),this.baseEvent())):this.normalize(I(I({},this.baseEvent()),o))},e.prototype.baseEvent=function(){var t={integrations:{},options:{}},r=this.user;return r.id()&&(t.userId=r.id()),r.anonymousId()&&(t.anonymousId=r.anonymousId()),t},e.prototype.context=function(t){var r,n,i,o=["integrations","anonymousId","timestamp","userId"],a=(r=t.options)!==null&&r!==void 0?r:{};delete a.integrations;var s=Object.keys(a),u=(i=(n=t.options)===null||n===void 0?void 0:n.context)!==null&&i!==void 0?i:{},d={};return s.forEach(function(h){h!=="context"&&(o.includes(h)?nt(d,h,a[h]):nt(u,h,a[h]))}),[u,d]},e.prototype.normalize=function(t){var r,n,i=Object.keys((r=t.integrations)!==null&&r!==void 0?r:{}).reduce(function(y,b){var C,w;return I(I({},y),(C={},C[b]=Boolean((w=t.integrations)===null||w===void 0?void 0:w[b]),C))},{}),o=I(I({},i),(n=t.options)===null||n===void 0?void 0:n.integrations),a=this.context(t),s=a[0],u=a[1];t.options;var d=Hn(t,["options"]),h=I(I(I({timestamp:new Date},d),{context:s,integrations:o}),u),m="ajs-next-"+lo.hash(JSON.stringify(h)+zt()),_=I(I({},h),{messageId:m});return _},e}();function po(e,t){var r={};return e.forEach(function(n){var i,o=void 0;if(typeof t=="string"){var a=n[t];o=typeof a!="string"?JSON.stringify(a):a}else t instanceof Function&&(o=t(n));o!==void 0&&(r[o]=N(N([],(i=r[o])!==null&&i!==void 0?i:[],!0),[n],!1))}),r}function ho(e){var t=Math.random()+1,r=e.minTimeout,n=r===void 0?500:r,i=e.factor,o=i===void 0?2:i,a=e.attempt,s=e.maxTimeout,u=s===void 0?1/0:s;return Math.min(t*n*Math.pow(o,a),u)}var Qr="onRemoveFromFuture",rr=function(e){te(t,e);function t(r,n,i){var o=e.call(this)||this;return o.future=[],o.maxAttempts=r,o.queue=n,o.seen=i!=null?i:{},o}return t.prototype.push=function(){for(var r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=n.map(function(a){var s=r.updateAttempts(a);return s>r.maxAttempts||r.includes(a)?!1:(r.queue.push(a),!0)});return this.queue=this.queue.sort(function(a,s){return r.getAttempts(a)-r.getAttempts(s)}),o},t.prototype.pushWithBackoff=function(r){var n=this;if(this.getAttempts(r)===0)return this.push(r)[0];var i=this.updateAttempts(r);if(i>this.maxAttempts||this.includes(r))return!1;var o=ho({attempt:i-1});return setTimeout(function(){n.queue.push(r),n.future=n.future.filter(function(a){return a.id!==r.id}),n.emit(Qr)},o),this.future.push(r),!0},t.prototype.getAttempts=function(r){var n;return(n=this.seen[r.id])!==null&&n!==void 0?n:0},t.prototype.updateAttempts=function(r){return this.seen[r.id]=this.getAttempts(r)+1,this.getAttempts(r)},t.prototype.includes=function(r){return this.queue.includes(r)||this.future.includes(r)||Boolean(this.queue.find(function(n){return n.id===r.id}))||Boolean(this.future.find(function(n){return n.id===r.id}))},t.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(t.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),t}(Ut),ee={getItem:function(){},setItem:function(){},removeItem:function(){}};try{ee=Bt()&&window.localStorage?window.localStorage:ee}catch(e){console.warn("Unable to access localStorage",e)}function Yr(e){var t=ee.getItem(e);return(t?JSON.parse(t):[]).map(function(r){return new X(r.event,r.id)})}function vo(e,t){var r=Yr(e),n=N(N([],t,!0),r,!0),i=n.reduce(function(o,a){var s;return I(I({},o),(s={},s[a.id]=a,s))},{});ee.setItem(e,JSON.stringify(Object.values(i)))}function Xr(e){var t=ee.getItem(e);return t?JSON.parse(t):{}}function go(e,t){var r=Xr(e);ee.setItem(e,JSON.stringify(I(I({},r),t)))}function wr(e){ee.removeItem(e)}var mo=function(){return new Date().getTime()};function Lt(e,t,r){r===void 0&&(r=0);var n=50,i="persisted-queue:v1:".concat(e,":lock"),o=function(d){return new Date().getTime()>d},a=ee.getItem(i),s=a?JSON.parse(a):null,u=s===null||o(s);if(u){ee.setItem(i,JSON.stringify(mo()+n)),t(),ee.removeItem(i);return}!u&&r<3?setTimeout(function(){Lt(e,t,r+1)},n):console.error("Unable to retrieve lock")}var nr=function(e){te(t,e);function t(r,n){var i=e.call(this,r,[])||this,o="persisted-queue:v1:".concat(n,":items"),a="persisted-queue:v1:".concat(n,":seen"),s=[],u={};return Lt(n,function(){try{s=Yr(o),u=Xr(a),wr(o),wr(a),i.queue=N(N([],s,!0),i.queue,!0),i.seen=I(I({},u),i.seen)}catch(d){console.error(d)}}),document.addEventListener("pagehide",function(){if(i.todo>0){var d=N(N([],i.queue,!0),i.future,!0);try{Lt(n,function(){vo(o,d),go(a,i.seen)})}catch(h){console.error(h)}}}),i}return t}(rr),en=function(e){return typeof e=="object"&&e!==null&&"then"in e&&typeof e.then=="function"},yo=function(){var e,t,r=0;return{done:function(){return e},run:function(n){var i=n();return en(i)&&(++r===1&&(e=new Promise(function(o){return t=o})),i.finally(function(){return--r===0&&t()})),i}}};function _o(e){return S(this,void 0,void 0,function(){var t;return M(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,e()];case 1:return[2,r.sent()];case 2:return t=r.sent(),[2,Promise.reject(t)];case 3:return[2]}})})}function ke(e,t){var r="action"in t?t.action.name:t.name;e.log("debug","plugin",{plugin:r});var n=new Date().getTime(),i=t[e.event.type];if(i===void 0)return Promise.resolve(e);var o=_o(function(){return i.apply(t,[e])}).then(function(a){var s=new Date().getTime()-n;return a.stats.gauge("plugin_time",s,["plugin:".concat(r)]),a}).catch(function(a){if(a instanceof pe&&a.type==="middleware_cancellation")throw a;return a instanceof pe?(e.log("warn",a.type,{plugin:r,error:a}),a):(e.log("error","plugin Error",{plugin:r,error:a}),e.stats.increment("plugin_error",1,["plugin:".concat(r)]),a)});return o}function bo(e,t){return ke(e,t).then(function(r){if(r instanceof X)return r;e.log("debug","Context canceled"),e.stats.increment("context_canceled"),e.cancel(r)})}var tn=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:null},yt,Cr,wo=tn(),be=(yt=(Cr=wo).__SEGMENT_INSPECTOR__)!==null&&yt!==void 0?yt:Cr.__SEGMENT_INSPECTOR__={},Co=function(e){te(t,e);function t(r){var n=e.call(this)||this;return n.criticalTasks=yo(),n.plugins=[],n.failedInitializations=[],n.flushing=!1,n.queue=r!=null?r:new nr(4,"event-queue"),n.queue.on(Qr,function(){n.scheduleFlush(0)}),n}return t.prototype.register=function(r,n,i){return S(this,void 0,void 0,function(){var o=this;return M(this,function(a){switch(a.label){case 0:return[4,Promise.resolve(n.load(r,i)).then(function(){o.plugins.push(n)}).catch(function(s){if(n.type==="destination"){o.failedInitializations.push(n.name),console.warn(n.name,s),r.log("warn","Failed to load destination",{plugin:n.name,error:s});return}throw s})];case 1:return a.sent(),[2]}})})},t.prototype.deregister=function(r,n,i){return S(this,void 0,void 0,function(){var o;return M(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),n.unload?[4,Promise.resolve(n.unload(r,i))]:[3,2];case 1:a.sent(),a.label=2;case 2:return this.plugins=this.plugins.filter(function(s){return s.name!==n.name}),[3,4];case 3:return o=a.sent(),r.log("warn","Failed to unload destination",{plugin:n.name,error:o}),[3,4];case 4:return[2]}})})},t.prototype.dispatch=function(r){return S(this,void 0,void 0,function(){var n;return M(this,function(i){return r.log("debug","Dispatching"),r.stats.increment("message_dispatched"),this.queue.push(r),n=this.subscribeToDelivery(r),this.scheduleFlush(0),[2,n]})})},t.prototype.subscribeToDelivery=function(r){return S(this,void 0,void 0,function(){var n=this;return M(this,function(i){return[2,new Promise(function(o){var a=function(s,u){s.isSame(r)&&(n.off("flush",a),o(s))};n.on("flush",a)})]})})},t.prototype.dispatchSingle=function(r){return S(this,void 0,void 0,function(){var n=this;return M(this,function(i){return r.log("debug","Dispatching"),r.stats.increment("message_dispatched"),this.queue.updateAttempts(r),r.attempts=1,[2,this.deliver(r).catch(function(o){if(o instanceof pe&&o.retry===!1)return r.setFailedDelivery({reason:o}),r;var a=n.enqueuRetry(o,r);return a?n.subscribeToDelivery(r):(r.setFailedDelivery({reason:o}),r)})]})})},t.prototype.isEmpty=function(){return this.queue.length===0},t.prototype.scheduleFlush=function(r){var n=this;r===void 0&&(r=500),!this.flushing&&(this.flushing=!0,setTimeout(function(){n.flush().then(function(){setTimeout(function(){n.flushing=!1,n.queue.length&&n.scheduleFlush(0)},0)})},r))},t.prototype.deliver=function(r){return S(this,void 0,void 0,function(){var n,i,o;return M(this,function(a){switch(a.label){case 0:return[4,this.criticalTasks.done()];case 1:a.sent(),n=Date.now(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.flushOne(r)];case 3:return r=a.sent(),i=Date.now()-n,r.stats.gauge("delivered",i),r.log("debug","Delivered",r.event),[2,r];case 4:throw o=a.sent(),r.log("error","Failed to deliver",o),r.stats.increment("delivery_failed"),o;case 5:return[2]}})})},t.prototype.enqueuRetry=function(r,n){var i=r instanceof pe&&r.retry===!1,o=!i;if(o){var a=this.queue.pushWithBackoff(n);return a}return!1},t.prototype.flush=function(){return S(this,void 0,void 0,function(){var r,n,i;return M(this,function(o){switch(o.label){case 0:if(this.queue.length===0||!Nr())return[2,[]];if(r=this.queue.pop(),!r)return[2,[]];r.attempts=this.queue.getAttempts(r),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.deliver(r)];case 2:return r=o.sent(),this.emit("flush",r,!0),[3,4];case 3:return n=o.sent(),i=this.enqueuRetry(n,r),i||(r.setFailedDelivery({reason:n}),this.emit("flush",r,!1)),[2,[]];case 4:return[2,[r]]}})})},t.prototype.isReady=function(){return!0},t.prototype.availableExtensions=function(r){var n=this.plugins.filter(function(y){var b,C,w;if(y.type!=="destination"&&y.name!=="Segment.io")return!0;var v=void 0;return(b=y.alternativeNames)===null||b===void 0||b.forEach(function(g){r[g]!==void 0&&(v=r[g])}),(w=(C=r[y.name])!==null&&C!==void 0?C:v)!==null&&w!==void 0?w:(y.name==="Segment.io"?!0:r.All)!==!1}),i=po(n,"type"),o=i.before,a=o===void 0?[]:o,s=i.enrichment,u=s===void 0?[]:s,d=i.destination,h=d===void 0?[]:d,m=i.after,_=m===void 0?[]:m;return{before:a,enrichment:u,destinations:h,after:_}},t.prototype.flushOne=function(r){var n,i,o,a;return S(this,void 0,void 0,function(){var s,u,d,h,m,_,w,y,b,C,w,v,g,l,c;return M(this,function(p){switch(p.label){case 0:if(!this.isReady())throw new Error("Not ready");s=this.availableExtensions((n=r.event.integrations)!==null&&n!==void 0?n:{}),u=s.before,d=s.enrichment,h=0,m=u,p.label=1;case 1:return h<m.length?(_=m[h],[4,bo(r,_)]):[3,4];case 2:w=p.sent(),w instanceof X&&(r=w),p.label=3;case 3:return h++,[3,1];case 4:y=0,b=d,p.label=5;case 5:return y<b.length?(C=b[y],[4,ke(r,C)]):[3,8];case 6:w=p.sent(),w instanceof X&&(r=w),p.label=7;case 7:return y++,[3,5];case 8:return(i=be.enriched)===null||i===void 0||i.call(be,r),v=this.availableExtensions((o=r.event.integrations)!==null&&o!==void 0?o:{}),g=v.destinations,l=v.after,[4,new Promise(function(f,A){setTimeout(function(){var E=g.map(function(L){return ke(r,L)});Promise.all(E).then(f).catch(A)},0)})];case 9:return p.sent(),r.stats.increment("message_delivered"),(a=be.delivered)===null||a===void 0||a.call(be,r,["segment.io"]),c=l.map(function(f){return ke(r,f)}),[4,Promise.all(c)];case 10:return p.sent(),[2,r]}})})},t}(Ut);function ir(e){for(var t=e.constructor.prototype,r=0,n=Object.getOwnPropertyNames(t);r<n.length;r++){var i=n[r];if(i!=="constructor"){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);!!o&&typeof o.value=="function"&&(e[i]=e[i].bind(e))}}return e}var _e={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},ht=function(){function e(){this.cache={}}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,r){return this.cache[t]=r,r},e.prototype.remove=function(t){delete this.cache[t]},e}(),xo=365,xr=function(e){te(t,e);function t(r){r===void 0&&(r=t.defaults);var n=e.call(this)||this;return n.options=I(I({},t.defaults),r),n}return t.available=function(){var r=window.navigator.cookieEnabled;return r||(q.set("ajs:cookies","test"),r=document.cookie.includes("ajs:cookies"),q.remove("ajs:cookies")),r},Object.defineProperty(t,"defaults",{get:function(){return{maxage:xo,domain:Br(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(r){try{var n=q.get(r);if(!n)return null;try{return JSON.parse(n)}catch(i){return n}}catch(i){return null}},t.prototype.set=function(r,n){return typeof n=="string"?q.set(r,n,this.opts()):n===null?q.remove(r,this.opts()):q.set(r,JSON.stringify(n),this.opts()),n},t.prototype.remove=function(r){return q.remove(r,this.opts())},t}(ht),_t=function(e){te(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.get=function(n){return null},r.set=function(n,i){return null},r.remove=function(n){},r}return t}(ht),Ir=function(e){te(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.available=function(){var r="test";try{return localStorage.setItem(r,r),localStorage.removeItem(r),!0}catch(n){return!1}},t.prototype.get=function(r){var n=localStorage.getItem(r);if(n)try{return JSON.parse(n)}catch(i){return JSON.parse(JSON.stringify(n))}return null},t.prototype.set=function(r,n){try{localStorage.setItem(r,JSON.stringify(n))}catch(i){console.warn("Unable to set ".concat(r," in localStorage, storage may be full."))}return n},t.prototype.remove=function(r){return localStorage.removeItem(r)},t}(ht),rn=function(){function e(t,r){t===void 0&&(t=_e);var n=this,i,o,a,s;this.options={},this.id=function(m){var _,y;if(n.options.disable)return null;var b=n.chainGet(n.idKey);if(m!==void 0){n.trySet(n.idKey,m);var C=m!==b&&b!==null&&m!==null;C&&n.anonymousId(null)}return(y=(_=n.chainGet(n.idKey))!==null&&_!==void 0?_:n.cookies.get(_e.cookie.oldKey))!==null&&y!==void 0?y:null},this.anonymousId=function(m){var _,y;if(n.options.disable)return null;if(m===void 0){var b=(_=n.chainGet(n.anonKey))!==null&&_!==void 0?_:(y=n.legacySIO())===null||y===void 0?void 0:y[0];if(b)return b}return m===null?(n.trySet(n.anonKey,null),n.chainGet(n.anonKey)):(n.trySet(n.anonKey,m!=null?m:zt()),n.chainGet(n.anonKey))},this.traits=function(m){var _,y;if(!n.options.disable)return m===null&&(m={}),m&&(n.mem.set(n.traitsKey,m!=null?m:{}),n.localStorage.set(n.traitsKey,m!=null?m:{})),(y=(_=n.localStorage.get(n.traitsKey))!==null&&_!==void 0?_:n.mem.get(n.traitsKey))!==null&&y!==void 0?y:{}},this.options=t,this.cookieOptions=r,this.idKey=(o=(i=t.cookie)===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:_e.cookie.key,this.traitsKey=(s=(a=t.localStorage)===null||a===void 0?void 0:a.key)!==null&&s!==void 0?s:_e.localStorage.key,this.anonKey="ajs_anonymous_id";var u=t.disable===!0,d=t.persist!==!1;this.localStorage=u||t.localStorageFallbackDisabled||!d||!Ir.available()?new _t:new Ir,this.cookies=!u&&d&&xr.available()?new xr(r):new _t,this.mem=u?new _t:new ht;var h=this.cookies.get(_e.cookie.oldKey);h&&(h.id&&this.id(h.id),h.traits&&this.traits(h.traits)),ir(this)}return e.prototype.chainGet=function(t){var r,n,i,o=(i=(n=(r=this.localStorage.get(t))!==null&&r!==void 0?r:this.cookies.get(t))!==null&&n!==void 0?n:this.mem.get(t))!==null&&i!==void 0?i:null;return this.trySet(t,typeof o=="number"?o.toString():o)},e.prototype.trySet=function(t,r){return this.localStorage.set(t,r),this.cookies.set(t,r),this.mem.set(t,r),r},e.prototype.chainClear=function(t){this.localStorage.remove(t),this.cookies.remove(t),this.mem.remove(t)},e.prototype.legacySIO=function(){var t=this.cookies.get("_sio");if(!t)return null;var r=t.split("----"),n=r[0],i=r[1];return[n,i]},e.prototype.identify=function(t,r){if(!this.options.disable){r=r!=null?r:{};var n=this.id();(n===null||n===t)&&(r=I(I({},this.traits()),r)),t&&this.id(t),this.traits(r)}},e.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},e.prototype.reset=function(){this.logout(),this.chainClear(this.idKey),this.chainClear(this.anonKey),this.chainClear(this.traitsKey)},e.prototype.load=function(){return new e(this.options,this.cookieOptions)},e.prototype.save=function(){return!0},e.defaults=_e,e}(),Io={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},So=function(e){te(t,e);function t(r,n){r===void 0&&(r=Io);var i=e.call(this,r,n)||this;return i.anonymousId=function(o){},ir(i),i}return t}(rn),ue="This is being deprecated and will be not be available in future releases of Analytics JS",bt=tn(),wt=bt==null?void 0:bt.analytics;function Mo(e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var r=e?4:1,n=t?new rr(r,[]):new nr(r,"event-queue");return new Co(n)}function Y(){console.warn(ue)}var Po=function(e){te(t,e);function t(r,n,i,o,a){var s=this,u,d,h;s=e.call(this)||this,s._debug=!1,s.initialized=!1,s.user=function(){return s._user},s.init=s.initialize.bind(s),s.log=Y,s.addIntegrationMiddleware=Y,s.listeners=Y,s.addEventListener=Y,s.removeAllListeners=Y,s.removeListener=Y,s.removeEventListener=Y,s.hasListeners=Y,s.add=Y,s.addIntegration=Y;var m=n==null?void 0:n.cookie,_=(u=n==null?void 0:n.disableClientPersistence)!==null&&u!==void 0?u:!1;return s.settings=r,s.settings.timeout=(d=s.settings.timeout)!==null&&d!==void 0?d:300,s.queue=i!=null?i:Mo(n==null?void 0:n.retryQueue,_),s._user=o!=null?o:new rn(_?I(I({},n==null?void 0:n.user),{persist:!1}):n==null?void 0:n.user,m).load(),s._group=a!=null?a:new So(_?I(I({},n==null?void 0:n.group),{persist:!1}):n==null?void 0:n.group,m).load(),s.eventFactory=new fo(s._user),s.integrations=(h=n==null?void 0:n.integrations)!==null&&h!==void 0?h:{},s.options=n!=null?n:{},ir(s),s}return t.prototype.track=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o,a,s,u,d,h=this;return M(this,function(m){return i=ii.apply(void 0,r),o=i[0],a=i[1],s=i[2],u=i[3],d=this.eventFactory.track(o,a,s,this.integrations),[2,this.dispatch(d,u).then(function(_){return h.emit("track",o,_.event.properties,_.event.options),_})]})})},t.prototype.page=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o,a,s,u,d,h,m=this;return M(this,function(_){return i=hr.apply(void 0,r),o=i[0],a=i[1],s=i[2],u=i[3],d=i[4],h=this.eventFactory.page(o,a,s,u,this.integrations),[2,this.dispatch(h,d).then(function(y){return m.emit("page",o,a,y.event.properties,y.event.options),y})]})})},t.prototype.identify=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o,a,s,u,d,h=this;return M(this,function(m){return i=vr(this._user).apply(void 0,r),o=i[0],a=i[1],s=i[2],u=i[3],this._user.identify(o,a),d=this.eventFactory.identify(this._user.id(),this._user.traits(),s,this.integrations),[2,this.dispatch(d,u).then(function(_){return h.emit("identify",_.event.userId,_.event.traits,_.event.options),_})]})})},t.prototype.group=function(){for(var r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(n.length===0)return this._group;var o=vr(this._group).apply(void 0,n),a=o[0],s=o[1],u=o[2],d=o[3];this._group.identify(a,s);var h=this._group.id(),m=this._group.traits(),_=this.eventFactory.group(h,m,u,this.integrations);return this.dispatch(_,d).then(function(y){return r.emit("group",y.event.groupId,y.event.traits,y.event.options),y})},t.prototype.alias=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o,a,s,u,d,h=this;return M(this,function(m){return i=oi.apply(void 0,r),o=i[0],a=i[1],s=i[2],u=i[3],d=this.eventFactory.alias(o,a,s,this.integrations),[2,this.dispatch(d,u).then(function(_){return h.emit("alias",o,a,_.event.options),_})]})})},t.prototype.screen=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o,a,s,u,d,h,m=this;return M(this,function(_){return i=hr.apply(void 0,r),o=i[0],a=i[1],s=i[2],u=i[3],d=i[4],h=this.eventFactory.screen(o,a,s,u,this.integrations),[2,this.dispatch(h,d).then(function(y){return m.emit("screen",o,a,y.event.properties,y.event.options),y})]})})},t.prototype.trackClick=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o;return M(this,function(a){switch(a.label){case 0:return[4,K(()=>import("./auto-track.eb9f6124.js"),["assets/auto-track.eb9f6124.js","assets/chevron_right.fb385c69.js","assets/chevron_right.08649806.css","assets/index.a5ecf254.js"])];case 1:return i=a.sent(),[2,(o=i.link).call.apply(o,N([this],r,!1))]}})})},t.prototype.trackLink=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o;return M(this,function(a){switch(a.label){case 0:return[4,K(()=>import("./auto-track.eb9f6124.js"),["assets/auto-track.eb9f6124.js","assets/chevron_right.fb385c69.js","assets/chevron_right.08649806.css","assets/index.a5ecf254.js"])];case 1:return i=a.sent(),[2,(o=i.link).call.apply(o,N([this],r,!1))]}})})},t.prototype.trackSubmit=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o;return M(this,function(a){switch(a.label){case 0:return[4,K(()=>import("./auto-track.eb9f6124.js"),["assets/auto-track.eb9f6124.js","assets/chevron_right.fb385c69.js","assets/chevron_right.08649806.css","assets/index.a5ecf254.js"])];case 1:return i=a.sent(),[2,(o=i.form).call.apply(o,N([this],r,!1))]}})})},t.prototype.trackForm=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o;return M(this,function(a){switch(a.label){case 0:return[4,K(()=>import("./auto-track.eb9f6124.js"),["assets/auto-track.eb9f6124.js","assets/chevron_right.fb385c69.js","assets/chevron_right.08649806.css","assets/index.a5ecf254.js"])];case 1:return i=a.sent(),[2,(o=i.form).call.apply(o,N([this],r,!1))]}})})},t.prototype.register=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o,a=this;return M(this,function(s){switch(s.label){case 0:return i=X.system(),o=r.map(function(u){return a.queue.register(i,u,a)}),[4,Promise.all(o)];case 1:return s.sent(),[2,i]}})})},t.prototype.deregister=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o,a=this;return M(this,function(s){switch(s.label){case 0:return i=X.system(),o=r.map(function(u){return S(a,void 0,void 0,function(){var d;return M(this,function(h){return d=this.queue.plugins.find(function(m){return m.name===u}),d?[2,this.queue.deregister(i,d,this)]:(i.log("warn","plugin ".concat(u," not found")),[2])})})}),[4,Promise.all(o)];case 1:return s.sent(),[2,i]}})})},t.prototype.debug=function(r){return r===!1&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=r,this},t.prototype.reset=function(){this._user.reset(),this._group.reset()},t.prototype.timeout=function(r){this.settings.timeout=r},t.prototype.dispatch=function(r,n){var i;return S(this,void 0,void 0,function(){var o,a,s,u,d;return M(this,function(h){switch(h.label){case 0:return o=new X(r),(i=be.triggered)===null||i===void 0||i.call(be,o),rt()&&!this.options.retryQueue?[2,o]:(a=Date.now(),this.queue.isEmpty()?[4,this.queue.dispatchSingle(o)]:[3,2]);case 1:return s=h.sent(),[3,4];case 2:return[4,this.queue.dispatch(o)];case 3:s=h.sent(),h.label=4;case 4:return u=Date.now()-a,d=this.settings.timeout,n?[4,ui(s,n,Math.max((d!=null?d:300)-u,0),d)]:[3,6];case 5:s=h.sent(),h.label=6;case 6:return this._debug&&s.flush(),[2,s]}})})},t.prototype.addSourceMiddleware=function(r){return S(this,void 0,void 0,function(){var n=this;return M(this,function(i){switch(i.label){case 0:return[4,this.queue.criticalTasks.run(function(){return S(n,void 0,void 0,function(){var o,a,s;return M(this,function(u){switch(u.label){case 0:return[4,K(()=>Promise.resolve().then(()=>Ro),void 0)];case 1:return o=u.sent().sourceMiddlewarePlugin,a={},this.queue.plugins.forEach(function(d){if(d.type==="destination")return a[d.name]=!0}),s=o(r,a),[4,this.register(s)];case 2:return u.sent(),[2]}})})})];case 1:return i.sent(),[2,this]}})})},t.prototype.addDestinationMiddleware=function(r){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=this.queue.plugins.filter(function(a){return a.name.toLowerCase()===r.toLowerCase()});return o.forEach(function(a){a.addMiddleware.apply(a,n)}),Promise.resolve(this)},t.prototype.setAnonymousId=function(r){return this._user.anonymousId(r)},t.prototype.queryString=function(r){return S(this,void 0,void 0,function(){var n;return M(this,function(i){switch(i.label){case 0:return[4,K(()=>import("./index.1ec746cf.js"),["assets/index.1ec746cf.js","assets/chevron_right.fb385c69.js","assets/chevron_right.08649806.css","assets/index.a5ecf254.js"])];case 1:return n=i.sent().queryString,[2,n(this,r)]}})})},t.prototype.use=function(r){return r(this),this},t.prototype.ready=function(r){return r===void 0&&(r=function(n){return n}),S(this,void 0,void 0,function(){return M(this,function(n){return[2,Promise.all(this.queue.plugins.map(function(i){return i.ready?i.ready():Promise.resolve()})).then(function(i){return r(i),i})]})})},t.prototype.noConflict=function(){return console.warn(ue),window.analytics=wt!=null?wt:this,this},t.prototype.normalize=function(r){return console.warn(ue),this.eventFactory.normalize(r)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(ue),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return xe},enumerable:!1,configurable:!0}),t.prototype.initialize=function(r,n){return S(this,void 0,void 0,function(){return M(this,function(i){return console.warn(ue),[2,Promise.resolve(this)]})})},t.prototype.pageview=function(r){return S(this,void 0,void 0,function(){return M(this,function(n){switch(n.label){case 0:return console.warn(ue),[4,this.page({path:r})];case 1:return n.sent(),[2,this]}})})},Object.defineProperty(t.prototype,"plugins",{get:function(){var r;return console.warn(ue),(r=this._plugins)!==null&&r!==void 0?r:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){console.warn(ue);var r=this.queue.plugins.filter(function(n){return n.type==="destination"}).reduce(function(n,i){var o="".concat(i.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),a=window[o];if(!a)return n;var s=a.Integration;return s?(n[i.name]=s,n):(n[i.name]=a,n)},{});return r},enumerable:!1,configurable:!0}),t.prototype.push=function(r){var n=this,i=r.shift();i&&!n[i]||n[i].apply(this,r)},t}(Ut);function nn(){return typeof process>"u"||!process.env?{}:process.env}var Ao=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,Oo=function(){var e,t=Array.prototype.slice.call(document.querySelectorAll("script"));return t.forEach(function(r){var n,i=(n=r.getAttribute("src"))!==null&&n!==void 0?n:"",o=Ao.exec(i);o&&o[1]&&(e=o[1])}),e},Xe,Eo=function(){var e,t=Xe!=null?Xe:(e=window.analytics)===null||e===void 0?void 0:e._cdn;return t},Lo=function(e){window.analytics&&(window.analytics._cdn=e),Xe=e},or=function(){var e=Eo();if(e)return e;var t=Oo();return t||"https://cdn.segment.com"},Ts=function(){var e=or();return"".concat(e,"/next-integrations")};function $o(e,t){var r,n=Object.entries((r=t.integrations)!==null&&r!==void 0?r:{}).reduce(function(i,o){var a,s,u=o[0],d=o[1];return typeof d=="object"?I(I({},i),(a={},a[u]=d,a)):I(I({},i),(s={},s[u]={},s))},{});return Object.entries(e.integrations).reduce(function(i,o){var a,s=o[0],u=o[1];return I(I({},i),(a={},a[s]=I(I({},u),n[s]),a))},{})}function on(){var e=document.getElementsByTagName("link"),t="";return Array.prototype.slice.call(e).forEach(function(r){r.getAttribute("rel")==="canonical"&&(t=r.getAttribute("href"))}),t}function To(){var e=on();if(!e)return window.location.pathname;var t=document.createElement("a");t.href=e;var r=t.pathname.startsWith("/")?t.pathname:"/"+t.pathname;return r}function Do(e){e===void 0&&(e="");var t=on();if(t)return t.includes("?")?t:"".concat(t).concat(e);var r=window.location.href,n=r.indexOf("#");return n===-1?r:r.slice(0,n)}function an(){return{path:To(),referrer:document.referrer,search:location.search,title:document.title,url:Do(location.search)}}function Te(e){var t,r=e.event;r.context=r.context||{};var n=an(),i=(t=r.properties)!==null&&t!==void 0?t:{};return Object.keys(n).forEach(function(o){i[o]&&(n[o]=i[o])}),r.context.page&&(n=Object.assign({},n,r.context.page)),r.context=Object.assign({},r.context,{page:n}),e.event=r,e}var Fo={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:function(e){return e.event.properties=Object.assign({},an(),e.event.properties),e.event.name&&(e.event.properties.name=e.event.name),Te(e)},alias:Te,track:Te,identify:Te,group:Te};function sn(e){var t=Array.prototype.slice.call(window.document.querySelectorAll("script"));return t.find(function(r){return r.src===e})}function Ct(e,t){var r=sn(e);if(r!==void 0){var n=r==null?void 0:r.getAttribute("status");if(n==="loaded")return Promise.resolve(r);if(n==="loading")return new Promise(function(i,o){r.addEventListener("load",function(){return i(r)}),r.addEventListener("error",function(a){return o(a)})})}return new Promise(function(i,o){var a,s=window.document.createElement("script");s.type="text/javascript",s.src=e,s.async=!0,s.setAttribute("status","loading");for(var u=0,d=Object.entries(t!=null?t:{});u<d.length;u++){var h=d[u],m=h[0],_=h[1];s.setAttribute(m,_)}s.onload=function(){s.onerror=s.onload=null,s.setAttribute("status","loaded"),i(s)},s.onerror=function(){s.onerror=s.onload=null,s.setAttribute("status","error"),o(new Error("Failed to load ".concat(e)))};var y=window.document.getElementsByTagName("script")[0];(a=y.parentElement)===null||a===void 0||a.insertBefore(s,y)})}function Ds(e){var t=sn(e);return t!==void 0&&t.remove(),Promise.resolve()}function ar(e,t){var r=new se.Facade(e,t);return e.type==="track"&&(r=new se.Track(e,t)),e.type==="identify"&&(r=new se.Identify(e,t)),e.type==="page"&&(r=new se.Page(e,t)),e.type==="alias"&&(r=new se.Alias(e,t)),e.type==="group"&&(r=new se.Group(e,t)),e.type==="screen"&&(r=new se.Screen(e,t)),Object.defineProperty(r,"obj",{value:e,writable:!0}),r}var jo=function(e){return JSON.parse(JSON.stringify(e))};function un(e,t,r){return S(this,void 0,void 0,function(){function n(d,h){return S(this,void 0,void 0,function(){var m,_,y;return M(this,function(b){switch(b.label){case 0:return m=!1,_=null,[4,at(h({payload:ar(d,{clone:!0,traverse:!1}),integration:e,next:function(C){m=!0,C===null&&(_=null),C&&(_=C.obj)}}))];case 1:return b.sent(),!m&&_!==null&&(_=_,_.integrations=I(I({},d.integrations),(y={},y[e]=!1,y))),[2,_]}})})}var i,o,a,s,u;return M(this,function(d){switch(d.label){case 0:i=jo(t),o=0,a=r,d.label=1;case 1:return o<a.length?(s=a[o],[4,n(i,s)]):[3,4];case 2:if(u=d.sent(),u===null)return[2,null];i=u,d.label=3;case 3:return o++,[3,1];case 4:return[2,i]}})})}function ko(e,t){function r(n){return S(this,void 0,void 0,function(){var i;return M(this,function(o){switch(o.label){case 0:return i=!1,[4,at(e({payload:ar(n.event,{clone:!0,traverse:!1}),integrations:t!=null?t:{},next:function(a){i=!0,a&&(n.event=a.obj)}}))];case 1:if(o.sent(),!i)throw new pe({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}})})}return{name:"Source Middleware ".concat(e.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(n){return Promise.resolve(n)},track:r,page:r,identify:r,alias:r,group:r}}const Ro=Object.freeze(Object.defineProperty({__proto__:null,applyDestinationMiddleware:un,sourceMiddlewarePlugin:ko},Symbol.toStringTag,{value:"Module"}));var No=function(){function e(t,r){this.version="1.0.0",this.alternativeNames=[],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=r,this.name=t,this.type=r.type,this.alternativeNames.push(r.name)}return e.prototype.addMiddleware=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];(t=this.middleware).push.apply(t,r)},e.prototype.transform=function(t){return S(this,void 0,void 0,function(){var r;return M(this,function(n){switch(n.label){case 0:return[4,un(this.name,t.event,this.middleware)];case 1:return r=n.sent(),r===null&&t.cancel(new pe({retry:!1,reason:"dropped by destination middleware"})),[2,new X(r)]}})})},e.prototype._createMethod=function(t){var r=this;return function(n){return S(r,void 0,void 0,function(){var i;return M(this,function(o){switch(o.label){case 0:return this.action[t]?[4,this.transform(n)]:[2,n];case 1:return i=o.sent(),[4,this.action[t](i)];case 2:return o.sent(),[2,n]}})})}},e.prototype.isLoaded=function(){return this.action.isLoaded()},e.prototype.ready=function(){return this.action.ready?this.action.ready():Promise.resolve()},e.prototype.load=function(t,r){return this.action.load(t,r)},e.prototype.unload=function(t,r){var n,i;return(i=(n=this.action).unload)===null||i===void 0?void 0:i.call(n,t,r)},e}();function Bo(e){if(!Array.isArray(e))throw new Error("Not a valid list of plugins");var t=["load","isLoaded","name","version","type"];return e.forEach(function(r){t.forEach(function(n){var i;if(r[n]===void 0)throw new Error("Plugin: ".concat((i=r.name)!==null&&i!==void 0?i:"unknown"," missing required function ").concat(n))})}),!0}function zo(e,t,r,n,i){var o,a,s;return S(this,void 0,void 0,function(){var u,d,h,m,_=this;return M(this,function(y){switch(y.label){case 0:return u=[],d=or(),h=(a=(o=e.middlewareSettings)===null||o===void 0?void 0:o.routingRules)!==null&&a!==void 0?a:[],m=((s=e.remotePlugins)!==null&&s!==void 0?s:[]).map(function(b){return S(_,void 0,void 0,function(){var C,w,v,g,l,c,p,f,A;return M(this,function(E){switch(E.label){case 0:if(t.All===!1&&!t[b.name]||t[b.name]===!1)return[2];E.label=1;case 1:if(E.trys.push([1,12,,13]),!n)return[3,7];C=b.url.split("/"),w=C[C.length-2],v=b.url.replace(w,btoa(w).replace(/=/g,"")),E.label=2;case 2:return E.trys.push([2,4,,6]),[4,Ct(v.replace("https://cdn.segment.com",d))];case 3:return E.sent(),[3,6];case 4:return E.sent(),[4,Ct(b.url.replace("https://cdn.segment.com",d))];case 5:return E.sent(),[3,6];case 6:return[3,9];case 7:return[4,Ct(b.url.replace("https://cdn.segment.com",d))];case 8:E.sent(),E.label=9;case 9:return g=b.libraryName,typeof window[g]!="function"?[3,11]:(l=window[g],[4,at(l(I(I({},b.settings),r[b.name])))]);case 10:c=E.sent(),p=Array.isArray(c)?c:[c],Bo(p),f=h.filter(function(L){return L.destinationName===b.creationName}),p.forEach(function(L){var k=new No(b.creationName,L);f.length&&i&&L.type==="destination"&&k.addMiddleware(i),u.push(k)}),E.label=11;case 11:return[3,13];case 12:return A=E.sent(),console.warn("Failed to load Remote Plugin",A),[3,13];case 13:return[2]}})})}),[4,Promise.all(m)];case 1:return y.sent(),[2,u.filter(Boolean)]}})})}var Uo=function(e){var t=!1;document.addEventListener("pagehide",function(){t||(t=!0,e())}),document.addEventListener("visibilitychange",function(){if(document.visibilityState=="hidden"){if(t)return;t=!0,e()}else t=!1})},cn=Me;typeof window<"u"&&(cn=window.fetch||Me);var qo=500;function ln(e){var t=encodeURI(JSON.stringify(e)).split(/%..|./).length-1;return t/1024}function Vo(e){return ln(e)>=qo-50}function Ko(e){var t=[],r=0;return e.forEach(function(n){var i=ln(t[r]);i>=64&&r++,t[r]?t[r].push(n):t[r]=[n]}),t}function Go(e,t){var r,n,i=[],o=!1,a=(r=t==null?void 0:t.size)!==null&&r!==void 0?r:10,s=(n=t==null?void 0:t.timeout)!==null&&n!==void 0?n:5e3;function u(y){var b;if(y.length!==0){var C=(b=y[0])===null||b===void 0?void 0:b.writeKey;return cn("https://".concat(e,"/b"),{keepalive:o,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({batch:y,writeKey:C})})}}function d(){return S(this,void 0,void 0,function(){var y;return M(this,function(b){return i.length?(y=i,i=[],[2,u(y)]):[2]})})}var h;function m(){h||(h=setTimeout(function(){h=void 0,d().catch(console.error)},s))}Uo(function(){if(o=!0,i.length){var y=Ko(i).map(u);Promise.all(y).catch(console.error)}});function _(y,b){return S(this,void 0,void 0,function(){var C;return M(this,function(w){return i.push(b),C=i.length>=a||Vo(i),[2,C||o?d():m()]})})}return{dispatch:_}}var fn=Me;typeof window<"u"&&(fn=window.fetch||Me);function Wo(){function e(t,r){return fn(t,{headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(r)})}return{dispatch:e}}var Jo=function(e,t){return S(void 0,void 0,void 0,function(){var r;return M(this,function(n){return r=function(i){return S(void 0,void 0,void 0,function(){var o;return M(this,function(a){switch(a.label){case 0:return e(i)?(o=r,[4,t()]):[3,2];case 1:return[2,o.apply(void 0,[a.sent()])];case 2:return[2]}})})},[2,r(void 0)]})})};function Zo(e,t){return S(this,void 0,void 0,function(){var r,n=this;return M(this,function(i){switch(i.label){case 0:return r=[],rt()?[2,t]:[4,Jo(function(){return t.length>0&&!rt()},function(){return S(n,void 0,void 0,function(){var o,a,s;return M(this,function(u){switch(u.label){case 0:return o=t.pop(),o?[4,ke(o,e)]:[2];case 1:return a=u.sent(),s=a instanceof X,s||r.push(o),[2]}})})})];case 1:return i.sent(),r.map(function(o){return t.pushWithBackoff(o)}),[2,t]}})})}function He(e,t,r,n){var i=this;e||setTimeout(function(){return S(i,void 0,void 0,function(){var o,a;return M(this,function(s){switch(s.label){case 0:return o=!0,[4,Zo(r,t)];case 1:return a=s.sent(),o=!1,t.todo>0&&n(o,a,r,n),[2]}})})},Math.random()*5e3)}function Ho(e,t){var r,n,i,o,a=e.user();return t.previousId=(i=(n=(r=t.previousId)!==null&&r!==void 0?r:t.from)!==null&&n!==void 0?n:a.id())!==null&&i!==void 0?i:a.anonymousId(),t.userId=(o=t.userId)!==null&&o!==void 0?o:t.to,delete t.from,delete t.to,t}function Qo(e,t,r){var n,i,o,a,s=e.options.disableClientPersistence?new rr(e.queue.queue.maxAttempts,[]):new nr(e.queue.queue.maxAttempts,"dest-Segment.io"),u=!1,d=(n=t==null?void 0:t.apiHost)!==null&&n!==void 0?n:"api.segment.io/v1",h=(i=t==null?void 0:t.protocol)!==null&&i!==void 0?i:"https",m="".concat(h,"://").concat(d),_=((o=t==null?void 0:t.deliveryStrategy)===null||o===void 0?void 0:o.strategy)==="batching"?Go(d,(a=t==null?void 0:t.deliveryStrategy)===null||a===void 0?void 0:a.config):Wo();function y(C){return S(this,void 0,void 0,function(){var w,v;return M(this,function(g){return rt()?(s.push(C),He(u,s,b,He),[2,C]):(w=C.event.type.charAt(0),v=ar(C.event).json(),C.event.type==="track"&&delete v.traits,C.event.type==="alias"&&(v=Ho(e,v)),[2,_.dispatch("".concat(m,"/").concat(w),Ii(e,v,t,r)).then(function(){return C}).catch(function(l){return(l.type==="error"||l.message==="Failed to fetch")&&(s.push(C),He(u,s,b,He)),C})])})})}var b={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:y,identify:y,page:y,alias:y,group:y};return b}var dn=function(e,t,r){r.getCalls(e).forEach(function(n){sr(t,n).catch(console.error)})},Yo=function(e,t){return S(void 0,void 0,void 0,function(){var r,n,i;return M(this,function(o){switch(o.label){case 0:r=0,n=t.getCalls("addSourceMiddleware"),o.label=1;case 1:return r<n.length?(i=n[r],[4,sr(e,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return r++,[3,1];case 4:return[2]}})})},Xo=dn.bind(globalThis,"on"),ea=dn.bind(globalThis,"setAnonymousId"),ta=function(e,t){t.toArray().forEach(function(r){setTimeout(function(){sr(e,r).catch(console.error)},0)})},ra=function(){function e(){this._value={}}return e.prototype.toArray=function(){var t;return(t=[]).concat.apply(t,Object.values(this._value))},e.prototype.getCalls=function(t){var r;return(r=this._value[t])!==null&&r!==void 0?r:[]},e.prototype.push=function(){for(var t=this,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.forEach(function(i){t._value[i.method]?t._value[i.method].push(i):t._value[i.method]=[i]}),this},e.prototype.clear=function(){return this._value={},this},e}();function sr(e,t){return S(this,void 0,void 0,function(){var r,n;return M(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.called?[2,void 0]:(t.called=!0,r=e[t.method].apply(e,t.args),en(r)?[4,r]:[3,2]);case 1:i.sent(),i.label=2;case 2:return t.resolve(r),[3,4];case 3:return n=i.sent(),t.reject(n),[3,4];case 4:return[2]}})})}var na=function(){function e(t){var r=this;this._preInitBuffer=new ra,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=xe,this._promise=t(this._preInitBuffer),this._promise.then(function(n){var i=n[0],o=n[1];r.instance=i,r.ctx=o}).catch(function(){})}return e.prototype.then=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return(t=this._promise).then.apply(t,r)},e.prototype.catch=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return(t=this._promise).catch.apply(t,r)},e.prototype.finally=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return(t=this._promise).finally.apply(t,r)},e.prototype._createMethod=function(t){var r=this;return function(){for(var n,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(r.instance){var a=(n=r.instance)[t].apply(n,i);return Promise.resolve(a)}return new Promise(function(s,u){r._preInitBuffer.push({method:t,args:i,resolve:s,reject:u,called:!1})})}},e.prototype._createChainableMethod=function(t){var r=this;return function(){for(var n,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return r.instance?((n=r.instance)[t].apply(n,i),r):(r._preInitBuffer.push({method:t,args:i,resolve:function(){},reject:console.error,called:!1}),r)}},e}();function ia(e){var t=e[0],r=e.slice(1);return{method:t,resolve:function(){},reject:console.error,args:r,called:!1}}var oa=function(e){return e.map(ia)},$t=function(){var e=window.analytics;if(!Array.isArray(e))return[];var t=e.splice(0,e.length);return oa(t)};function aa(e,t){var r=t!=null?t:or();return Me("".concat(r,"/v1/projects/").concat(e,"/settings")).then(function(n){return n.ok?n.json():n.text().then(function(i){throw new Error(i)})}).catch(function(n){throw console.error(n.message),n})}function sa(e){return nn().NODE_ENV!=="test"&&Object.keys(e.integrations).length>1}function ua(e){var t,r,n;return nn().NODE_ENV!=="test"&&((n=(r=(t=e.middlewareSettings)===null||t===void 0?void 0:t.routingRules)===null||r===void 0?void 0:r.length)!==null&&n!==void 0?n:0)>0}function ca(e,t){t.push.apply(t,$t()),ea(e,t),Xo(e,t)}function la(e,t){return S(this,void 0,void 0,function(){return M(this,function(r){switch(r.label){case 0:return t.push.apply(t,$t()),[4,Yo(e,t)];case 1:return r.sent(),t.push.apply(t,$t()),ta(e,t),t.clear(),[2]}})})}function fa(e,t,r,n,i){var o,a,s;return S(this,void 0,void 0,function(){var u,d,h,m,_,y,b,C,w,v,g,l=this;return M(this,function(c){switch(c.label){case 0:return ua(e)?[4,K(()=>import("./index.b12d6d41.js"),["assets/index.b12d6d41.js","assets/index.a5ecf254.js","assets/chevron_right.fb385c69.js","assets/chevron_right.08649806.css"]).then(function(p){return p.tsubMiddleware(e.middlewareSettings.routingRules)})]:[3,2];case 1:return d=c.sent(),[3,3];case 2:d=void 0,c.label=3;case 3:return u=d,sa(e)?[4,K(()=>import("./index.13b63793.js"),["assets/index.13b63793.js","assets/index.a5ecf254.js","assets/is-plan-event-enabled.681b46ca.js","assets/chevron_right.fb385c69.js","assets/chevron_right.08649806.css"]).then(function(p){return p.ajsDestinations(e,t.integrations,r,u)})]:[3,5];case 4:return m=c.sent(),[3,6];case 5:m=[],c.label=6;case 6:return h=m,e.legacyVideoPluginsEnabled?[4,K(()=>import("./index.61d8a46d.js"),["assets/index.61d8a46d.js","assets/index.a5ecf254.js"]).then(function(p){return p.loadLegacyVideoPlugins(t)})]:[3,8];case 7:c.sent(),c.label=8;case 8:return!((o=r.plan)===null||o===void 0)&&o.track?[4,K(()=>import("./index.640e9b13.js"),["assets/index.640e9b13.js","assets/index.a5ecf254.js","assets/is-plan-event-enabled.681b46ca.js"]).then(function(p){var f;return p.schemaFilter((f=r.plan)===null||f===void 0?void 0:f.track,e)})]:[3,10];case 9:return y=c.sent(),[3,11];case 10:y=void 0,c.label=11;case 11:return _=y,b=$o(e,n),[4,zo(e,t.integrations,b,n.obfuscate,u).catch(function(){return[]})];case 12:return C=c.sent(),w=N(N(N([ni,Fo],i,!0),h,!0),C,!0),_&&w.push(_),v=((a=r.integrations)===null||a===void 0?void 0:a.All)===!1&&!r.integrations["Segment.io"]||r.integrations&&r.integrations["Segment.io"]===!1,v||w.push(Qo(t,b["Segment.io"],e.integrations)),[4,t.register.apply(t,w)];case 13:return g=c.sent(),Object.entries((s=e.enabledMiddleware)!==null&&s!==void 0?s:{}).some(function(p){var f=p[1];return f})?[4,K(()=>import("./index.272abe7a.js"),["assets/index.272abe7a.js","assets/index.a5ecf254.js","assets/chevron_right.fb385c69.js","assets/chevron_right.08649806.css"]).then(function(p){var f=p.remoteMiddlewares;return S(l,void 0,void 0,function(){var A,E;return M(this,function(L){switch(L.label){case 0:return[4,f(g,e,n.obfuscate)];case 1:return A=L.sent(),E=A.map(function(k){return t.addSourceMiddleware(k)}),[2,Promise.all(E)]}})})})]:[3,15];case 14:c.sent(),c.label=15;case 15:return[2,g]}})})}function da(e,t,r){var n,i,o,a,s,u;return t===void 0&&(t={}),S(this,void 0,void 0,function(){var d,h,m,_,y,b,C,w,v,g;return M(this,function(l){switch(l.label){case 0:return e.cdnURL&&Lo(e.cdnURL),(n=e.cdnSettings)!==null&&n!==void 0?(h=n,[3,3]):[3,1];case 1:return[4,aa(e.writeKey,e.cdnURL)];case 2:h=l.sent(),l.label=3;case 3:return d=h,m=(o=(i=d.integrations["Segment.io"])===null||i===void 0?void 0:i.retryQueue)!==null&&o!==void 0?o:!0,_=I({retryQueue:m},t),y=new Po(e,_),b=(a=e.plugins)!==null&&a!==void 0?a:[],X.initMetrics(d.metrics),ca(y,r),[4,fa(d,y,_,t,b)];case 4:return C=l.sent(),w=(s=window.location.search)!==null&&s!==void 0?s:"",v=(u=window.location.hash)!==null&&u!==void 0?u:"",g=w.length?w:v.replace(/(?=#).*(?=\?)/,""),g.includes("ajs_")?[4,y.queryString(g).catch(console.error)]:[3,6];case 5:l.sent(),l.label=6;case 6:return y.initialized=!0,y.emit("initialize",e,t),t.initialPageview&&y.page().catch(console.error),[4,la(y,r)];case 7:return l.sent(),[2,[y,C]]}})})}var pa=function(e){te(t,e);function t(r){return e.call(this,r)||this}return t.load=function(r,n){return n===void 0&&(n={}),new this(function(i){return da(r,n,i)})},t.standalone=function(r,n){return t.load({writeKey:r},n).then(function(i){return i[0]})},t}(na);class ha{constructor(){dr(this,"analytics");this.analytics=pa.load({writeKey:"c0SISxJpICLXxstkrSppa4uxwYzBQbqf"})}trackPageLoad(){this.analytics.page()}trackEvent(t,r){this.analytics.track(t,{event_data:r,environment:"production"})}}const Re=new ha;var Ne=(e=>(e.LC_VIEWED="LC-Viewed",e.LC_CATEGORY_CLICK="LC-Category-Clicked",e.LC_CATEGORY_VIEW="LC-Category-Viewed",e.LC_SCORE_CLICK="LC-Score-Clicked",e.LC_SCORE_VIEW="LC-Score-Viewed",e.LC_TRANSPORT_MODE_CLICK="LC-Transportation-Method-Clicked",e.LC_LONG_DESCRIPTION_CLICK="LC-Long-Description-Clicked",e.LC_LONG_DESCRIPTION_VIEW="LC-Long-Description-Viewed",e.LC_POI_CLICK="LC-POI-Clicked",e.LC_POI_VIEW="LC-POI-Viewed",e.LC_LIST_VIEW_CLICK="LC-List-View-Clicked",e.LC_MAP_VIEW_CLICK="LC-Map-View-Clicked",e.LC_SCORES_LIST_SCROLL="LC-Scores-List-Scroll",e.LC_COMMUTE_CALC_CLICK="LC-Commute-Calc-Clicked",e.LC_COMMUTE_CALC_VIEW="LC-Commute-Calc-Viewed",e.LC_COMMUTE_CALCULATE_CLICK="LC-Commute-Calc-Calculate-Clicked",e.LC_ATTRIBUTION_CLICK="LC-Attribution-Clicked",e))(Ne||{});const pn=re.createContext({}),Z=()=>$.exports.useContext(pn),va=(e,t)=>{switch(t.type){case"CATEGORY":return{...e,activeCategory:t.value};case"SCORE":{const r=ze.find(n=>t.value===""?n.value===e.activeCategory:n.scores.includes(t.value)).value;return{activeCategory:r,activeScoreByCategory:{...e.activeScoreByCategory,[r]:t.value}}}}},ga=({children:e})=>{const t=window.innerWidth<jr.screenSizes.mobileL?{activeCategory:"commute",activeScoreByCategory:{commute:"transit_friendly",amenities:"groceries",character:"quiet",nature:"parks",education:"primary_schools"}}:{activeCategory:"commute",activeScoreByCategory:{commute:"",amenities:"",character:"",nature:"",education:""}},[r,n]=$.exports.useReducer(va,t),[i,o]=$.exports.useState(),[a,s]=$.exports.useState();$.exports.useEffect(()=>{i&&Re.trackEvent(Ne.LC_POI_VIEW,{poi_name:i==null?void 0:i.name,poi_info:i==null?void 0:i.address})},[i]);const{activeCategory:u}=r;$.exports.useEffect(()=>{Re.trackEvent(Ne.LC_CATEGORY_VIEW,u)},[u]);const d=r.activeScoreByCategory[u];$.exports.useEffect(()=>{d!==""&&Re.trackEvent(Ne.LC_SCORE_VIEW,d)},[d]);const h=y=>{n({type:"SCORE",value:y})},m=y=>{n({type:"CATEGORY",value:y})},_=$.exports.useMemo(()=>({activeScore:d,setActiveScore:h,activeCategory:u,setActiveCategory:m,activePOI:i,setActivePOI:o,hoveredPOI:a,setHoveredPOI:s}),[d,h,u,m,i,o,a,s]);return x(pn.Provider,{value:_,children:e})};function hn(e,t,r){r===void 0&&(r={});var n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function Sr(e,t,r){if(r===void 0&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Mr(e[0])||!Mr(e[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:e};return hn(n,t,r)}function ma(e,t,r){r===void 0&&(r={});var n={type:"MultiPoint",coordinates:e};return hn(n,t,r)}function Mr(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function vn(e,t,r){if(e!==null)for(var n,i,o,a,s,u,d,h=0,m=0,_,y=e.type,b=y==="FeatureCollection",C=y==="Feature",w=b?e.features.length:1,v=0;v<w;v++){d=b?e.features[v].geometry:C?e.geometry:e,_=d?d.type==="GeometryCollection":!1,s=_?d.geometries.length:1;for(var g=0;g<s;g++){var l=0,c=0;if(a=_?d.geometries[g]:d,a!==null){u=a.coordinates;var p=a.type;switch(h=r&&(p==="Polygon"||p==="MultiPolygon")?1:0,p){case null:break;case"Point":if(t(u,m,v,l,c)===!1)return!1;m++,l++;break;case"LineString":case"MultiPoint":for(n=0;n<u.length;n++){if(t(u[n],m,v,l,c)===!1)return!1;m++,p==="MultiPoint"&&l++}p==="LineString"&&l++;break;case"Polygon":case"MultiLineString":for(n=0;n<u.length;n++){for(i=0;i<u[n].length-h;i++){if(t(u[n][i],m,v,l,c)===!1)return!1;m++}p==="MultiLineString"&&l++,p==="Polygon"&&c++}p==="Polygon"&&l++;break;case"MultiPolygon":for(n=0;n<u.length;n++){for(c=0,i=0;i<u[n].length;i++){for(o=0;o<u[n][i].length-h;o++){if(t(u[n][i][o],m,v,l,c)===!1)return!1;m++}c++}l++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(vn(a.geometries[n],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Tt(e){var t=[1/0,1/0,-1/0,-1/0];return vn(e,function(r){t[0]>r[0]&&(t[0]=r[0]),t[1]>r[1]&&(t[1]=r[1]),t[2]<r[0]&&(t[2]=r[0]),t[3]<r[1]&&(t[3]=r[1])}),t}Tt.default=Tt;var ya="Expected a function",Pr=0/0,_a="[object Symbol]",ba=/^\s+|\s+$/g,wa=/^[-+]0x[0-9a-f]+$/i,Ca=/^0b[01]+$/i,xa=/^0o[0-7]+$/i,Ia=parseInt,Sa=typeof D=="object"&&D&&D.Object===Object&&D,Ma=typeof self=="object"&&self&&self.Object===Object&&self,Pa=Sa||Ma||Function("return this")(),Aa=Object.prototype,Oa=Aa.toString,Ea=Math.max,La=Math.min,xt=function(){return Pa.Date.now()};function $a(e,t,r){var n,i,o,a,s,u,d=0,h=!1,m=!1,_=!0;if(typeof e!="function")throw new TypeError(ya);t=Ar(t)||0,Dt(r)&&(h=!!r.leading,m="maxWait"in r,o=m?Ea(Ar(r.maxWait)||0,t):o,_="trailing"in r?!!r.trailing:_);function y(f){var A=n,E=i;return n=i=void 0,d=f,a=e.apply(E,A),a}function b(f){return d=f,s=setTimeout(v,t),h?y(f):a}function C(f){var A=f-u,E=f-d,L=t-A;return m?La(L,o-E):L}function w(f){var A=f-u,E=f-d;return u===void 0||A>=t||A<0||m&&E>=o}function v(){var f=xt();if(w(f))return g(f);s=setTimeout(v,C(f))}function g(f){return s=void 0,_&&n?y(f):(n=i=void 0,a)}function l(){s!==void 0&&clearTimeout(s),d=0,n=u=i=s=void 0}function c(){return s===void 0?a:g(xt())}function p(){var f=xt(),A=w(f);if(n=arguments,i=this,u=f,A){if(s===void 0)return b(u);if(m)return s=setTimeout(v,t),y(u)}return s===void 0&&(s=setTimeout(v,t)),a}return p.cancel=l,p.flush=c,p}function Dt(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Ta(e){return!!e&&typeof e=="object"}function Da(e){return typeof e=="symbol"||Ta(e)&&Oa.call(e)==_a}function Ar(e){if(typeof e=="number")return e;if(Da(e))return Pr;if(Dt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Dt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(ba,"");var r=Ca.test(e);return r||xa.test(e)?Ia(e.slice(2),r?2:8):wa.test(e)?Pr:+e}var Fa=$a;const ja=()=>{const[e,t]=$.exports.useState(!1);return $.exports.useLayoutEffect(()=>{const r=()=>{t(window.innerWidth<jr.screenSizes.mobileL)};return window.addEventListener("resize",Fa(r,250)),r(),()=>window.removeEventListener("resize",r)},[]),e};function gn(){var s;const{client:e}=kt(),{sdkState:t}=Se(),r=Rt(t.options,250),{activeScore:n}=Z(),i=n?je[n]:void 0,a={...$.exports.useMemo(()=>r!=null&&r.marker?r.marker:{lat:r==null?void 0:r.lat,lng:r==null?void 0:r.lng},[r]),limit:10,radius:2e3,include:i};return jt(jn.list(a),async()=>e.getPois(a),{enabled:!!a&&!!((s=a.include)!=null&&s.length)&&!!a.lat&&!!a.lng})}function mn(){const{client:e}=kt(),{sdkState:t}=Se(),r=Rt(t.options,250),{activeScore:n}=Z(),i=n==="high_schools"||n==="primary_schools",a={...$.exports.useMemo(()=>r!=null&&r.marker?r.marker:{lat:r==null?void 0:r.lat,lng:r==null?void 0:r.lng},[r]),limit:10,radius:2e3};return jt(kn.list(a),async()=>e.getSchools(a),{enabled:!!a&&!!a.lat&&!!a.lng&&i})}const yn=re.createContext({}),_n=()=>$.exports.useContext(yn),ka=({children:e,mapRef:t,mapPadding:r})=>x(yn.Provider,{value:{mapRef:t,mapPadding:r},children:e});function Ft(e,t,r,n,i,o){if(i-n<=r)return;const a=n+i>>1;bn(e,t,a,n,i,o%2),Ft(e,t,r,n,a-1,o+1),Ft(e,t,r,a+1,i,o+1)}function bn(e,t,r,n,i,o){for(;i>n;){if(i-n>600){const d=i-n+1,h=r-n+1,m=Math.log(d),_=.5*Math.exp(2*m/3),y=.5*Math.sqrt(m*_*(d-_)/d)*(h-d/2<0?-1:1),b=Math.max(n,Math.floor(r-h*_/d+y)),C=Math.min(i,Math.floor(r+(d-h)*_/d+y));bn(e,t,r,b,C,o)}const a=t[2*r+o];let s=n,u=i;for(De(e,t,n,r),t[2*i+o]>a&&De(e,t,n,i);s<u;){for(De(e,t,s,u),s++,u--;t[2*s+o]<a;)s++;for(;t[2*u+o]>a;)u--}t[2*n+o]===a?De(e,t,n,u):(u++,De(e,t,u,i)),u<=r&&(n=u+1),r<=u&&(i=u-1)}}function De(e,t,r,n){It(e,r,n),It(t,2*r,2*n),It(t,2*r+1,2*n+1)}function It(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function Ra(e,t,r,n,i,o,a){const s=[0,e.length-1,0],u=[];let d,h;for(;s.length;){const m=s.pop(),_=s.pop(),y=s.pop();if(_-y<=a){for(let w=y;w<=_;w++)d=t[2*w],h=t[2*w+1],d>=r&&d<=i&&h>=n&&h<=o&&u.push(e[w]);continue}const b=Math.floor((y+_)/2);d=t[2*b],h=t[2*b+1],d>=r&&d<=i&&h>=n&&h<=o&&u.push(e[b]);const C=(m+1)%2;(m===0?r<=d:n<=h)&&(s.push(y),s.push(b-1),s.push(C)),(m===0?i>=d:o>=h)&&(s.push(b+1),s.push(_),s.push(C))}return u}function Na(e,t,r,n,i,o){const a=[0,e.length-1,0],s=[],u=i*i;for(;a.length;){const d=a.pop(),h=a.pop(),m=a.pop();if(h-m<=o){for(let w=m;w<=h;w++)Or(t[2*w],t[2*w+1],r,n)<=u&&s.push(e[w]);continue}const _=Math.floor((m+h)/2),y=t[2*_],b=t[2*_+1];Or(y,b,r,n)<=u&&s.push(e[_]);const C=(d+1)%2;(d===0?r-i<=y:n-i<=b)&&(a.push(m),a.push(_-1),a.push(C)),(d===0?r+i>=y:n+i>=b)&&(a.push(_+1),a.push(h),a.push(C))}return s}function Or(e,t,r,n){const i=e-r,o=t-n;return i*i+o*o}const Ba=e=>e[0],za=e=>e[1];class Er{constructor(t,r=Ba,n=za,i=64,o=Float64Array){this.nodeSize=i,this.points=t;const a=t.length<65536?Uint16Array:Uint32Array,s=this.ids=new a(t.length),u=this.coords=new o(t.length*2);for(let d=0;d<t.length;d++)s[d]=d,u[2*d]=r(t[d]),u[2*d+1]=n(t[d]);Ft(s,u,i,0,s.length-1,0)}range(t,r,n,i){return Ra(this.ids,this.coords,t,r,n,i,this.nodeSize)}within(t,r,n){return Na(this.ids,this.coords,t,r,n,this.nodeSize)}}const Ua={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},it=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1));class qa{constructor(t){this.options=Be(Object.create(Ua),t),this.trees=new Array(this.options.maxZoom+1)}load(t){const{log:r,minZoom:n,maxZoom:i,nodeSize:o}=this.options;r&&console.time("total time");const a=`prepare ${t.length} points`;r&&console.time(a),this.points=t;let s=[];for(let u=0;u<t.length;u++)!t[u].geometry||s.push(Ka(t[u],u));this.trees[i+1]=new Er(s,$r,Tr,o,Float32Array),r&&console.timeEnd(a);for(let u=i;u>=n;u--){const d=+Date.now();s=this._cluster(s,u),this.trees[u]=new Er(s,$r,Tr,o,Float32Array),r&&console.log("z%d: %d clusters in %dms",u,s.length,+Date.now()-d)}return r&&console.timeEnd("total time"),this}getClusters(t,r){let n=((t[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,t[1]));let o=t[2]===180?180:((t[2]+180)%360+360)%360-180;const a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,o=180;else if(n>o){const h=this.getClusters([n,i,180,a],r),m=this.getClusters([-180,i,o,a],r);return h.concat(m)}const s=this.trees[this._limitZoom(r)],u=s.range(et(n),tt(a),et(o),tt(i)),d=[];for(const h of u){const m=s.points[h];d.push(m.numPoints?Lr(m):this.points[m.index])}return d}getChildren(t){const r=this._getOriginId(t),n=this._getOriginZoom(t),i="No cluster with the specified id.",o=this.trees[n];if(!o)throw new Error(i);const a=o.points[r];if(!a)throw new Error(i);const s=this.options.radius/(this.options.extent*Math.pow(2,n-1)),u=o.within(a.x,a.y,s),d=[];for(const h of u){const m=o.points[h];m.parentId===t&&d.push(m.numPoints?Lr(m):this.points[m.index])}if(d.length===0)throw new Error(i);return d}getLeaves(t,r,n){r=r||10,n=n||0;const i=[];return this._appendLeaves(i,t,r,n,0),i}getTile(t,r,n){const i=this.trees[this._limitZoom(t)],o=Math.pow(2,t),{extent:a,radius:s}=this.options,u=s/a,d=(n-u)/o,h=(n+1+u)/o,m={features:[]};return this._addTileFeatures(i.range((r-u)/o,d,(r+1+u)/o,h),i.points,r,n,o,m),r===0&&this._addTileFeatures(i.range(1-u/o,d,1,h),i.points,o,n,o,m),r===o-1&&this._addTileFeatures(i.range(0,d,u/o,h),i.points,-1,n,o,m),m.features.length?m:null}getClusterExpansionZoom(t){let r=this._getOriginZoom(t)-1;for(;r<=this.options.maxZoom;){const n=this.getChildren(t);if(r++,n.length!==1)break;t=n[0].properties.cluster_id}return r}_appendLeaves(t,r,n,i,o){const a=this.getChildren(r);for(const s of a){const u=s.properties;if(u&&u.cluster?o+u.point_count<=i?o+=u.point_count:o=this._appendLeaves(t,u.cluster_id,n,i,o):o<i?o++:t.push(s),t.length===n)break}return o}_addTileFeatures(t,r,n,i,o,a){for(const s of t){const u=r[s],d=u.numPoints;let h,m,_;if(d)h=wn(u),m=u.x,_=u.y;else{const C=this.points[u.index];h=C.properties,m=et(C.geometry.coordinates[0]),_=tt(C.geometry.coordinates[1])}const y={type:1,geometry:[[Math.round(this.options.extent*(m*o-n)),Math.round(this.options.extent*(_*o-i))]],tags:h};let b;d?b=u.id:this.options.generateId?b=u.index:this.points[u.index].id&&(b=this.points[u.index].id),b!==void 0&&(y.id=b),a.features.push(y)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,r){const n=[],{radius:i,extent:o,reduce:a,minPoints:s}=this.options,u=i/(o*Math.pow(2,r));for(let d=0;d<t.length;d++){const h=t[d];if(h.zoom<=r)continue;h.zoom=r;const m=this.trees[r+1],_=m.within(h.x,h.y,u),y=h.numPoints||1;let b=y;for(const C of _){const w=m.points[C];w.zoom>r&&(b+=w.numPoints||1)}if(b>y&&b>=s){let C=h.x*y,w=h.y*y,v=a&&y>1?this._map(h,!0):null;const g=(d<<5)+(r+1)+this.points.length;for(const l of _){const c=m.points[l];if(c.zoom<=r)continue;c.zoom=r;const p=c.numPoints||1;C+=c.x*p,w+=c.y*p,c.parentId=g,a&&(v||(v=this._map(h,!0)),a(v,this._map(c)))}h.parentId=g,n.push(Va(C/b,w/b,g,b,v))}else if(n.push(h),b>1)for(const C of _){const w=m.points[C];w.zoom<=r||(w.zoom=r,n.push(w))}}return n}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,r){if(t.numPoints)return r?Be({},t.properties):t.properties;const n=this.points[t.index].properties,i=this.options.map(n);return r&&i===n?Be({},i):i}}function Va(e,t,r,n,i){return{x:it(e),y:it(t),zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function Ka(e,t){const[r,n]=e.geometry.coordinates;return{x:it(et(r)),y:it(tt(n)),zoom:1/0,index:t,parentId:-1}}function Lr(e){return{type:"Feature",id:e.id,properties:wn(e),geometry:{type:"Point",coordinates:[Ga(e.x),Wa(e.y)]}}}function wn(e){const t=e.numPoints,r=t>=1e4?`${Math.round(t/1e3)}k`:t>=1e3?`${Math.round(t/100)/10}k`:t;return Be(Be({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:r})}function et(e){return e/360+.5}function tt(e){const t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function Ga(e){return(e-.5)*360}function Wa(e){const t=(180-e*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function Be(e,t){for(const r in t)e[r]=t[r];return e}function $r(e){return e.x}function Tr(e){return e.y}var Dr=Object.prototype.hasOwnProperty;function Fr(e,t,r){for(r of e.keys())if(fe(r,t))return r}function fe(e,t){var r,n,i;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((n=e.length)===t.length)for(;n--&&fe(e[n],t[n]););return n===-1}if(r===Set){if(e.size!==t.size)return!1;for(n of e)if(i=n,i&&typeof i=="object"&&(i=Fr(t,i),!i)||!t.has(i))return!1;return!0}if(r===Map){if(e.size!==t.size)return!1;for(n of e)if(i=n[0],i&&typeof i=="object"&&(i=Fr(t,i),!i)||!fe(n[1],t.get(i)))return!1;return!0}if(r===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(r===DataView){if((n=e.byteLength)===t.byteLength)for(;n--&&e.getInt8(n)===t.getInt8(n););return n===-1}if(ArrayBuffer.isView(e)){if((n=e.byteLength)===t.byteLength)for(;n--&&e[n]===t[n];);return n===-1}if(!r||typeof e=="object"){n=0;for(r in e)if(Dr.call(e,r)&&++n&&!Dr.call(t,r)||!(r in t)||!fe(e[r],t[r]))return!1;return Object.keys(t).length===n}}return e!==e&&t!==t}function Ja(e){var t=$.exports.useRef(e),r=$.exports.useRef(0);return fe(e,t.current)||(t.current=e,r.current+=1),$.exports.useMemo(function(){return t.current},[r.current])}function Za(e,t){return $.exports.useEffect(e,Ja(t))}var Ha=function(t){var r=t.points,n=t.bounds,i=t.zoom,o=t.options,a=$.exports.useRef(),s=$.exports.useRef(),u=$.exports.useState([]),d=u[0],h=u[1],m=Math.round(i);return Za(function(){(!a.current||!fe(s.current,r)||!fe(a.current.options,o))&&(a.current=new qa(o),a.current.load(r)),n&&h(a.current.getClusters(n,m)),s.current=r},[r,n,m,o]),{clusters:d,supercluster:a.current}};const Qa=T.div`
|
|
1
|
+
var Dn=Object.defineProperty;var Fn=(e,t,r)=>t in e?Dn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var dr=(e,t,r)=>(Fn(e,typeof t!="symbol"?t+"":t,r),r);import{u as jt,p as jn,s as kn,M as pr,a as Rn,$ as Nn,b as Bn,c as zn,d as Un,S as qn,e as Vn,f as Kn,g as Gn,m as Wn,N as Jn,P as Zn}from"./chevron_right.8fd46579.js";import{_ as te,a as I,b as S,c as M,d as D,e as Hn,f as N,g as K,R as re,r as $,w as jr,j as x,B as ze,h as kt,u as Se,i as Rt,p as je,s as T,y as P,F as Nt,k as B,l as gt,I as ge,m as z,n as ot,N as Ge,X as We,U as kr,A as Rr,x as St,O as Qn,o as Fe,q as Yn,C as Qe,t as Xn,v as ei,z as ti}from"./index.83934545.js";function de(e){return typeof e=="string"}function Mt(e){return typeof e=="number"}function we(e){return typeof e=="function"}function G(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()==="object"}function ri(e){var t,r,n,i=(n=(r=(t=e.userId)!==null&&t!==void 0?t:e.anonymousId)!==null&&r!==void 0?r:e.groupId)!==null&&n!==void 0?n:e.previousId;return de(i)}var Le=function(e){te(t,e);function t(r,n){var i=e.call(this,n)||this;return i.field=r,i}return t}(Error);function me(e){var t,r=e&&e.event&&e.event.type,n=e.event;if(n===void 0)throw new Le("event","Event is missing");if(!de(r))throw new Le("event","Event is not a string");if(r==="track"&&!de(n.event))throw new Le("event","Event is not a string");var i=(t=n.properties)!==null&&t!==void 0?t:n.traits;if(r!=="alias"&&!G(i))throw new Le("properties","properties is not an object");if(!ri(n))throw new Le("userId","Missing userId or anonymousId");return e}var ni={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:me,identify:me,page:me,alias:me,group:me,screen:me};function ii(e,t,r,n){var i,o=[e,t,r,n],a=G(e)?e.event:e;if(!a||!de(a))throw new Error("Event missing");var s=G(e)?(i=e.properties)!==null&&i!==void 0?i:{}:G(t)?t:{},u={};G(t)&&!we(r)&&(u=r!=null?r:{}),G(e)&&!we(t)&&(u=t!=null?t:{});var d=o.find(we);return[a,s,u,d]}function hr(e,t,r,n,i){var o,a,s=null,u=null,d=[e,t,r,n,i],h=d.filter(de);h[0]!==void 0&&h[1]!==void 0&&(s=h[0],u=h[1]),h.length===1&&(s=null,u=h[0]);var m=d.find(we),_=d.filter(function(C){return u===null?G(C):G(C)||C===null}),y=(o=_[0])!==null&&o!==void 0?o:{},b=(a=_[1])!==null&&a!==void 0?a:{};return[s,u,y,b,m]}var vr=function(e){return function(){for(var t,r,n,i,o,a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var u=null;u=(n=(t=a.find(de))!==null&&t!==void 0?t:(r=a.find(Mt))===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:e.id();var d=a.filter(function(y){return u===null?G(y):G(y)||y===null}),h=(i=d[0])!==null&&i!==void 0?i:{},m=(o=d[1])!==null&&o!==void 0?o:{},_=a.find(we);return[u,h,m,_]}};function oi(e,t,r,n){Mt(e)&&(e=e.toString()),Mt(t)&&(t=t.toString());var i=[e,t,r,n],o=i.filter(de),a=o[0],s=a===void 0?e:a,u=o[1],d=u===void 0?null:u,h=i.filter(G)[0],m=h===void 0?{}:h,_=i.find(we);return[s,d,m,_]}function at(e){return Promise.resolve(e)}function ai(e,t){return new Promise(function(r,n){var i=setTimeout(function(){n(Error("Promise timed out"))},t);e.then(function(o){return clearTimeout(i),r(o)}).catch(n)})}function si(e){return new Promise(function(t){return setTimeout(t,e)})}function ui(e,t,r,n){var i=function(){try{return at(t(e))}catch(o){return Promise.reject(o)}};return si(r).then(function(){return ai(i(),n!=null?n:1e3)}).catch(function(o){e==null||e.log("warn","Callback Error",{error:o}),e==null||e.stats.increment("callback_error")}).then(function(){return e})}function Bt(){return typeof window<"u"}function Ls(){return!Bt()}function Nr(){return Bt()?window.navigator.onLine:!0}function rt(){return!Nr()}var ce=256,Ye=[],Je;for(;ce--;)Ye[ce]=(ce+256).toString(16).substring(1);function zt(){var e=0,t,r="";if(!Je||ce+16>256){for(Je=Array(e=256);e--;)Je[e]=256*Math.random()|0;e=ce=0}for(;e<16;e++)t=Je[ce+e],e==6?r+=Ye[t&15|64]:e==8?r+=Ye[t&63|128]:r+=Ye[t],e&1&&e>1&&e<11&&(r+="-");return ce++,r}function nt(e,t,r){t.split&&(t=t.split("."));for(var n=0,i=t.length,o=e,a,s;n<i&&(s=t[n++],!(s==="__proto__"||s==="constructor"||s==="prototype"));)o=o[s]=n===i?r:typeof(a=o[s])==typeof t?a:t[n]*0!==0||!!~(""+t[n]).indexOf(".")?{}:[]}const $s=Object.freeze(Object.defineProperty({__proto__:null,dset:nt},Symbol.toStringTag,{value:"Module"}));var ci=function(){function e(){var t=this;this._logs=[],this.log=function(r,n,i){var o=new Date;t._logs.push({level:r,message:n,time:o,extras:i})}}return Object.defineProperty(e.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),e.prototype.flush=function(){if(this.logs.length>1){var t=this._logs.reduce(function(r,n){var i,o,a,s=I(I({},n),{json:JSON.stringify(n.extras,null," "),extras:n.extras});delete s.time;var u=(a=(o=n.time)===null||o===void 0?void 0:o.toISOString())!==null&&a!==void 0?a:"";return r[u]&&(u="".concat(u,"-").concat(Math.random())),I(I({},r),(i={},i[u]=s,i))},{});console.table?console.table(t):console.log(t)}else this.logs.forEach(function(r){var n=r.level,i=r.message,o=r.extras;n==="info"||n==="debug"?console.log(i,o!=null?o:""):console[n](i,o!=null?o:"")});this._logs=[]},e}();const li=ci;var fi=function(e){var t={gauge:"g",counter:"c"};return t[e]},di=function(){function e(t){this.metrics=[],this.remoteMetrics=t}return e.prototype.increment=function(t,r,n){var i;r===void 0&&(r=1),this.metrics.push({metric:t,value:r,tags:n!=null?n:[],type:"counter",timestamp:Date.now()}),(i=this.remoteMetrics)===null||i===void 0||i.increment(t,n!=null?n:[])},e.prototype.gauge=function(t,r,n){this.metrics.push({metric:t,value:r,tags:n!=null?n:[],type:"gauge",timestamp:Date.now()})},e.prototype.flush=function(){var t=this.metrics.map(function(r){return I(I({},r),{tags:r.tags.join(",")})});console.table?console.table(t):console.log(t),this.metrics=[]},e.prototype.serialize=function(){return this.metrics.map(function(t){return{m:t.metric,v:t.value,t:t.tags,k:fi(t.type),e:t.timestamp}})},e}();const pi=di;function Me(e,t){return t=t||{},new Promise(function(r,n){var i=new XMLHttpRequest,o=[],a=[],s={},u=function(){return{ok:(i.status/100|0)==2,statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return a},get:function(h){return s[h.toLowerCase()]},has:function(h){return h.toLowerCase()in s}}}};for(var d in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(h,m,_){o.push(m=m.toLowerCase()),a.push([m,_]),s[m]=s[m]?s[m]+","+_:_}),r(u())},i.onerror=n,i.withCredentials=t.credentials=="include",t.headers)i.setRequestHeader(d,t.headers[d]);i.send(t.body||null)})}var xe="1.44.0";/*! js-cookie v3.0.1 | MIT */function Ze(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var hi={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Pt(e,t){function r(i,o,a){if(!(typeof document>"u")){a=Ze({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var u in a)!a[u]||(s+="; "+u,a[u]!==!0&&(s+="="+a[u].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+s}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],a={},s=0;s<o.length;s++){var u=o[s].split("="),d=u.slice(1).join("=");try{var h=decodeURIComponent(u[0]);if(a[h]=e.read(d,h),i===h)break}catch(m){}}return i?a[i]:a}}return Object.create({set:r,get:n,remove:function(i,o){r(i,"",Ze({},o,{expires:-1}))},withAttributes:function(i){return Pt(this.converter,Ze({},this.attributes,i))},withConverter:function(i){return Pt(Ze({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var q=Pt(hi,{path:"/"});function vi(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}function gi(e){var t=e.hostname,r=t.split("."),n=r[r.length-1],i=[];if(r.length===4&&parseInt(n,10)>0||r.length<=1)return i;for(var o=r.length-2;o>=0;--o)i.push(r.slice(o).join("."));return i}function mi(e){try{return new URL(e)}catch(t){return}}function Br(e){var t=mi(e);if(!!t)for(var r=gi(t),n=0;n<r.length;++n){var i="__tld__",o=r[n],a={domain:"."+o};try{if(q.set(i,"1",a),q.get(i))return q.remove(i,a),o}catch(s){return}}}var $e;function yi(){if($e)return $e;var e=Br(window.location.href);return $e={expires:31536e6,secure:!1,path:"/"},e&&($e.domain=e),$e}var _i="npm";function zr(){return _i}function bi(){var e=q.get("_ga");if(e&&e.startsWith("amp"))return e}function wi(e){return e.startsWith("?")&&(e=e.substring(1)),e=e.replace(/\?/g,"&"),e.split("&").reduce(function(t,r){var n=r.split("="),i=n[0],o=n[1],a=o===void 0?"":o;if(i.includes("utm_")&&i.length>4){var s=i.substr(4);s==="campaign"&&(s="name"),t[s]=vi(a)}return t},{})}function Ci(e){var t={btid:"dataxu",urid:"millennial-media"};e.startsWith("?")&&(e=e.substring(1)),e=e.replace(/\?/g,"&");for(var r=e.split("&"),n=0,i=r;n<i.length;n++){var o=i[n],a=o.split("="),s=a[0],u=a[1];if(t[s])return{id:u,type:t[s]}}}function xi(e,t,r){var n=q.get("s:context.referrer"),i=Ci(e);n=n?JSON.parse(n):void 0,i=i!=null?i:n,i&&(t&&(t.referrer=I(I({},t.referrer),i)),r||q.set("s:context.referrer",JSON.stringify(i),yi()))}function Ii(e,t,r,n){var i,o,a,s,u=e.user(),d=window.location.search;t.context=(o=(i=t.context)!==null&&i!==void 0?i:t.options)!==null&&o!==void 0?o:{};var h=t.context,m=t.anonymousId;delete t.options,t.writeKey=r==null?void 0:r.apiKey,h.userAgent=window.navigator.userAgent;var _=navigator.userLanguage||navigator.language;if(typeof h.locale>"u"&&typeof _<"u"&&(h.locale=_),!h.library){var y=zr();y==="web"?h.library={name:"analytics.js",version:"next-".concat(xe)}:h.library={name:"analytics.js",version:"npm:next-".concat(xe)}}d&&!h.campaign&&(h.campaign=wi(d)),xi(d,h,(a=e.options.disableClientPersistence)!==null&&a!==void 0?a:!1),t.userId=t.userId||u.id(),t.anonymousId=u.anonymousId(m),t.sentAt=new Date;var b=e.queue.failedInitializations||[];b.length>0&&(t._metadata={failedInitializations:b});var C=[],w=[];for(var v in n){var g=n[v];v==="Segment.io"&&C.push(v),g.bundlingStatus==="bundled"&&C.push(v),g.bundlingStatus==="unbundled"&&w.push(v)}for(var l=0,c=(r==null?void 0:r.unbundledIntegrations)||[];l<c.length;l++){var p=c[l];w.includes(p)||w.push(p)}var f=(s=r==null?void 0:r.maybeBundledConfigIds)!==null&&s!==void 0?s:{},A=[];C.sort().forEach(function(L){var k;((k=f[L])!==null&&k!==void 0?k:[]).forEach(function(H){A.push(H)})}),(r==null?void 0:r.addBundledMetadata)!==!1&&(t._metadata=I(I({},t._metadata),{bundled:C.sort(),unbundled:w.sort(),bundledIds:A}));var E=bi();return E&&(h.amp={id:E}),t}function mt(e){console.error("Error sending segment performance metrics",e)}var Si=function(){function e(t){var r=this,n,i,o,a;if(this.host=(n=t==null?void 0:t.host)!==null&&n!==void 0?n:"api.segment.io/v1",this.sampleRate=(i=t==null?void 0:t.sampleRate)!==null&&i!==void 0?i:1,this.flushTimer=(o=t==null?void 0:t.flushTimer)!==null&&o!==void 0?o:30*1e3,this.maxQueueSize=(a=t==null?void 0:t.maxQueueSize)!==null&&a!==void 0?a:20,this.queue=[],this.sampleRate>0){var s=!1,u=function(){s||(s=!0,r.flush().catch(mt),s=!1,setTimeout(u,r.flushTimer))};u()}}return e.prototype.increment=function(t,r){if(!!t.includes("analytics_js.")&&r.length!==0&&!(Math.random()>this.sampleRate)&&!(this.queue.length>=this.maxQueueSize)){var n=r.reduce(function(o,a){var s=a.split(":"),u=s[0],d=s[1];return o[u]=d,o},{});n.library="analytics.js";var i=zr();i==="web"?n.library_version="next-".concat(xe):n.library_version="npm:next-".concat(xe),this.queue.push({type:"Counter",metric:t,value:1,tags:n}),t.includes("error")&&this.flush().catch(mt)}},e.prototype.flush=function(){return S(this,void 0,void 0,function(){var t=this;return M(this,function(r){switch(r.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch(function(n){mt(n),t.sampleRate=0})];case 1:return r.sent(),[2]}})})},e.prototype.send=function(){return S(this,void 0,void 0,function(){var t,r,n;return M(this,function(i){return t={series:this.queue},this.queue=[],r={"Content-Type":"text/plain"},n="https://".concat(this.host,"/m"),[2,Me(n,{headers:r,body:JSON.stringify(t),method:"POST"})]})})},e}(),pe=function(){function e(t){var r,n,i;this.retry=(r=t.retry)!==null&&r!==void 0?r:!0,this.type=(n=t.type)!==null&&n!==void 0?n:"plugin Error",this.reason=(i=t.reason)!==null&&i!==void 0?i:""}return e}(),gr,X=function(){function e(t,r){this.logger=new li,this.cancel=function(n){throw n||new pe({reason:"Context Cancel"})},this._attempts=0,this._event=t,this._id=r!=null?r:zt(),this.stats=new pi(gr)}return e.initMetrics=function(t){gr=new Si(t)},e.system=function(){return new e({type:"track",event:"system"})},e.prototype.isSame=function(t){return t._id===this._id},e.prototype.log=function(t,r,n){this.logger.log(t,r,n)},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"event",{get:function(){return this._event},set:function(t){this._event=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attempts",{get:function(){return this._attempts},set:function(t){this._attempts=t},enumerable:!1,configurable:!0}),e.prototype.updateEvent=function(t,r){var n;if(t.split(".")[0]==="integrations"){var i=t.split(".")[1];if(((n=this._event.integrations)===null||n===void 0?void 0:n[i])===!1)return this._event}return nt(this._event,t,r),this._event},e.prototype.failedDelivery=function(){return this._failedDelivery},e.prototype.setFailedDelivery=function(t){this._failedDelivery=t},e.prototype.logs=function(){return this.logger.logs},e.prototype.flush=function(){this.logger.flush(),this.stats.flush()},e.prototype.toJSON=function(){return{id:this._id,event:this._event,logs:this.logger.logs,metrics:this.stats.metrics}},e}(),Ut=function(){function e(){this.callbacks={}}return e.prototype.on=function(t,r){return this.callbacks[t]?this.callbacks[t].push(r):this.callbacks[t]=[r],this},e.prototype.once=function(t,r){var n=this,i=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];n.off(t,i),r.apply(n,o)};return this.on(t,i),this},e.prototype.off=function(t,r){var n,i=(n=this.callbacks[t])!==null&&n!==void 0?n:[],o=i.filter(function(a){return a!==r});return this.callbacks[t]=o,this},e.prototype.emit=function(t){for(var r=this,n,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];var a=(n=this.callbacks[t])!==null&&n!==void 0?n:[];return a.forEach(function(s){s.apply(r,i)}),this},e}(),se={},ne={},qt={},Ue={exports:{}};(function(e){e.exports=t(r),e.exports.find=e.exports,e.exports.replace=function(s,u,d,h){return t(i).call(this,s,u,d,h),s},e.exports.del=function(s,u,d){return t(n).call(this,s,u,null,d),s};function t(s){return function(u,d,h,m){var _=m&&a(m.normalizer)?m.normalizer:o;d=_(d);for(var y,b=!1;!b;)C();function C(){for(y in u){var w=_(y);if(d.indexOf(w)===0){var v=d.substr(w.length);if(v.charAt(0)==="."||v.length===0){d=v.substr(1);var g=u[y];if(g==null){b=!0;return}if(!d.length){b=!0;return}u=g;return}}}y=void 0,b=!0}if(!!y)return u==null?u:s(u,y,h)}}function r(s,u){if(s.hasOwnProperty(u))return s[u]}function n(s,u){return s.hasOwnProperty(u)&&delete s[u],s}function i(s,u,d){return s.hasOwnProperty(u)&&(s[u]=d),s}function o(s){return s.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}function a(s){return typeof s=="function"}})(Ue);var Mi=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qt,"__esModule",{value:!0});var ae=Mi(Ue.exports);function ye(e,t){return function(){var r=this.traits(),n=this.properties?this.properties():{};return ae.default(r,"address."+e)||ae.default(r,e)||(t?ae.default(r,"address."+t):null)||(t?ae.default(r,t):null)||ae.default(n,"address."+e)||ae.default(n,e)||(t?ae.default(n,"address."+t):null)||(t?ae.default(n,t):null)}}function Pi(e){e.zip=ye("postalCode","zip"),e.country=ye("country"),e.street=ye("street"),e.state=ye("state"),e.city=ye("city"),e.region=ye("region")}qt.default=Pi;var st={};Object.defineProperty(st,"__esModule",{value:!0});st.clone=void 0;function At(e){if(Object.prototype.toString.call(e)==="[object Object]"){var t={};for(var r in e)t[r]=At(e[r]);return t}else return Array.isArray(e)?e.map(At):e}st.clone=At;var Vt={};Object.defineProperty(Vt,"__esModule",{value:!0});var Ai={Salesforce:!0};function Oi(e){return!Ai[e]}Vt.default=Oi;var ut={},Ur=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;ut.parse=function(e){var t=[1,5,6,7,11,12],r=Ur.exec(e),n=0;if(!r)return new Date(e);for(var i=0,o;o=t[i];i++)r[o]=parseInt(r[o],10)||0;r[2]=parseInt(r[2],10)||1,r[3]=parseInt(r[3],10)||1,r[2]--,r[8]=r[8]?(r[8]+"00").substring(0,3):0,r[4]===" "?n=new Date().getTimezoneOffset():r[9]!=="Z"&&r[10]&&(n=r[11]*60+r[12],r[10]==="+"&&(n=0-n));var a=Date.UTC(r[1],r[2],r[3],r[5],r[6]+n,r[7],r[8]);return new Date(a)};ut.is=function(e,t){return typeof e!="string"||t&&/^\d{4}-\d{2}-\d{2}/.test(e)===!1?!1:Ur.test(e)};var Kt={},Ei=/\d{13}/;Kt.is=function(e){return Ei.test(e)};Kt.parse=function(e){return e=parseInt(e,10),new Date(e)};var Gt={},Li=/\d{10}/;Gt.is=function(e){return Li.test(e)};Gt.parse=function(e){var t=parseInt(e,10)*1e3;return new Date(t)};var mr=ut,yr=Kt,_r=Gt,$i=Object.prototype,qr=$i.toString;function Ti(e){return qr.call(e)==="[object Date]"}function Di(e){return qr.call(e)==="[object Number]"}var Wt=function(t){return Ti(t)?t:Di(t)?new Date(Fi(t)):mr.is(t)?mr.parse(t):yr.is(t)?yr.parse(t):_r.is(t)?_r.parse(t):new Date(t)};function Fi(e){return e<315576e5?e*1e3:e}var br=ut,ji=Jt;function Jt(e,t){return t===void 0&&(t=!0),e&&typeof e=="object"?ki(e,t):Array.isArray(e)?Ri(e,t):br.is(e,t)?br.parse(e):e}function ki(e,t){return Object.keys(e).forEach(function(r){e[r]=Jt(e[r],t)}),e}function Ri(e,t){return e.forEach(function(r,n){e[n]=Jt(r,t)}),e}var qe=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ne,"__esModule",{value:!0});ne.Facade=void 0;var Ni=qe(qt),Ie=st,Bi=qe(Vt),zi=qe(Wt),Ot=qe(Ue.exports),Ui=qe(ji);function V(e,t){t=t||{},this.raw=Ie.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=Ie.clone(e)),"traverse"in t||(t.traverse=!0),"timestamp"in e?e.timestamp=zi.default(e.timestamp):e.timestamp=new Date,t.traverse&&Ui.default(e),this.opts=t,this.obj=e}ne.Facade=V;var F=V.prototype;F.proxy=function(e){var t=e.split(".");e=t.shift();var r=this[e]||this.field(e);return r&&(typeof r=="function"&&(r=r.call(this)||{}),t.length===0?this.opts.clone?Et(r):r:(r=Ot.default(r,t.join(".")),this.opts.clone?Et(r):r))};F.field=function(e){var t=this.obj[e];return this.opts.clone?Et(t):t};V.proxy=function(e){return function(){return this.proxy(e)}};V.field=function(e){return function(){return this.field(e)}};V.multi=function(e){return function(){var t=this.proxy(e+"s");if(Array.isArray(t))return t;var r=this.proxy(e);return r&&(r=[this.opts.clone?Ie.clone(r):r]),r||[]}};V.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var r=this.proxy(e+"s");if(Array.isArray(r))return r[0]}};F.json=function(){var e=this.opts.clone?Ie.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e};F.rawEvent=function(){return this.raw};F.options=function(e){var t=this.obj.options||this.obj.context||{},r=this.opts.clone?Ie.clone(t):t;if(!e)return r;if(!!this.enabled(e)){var n=this.integrations(),i=n[e]||Ot.default(n,e);return typeof i!="object"&&(i=Ot.default(this.options(),e)),typeof i=="object"?i:{}}};F.context=F.options;F.enabled=function(e){var t=this.proxy("options.providers.all");typeof t!="boolean"&&(t=this.proxy("options.all")),typeof t!="boolean"&&(t=this.proxy("integrations.all")),typeof t!="boolean"&&(t=!0);var r=t&&Bi.default(e),n=this.integrations();if(n.providers&&n.providers.hasOwnProperty(e)&&(r=n.providers[e]),n.hasOwnProperty(e)){var i=n[e];typeof i=="boolean"?r=i:r=!0}return!!r};F.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()};F.active=function(){var e=this.proxy("options.active");return e==null&&(e=!0),e};F.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")};F.sessionId=F.anonymousId;F.groupId=V.proxy("options.groupId");F.traits=function(e){var t=this.proxy("options.traits")||{},r=this.userId();e=e||{},r&&(t.id=r);for(var n in e){var i=this[n]==null?this.proxy("options.traits."+n):this[n]();i!=null&&(t[e[n]]=i,delete t[n])}return t};F.library=function(){var e=this.proxy("options.library");return e?typeof e=="string"?{name:e,version:null}:e:{name:"unknown",version:null}};F.device=function(){var e=this.proxy("context.device");(typeof e!="object"||e===null)&&(e={});var t=this.library().name;return e.type||(t.indexOf("ios")>-1&&(e.type="ios"),t.indexOf("android")>-1&&(e.type="android")),e};F.userAgent=V.proxy("context.userAgent");F.timezone=V.proxy("context.timezone");F.timestamp=V.field("timestamp");F.channel=V.field("channel");F.ip=V.proxy("context.ip");F.userId=V.field("userId");Ni.default(F);function Et(e){return Ie.clone(e)}var ct={},oe={exports:{}};typeof Object.create=="function"?oe.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:oe.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}};var qi=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ct,"__esModule",{value:!0});ct.Alias=void 0;var Vi=qi(oe.exports),Vr=ne;function W(e,t){Vr.Facade.call(this,e,t)}ct.Alias=W;Vi.default(W,Vr.Facade);W.prototype.action=function(){return"alias"};W.prototype.type=W.prototype.action;W.prototype.previousId=function(){return this.field("previousId")||this.field("from")};W.prototype.from=W.prototype.previousId;W.prototype.userId=function(){return this.field("userId")||this.field("to")};W.prototype.to=W.prototype.userId;var lt={},Pe={};Object.defineProperty(Pe,"__esModule",{value:!0});var Ki=/.+\@.+\..+/;function Gi(e){return Ki.test(e)}Pe.default=Gi;var Zt=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lt,"__esModule",{value:!0});lt.Group=void 0;var Wi=Zt(oe.exports),Ji=Zt(Pe),Zi=Zt(Wt),Ae=ne;function Ht(e,t){Ae.Facade.call(this,e,t)}lt.Group=Ht;Wi.default(Ht,Ae.Facade);var J=Ht.prototype;J.action=function(){return"group"};J.type=J.action;J.groupId=Ae.Facade.field("groupId");J.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return Zi.default(e)};J.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();if(Ji.default(t))return t};J.traits=function(e){var t=this.properties(),r=this.groupId();e=e||{},r&&(t.id=r);for(var n in e){var i=this[n]==null?this.proxy("traits."+n):this[n]();i!=null&&(t[e[n]]=i,delete t[n])}return t};J.name=Ae.Facade.proxy("traits.name");J.industry=Ae.Facade.proxy("traits.industry");J.employees=Ae.Facade.proxy("traits.employees");J.properties=function(){return this.field("traits")||this.field("properties")||{}};var Ve={},ft=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.Identify=void 0;var ie=ne,Ce=ft(Ue.exports),Hi=ft(oe.exports),Qi=ft(Pe),Kr=ft(Wt),le=function(e){return e.trim()};function Qt(e,t){ie.Facade.call(this,e,t)}Ve.Identify=Qt;Hi.default(Qt,ie.Facade);var j=Qt.prototype;j.action=function(){return"identify"};j.type=j.action;j.traits=function(e){var t=this.field("traits")||{},r=this.userId();e=e||{},r&&(t.id=r);for(var n in e){var i=this[n]==null?this.proxy("traits."+n):this[n]();i!=null&&(t[e[n]]=i,n!==e[n]&&delete t[n])}return t};j.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();if(Qi.default(t))return t};j.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return Kr.default(e)};j.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return Kr.default(e)};j.companyName=function(){return this.proxy("traits.company.name")};j.name=function(){var e=this.proxy("traits.name");if(typeof e=="string")return le(e);var t=this.firstName(),r=this.lastName();if(t&&r)return le(t+" "+r)};j.firstName=function(){var e=this.proxy("traits.firstName");if(typeof e=="string")return le(e);var t=this.proxy("traits.name");if(typeof t=="string")return le(t).split(" ")[0]};j.lastName=function(){var e=this.proxy("traits.lastName");if(typeof e=="string")return le(e);var t=this.proxy("traits.name");if(typeof t=="string"){var r=le(t).indexOf(" ");if(r!==-1)return le(t.substr(r+1))}};j.uid=function(){return this.userId()||this.username()||this.email()};j.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")};j.age=function(){var e=this.birthday(),t=Ce.default(this.traits(),"age");if(t!=null)return t;if(e instanceof Date){var r=new Date;return r.getFullYear()-e.getFullYear()}};j.avatar=function(){var e=this.traits();return Ce.default(e,"avatar")||Ce.default(e,"photoUrl")||Ce.default(e,"avatarUrl")};j.position=function(){var e=this.traits();return Ce.default(e,"position")||Ce.default(e,"jobTitle")};j.username=ie.Facade.proxy("traits.username");j.website=ie.Facade.one("traits.website");j.websites=ie.Facade.multi("traits.website");j.phone=ie.Facade.one("traits.phone");j.phones=ie.Facade.multi("traits.phone");j.address=ie.Facade.proxy("traits.address");j.gender=ie.Facade.proxy("traits.gender");j.birthday=ie.Facade.proxy("traits.birthday");var Oe={},Yt=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.Track=void 0;var Yi=Yt(oe.exports),R=ne,Xi=Ve,eo=Yt(Pe),Gr=Yt(Ue.exports);function Xt(e,t){R.Facade.call(this,e,t)}Oe.Track=Xt;Yi.default(Xt,R.Facade);var O=Xt.prototype;O.action=function(){return"track"};O.type=O.action;O.event=R.Facade.field("event");O.value=R.Facade.proxy("properties.value");O.category=R.Facade.proxy("properties.category");O.id=R.Facade.proxy("properties.id");O.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")};O.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")};O.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")};O.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")};O.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")};O.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")};O.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")};O.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")};O.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")};O.sku=R.Facade.proxy("properties.sku");O.tax=R.Facade.proxy("properties.tax");O.name=R.Facade.proxy("properties.name");O.price=R.Facade.proxy("properties.price");O.total=R.Facade.proxy("properties.total");O.repeat=R.Facade.proxy("properties.repeat");O.coupon=R.Facade.proxy("properties.coupon");O.shipping=R.Facade.proxy("properties.shipping");O.discount=R.Facade.proxy("properties.discount");O.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")};O.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")};O.description=R.Facade.proxy("properties.description");O.plan=R.Facade.proxy("properties.plan");O.subtotal=function(){var e=Gr.default(this.properties(),"subtotal"),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var r=this.tax();r&&(t-=r),r=this.shipping(),r&&(t-=r),r=this.discount(),r&&(t+=r)}return t};O.products=function(){var e=this.properties(),t=Gr.default(e,"products");return Array.isArray(t)?t.filter(function(r){return r!==null}):[]};O.quantity=function(){var e=this.obj.properties||{};return e.quantity||1};O.currency=function(){var e=this.obj.properties||{};return e.currency||"USD"};O.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")};O.query=R.Facade.proxy("options.query");O.properties=function(e){var t=this.field("properties")||{};e=e||{};for(var r in e){var n=this[r]==null?this.proxy("properties."+r):this[r]();n!=null&&(t[e[r]]=n,delete t[r])}return t};O.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()};O.email=function(){var e=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(e)return e;var t=this.userId();if(eo.default(t))return t};O.revenue=function(){var e=this.proxy("properties.revenue"),t=this.event(),r=/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i;return!e&&t&&t.match(r)&&(e=this.proxy("properties.total")),to(e)};O.cents=function(){var e=this.revenue();return typeof e!="number"?this.value()||0:e*100};O.identify=function(){var e=this.json();return e.traits=this.traits(),new Xi.Identify(e,this.opts)};function to(e){if(!!e){if(typeof e=="number")return e;if(typeof e=="string"&&(e=e.replace(/\$/g,""),e=parseFloat(e),!isNaN(e)))return e}}var Ke={},Wr=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.Page=void 0;var ro=Wr(oe.exports),ve=ne,no=Oe,io=Wr(Pe);function er(e,t){ve.Facade.call(this,e,t)}Ke.Page=er;ro.default(er,ve.Facade);var U=er.prototype;U.action=function(){return"page"};U.type=U.action;U.category=ve.Facade.field("category");U.name=ve.Facade.field("name");U.title=ve.Facade.proxy("properties.title");U.path=ve.Facade.proxy("properties.path");U.url=ve.Facade.proxy("properties.url");U.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")};U.properties=function(e){var t=this.field("properties")||{},r=this.category(),n=this.name();e=e||{},r&&(t.category=r),n&&(t.name=n);for(var i in e){var o=this[i]==null?this.proxy("properties."+i):this[i]();o!=null&&(t[e[i]]=o,i!==e[i]&&delete t[i])}return t};U.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();if(io.default(t))return t};U.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t};U.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"};U.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new no.Track(t,this.opts)};var dt={},oo=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dt,"__esModule",{value:!0});dt.Screen=void 0;var ao=oo(oe.exports),Jr=Ke,so=Oe;function he(e,t){Jr.Page.call(this,e,t)}dt.Screen=he;ao.default(he,Jr.Page);he.prototype.action=function(){return"screen"};he.prototype.type=he.prototype.action;he.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"};he.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new so.Track(t,this.opts)};var pt={},uo=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pt,"__esModule",{value:!0});pt.Delete=void 0;var co=uo(oe.exports),Zr=ne;function tr(e,t){Zr.Facade.call(this,e,t)}pt.Delete=tr;co.default(tr,Zr.Facade);tr.prototype.type=function(){return"delete"};(function(e){var t=D&&D.__assign||function(){return t=Object.assign||function(h){for(var m,_=1,y=arguments.length;_<y;_++){m=arguments[_];for(var b in m)Object.prototype.hasOwnProperty.call(m,b)&&(h[b]=m[b])}return h},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=e.Screen=e.Page=e.Track=e.Identify=e.Group=e.Alias=e.Facade=void 0;var r=ne;Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return r.Facade}});var n=ct;Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return n.Alias}});var i=lt;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return i.Group}});var o=Ve;Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}});var a=Oe;Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return a.Track}});var s=Ke;Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return s.Page}});var u=dt;Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return u.Screen}});var d=pt;Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return d.Delete}}),e.default=t(t({},r.Facade),{Alias:n.Alias,Group:i.Group,Identify:o.Identify,Track:a.Track,Page:s.Page,Screen:u.Screen,Delete:d.Delete})})(se);var Hr={exports:{}};(function(e,t){(function(r){e.exports=r()})(function(r){var n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function i(v,g){var l=v[0],c=v[1],p=v[2],f=v[3];l+=(c&p|~c&f)+g[0]-680876936|0,l=(l<<7|l>>>25)+c|0,f+=(l&c|~l&p)+g[1]-389564586|0,f=(f<<12|f>>>20)+l|0,p+=(f&l|~f&c)+g[2]+606105819|0,p=(p<<17|p>>>15)+f|0,c+=(p&f|~p&l)+g[3]-1044525330|0,c=(c<<22|c>>>10)+p|0,l+=(c&p|~c&f)+g[4]-176418897|0,l=(l<<7|l>>>25)+c|0,f+=(l&c|~l&p)+g[5]+1200080426|0,f=(f<<12|f>>>20)+l|0,p+=(f&l|~f&c)+g[6]-1473231341|0,p=(p<<17|p>>>15)+f|0,c+=(p&f|~p&l)+g[7]-45705983|0,c=(c<<22|c>>>10)+p|0,l+=(c&p|~c&f)+g[8]+1770035416|0,l=(l<<7|l>>>25)+c|0,f+=(l&c|~l&p)+g[9]-1958414417|0,f=(f<<12|f>>>20)+l|0,p+=(f&l|~f&c)+g[10]-42063|0,p=(p<<17|p>>>15)+f|0,c+=(p&f|~p&l)+g[11]-1990404162|0,c=(c<<22|c>>>10)+p|0,l+=(c&p|~c&f)+g[12]+1804603682|0,l=(l<<7|l>>>25)+c|0,f+=(l&c|~l&p)+g[13]-40341101|0,f=(f<<12|f>>>20)+l|0,p+=(f&l|~f&c)+g[14]-1502002290|0,p=(p<<17|p>>>15)+f|0,c+=(p&f|~p&l)+g[15]+1236535329|0,c=(c<<22|c>>>10)+p|0,l+=(c&f|p&~f)+g[1]-165796510|0,l=(l<<5|l>>>27)+c|0,f+=(l&p|c&~p)+g[6]-1069501632|0,f=(f<<9|f>>>23)+l|0,p+=(f&c|l&~c)+g[11]+643717713|0,p=(p<<14|p>>>18)+f|0,c+=(p&l|f&~l)+g[0]-373897302|0,c=(c<<20|c>>>12)+p|0,l+=(c&f|p&~f)+g[5]-701558691|0,l=(l<<5|l>>>27)+c|0,f+=(l&p|c&~p)+g[10]+38016083|0,f=(f<<9|f>>>23)+l|0,p+=(f&c|l&~c)+g[15]-660478335|0,p=(p<<14|p>>>18)+f|0,c+=(p&l|f&~l)+g[4]-405537848|0,c=(c<<20|c>>>12)+p|0,l+=(c&f|p&~f)+g[9]+568446438|0,l=(l<<5|l>>>27)+c|0,f+=(l&p|c&~p)+g[14]-1019803690|0,f=(f<<9|f>>>23)+l|0,p+=(f&c|l&~c)+g[3]-187363961|0,p=(p<<14|p>>>18)+f|0,c+=(p&l|f&~l)+g[8]+1163531501|0,c=(c<<20|c>>>12)+p|0,l+=(c&f|p&~f)+g[13]-1444681467|0,l=(l<<5|l>>>27)+c|0,f+=(l&p|c&~p)+g[2]-51403784|0,f=(f<<9|f>>>23)+l|0,p+=(f&c|l&~c)+g[7]+1735328473|0,p=(p<<14|p>>>18)+f|0,c+=(p&l|f&~l)+g[12]-1926607734|0,c=(c<<20|c>>>12)+p|0,l+=(c^p^f)+g[5]-378558|0,l=(l<<4|l>>>28)+c|0,f+=(l^c^p)+g[8]-2022574463|0,f=(f<<11|f>>>21)+l|0,p+=(f^l^c)+g[11]+1839030562|0,p=(p<<16|p>>>16)+f|0,c+=(p^f^l)+g[14]-35309556|0,c=(c<<23|c>>>9)+p|0,l+=(c^p^f)+g[1]-1530992060|0,l=(l<<4|l>>>28)+c|0,f+=(l^c^p)+g[4]+1272893353|0,f=(f<<11|f>>>21)+l|0,p+=(f^l^c)+g[7]-155497632|0,p=(p<<16|p>>>16)+f|0,c+=(p^f^l)+g[10]-1094730640|0,c=(c<<23|c>>>9)+p|0,l+=(c^p^f)+g[13]+681279174|0,l=(l<<4|l>>>28)+c|0,f+=(l^c^p)+g[0]-358537222|0,f=(f<<11|f>>>21)+l|0,p+=(f^l^c)+g[3]-722521979|0,p=(p<<16|p>>>16)+f|0,c+=(p^f^l)+g[6]+76029189|0,c=(c<<23|c>>>9)+p|0,l+=(c^p^f)+g[9]-640364487|0,l=(l<<4|l>>>28)+c|0,f+=(l^c^p)+g[12]-421815835|0,f=(f<<11|f>>>21)+l|0,p+=(f^l^c)+g[15]+530742520|0,p=(p<<16|p>>>16)+f|0,c+=(p^f^l)+g[2]-995338651|0,c=(c<<23|c>>>9)+p|0,l+=(p^(c|~f))+g[0]-198630844|0,l=(l<<6|l>>>26)+c|0,f+=(c^(l|~p))+g[7]+1126891415|0,f=(f<<10|f>>>22)+l|0,p+=(l^(f|~c))+g[14]-1416354905|0,p=(p<<15|p>>>17)+f|0,c+=(f^(p|~l))+g[5]-57434055|0,c=(c<<21|c>>>11)+p|0,l+=(p^(c|~f))+g[12]+1700485571|0,l=(l<<6|l>>>26)+c|0,f+=(c^(l|~p))+g[3]-1894986606|0,f=(f<<10|f>>>22)+l|0,p+=(l^(f|~c))+g[10]-1051523|0,p=(p<<15|p>>>17)+f|0,c+=(f^(p|~l))+g[1]-2054922799|0,c=(c<<21|c>>>11)+p|0,l+=(p^(c|~f))+g[8]+1873313359|0,l=(l<<6|l>>>26)+c|0,f+=(c^(l|~p))+g[15]-30611744|0,f=(f<<10|f>>>22)+l|0,p+=(l^(f|~c))+g[6]-1560198380|0,p=(p<<15|p>>>17)+f|0,c+=(f^(p|~l))+g[13]+1309151649|0,c=(c<<21|c>>>11)+p|0,l+=(p^(c|~f))+g[4]-145523070|0,l=(l<<6|l>>>26)+c|0,f+=(c^(l|~p))+g[11]-1120210379|0,f=(f<<10|f>>>22)+l|0,p+=(l^(f|~c))+g[2]+718787259|0,p=(p<<15|p>>>17)+f|0,c+=(f^(p|~l))+g[9]-343485551|0,c=(c<<21|c>>>11)+p|0,v[0]=l+v[0]|0,v[1]=c+v[1]|0,v[2]=p+v[2]|0,v[3]=f+v[3]|0}function o(v){var g=[],l;for(l=0;l<64;l+=4)g[l>>2]=v.charCodeAt(l)+(v.charCodeAt(l+1)<<8)+(v.charCodeAt(l+2)<<16)+(v.charCodeAt(l+3)<<24);return g}function a(v){var g=[],l;for(l=0;l<64;l+=4)g[l>>2]=v[l]+(v[l+1]<<8)+(v[l+2]<<16)+(v[l+3]<<24);return g}function s(v){var g=v.length,l=[1732584193,-271733879,-1732584194,271733878],c,p,f,A,E,L;for(c=64;c<=g;c+=64)i(l,o(v.substring(c-64,c)));for(v=v.substring(c-64),p=v.length,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c=0;c<p;c+=1)f[c>>2]|=v.charCodeAt(c)<<(c%4<<3);if(f[c>>2]|=128<<(c%4<<3),c>55)for(i(l,f),c=0;c<16;c+=1)f[c]=0;return A=g*8,A=A.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(A[2],16),L=parseInt(A[1],16)||0,f[14]=E,f[15]=L,i(l,f),l}function u(v){var g=v.length,l=[1732584193,-271733879,-1732584194,271733878],c,p,f,A,E,L;for(c=64;c<=g;c+=64)i(l,a(v.subarray(c-64,c)));for(v=c-64<g?v.subarray(c-64):new Uint8Array(0),p=v.length,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c=0;c<p;c+=1)f[c>>2]|=v[c]<<(c%4<<3);if(f[c>>2]|=128<<(c%4<<3),c>55)for(i(l,f),c=0;c<16;c+=1)f[c]=0;return A=g*8,A=A.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(A[2],16),L=parseInt(A[1],16)||0,f[14]=E,f[15]=L,i(l,f),l}function d(v){var g="",l;for(l=0;l<4;l+=1)g+=n[v>>l*8+4&15]+n[v>>l*8&15];return g}function h(v){var g;for(g=0;g<v.length;g+=1)v[g]=d(v[g]);return v.join("")}h(s("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function v(g,l){return g=g|0||0,g<0?Math.max(g+l,0):Math.min(g,l)}ArrayBuffer.prototype.slice=function(g,l){var c=this.byteLength,p=v(g,c),f=c,A,E,L,k;return l!==r&&(f=v(l,c)),p>f?new ArrayBuffer(0):(A=f-p,E=new ArrayBuffer(A),L=new Uint8Array(E),k=new Uint8Array(this,p,A),L.set(k),E)}}();function m(v){return/[\u0080-\uFFFF]/.test(v)&&(v=unescape(encodeURIComponent(v))),v}function _(v,g){var l=v.length,c=new ArrayBuffer(l),p=new Uint8Array(c),f;for(f=0;f<l;f+=1)p[f]=v.charCodeAt(f);return g?p:c}function y(v){return String.fromCharCode.apply(null,new Uint8Array(v))}function b(v,g,l){var c=new Uint8Array(v.byteLength+g.byteLength);return c.set(new Uint8Array(v)),c.set(new Uint8Array(g),v.byteLength),l?c:c.buffer}function C(v){var g=[],l=v.length,c;for(c=0;c<l-1;c+=2)g.push(parseInt(v.substr(c,2),16));return String.fromCharCode.apply(String,g)}function w(){this.reset()}return w.prototype.append=function(v){return this.appendBinary(m(v)),this},w.prototype.appendBinary=function(v){this._buff+=v,this._length+=v.length;var g=this._buff.length,l;for(l=64;l<=g;l+=64)i(this._hash,o(this._buff.substring(l-64,l)));return this._buff=this._buff.substring(l-64),this},w.prototype.end=function(v){var g=this._buff,l=g.length,c,p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f;for(c=0;c<l;c+=1)p[c>>2]|=g.charCodeAt(c)<<(c%4<<3);return this._finish(p,l),f=h(this._hash),v&&(f=C(f)),this.reset(),f},w.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},w.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},w.prototype.setState=function(v){return this._buff=v.buff,this._length=v.length,this._hash=v.hash,this},w.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},w.prototype._finish=function(v,g){var l=g,c,p,f;if(v[l>>2]|=128<<(l%4<<3),l>55)for(i(this._hash,v),l=0;l<16;l+=1)v[l]=0;c=this._length*8,c=c.toString(16).match(/(.*?)(.{0,8})$/),p=parseInt(c[2],16),f=parseInt(c[1],16)||0,v[14]=p,v[15]=f,i(this._hash,v)},w.hash=function(v,g){return w.hashBinary(m(v),g)},w.hashBinary=function(v,g){var l=s(v),c=h(l);return g?C(c):c},w.ArrayBuffer=function(){this.reset()},w.ArrayBuffer.prototype.append=function(v){var g=b(this._buff.buffer,v,!0),l=g.length,c;for(this._length+=v.byteLength,c=64;c<=l;c+=64)i(this._hash,a(g.subarray(c-64,c)));return this._buff=c-64<l?new Uint8Array(g.buffer.slice(c-64)):new Uint8Array(0),this},w.ArrayBuffer.prototype.end=function(v){var g=this._buff,l=g.length,c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],p,f;for(p=0;p<l;p+=1)c[p>>2]|=g[p]<<(p%4<<3);return this._finish(c,l),f=h(this._hash),v&&(f=C(f)),this.reset(),f},w.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},w.ArrayBuffer.prototype.getState=function(){var v=w.prototype.getState.call(this);return v.buff=y(v.buff),v},w.ArrayBuffer.prototype.setState=function(v){return v.buff=_(v.buff,!0),w.prototype.setState.call(this,v)},w.ArrayBuffer.prototype.destroy=w.prototype.destroy,w.ArrayBuffer.prototype._finish=w.prototype._finish,w.ArrayBuffer.hash=function(v,g){var l=u(new Uint8Array(v)),c=h(l);return g?C(c):c},w})})(Hr);const lo=Hr.exports;var fo=function(){function e(t){this.user=t}return e.prototype.track=function(t,r,n,i){return this.normalize(I(I({},this.baseEvent()),{event:t,type:"track",properties:r,options:I({},n),integrations:I({},i)}))},e.prototype.page=function(t,r,n,i,o){var a,s={type:"page",properties:I({},n),options:I({},i),integrations:I({},o)};return t!==null&&(s.category=t,s.properties=(a=s.properties)!==null&&a!==void 0?a:{},s.properties.category=t),r!==null&&(s.name=r),this.normalize(I(I({},this.baseEvent()),s))},e.prototype.screen=function(t,r,n,i,o){var a={type:"screen",properties:I({},n),options:I({},i),integrations:I({},o)};return t!==null&&(a.category=t),r!==null&&(a.name=r),this.normalize(I(I({},this.baseEvent()),a))},e.prototype.identify=function(t,r,n,i){return this.normalize(I(I({},this.baseEvent()),{type:"identify",userId:t,traits:r,options:I({},n),integrations:I({},i)}))},e.prototype.group=function(t,r,n,i){return this.normalize(I(I({},this.baseEvent()),{type:"group",traits:r,options:I({},n),integrations:I({},i),groupId:t}))},e.prototype.alias=function(t,r,n,i){var o={userId:t,type:"alias",options:I({},n),integrations:I({},i)};return r!==null&&(o.previousId=r),t===void 0?this.normalize(I(I({},o),this.baseEvent())):this.normalize(I(I({},this.baseEvent()),o))},e.prototype.baseEvent=function(){var t={integrations:{},options:{}},r=this.user;return r.id()&&(t.userId=r.id()),r.anonymousId()&&(t.anonymousId=r.anonymousId()),t},e.prototype.context=function(t){var r,n,i,o=["integrations","anonymousId","timestamp","userId"],a=(r=t.options)!==null&&r!==void 0?r:{};delete a.integrations;var s=Object.keys(a),u=(i=(n=t.options)===null||n===void 0?void 0:n.context)!==null&&i!==void 0?i:{},d={};return s.forEach(function(h){h!=="context"&&(o.includes(h)?nt(d,h,a[h]):nt(u,h,a[h]))}),[u,d]},e.prototype.normalize=function(t){var r,n,i=Object.keys((r=t.integrations)!==null&&r!==void 0?r:{}).reduce(function(y,b){var C,w;return I(I({},y),(C={},C[b]=Boolean((w=t.integrations)===null||w===void 0?void 0:w[b]),C))},{}),o=I(I({},i),(n=t.options)===null||n===void 0?void 0:n.integrations),a=this.context(t),s=a[0],u=a[1];t.options;var d=Hn(t,["options"]),h=I(I(I({timestamp:new Date},d),{context:s,integrations:o}),u),m="ajs-next-"+lo.hash(JSON.stringify(h)+zt()),_=I(I({},h),{messageId:m});return _},e}();function po(e,t){var r={};return e.forEach(function(n){var i,o=void 0;if(typeof t=="string"){var a=n[t];o=typeof a!="string"?JSON.stringify(a):a}else t instanceof Function&&(o=t(n));o!==void 0&&(r[o]=N(N([],(i=r[o])!==null&&i!==void 0?i:[],!0),[n],!1))}),r}function ho(e){var t=Math.random()+1,r=e.minTimeout,n=r===void 0?500:r,i=e.factor,o=i===void 0?2:i,a=e.attempt,s=e.maxTimeout,u=s===void 0?1/0:s;return Math.min(t*n*Math.pow(o,a),u)}var Qr="onRemoveFromFuture",rr=function(e){te(t,e);function t(r,n,i){var o=e.call(this)||this;return o.future=[],o.maxAttempts=r,o.queue=n,o.seen=i!=null?i:{},o}return t.prototype.push=function(){for(var r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=n.map(function(a){var s=r.updateAttempts(a);return s>r.maxAttempts||r.includes(a)?!1:(r.queue.push(a),!0)});return this.queue=this.queue.sort(function(a,s){return r.getAttempts(a)-r.getAttempts(s)}),o},t.prototype.pushWithBackoff=function(r){var n=this;if(this.getAttempts(r)===0)return this.push(r)[0];var i=this.updateAttempts(r);if(i>this.maxAttempts||this.includes(r))return!1;var o=ho({attempt:i-1});return setTimeout(function(){n.queue.push(r),n.future=n.future.filter(function(a){return a.id!==r.id}),n.emit(Qr)},o),this.future.push(r),!0},t.prototype.getAttempts=function(r){var n;return(n=this.seen[r.id])!==null&&n!==void 0?n:0},t.prototype.updateAttempts=function(r){return this.seen[r.id]=this.getAttempts(r)+1,this.getAttempts(r)},t.prototype.includes=function(r){return this.queue.includes(r)||this.future.includes(r)||Boolean(this.queue.find(function(n){return n.id===r.id}))||Boolean(this.future.find(function(n){return n.id===r.id}))},t.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(t.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),t}(Ut),ee={getItem:function(){},setItem:function(){},removeItem:function(){}};try{ee=Bt()&&window.localStorage?window.localStorage:ee}catch(e){console.warn("Unable to access localStorage",e)}function Yr(e){var t=ee.getItem(e);return(t?JSON.parse(t):[]).map(function(r){return new X(r.event,r.id)})}function vo(e,t){var r=Yr(e),n=N(N([],t,!0),r,!0),i=n.reduce(function(o,a){var s;return I(I({},o),(s={},s[a.id]=a,s))},{});ee.setItem(e,JSON.stringify(Object.values(i)))}function Xr(e){var t=ee.getItem(e);return t?JSON.parse(t):{}}function go(e,t){var r=Xr(e);ee.setItem(e,JSON.stringify(I(I({},r),t)))}function wr(e){ee.removeItem(e)}var mo=function(){return new Date().getTime()};function Lt(e,t,r){r===void 0&&(r=0);var n=50,i="persisted-queue:v1:".concat(e,":lock"),o=function(d){return new Date().getTime()>d},a=ee.getItem(i),s=a?JSON.parse(a):null,u=s===null||o(s);if(u){ee.setItem(i,JSON.stringify(mo()+n)),t(),ee.removeItem(i);return}!u&&r<3?setTimeout(function(){Lt(e,t,r+1)},n):console.error("Unable to retrieve lock")}var nr=function(e){te(t,e);function t(r,n){var i=e.call(this,r,[])||this,o="persisted-queue:v1:".concat(n,":items"),a="persisted-queue:v1:".concat(n,":seen"),s=[],u={};return Lt(n,function(){try{s=Yr(o),u=Xr(a),wr(o),wr(a),i.queue=N(N([],s,!0),i.queue,!0),i.seen=I(I({},u),i.seen)}catch(d){console.error(d)}}),document.addEventListener("pagehide",function(){if(i.todo>0){var d=N(N([],i.queue,!0),i.future,!0);try{Lt(n,function(){vo(o,d),go(a,i.seen)})}catch(h){console.error(h)}}}),i}return t}(rr),en=function(e){return typeof e=="object"&&e!==null&&"then"in e&&typeof e.then=="function"},yo=function(){var e,t,r=0;return{done:function(){return e},run:function(n){var i=n();return en(i)&&(++r===1&&(e=new Promise(function(o){return t=o})),i.finally(function(){return--r===0&&t()})),i}}};function _o(e){return S(this,void 0,void 0,function(){var t;return M(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,e()];case 1:return[2,r.sent()];case 2:return t=r.sent(),[2,Promise.reject(t)];case 3:return[2]}})})}function ke(e,t){var r="action"in t?t.action.name:t.name;e.log("debug","plugin",{plugin:r});var n=new Date().getTime(),i=t[e.event.type];if(i===void 0)return Promise.resolve(e);var o=_o(function(){return i.apply(t,[e])}).then(function(a){var s=new Date().getTime()-n;return a.stats.gauge("plugin_time",s,["plugin:".concat(r)]),a}).catch(function(a){if(a instanceof pe&&a.type==="middleware_cancellation")throw a;return a instanceof pe?(e.log("warn",a.type,{plugin:r,error:a}),a):(e.log("error","plugin Error",{plugin:r,error:a}),e.stats.increment("plugin_error",1,["plugin:".concat(r)]),a)});return o}function bo(e,t){return ke(e,t).then(function(r){if(r instanceof X)return r;e.log("debug","Context canceled"),e.stats.increment("context_canceled"),e.cancel(r)})}var tn=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:null},yt,Cr,wo=tn(),be=(yt=(Cr=wo).__SEGMENT_INSPECTOR__)!==null&&yt!==void 0?yt:Cr.__SEGMENT_INSPECTOR__={},Co=function(e){te(t,e);function t(r){var n=e.call(this)||this;return n.criticalTasks=yo(),n.plugins=[],n.failedInitializations=[],n.flushing=!1,n.queue=r!=null?r:new nr(4,"event-queue"),n.queue.on(Qr,function(){n.scheduleFlush(0)}),n}return t.prototype.register=function(r,n,i){return S(this,void 0,void 0,function(){var o=this;return M(this,function(a){switch(a.label){case 0:return[4,Promise.resolve(n.load(r,i)).then(function(){o.plugins.push(n)}).catch(function(s){if(n.type==="destination"){o.failedInitializations.push(n.name),console.warn(n.name,s),r.log("warn","Failed to load destination",{plugin:n.name,error:s});return}throw s})];case 1:return a.sent(),[2]}})})},t.prototype.deregister=function(r,n,i){return S(this,void 0,void 0,function(){var o;return M(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),n.unload?[4,Promise.resolve(n.unload(r,i))]:[3,2];case 1:a.sent(),a.label=2;case 2:return this.plugins=this.plugins.filter(function(s){return s.name!==n.name}),[3,4];case 3:return o=a.sent(),r.log("warn","Failed to unload destination",{plugin:n.name,error:o}),[3,4];case 4:return[2]}})})},t.prototype.dispatch=function(r){return S(this,void 0,void 0,function(){var n;return M(this,function(i){return r.log("debug","Dispatching"),r.stats.increment("message_dispatched"),this.queue.push(r),n=this.subscribeToDelivery(r),this.scheduleFlush(0),[2,n]})})},t.prototype.subscribeToDelivery=function(r){return S(this,void 0,void 0,function(){var n=this;return M(this,function(i){return[2,new Promise(function(o){var a=function(s,u){s.isSame(r)&&(n.off("flush",a),o(s))};n.on("flush",a)})]})})},t.prototype.dispatchSingle=function(r){return S(this,void 0,void 0,function(){var n=this;return M(this,function(i){return r.log("debug","Dispatching"),r.stats.increment("message_dispatched"),this.queue.updateAttempts(r),r.attempts=1,[2,this.deliver(r).catch(function(o){if(o instanceof pe&&o.retry===!1)return r.setFailedDelivery({reason:o}),r;var a=n.enqueuRetry(o,r);return a?n.subscribeToDelivery(r):(r.setFailedDelivery({reason:o}),r)})]})})},t.prototype.isEmpty=function(){return this.queue.length===0},t.prototype.scheduleFlush=function(r){var n=this;r===void 0&&(r=500),!this.flushing&&(this.flushing=!0,setTimeout(function(){n.flush().then(function(){setTimeout(function(){n.flushing=!1,n.queue.length&&n.scheduleFlush(0)},0)})},r))},t.prototype.deliver=function(r){return S(this,void 0,void 0,function(){var n,i,o;return M(this,function(a){switch(a.label){case 0:return[4,this.criticalTasks.done()];case 1:a.sent(),n=Date.now(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.flushOne(r)];case 3:return r=a.sent(),i=Date.now()-n,r.stats.gauge("delivered",i),r.log("debug","Delivered",r.event),[2,r];case 4:throw o=a.sent(),r.log("error","Failed to deliver",o),r.stats.increment("delivery_failed"),o;case 5:return[2]}})})},t.prototype.enqueuRetry=function(r,n){var i=r instanceof pe&&r.retry===!1,o=!i;if(o){var a=this.queue.pushWithBackoff(n);return a}return!1},t.prototype.flush=function(){return S(this,void 0,void 0,function(){var r,n,i;return M(this,function(o){switch(o.label){case 0:if(this.queue.length===0||!Nr())return[2,[]];if(r=this.queue.pop(),!r)return[2,[]];r.attempts=this.queue.getAttempts(r),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.deliver(r)];case 2:return r=o.sent(),this.emit("flush",r,!0),[3,4];case 3:return n=o.sent(),i=this.enqueuRetry(n,r),i||(r.setFailedDelivery({reason:n}),this.emit("flush",r,!1)),[2,[]];case 4:return[2,[r]]}})})},t.prototype.isReady=function(){return!0},t.prototype.availableExtensions=function(r){var n=this.plugins.filter(function(y){var b,C,w;if(y.type!=="destination"&&y.name!=="Segment.io")return!0;var v=void 0;return(b=y.alternativeNames)===null||b===void 0||b.forEach(function(g){r[g]!==void 0&&(v=r[g])}),(w=(C=r[y.name])!==null&&C!==void 0?C:v)!==null&&w!==void 0?w:(y.name==="Segment.io"?!0:r.All)!==!1}),i=po(n,"type"),o=i.before,a=o===void 0?[]:o,s=i.enrichment,u=s===void 0?[]:s,d=i.destination,h=d===void 0?[]:d,m=i.after,_=m===void 0?[]:m;return{before:a,enrichment:u,destinations:h,after:_}},t.prototype.flushOne=function(r){var n,i,o,a;return S(this,void 0,void 0,function(){var s,u,d,h,m,_,w,y,b,C,w,v,g,l,c;return M(this,function(p){switch(p.label){case 0:if(!this.isReady())throw new Error("Not ready");s=this.availableExtensions((n=r.event.integrations)!==null&&n!==void 0?n:{}),u=s.before,d=s.enrichment,h=0,m=u,p.label=1;case 1:return h<m.length?(_=m[h],[4,bo(r,_)]):[3,4];case 2:w=p.sent(),w instanceof X&&(r=w),p.label=3;case 3:return h++,[3,1];case 4:y=0,b=d,p.label=5;case 5:return y<b.length?(C=b[y],[4,ke(r,C)]):[3,8];case 6:w=p.sent(),w instanceof X&&(r=w),p.label=7;case 7:return y++,[3,5];case 8:return(i=be.enriched)===null||i===void 0||i.call(be,r),v=this.availableExtensions((o=r.event.integrations)!==null&&o!==void 0?o:{}),g=v.destinations,l=v.after,[4,new Promise(function(f,A){setTimeout(function(){var E=g.map(function(L){return ke(r,L)});Promise.all(E).then(f).catch(A)},0)})];case 9:return p.sent(),r.stats.increment("message_delivered"),(a=be.delivered)===null||a===void 0||a.call(be,r,["segment.io"]),c=l.map(function(f){return ke(r,f)}),[4,Promise.all(c)];case 10:return p.sent(),[2,r]}})})},t}(Ut);function ir(e){for(var t=e.constructor.prototype,r=0,n=Object.getOwnPropertyNames(t);r<n.length;r++){var i=n[r];if(i!=="constructor"){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);!!o&&typeof o.value=="function"&&(e[i]=e[i].bind(e))}}return e}var _e={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},ht=function(){function e(){this.cache={}}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,r){return this.cache[t]=r,r},e.prototype.remove=function(t){delete this.cache[t]},e}(),xo=365,xr=function(e){te(t,e);function t(r){r===void 0&&(r=t.defaults);var n=e.call(this)||this;return n.options=I(I({},t.defaults),r),n}return t.available=function(){var r=window.navigator.cookieEnabled;return r||(q.set("ajs:cookies","test"),r=document.cookie.includes("ajs:cookies"),q.remove("ajs:cookies")),r},Object.defineProperty(t,"defaults",{get:function(){return{maxage:xo,domain:Br(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(r){try{var n=q.get(r);if(!n)return null;try{return JSON.parse(n)}catch(i){return n}}catch(i){return null}},t.prototype.set=function(r,n){return typeof n=="string"?q.set(r,n,this.opts()):n===null?q.remove(r,this.opts()):q.set(r,JSON.stringify(n),this.opts()),n},t.prototype.remove=function(r){return q.remove(r,this.opts())},t}(ht),_t=function(e){te(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.get=function(n){return null},r.set=function(n,i){return null},r.remove=function(n){},r}return t}(ht),Ir=function(e){te(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.available=function(){var r="test";try{return localStorage.setItem(r,r),localStorage.removeItem(r),!0}catch(n){return!1}},t.prototype.get=function(r){var n=localStorage.getItem(r);if(n)try{return JSON.parse(n)}catch(i){return JSON.parse(JSON.stringify(n))}return null},t.prototype.set=function(r,n){try{localStorage.setItem(r,JSON.stringify(n))}catch(i){console.warn("Unable to set ".concat(r," in localStorage, storage may be full."))}return n},t.prototype.remove=function(r){return localStorage.removeItem(r)},t}(ht),rn=function(){function e(t,r){t===void 0&&(t=_e);var n=this,i,o,a,s;this.options={},this.id=function(m){var _,y;if(n.options.disable)return null;var b=n.chainGet(n.idKey);if(m!==void 0){n.trySet(n.idKey,m);var C=m!==b&&b!==null&&m!==null;C&&n.anonymousId(null)}return(y=(_=n.chainGet(n.idKey))!==null&&_!==void 0?_:n.cookies.get(_e.cookie.oldKey))!==null&&y!==void 0?y:null},this.anonymousId=function(m){var _,y;if(n.options.disable)return null;if(m===void 0){var b=(_=n.chainGet(n.anonKey))!==null&&_!==void 0?_:(y=n.legacySIO())===null||y===void 0?void 0:y[0];if(b)return b}return m===null?(n.trySet(n.anonKey,null),n.chainGet(n.anonKey)):(n.trySet(n.anonKey,m!=null?m:zt()),n.chainGet(n.anonKey))},this.traits=function(m){var _,y;if(!n.options.disable)return m===null&&(m={}),m&&(n.mem.set(n.traitsKey,m!=null?m:{}),n.localStorage.set(n.traitsKey,m!=null?m:{})),(y=(_=n.localStorage.get(n.traitsKey))!==null&&_!==void 0?_:n.mem.get(n.traitsKey))!==null&&y!==void 0?y:{}},this.options=t,this.cookieOptions=r,this.idKey=(o=(i=t.cookie)===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:_e.cookie.key,this.traitsKey=(s=(a=t.localStorage)===null||a===void 0?void 0:a.key)!==null&&s!==void 0?s:_e.localStorage.key,this.anonKey="ajs_anonymous_id";var u=t.disable===!0,d=t.persist!==!1;this.localStorage=u||t.localStorageFallbackDisabled||!d||!Ir.available()?new _t:new Ir,this.cookies=!u&&d&&xr.available()?new xr(r):new _t,this.mem=u?new _t:new ht;var h=this.cookies.get(_e.cookie.oldKey);h&&(h.id&&this.id(h.id),h.traits&&this.traits(h.traits)),ir(this)}return e.prototype.chainGet=function(t){var r,n,i,o=(i=(n=(r=this.localStorage.get(t))!==null&&r!==void 0?r:this.cookies.get(t))!==null&&n!==void 0?n:this.mem.get(t))!==null&&i!==void 0?i:null;return this.trySet(t,typeof o=="number"?o.toString():o)},e.prototype.trySet=function(t,r){return this.localStorage.set(t,r),this.cookies.set(t,r),this.mem.set(t,r),r},e.prototype.chainClear=function(t){this.localStorage.remove(t),this.cookies.remove(t),this.mem.remove(t)},e.prototype.legacySIO=function(){var t=this.cookies.get("_sio");if(!t)return null;var r=t.split("----"),n=r[0],i=r[1];return[n,i]},e.prototype.identify=function(t,r){if(!this.options.disable){r=r!=null?r:{};var n=this.id();(n===null||n===t)&&(r=I(I({},this.traits()),r)),t&&this.id(t),this.traits(r)}},e.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},e.prototype.reset=function(){this.logout(),this.chainClear(this.idKey),this.chainClear(this.anonKey),this.chainClear(this.traitsKey)},e.prototype.load=function(){return new e(this.options,this.cookieOptions)},e.prototype.save=function(){return!0},e.defaults=_e,e}(),Io={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},So=function(e){te(t,e);function t(r,n){r===void 0&&(r=Io);var i=e.call(this,r,n)||this;return i.anonymousId=function(o){},ir(i),i}return t}(rn),ue="This is being deprecated and will be not be available in future releases of Analytics JS",bt=tn(),wt=bt==null?void 0:bt.analytics;function Mo(e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var r=e?4:1,n=t?new rr(r,[]):new nr(r,"event-queue");return new Co(n)}function Y(){console.warn(ue)}var Po=function(e){te(t,e);function t(r,n,i,o,a){var s=this,u,d,h;s=e.call(this)||this,s._debug=!1,s.initialized=!1,s.user=function(){return s._user},s.init=s.initialize.bind(s),s.log=Y,s.addIntegrationMiddleware=Y,s.listeners=Y,s.addEventListener=Y,s.removeAllListeners=Y,s.removeListener=Y,s.removeEventListener=Y,s.hasListeners=Y,s.add=Y,s.addIntegration=Y;var m=n==null?void 0:n.cookie,_=(u=n==null?void 0:n.disableClientPersistence)!==null&&u!==void 0?u:!1;return s.settings=r,s.settings.timeout=(d=s.settings.timeout)!==null&&d!==void 0?d:300,s.queue=i!=null?i:Mo(n==null?void 0:n.retryQueue,_),s._user=o!=null?o:new rn(_?I(I({},n==null?void 0:n.user),{persist:!1}):n==null?void 0:n.user,m).load(),s._group=a!=null?a:new So(_?I(I({},n==null?void 0:n.group),{persist:!1}):n==null?void 0:n.group,m).load(),s.eventFactory=new fo(s._user),s.integrations=(h=n==null?void 0:n.integrations)!==null&&h!==void 0?h:{},s.options=n!=null?n:{},ir(s),s}return t.prototype.track=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o,a,s,u,d,h=this;return M(this,function(m){return i=ii.apply(void 0,r),o=i[0],a=i[1],s=i[2],u=i[3],d=this.eventFactory.track(o,a,s,this.integrations),[2,this.dispatch(d,u).then(function(_){return h.emit("track",o,_.event.properties,_.event.options),_})]})})},t.prototype.page=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o,a,s,u,d,h,m=this;return M(this,function(_){return i=hr.apply(void 0,r),o=i[0],a=i[1],s=i[2],u=i[3],d=i[4],h=this.eventFactory.page(o,a,s,u,this.integrations),[2,this.dispatch(h,d).then(function(y){return m.emit("page",o,a,y.event.properties,y.event.options),y})]})})},t.prototype.identify=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o,a,s,u,d,h=this;return M(this,function(m){return i=vr(this._user).apply(void 0,r),o=i[0],a=i[1],s=i[2],u=i[3],this._user.identify(o,a),d=this.eventFactory.identify(this._user.id(),this._user.traits(),s,this.integrations),[2,this.dispatch(d,u).then(function(_){return h.emit("identify",_.event.userId,_.event.traits,_.event.options),_})]})})},t.prototype.group=function(){for(var r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(n.length===0)return this._group;var o=vr(this._group).apply(void 0,n),a=o[0],s=o[1],u=o[2],d=o[3];this._group.identify(a,s);var h=this._group.id(),m=this._group.traits(),_=this.eventFactory.group(h,m,u,this.integrations);return this.dispatch(_,d).then(function(y){return r.emit("group",y.event.groupId,y.event.traits,y.event.options),y})},t.prototype.alias=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o,a,s,u,d,h=this;return M(this,function(m){return i=oi.apply(void 0,r),o=i[0],a=i[1],s=i[2],u=i[3],d=this.eventFactory.alias(o,a,s,this.integrations),[2,this.dispatch(d,u).then(function(_){return h.emit("alias",o,a,_.event.options),_})]})})},t.prototype.screen=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o,a,s,u,d,h,m=this;return M(this,function(_){return i=hr.apply(void 0,r),o=i[0],a=i[1],s=i[2],u=i[3],d=i[4],h=this.eventFactory.screen(o,a,s,u,this.integrations),[2,this.dispatch(h,d).then(function(y){return m.emit("screen",o,a,y.event.properties,y.event.options),y})]})})},t.prototype.trackClick=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o;return M(this,function(a){switch(a.label){case 0:return[4,K(()=>import("./auto-track.c37e0d3b.js"),["assets/auto-track.c37e0d3b.js","assets/chevron_right.8fd46579.js","assets/chevron_right.08649806.css","assets/index.83934545.js"])];case 1:return i=a.sent(),[2,(o=i.link).call.apply(o,N([this],r,!1))]}})})},t.prototype.trackLink=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o;return M(this,function(a){switch(a.label){case 0:return[4,K(()=>import("./auto-track.c37e0d3b.js"),["assets/auto-track.c37e0d3b.js","assets/chevron_right.8fd46579.js","assets/chevron_right.08649806.css","assets/index.83934545.js"])];case 1:return i=a.sent(),[2,(o=i.link).call.apply(o,N([this],r,!1))]}})})},t.prototype.trackSubmit=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o;return M(this,function(a){switch(a.label){case 0:return[4,K(()=>import("./auto-track.c37e0d3b.js"),["assets/auto-track.c37e0d3b.js","assets/chevron_right.8fd46579.js","assets/chevron_right.08649806.css","assets/index.83934545.js"])];case 1:return i=a.sent(),[2,(o=i.form).call.apply(o,N([this],r,!1))]}})})},t.prototype.trackForm=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o;return M(this,function(a){switch(a.label){case 0:return[4,K(()=>import("./auto-track.c37e0d3b.js"),["assets/auto-track.c37e0d3b.js","assets/chevron_right.8fd46579.js","assets/chevron_right.08649806.css","assets/index.83934545.js"])];case 1:return i=a.sent(),[2,(o=i.form).call.apply(o,N([this],r,!1))]}})})},t.prototype.register=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o,a=this;return M(this,function(s){switch(s.label){case 0:return i=X.system(),o=r.map(function(u){return a.queue.register(i,u,a)}),[4,Promise.all(o)];case 1:return s.sent(),[2,i]}})})},t.prototype.deregister=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return S(this,void 0,void 0,function(){var i,o,a=this;return M(this,function(s){switch(s.label){case 0:return i=X.system(),o=r.map(function(u){return S(a,void 0,void 0,function(){var d;return M(this,function(h){return d=this.queue.plugins.find(function(m){return m.name===u}),d?[2,this.queue.deregister(i,d,this)]:(i.log("warn","plugin ".concat(u," not found")),[2])})})}),[4,Promise.all(o)];case 1:return s.sent(),[2,i]}})})},t.prototype.debug=function(r){return r===!1&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=r,this},t.prototype.reset=function(){this._user.reset(),this._group.reset()},t.prototype.timeout=function(r){this.settings.timeout=r},t.prototype.dispatch=function(r,n){var i;return S(this,void 0,void 0,function(){var o,a,s,u,d;return M(this,function(h){switch(h.label){case 0:return o=new X(r),(i=be.triggered)===null||i===void 0||i.call(be,o),rt()&&!this.options.retryQueue?[2,o]:(a=Date.now(),this.queue.isEmpty()?[4,this.queue.dispatchSingle(o)]:[3,2]);case 1:return s=h.sent(),[3,4];case 2:return[4,this.queue.dispatch(o)];case 3:s=h.sent(),h.label=4;case 4:return u=Date.now()-a,d=this.settings.timeout,n?[4,ui(s,n,Math.max((d!=null?d:300)-u,0),d)]:[3,6];case 5:s=h.sent(),h.label=6;case 6:return this._debug&&s.flush(),[2,s]}})})},t.prototype.addSourceMiddleware=function(r){return S(this,void 0,void 0,function(){var n=this;return M(this,function(i){switch(i.label){case 0:return[4,this.queue.criticalTasks.run(function(){return S(n,void 0,void 0,function(){var o,a,s;return M(this,function(u){switch(u.label){case 0:return[4,K(()=>Promise.resolve().then(()=>Ro),void 0)];case 1:return o=u.sent().sourceMiddlewarePlugin,a={},this.queue.plugins.forEach(function(d){if(d.type==="destination")return a[d.name]=!0}),s=o(r,a),[4,this.register(s)];case 2:return u.sent(),[2]}})})})];case 1:return i.sent(),[2,this]}})})},t.prototype.addDestinationMiddleware=function(r){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=this.queue.plugins.filter(function(a){return a.name.toLowerCase()===r.toLowerCase()});return o.forEach(function(a){a.addMiddleware.apply(a,n)}),Promise.resolve(this)},t.prototype.setAnonymousId=function(r){return this._user.anonymousId(r)},t.prototype.queryString=function(r){return S(this,void 0,void 0,function(){var n;return M(this,function(i){switch(i.label){case 0:return[4,K(()=>import("./index.ec9a25d9.js"),["assets/index.ec9a25d9.js","assets/chevron_right.8fd46579.js","assets/chevron_right.08649806.css","assets/index.83934545.js"])];case 1:return n=i.sent().queryString,[2,n(this,r)]}})})},t.prototype.use=function(r){return r(this),this},t.prototype.ready=function(r){return r===void 0&&(r=function(n){return n}),S(this,void 0,void 0,function(){return M(this,function(n){return[2,Promise.all(this.queue.plugins.map(function(i){return i.ready?i.ready():Promise.resolve()})).then(function(i){return r(i),i})]})})},t.prototype.noConflict=function(){return console.warn(ue),window.analytics=wt!=null?wt:this,this},t.prototype.normalize=function(r){return console.warn(ue),this.eventFactory.normalize(r)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(ue),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return xe},enumerable:!1,configurable:!0}),t.prototype.initialize=function(r,n){return S(this,void 0,void 0,function(){return M(this,function(i){return console.warn(ue),[2,Promise.resolve(this)]})})},t.prototype.pageview=function(r){return S(this,void 0,void 0,function(){return M(this,function(n){switch(n.label){case 0:return console.warn(ue),[4,this.page({path:r})];case 1:return n.sent(),[2,this]}})})},Object.defineProperty(t.prototype,"plugins",{get:function(){var r;return console.warn(ue),(r=this._plugins)!==null&&r!==void 0?r:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){console.warn(ue);var r=this.queue.plugins.filter(function(n){return n.type==="destination"}).reduce(function(n,i){var o="".concat(i.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),a=window[o];if(!a)return n;var s=a.Integration;return s?(n[i.name]=s,n):(n[i.name]=a,n)},{});return r},enumerable:!1,configurable:!0}),t.prototype.push=function(r){var n=this,i=r.shift();i&&!n[i]||n[i].apply(this,r)},t}(Ut);function nn(){return typeof process>"u"||!process.env?{}:process.env}var Ao=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,Oo=function(){var e,t=Array.prototype.slice.call(document.querySelectorAll("script"));return t.forEach(function(r){var n,i=(n=r.getAttribute("src"))!==null&&n!==void 0?n:"",o=Ao.exec(i);o&&o[1]&&(e=o[1])}),e},Xe,Eo=function(){var e,t=Xe!=null?Xe:(e=window.analytics)===null||e===void 0?void 0:e._cdn;return t},Lo=function(e){window.analytics&&(window.analytics._cdn=e),Xe=e},or=function(){var e=Eo();if(e)return e;var t=Oo();return t||"https://cdn.segment.com"},Ts=function(){var e=or();return"".concat(e,"/next-integrations")};function $o(e,t){var r,n=Object.entries((r=t.integrations)!==null&&r!==void 0?r:{}).reduce(function(i,o){var a,s,u=o[0],d=o[1];return typeof d=="object"?I(I({},i),(a={},a[u]=d,a)):I(I({},i),(s={},s[u]={},s))},{});return Object.entries(e.integrations).reduce(function(i,o){var a,s=o[0],u=o[1];return I(I({},i),(a={},a[s]=I(I({},u),n[s]),a))},{})}function on(){var e=document.getElementsByTagName("link"),t="";return Array.prototype.slice.call(e).forEach(function(r){r.getAttribute("rel")==="canonical"&&(t=r.getAttribute("href"))}),t}function To(){var e=on();if(!e)return window.location.pathname;var t=document.createElement("a");t.href=e;var r=t.pathname.startsWith("/")?t.pathname:"/"+t.pathname;return r}function Do(e){e===void 0&&(e="");var t=on();if(t)return t.includes("?")?t:"".concat(t).concat(e);var r=window.location.href,n=r.indexOf("#");return n===-1?r:r.slice(0,n)}function an(){return{path:To(),referrer:document.referrer,search:location.search,title:document.title,url:Do(location.search)}}function Te(e){var t,r=e.event;r.context=r.context||{};var n=an(),i=(t=r.properties)!==null&&t!==void 0?t:{};return Object.keys(n).forEach(function(o){i[o]&&(n[o]=i[o])}),r.context.page&&(n=Object.assign({},n,r.context.page)),r.context=Object.assign({},r.context,{page:n}),e.event=r,e}var Fo={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:function(e){return e.event.properties=Object.assign({},an(),e.event.properties),e.event.name&&(e.event.properties.name=e.event.name),Te(e)},alias:Te,track:Te,identify:Te,group:Te};function sn(e){var t=Array.prototype.slice.call(window.document.querySelectorAll("script"));return t.find(function(r){return r.src===e})}function Ct(e,t){var r=sn(e);if(r!==void 0){var n=r==null?void 0:r.getAttribute("status");if(n==="loaded")return Promise.resolve(r);if(n==="loading")return new Promise(function(i,o){r.addEventListener("load",function(){return i(r)}),r.addEventListener("error",function(a){return o(a)})})}return new Promise(function(i,o){var a,s=window.document.createElement("script");s.type="text/javascript",s.src=e,s.async=!0,s.setAttribute("status","loading");for(var u=0,d=Object.entries(t!=null?t:{});u<d.length;u++){var h=d[u],m=h[0],_=h[1];s.setAttribute(m,_)}s.onload=function(){s.onerror=s.onload=null,s.setAttribute("status","loaded"),i(s)},s.onerror=function(){s.onerror=s.onload=null,s.setAttribute("status","error"),o(new Error("Failed to load ".concat(e)))};var y=window.document.getElementsByTagName("script")[0];(a=y.parentElement)===null||a===void 0||a.insertBefore(s,y)})}function Ds(e){var t=sn(e);return t!==void 0&&t.remove(),Promise.resolve()}function ar(e,t){var r=new se.Facade(e,t);return e.type==="track"&&(r=new se.Track(e,t)),e.type==="identify"&&(r=new se.Identify(e,t)),e.type==="page"&&(r=new se.Page(e,t)),e.type==="alias"&&(r=new se.Alias(e,t)),e.type==="group"&&(r=new se.Group(e,t)),e.type==="screen"&&(r=new se.Screen(e,t)),Object.defineProperty(r,"obj",{value:e,writable:!0}),r}var jo=function(e){return JSON.parse(JSON.stringify(e))};function un(e,t,r){return S(this,void 0,void 0,function(){function n(d,h){return S(this,void 0,void 0,function(){var m,_,y;return M(this,function(b){switch(b.label){case 0:return m=!1,_=null,[4,at(h({payload:ar(d,{clone:!0,traverse:!1}),integration:e,next:function(C){m=!0,C===null&&(_=null),C&&(_=C.obj)}}))];case 1:return b.sent(),!m&&_!==null&&(_=_,_.integrations=I(I({},d.integrations),(y={},y[e]=!1,y))),[2,_]}})})}var i,o,a,s,u;return M(this,function(d){switch(d.label){case 0:i=jo(t),o=0,a=r,d.label=1;case 1:return o<a.length?(s=a[o],[4,n(i,s)]):[3,4];case 2:if(u=d.sent(),u===null)return[2,null];i=u,d.label=3;case 3:return o++,[3,1];case 4:return[2,i]}})})}function ko(e,t){function r(n){return S(this,void 0,void 0,function(){var i;return M(this,function(o){switch(o.label){case 0:return i=!1,[4,at(e({payload:ar(n.event,{clone:!0,traverse:!1}),integrations:t!=null?t:{},next:function(a){i=!0,a&&(n.event=a.obj)}}))];case 1:if(o.sent(),!i)throw new pe({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}})})}return{name:"Source Middleware ".concat(e.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(n){return Promise.resolve(n)},track:r,page:r,identify:r,alias:r,group:r}}const Ro=Object.freeze(Object.defineProperty({__proto__:null,applyDestinationMiddleware:un,sourceMiddlewarePlugin:ko},Symbol.toStringTag,{value:"Module"}));var No=function(){function e(t,r){this.version="1.0.0",this.alternativeNames=[],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=r,this.name=t,this.type=r.type,this.alternativeNames.push(r.name)}return e.prototype.addMiddleware=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];(t=this.middleware).push.apply(t,r)},e.prototype.transform=function(t){return S(this,void 0,void 0,function(){var r;return M(this,function(n){switch(n.label){case 0:return[4,un(this.name,t.event,this.middleware)];case 1:return r=n.sent(),r===null&&t.cancel(new pe({retry:!1,reason:"dropped by destination middleware"})),[2,new X(r)]}})})},e.prototype._createMethod=function(t){var r=this;return function(n){return S(r,void 0,void 0,function(){var i;return M(this,function(o){switch(o.label){case 0:return this.action[t]?[4,this.transform(n)]:[2,n];case 1:return i=o.sent(),[4,this.action[t](i)];case 2:return o.sent(),[2,n]}})})}},e.prototype.isLoaded=function(){return this.action.isLoaded()},e.prototype.ready=function(){return this.action.ready?this.action.ready():Promise.resolve()},e.prototype.load=function(t,r){return this.action.load(t,r)},e.prototype.unload=function(t,r){var n,i;return(i=(n=this.action).unload)===null||i===void 0?void 0:i.call(n,t,r)},e}();function Bo(e){if(!Array.isArray(e))throw new Error("Not a valid list of plugins");var t=["load","isLoaded","name","version","type"];return e.forEach(function(r){t.forEach(function(n){var i;if(r[n]===void 0)throw new Error("Plugin: ".concat((i=r.name)!==null&&i!==void 0?i:"unknown"," missing required function ").concat(n))})}),!0}function zo(e,t,r,n,i){var o,a,s;return S(this,void 0,void 0,function(){var u,d,h,m,_=this;return M(this,function(y){switch(y.label){case 0:return u=[],d=or(),h=(a=(o=e.middlewareSettings)===null||o===void 0?void 0:o.routingRules)!==null&&a!==void 0?a:[],m=((s=e.remotePlugins)!==null&&s!==void 0?s:[]).map(function(b){return S(_,void 0,void 0,function(){var C,w,v,g,l,c,p,f,A;return M(this,function(E){switch(E.label){case 0:if(t.All===!1&&!t[b.name]||t[b.name]===!1)return[2];E.label=1;case 1:if(E.trys.push([1,12,,13]),!n)return[3,7];C=b.url.split("/"),w=C[C.length-2],v=b.url.replace(w,btoa(w).replace(/=/g,"")),E.label=2;case 2:return E.trys.push([2,4,,6]),[4,Ct(v.replace("https://cdn.segment.com",d))];case 3:return E.sent(),[3,6];case 4:return E.sent(),[4,Ct(b.url.replace("https://cdn.segment.com",d))];case 5:return E.sent(),[3,6];case 6:return[3,9];case 7:return[4,Ct(b.url.replace("https://cdn.segment.com",d))];case 8:E.sent(),E.label=9;case 9:return g=b.libraryName,typeof window[g]!="function"?[3,11]:(l=window[g],[4,at(l(I(I({},b.settings),r[b.name])))]);case 10:c=E.sent(),p=Array.isArray(c)?c:[c],Bo(p),f=h.filter(function(L){return L.destinationName===b.creationName}),p.forEach(function(L){var k=new No(b.creationName,L);f.length&&i&&L.type==="destination"&&k.addMiddleware(i),u.push(k)}),E.label=11;case 11:return[3,13];case 12:return A=E.sent(),console.warn("Failed to load Remote Plugin",A),[3,13];case 13:return[2]}})})}),[4,Promise.all(m)];case 1:return y.sent(),[2,u.filter(Boolean)]}})})}var Uo=function(e){var t=!1;document.addEventListener("pagehide",function(){t||(t=!0,e())}),document.addEventListener("visibilitychange",function(){if(document.visibilityState=="hidden"){if(t)return;t=!0,e()}else t=!1})},cn=Me;typeof window<"u"&&(cn=window.fetch||Me);var qo=500;function ln(e){var t=encodeURI(JSON.stringify(e)).split(/%..|./).length-1;return t/1024}function Vo(e){return ln(e)>=qo-50}function Ko(e){var t=[],r=0;return e.forEach(function(n){var i=ln(t[r]);i>=64&&r++,t[r]?t[r].push(n):t[r]=[n]}),t}function Go(e,t){var r,n,i=[],o=!1,a=(r=t==null?void 0:t.size)!==null&&r!==void 0?r:10,s=(n=t==null?void 0:t.timeout)!==null&&n!==void 0?n:5e3;function u(y){var b;if(y.length!==0){var C=(b=y[0])===null||b===void 0?void 0:b.writeKey;return cn("https://".concat(e,"/b"),{keepalive:o,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({batch:y,writeKey:C})})}}function d(){return S(this,void 0,void 0,function(){var y;return M(this,function(b){return i.length?(y=i,i=[],[2,u(y)]):[2]})})}var h;function m(){h||(h=setTimeout(function(){h=void 0,d().catch(console.error)},s))}Uo(function(){if(o=!0,i.length){var y=Ko(i).map(u);Promise.all(y).catch(console.error)}});function _(y,b){return S(this,void 0,void 0,function(){var C;return M(this,function(w){return i.push(b),C=i.length>=a||Vo(i),[2,C||o?d():m()]})})}return{dispatch:_}}var fn=Me;typeof window<"u"&&(fn=window.fetch||Me);function Wo(){function e(t,r){return fn(t,{headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(r)})}return{dispatch:e}}var Jo=function(e,t){return S(void 0,void 0,void 0,function(){var r;return M(this,function(n){return r=function(i){return S(void 0,void 0,void 0,function(){var o;return M(this,function(a){switch(a.label){case 0:return e(i)?(o=r,[4,t()]):[3,2];case 1:return[2,o.apply(void 0,[a.sent()])];case 2:return[2]}})})},[2,r(void 0)]})})};function Zo(e,t){return S(this,void 0,void 0,function(){var r,n=this;return M(this,function(i){switch(i.label){case 0:return r=[],rt()?[2,t]:[4,Jo(function(){return t.length>0&&!rt()},function(){return S(n,void 0,void 0,function(){var o,a,s;return M(this,function(u){switch(u.label){case 0:return o=t.pop(),o?[4,ke(o,e)]:[2];case 1:return a=u.sent(),s=a instanceof X,s||r.push(o),[2]}})})})];case 1:return i.sent(),r.map(function(o){return t.pushWithBackoff(o)}),[2,t]}})})}function He(e,t,r,n){var i=this;e||setTimeout(function(){return S(i,void 0,void 0,function(){var o,a;return M(this,function(s){switch(s.label){case 0:return o=!0,[4,Zo(r,t)];case 1:return a=s.sent(),o=!1,t.todo>0&&n(o,a,r,n),[2]}})})},Math.random()*5e3)}function Ho(e,t){var r,n,i,o,a=e.user();return t.previousId=(i=(n=(r=t.previousId)!==null&&r!==void 0?r:t.from)!==null&&n!==void 0?n:a.id())!==null&&i!==void 0?i:a.anonymousId(),t.userId=(o=t.userId)!==null&&o!==void 0?o:t.to,delete t.from,delete t.to,t}function Qo(e,t,r){var n,i,o,a,s=e.options.disableClientPersistence?new rr(e.queue.queue.maxAttempts,[]):new nr(e.queue.queue.maxAttempts,"dest-Segment.io"),u=!1,d=(n=t==null?void 0:t.apiHost)!==null&&n!==void 0?n:"api.segment.io/v1",h=(i=t==null?void 0:t.protocol)!==null&&i!==void 0?i:"https",m="".concat(h,"://").concat(d),_=((o=t==null?void 0:t.deliveryStrategy)===null||o===void 0?void 0:o.strategy)==="batching"?Go(d,(a=t==null?void 0:t.deliveryStrategy)===null||a===void 0?void 0:a.config):Wo();function y(C){return S(this,void 0,void 0,function(){var w,v;return M(this,function(g){return rt()?(s.push(C),He(u,s,b,He),[2,C]):(w=C.event.type.charAt(0),v=ar(C.event).json(),C.event.type==="track"&&delete v.traits,C.event.type==="alias"&&(v=Ho(e,v)),[2,_.dispatch("".concat(m,"/").concat(w),Ii(e,v,t,r)).then(function(){return C}).catch(function(l){return(l.type==="error"||l.message==="Failed to fetch")&&(s.push(C),He(u,s,b,He)),C})])})})}var b={name:"Segment.io",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:y,identify:y,page:y,alias:y,group:y};return b}var dn=function(e,t,r){r.getCalls(e).forEach(function(n){sr(t,n).catch(console.error)})},Yo=function(e,t){return S(void 0,void 0,void 0,function(){var r,n,i;return M(this,function(o){switch(o.label){case 0:r=0,n=t.getCalls("addSourceMiddleware"),o.label=1;case 1:return r<n.length?(i=n[r],[4,sr(e,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return r++,[3,1];case 4:return[2]}})})},Xo=dn.bind(globalThis,"on"),ea=dn.bind(globalThis,"setAnonymousId"),ta=function(e,t){t.toArray().forEach(function(r){setTimeout(function(){sr(e,r).catch(console.error)},0)})},ra=function(){function e(){this._value={}}return e.prototype.toArray=function(){var t;return(t=[]).concat.apply(t,Object.values(this._value))},e.prototype.getCalls=function(t){var r;return(r=this._value[t])!==null&&r!==void 0?r:[]},e.prototype.push=function(){for(var t=this,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.forEach(function(i){t._value[i.method]?t._value[i.method].push(i):t._value[i.method]=[i]}),this},e.prototype.clear=function(){return this._value={},this},e}();function sr(e,t){return S(this,void 0,void 0,function(){var r,n;return M(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.called?[2,void 0]:(t.called=!0,r=e[t.method].apply(e,t.args),en(r)?[4,r]:[3,2]);case 1:i.sent(),i.label=2;case 2:return t.resolve(r),[3,4];case 3:return n=i.sent(),t.reject(n),[3,4];case 4:return[2]}})})}var na=function(){function e(t){var r=this;this._preInitBuffer=new ra,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=xe,this._promise=t(this._preInitBuffer),this._promise.then(function(n){var i=n[0],o=n[1];r.instance=i,r.ctx=o}).catch(function(){})}return e.prototype.then=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return(t=this._promise).then.apply(t,r)},e.prototype.catch=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return(t=this._promise).catch.apply(t,r)},e.prototype.finally=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return(t=this._promise).finally.apply(t,r)},e.prototype._createMethod=function(t){var r=this;return function(){for(var n,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(r.instance){var a=(n=r.instance)[t].apply(n,i);return Promise.resolve(a)}return new Promise(function(s,u){r._preInitBuffer.push({method:t,args:i,resolve:s,reject:u,called:!1})})}},e.prototype._createChainableMethod=function(t){var r=this;return function(){for(var n,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return r.instance?((n=r.instance)[t].apply(n,i),r):(r._preInitBuffer.push({method:t,args:i,resolve:function(){},reject:console.error,called:!1}),r)}},e}();function ia(e){var t=e[0],r=e.slice(1);return{method:t,resolve:function(){},reject:console.error,args:r,called:!1}}var oa=function(e){return e.map(ia)},$t=function(){var e=window.analytics;if(!Array.isArray(e))return[];var t=e.splice(0,e.length);return oa(t)};function aa(e,t){var r=t!=null?t:or();return Me("".concat(r,"/v1/projects/").concat(e,"/settings")).then(function(n){return n.ok?n.json():n.text().then(function(i){throw new Error(i)})}).catch(function(n){throw console.error(n.message),n})}function sa(e){return nn().NODE_ENV!=="test"&&Object.keys(e.integrations).length>1}function ua(e){var t,r,n;return nn().NODE_ENV!=="test"&&((n=(r=(t=e.middlewareSettings)===null||t===void 0?void 0:t.routingRules)===null||r===void 0?void 0:r.length)!==null&&n!==void 0?n:0)>0}function ca(e,t){t.push.apply(t,$t()),ea(e,t),Xo(e,t)}function la(e,t){return S(this,void 0,void 0,function(){return M(this,function(r){switch(r.label){case 0:return t.push.apply(t,$t()),[4,Yo(e,t)];case 1:return r.sent(),t.push.apply(t,$t()),ta(e,t),t.clear(),[2]}})})}function fa(e,t,r,n,i){var o,a,s;return S(this,void 0,void 0,function(){var u,d,h,m,_,y,b,C,w,v,g,l=this;return M(this,function(c){switch(c.label){case 0:return ua(e)?[4,K(()=>import("./index.1ac1c1e5.js"),["assets/index.1ac1c1e5.js","assets/index.83934545.js","assets/chevron_right.8fd46579.js","assets/chevron_right.08649806.css"]).then(function(p){return p.tsubMiddleware(e.middlewareSettings.routingRules)})]:[3,2];case 1:return d=c.sent(),[3,3];case 2:d=void 0,c.label=3;case 3:return u=d,sa(e)?[4,K(()=>import("./index.2237f849.js"),["assets/index.2237f849.js","assets/index.83934545.js","assets/is-plan-event-enabled.681b46ca.js","assets/chevron_right.8fd46579.js","assets/chevron_right.08649806.css"]).then(function(p){return p.ajsDestinations(e,t.integrations,r,u)})]:[3,5];case 4:return m=c.sent(),[3,6];case 5:m=[],c.label=6;case 6:return h=m,e.legacyVideoPluginsEnabled?[4,K(()=>import("./index.8aa5be65.js"),["assets/index.8aa5be65.js","assets/index.83934545.js"]).then(function(p){return p.loadLegacyVideoPlugins(t)})]:[3,8];case 7:c.sent(),c.label=8;case 8:return!((o=r.plan)===null||o===void 0)&&o.track?[4,K(()=>import("./index.29eac88c.js"),["assets/index.29eac88c.js","assets/index.83934545.js","assets/is-plan-event-enabled.681b46ca.js"]).then(function(p){var f;return p.schemaFilter((f=r.plan)===null||f===void 0?void 0:f.track,e)})]:[3,10];case 9:return y=c.sent(),[3,11];case 10:y=void 0,c.label=11;case 11:return _=y,b=$o(e,n),[4,zo(e,t.integrations,b,n.obfuscate,u).catch(function(){return[]})];case 12:return C=c.sent(),w=N(N(N([ni,Fo],i,!0),h,!0),C,!0),_&&w.push(_),v=((a=r.integrations)===null||a===void 0?void 0:a.All)===!1&&!r.integrations["Segment.io"]||r.integrations&&r.integrations["Segment.io"]===!1,v||w.push(Qo(t,b["Segment.io"],e.integrations)),[4,t.register.apply(t,w)];case 13:return g=c.sent(),Object.entries((s=e.enabledMiddleware)!==null&&s!==void 0?s:{}).some(function(p){var f=p[1];return f})?[4,K(()=>import("./index.cfad1558.js"),["assets/index.cfad1558.js","assets/index.83934545.js","assets/chevron_right.8fd46579.js","assets/chevron_right.08649806.css"]).then(function(p){var f=p.remoteMiddlewares;return S(l,void 0,void 0,function(){var A,E;return M(this,function(L){switch(L.label){case 0:return[4,f(g,e,n.obfuscate)];case 1:return A=L.sent(),E=A.map(function(k){return t.addSourceMiddleware(k)}),[2,Promise.all(E)]}})})})]:[3,15];case 14:c.sent(),c.label=15;case 15:return[2,g]}})})}function da(e,t,r){var n,i,o,a,s,u;return t===void 0&&(t={}),S(this,void 0,void 0,function(){var d,h,m,_,y,b,C,w,v,g;return M(this,function(l){switch(l.label){case 0:return e.cdnURL&&Lo(e.cdnURL),(n=e.cdnSettings)!==null&&n!==void 0?(h=n,[3,3]):[3,1];case 1:return[4,aa(e.writeKey,e.cdnURL)];case 2:h=l.sent(),l.label=3;case 3:return d=h,m=(o=(i=d.integrations["Segment.io"])===null||i===void 0?void 0:i.retryQueue)!==null&&o!==void 0?o:!0,_=I({retryQueue:m},t),y=new Po(e,_),b=(a=e.plugins)!==null&&a!==void 0?a:[],X.initMetrics(d.metrics),ca(y,r),[4,fa(d,y,_,t,b)];case 4:return C=l.sent(),w=(s=window.location.search)!==null&&s!==void 0?s:"",v=(u=window.location.hash)!==null&&u!==void 0?u:"",g=w.length?w:v.replace(/(?=#).*(?=\?)/,""),g.includes("ajs_")?[4,y.queryString(g).catch(console.error)]:[3,6];case 5:l.sent(),l.label=6;case 6:return y.initialized=!0,y.emit("initialize",e,t),t.initialPageview&&y.page().catch(console.error),[4,la(y,r)];case 7:return l.sent(),[2,[y,C]]}})})}var pa=function(e){te(t,e);function t(r){return e.call(this,r)||this}return t.load=function(r,n){return n===void 0&&(n={}),new this(function(i){return da(r,n,i)})},t.standalone=function(r,n){return t.load({writeKey:r},n).then(function(i){return i[0]})},t}(na);class ha{constructor(){dr(this,"analytics");this.analytics=pa.load({writeKey:"c0SISxJpICLXxstkrSppa4uxwYzBQbqf"})}trackPageLoad(){this.analytics.page()}trackEvent(t,r){this.analytics.track(t,{event_data:r,environment:"production"})}}const Re=new ha;var Ne=(e=>(e.LC_VIEWED="LC-Viewed",e.LC_CATEGORY_CLICK="LC-Category-Clicked",e.LC_CATEGORY_VIEW="LC-Category-Viewed",e.LC_SCORE_CLICK="LC-Score-Clicked",e.LC_SCORE_VIEW="LC-Score-Viewed",e.LC_TRANSPORT_MODE_CLICK="LC-Transportation-Method-Clicked",e.LC_LONG_DESCRIPTION_CLICK="LC-Long-Description-Clicked",e.LC_LONG_DESCRIPTION_VIEW="LC-Long-Description-Viewed",e.LC_POI_CLICK="LC-POI-Clicked",e.LC_POI_VIEW="LC-POI-Viewed",e.LC_LIST_VIEW_CLICK="LC-List-View-Clicked",e.LC_MAP_VIEW_CLICK="LC-Map-View-Clicked",e.LC_SCORES_LIST_SCROLL="LC-Scores-List-Scroll",e.LC_COMMUTE_CALC_CLICK="LC-Commute-Calc-Clicked",e.LC_COMMUTE_CALC_VIEW="LC-Commute-Calc-Viewed",e.LC_COMMUTE_CALCULATE_CLICK="LC-Commute-Calc-Calculate-Clicked",e.LC_ATTRIBUTION_CLICK="LC-Attribution-Clicked",e))(Ne||{});const pn=re.createContext({}),Z=()=>$.exports.useContext(pn),va=(e,t)=>{switch(t.type){case"CATEGORY":return{...e,activeCategory:t.value};case"SCORE":{const r=ze.find(n=>t.value===""?n.value===e.activeCategory:n.scores.includes(t.value)).value;return{activeCategory:r,activeScoreByCategory:{...e.activeScoreByCategory,[r]:t.value}}}}},ga=({children:e})=>{const t=window.innerWidth<jr.screenSizes.mobileL?{activeCategory:"commute",activeScoreByCategory:{commute:"transit_friendly",amenities:"groceries",character:"quiet",nature:"parks",education:"primary_schools"}}:{activeCategory:"commute",activeScoreByCategory:{commute:"",amenities:"",character:"",nature:"",education:""}},[r,n]=$.exports.useReducer(va,t),[i,o]=$.exports.useState(),[a,s]=$.exports.useState();$.exports.useEffect(()=>{i&&Re.trackEvent(Ne.LC_POI_VIEW,{poi_name:i==null?void 0:i.name,poi_info:i==null?void 0:i.address})},[i]);const{activeCategory:u}=r;$.exports.useEffect(()=>{Re.trackEvent(Ne.LC_CATEGORY_VIEW,u)},[u]);const d=r.activeScoreByCategory[u];$.exports.useEffect(()=>{d!==""&&Re.trackEvent(Ne.LC_SCORE_VIEW,d)},[d]);const h=y=>{n({type:"SCORE",value:y})},m=y=>{n({type:"CATEGORY",value:y})},_=$.exports.useMemo(()=>({activeScore:d,setActiveScore:h,activeCategory:u,setActiveCategory:m,activePOI:i,setActivePOI:o,hoveredPOI:a,setHoveredPOI:s}),[d,h,u,m,i,o,a,s]);return x(pn.Provider,{value:_,children:e})};function hn(e,t,r){r===void 0&&(r={});var n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function Sr(e,t,r){if(r===void 0&&(r={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Mr(e[0])||!Mr(e[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:e};return hn(n,t,r)}function ma(e,t,r){r===void 0&&(r={});var n={type:"MultiPoint",coordinates:e};return hn(n,t,r)}function Mr(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function vn(e,t,r){if(e!==null)for(var n,i,o,a,s,u,d,h=0,m=0,_,y=e.type,b=y==="FeatureCollection",C=y==="Feature",w=b?e.features.length:1,v=0;v<w;v++){d=b?e.features[v].geometry:C?e.geometry:e,_=d?d.type==="GeometryCollection":!1,s=_?d.geometries.length:1;for(var g=0;g<s;g++){var l=0,c=0;if(a=_?d.geometries[g]:d,a!==null){u=a.coordinates;var p=a.type;switch(h=r&&(p==="Polygon"||p==="MultiPolygon")?1:0,p){case null:break;case"Point":if(t(u,m,v,l,c)===!1)return!1;m++,l++;break;case"LineString":case"MultiPoint":for(n=0;n<u.length;n++){if(t(u[n],m,v,l,c)===!1)return!1;m++,p==="MultiPoint"&&l++}p==="LineString"&&l++;break;case"Polygon":case"MultiLineString":for(n=0;n<u.length;n++){for(i=0;i<u[n].length-h;i++){if(t(u[n][i],m,v,l,c)===!1)return!1;m++}p==="MultiLineString"&&l++,p==="Polygon"&&c++}p==="Polygon"&&l++;break;case"MultiPolygon":for(n=0;n<u.length;n++){for(c=0,i=0;i<u[n].length;i++){for(o=0;o<u[n][i].length-h;o++){if(t(u[n][i][o],m,v,l,c)===!1)return!1;m++}c++}l++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(vn(a.geometries[n],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Tt(e){var t=[1/0,1/0,-1/0,-1/0];return vn(e,function(r){t[0]>r[0]&&(t[0]=r[0]),t[1]>r[1]&&(t[1]=r[1]),t[2]<r[0]&&(t[2]=r[0]),t[3]<r[1]&&(t[3]=r[1])}),t}Tt.default=Tt;var ya="Expected a function",Pr=0/0,_a="[object Symbol]",ba=/^\s+|\s+$/g,wa=/^[-+]0x[0-9a-f]+$/i,Ca=/^0b[01]+$/i,xa=/^0o[0-7]+$/i,Ia=parseInt,Sa=typeof D=="object"&&D&&D.Object===Object&&D,Ma=typeof self=="object"&&self&&self.Object===Object&&self,Pa=Sa||Ma||Function("return this")(),Aa=Object.prototype,Oa=Aa.toString,Ea=Math.max,La=Math.min,xt=function(){return Pa.Date.now()};function $a(e,t,r){var n,i,o,a,s,u,d=0,h=!1,m=!1,_=!0;if(typeof e!="function")throw new TypeError(ya);t=Ar(t)||0,Dt(r)&&(h=!!r.leading,m="maxWait"in r,o=m?Ea(Ar(r.maxWait)||0,t):o,_="trailing"in r?!!r.trailing:_);function y(f){var A=n,E=i;return n=i=void 0,d=f,a=e.apply(E,A),a}function b(f){return d=f,s=setTimeout(v,t),h?y(f):a}function C(f){var A=f-u,E=f-d,L=t-A;return m?La(L,o-E):L}function w(f){var A=f-u,E=f-d;return u===void 0||A>=t||A<0||m&&E>=o}function v(){var f=xt();if(w(f))return g(f);s=setTimeout(v,C(f))}function g(f){return s=void 0,_&&n?y(f):(n=i=void 0,a)}function l(){s!==void 0&&clearTimeout(s),d=0,n=u=i=s=void 0}function c(){return s===void 0?a:g(xt())}function p(){var f=xt(),A=w(f);if(n=arguments,i=this,u=f,A){if(s===void 0)return b(u);if(m)return s=setTimeout(v,t),y(u)}return s===void 0&&(s=setTimeout(v,t)),a}return p.cancel=l,p.flush=c,p}function Dt(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Ta(e){return!!e&&typeof e=="object"}function Da(e){return typeof e=="symbol"||Ta(e)&&Oa.call(e)==_a}function Ar(e){if(typeof e=="number")return e;if(Da(e))return Pr;if(Dt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Dt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(ba,"");var r=Ca.test(e);return r||xa.test(e)?Ia(e.slice(2),r?2:8):wa.test(e)?Pr:+e}var Fa=$a;const ja=()=>{const[e,t]=$.exports.useState(!1);return $.exports.useLayoutEffect(()=>{const r=()=>{t(window.innerWidth<jr.screenSizes.mobileL)};return window.addEventListener("resize",Fa(r,250)),r(),()=>window.removeEventListener("resize",r)},[]),e};function gn(){var s;const{client:e}=kt(),{sdkState:t}=Se(),r=Rt(t.options,250),{activeScore:n}=Z(),i=n?je[n]:void 0,a={...$.exports.useMemo(()=>r!=null&&r.marker?r.marker:{lat:r==null?void 0:r.lat,lng:r==null?void 0:r.lng},[r]),limit:10,radius:2e3,include:i};return jt(jn.list(a),async()=>e.getPois(a),{enabled:!!a&&!!((s=a.include)!=null&&s.length)&&!!a.lat&&!!a.lng})}function mn(){const{client:e}=kt(),{sdkState:t}=Se(),r=Rt(t.options,250),{activeScore:n}=Z(),i=n==="high_schools"||n==="primary_schools",a={...$.exports.useMemo(()=>r!=null&&r.marker?r.marker:{lat:r==null?void 0:r.lat,lng:r==null?void 0:r.lng},[r]),limit:10,radius:2e3};return jt(kn.list(a),async()=>e.getSchools(a),{enabled:!!a&&!!a.lat&&!!a.lng&&i})}const yn=re.createContext({}),_n=()=>$.exports.useContext(yn),ka=({children:e,mapRef:t,mapPadding:r})=>x(yn.Provider,{value:{mapRef:t,mapPadding:r},children:e});function Ft(e,t,r,n,i,o){if(i-n<=r)return;const a=n+i>>1;bn(e,t,a,n,i,o%2),Ft(e,t,r,n,a-1,o+1),Ft(e,t,r,a+1,i,o+1)}function bn(e,t,r,n,i,o){for(;i>n;){if(i-n>600){const d=i-n+1,h=r-n+1,m=Math.log(d),_=.5*Math.exp(2*m/3),y=.5*Math.sqrt(m*_*(d-_)/d)*(h-d/2<0?-1:1),b=Math.max(n,Math.floor(r-h*_/d+y)),C=Math.min(i,Math.floor(r+(d-h)*_/d+y));bn(e,t,r,b,C,o)}const a=t[2*r+o];let s=n,u=i;for(De(e,t,n,r),t[2*i+o]>a&&De(e,t,n,i);s<u;){for(De(e,t,s,u),s++,u--;t[2*s+o]<a;)s++;for(;t[2*u+o]>a;)u--}t[2*n+o]===a?De(e,t,n,u):(u++,De(e,t,u,i)),u<=r&&(n=u+1),r<=u&&(i=u-1)}}function De(e,t,r,n){It(e,r,n),It(t,2*r,2*n),It(t,2*r+1,2*n+1)}function It(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function Ra(e,t,r,n,i,o,a){const s=[0,e.length-1,0],u=[];let d,h;for(;s.length;){const m=s.pop(),_=s.pop(),y=s.pop();if(_-y<=a){for(let w=y;w<=_;w++)d=t[2*w],h=t[2*w+1],d>=r&&d<=i&&h>=n&&h<=o&&u.push(e[w]);continue}const b=Math.floor((y+_)/2);d=t[2*b],h=t[2*b+1],d>=r&&d<=i&&h>=n&&h<=o&&u.push(e[b]);const C=(m+1)%2;(m===0?r<=d:n<=h)&&(s.push(y),s.push(b-1),s.push(C)),(m===0?i>=d:o>=h)&&(s.push(b+1),s.push(_),s.push(C))}return u}function Na(e,t,r,n,i,o){const a=[0,e.length-1,0],s=[],u=i*i;for(;a.length;){const d=a.pop(),h=a.pop(),m=a.pop();if(h-m<=o){for(let w=m;w<=h;w++)Or(t[2*w],t[2*w+1],r,n)<=u&&s.push(e[w]);continue}const _=Math.floor((m+h)/2),y=t[2*_],b=t[2*_+1];Or(y,b,r,n)<=u&&s.push(e[_]);const C=(d+1)%2;(d===0?r-i<=y:n-i<=b)&&(a.push(m),a.push(_-1),a.push(C)),(d===0?r+i>=y:n+i>=b)&&(a.push(_+1),a.push(h),a.push(C))}return s}function Or(e,t,r,n){const i=e-r,o=t-n;return i*i+o*o}const Ba=e=>e[0],za=e=>e[1];class Er{constructor(t,r=Ba,n=za,i=64,o=Float64Array){this.nodeSize=i,this.points=t;const a=t.length<65536?Uint16Array:Uint32Array,s=this.ids=new a(t.length),u=this.coords=new o(t.length*2);for(let d=0;d<t.length;d++)s[d]=d,u[2*d]=r(t[d]),u[2*d+1]=n(t[d]);Ft(s,u,i,0,s.length-1,0)}range(t,r,n,i){return Ra(this.ids,this.coords,t,r,n,i,this.nodeSize)}within(t,r,n){return Na(this.ids,this.coords,t,r,n,this.nodeSize)}}const Ua={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},it=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1));class qa{constructor(t){this.options=Be(Object.create(Ua),t),this.trees=new Array(this.options.maxZoom+1)}load(t){const{log:r,minZoom:n,maxZoom:i,nodeSize:o}=this.options;r&&console.time("total time");const a=`prepare ${t.length} points`;r&&console.time(a),this.points=t;let s=[];for(let u=0;u<t.length;u++)!t[u].geometry||s.push(Ka(t[u],u));this.trees[i+1]=new Er(s,$r,Tr,o,Float32Array),r&&console.timeEnd(a);for(let u=i;u>=n;u--){const d=+Date.now();s=this._cluster(s,u),this.trees[u]=new Er(s,$r,Tr,o,Float32Array),r&&console.log("z%d: %d clusters in %dms",u,s.length,+Date.now()-d)}return r&&console.timeEnd("total time"),this}getClusters(t,r){let n=((t[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,t[1]));let o=t[2]===180?180:((t[2]+180)%360+360)%360-180;const a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,o=180;else if(n>o){const h=this.getClusters([n,i,180,a],r),m=this.getClusters([-180,i,o,a],r);return h.concat(m)}const s=this.trees[this._limitZoom(r)],u=s.range(et(n),tt(a),et(o),tt(i)),d=[];for(const h of u){const m=s.points[h];d.push(m.numPoints?Lr(m):this.points[m.index])}return d}getChildren(t){const r=this._getOriginId(t),n=this._getOriginZoom(t),i="No cluster with the specified id.",o=this.trees[n];if(!o)throw new Error(i);const a=o.points[r];if(!a)throw new Error(i);const s=this.options.radius/(this.options.extent*Math.pow(2,n-1)),u=o.within(a.x,a.y,s),d=[];for(const h of u){const m=o.points[h];m.parentId===t&&d.push(m.numPoints?Lr(m):this.points[m.index])}if(d.length===0)throw new Error(i);return d}getLeaves(t,r,n){r=r||10,n=n||0;const i=[];return this._appendLeaves(i,t,r,n,0),i}getTile(t,r,n){const i=this.trees[this._limitZoom(t)],o=Math.pow(2,t),{extent:a,radius:s}=this.options,u=s/a,d=(n-u)/o,h=(n+1+u)/o,m={features:[]};return this._addTileFeatures(i.range((r-u)/o,d,(r+1+u)/o,h),i.points,r,n,o,m),r===0&&this._addTileFeatures(i.range(1-u/o,d,1,h),i.points,o,n,o,m),r===o-1&&this._addTileFeatures(i.range(0,d,u/o,h),i.points,-1,n,o,m),m.features.length?m:null}getClusterExpansionZoom(t){let r=this._getOriginZoom(t)-1;for(;r<=this.options.maxZoom;){const n=this.getChildren(t);if(r++,n.length!==1)break;t=n[0].properties.cluster_id}return r}_appendLeaves(t,r,n,i,o){const a=this.getChildren(r);for(const s of a){const u=s.properties;if(u&&u.cluster?o+u.point_count<=i?o+=u.point_count:o=this._appendLeaves(t,u.cluster_id,n,i,o):o<i?o++:t.push(s),t.length===n)break}return o}_addTileFeatures(t,r,n,i,o,a){for(const s of t){const u=r[s],d=u.numPoints;let h,m,_;if(d)h=wn(u),m=u.x,_=u.y;else{const C=this.points[u.index];h=C.properties,m=et(C.geometry.coordinates[0]),_=tt(C.geometry.coordinates[1])}const y={type:1,geometry:[[Math.round(this.options.extent*(m*o-n)),Math.round(this.options.extent*(_*o-i))]],tags:h};let b;d?b=u.id:this.options.generateId?b=u.index:this.points[u.index].id&&(b=this.points[u.index].id),b!==void 0&&(y.id=b),a.features.push(y)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,r){const n=[],{radius:i,extent:o,reduce:a,minPoints:s}=this.options,u=i/(o*Math.pow(2,r));for(let d=0;d<t.length;d++){const h=t[d];if(h.zoom<=r)continue;h.zoom=r;const m=this.trees[r+1],_=m.within(h.x,h.y,u),y=h.numPoints||1;let b=y;for(const C of _){const w=m.points[C];w.zoom>r&&(b+=w.numPoints||1)}if(b>y&&b>=s){let C=h.x*y,w=h.y*y,v=a&&y>1?this._map(h,!0):null;const g=(d<<5)+(r+1)+this.points.length;for(const l of _){const c=m.points[l];if(c.zoom<=r)continue;c.zoom=r;const p=c.numPoints||1;C+=c.x*p,w+=c.y*p,c.parentId=g,a&&(v||(v=this._map(h,!0)),a(v,this._map(c)))}h.parentId=g,n.push(Va(C/b,w/b,g,b,v))}else if(n.push(h),b>1)for(const C of _){const w=m.points[C];w.zoom<=r||(w.zoom=r,n.push(w))}}return n}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,r){if(t.numPoints)return r?Be({},t.properties):t.properties;const n=this.points[t.index].properties,i=this.options.map(n);return r&&i===n?Be({},i):i}}function Va(e,t,r,n,i){return{x:it(e),y:it(t),zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function Ka(e,t){const[r,n]=e.geometry.coordinates;return{x:it(et(r)),y:it(tt(n)),zoom:1/0,index:t,parentId:-1}}function Lr(e){return{type:"Feature",id:e.id,properties:wn(e),geometry:{type:"Point",coordinates:[Ga(e.x),Wa(e.y)]}}}function wn(e){const t=e.numPoints,r=t>=1e4?`${Math.round(t/1e3)}k`:t>=1e3?`${Math.round(t/100)/10}k`:t;return Be(Be({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:r})}function et(e){return e/360+.5}function tt(e){const t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function Ga(e){return(e-.5)*360}function Wa(e){const t=(180-e*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function Be(e,t){for(const r in t)e[r]=t[r];return e}function $r(e){return e.x}function Tr(e){return e.y}var Dr=Object.prototype.hasOwnProperty;function Fr(e,t,r){for(r of e.keys())if(fe(r,t))return r}function fe(e,t){var r,n,i;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((n=e.length)===t.length)for(;n--&&fe(e[n],t[n]););return n===-1}if(r===Set){if(e.size!==t.size)return!1;for(n of e)if(i=n,i&&typeof i=="object"&&(i=Fr(t,i),!i)||!t.has(i))return!1;return!0}if(r===Map){if(e.size!==t.size)return!1;for(n of e)if(i=n[0],i&&typeof i=="object"&&(i=Fr(t,i),!i)||!fe(n[1],t.get(i)))return!1;return!0}if(r===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(r===DataView){if((n=e.byteLength)===t.byteLength)for(;n--&&e.getInt8(n)===t.getInt8(n););return n===-1}if(ArrayBuffer.isView(e)){if((n=e.byteLength)===t.byteLength)for(;n--&&e[n]===t[n];);return n===-1}if(!r||typeof e=="object"){n=0;for(r in e)if(Dr.call(e,r)&&++n&&!Dr.call(t,r)||!(r in t)||!fe(e[r],t[r]))return!1;return Object.keys(t).length===n}}return e!==e&&t!==t}function Ja(e){var t=$.exports.useRef(e),r=$.exports.useRef(0);return fe(e,t.current)||(t.current=e,r.current+=1),$.exports.useMemo(function(){return t.current},[r.current])}function Za(e,t){return $.exports.useEffect(e,Ja(t))}var Ha=function(t){var r=t.points,n=t.bounds,i=t.zoom,o=t.options,a=$.exports.useRef(),s=$.exports.useRef(),u=$.exports.useState([]),d=u[0],h=u[1],m=Math.round(i);return Za(function(){(!a.current||!fe(s.current,r)||!fe(a.current.options,o))&&(a.current=new qa(o),a.current.load(r)),n&&h(a.current.getClusters(n,m)),s.current=r},[r,n,m,o]),{clusters:d,supercluster:a.current}};const Qa=T.div`
|
|
2
2
|
border-radius: 50%;
|
|
3
3
|
background: linear-gradient(
|
|
4
4
|
to top,
|
|
@@ -17,7 +17,7 @@ var Dn=Object.defineProperty;var Fn=(e,t,r)=>t in e?Dn(e,t,{enumerable:!0,config
|
|
|
17
17
|
border: 2px solid #fff;
|
|
18
18
|
box-shadow: ${P["--ll-shadow-small"]};
|
|
19
19
|
cursor: default;
|
|
20
|
-
`,Ya=({cluster:e,pointsCount:t,onClick:r})=>{const i=20+e.properties.point_count/t*25;return x(Qa,{diameter:i,onClick:()=>r&&r(e),children:e.properties.point_count})};function Xa(e){return e.properties.cluster!==void 0}const Cn=re.memo(({rect:e,zoom:t,mapRef:r,points:n,isMobile:i,activePOI:o,hoveredPOI:a,isMapMoving:s,setActivePOI:u})=>{var _;const d=(_=r==null?void 0:r.current)==null?void 0:_.getMap().getBounds().toArray().flat(),{clusters:h,supercluster:m}=Ha({points:n,bounds:d,zoom:t,options:{radius:50,maxZoom:18}});return x(Nt,{children:h.map((y,b)=>{const[C,w]=y.geometry.coordinates;if(Xa(y))return x(pr,{latitude:w,longitude:C,children:x(Ya,{cluster:y,pointsCount:n.length,onClick:()=>{var A;const f=Math.min(m.getClusterExpansionZoom(y.id),20);(A=r.current)==null||A.flyTo({zoom:f,center:[C,w],duration:1e3})}})},`cluster-${y.id}`);const{poi:v,type:g}=y.properties,l=o===v,c=a===v,p=["rapid_transit_stations"];return x(pr,{latitude:v.lat,longitude:v.lng,style:{zIndex:l?1:0},children:B(gt.Root,{options:{type:g,poi:v,isOpen:s?!1:l,isHovered:c,side:"top",size:p.includes(g)?"medium":"small",collisionPadding:i?{top:e.height+32,bottom:ge*2,left:ge*2,right:ge*2}:{left:e.width+32,right:ge*2,top:ge*2,bottom:ge*2}},onChange:f=>{f.type==="open-change"&&(f.data?setTimeout(()=>{u(v)},0):l&&u(void 0))},children:[x(gt.Marker,{}),x(gt.Content,{})]})},`${v.name}-${v.lat}-${v.lng}-${b}`)})})});Cn.displayName="Markers";const xn=e=>$.exports.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},$.exports.createElement("path",{d:"M12 2C8.13 2 5 5.13 5 9C5 14.25 12 22 12 22C12 22 19 14.25 19 9C19 5.13 15.87 2 12 2ZM12 11.5C10.62 11.5 9.5 10.38 9.5 9C9.5 7.62 10.62 6.5 12 6.5C13.38 6.5 14.5 7.62 14.5 9C14.5 10.38 13.38 11.5 12 11.5Z"})),In=e=>$.exports.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},$.exports.createElement("path",{d:"M10 20V14H14V20H19V12H22L12 3L2 12H5V20H10Z"}));function ur(e){const{client:t}=kt(),{sdkState:r}=Se(),n=Rt(r.options,250),o={...$.exports.useMemo(()=>n!=null&&n.marker?n.marker:{lat:n==null?void 0:n.lat,lng:n==null?void 0:n.lng},[n]),geographyLevels:["20","30"],locationScoresRounding:!1,include:e};return jt(Rn.list(o),async()=>t.getScores(o),{enabled:!!o})}const es=T.div`
|
|
20
|
+
`,Ya=({cluster:e,pointsCount:t,onClick:r})=>{const i=20+e.properties.point_count/t*25;return x(Qa,{diameter:i,onClick:()=>r&&r(e),children:e.properties.point_count})};function Xa(e){return e.properties.cluster!==void 0}const Cn=re.memo(({rect:e,zoom:t,mapRef:r,points:n,isMobile:i,activePOI:o,hoveredPOI:a,isMapMoving:s,setActivePOI:u})=>{var _;const d=(_=r==null?void 0:r.current)==null?void 0:_.getMap().getBounds().toArray().flat(),{clusters:h,supercluster:m}=Ha({points:n,bounds:d,zoom:t,options:{radius:50,maxZoom:18}});return x(Nt,{children:h.map((y,b)=>{const[C,w]=y.geometry.coordinates;if(Xa(y))return x(pr,{latitude:w,longitude:C,children:x(Ya,{cluster:y,pointsCount:n.length,onClick:()=>{var A;const f=Math.min(m.getClusterExpansionZoom(y.id),20);(A=r.current)==null||A.flyTo({zoom:f,center:[C,w],duration:1e3,essential:!0})}})},`cluster-${y.id}`);const{poi:v,type:g}=y.properties,l=o===v,c=a===v,p=["rapid_transit_stations"];return x(pr,{latitude:v.lat,longitude:v.lng,style:{zIndex:l?1:0},children:B(gt.Root,{options:{type:g,poi:v,isOpen:s?!1:l,isHovered:c,side:"top",size:p.includes(g)?"medium":"small",collisionPadding:i?{top:e.height+32,bottom:ge*2,left:ge*2,right:ge*2}:{left:e.width+32,right:ge*2,top:ge*2,bottom:ge*2}},onChange:f=>{f.type==="open-change"&&(f.data?setTimeout(()=>{u(v)},0):l&&u(void 0))},children:[x(gt.Marker,{}),x(gt.Content,{})]})},`${v.name}-${v.lat}-${v.lng}-${b}`)})})});Cn.displayName="Markers";const xn=e=>$.exports.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},$.exports.createElement("path",{d:"M12 2C8.13 2 5 5.13 5 9C5 14.25 12 22 12 22C12 22 19 14.25 19 9C19 5.13 15.87 2 12 2ZM12 11.5C10.62 11.5 9.5 10.38 9.5 9C9.5 7.62 10.62 6.5 12 6.5C13.38 6.5 14.5 7.62 14.5 9C14.5 10.38 13.38 11.5 12 11.5Z"})),In=e=>$.exports.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},$.exports.createElement("path",{d:"M10 20V14H14V20H19V12H22L12 3L2 12H5V20H10Z"}));function ur(e){const{client:t}=kt(),{sdkState:r}=Se(),n=Rt(r.options,250),o={...$.exports.useMemo(()=>n!=null&&n.marker?n.marker:{lat:n==null?void 0:n.lat,lng:n==null?void 0:n.lng},[n]),geographyLevels:["20","30"],locationScoresRounding:!1,include:e};return jt(Rn.list(o),async()=>t.getScores(o),{enabled:!!o})}const es=T.div`
|
|
21
21
|
padding: ${P["--ll-spacing-small"]} ${P["--ll-spacing-medium"]};
|
|
22
22
|
background-color: ${P["--ll-color-surface"]};
|
|
23
23
|
display: flex;
|
|
@@ -133,7 +133,7 @@ var Dn=Object.defineProperty;var Fn=(e,t,r)=>t in e?Dn(e,t,{enumerable:!0,config
|
|
|
133
133
|
&:empty {
|
|
134
134
|
margin: 0;
|
|
135
135
|
}
|
|
136
|
-
`,ys=({score:e})=>{const{data:t,isLoading:r}=mn(),{activePOI:n,setActivePOI:i,hoveredPOI:o,setHoveredPOI:a}=Z(),{mapRef:s,mapPadding:u}=_n();return r?x(Nt,{children:[...Array(10)].map((d,h)=>x(cr,{children:x(ot,{height:"34px",width:"100%"})},h))}):t?x(Rr.Root,{options:{type:"school",data:t==null?void 0:t[e],activePOI:n,hoveredPOI:o},onChange:d=>{var h;if(d.type==="poi-click"){const m=d.data;i(m);const _=window.innerWidth-u.left,y=window.innerWidth/2,b=_/2+u.left-y;m&&((h=s.current)==null||h.easeTo({zoom:18,center:[m.lng,m.lat],duration:1e3,offset:[b,0]}))}d.type==="poi-hover"&&a(d.data)}}):null},Pn=re.memo(({result:e,poi:t})=>{const{activePOI:r,setActivePOI:n,hoveredPOI:i,setHoveredPOI:o}=Z(),{mapRef:a,mapPadding:s}=_n();return!e.data||!e.data[t]?null:x(St.Content,{options:{value:t},children:x(Rr.Root,{options:{type:"poi",data:e.data[t],activePOI:r,hoveredPOI:i},onChange:u=>{var d;if(u.type==="poi-click"){const h=u.data;n(h);const m=window.innerWidth-s.left,_=window.innerWidth/2,y=m/2+s.left-_;h&&((d=a.current)==null||d.flyTo({zoom:18,center:[h.lng,h.lat],duration:1e3,offset:[y,0]}))}u.type==="poi-hover"&&o(u.data)}})},t)});Pn.displayName="POI";const An=re.memo(({include:e})=>{const t=gn();return t.isLoading&&e.length?x(Nt,{children:[...Array(10)].map((r,n)=>x(cr,{children:x(ot,{height:"34px",width:"100%"})},n))}):t.data?B(St.Root,{options:{include:e},children:[x(St.Tabs,{}),e.map(r=>x(Pn,{poi:r,result:t},r))]}):null});An.displayName="POIs";const On=re.memo(({score:e,isLoading:t,scoresData:r})=>{var a,s;const{sdkState:n}=Se(),{activeScore:i}=Z(),o=e===i;return t?x(cr,{children:x(ot,{height:"34px",width:"100%"},e)}):r!=null&&r.location[e]?x(Un,{value:e,children:B(z.Root,{options:{score:e,scoresData:r},onChange:u=>{u.type==="tooltip-toggle"&&u.data&&Re.trackEvent(Ne.LC_LONG_DESCRIPTION_VIEW,e)},children:[x(ps,{children:B(Mn,{children:[x(gs,{children:x(Qn,{SVGElement:qn,fill:P["--ll-color-on-background-variant1"]})}),x(Fe,{spacing:"--ll-spacing-small"}),x(z.Icon,{}),x(Fe,{spacing:"--ll-spacing-small"}),x(z.Title,{}),x(Fe,{}),x(z.Badge,{options:{isPrimary:o}})]})}),x(hs,{children:B(vs,{children:[x(z.Description,{}),x(Fe,{vertical:!0,spacing:"--ll-spacing-small"}),x(z.BarChart,{options:{locationIcon:((s=(a=n.options)==null?void 0:a.marker)==null?void 0:s.icon)==="pin"?xn:In}}),x(ms,{children:e==="high_schools"||e==="primary_schools"?x(ys,{score:e}):x(An,{include:je[e]})})]})})]})},e):null});On.displayName="Score";const _s=T.div`
|
|
136
|
+
`,ys=({score:e})=>{const{data:t,isLoading:r}=mn(),{activePOI:n,setActivePOI:i,hoveredPOI:o,setHoveredPOI:a}=Z(),{mapRef:s,mapPadding:u}=_n();return r?x(Nt,{children:[...Array(10)].map((d,h)=>x(cr,{children:x(ot,{height:"34px",width:"100%"})},h))}):t?x(Rr.Root,{options:{type:"school",data:t==null?void 0:t[e],activePOI:n,hoveredPOI:o},onChange:d=>{var h;if(d.type==="poi-click"){const m=d.data;i(m);const _=window.innerWidth-u.left,y=window.innerWidth/2,b=_/2+u.left-y;m&&((h=s.current)==null||h.easeTo({zoom:18,center:[m.lng,m.lat],duration:1e3,offset:[b,0]}))}d.type==="poi-hover"&&a(d.data)}}):null},Pn=re.memo(({result:e,poi:t})=>{const{activePOI:r,setActivePOI:n,hoveredPOI:i,setHoveredPOI:o}=Z(),{mapRef:a,mapPadding:s}=_n();return!e.data||!e.data[t]?null:x(St.Content,{options:{value:t},children:x(Rr.Root,{options:{type:"poi",data:e.data[t],activePOI:r,hoveredPOI:i},onChange:u=>{var d;if(u.type==="poi-click"){const h=u.data;n(h);const m=window.innerWidth-s.left,_=window.innerWidth/2,y=m/2+s.left-_;h&&((d=a.current)==null||d.flyTo({zoom:18,center:[h.lng,h.lat],duration:1e3,offset:[y,0],essential:!0}))}u.type==="poi-hover"&&o(u.data)}})},t)});Pn.displayName="POI";const An=re.memo(({include:e})=>{const t=gn();return t.isLoading&&e.length?x(Nt,{children:[...Array(10)].map((r,n)=>x(cr,{children:x(ot,{height:"34px",width:"100%"})},n))}):t.data?B(St.Root,{options:{include:e},children:[x(St.Tabs,{}),e.map(r=>x(Pn,{poi:r,result:t},r))]}):null});An.displayName="POIs";const On=re.memo(({score:e,isLoading:t,scoresData:r})=>{var a,s;const{sdkState:n}=Se(),{activeScore:i}=Z(),o=e===i;return t?x(cr,{children:x(ot,{height:"34px",width:"100%"},e)}):r!=null&&r.location[e]?x(Un,{value:e,children:B(z.Root,{options:{score:e,scoresData:r},onChange:u=>{u.type==="tooltip-toggle"&&u.data&&Re.trackEvent(Ne.LC_LONG_DESCRIPTION_VIEW,e)},children:[x(ps,{children:B(Mn,{children:[x(gs,{children:x(Qn,{SVGElement:qn,fill:P["--ll-color-on-background-variant1"]})}),x(Fe,{spacing:"--ll-spacing-small"}),x(z.Icon,{}),x(Fe,{spacing:"--ll-spacing-small"}),x(z.Title,{}),x(Fe,{}),x(z.Badge,{options:{isPrimary:o}})]})}),x(hs,{children:B(vs,{children:[x(z.Description,{}),x(Fe,{vertical:!0,spacing:"--ll-spacing-small"}),x(z.BarChart,{options:{locationIcon:((s=(a=n.options)==null?void 0:a.marker)==null?void 0:s.icon)==="pin"?xn:In}}),x(ms,{children:e==="high_schools"||e==="primary_schools"?x(ys,{score:e}):x(An,{include:je[e]})})]})})]})},e):null});On.displayName="Score";const _s=T.div`
|
|
137
137
|
padding: ${P["--ll-spacing-small"]} ${P["--ll-spacing-medium"]};
|
|
138
138
|
`,bs=T.div`
|
|
139
139
|
display: flex;
|