@local-logic/sdks-app 1.0.0-beta.53 → 1.0.0-beta.55

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.
Files changed (33) hide show
  1. package/dist/assets/auto-track.000d2da6.js +1 -0
  2. package/dist/assets/{chevron_right.f4a05ecb.js → chevron_right.f7f802f5.js} +5 -5
  3. package/dist/assets/index.1fe3a37f.js +183 -0
  4. package/dist/assets/index.252bea88.js +1 -0
  5. package/dist/assets/{index.039c8af5.js → index.6af2d34a.js} +46 -46
  6. package/dist/assets/{index.bd887e31.js → index.85e812f8.js} +16 -16
  7. package/dist/assets/index.95833aec.js +1345 -0
  8. package/dist/assets/index.b5fad94d.js +1 -0
  9. package/dist/assets/index.bec88049.js +1 -0
  10. package/dist/assets/index.e9c00339.js +1 -0
  11. package/dist/assets/index.f4705c55.js +1 -0
  12. package/dist/assets/index.umd.8e71fd05.js +1 -0
  13. package/dist/assets/is-plan-event-enabled.681b46ca.js +1 -0
  14. package/dist/index.html +1 -1
  15. package/dist/types/constants/tracking.d.ts +20 -0
  16. package/dist/types/constants/tracking.d.ts.map +1 -0
  17. package/dist/types/constants/tracking.js +21 -0
  18. package/dist/types/constants/tracking.js.map +1 -0
  19. package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/Score/index.d.ts.map +1 -1
  20. package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/Score/index.js +6 -0
  21. package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/Score/index.js.map +1 -1
  22. package/dist/types/sdks/LocalContent/context.d.ts.map +1 -1
  23. package/dist/types/sdks/LocalContent/context.js +19 -1
  24. package/dist/types/sdks/LocalContent/context.js.map +1 -1
  25. package/dist/types/sdks/LocalContent/index.d.ts.map +1 -1
  26. package/dist/types/sdks/LocalContent/index.js +6 -2
  27. package/dist/types/sdks/LocalContent/index.js.map +1 -1
  28. package/dist/types/services/tracking/index.d.ts +11 -0
  29. package/dist/types/services/tracking/index.d.ts.map +1 -0
  30. package/dist/types/services/tracking/index.js +20 -0
  31. package/dist/types/services/tracking/index.js.map +1 -0
  32. package/package.json +14 -3
  33. package/dist/assets/index.8143f5fa.js +0 -183
@@ -0,0 +1,183 @@
1
+ import{c as D,u as zt,p as Fn,s as jn,M as vr,a as kn,$ as Rn,b as Nn,d as zn,e as Bn,S as Vn,f as Un,g as qn,h as Gn,m as Kn,N as Hn,P as Zn}from"./chevron_right.f7f802f5.js";import{_ as ee,a as S,b as I,c as M,d as Wn,e as z,f as K,R as te,r as L,$ as Nr,j as C,s as Ve,i as he,u as at,g as st,h as Bt,k as $,y as P,F as ut,l as N,m as _t,I as be,U as zr,n as Br,O as lt,o as V,p as He,S as Ze,T as Jn,q as ke,t as Qn,v as Ye,w as Yn,x as Xn,z as ei,A as ti}from"./index.85e812f8.js";function ve(e){return typeof e=="string"}function Et(e){return typeof e=="number"}function Se(e){return typeof e=="function"}function H(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 ve(i)}var Te=function(e){ee(t,e);function t(r,n){var i=e.call(this,n)||this;return i.field=r,i}return t}(Error);function _e(e){var t,r=e&&e.event&&e.event.type,n=e.event;if(n===void 0)throw new Te("event","Event is missing");if(!ve(r))throw new Te("event","Event is not a string");if(r==="track"&&!ve(n.event))throw new Te("event","Event is not a string");var i=(t=n.properties)!==null&&t!==void 0?t:n.traits;if(r!=="alias"&&!H(i))throw new Te("properties","properties is not an object");if(!ri(n))throw new Te("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:_e,identify:_e,page:_e,alias:_e,group:_e,screen:_e};function ii(e,t,r,n){var i,o=[e,t,r,n],a=H(e)?e.event:e;if(!a||!ve(a))throw new Error("Event missing");var s=H(e)?(i=e.properties)!==null&&i!==void 0?i:{}:H(t)?t:{},u={};H(t)&&!Se(r)&&(u=r!=null?r:{}),H(e)&&!Se(t)&&(u=t!=null?t:{});var d=o.find(Se);return[a,s,u,d]}function gr(e,t,r,n,i){var o,a,s=null,u=null,d=[e,t,r,n,i],h=d.filter(ve);h[0]!==void 0&&h[1]!==void 0&&(s=h[0],u=h[1]),h.length===1&&(s=null,u=h[0]);var g=d.find(Se),b=d.filter(function(x){return u===null?H(x):H(x)||x===null}),y=(o=b[0])!==null&&o!==void 0?o:{},_=(a=b[1])!==null&&a!==void 0?a:{};return[s,u,y,_,g]}var mr=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(ve))!==null&&t!==void 0?t:(r=a.find(Et))===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:e.id();var d=a.filter(function(y){return u===null?H(y):H(y)||y===null}),h=(i=d[0])!==null&&i!==void 0?i:{},g=(o=d[1])!==null&&o!==void 0?o:{},b=a.find(Se);return[u,h,g,b]}};function oi(e,t,r,n){Et(e)&&(e=e.toString()),Et(t)&&(t=t.toString());var i=[e,t,r,n],o=i.filter(ve),a=o[0],s=a===void 0?e:a,u=o[1],d=u===void 0?null:u,h=i.filter(H)[0],g=h===void 0?{}:h,b=i.find(Se);return[s,d,g,b]}function ct(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 ct(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 Vt(){return typeof window!="undefined"}function Fs(){return!Vt()}function Vr(){return Vt()?window.navigator.onLine:!0}function nt(){return!Vr()}var fe=256,Xe=[],We;for(;fe--;)Xe[fe]=(fe+256).toString(16).substring(1);function Ut(){var e=0,t,r="";if(!We||fe+16>256){for(We=Array(e=256);e--;)We[e]=256*Math.random()|0;e=fe=0}for(;e<16;e++)t=We[fe+e],e==6?r+=Xe[t&15|64]:e==8?r+=Xe[t&63|128]:r+=Xe[t],e&1&&e>1&&e<11&&(r+="-");return fe++,r}function it(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(".")?{}:[]}var js=Object.freeze(Object.defineProperty({__proto__:null,dset:it},Symbol.toStringTag,{value:"Module"})),li=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=S(S({},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())),S(S({},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}(),ci=li,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 S(S({},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}(),pi=di;function Ae(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,g,b){o.push(g=g.toLowerCase()),a.push([g,b]),s[g]=s[g]?s[g]+","+b:b}),r(u())},i.onerror=n,i.withCredentials=t.credentials=="include",t.headers)i.setRequestHeader(d,t.headers[d]);i.send(t.body||null)})}var Me="1.44.0";/*! js-cookie v3.0.1 | MIT */function Je(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 Lt(e,t){function r(i,o,a){if(typeof document!="undefined"){a=Je({},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=="undefined"||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{}}return i?a[i]:a}}return Object.create({set:r,get:n,remove:function(i,o){r(i,"",Je({},o,{expires:-1}))},withAttributes:function(i){return Lt(this.converter,Je({},this.attributes,i))},withConverter:function(i){return Lt(Je({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var q=Lt(hi,{path:"/"});function vi(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{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{return}}function Ur(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{return}}}var De;function yi(){if(De)return De;var e=Ur(window.location.href);return De={expires:31536e6,secure:!1,path:"/"},e&&(De.domain=e),De}var bi="npm";function qr(){return bi}function _i(){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=S(S({},t.referrer),i)),r||q.set("s:context.referrer",JSON.stringify(i),yi()))}function Si(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,g=t.anonymousId;delete t.options,t.writeKey=r==null?void 0:r.apiKey,h.userAgent=window.navigator.userAgent;var b=navigator.userLanguage||navigator.language;if(typeof h.locale=="undefined"&&typeof b!="undefined"&&(h.locale=b),!h.library){var y=qr();y==="web"?h.library={name:"analytics.js",version:"next-".concat(Me)}:h.library={name:"analytics.js",version:"npm:next-".concat(Me)}}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(g),t.sentAt=new Date;var _=e.queue.failedInitializations||[];_.length>0&&(t._metadata={failedInitializations:_});var x=[],w=[];for(var v in n){var m=n[v];v==="Segment.io"&&x.push(v),m.bundlingStatus==="bundled"&&x.push(v),m.bundlingStatus==="unbundled"&&w.push(v)}for(var c=0,l=(r==null?void 0:r.unbundledIntegrations)||[];c<l.length;c++){var p=l[c];w.includes(p)||w.push(p)}var f=(s=r==null?void 0:r.maybeBundledConfigIds)!==null&&s!==void 0?s:{},E=[];x.sort().forEach(function(T){var B;((B=f[T])!==null&&B!==void 0?B:[]).forEach(function(k){E.push(k)})}),(r==null?void 0:r.addBundledMetadata)!==!1&&(t._metadata=S(S({},t._metadata),{bundled:x.sort(),unbundled:w.sort(),bundledIds:E}));var O=_i();return O&&(h.amp={id:O}),t}function wt(e){console.error("Error sending segment performance metrics",e)}var Ii=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(wt),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=qr();i==="web"?n.library_version="next-".concat(Me):n.library_version="npm:next-".concat(Me),this.queue.push({type:"Counter",metric:t,value:1,tags:n}),t.includes("error")&&this.flush().catch(wt)}},e.prototype.flush=function(){return I(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){wt(n),t.sampleRate=0})];case 1:return r.sent(),[2]}})})},e.prototype.send=function(){return I(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,Ae(n,{headers:r,body:JSON.stringify(t),method:"POST"})]})})},e}(),ge=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}(),yr,Y=function(){function e(t,r){this.logger=new ci,this.cancel=function(n){throw n||new ge({reason:"Context Cancel"})},this._attempts=0,this._event=t,this._id=r!=null?r:Ut(),this.stats=new pi(yr)}return e.initMetrics=function(t){yr=new Ii(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 it(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}(),qt=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}(),le={},re={},Gt={},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,g){var b=g&&a(g.normalizer)?g.normalizer:o;d=b(d);for(var y,_=!1;!_;)x();function x(){for(y in u){var w=b(y);if(d.indexOf(w)===0){var v=d.substr(w.length);if(v.charAt(0)==="."||v.length===0){d=v.substr(1);var m=u[y];if(m==null){_=!0;return}if(!d.length){_=!0;return}u=m;return}}}y=void 0,_=!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(Gt,"__esModule",{value:!0});var ue=Mi(Ue.exports);function we(e,t){return function(){var r=this.traits(),n=this.properties?this.properties():{};return ue.default(r,"address."+e)||ue.default(r,e)||(t?ue.default(r,"address."+t):null)||(t?ue.default(r,t):null)||ue.default(n,"address."+e)||ue.default(n,e)||(t?ue.default(n,"address."+t):null)||(t?ue.default(n,t):null)}}function Pi(e){e.zip=we("postalCode","zip"),e.country=we("country"),e.street=we("street"),e.state=we("state"),e.city=we("city"),e.region=we("region")}Gt.default=Pi;var ft={};Object.defineProperty(ft,"__esModule",{value:!0});ft.clone=void 0;function $t(e){if(Object.prototype.toString.call(e)==="[object Object]"){var t={};for(var r in e)t[r]=$t(e[r]);return t}else return Array.isArray(e)?e.map($t):e}ft.clone=$t;var Kt={};Object.defineProperty(Kt,"__esModule",{value:!0});var Ai={Salesforce:!0};function Oi(e){return!Ai[e]}Kt.default=Oi;var dt={},Gr=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;dt.parse=function(e){var t=[1,5,6,7,11,12],r=Gr.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)};dt.is=function(e,t){return typeof e!="string"||t&&/^\d{4}-\d{2}-\d{2}/.test(e)===!1?!1:Gr.test(e)};var Ht={},Ei=/\d{13}/;Ht.is=function(e){return Ei.test(e)};Ht.parse=function(e){return e=parseInt(e,10),new Date(e)};var Zt={},Li=/\d{10}/;Zt.is=function(e){return Li.test(e)};Zt.parse=function(e){var t=parseInt(e,10)*1e3;return new Date(t)};var br=dt,_r=Ht,wr=Zt,$i=Object.prototype,Kr=$i.toString;function Ti(e){return Kr.call(e)==="[object Date]"}function Di(e){return Kr.call(e)==="[object Number]"}var Wt=function(t){return Ti(t)?t:Di(t)?new Date(Fi(t)):br.is(t)?br.parse(t):_r.is(t)?_r.parse(t):wr.is(t)?wr.parse(t):new Date(t)};function Fi(e){return e<315576e5?e*1e3:e}var Cr=dt,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):Cr.is(e,t)?Cr.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(re,"__esModule",{value:!0});re.Facade=void 0;var Ni=qe(Gt),Pe=ft,zi=qe(Kt),Bi=qe(Wt),Tt=qe(Ue.exports),Vi=qe(ji);function G(e,t){t=t||{},this.raw=Pe.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=Pe.clone(e)),"traverse"in t||(t.traverse=!0),"timestamp"in e?e.timestamp=Bi.default(e.timestamp):e.timestamp=new Date,t.traverse&&Vi.default(e),this.opts=t,this.obj=e}re.Facade=G;var F=G.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?Dt(r):r:(r=Tt.default(r,t.join(".")),this.opts.clone?Dt(r):r))};F.field=function(e){var t=this.obj[e];return this.opts.clone?Dt(t):t};G.proxy=function(e){return function(){return this.proxy(e)}};G.field=function(e){return function(){return this.field(e)}};G.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?Pe.clone(r):r]),r||[]}};G.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?Pe.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?Pe.clone(t):t;if(!e)return r;if(!!this.enabled(e)){var n=this.integrations(),i=n[e]||Tt.default(n,e);return typeof i!="object"&&(i=Tt.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&&zi.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=G.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=G.proxy("context.userAgent");F.timezone=G.proxy("context.timezone");F.timestamp=G.field("timestamp");F.channel=G.field("channel");F.ip=G.proxy("context.ip");F.userId=G.field("userId");Ni.default(F);function Dt(e){return Pe.clone(e)}var pt={},ie={exports:{}};typeof Object.create=="function"?ie.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:ie.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 Ui=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pt,"__esModule",{value:!0});pt.Alias=void 0;var qi=Ui(ie.exports),Hr=re;function Z(e,t){Hr.Facade.call(this,e,t)}pt.Alias=Z;qi.default(Z,Hr.Facade);Z.prototype.action=function(){return"alias"};Z.prototype.type=Z.prototype.action;Z.prototype.previousId=function(){return this.field("previousId")||this.field("from")};Z.prototype.from=Z.prototype.previousId;Z.prototype.userId=function(){return this.field("userId")||this.field("to")};Z.prototype.to=Z.prototype.userId;var ht={},Oe={};Object.defineProperty(Oe,"__esModule",{value:!0});var Gi=/.+\@.+\..+/;function Ki(e){return Gi.test(e)}Oe.default=Ki;var Qt=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ht,"__esModule",{value:!0});ht.Group=void 0;var Hi=Qt(ie.exports),Zi=Qt(Oe),Wi=Qt(Wt),Ee=re;function Yt(e,t){Ee.Facade.call(this,e,t)}ht.Group=Yt;Hi.default(Yt,Ee.Facade);var W=Yt.prototype;W.action=function(){return"group"};W.type=W.action;W.groupId=Ee.Facade.field("groupId");W.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return Wi.default(e)};W.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();if(Zi.default(t))return t};W.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};W.name=Ee.Facade.proxy("traits.name");W.industry=Ee.Facade.proxy("traits.industry");W.employees=Ee.Facade.proxy("traits.employees");W.properties=function(){return this.field("traits")||this.field("properties")||{}};var Ge={},vt=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.Identify=void 0;var ne=re,Ie=vt(Ue.exports),Ji=vt(ie.exports),Qi=vt(Oe),Zr=vt(Wt),de=function(e){return e.trim()};function Xt(e,t){ne.Facade.call(this,e,t)}Ge.Identify=Xt;Ji.default(Xt,ne.Facade);var j=Xt.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 Zr.default(e)};j.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return Zr.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 de(e);var t=this.firstName(),r=this.lastName();if(t&&r)return de(t+" "+r)};j.firstName=function(){var e=this.proxy("traits.firstName");if(typeof e=="string")return de(e);var t=this.proxy("traits.name");if(typeof t=="string")return de(t).split(" ")[0]};j.lastName=function(){var e=this.proxy("traits.lastName");if(typeof e=="string")return de(e);var t=this.proxy("traits.name");if(typeof t=="string"){var r=de(t).indexOf(" ");if(r!==-1)return de(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=Ie.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 Ie.default(e,"avatar")||Ie.default(e,"photoUrl")||Ie.default(e,"avatarUrl")};j.position=function(){var e=this.traits();return Ie.default(e,"position")||Ie.default(e,"jobTitle")};j.username=ne.Facade.proxy("traits.username");j.website=ne.Facade.one("traits.website");j.websites=ne.Facade.multi("traits.website");j.phone=ne.Facade.one("traits.phone");j.phones=ne.Facade.multi("traits.phone");j.address=ne.Facade.proxy("traits.address");j.gender=ne.Facade.proxy("traits.gender");j.birthday=ne.Facade.proxy("traits.birthday");var Le={},er=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Le,"__esModule",{value:!0});Le.Track=void 0;var Yi=er(ie.exports),R=re,Xi=Ge,eo=er(Oe),Wr=er(Ue.exports);function tr(e,t){R.Facade.call(this,e,t)}Le.Track=tr;Yi.default(tr,R.Facade);var A=tr.prototype;A.action=function(){return"track"};A.type=A.action;A.event=R.Facade.field("event");A.value=R.Facade.proxy("properties.value");A.category=R.Facade.proxy("properties.category");A.id=R.Facade.proxy("properties.id");A.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")};A.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")};A.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")};A.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")};A.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")};A.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")};A.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")};A.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")};A.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")};A.sku=R.Facade.proxy("properties.sku");A.tax=R.Facade.proxy("properties.tax");A.name=R.Facade.proxy("properties.name");A.price=R.Facade.proxy("properties.price");A.total=R.Facade.proxy("properties.total");A.repeat=R.Facade.proxy("properties.repeat");A.coupon=R.Facade.proxy("properties.coupon");A.shipping=R.Facade.proxy("properties.shipping");A.discount=R.Facade.proxy("properties.discount");A.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")};A.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")};A.description=R.Facade.proxy("properties.description");A.plan=R.Facade.proxy("properties.plan");A.subtotal=function(){var e=Wr.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};A.products=function(){var e=this.properties(),t=Wr.default(e,"products");return Array.isArray(t)?t.filter(function(r){return r!==null}):[]};A.quantity=function(){var e=this.obj.properties||{};return e.quantity||1};A.currency=function(){var e=this.obj.properties||{};return e.currency||"USD"};A.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")};A.query=R.Facade.proxy("options.query");A.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};A.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()};A.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};A.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)};A.cents=function(){var e=this.revenue();return typeof e!="number"?this.value()||0:e*100};A.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={},Jr=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.Page=void 0;var ro=Jr(ie.exports),ye=re,no=Le,io=Jr(Oe);function rr(e,t){ye.Facade.call(this,e,t)}Ke.Page=rr;ro.default(rr,ye.Facade);var U=rr.prototype;U.action=function(){return"page"};U.type=U.action;U.category=ye.Facade.field("category");U.name=ye.Facade.field("name");U.title=ye.Facade.proxy("properties.title");U.path=ye.Facade.proxy("properties.path");U.url=ye.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 gt={},oo=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gt,"__esModule",{value:!0});gt.Screen=void 0;var ao=oo(ie.exports),Qr=Ke,so=Le;function me(e,t){Qr.Page.call(this,e,t)}gt.Screen=me;ao.default(me,Qr.Page);me.prototype.action=function(){return"screen"};me.prototype.type=me.prototype.action;me.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"};me.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 mt={},uo=D&&D.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mt,"__esModule",{value:!0});mt.Delete=void 0;var lo=uo(ie.exports),Yr=re;function nr(e,t){Yr.Facade.call(this,e,t)}mt.Delete=nr;lo.default(nr,Yr.Facade);nr.prototype.type=function(){return"delete"};(function(e){var t=D&&D.__assign||function(){return t=Object.assign||function(h){for(var g,b=1,y=arguments.length;b<y;b++){g=arguments[b];for(var _ in g)Object.prototype.hasOwnProperty.call(g,_)&&(h[_]=g[_])}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=re;Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return r.Facade}});var n=pt;Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return n.Alias}});var i=ht;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return i.Group}});var o=Ge;Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}});var a=Le;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=gt;Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return u.Screen}});var d=mt;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})})(le);var Xr={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,m){var c=v[0],l=v[1],p=v[2],f=v[3];c+=(l&p|~l&f)+m[0]-680876936|0,c=(c<<7|c>>>25)+l|0,f+=(c&l|~c&p)+m[1]-389564586|0,f=(f<<12|f>>>20)+c|0,p+=(f&c|~f&l)+m[2]+606105819|0,p=(p<<17|p>>>15)+f|0,l+=(p&f|~p&c)+m[3]-1044525330|0,l=(l<<22|l>>>10)+p|0,c+=(l&p|~l&f)+m[4]-176418897|0,c=(c<<7|c>>>25)+l|0,f+=(c&l|~c&p)+m[5]+1200080426|0,f=(f<<12|f>>>20)+c|0,p+=(f&c|~f&l)+m[6]-1473231341|0,p=(p<<17|p>>>15)+f|0,l+=(p&f|~p&c)+m[7]-45705983|0,l=(l<<22|l>>>10)+p|0,c+=(l&p|~l&f)+m[8]+1770035416|0,c=(c<<7|c>>>25)+l|0,f+=(c&l|~c&p)+m[9]-1958414417|0,f=(f<<12|f>>>20)+c|0,p+=(f&c|~f&l)+m[10]-42063|0,p=(p<<17|p>>>15)+f|0,l+=(p&f|~p&c)+m[11]-1990404162|0,l=(l<<22|l>>>10)+p|0,c+=(l&p|~l&f)+m[12]+1804603682|0,c=(c<<7|c>>>25)+l|0,f+=(c&l|~c&p)+m[13]-40341101|0,f=(f<<12|f>>>20)+c|0,p+=(f&c|~f&l)+m[14]-1502002290|0,p=(p<<17|p>>>15)+f|0,l+=(p&f|~p&c)+m[15]+1236535329|0,l=(l<<22|l>>>10)+p|0,c+=(l&f|p&~f)+m[1]-165796510|0,c=(c<<5|c>>>27)+l|0,f+=(c&p|l&~p)+m[6]-1069501632|0,f=(f<<9|f>>>23)+c|0,p+=(f&l|c&~l)+m[11]+643717713|0,p=(p<<14|p>>>18)+f|0,l+=(p&c|f&~c)+m[0]-373897302|0,l=(l<<20|l>>>12)+p|0,c+=(l&f|p&~f)+m[5]-701558691|0,c=(c<<5|c>>>27)+l|0,f+=(c&p|l&~p)+m[10]+38016083|0,f=(f<<9|f>>>23)+c|0,p+=(f&l|c&~l)+m[15]-660478335|0,p=(p<<14|p>>>18)+f|0,l+=(p&c|f&~c)+m[4]-405537848|0,l=(l<<20|l>>>12)+p|0,c+=(l&f|p&~f)+m[9]+568446438|0,c=(c<<5|c>>>27)+l|0,f+=(c&p|l&~p)+m[14]-1019803690|0,f=(f<<9|f>>>23)+c|0,p+=(f&l|c&~l)+m[3]-187363961|0,p=(p<<14|p>>>18)+f|0,l+=(p&c|f&~c)+m[8]+1163531501|0,l=(l<<20|l>>>12)+p|0,c+=(l&f|p&~f)+m[13]-1444681467|0,c=(c<<5|c>>>27)+l|0,f+=(c&p|l&~p)+m[2]-51403784|0,f=(f<<9|f>>>23)+c|0,p+=(f&l|c&~l)+m[7]+1735328473|0,p=(p<<14|p>>>18)+f|0,l+=(p&c|f&~c)+m[12]-1926607734|0,l=(l<<20|l>>>12)+p|0,c+=(l^p^f)+m[5]-378558|0,c=(c<<4|c>>>28)+l|0,f+=(c^l^p)+m[8]-2022574463|0,f=(f<<11|f>>>21)+c|0,p+=(f^c^l)+m[11]+1839030562|0,p=(p<<16|p>>>16)+f|0,l+=(p^f^c)+m[14]-35309556|0,l=(l<<23|l>>>9)+p|0,c+=(l^p^f)+m[1]-1530992060|0,c=(c<<4|c>>>28)+l|0,f+=(c^l^p)+m[4]+1272893353|0,f=(f<<11|f>>>21)+c|0,p+=(f^c^l)+m[7]-155497632|0,p=(p<<16|p>>>16)+f|0,l+=(p^f^c)+m[10]-1094730640|0,l=(l<<23|l>>>9)+p|0,c+=(l^p^f)+m[13]+681279174|0,c=(c<<4|c>>>28)+l|0,f+=(c^l^p)+m[0]-358537222|0,f=(f<<11|f>>>21)+c|0,p+=(f^c^l)+m[3]-722521979|0,p=(p<<16|p>>>16)+f|0,l+=(p^f^c)+m[6]+76029189|0,l=(l<<23|l>>>9)+p|0,c+=(l^p^f)+m[9]-640364487|0,c=(c<<4|c>>>28)+l|0,f+=(c^l^p)+m[12]-421815835|0,f=(f<<11|f>>>21)+c|0,p+=(f^c^l)+m[15]+530742520|0,p=(p<<16|p>>>16)+f|0,l+=(p^f^c)+m[2]-995338651|0,l=(l<<23|l>>>9)+p|0,c+=(p^(l|~f))+m[0]-198630844|0,c=(c<<6|c>>>26)+l|0,f+=(l^(c|~p))+m[7]+1126891415|0,f=(f<<10|f>>>22)+c|0,p+=(c^(f|~l))+m[14]-1416354905|0,p=(p<<15|p>>>17)+f|0,l+=(f^(p|~c))+m[5]-57434055|0,l=(l<<21|l>>>11)+p|0,c+=(p^(l|~f))+m[12]+1700485571|0,c=(c<<6|c>>>26)+l|0,f+=(l^(c|~p))+m[3]-1894986606|0,f=(f<<10|f>>>22)+c|0,p+=(c^(f|~l))+m[10]-1051523|0,p=(p<<15|p>>>17)+f|0,l+=(f^(p|~c))+m[1]-2054922799|0,l=(l<<21|l>>>11)+p|0,c+=(p^(l|~f))+m[8]+1873313359|0,c=(c<<6|c>>>26)+l|0,f+=(l^(c|~p))+m[15]-30611744|0,f=(f<<10|f>>>22)+c|0,p+=(c^(f|~l))+m[6]-1560198380|0,p=(p<<15|p>>>17)+f|0,l+=(f^(p|~c))+m[13]+1309151649|0,l=(l<<21|l>>>11)+p|0,c+=(p^(l|~f))+m[4]-145523070|0,c=(c<<6|c>>>26)+l|0,f+=(l^(c|~p))+m[11]-1120210379|0,f=(f<<10|f>>>22)+c|0,p+=(c^(f|~l))+m[2]+718787259|0,p=(p<<15|p>>>17)+f|0,l+=(f^(p|~c))+m[9]-343485551|0,l=(l<<21|l>>>11)+p|0,v[0]=c+v[0]|0,v[1]=l+v[1]|0,v[2]=p+v[2]|0,v[3]=f+v[3]|0}function o(v){var m=[],c;for(c=0;c<64;c+=4)m[c>>2]=v.charCodeAt(c)+(v.charCodeAt(c+1)<<8)+(v.charCodeAt(c+2)<<16)+(v.charCodeAt(c+3)<<24);return m}function a(v){var m=[],c;for(c=0;c<64;c+=4)m[c>>2]=v[c]+(v[c+1]<<8)+(v[c+2]<<16)+(v[c+3]<<24);return m}function s(v){var m=v.length,c=[1732584193,-271733879,-1732584194,271733878],l,p,f,E,O,T;for(l=64;l<=m;l+=64)i(c,o(v.substring(l-64,l)));for(v=v.substring(l-64),p=v.length,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],l=0;l<p;l+=1)f[l>>2]|=v.charCodeAt(l)<<(l%4<<3);if(f[l>>2]|=128<<(l%4<<3),l>55)for(i(c,f),l=0;l<16;l+=1)f[l]=0;return E=m*8,E=E.toString(16).match(/(.*?)(.{0,8})$/),O=parseInt(E[2],16),T=parseInt(E[1],16)||0,f[14]=O,f[15]=T,i(c,f),c}function u(v){var m=v.length,c=[1732584193,-271733879,-1732584194,271733878],l,p,f,E,O,T;for(l=64;l<=m;l+=64)i(c,a(v.subarray(l-64,l)));for(v=l-64<m?v.subarray(l-64):new Uint8Array(0),p=v.length,f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],l=0;l<p;l+=1)f[l>>2]|=v[l]<<(l%4<<3);if(f[l>>2]|=128<<(l%4<<3),l>55)for(i(c,f),l=0;l<16;l+=1)f[l]=0;return E=m*8,E=E.toString(16).match(/(.*?)(.{0,8})$/),O=parseInt(E[2],16),T=parseInt(E[1],16)||0,f[14]=O,f[15]=T,i(c,f),c}function d(v){var m="",c;for(c=0;c<4;c+=1)m+=n[v>>c*8+4&15]+n[v>>c*8&15];return m}function h(v){var m;for(m=0;m<v.length;m+=1)v[m]=d(v[m]);return v.join("")}h(s("hello")),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function v(m,c){return m=m|0||0,m<0?Math.max(m+c,0):Math.min(m,c)}ArrayBuffer.prototype.slice=function(m,c){var l=this.byteLength,p=v(m,l),f=l,E,O,T,B;return c!==r&&(f=v(c,l)),p>f?new ArrayBuffer(0):(E=f-p,O=new ArrayBuffer(E),T=new Uint8Array(O),B=new Uint8Array(this,p,E),T.set(B),O)}}();function g(v){return/[\u0080-\uFFFF]/.test(v)&&(v=unescape(encodeURIComponent(v))),v}function b(v,m){var c=v.length,l=new ArrayBuffer(c),p=new Uint8Array(l),f;for(f=0;f<c;f+=1)p[f]=v.charCodeAt(f);return m?p:l}function y(v){return String.fromCharCode.apply(null,new Uint8Array(v))}function _(v,m,c){var l=new Uint8Array(v.byteLength+m.byteLength);return l.set(new Uint8Array(v)),l.set(new Uint8Array(m),v.byteLength),c?l:l.buffer}function x(v){var m=[],c=v.length,l;for(l=0;l<c-1;l+=2)m.push(parseInt(v.substr(l,2),16));return String.fromCharCode.apply(String,m)}function w(){this.reset()}return w.prototype.append=function(v){return this.appendBinary(g(v)),this},w.prototype.appendBinary=function(v){this._buff+=v,this._length+=v.length;var m=this._buff.length,c;for(c=64;c<=m;c+=64)i(this._hash,o(this._buff.substring(c-64,c)));return this._buff=this._buff.substring(c-64),this},w.prototype.end=function(v){var m=this._buff,c=m.length,l,p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],f;for(l=0;l<c;l+=1)p[l>>2]|=m.charCodeAt(l)<<(l%4<<3);return this._finish(p,c),f=h(this._hash),v&&(f=x(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,m){var c=m,l,p,f;if(v[c>>2]|=128<<(c%4<<3),c>55)for(i(this._hash,v),c=0;c<16;c+=1)v[c]=0;l=this._length*8,l=l.toString(16).match(/(.*?)(.{0,8})$/),p=parseInt(l[2],16),f=parseInt(l[1],16)||0,v[14]=p,v[15]=f,i(this._hash,v)},w.hash=function(v,m){return w.hashBinary(g(v),m)},w.hashBinary=function(v,m){var c=s(v),l=h(c);return m?x(l):l},w.ArrayBuffer=function(){this.reset()},w.ArrayBuffer.prototype.append=function(v){var m=_(this._buff.buffer,v,!0),c=m.length,l;for(this._length+=v.byteLength,l=64;l<=c;l+=64)i(this._hash,a(m.subarray(l-64,l)));return this._buff=l-64<c?new Uint8Array(m.buffer.slice(l-64)):new Uint8Array(0),this},w.ArrayBuffer.prototype.end=function(v){var m=this._buff,c=m.length,l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],p,f;for(p=0;p<c;p+=1)l[p>>2]|=m[p]<<(p%4<<3);return this._finish(l,c),f=h(this._hash),v&&(f=x(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=b(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,m){var c=u(new Uint8Array(v)),l=h(c);return m?x(l):l},w})})(Xr);var co=Xr.exports,fo=function(){function e(t){this.user=t}return e.prototype.track=function(t,r,n,i){return this.normalize(S(S({},this.baseEvent()),{event:t,type:"track",properties:r,options:S({},n),integrations:S({},i)}))},e.prototype.page=function(t,r,n,i,o){var a,s={type:"page",properties:S({},n),options:S({},i),integrations:S({},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(S(S({},this.baseEvent()),s))},e.prototype.screen=function(t,r,n,i,o){var a={type:"screen",properties:S({},n),options:S({},i),integrations:S({},o)};return t!==null&&(a.category=t),r!==null&&(a.name=r),this.normalize(S(S({},this.baseEvent()),a))},e.prototype.identify=function(t,r,n,i){return this.normalize(S(S({},this.baseEvent()),{type:"identify",userId:t,traits:r,options:S({},n),integrations:S({},i)}))},e.prototype.group=function(t,r,n,i){return this.normalize(S(S({},this.baseEvent()),{type:"group",traits:r,options:S({},n),integrations:S({},i),groupId:t}))},e.prototype.alias=function(t,r,n,i){var o={userId:t,type:"alias",options:S({},n),integrations:S({},i)};return r!==null&&(o.previousId=r),t===void 0?this.normalize(S(S({},o),this.baseEvent())):this.normalize(S(S({},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)?it(d,h,a[h]):it(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,_){var x,w;return S(S({},y),(x={},x[_]=Boolean((w=t.integrations)===null||w===void 0?void 0:w[_]),x))},{}),o=S(S({},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=Wn(t,["options"]),h=S(S(S({timestamp:new Date},d),{context:s,integrations:o}),u),g="ajs-next-"+co.hash(JSON.stringify(h)+Ut()),b=S(S({},h),{messageId:g});return b},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]=z(z([],(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 en="onRemoveFromFuture",ir=function(e){ee(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(en)},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}(qt),X={getItem:function(){},setItem:function(){},removeItem:function(){}};try{X=Vt()&&window.localStorage?window.localStorage:X}catch(e){console.warn("Unable to access localStorage",e)}function tn(e){var t=X.getItem(e);return(t?JSON.parse(t):[]).map(function(r){return new Y(r.event,r.id)})}function vo(e,t){var r=tn(e),n=z(z([],t,!0),r,!0),i=n.reduce(function(o,a){var s;return S(S({},o),(s={},s[a.id]=a,s))},{});X.setItem(e,JSON.stringify(Object.values(i)))}function rn(e){var t=X.getItem(e);return t?JSON.parse(t):{}}function go(e,t){var r=rn(e);X.setItem(e,JSON.stringify(S(S({},r),t)))}function xr(e){X.removeItem(e)}var mo=function(){return new Date().getTime()};function Ft(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=X.getItem(i),s=a?JSON.parse(a):null,u=s===null||o(s);if(u){X.setItem(i,JSON.stringify(mo()+n)),t(),X.removeItem(i);return}!u&&r<3?setTimeout(function(){Ft(e,t,r+1)},n):console.error("Unable to retrieve lock")}var or=function(e){ee(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 Ft(n,function(){try{s=tn(o),u=rn(a),xr(o),xr(a),i.queue=z(z([],s,!0),i.queue,!0),i.seen=S(S({},u),i.seen)}catch(d){console.error(d)}}),document.addEventListener("pagehide",function(){if(i.todo>0){var d=z(z([],i.queue,!0),i.future,!0);try{Ft(n,function(){vo(o,d),go(a,i.seen)})}catch(h){console.error(h)}}}),i}return t}(ir),nn=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 nn(i)&&(++r===1&&(e=new Promise(function(o){return t=o})),i.finally(function(){return--r===0&&t()})),i}}};function bo(e){return I(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 Re(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=bo(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 ge&&a.type==="middleware_cancellation")throw a;return a instanceof ge?(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 _o(e,t){return Re(e,t).then(function(r){if(r instanceof Y)return r;e.log("debug","Context canceled"),e.stats.increment("context_canceled"),e.cancel(r)})}var on=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:null},Ct,Sr,wo=on(),xe=(Ct=(Sr=wo).__SEGMENT_INSPECTOR__)!==null&&Ct!==void 0?Ct:Sr.__SEGMENT_INSPECTOR__={},Co=function(e){ee(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 or(4,"event-queue"),n.queue.on(en,function(){n.scheduleFlush(0)}),n}return t.prototype.register=function(r,n,i){return I(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 I(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 I(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 I(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 I(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 ge&&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 I(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 ge&&r.retry===!1,o=!i;if(o){var a=this.queue.pushWithBackoff(n);return a}return!1},t.prototype.flush=function(){return I(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||!Vr())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 _,x,w;if(y.type!=="destination"&&y.name!=="Segment.io")return!0;var v=void 0;return(_=y.alternativeNames)===null||_===void 0||_.forEach(function(m){r[m]!==void 0&&(v=r[m])}),(w=(x=r[y.name])!==null&&x!==void 0?x: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,g=i.after,b=g===void 0?[]:g;return{before:a,enrichment:u,destinations:h,after:b}},t.prototype.flushOne=function(r){var n,i,o,a;return I(this,void 0,void 0,function(){var s,u,d,h,g,b,w,y,_,x,w,v,m,c,l;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,g=u,p.label=1;case 1:return h<g.length?(b=g[h],[4,_o(r,b)]):[3,4];case 2:w=p.sent(),w instanceof Y&&(r=w),p.label=3;case 3:return h++,[3,1];case 4:y=0,_=d,p.label=5;case 5:return y<_.length?(x=_[y],[4,Re(r,x)]):[3,8];case 6:w=p.sent(),w instanceof Y&&(r=w),p.label=7;case 7:return y++,[3,5];case 8:return(i=xe.enriched)===null||i===void 0||i.call(xe,r),v=this.availableExtensions((o=r.event.integrations)!==null&&o!==void 0?o:{}),m=v.destinations,c=v.after,[4,new Promise(function(f,E){setTimeout(function(){var O=m.map(function(T){return Re(r,T)});Promise.all(O).then(f).catch(E)},0)})];case 9:return p.sent(),r.stats.increment("message_delivered"),(a=xe.delivered)===null||a===void 0||a.call(xe,r,["segment.io"]),l=c.map(function(f){return Re(r,f)}),[4,Promise.all(l)];case 10:return p.sent(),[2,r]}})})},t}(qt);function ar(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 Ce={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},yt=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,Ir=function(e){ee(t,e);function t(r){r===void 0&&(r=t.defaults);var n=e.call(this)||this;return n.options=S(S({},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:Ur(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{return n}}catch{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}(yt),xt=function(e){ee(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}(yt),Mr=function(e){ee(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{return!1}},t.prototype.get=function(r){var n=localStorage.getItem(r);if(n)try{return JSON.parse(n)}catch{return JSON.parse(JSON.stringify(n))}return null},t.prototype.set=function(r,n){try{localStorage.setItem(r,JSON.stringify(n))}catch{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}(yt),an=function(){function e(t,r){t===void 0&&(t=Ce);var n=this,i,o,a,s;this.options={},this.id=function(g){var b,y;if(n.options.disable)return null;var _=n.chainGet(n.idKey);if(g!==void 0){n.trySet(n.idKey,g);var x=g!==_&&_!==null&&g!==null;x&&n.anonymousId(null)}return(y=(b=n.chainGet(n.idKey))!==null&&b!==void 0?b:n.cookies.get(Ce.cookie.oldKey))!==null&&y!==void 0?y:null},this.anonymousId=function(g){var b,y;if(n.options.disable)return null;if(g===void 0){var _=(b=n.chainGet(n.anonKey))!==null&&b!==void 0?b:(y=n.legacySIO())===null||y===void 0?void 0:y[0];if(_)return _}return g===null?(n.trySet(n.anonKey,null),n.chainGet(n.anonKey)):(n.trySet(n.anonKey,g!=null?g:Ut()),n.chainGet(n.anonKey))},this.traits=function(g){var b,y;if(!n.options.disable)return g===null&&(g={}),g&&(n.mem.set(n.traitsKey,g!=null?g:{}),n.localStorage.set(n.traitsKey,g!=null?g:{})),(y=(b=n.localStorage.get(n.traitsKey))!==null&&b!==void 0?b: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:Ce.cookie.key,this.traitsKey=(s=(a=t.localStorage)===null||a===void 0?void 0:a.key)!==null&&s!==void 0?s:Ce.localStorage.key,this.anonKey="ajs_anonymous_id";var u=t.disable===!0,d=t.persist!==!1;this.localStorage=u||t.localStorageFallbackDisabled||!d||!Mr.available()?new xt:new Mr,this.cookies=!u&&d&&Ir.available()?new Ir(r):new xt,this.mem=u?new xt:new yt;var h=this.cookies.get(Ce.cookie.oldKey);h&&(h.id&&this.id(h.id),h.traits&&this.traits(h.traits)),ar(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=S(S({},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=Ce,e}(),So={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},Io=function(e){ee(t,e);function t(r,n){r===void 0&&(r=So);var i=e.call(this,r,n)||this;return i.anonymousId=function(o){},ar(i),i}return t}(an),ce="This is being deprecated and will be not be available in future releases of Analytics JS",St=on(),It=St==null?void 0:St.analytics;function Mo(e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var r=e?4:1,n=t?new ir(r,[]):new or(r,"event-queue");return new Co(n)}function Q(){console.warn(ce)}var Po=function(e){ee(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=Q,s.addIntegrationMiddleware=Q,s.listeners=Q,s.addEventListener=Q,s.removeAllListeners=Q,s.removeListener=Q,s.removeEventListener=Q,s.hasListeners=Q,s.add=Q,s.addIntegration=Q;var g=n==null?void 0:n.cookie,b=(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,b),s._user=o!=null?o:new an(b?S(S({},n==null?void 0:n.user),{persist:!1}):n==null?void 0:n.user,g).load(),s._group=a!=null?a:new Io(b?S(S({},n==null?void 0:n.group),{persist:!1}):n==null?void 0:n.group,g).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:{},ar(s),s}return t.prototype.track=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return I(this,void 0,void 0,function(){var i,o,a,s,u,d,h=this;return M(this,function(g){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(b){return h.emit("track",o,b.event.properties,b.event.options),b})]})})},t.prototype.page=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return I(this,void 0,void 0,function(){var i,o,a,s,u,d,h,g=this;return M(this,function(b){return i=gr.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 g.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 I(this,void 0,void 0,function(){var i,o,a,s,u,d,h=this;return M(this,function(g){return i=mr(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(b){return h.emit("identify",b.event.userId,b.event.traits,b.event.options),b})]})})},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=mr(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(),g=this._group.traits(),b=this.eventFactory.group(h,g,u,this.integrations);return this.dispatch(b,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 I(this,void 0,void 0,function(){var i,o,a,s,u,d,h=this;return M(this,function(g){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(b){return h.emit("alias",o,a,b.event.options),b})]})})},t.prototype.screen=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return I(this,void 0,void 0,function(){var i,o,a,s,u,d,h,g=this;return M(this,function(b){return i=gr.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 g.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 I(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.000d2da6.js"),["assets/auto-track.000d2da6.js","assets/chevron_right.f7f802f5.js","assets/chevron_right.2aa1109f.css","assets/index.85e812f8.js"])];case 1:return i=a.sent(),[2,(o=i.link).call.apply(o,z([this],r,!1))]}})})},t.prototype.trackLink=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return I(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.000d2da6.js"),["assets/auto-track.000d2da6.js","assets/chevron_right.f7f802f5.js","assets/chevron_right.2aa1109f.css","assets/index.85e812f8.js"])];case 1:return i=a.sent(),[2,(o=i.link).call.apply(o,z([this],r,!1))]}})})},t.prototype.trackSubmit=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return I(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.000d2da6.js"),["assets/auto-track.000d2da6.js","assets/chevron_right.f7f802f5.js","assets/chevron_right.2aa1109f.css","assets/index.85e812f8.js"])];case 1:return i=a.sent(),[2,(o=i.form).call.apply(o,z([this],r,!1))]}})})},t.prototype.trackForm=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return I(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.000d2da6.js"),["assets/auto-track.000d2da6.js","assets/chevron_right.f7f802f5.js","assets/chevron_right.2aa1109f.css","assets/index.85e812f8.js"])];case 1:return i=a.sent(),[2,(o=i.form).call.apply(o,z([this],r,!1))]}})})},t.prototype.register=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return I(this,void 0,void 0,function(){var i,o,a=this;return M(this,function(s){switch(s.label){case 0:return i=Y.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 I(this,void 0,void 0,function(){var i,o,a=this;return M(this,function(s){switch(s.label){case 0:return i=Y.system(),o=r.map(function(u){return I(a,void 0,void 0,function(){var d;return M(this,function(h){return d=this.queue.plugins.find(function(g){return g.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 I(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 Y(r),(i=xe.triggered)===null||i===void 0||i.call(xe,o),nt()&&!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 I(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 I(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(function(){return 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 I(this,void 0,void 0,function(){var n;return M(this,function(i){switch(i.label){case 0:return[4,K(()=>import("./index.f4705c55.js"),["assets/index.f4705c55.js","assets/chevron_right.f7f802f5.js","assets/chevron_right.2aa1109f.css","assets/index.85e812f8.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}),I(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(ce),window.analytics=It!=null?It:this,this},t.prototype.normalize=function(r){return console.warn(ce),this.eventFactory.normalize(r)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(ce),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return Me},enumerable:!1,configurable:!0}),t.prototype.initialize=function(r,n){return I(this,void 0,void 0,function(){return M(this,function(i){return console.warn(ce),[2,Promise.resolve(this)]})})},t.prototype.pageview=function(r){return I(this,void 0,void 0,function(){return M(this,function(n){switch(n.label){case 0:return console.warn(ce),[4,this.page({path:r})];case 1:return n.sent(),[2,this]}})})},Object.defineProperty(t.prototype,"plugins",{get:function(){var r;return console.warn(ce),(r=this._plugins)!==null&&r!==void 0?r:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){console.warn(ce);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}(qt);function sn(){return typeof process=="undefined"||!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},et,Eo=function(){var e,t=et!=null?et:(e=window.analytics)===null||e===void 0?void 0:e._cdn;return t},Lo=function(e){window.analytics&&(window.analytics._cdn=e),et=e},sr=function(){var e=Eo();if(e)return e;var t=Oo();return t||"https://cdn.segment.com"},ks=function(){var e=sr();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"?S(S({},i),(a={},a[u]=d,a)):S(S({},i),(s={},s[u]={},s))},{});return Object.entries(e.integrations).reduce(function(i,o){var a,s=o[0],u=o[1];return S(S({},i),(a={},a[s]=S(S({},u),n[s]),a))},{})}function un(){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=un();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=un();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 ln(){return{path:To(),referrer:document.referrer,search:location.search,title:document.title,url:Do(location.search)}}function Fe(e){var t,r=e.event;r.context=r.context||{};var n=ln(),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({},ln(),e.event.properties),e.event.name&&(e.event.properties.name=e.event.name),Fe(e)},alias:Fe,track:Fe,identify:Fe,group:Fe};function cn(e){var t=Array.prototype.slice.call(window.document.querySelectorAll("script"));return t.find(function(r){return r.src===e})}function Mt(e,t){var r=cn(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],g=h[0],b=h[1];s.setAttribute(g,b)}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 Rs(e){var t=cn(e);return t!==void 0&&t.remove(),Promise.resolve()}function ur(e,t){var r=new le.Facade(e,t);return e.type==="track"&&(r=new le.Track(e,t)),e.type==="identify"&&(r=new le.Identify(e,t)),e.type==="page"&&(r=new le.Page(e,t)),e.type==="alias"&&(r=new le.Alias(e,t)),e.type==="group"&&(r=new le.Group(e,t)),e.type==="screen"&&(r=new le.Screen(e,t)),Object.defineProperty(r,"obj",{value:e,writable:!0}),r}var jo=function(e){return JSON.parse(JSON.stringify(e))};function fn(e,t,r){return I(this,void 0,void 0,function(){function n(d,h){return I(this,void 0,void 0,function(){var g,b,y;return M(this,function(_){switch(_.label){case 0:return g=!1,b=null,[4,ct(h({payload:ur(d,{clone:!0,traverse:!1}),integration:e,next:function(x){g=!0,x===null&&(b=null),x&&(b=x.obj)}}))];case 1:return _.sent(),!g&&b!==null&&(b=b,b.integrations=S(S({},d.integrations),(y={},y[e]=!1,y))),[2,b]}})})}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 I(this,void 0,void 0,function(){var i;return M(this,function(o){switch(o.label){case 0:return i=!1,[4,ct(e({payload:ur(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 ge({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}}var Ro=Object.freeze(Object.defineProperty({__proto__:null,applyDestinationMiddleware:fn,sourceMiddlewarePlugin:ko},Symbol.toStringTag,{value:"Module"})),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 I(this,void 0,void 0,function(){var r;return M(this,function(n){switch(n.label){case 0:return[4,fn(this.name,t.event,this.middleware)];case 1:return r=n.sent(),r===null&&t.cancel(new ge({retry:!1,reason:"dropped by destination middleware"})),[2,new Y(r)]}})})},e.prototype._createMethod=function(t){var r=this;return function(n){return I(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 zo(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 Bo(e,t,r,n,i){var o,a,s;return I(this,void 0,void 0,function(){var u,d,h,g,b=this;return M(this,function(y){switch(y.label){case 0:return u=[],d=sr(),h=(a=(o=e.middlewareSettings)===null||o===void 0?void 0:o.routingRules)!==null&&a!==void 0?a:[],g=((s=e.remotePlugins)!==null&&s!==void 0?s:[]).map(function(_){return I(b,void 0,void 0,function(){var x,w,v,m,c,l,p,f,E;return M(this,function(O){switch(O.label){case 0:if(t.All===!1&&!t[_.name]||t[_.name]===!1)return[2];O.label=1;case 1:if(O.trys.push([1,12,,13]),!n)return[3,7];x=_.url.split("/"),w=x[x.length-2],v=_.url.replace(w,btoa(w).replace(/=/g,"")),O.label=2;case 2:return O.trys.push([2,4,,6]),[4,Mt(v.replace("https://cdn.segment.com",d))];case 3:return O.sent(),[3,6];case 4:return O.sent(),[4,Mt(_.url.replace("https://cdn.segment.com",d))];case 5:return O.sent(),[3,6];case 6:return[3,9];case 7:return[4,Mt(_.url.replace("https://cdn.segment.com",d))];case 8:O.sent(),O.label=9;case 9:return m=_.libraryName,typeof window[m]!="function"?[3,11]:(c=window[m],[4,ct(c(S(S({},_.settings),r[_.name])))]);case 10:l=O.sent(),p=Array.isArray(l)?l:[l],zo(p),f=h.filter(function(T){return T.destinationName===_.creationName}),p.forEach(function(T){var B=new No(_.creationName,T);f.length&&i&&T.type==="destination"&&B.addMiddleware(i),u.push(B)}),O.label=11;case 11:return[3,13];case 12:return E=O.sent(),console.warn("Failed to load Remote Plugin",E),[3,13];case 13:return[2]}})})}),[4,Promise.all(g)];case 1:return y.sent(),[2,u.filter(Boolean)]}})})}var Vo=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})},dn=Ae;typeof window!="undefined"&&(dn=window.fetch||Ae);var Uo=500;function pn(e){var t=encodeURI(JSON.stringify(e)).split(/%..|./).length-1;return t/1024}function qo(e){return pn(e)>=Uo-50}function Go(e){var t=[],r=0;return e.forEach(function(n){var i=pn(t[r]);i>=64&&r++,t[r]?t[r].push(n):t[r]=[n]}),t}function Ko(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 _;if(y.length!==0){var x=(_=y[0])===null||_===void 0?void 0:_.writeKey;return dn("https://".concat(e,"/b"),{keepalive:o,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({batch:y,writeKey:x})})}}function d(){return I(this,void 0,void 0,function(){var y;return M(this,function(_){return i.length?(y=i,i=[],[2,u(y)]):[2]})})}var h;function g(){h||(h=setTimeout(function(){h=void 0,d().catch(console.error)},s))}Vo(function(){if(o=!0,i.length){var y=Go(i).map(u);Promise.all(y).catch(console.error)}});function b(y,_){return I(this,void 0,void 0,function(){var x;return M(this,function(w){return i.push(_),x=i.length>=a||qo(i),[2,x||o?d():g()]})})}return{dispatch:b}}var hn=Ae;typeof window!="undefined"&&(hn=window.fetch||Ae);function Ho(){function e(t,r){return hn(t,{headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(r)})}return{dispatch:e}}var Zo=function(e,t){return I(void 0,void 0,void 0,function(){var r;return M(this,function(n){return r=function(i){return I(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 Wo(e,t){return I(this,void 0,void 0,function(){var r,n=this;return M(this,function(i){switch(i.label){case 0:return r=[],nt()?[2,t]:[4,Zo(function(){return t.length>0&&!nt()},function(){return I(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,Re(o,e)]:[2];case 1:return a=u.sent(),s=a instanceof Y,s||r.push(o),[2]}})})})];case 1:return i.sent(),r.map(function(o){return t.pushWithBackoff(o)}),[2,t]}})})}function Qe(e,t,r,n){var i=this;e||setTimeout(function(){return I(i,void 0,void 0,function(){var o,a;return M(this,function(s){switch(s.label){case 0:return o=!0,[4,Wo(r,t)];case 1:return a=s.sent(),o=!1,t.todo>0&&n(o,a,r,n),[2]}})})},Math.random()*5e3)}function Jo(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 ir(e.queue.queue.maxAttempts,[]):new or(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",g="".concat(h,"://").concat(d),b=((o=t==null?void 0:t.deliveryStrategy)===null||o===void 0?void 0:o.strategy)==="batching"?Ko(d,(a=t==null?void 0:t.deliveryStrategy)===null||a===void 0?void 0:a.config):Ho();function y(x){return I(this,void 0,void 0,function(){var w,v;return M(this,function(m){return nt()?(s.push(x),Qe(u,s,_,Qe),[2,x]):(w=x.event.type.charAt(0),v=ur(x.event).json(),x.event.type==="track"&&delete v.traits,x.event.type==="alias"&&(v=Jo(e,v)),[2,b.dispatch("".concat(g,"/").concat(w),Si(e,v,t,r)).then(function(){return x}).catch(function(c){return(c.type==="error"||c.message==="Failed to fetch")&&(s.push(x),Qe(u,s,_,Qe)),x})])})})}var _={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 _}var vn=function(e,t,r){r.getCalls(e).forEach(function(n){lr(t,n).catch(console.error)})},Yo=function(e,t){return I(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,lr(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=vn.bind(globalThis,"on"),ea=vn.bind(globalThis,"setAnonymousId"),ta=function(e,t){t.toArray().forEach(function(r){setTimeout(function(){lr(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 lr(e,t){return I(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),nn(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=Me,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)},jt=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:sr();return Ae("".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 sn().NODE_ENV!=="test"&&Object.keys(e.integrations).length>1}function ua(e){var t,r,n;return sn().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 la(e,t){t.push.apply(t,jt()),ea(e,t),Xo(e,t)}function ca(e,t){return I(this,void 0,void 0,function(){return M(this,function(r){switch(r.label){case 0:return t.push.apply(t,jt()),[4,Yo(e,t)];case 1:return r.sent(),t.push.apply(t,jt()),ta(e,t),t.clear(),[2]}})})}function fa(e,t,r,n,i){var o,a,s;return I(this,void 0,void 0,function(){var u,d,h,g,b,y,_,x,w,v,m,c=this;return M(this,function(l){switch(l.label){case 0:return ua(e)?[4,K(()=>import("./index.95833aec.js"),["assets/index.95833aec.js","assets/chevron_right.f7f802f5.js","assets/chevron_right.2aa1109f.css","assets/index.85e812f8.js"]).then(function(p){return p.tsubMiddleware(e.middlewareSettings.routingRules)})]:[3,2];case 1:return d=l.sent(),[3,3];case 2:d=void 0,l.label=3;case 3:return u=d,sa(e)?[4,K(()=>import("./index.b5fad94d.js"),["assets/index.b5fad94d.js","assets/index.85e812f8.js","assets/is-plan-event-enabled.681b46ca.js","assets/chevron_right.f7f802f5.js","assets/chevron_right.2aa1109f.css"]).then(function(p){return p.ajsDestinations(e,t.integrations,r,u)})]:[3,5];case 4:return g=l.sent(),[3,6];case 5:g=[],l.label=6;case 6:return h=g,e.legacyVideoPluginsEnabled?[4,K(()=>import("./index.bec88049.js"),["assets/index.bec88049.js","assets/index.85e812f8.js"]).then(function(p){return p.loadLegacyVideoPlugins(t)})]:[3,8];case 7:l.sent(),l.label=8;case 8:return!((o=r.plan)===null||o===void 0)&&o.track?[4,K(()=>import("./index.e9c00339.js"),["assets/index.e9c00339.js","assets/index.85e812f8.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=l.sent(),[3,11];case 10:y=void 0,l.label=11;case 11:return b=y,_=$o(e,n),[4,Bo(e,t.integrations,_,n.obfuscate,u).catch(function(){return[]})];case 12:return x=l.sent(),w=z(z(z([ni,Fo],i,!0),h,!0),x,!0),b&&w.push(b),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,_["Segment.io"],e.integrations)),[4,t.register.apply(t,w)];case 13:return m=l.sent(),Object.entries((s=e.enabledMiddleware)!==null&&s!==void 0?s:{}).some(function(p){var f=p[1];return f})?[4,K(()=>import("./index.252bea88.js"),["assets/index.252bea88.js","assets/index.85e812f8.js","assets/chevron_right.f7f802f5.js","assets/chevron_right.2aa1109f.css"]).then(function(p){var f=p.remoteMiddlewares;return I(c,void 0,void 0,function(){var E,O;return M(this,function(T){switch(T.label){case 0:return[4,f(m,e,n.obfuscate)];case 1:return E=T.sent(),O=E.map(function(B){return t.addSourceMiddleware(B)}),[2,Promise.all(O)]}})})})]:[3,15];case 14:l.sent(),l.label=15;case 15:return[2,m]}})})}function da(e,t,r){var n,i,o,a,s,u;return t===void 0&&(t={}),I(this,void 0,void 0,function(){var d,h,g,b,y,_,x,w,v,m;return M(this,function(c){switch(c.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=c.sent(),c.label=3;case 3:return d=h,g=(o=(i=d.integrations["Segment.io"])===null||i===void 0?void 0:i.retryQueue)!==null&&o!==void 0?o:!0,b=S({retryQueue:g},t),y=new Po(e,b),_=(a=e.plugins)!==null&&a!==void 0?a:[],Y.initMetrics(d.metrics),la(y,r),[4,fa(d,y,b,t,_)];case 4:return x=c.sent(),w=(s=window.location.search)!==null&&s!==void 0?s:"",v=(u=window.location.hash)!==null&&u!==void 0?u:"",m=w.length?w:v.replace(/(?=#).*(?=\?)/,""),m.includes("ajs_")?[4,y.queryString(m).catch(console.error)]:[3,6];case 5:c.sent(),c.label=6;case 6:return y.initialized=!0,y.emit("initialize",e,t),t.initialPageview&&y.page().catch(console.error),[4,ca(y,r)];case 7:return c.sent(),[2,[y,x]]}})})}var pa=function(e){ee(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(){this.analytics=pa.load({writeKey:{}.VITE_SEGMENT_KEY})}trackPageLoad(){this.analytics.page()}trackEvent(t,r){this.analytics.track(t,{event_data:r,environment:"production"})}}const Ne=new ha;var ze=(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))(ze||{});const gn=te.createContext({}),oe=()=>L.exports.useContext(gn),va=(e,t)=>{switch(t.type){case"CATEGORY":return{...e,activeCategory:t.value};case"SCORE":{const r=Ve.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,r]=L.exports.useState(!1),n=window.innerWidth<Nr.screenSizes.mobileL?{activeCategory:"commute",activeScoreByCategory:{commute:"pedestrian_friendly",amenities:"groceries",character:"vibrant",nature:"parks",education:"high_schools"}}:{activeCategory:"commute",activeScoreByCategory:{commute:"",amenities:"",character:"",nature:"",education:""}},[i,o]=L.exports.useReducer(va,n),[a,s]=L.exports.useState(),[u,d]=L.exports.useState();L.exports.useEffect(()=>{a&&Ne.trackEvent(ze.LC_POI_VIEW,{poi_name:a==null?void 0:a.name,poi_info:a==null?void 0:a.address})},[a]);const{activeCategory:h}=i;L.exports.useEffect(()=>{Ne.trackEvent(ze.LC_CATEGORY_VIEW,h)},[h]);const g=i.activeScoreByCategory[h];L.exports.useEffect(()=>{g!==""&&Ne.trackEvent(ze.LC_SCORE_VIEW,g)},[g]);const b=x=>{o({type:"SCORE",value:x})},y=x=>{o({type:"CATEGORY",value:x})},_=L.exports.useMemo(()=>({activeScore:g,setActiveScore:b,activeCategory:h,setActiveCategory:y,activePOI:a,setActivePOI:s,hoveredPOI:u,setHoveredPOI:d,showMobileList:t,setShowMobileList:r}),[g,b,h,y,a,s,u,d,t,r]);return C(gn.Provider,{value:_,children:e})};function mn(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 Pr(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(!Ar(e[0])||!Ar(e[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:e};return mn(n,t,r)}function ma(e,t,r){r===void 0&&(r={});var n={type:"MultiPoint",coordinates:e};return mn(n,t,r)}function Ar(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function yn(e,t,r){if(e!==null)for(var n,i,o,a,s,u,d,h=0,g=0,b,y=e.type,_=y==="FeatureCollection",x=y==="Feature",w=_?e.features.length:1,v=0;v<w;v++){d=_?e.features[v].geometry:x?e.geometry:e,b=d?d.type==="GeometryCollection":!1,s=b?d.geometries.length:1;for(var m=0;m<s;m++){var c=0,l=0;if(a=b?d.geometries[m]: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,g,v,c,l)===!1)return!1;g++,c++;break;case"LineString":case"MultiPoint":for(n=0;n<u.length;n++){if(t(u[n],g,v,c,l)===!1)return!1;g++,p==="MultiPoint"&&c++}p==="LineString"&&c++;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],g,v,c,l)===!1)return!1;g++}p==="MultiLineString"&&c++,p==="Polygon"&&l++}p==="Polygon"&&c++;break;case"MultiPolygon":for(n=0;n<u.length;n++){for(l=0,i=0;i<u[n].length;i++){for(o=0;o<u[n][i].length-h;o++){if(t(u[n][i][o],g,v,c,l)===!1)return!1;g++}l++}c++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(yn(a.geometries[n],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function kt(e){var t=[1/0,1/0,-1/0,-1/0];return yn(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}kt.default=kt;var ya="Expected a function",Or=0/0,ba="[object Symbol]",_a=/^\s+|\s+$/g,wa=/^[-+]0x[0-9a-f]+$/i,Ca=/^0b[01]+$/i,xa=/^0o[0-7]+$/i,Sa=parseInt,Ia=typeof D=="object"&&D&&D.Object===Object&&D,Ma=typeof self=="object"&&self&&self.Object===Object&&self,Pa=Ia||Ma||Function("return this")(),Aa=Object.prototype,Oa=Aa.toString,Ea=Math.max,La=Math.min,Pt=function(){return Pa.Date.now()};function $a(e,t,r){var n,i,o,a,s,u,d=0,h=!1,g=!1,b=!0;if(typeof e!="function")throw new TypeError(ya);t=Er(t)||0,Rt(r)&&(h=!!r.leading,g="maxWait"in r,o=g?Ea(Er(r.maxWait)||0,t):o,b="trailing"in r?!!r.trailing:b);function y(f){var E=n,O=i;return n=i=void 0,d=f,a=e.apply(O,E),a}function _(f){return d=f,s=setTimeout(v,t),h?y(f):a}function x(f){var E=f-u,O=f-d,T=t-E;return g?La(T,o-O):T}function w(f){var E=f-u,O=f-d;return u===void 0||E>=t||E<0||g&&O>=o}function v(){var f=Pt();if(w(f))return m(f);s=setTimeout(v,x(f))}function m(f){return s=void 0,b&&n?y(f):(n=i=void 0,a)}function c(){s!==void 0&&clearTimeout(s),d=0,n=u=i=s=void 0}function l(){return s===void 0?a:m(Pt())}function p(){var f=Pt(),E=w(f);if(n=arguments,i=this,u=f,E){if(s===void 0)return _(u);if(g)return s=setTimeout(v,t),y(u)}return s===void 0&&(s=setTimeout(v,t)),a}return p.cancel=c,p.flush=l,p}function Rt(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)==ba}function Er(e){if(typeof e=="number")return e;if(Da(e))return Or;if(Rt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Rt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(_a,"");var r=Ca.test(e);return r||xa.test(e)?Sa(e.slice(2),r?2:8):wa.test(e)?Or:+e}var Fa=$a;const ja=()=>{const[e,t]=L.exports.useState(!1);return L.exports.useLayoutEffect(()=>{const r=()=>{t(window.innerWidth<Nr.screenSizes.mobileL)};return window.addEventListener("resize",Fa(r,250)),r(),()=>window.removeEventListener("resize",r)},[]),e},ka=e=>L.exports.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},L.exports.createElement("g",{clipPath:"url(#clip0_6_16062)"},L.exports.createElement("path",{d:"M3 13H5V11H3V13ZM3 17H5V15H3V17ZM3 9H5V7H3V9ZM7 13H21V11H7V13ZM7 17H21V15H7V17ZM7 7V9H21V7H7ZM3 13H5V11H3V13ZM3 17H5V15H3V17ZM3 9H5V7H3V9ZM7 13H21V11H7V13ZM7 17H21V15H7V17ZM7 7V9H21V7H7Z"}))),{scorePois:Ra}=he.Constants;function bn(){var s;const{client:e}=at(),{sdkState:t}=st(),r=Bt(t.options,250),{activeScore:n}=oe(),i=n?Ra[n]:void 0,a={...L.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 zt(Fn.list(a),async()=>e.getPois(a),{enabled:!!a&&!!((s=a.include)!=null&&s.length)&&!!a.lat&&!!a.lng})}function _n(){const{client:e}=at(),{sdkState:t}=st(),r=Bt(t.options,250),i={...L.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 zt(jn.list(i),async()=>e.getSchools(i),{enabled:!!i&&!!i.lat&&!!i.lng})}const wn=te.createContext({}),Cn=()=>L.exports.useContext(wn),Na=({children:e,mapRef:t,mapPadding:r})=>C(wn.Provider,{value:{mapRef:t,mapPadding:r},children:e});function Nt(e,t,r,n,i,o){if(i-n<=r)return;const a=n+i>>1;xn(e,t,a,n,i,o%2),Nt(e,t,r,n,a-1,o+1),Nt(e,t,r,a+1,i,o+1)}function xn(e,t,r,n,i,o){for(;i>n;){if(i-n>600){const d=i-n+1,h=r-n+1,g=Math.log(d),b=.5*Math.exp(2*g/3),y=.5*Math.sqrt(g*b*(d-b)/d)*(h-d/2<0?-1:1),_=Math.max(n,Math.floor(r-h*b/d+y)),x=Math.min(i,Math.floor(r+(d-h)*b/d+y));xn(e,t,r,_,x,o)}const a=t[2*r+o];let s=n,u=i;for(je(e,t,n,r),t[2*i+o]>a&&je(e,t,n,i);s<u;){for(je(e,t,s,u),s++,u--;t[2*s+o]<a;)s++;for(;t[2*u+o]>a;)u--}t[2*n+o]===a?je(e,t,n,u):(u++,je(e,t,u,i)),u<=r&&(n=u+1),r<=u&&(i=u-1)}}function je(e,t,r,n){At(e,r,n),At(t,2*r,2*n),At(t,2*r+1,2*n+1)}function At(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function za(e,t,r,n,i,o,a){const s=[0,e.length-1,0],u=[];let d,h;for(;s.length;){const g=s.pop(),b=s.pop(),y=s.pop();if(b-y<=a){for(let w=y;w<=b;w++)d=t[2*w],h=t[2*w+1],d>=r&&d<=i&&h>=n&&h<=o&&u.push(e[w]);continue}const _=Math.floor((y+b)/2);d=t[2*_],h=t[2*_+1],d>=r&&d<=i&&h>=n&&h<=o&&u.push(e[_]);const x=(g+1)%2;(g===0?r<=d:n<=h)&&(s.push(y),s.push(_-1),s.push(x)),(g===0?i>=d:o>=h)&&(s.push(_+1),s.push(b),s.push(x))}return u}function Ba(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(),g=a.pop();if(h-g<=o){for(let w=g;w<=h;w++)Lr(t[2*w],t[2*w+1],r,n)<=u&&s.push(e[w]);continue}const b=Math.floor((g+h)/2),y=t[2*b],_=t[2*b+1];Lr(y,_,r,n)<=u&&s.push(e[b]);const x=(d+1)%2;(d===0?r-i<=y:n-i<=_)&&(a.push(g),a.push(b-1),a.push(x)),(d===0?r+i>=y:n+i>=_)&&(a.push(b+1),a.push(h),a.push(x))}return s}function Lr(e,t,r,n){const i=e-r,o=t-n;return i*i+o*o}const Va=e=>e[0],Ua=e=>e[1];class $r{constructor(t,r=Va,n=Ua,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]);Nt(s,u,i,0,s.length-1,0)}range(t,r,n,i){return za(this.ids,this.coords,t,r,n,i,this.nodeSize)}within(t,r,n){return Ba(this.ids,this.coords,t,r,n,this.nodeSize)}}const qa={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},ot=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1));class Ga{constructor(t){this.options=Be(Object.create(qa),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(Ha(t[u],u));this.trees[i+1]=new $r(s,Dr,Fr,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 $r(s,Dr,Fr,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),g=this.getClusters([-180,i,o,a],r);return h.concat(g)}const s=this.trees[this._limitZoom(r)],u=s.range(tt(n),rt(a),tt(o),rt(i)),d=[];for(const h of u){const g=s.points[h];d.push(g.numPoints?Tr(g):this.points[g.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 g=o.points[h];g.parentId===t&&d.push(g.numPoints?Tr(g):this.points[g.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,g={features:[]};return this._addTileFeatures(i.range((r-u)/o,d,(r+1+u)/o,h),i.points,r,n,o,g),r===0&&this._addTileFeatures(i.range(1-u/o,d,1,h),i.points,o,n,o,g),r===o-1&&this._addTileFeatures(i.range(0,d,u/o,h),i.points,-1,n,o,g),g.features.length?g: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,g,b;if(d)h=Sn(u),g=u.x,b=u.y;else{const x=this.points[u.index];h=x.properties,g=tt(x.geometry.coordinates[0]),b=rt(x.geometry.coordinates[1])}const y={type:1,geometry:[[Math.round(this.options.extent*(g*o-n)),Math.round(this.options.extent*(b*o-i))]],tags:h};let _;d?_=u.id:this.options.generateId?_=u.index:this.points[u.index].id&&(_=this.points[u.index].id),_!==void 0&&(y.id=_),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 g=this.trees[r+1],b=g.within(h.x,h.y,u),y=h.numPoints||1;let _=y;for(const x of b){const w=g.points[x];w.zoom>r&&(_+=w.numPoints||1)}if(_>y&&_>=s){let x=h.x*y,w=h.y*y,v=a&&y>1?this._map(h,!0):null;const m=(d<<5)+(r+1)+this.points.length;for(const c of b){const l=g.points[c];if(l.zoom<=r)continue;l.zoom=r;const p=l.numPoints||1;x+=l.x*p,w+=l.y*p,l.parentId=m,a&&(v||(v=this._map(h,!0)),a(v,this._map(l)))}h.parentId=m,n.push(Ka(x/_,w/_,m,_,v))}else if(n.push(h),_>1)for(const x of b){const w=g.points[x];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 Ka(e,t,r,n,i){return{x:ot(e),y:ot(t),zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function Ha(e,t){const[r,n]=e.geometry.coordinates;return{x:ot(tt(r)),y:ot(rt(n)),zoom:1/0,index:t,parentId:-1}}function Tr(e){return{type:"Feature",id:e.id,properties:Sn(e),geometry:{type:"Point",coordinates:[Za(e.x),Wa(e.y)]}}}function Sn(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 tt(e){return e/360+.5}function rt(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 Za(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 Dr(e){return e.x}function Fr(e){return e.y}var jr=Object.prototype.hasOwnProperty;function kr(e,t,r){for(r of e.keys())if(pe(r,t))return r}function pe(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--&&pe(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=kr(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=kr(t,i),!i)||!pe(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(jr.call(e,r)&&++n&&!jr.call(t,r)||!(r in t)||!pe(e[r],t[r]))return!1;return Object.keys(t).length===n}}return e!==e&&t!==t}function Ja(e){var t=L.exports.useRef(e),r=L.exports.useRef(0);return pe(e,t.current)||(t.current=e,r.current+=1),L.exports.useMemo(function(){return t.current},[r.current])}function Qa(e,t){return L.exports.useEffect(e,Ja(t))}var Ya=function(t){var r=t.points,n=t.bounds,i=t.zoom,o=t.options,a=L.exports.useRef(),s=L.exports.useRef(),u=L.exports.useState([]),d=u[0],h=u[1],g=Math.round(i);return Qa(function(){(!a.current||!pe(s.current,r)||!pe(a.current.options,o))&&(a.current=new Ga(o),a.current.load(r)),n&&h(a.current.getClusters(n,g)),s.current=r},[r,n,g,o]),{clusters:d,supercluster:a.current}};const Xa=$.div`
2
+ border-radius: 50%;
3
+ background: linear-gradient(
4
+ to top,
5
+ ${P["--ll-color-primary-variant1"]},
6
+ ${P["--ll-color-primary"]}
7
+ );
8
+ color: ${P["--ll-color-on-primary"]};
9
+ height: ${({diameter:e})=>e}px;
10
+ width: ${({diameter:e})=>e}px;
11
+ display: flex;
12
+ justify-content: center;
13
+ align-items: center;
14
+ line-height: 1;
15
+ font-family: ${P["--ll-font-family"]};
16
+ font-size: ${({diameter:e})=>e/2.5}px;
17
+ border: 2px solid #fff;
18
+ box-shadow: ${P["--ll-shadow-small"]};
19
+ cursor: default;
20
+ `,es=({cluster:e,pointsCount:t,onClick:r})=>{const n=e.properties.point_count,i=20+n/t*25;return C(Xa,{diameter:i,onClick:()=>r&&r(e),children:e.properties.point_count})};function ts(e){return e.properties.cluster!==void 0}const In=te.memo(({rect:e,zoom:t,mapRef:r,points:n,isMobile:i,activePOI:o,hoveredPOI:a,isMapMoving:s,setActivePOI:u})=>{var b;const d=(b=r==null?void 0:r.current)==null?void 0:b.getMap().getBounds().toArray().flat(),{clusters:h,supercluster:g}=Ya({points:n,bounds:d,zoom:t,options:{radius:50,maxZoom:18}});return C(ut,{children:h.map((y,_)=>{const[x,w]=y.geometry.coordinates;if(ts(y))return C(vr,{latitude:w,longitude:x,children:C(es,{cluster:y,pointsCount:n.length,onClick:()=>{var f;const p=Math.min(g.getClusterExpansionZoom(y.id),20);(f=r.current)==null||f.flyTo({zoom:p,center:[x,w],duration:1e3})}})},`cluster-${y.id}`);const{poi:v,type:m}=y.properties,c=o===v,l=a===v;return C(vr,{latitude:v.lat,longitude:v.lng,style:{zIndex:c?1:0},children:N(_t.Root,{options:{type:m,poi:v,isOpen:s?!1:c,isHovered:l,side:"top",collisionPadding:i?{top:e.height+32,bottom:be*2,left:be*2,right:be*2}:{left:e.width+32,right:be*2,top:be*2,bottom:be*2}},onChange:p=>{p.type==="open-change"&&(p.data?setTimeout(()=>{u(v)},0):c&&u(void 0))},children:[C(_t.Marker,{}),C(_t.Content,{})]})},`${v.name}-${v.lat}-${v.lng}-${_}`)})})});In.displayName="Markers";function cr(e){const{client:t}=at(),{sdkState:r}=st(),n=Bt(r.options,250),o={...L.exports.useMemo(()=>n!=null&&n.marker?n.marker:{lat:n==null?void 0:n.lat,lng:n==null?void 0:n.lng},[n]),geographyLevels:["10","30"],locationScoresRounding:!1,include:e};return zt(kn.list(o),async()=>t.getScores(o),{enabled:!!o})}const rs=$.div`
21
+ padding: ${P["--ll-spacing-small"]} ${P["--ll-spacing-medium"]};
22
+ background-color: ${P["--ll-color-surface"]};
23
+ display: flex;
24
+ flex-direction: column;
25
+ overflow: hidden;
26
+ flex: 1;
27
+ `,ns=$.div`
28
+ display: grid;
29
+ grid-template-columns: min-content 1fr;
30
+ grid-gap: ${P["--ll-spacing-medium"]};
31
+ margin-bottom: ${P["--ll-spacing-medium"]};
32
+ `,is=$.div`
33
+ overflow: auto;
34
+
35
+ &:not(:empty) {
36
+ margin-top: ${P["--ll-spacing-medium"]};
37
+ }
38
+ `,os=zr({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),as=zr({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),ss=$(Rn)`
39
+ margin: 0;
40
+ `,Mn=$(Nn)`
41
+ background: none;
42
+ border: none;
43
+ display: flex;
44
+ align-items: center;
45
+ width: 100%;
46
+ padding: ${P["--ll-spacing-x-small"]} 0;
47
+ `,us=$(zn)`
48
+ background-color: ${P["--ll-color-surface"]};
49
+ position: relative;
50
+ z-index: 1;
51
+ overflow: hidden;
52
+ margin-left: calc(-1 * ${P["--ll-spacing-medium"]});
53
+ margin-right: calc(-1 * ${P["--ll-spacing-medium"]});
54
+
55
+ [data-state="open"] & {
56
+ animation: ${os} 300ms cubic-bezier(0.87, 0, 0.13, 1);
57
+ }
58
+
59
+ [data-state="closed"] & {
60
+ animation: ${as} 300ms cubic-bezier(0.87, 0, 0.13, 1);
61
+ }
62
+ `,ls=$.div`
63
+ padding: ${P["--ll-spacing-medium"]};
64
+ `,cs=$.span`
65
+ ${Mn}[data-state=open] & {
66
+ transform: rotate(90deg);
67
+ } ;
68
+ `;$.div`
69
+ display: flex;
70
+ align-items: flex-start;
71
+ justify-content: space-between;
72
+ `;const fr=$.div`
73
+ margin: ${P["--ll-spacing-small"]} 0;
74
+ `,fs=$.div`
75
+ margin-top: ${P["--ll-spacing-large"]};
76
+
77
+ &:empty {
78
+ margin: 0;
79
+ }
80
+ `,Pn=te.memo(({result:e,poi:t})=>{const{activePOI:r,setActivePOI:n,hoveredPOI:i,setHoveredPOI:o}=oe(),{mapRef:a,mapPadding:s}=Cn();return!e.data||!e.data[t]?null:C(he.Content,{options:{value:t},children:C(Br.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 g=window.innerWidth-s.left,b=window.innerWidth/2,y=g/2+s.left-b;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 dr=te.memo(({include:e})=>{const t=bn();return t.isLoading&&e.length?C(ut,{children:[...Array(10)].map((r,n)=>C(fr,{children:C(lt,{height:"34px",width:"100%"})},n))}):t.data?N(he.Root,{options:{include:e},children:[C(he.Tabs,{}),e.map(r=>C(Pn,{poi:r,result:t},r))]}):null});dr.displayName="POIs";const An=({score:e})=>{const{data:t,isLoading:r}=_n(),{activePOI:n,setActivePOI:i,hoveredPOI:o,setHoveredPOI:a}=oe(),{mapRef:s,mapPadding:u}=Cn();return r?C(ut,{children:[...Array(10)].map(d=>C(fr,{children:C(lt,{height:"34px",width:"100%"})},d))}):t?C(Br.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 g=d.data;i(g);const b=window.innerWidth-u.left,y=window.innerWidth/2,_=b/2+u.left-y;g&&((h=s.current)==null||h.easeTo({zoom:18,center:[g.lng,g.lat],duration:1e3,offset:[_,0]}))}d.type==="poi-hover"&&a(d.data)}}):null},{scorePois:Rr}=he.Constants,ds=()=>{const{activeCategory:e,activeScore:t,showMobileList:r}=oe(),n=Ve.find(s=>s.value===e),{data:i,isLoading:o}=cr(n.scores),a=s=>!r||!Rr[s].length?null:s==="high_schools"||s==="primary_schools"?C(An,{score:s}):C(dr,{include:Rr[s]});return t&&(i==null?void 0:i.location[t])?o?C("div",{children:"Loading"}):C(V.Root,{options:{score:t,data:i},children:N(rs,{children:[N(ns,{children:[C(V.Badge,{}),C(V.BarChart,{})]}),C(V.Description,{}),C(is,{children:a(t)})]})}):null},ps=$.div`
81
+ display: flex;
82
+ overflow-x: scroll;
83
+ padding: ${P["--ll-spacing-x-small"]} ${P["--ll-spacing-medium"]};
84
+ flex-shrink: 0;
85
+ position: relative;
86
+ `,hs=$.button`
87
+ position: relative;
88
+ display: flex;
89
+ flex-direction: column;
90
+ align-items: center;
91
+ background: none;
92
+ border: none;
93
+ min-width: 60px;
94
+ padding: 0;
95
+ margin: 0 8px;
96
+ flex-shrink: 0;
97
+
98
+ &:first-child {
99
+ margin-left: 0;
100
+ }
101
+
102
+ &:last-child {
103
+ margin-right: 0;
104
+ }
105
+ `,vs=$.div`
106
+ position: absolute;
107
+ top: -6px;
108
+ right: 4px;
109
+ border: 2px solid ${P["--ll-color-background"]};
110
+ border-radius: 6px;
111
+ `,gs=$.div`
112
+ flex: 1;
113
+ display: flex;
114
+ align-items: center;
115
+ `,ms=$.div`
116
+ margin: 0 2px;
117
+ `,ys=({category:e})=>{const{data:t,isLoading:r,isFetching:n}=cr(e.scores),{activeScore:i,setActiveScore:o,setActiveCategory:a,setShowMobileList:s}=oe();return C(ps,{children:e.scores.map(u=>{const d=u===i,h=d?"--ll-color-primary":"--ll-color-disabled";return r||n?C(ms,{children:C(lt,{height:"44px",width:"60px"})},u):C(V.Root,{options:{score:u,data:t},children:N(hs,{onClick:()=>{s(!1),a(e.value),o(u)},children:[C(V.Icon,{options:{color:h,height:28,width:28}}),C(gs,{children:C(V.Title,{options:{variant:"caption1",color:h,noWrap:!0,noMargin:!0,weight:"--ll-font-weight-bold"}})}),C(vs,{children:C(V.Badge,{options:{variant:"small",isPrimary:d}})})]})},u)})})},bs=$.div`
118
+ display: flex;
119
+ padding: ${P["--ll-spacing-x-small"]} ${P["--ll-spacing-medium"]} ${P["--ll-spacing-xx-small"]} ${P["--ll-spacing-medium"]};
120
+ `,_s=$.div`
121
+ position: absolute;
122
+ top: 0;
123
+ left: 0;
124
+ right: 0;
125
+ bottom: ${({showMobileList:e})=>e&&0};
126
+ z-index: 3;
127
+ box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;
128
+ background-color: #fff;
129
+ overflow: hidden;
130
+ display: flex;
131
+ flex-direction: column;
132
+ background-color: ${P["--ll-color-background"]};
133
+ border: 1px solid ${P["--ll-color-border"]};
134
+ `,On=te.forwardRef(({showMobileList:e},t)=>{const{activeCategory:r,setActiveCategory:n}=oe();return N(_s,{ref:t,showMobileList:e,children:[C(bs,{children:N(He.Root,{value:r,onValueChange:i=>n(i),children:[C(He.Trigger,{size:"large",children:C(Ze.Root,{options:{scoreCategory:r},children:C(Ze.Title,{options:{color:"inherit",noMargin:!0,variant:"h6",lineHeight:1}})},r)}),C(He.Content,{children:Ve.map(i=>C(Ze.Root,{options:{scoreCategory:i.value},children:C(He.Item,{value:i.value,children:C(Ze.Title,{options:{color:"inherit",noMargin:!0,variant:"h6"}})})},i.value))})]})}),C(ys,{category:Ve.find(i=>i.value===r)}),C(ds,{})]})});On.displayName="MobileScores";const{scorePois:ws}=he.Constants,En=te.memo(({score:e,isLoading:t,data:r})=>t?C(fr,{children:C(lt,{height:"34px",width:"100%"},e)}):C(Bn,{value:e,children:N(V.Root,{options:{score:e,data:r},onChange:n=>{n.type==="tooltip-toggle"&&n.data&&Ne.trackEvent(ze.LC_LONG_DESCRIPTION_VIEW,e)},children:[C(ss,{children:N(Mn,{children:[C(cs,{children:C(Jn,{SVGElement:Vn,fill:P["--ll-color-on-background-variant1"]})}),C(ke,{spacing:"--ll-spacing-small"}),C(V.Icon,{}),C(ke,{spacing:"--ll-spacing-small"}),C(V.Title,{}),C(ke,{}),C(V.Badge,{})]})}),C(us,{children:N(ls,{children:[C(V.Description,{}),C(ke,{vertical:!0,spacing:"--ll-spacing-small"}),C(V.BarChart,{}),C(fs,{children:e==="high_schools"||e==="primary_schools"?C(An,{score:e}):C(dr,{include:ws[e]})})]})})]})},e));En.displayName="Score";const Cs=$.div`
135
+ padding: ${P["--ll-spacing-small"]} ${P["--ll-spacing-medium"]};
136
+ `,xs=$.div`
137
+ display: flex;
138
+ justify-content: space-between;
139
+ align-items: center;
140
+ `,Ln=te.memo(({data:e,isLoading:t,isFetching:r,tabContent:n})=>{const{translations:i}=Qn();return N(Cs,{children:[N(xs,{children:[C(Ye.Title,{options:{variant:"h4",noMargin:!0,weight:"--ll-font-weight-medium"}}),r&&!t&&C(Yn,{size:"small"})]}),C(ke,{spacing:"--ll-spacing-small",vertical:!0}),!r&&!Object.keys((e==null?void 0:e.location)||{}).length&&C(Xn,{color:"--ll-color-on-background-variant1",children:i.EMPTY_TEXT}),n.scores.map(o=>C(En,{score:o,data:e,isLoading:t},o))]})});Ln.displayName="ScoreCategory";const $n=te.memo(({tabContent:e})=>{at();const{data:t,isLoading:r,isFetching:n}=cr(e.scores),{activeScore:i,setActiveScore:o}=oe();return C(Un,{value:i,onValueChange:a=>{o(a)},type:"single",collapsible:!0,children:C(Ln,{data:t,isLoading:r,isFetching:n,tabContent:e})})});$n.displayName="ScoreCategoryAccordion";const Ss=$.div`
141
+ overflow-y: auto;
142
+ `,Is=$.div`
143
+ position: absolute;
144
+ top: ${P["--ll-spacing-medium"]};
145
+ left: ${P["--ll-spacing-medium"]};
146
+ width: 360px;
147
+ max-height: calc(100% - 2 * ${P["--ll-spacing-medium"]});
148
+ z-index: 1;
149
+ border-radius: ${P["--ll-border-radius-medium"]};
150
+ box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;
151
+ background-color: #fff;
152
+ overflow: hidden;
153
+ display: flex;
154
+ flex-direction: column;
155
+ background-color: ${P["--ll-color-background"]};
156
+ border: 1px solid ${P["--ll-color-border"]};
157
+ `;$.div`
158
+ display: flex;
159
+ justify-content: center;
160
+ padding: ${P["--ll-spacing-small"]};
161
+ `;const Ms=$.div`
162
+ padding: ${P["--ll-spacing-x-small"]};
163
+ border-bottom: 1px solid ${P["--ll-color-border"]};
164
+ `,Ps=$.div`
165
+ display: flex;
166
+ justify-content: center;
167
+ padding: ${P["--ll-spacing-small"]};
168
+ background-color: ${P["--ll-color-background"]};
169
+ `,Tn=()=>C(Ps,{children:C(ei.Root,{})}),Dn=te.forwardRef((e,t)=>{const{activeCategory:r,setActiveCategory:n,setShowMobileList:i}=oe();return C(Ye.Root,{options:{currentTab:r},onChange:o=>{n(o.data)},children:N(Is,{ref:t,children:[C(Ms,{children:C(Ye.Tabs,{})}),C(Ss,{children:Ve.map(o=>C(Ye.Content,{options:{value:o.value},children:C($n,{tabContent:o},o.value)},o.value))}),C(Tn,{})]})})});Dn.displayName="DesktopScores";const As=$.div`
170
+ position: relative;
171
+ display: flex;
172
+ flex-direction: column;
173
+ height: 100vh;
174
+ `,Os=$.div`
175
+ position: absolute;
176
+ bottom: 86px;
177
+ right: 10px;
178
+ background-color: ${P["--ll-color-background"]};
179
+ z-index: 3;
180
+ border-radius: 50%;
181
+ `,Es=$(ti)`
182
+ box-shadow: ${P["--ll-shadow-medium"]};
183
+ `,{scorePois:Ot}=he.Constants,Ls=()=>{var O,T,B;const{sdkState:e,setSdkState:t}=st(),{activeScore:r,activePOI:n,setActivePOI:i,hoveredPOI:o,showMobileList:a,setShowMobileList:s}=oe(),u=ja(),d=bn(),h=_n(),g=((T=(O=e==null?void 0:e.globalOptions)==null?void 0:O.appearance)==null?void 0:T.theme)==="night"?"basic-v2-dark":"600d69cb-288d-445e-9839-3dfe4d76b31a",[b,y]=L.exports.useState(!1),_=L.exports.useMemo(()=>{var k;return(r==="high_schools"||r==="primary_schools")&&!h.isFetching?{[r]:((k=h==null?void 0:h.data)==null?void 0:k[r])||[]}:!(r&&Ot[r]&&Ot[r].length)&&!d.isFetching?{[r]:[]}:d.data},[d.data,h.data,r]),x=L.exports.useMemo(()=>_?Object.entries(_).map(([ae,se])=>se.map(J=>Pr([J.lng,J.lat],{poi:J,type:ae}))).flat().filter((ae,se,J)=>J.findIndex(bt=>["lat","lng","name"].every($e=>bt.properties.poi[$e]===ae.properties.poi[$e]))===se):[],[_]),w=L.exports.useMemo(()=>{var ae,se,J;const k=((ae=e==null?void 0:e.options)==null?void 0:ae.marker)&&Pr([(se=e==null?void 0:e.options)==null?void 0:se.marker.lng,(J=e==null?void 0:e.options)==null?void 0:J.marker.lat]);return[...x,...k?[k]:[]]},[x,(B=e==null?void 0:e.options)==null?void 0:B.marker]),v=L.exports.useRef(),[m,c]=qn(),l=L.exports.useMemo(()=>({top:25+c.height,bottom:25,left:25,right:25}),[c.height]),p=L.exports.useMemo(()=>({top:50,bottom:50,left:c.width+32+50,right:50}),[c.width]),f=u?l:p,E=k=>{t({...e,options:{...e.options,lat:k.viewState.latitude,lng:k.viewState.longitude,zoom:k.viewState.zoom,bearing:k.viewState.bearing,pitch:k.viewState.pitch}})};return L.exports.useEffect(()=>{var $e,pr;if(!w.length||!(($e=e.options)!=null&&$e.marker))return;const k=ma(w.map(({geometry:hr})=>[hr.coordinates[1],hr.coordinates[0]])),[ae,se,J,bt]=kt(k);(pr=v==null?void 0:v.current)==null||pr.fitBounds([[se,ae],[bt,J]],{maxZoom:17,padding:f,duration:1e3})},[w,f]),e.options?C(Na,{mapRef:v,mapPadding:f,children:N(As,{children:[N(Gn,{ref:v,mapLib:Kn,latitude:e.options.lat,longitude:e.options.lng,zoom:e.options.zoom,pitch:e.options.pitch,bearing:e.options.bearing,style:{flex:1,width:"100vw"},mapStyle:`https://api.maptiler.com/maps/${g}/style.json?key=9jNGatuzs05Q1oNlctEs`,onMove:E,cooperativeGestures:e.options.cooperativeGestures,onMoveStart:()=>y(!0),onMoveEnd:()=>y(!1),children:[C(Hn,{showCompass:!0,style:{marginTop:u?16+c.height:16,marginRight:16}}),e.options.marker&&C(Zn,{marker:e.options.marker}),C(In,{rect:c,zoom:e.options.zoom,mapRef:v,points:x,isMobile:u,activePOI:n,hoveredPOI:o,isMapMoving:b,setActivePOI:i}),u?C(On,{ref:m,showMobileList:a}):C(Dn,{ref:m})]}),u&&N(ut,{children:[C(Os,{children:C(Es,{size:"large",SVGElement:ka,onClick:()=>s(k=>!k),disabled:!(r&&!!Ot[r].length)})}),C(Tn,{})]})]})}):C("div",{children:"No options provided."})},$s=()=>(Ne.trackPageLoad(),C(ga,{children:C(Ls,{})}));var Ns=Object.freeze(Object.defineProperty({__proto__:null,default:$s},Symbol.toStringTag,{value:"Module"}));export{ge as C,ir as P,ct as a,fn as b,le as c,js as d,Fs as e,or as f,ks as g,Re as h,nt as i,Vr as j,Y as k,Mt as l,$o as m,ai as n,vi as o,Zo as p,Ns as q,Rs as u};
@@ -0,0 +1 @@
1
+ import{b as p,c as v}from"./index.85e812f8.js";import{e as g,g as M,l as N}from"./index.1fe3a37f.js";import"./chevron_right.f7f802f5.js";function S(o,w,h){var i;return p(this,void 0,void 0,function(){var s,c,l,d,n,b=this;return v(this,function(u){switch(u.label){case 0:return g()?[2,[]]:(s=M(),c=(i=w.enabledMiddleware)!==null&&i!==void 0?i:{},l=Object.entries(c).filter(function(r){r[0];var e=r[1];return e}).map(function(r){var e=r[0];return e}),d=l.map(function(r){return p(b,void 0,void 0,function(){var e,a,m,f;return v(this,function(t){switch(t.label){case 0:e=r.replace("@segment/",""),a=e,h&&(a=btoa(e).replace(/=/g,"")),m="".concat(s,"/middleware/").concat(a,"/latest/").concat(a,".js.gz"),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,N(m)];case 2:return t.sent(),[2,window["".concat(e,"Middleware")]];case 3:return f=t.sent(),o.log("error",f),o.stats.increment("failed_remote_middleware"),[3,4];case 4:return[2]}})})}),[4,Promise.all(d)]);case 1:return n=u.sent(),n=n.filter(Boolean),[2,n]}})})}export{S as remoteMiddlewares};