Zaznacz stronę
Tajemniczy Konsultant | Transformacja Cyfrowa & AI
Mysterious Consultant

Transformacja Bez Granic

Ekspert w optymalizacji biznesów i implementacji technologii przyszłości. Dyskretne konsultacje dla wymagających klientów.

500 Projektów
98 Sukces
15 Lat Doświadczenia
Przewiń w dół

Filozofia Działania

W świecie pełnym szumu, prawdziwa wartość kryje się w ciszy i precyzji

Dyskrecja

Tożsamość pozostaje ukryta, ale rezultaty mówią same za siebie. Każdy projekt realizowany z najwyższą poufnością.

Precyzja

Każde rozwiązanie dopracowane do perfekcji. Analiza, strategia i implementacja na najwyższym poziomie.

Innowacja

Wykorzystanie najnowszych technologii AI i automatyzacji do osiągnięcia przewagi konkurencyjnej.

Digital Transformation
15+ Lat w branży

Obszary Specjalizacji

Kompleksowe rozwiązania dla nowoczesnych przedsiębiorstw

Business Optimization

Optymalizacja Biznesu

Analiza procesów, identyfikacja wąskich gardeł i implementacja rozwiązań zwiększających efektywność o 40-60%.

  • Audyt procesów biznesowych
  • Automatyzacja workflow
  • Optymalizacja kosztów
  • Zwiększenie produktywności
Digital Transformation

Transformacja Cyfrowa

Kompleksowa digitalizacja przedsiębiorstwa z wykorzystaniem najnowszych technologii i metodologii.

  • Strategia cyfrowa
  • Migracja do chmury
  • Integracja systemów
  • Cyberbezpieczeństwo
AI Implementation

Implementacja AI

Integracja sztucznej inteligencji w kluczowych procesach biznesowych dla maksymalizacji ROI.

  • Machine Learning
  • Automatyzacja decyzji
  • Analiza predykcyjna
  • Chatboty i asystenci

Wyniki Mówią Wszystko

Konkretne rezultaty dla różnych branż i wielkości przedsiębiorstw

Fintech

Automatyzacja Procesów Kredytowych

75% Redukcja czasu
€2.3M Oszczędności roczne

Implementacja AI w procesie oceny kredytowej skróciła czas decyzji z 5 dni do 6 godzin przy zachowaniu 99.2% dokładności.

E-commerce

Personalizacja Doświadczeń Klientów

180% Wzrost konwersji
45% Więcej przychodów

System rekomendacji oparty na ML zwiększył średnią wartość koszyka i zadowolenie klientów o 67%.

Healthcare

Optymalizacja Zarządzania Zasobami

30% Mniej czasu oczekiwania
€1.8M Oszczędności

Predykcyjne planowanie zasobów medycznych zoptymalizowało wykorzystanie sal operacyjnych i personelu.

Rozpocznij Transformację

Każdy projekt rozpoczyna się od dyskretnej rozmowy. Skontaktuj się, aby omówić możliwości transformacji Twojego biznesu.

Bezpieczny Kontakt

[email protected]

Szyfrowana Linia

+48 XXX XXX XXX

Dostępna 24/7

Gwarancja Poufności

Wszystkie rozmowy objęte są najwyższym poziomem poufności. NDA podpisywane przed pierwszą konsultacją.

Color format
.${de(„textarea”)}:focus-within { border-color: var(–border-dark); }
${N1.filter(e=>e.type!==Ee.DELETE&&e.type!==Ee.COPY).map(({type:e,label:n})=>{const l=()=>{if(e===Ee.BOLD)return M`${F1}`;if(e===Ee.ITALIC)return M`${U1}`;if(e===Ee.UNDERLINE)return M`${Y1}`;if(e===Ee.COLOR)return M`${J1(this.currentTextColor)}`},i=()=>{if(!this.triggerEl)return!1;const o=this.triggerEl.cloneNode(!0);[J.spaceEditorHighlight,J.onlyTextNode,J.textNodeActive].forEach(a=>{o.classList.remove(a)}),o.classList.add(J.hidden),document.body.appendChild(o);const c=getComputedStyle(o);return setTimeout(()=>{document.body.removeChild(o)},0),e===Ee.BOLD?Ae.isTextBolded(c.fontWeight):e===Ee.ITALIC?Ae.isTextItalic(c.fontStyle):e===Ee.UNDERLINE?Ae.isTextUnderlined(c.textDecorationLine):!1};return e===Ee.COLOR?M``:M``})}
`}show(e,n){this.triggerEl=e,this.textContent=e.textContent??””,this.currentTextColor=getComputedStyle(e).color,this.render(),this.panelEl&&(this.panelEl.setAnchor(this.triggerEl),this.panelEl.open(n)),this.triggerEl.classList.add(J.textNodeActive),this.domEditor=new Ae(e,this.se),document.addEventListener(„keydown”,this.handleCloseWhenEscape),document.addEventListener(„mousedown”,this.handleClickOutside),document.addEventListener(„coloris:pick”,this.handleColorChange)}destroy(){var e;document.removeEventListener(„keydown”,this.handleCloseWhenEscape),document.removeEventListener(„mousedown”,this.handleClickOutside),document.removeEventListener(„coloris:pick”,this.handleColorChange),(e=this.triggerEl)==null||e.classList.remove(J.textNodeActive),super.destroy()}handleQuickActionClick(e){this.domEditor.handleQuickActionClick(e);const n=this.se.createPatch(this.triggerEl);this.se.debouncedAddPatched(n),e===Ee.DELETE&&this.destroy(),this.render()}handleInput(e){const n=e.target;if(n instanceof HTMLTextAreaElement){this.textContent=n.value,this.render(),this.domEditor.updateTextContent(this.textContent);const l=this.se.createPatch(this.triggerEl);this.se.debouncedAddPatched(l)}}handleSetRootRef(e){e instanceof hi&&(this.panelEl=e)}handleInitColorPicker(e){e instanceof HTMLInputElement&&(st.init(),st.coloris({el:e,alpha:!0,swatches:[„#FFF”,”#000000″,”#FF0001″,”#FF5100″,”#FFC700″,”#00B336″,”#00CBFF”,”#65BAFF”,”#B400D8″,”#86A3AB”,”#4F5559″]}))}}const _1={snakeToCamel:t=>t.replace(/(_[a-z])/g,e=>e.toUpperCase().replace(„_”,””)),camelToSnake:t=>t.replace(/([A-Z])/g,e=>`_${e.toLowerCase()}`).replace(/^_/,””)};function P1(t,e){return _1.camelToSnake(e)}function il(t,e){return e&&(Array.isArray(e)?e.map(n=>il(t,n)):typeof e==”object”?Object.keys(e).reduce((n,l)=>{const i=e[l],o=P1(t,l);return n[o]=il(t,i),n},{}):e)}var ni=function(t,e){return ni=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,l){n.__proto__=l}||function(n,l){for(var i in l)Object.prototype.hasOwnProperty.call(l,i)&&(n[i]=l[i])},ni(t,e)};function Fe(t,e){if(typeof e!=”function”&&e!==null)throw new TypeError(„Class extends value „+String(e)+” is not a constructor or null”);ni(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var B=function(){return B=Object.assign||function(e){for(var n,l=1,i=arguments.length;l0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]=t.length&&(t=void 0),{value:t&&t[l++],done:!t}}};throw new TypeError(e?”Object is not iterable.”:”Symbol.iterator is not defined.”)}function K(t,e){var n=typeof Symbol==”function”&&t[Symbol.iterator];if(!n)return t;var l=n.call(t),i,o=[],r;try{for(;(e===void 0||e– >0)&&!(i=l.next()).done;)o.push(i.value)}catch(c){r={error:c}}finally{try{i&&!i.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}return o}function Ze(t,e,n){if(n||arguments.length===2)for(var l=0,i=e.length,o;l1||a(g,p)})},V&&(i[g]=V(i[g])))}function a(g,V){try{d(l[g](V))}catch(p){b(o[0][3],p)}}function d(g){g.value instanceof Qt?Promise.resolve(g.value.v).then(s,u):b(o[0][2],g)}function s(g){a(„next”,g)}function u(g){a(„throw”,g)}function b(g,V){g(V),o.shift(),o.length&&a(o[0][0],o[0][1])}}function $1(t){if(!Symbol.asyncIterator)throw new TypeError(„Symbol.asyncIterator is not defined.”);var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof ce==”function”?ce(t):t[Symbol.iterator](),n={},l(„next”),l(„throw”),l(„return”),n[Symbol.asyncIterator]=function(){return this},n);function l(o){n[o]=t[o]&&function(r){return new Promise(function(c,a){r=t[o](r),i(c,a,r.done,r.value)})}}function i(o,r,c,a){Promise.resolve(a).then(function(d){o({value:d,done:c})},r)}}var kt;(function(t){t.SET=”$set”,t.SET_ONCE=”$setOnce”,t.ADD=”$add”,t.APPEND=”$append”,t.PREPEND=”$prepend”,t.REMOVE=”$remove”,t.PREINSERT=”$preInsert”,t.POSTINSERT=”$postInsert”,t.UNSET=”$unset”,t.CLEAR_ALL=”$clearAll”})(kt||(kt={}));var Nt;(function(t){t.IDENTIFY=”$identify”,t.GROUP_IDENTIFY=”$groupidentify”,t.REVENUE=”revenue_amount”})(Nt||(Nt={}));var hr=”-„,pl=”AMP”,q1=””.concat(pl,”_unsent”),va=”https://api2.amplitude.com/2/httpapi”,e0=”https://api.eu.amplitude.com/2/httpapi”,t0=”https://api2.amplitude.com/batch”,n0=”https://api.eu.amplitude.com/batch”,l0=1e3,ii=function(t){if(Object.keys(t).length>l0)return!1;for(var e in t){var n=t[e];if(!Ba(e,n))return!1}return!0},Ba=function(t,e){var n,l;if(typeof t!=”string”)return!1;if(Array.isArray(e)){var i=!0;try{for(var o=ce(e),r=o.next();!r.done;r=o.next()){var c=r.value;if(Array.isArray(c))return!1;if(typeof c==”object”)i=i&&ii(c);else if(![„number”,”string”].includes(typeof c))return!1;if(!i)return!1}}catch(a){n={error:a}}finally{try{r&&!r.done&&(l=o.return)&&l.call(o)}finally{if(n)throw n.error}}}else{if(e==null)return!1;if(typeof e==”object”)return ii(e);if(![„number”,”string”,”boolean”].includes(typeof e))return!1}return!0},_t=function(){function t(){this._propertySet=new Set,this._properties={}}return t.prototype.getUserProperties=function(){return B({},this._properties)},t.prototype.set=function(e,n){return this._safeSet(ee.SET,e,n),this},t.prototype.setOnce=function(e,n){return this._safeSet(ee.SET_ONCE,e,n),this},t.prototype.append=function(e,n){return this._safeSet(ee.APPEND,e,n),this},t.prototype.prepend=function(e,n){return this._safeSet(ee.PREPEND,e,n),this},t.prototype.postInsert=function(e,n){return this._safeSet(ee.POSTINSERT,e,n),this},t.prototype.preInsert=function(e,n){return this._safeSet(ee.PREINSERT,e,n),this},t.prototype.remove=function(e,n){return this._safeSet(ee.REMOVE,e,n),this},t.prototype.add=function(e,n){return this._safeSet(ee.ADD,e,n),this},t.prototype.unset=function(e){return this._safeSet(ee.UNSET,e,hr),this},t.prototype.clearAll=function(){return this._properties={},this._properties[ee.CLEAR_ALL]=hr,this},t.prototype._safeSet=function(e,n,l){if(this._validate(e,n,l)){var i=this._properties[e];return i===void 0&&(i={},this._properties[e]=i),i[n]=l,this._propertySet.add(n),!0}return!1},t.prototype._validate=function(e,n,l){return this._properties[ee.CLEAR_ALL]!==void 0||this._propertySet.has(n)?!1:e===ee.ADD?typeof l==”number”:e!==ee.UNSET&&e!==ee.REMOVE?Ba(n,l):!0},t}(),ee;(function(t){t.SET=”$set”,t.SET_ONCE=”$setOnce”,t.ADD=”$add”,t.APPEND=”$append”,t.PREPEND=”$prepend”,t.REMOVE=”$remove”,t.PREINSERT=”$preInsert”,t.POSTINSERT=”$postInsert”,t.UNSET=”$unset”,t.CLEAR_ALL=”$clearAll”})(ee||(ee={}));var i0=[ee.CLEAR_ALL,ee.UNSET,ee.SET,ee.SET_ONCE,ee.ADD,ee.APPEND,ee.PREPEND,ee.PREINSERT,ee.POSTINSERT,ee.REMOVE],o0=”Event tracked successfully”,r0=”Unexpected error occurred”,c0=”Event rejected due to exceeded retry count”,a0=”Event skipped due to optOut config”,d0=”Event rejected due to missing API key”,s0=”Invalid API key”,u0=”Client not initialized”,he;(function(t){t.Unknown=”unknown”,t.Skipped=”skipped”,t.Success=”success”,t.RateLimit=”rate_limit”,t.PayloadTooLarge=”payload_too_large”,t.Invalid=”invalid”,t.Failed=”failed”,t.Timeout=”Timeout”,t.SystemError=”SystemError”})(he||(he={}));var Kt=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=he.Unknown),{event:t,code:e,message:n}},Ce=function(){var t=”ampIntegrationContext”;if(typeof globalThis<"u"&&typeof globalThis[t]<"u")return globalThis[t];if(typeof globalThis<"u")return globalThis;if(typeof window<"u")return window;if(typeof self<"u")return self;if(typeof global<"u")return global},g0=function(t){return t?(t^Math.random()*16>>t/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,Ft)},br=Ze([],K(Array(256).keys()),!1).map(function(t){return t.toString(16).padStart(2,”0″)}),Ft=function(t){var e,n=Ce();if(!(!((e=n==null?void 0:n.crypto)===null||e===void 0)&&e.getRandomValues))return g0(t);var l=n.crypto.getRandomValues(new Uint8Array(16));return l[6]=l[6]&15|64,l[8]=l[8]&63|128,Ze([],K(l.entries()),!1).map(function(i){var o=K(i,2),r=o[0],c=o[1];return[4,6,8,10].includes(r)?”-„.concat(br[c]):br[c]}).join(„”)},h0=function(){function t(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[]}return t.prototype.register=function(e,n){var l,i;return W(this,void 0,void 0,function(){return S(this,function(o){switch(o.label){case 0:return this.plugins.some(function(r){return r.name===e.name})?(n.loggerProvider.warn(„Plugin with name „.concat(e.name,” already exists, skipping registration”)),[2]):(e.name===void 0&&(e.name=Ft(),n.loggerProvider.warn(`Plugin name is undefined. Generating a random UUID for plugin name: `.concat(e.name,`. Set a name for the plugin to prevent it from being added multiple times.`))),e.type=(l=e.type)!==null&&l!==void 0?l:”enrichment”,[4,(i=e.setup)===null||i===void 0?void 0:i.call(e,n,this.client)]);case 1:return o.sent(),this.plugins.push(e),[2]}})})},t.prototype.deregister=function(e,n){var l;return W(this,void 0,void 0,function(){var i,o;return S(this,function(r){switch(r.label){case 0:return i=this.plugins.findIndex(function(c){return c.name===e}),i===-1?(n.loggerProvider.warn(„Plugin with name „.concat(e,” does not exist, skipping deregistration”)),[2]):(o=this.plugins[i],this.plugins.splice(i,1),[4,(l=o.teardown)===null||l===void 0?void 0:l.call(o)]);case 1:return r.sent(),[2]}})})},t.prototype.reset=function(e){this.applying=!1;var n=this.plugins;n.map(function(l){var i;return(i=l.teardown)===null||i===void 0?void 0:i.call(l)}),this.plugins=[],this.client=e},t.prototype.push=function(e){var n=this;return new Promise(function(l){n.queue.push([e,l]),n.scheduleApply(0)})},t.prototype.scheduleApply=function(e){var n=this;this.applying||(this.applying=!0,setTimeout(function(){n.apply(n.queue.shift()).then(function(){n.applying=!1,n.queue.length>0&&n.scheduleApply(0)})},e))},t.prototype.apply=function(e){return W(this,void 0,void 0,function(){var n,l,i,o,r,c,a,g,V,d,s,u,b,g,V,p,X,Z,f,G,C,E;return S(this,function(y){switch(y.label){case 0:if(!e)return[2];n=K(e,1),l=n[0],i=K(e,2),o=i[1],r=this.plugins.filter(function(A){return A.type===”before”}),y.label=1;case 1:y.trys.push([1,6,7,8]),c=ce(r),a=c.next(),y.label=2;case 2:return a.done?[3,5]:(g=a.value,g.execute?[4,g.execute(B({},l))]:[3,4]);case 3:if(V=y.sent(),V===null)return o({event:l,code:0,message:””}),[2];l=V,y.label=4;case 4:return a=c.next(),[3,2];case 5:return[3,8];case 6:return d=y.sent(),f={error:d},[3,8];case 7:try{a&&!a.done&&(G=c.return)&&G.call(c)}finally{if(f)throw f.error}return[7];case 8:s=this.plugins.filter(function(A){return A.type===”enrichment”||A.type===void 0}),y.label=9;case 9:y.trys.push([9,14,15,16]),u=ce(s),b=u.next(),y.label=10;case 10:return b.done?[3,13]:(g=b.value,g.execute?[4,g.execute(B({},l))]:[3,12]);case 11:if(V=y.sent(),V===null)return o({event:l,code:0,message:””}),[2];l=V,y.label=12;case 12:return b=u.next(),[3,10];case 13:return[3,16];case 14:return p=y.sent(),C={error:p},[3,16];case 15:try{b&&!b.done&&(E=u.return)&&E.call(u)}finally{if(C)throw C.error}return[7];case 16:return X=this.plugins.filter(function(A){return A.type===”destination”}),Z=X.map(function(A){var F=B({},l);return A.execute(F).catch(function(w){return Kt(F,0,String(w))})}),Promise.all(Z).then(function(A){var F=K(A,1),w=F[0],_=w||Kt(l,100,”Event not tracked, no destination plugins on the instance”);o(_)}),[2]}})})},t.prototype.flush=function(){return W(this,void 0,void 0,function(){var e,n,l,i=this;return S(this,function(o){switch(o.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(r){return i.apply(r)}))];case 1:return o.sent(),n=this.plugins.filter(function(r){return r.type===”destination”}),l=n.map(function(r){return r.flush&&r.flush()}),[4,Promise.all(l)];case 2:return o.sent(),[2]}})})},t.prototype.onIdentityChanged=function(e){this.plugins.forEach(function(n){var l;(l=n.onIdentityChanged)===null||l===void 0||l.call(n,e)})},t.prototype.onSessionIdChanged=function(e){this.plugins.forEach(function(n){var l;(l=n.onSessionIdChanged)===null||l===void 0||l.call(n,e)})},t.prototype.onOptOutChanged=function(e){this.plugins.forEach(function(n){var l;(l=n.onOptOutChanged)===null||l===void 0||l.call(n,e)})},t}(),b0=function(t,e,n){var l=typeof t==”string”?{event_type:t}:t;return B(B(B({},l),n),e&&{event_properties:e})},Na=function(t,e){var n=B(B({},e),{event_type:Nt.IDENTIFY,user_properties:t.getUserProperties()});return n},V0=function(t,e,n,l){var i,o=B(B({},l),{event_type:Nt.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(i={},i[t]=e,i)});return o},m0=function(t,e,n){var l,i=new _t;i.set(t,e);var o=B(B({},n),{event_type:Nt.IDENTIFY,user_properties:i.getUserProperties(),groups:(l={},l[t]=e,l)});return o},A0=function(t,e){return B(B({},e),{event_type:Nt.REVENUE,event_properties:t.getEventProperties()})},xe=function(t){return{promise:t||Promise.resolve()}},Z0=function(){function t(e){e===void 0&&(e=”$default”),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new h0(this),this.name=e}return t.prototype._init=function(e){return W(this,void 0,void 0,function(){return S(this,function(n){switch(n.label){case 0:return this.config=e,this.timeline.reset(this),[4,this.runQueuedFunctions(„q”)];case 1:return n.sent(),this.isReady=!0,[2]}})})},t.prototype.runQueuedFunctions=function(e){return W(this,void 0,void 0,function(){var n,l,i,o,r,c,a,d;return S(this,function(s){switch(s.label){case 0:n=this[e],this[e]=[],s.label=1;case 1:s.trys.push([1,8,9,10]),l=ce(n),i=l.next(),s.label=2;case 2:return i.done?[3,7]:(o=i.value,r=o(),r&&”promise”in r?[4,r.promise]:[3,4]);case 3:return s.sent(),[3,6];case 4:return[4,r];case 5:s.sent(),s.label=6;case 6:return i=l.next(),[3,2];case 7:return[3,10];case 8:return c=s.sent(),a={error:c},[3,10];case 9:try{i&&!i.done&&(d=l.return)&&d.call(l)}finally{if(a)throw a.error}return[7];case 10:return this[e].length?[4,this.runQueuedFunctions(e)]:[3,12];case 11:s.sent(),s.label=12;case 12:return[2]}})})},t.prototype.track=function(e,n,l){var i=b0(e,n,l);return xe(this.dispatch(i))},t.prototype.identify=function(e,n){var l=Na(e,n);return xe(this.dispatch(l))},t.prototype.groupIdentify=function(e,n,l,i){var o=V0(e,n,l,i);return xe(this.dispatch(o))},t.prototype.setGroup=function(e,n,l){var i=m0(e,n,l);return xe(this.dispatch(i))},t.prototype.revenue=function(e,n){var l=A0(e,n);return xe(this.dispatch(l))},t.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),xe())},t.prototype._addPlugin=function(e){return xe(this.timeline.register(e,this.config))},t.prototype.remove=function(e){return this.isReady?this._removePlugin(e):(this.q.push(this._removePlugin.bind(this,e)),xe())},t.prototype._removePlugin=function(e){return xe(this.timeline.deregister(e,this.config))},t.prototype.dispatchWithCallback=function(e,n){if(!this.isReady)return n(Kt(e,0,u0));this.process(e).then(n)},t.prototype.dispatch=function(e){return W(this,void 0,void 0,function(){var n=this;return S(this,function(l){return this.isReady?[2,this.process(e)]:[2,new Promise(function(i){n.dispatchQ.push(n.dispatchWithCallback.bind(n,e,i))})]})})},t.prototype.getOperationAppliedUserProperties=function(e){var n={};if(e===void 0)return n;var l={};return Object.keys(e).forEach(function(i){Object.values(kt).includes(i)||(l[i]=e[i])}),i0.forEach(function(i){if(Object.keys(e).includes(i)){var o=e[i];switch(i){case kt.CLEAR_ALL:Object.keys(n).forEach(function(r){delete n[r]});break;case kt.UNSET:Object.keys(o).forEach(function(r){delete n[r]});break;case kt.SET:Object.assign(n,o);break}}}),Object.assign(n,l),n},t.prototype.process=function(e){return W(this,void 0,void 0,function(){var n,o,l,i,o;return S(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),this.config.optOut?[2,Kt(e,0,a0)]:(e.event_type===Nt.IDENTIFY&&(n=this.getOperationAppliedUserProperties(e.user_properties),this.timeline.onIdentityChanged({userProperties:n})),[4,this.timeline.push(e)]);case 1:return o=r.sent(),o.code===200?this.config.loggerProvider.log(o.message):o.code===100?this.config.loggerProvider.warn(o.message):this.config.loggerProvider.error(o.message),[2,o];case 2:return l=r.sent(),i=String(l),this.config.loggerProvider.error(i),o=Kt(e,0,i),[2,o];case 3:return[2]}})})},t.prototype.setOptOut=function(e){if(!this.isReady){this.q.push(this._setOptOut.bind(this,!!e));return}this._setOptOut(e)},t.prototype._setOptOut=function(e){this.config.optOut!==e&&(this.timeline.onOptOutChanged(e),this.config.optOut=!!e)},t.prototype.flush=function(){return xe(this.timeline.flush())},t.prototype.plugin=function(e){var n=this.timeline.plugins.find(function(l){return l.name===e});if(n===void 0){this.config.loggerProvider.debug(„Cannot find plugin with name „.concat(e));return}return n},t.prototype.plugins=function(e){return this.timeline.plugins.filter(function(n){return n instanceof e})},t}(),f0=function(){function t(){this.productId=””,this.quantity=1,this.price=0}return t.prototype.setProductId=function(e){return this.productId=e,this},t.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},t.prototype.setPrice=function(e){return this.price=e,this},t.prototype.setRevenueType=function(e){return this.revenueType=e,this},t.prototype.setCurrency=function(e){return this.currency=e,this},t.prototype.setRevenue=function(e){return this.revenue=e,this},t.prototype.setReceipt=function(e){return this.receipt=e,this},t.prototype.setReceiptSig=function(e){return this.receiptSig=e,this},t.prototype.setEventProperties=function(e){return ii(e)&&(this.properties=e),this},t.prototype.getEventProperties=function(){var e=this.properties?B({},this.properties):{};return e[ot.REVENUE_PRODUCT_ID]=this.productId,e[ot.REVENUE_QUANTITY]=this.quantity,e[ot.REVENUE_PRICE]=this.price,e[ot.REVENUE_TYPE]=this.revenueType,e[ot.REVENUE_CURRENCY]=this.currency,e[ot.REVENUE]=this.revenue,e[ot.RECEIPT]=this.receipt,e[ot.RECEIPT_SIG]=this.receiptSig,e},t}(),ot;(function(t){t.REVENUE_PRODUCT_ID=”$productId”,t.REVENUE_QUANTITY=”$quantity”,t.REVENUE_PRICE=”$price”,t.REVENUE_TYPE=”$revenueType”,t.REVENUE_CURRENCY=”$currency”,t.REVENUE=”$revenue”,t.RECEIPT=”$receipt”,t.RECEIPT_SIG=”$receiptSig”})(ot||(ot={}));var p0=function(t,e){var n=Math.max(e,1);return t.reduce(function(l,i,o){var r=Math.floor(o/n);return l[r]||(l[r]=[]),l[r].push(i),l},[])},Le;(function(t){t[t.None=0]=”None”,t[t.Error=1]=”Error”,t[t.Warn=2]=”Warn”,t[t.Verbose=3]=”Verbose”,t[t.Debug=4]=”Debug”})(Le||(Le={}));var Fn=”Amplitude Logger „,Fa=function(){function t(){this.logLevel=Le.None}return t.prototype.disable=function(){this.logLevel=Le.None},t.prototype.enable=function(e){e===void 0&&(e=Le.Warn),this.logLevel=e},t.prototype.log=function(){for(var e=[],n=0;n0&&Promise.all(l.map(function(r){return i.execute(r)})).catch(),[2,Promise.resolve(void 0)]}})})},t.prototype.execute=function(e){var n=this;return e.insert_id||(e.insert_id=Ft()),new Promise(function(l){var i={event:e,attempts:0,callback:function(o){return l(o)},timeout:0};n.queue.push(i),n.schedule(n.config.flushIntervalMillis),n.saveEvents()})},t.prototype.removeEventsExceedFlushMaxRetries=function(e){var n=this;return e.filter(function(l){return l.attempts+=1,l.attemptsthis.scheduledTimeout)){this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=e,this.scheduleId=setTimeout(function(){n.queue=n.queue.map(function(l){return l.timeout=0,l}),n.flush(!0)},e);return}},t.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},t.prototype.flush=function(e){return e===void 0&&(e=!1),W(this,void 0,void 0,function(){var n,l,i,o=this;return S(this,function(r){switch(r.label){case 0:return this.config.offline?(this.resetSchedule(),this.config.loggerProvider.debug(„Skipping flush while offline.”),[2]):this.flushId?(this.resetSchedule(),this.config.loggerProvider.debug(„Skipping flush because previous flush has not resolved.”),[2]):(this.flushId=this.scheduleId,this.resetSchedule(),n=[],l=[],this.queue.forEach(function(c){return c.timeout===0?n.push(c):l.push(c)}),i=p0(n,this.config.flushQueueSize),[4,i.reduce(function(c,a){return W(o,void 0,void 0,function(){return S(this,function(d){switch(d.label){case 0:return[4,c];case 1:return d.sent(),[4,this.send(a,e)];case 2:return[2,d.sent()]}})})},Promise.resolve())]);case 1:return r.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}})})},t.prototype.send=function(e,n){return n===void 0&&(n=!0),W(this,void 0,void 0,function(){var l,i,o,r,c;return S(this,function(a){switch(a.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,d0)];l={api_key:this.config.apiKey,events:e.map(function(d){var s=d.event;s.extra;var u=li(s,[„extra”]);return u}),options:{min_id_length:this.config.minIdLength},client_upload_time:new Date().toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new Ua,a.label=1;case 1:return a.trys.push([1,3,,4]),i=Ya(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(i,l)];case 2:return o=a.sent(),o===null?(this.fulfillRequest(e,0,r0),[2]):n?(this.handleResponse(o,e),[3,4]):(„body”in o?this.fulfillRequest(e,o.statusCode,””.concat(o.status,”: „).concat(Yn(o))):this.fulfillRequest(e,o.statusCode,o.status),[2]);case 3:return r=a.sent(),c=I0(r),this.config.loggerProvider.error(c),this.handleResponse({status:he.Failed,statusCode:0},e),[3,4];case 4:return[2]}})})},t.prototype.handleResponse=function(e,n){var l=e.status;switch(l){case he.Success:{this.handleSuccessResponse(e,n);break}case he.Invalid:{this.handleInvalidResponse(e,n);break}case he.PayloadTooLarge:{this.handlePayloadTooLargeResponse(e,n);break}case he.RateLimit:{this.handleRateLimitResponse(e,n);break}default:{this.config.loggerProvider.warn(`{code: 0, error: „Status '`.concat(l,”’ provided for „).concat(n.length,’ events”}’)),this.handleOtherResponse(n);break}}},t.prototype.handleSuccessResponse=function(e,n){this.fulfillRequest(n,e.statusCode,o0)},t.prototype.handleInvalidResponse=function(e,n){var l=this;if(e.body.missingField||e.body.error.startsWith(s0)){this.fulfillRequest(n,e.statusCode,e.body.error);return}var i=Ze(Ze(Ze(Ze([],K(Object.values(e.body.eventsWithInvalidFields)),!1),K(Object.values(e.body.eventsWithMissingFields)),!1),K(Object.values(e.body.eventsWithInvalidIdLengths)),!1),K(e.body.silencedEvents),!1).flat(),o=new Set(i),r=n.filter(function(a,d){if(o.has(d)){l.fulfillRequest([a],e.statusCode,e.body.error);return}return!0});r.length>0&&this.config.loggerProvider.warn(Yn(e));var c=this.removeEventsExceedFlushMaxRetries(r);this.scheduleEvents(c)},t.prototype.handlePayloadTooLargeResponse=function(e,n){if(n.length===1){this.fulfillRequest(n,e.statusCode,e.body.error);return}this.config.loggerProvider.warn(Yn(e)),this.config.flushQueueSize/=2;var l=this.removeEventsExceedFlushMaxRetries(n);this.scheduleEvents(l)},t.prototype.handleRateLimitResponse=function(e,n){var l=this,i=Object.keys(e.body.exceededDailyQuotaUsers),o=Object.keys(e.body.exceededDailyQuotaDevices),r=e.body.throttledEvents,c=new Set(i),a=new Set(o),d=new Set(r),s=n.filter(function(b,g){if(b.event.user_id&&c.has(b.event.user_id)||b.event.device_id&&a.has(b.event.device_id)){l.fulfillRequest([b],e.statusCode,e.body.error);return}return d.has(g)&&(b.timeout=l.throttleTimeout),!0});s.length>0&&this.config.loggerProvider.warn(Yn(e));var u=this.removeEventsExceedFlushMaxRetries(s);this.scheduleEvents(u)},t.prototype.handleOtherResponse=function(e){var n=this,l=e.map(function(o){return o.timeout=o.attempts*n.retryTimeout,o}),i=this.removeEventsExceedFlushMaxRetries(l);this.scheduleEvents(i)},t.prototype.fulfillRequest=function(e,n,l){this.removeEvents(e),e.forEach(function(i){return i.callback(Kt(i.event,n,l))})},t.prototype.saveEvents=function(){if(this.config.storageProvider){var e=this.queue.map(function(n){return n.event});this.config.storageProvider.set(this.storageKey,e)}},t.prototype.removeEvents=function(e){this.queue=this.queue.filter(function(n){return!e.some(function(l){return l.event.insert_id===n.event.insert_id})}),this.saveEvents()},t}(),E0=function(){function t(){}return t.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:C0(),platform:”Web”,os:void 0,deviceModel:void 0}},t}(),C0=function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},y0=function(){function t(){this.queue=[]}return t.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},t.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(n){e(n)}),this.queue=[])},t}(),mt=function(){return mt=Object.assign||function(e){for(var n,l=1,i=arguments.length;l=t.length&&(t=void 0),{value:t&&t[l++],done:!t}}};throw new TypeError(e?”Object is not iterable.”:”Symbol.iterator is not defined.”)}function Vr(t,e){var n=typeof Symbol==”function”&&t[Symbol.iterator];if(!n)return t;var l=n.call(t),i,o=[],r;try{for(;(e===void 0||e– >0)&&!(i=l.next()).done;)o.push(i.value)}catch(c){r={error:c}}finally{try{i&&!i.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}return o}var Tn=function(t,e){var n,l,i=[„string”,”number”,”boolean”,”undefined”],o=typeof t,r=typeof e;if(o!==r)return!1;try{for(var c=Mn(i),a=c.next();!a.done;a=c.next()){var d=a.value;if(d===o)return t===e}}catch(X){n={error:X}}finally{try{a&&!a.done&&(l=c.return)&&l.call(c)}finally{if(n)throw n.error}}if(t==null&&e==null)return!0;if(t==null||e==null||t.length!==e.length)return!1;var s=Array.isArray(t),u=Array.isArray(e);if(s!==u)return!1;if(s&&u){for(var b=0;bt},xa=function(t,e,n){return e===void 0&&(e=””),n===void 0&&(n=10),[pl,e,t.substring(0,n)].filter(Boolean).join(„_”)},J0=function(t){return””.concat(pl.toLowerCase(),”_”).concat(t.substring(0,6))},x0=function(){var t,e,n,l;if(typeof navigator>”u”)return””;var i=navigator.userLanguage;return(l=(n=(e=(t=navigator.languages)===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:navigator.language)!==null&&n!==void 0?n:i)!==null&&l!==void 0?l:””},ol=function(){var t,e=Ce();if(!(!((t=e==null?void 0:e.location)===null||t===void 0)&&t.search))return{};var n=e.location.search.substring(1).split(„&”).filter(Boolean),l=n.reduce(function(i,o){var r=o.split(„=”,2),c=mr(r[0]),a=mr(r[1]);return a&&(i[c]=a),i},{});return l},mr=function(t){t===void 0&&(t=””);try{return decodeURIComponent(t)}catch{return””}},w0=function(t){var e=new Error().stack||””;return e.split(` `).slice(2+t).map(function(n){return n.trim()})},se=function(t){return function(){var e=B({},t.config),n=e.loggerProvider,l=e.logLevel;return{logger:n,logLevel:l}}},k0=function(t,e){var n,l;e=e.replace(/\[(\w+)\]/g,”.$1″),e=e.replace(/^\./,””);try{for(var i=ce(e.split(„.”)),o=i.next();!o.done;o=i.next()){var r=o.value;if(r in t)t=t[r];else return}}catch(c){n={error:c}}finally{try{o&&!o.done&&(l=i.return)&&l.call(i)}finally{if(n)throw n.error}}return t},ue=function(t,e){return function(){var n,l,i={};try{for(var o=ce(e),r=o.next();!r.done;r=o.next()){var c=r.value;i[c]=k0(t,c)}}catch(a){n={error:a}}finally{try{r&&!r.done&&(l=o.return)&&l.call(o)}finally{if(n)throw n.error}}return i}},ge=function(t,e,n,l,i){return i===void 0&&(i=null),function(){for(var o=[],r=0;r=200&&e<300?he.Success:e===429?he.RateLimit:e===413?he.PayloadTooLarge:e===408?he.Timeout:e>=400&&e<500?he.Invalid:e>=500?he.Failed:he.Unknown},t}(),L0=function(t){Fe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.send=function(n,l){return W(this,void 0,void 0,function(){var i,o,r;return S(this,function(c){switch(c.label){case 0:if(typeof fetch>”u”)throw new Error(„FetchTransport is not supported”);return i={headers:{„Content-Type”:”application/json”,Accept:”*/*”},body:JSON.stringify(l),method:”POST”},[4,fetch(n,i)];case 1:return o=c.sent(),[4,o.text()];case 2:r=c.sent();try{return[2,this.buildResponse(JSON.parse(r))]}catch{return[2,this.buildResponse({code:o.status})]}return[2]}})})},e}(Gl),M0=null,T0=[„a”,”button”,”input”,”select”,”textarea”,”label”,”video”,”audio”,'[contenteditable=”true” i]’,”[data-amp-default-track]”,”.amp-default-track”],H0=”data-amp-track-„,D0=[„div”,”span”,”h1″,”h2″,”h3″,”h4″,”h5″,”h6″],wa=100,j0=function(){function t(e){this.request=e}return Object.defineProperty(t.prototype,”headers”,{get:function(){if(this._headers)return this._headers;var e=this.request.headers;if(Array.isArray(e)){var n=e;this._headers=n.reduce(function(o,r){var c=K(r,2),a=c[0],d=c[1];return o[a]=d,o},{})}else if(e instanceof Headers){var l=e,i={};l.forEach(function(o,r){i[r]=o}),this._headers=i}else typeof e==”object”&&(this._headers=e);return this._headers},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,”bodySize”,{get:function(){if(typeof this._bodySize==”number”)return this._bodySize;var e=Ce();if(e!=null&&e.TextEncoder){var n=this.request.body;return this._bodySize=ka(n,wa),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,”method”,{get:function(){return this.request.method},enumerable:!1,configurable:!0}),t}(),_0=function(){function t(e){this.body=e}return Object.defineProperty(t.prototype,”bodySize”,{get:function(){return ka(this.body,wa)},enumerable:!1,configurable:!0}),t}();function ka(t,e){var n,l,i,o=Ce(),r=o==null?void 0:o.TextEncoder;if(r){var c;if(typeof t==”string”)c=t,i=new r().encode(c).length;else if(t instanceof Blob)c=t,i=c.size;else if(t instanceof URLSearchParams)c=t,i=new r().encode(c.toString()).length;else if(ArrayBuffer.isView(t))c=t,i=c.byteLength;else if(t instanceof ArrayBuffer)c=t,i=c.byteLength;else if(t instanceof FormData){var a=t,d=0,s=0;try{for(var u=ce(a.entries()),b=u.next();!b.done;b=u.next()){var g=K(b.value,2),V=g[0],p=g[1];if(d+=V.length,typeof p==”string”)d+=new r().encode(p).length;else if(p instanceof Blob)d+=p.size;else return;if(++s>=e)return}}catch(X){n={error:X}}finally{try{b&&!b.done&&(l=u.return)&&l.call(u)}finally{if(n)throw n.error}}i=d}else if(t instanceof ReadableStream){c=t;return}return i}}var P0=function(){function t(e){this.response=e}return Object.defineProperty(t.prototype,”headers”,{get:function(){var e;if(this._headers)return this._headers;if(this.response.headers instanceof Headers){var n=this.response.headers,l={};return(e=n==null?void 0:n.forEach)===null||e===void 0||e.call(n,function(i,o){l[o]=i}),this._headers=l,l}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,”bodySize”,{get:function(){var e,n;if(this._bodySize!==void 0)return this._bodySize;var l=(n=(e=this.response.headers)===null||e===void 0?void 0:e.get)===null||n===void 0?void 0:n.call(e,”content-length”),i=l?parseInt(l,10):void 0;return this._bodySize=i,i},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,”status”,{get:function(){return this.response.status},enumerable:!1,configurable:!0}),t}(),O0=function(){function t(e,n,l){this.statusCode=e,this.headersString=n,this.size=l}return Object.defineProperty(t.prototype,”bodySize”,{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,”status”,{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,”headers”,{get:function(){var e,n;if(this.headersString){var l={},i=this.headersString.split(`\r `);try{for(var o=ce(i),r=o.next();!r.done;r=o.next()){var c=r.value,a=K(c.split(„: „),2),d=a[0],s=a[1];d&&s&&(l[d]=s)}}catch(u){e={error:u}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return l}},enumerable:!1,configurable:!0}),t}(),$0=function(){function t(e,n,l,i,o,r,c,a,d,s,u){c===void 0&&(c=0),this.type=e,this.method=n,this.timestamp=l,this.startTime=i,this.url=o,this.requestWrapper=r,this.status=c,this.duration=a,this.responseWrapper=d,this.error=s,this.endTime=u}return t.prototype.toSerializable=function(){var e,n,l,i,o={type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:(e=this.requestWrapper)===null||e===void 0?void 0:e.headers,requestBodySize:(n=this.requestWrapper)===null||n===void 0?void 0:n.bodySize,responseHeaders:(l=this.responseWrapper)===null||l===void 0?void 0:l.headers,responseBodySize:(i=this.responseWrapper)===null||i===void 0?void 0:i.bodySize};return Object.fromEntries(Object.entries(o).filter(function(r){var c=K(r,2);c[0];var a=c[1];return a!==void 0}))},t}();function q0(t){return typeof t==”object”&&t!==null&&”url”in t&&”method”in t}var eb=function(){function t(e,n){n===void 0&&(n=Ft()),this.callback=e,this.id=n}return t}(),tb=function(){function t(e){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=e;var n=Ce();t.isSupported()&&(this.globalScope=n)}return t.isSupported=function(){var e=Ce();return!!e&&!!e.fetch},t.prototype.subscribe=function(e,n){var l,i,o,r,c,a,d;if(this.logger||(this.logger=n),this.eventCallbacks.set(e.id,e),!this.isObserving){var s=(o=(i=(l=this.globalScope)===null||l===void 0?void 0:l.XMLHttpRequest)===null||i===void 0?void 0:i.prototype)===null||o===void 0?void 0:o.open,u=(a=(c=(r=this.globalScope)===null||r===void 0?void 0:r.XMLHttpRequest)===null||c===void 0?void 0:c.prototype)===null||a===void 0?void 0:a.send;s&&u&&this.observeXhr(s,u);var b=(d=this.globalScope)===null||d===void 0?void 0:d.fetch;b&&this.observeFetch(b),this.isObserving=!0}},t.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},t.prototype.triggerEventCallbacks=function(e){var n=this;this.eventCallbacks.forEach(function(l){var i;try{l.callback(e)}catch(o){(i=n.logger)===null||i===void 0||i.debug(„an unexpected error occurred while triggering event callbacks”,o)}})},t.prototype.handleNetworkRequestEvent=function(e,n,l,i,o,r,c){var a;if(!(r===void 0||c===void 0)){var d,s=”GET”;q0(n)?(d=n.url,s=n.method):d=(a=n==null?void 0:n.toString)===null||a===void 0?void 0:a.call(n),s=(l==null?void 0:l.method)||s;var u,b;i&&(u=i.status),o&&(b={name:o.name||”UnknownError”,message:o.message||”An unknown error occurred”},u=0);var g=Math.floor(performance.now()-c),V=Math.floor(r+g),p=new $0(e,s,r,r,d,l,u,g,i,b,V);this.triggerEventCallbacks(p)}},t.prototype.getTimestamps=function(){var e,n;return{startTime:(e=Date.now)===null||e===void 0?void 0:e.call(Date),durationStart:(n=performance==null?void 0:performance.now)===null||n===void 0?void 0:n.call(performance)}},t.prototype.observeFetch=function(e){var n=this;!this.globalScope||!e||(this.globalScope.fetch=function(l,i){return W(n,void 0,void 0,function(){var o,r,c,a,d,s;return S(this,function(u){switch(u.label){case 0:try{o=this.getTimestamps()}catch(b){(d=this.logger)===null||d===void 0||d.debug(„an unexpected error occurred while retrieving timestamps”,b)}u.label=1;case 1:return u.trys.push([1,3,,4]),[4,e(l,i)];case 2:return r=u.sent(),[3,4];case 3:return a=u.sent(),c=a,[3,4];case 4:try{this.handleNetworkRequestEvent(„fetch”,l,i?new j0(i):void 0,r?new P0(r):void 0,c,o==null?void 0:o.startTime,o==null?void 0:o.durationStart)}catch(b){(s=this.logger)===null||s===void 0||s.debug(„an unexpected error occurred while handling fetch”,b)}if(r)return[2,r];throw c}})})})},t.prototype.observeXhr=function(e,n){if(!(!this.globalScope||!e||!n)){var l=this.globalScope.XMLHttpRequest.prototype,i=this;l.open=function(){for(var o,r,c=[],a=0;a„u”||typeof r==”function”&&r()},g=typeof location<"u"?location.href:null,V=function(){return W(void 0,void 0,void 0,function(){var Z,f,G,C;return S(this,function(E){switch(E.label){case 0:return Z=location.href,f=Qb(c,Z,g||"")&&b(),g=Z,f?(l==null||l.log("Tracking page view event"),e!=null?[3,1]:[3,3]):[3,4];case 1:return C=(G=e).track,[4,u()];case 2:C.apply(G,[E.sent()]),E.label=3;case 3:E.label=4;case 4:return[2]}})})},p=function(){V()},X={name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(Z,f){return W(void 0,void 0,void 0,function(){var G,C;return S(this,function(E){switch(E.label){case 0:return e=f,o=Z,l=Z.loggerProvider,l.log("Installing @amplitude/plugin-page-view-tracking-browser"),i=!0,n&&(n.addEventListener("popstate",p),n.history.pushState=new Proxy(n.history.pushState,{apply:function(y,A,F){var w=K(F,3),_=w[0],D=w[1],T=w[2];y.apply(A,[_,D,T]),i&&V()}})),b()?(l.log("Tracking page view event"),C=(G=e).track,[4,u()]):[3,2];case 1:C.apply(G,[E.sent()]),E.label=2;case 2:return[2]}})})},execute:function(Z){return W(void 0,void 0,void 0,function(){var f;return S(this,function(G){switch(G.label){case 0:return r==="attribution"&&zb(Z)?(l==null||l.log("Enriching campaign event to page view event with campaign parameters"),[4,u()]):[3,2];case 1:f=G.sent(),Z.event_type=f.event_type,Z.event_properties=B(B({},Z.event_properties),f.event_properties),G.label=2;case 2:return o&&Z.event_type===d&&(o.pageCounter=o.pageCounter?o.pageCounter+1:1,Z.event_properties=B(B({},Z.event_properties),{"[Amplitude] Page Counter":o.pageCounter})),[2,Z]}})})},teardown:function(){return W(void 0,void 0,void 0,function(){return S(this,function(Z){return n&&(n.removeEventListener("popstate",p),i=!1),[2]})})}};return X},kb=function(){return W(void 0,void 0,void 0,function(){var t;return S(this,function(e){switch(e.label){case 0:return t=Jb,[4,new Ub().parse()];case 1:return[2,t.apply(void 0,[e.sent()])]}})})},zb=function(t){if(t.event_type==="$identify"&&t.user_properties){var e=t.user_properties,n=e[cl.SET]||{},l=e[cl.UNSET]||{},i=Ze(Ze([],K(Object.keys(n)),!1),K(Object.keys(l)),!1);return Object.keys(_a).every(function(o){return i.includes(o)})}return!1},Qb=function(t,e,n){switch(t){case"pathOnly":{if(n=="")return!0;var l=new URL(e),i=new URL(n),o=l.origin+l.pathname,r=i.origin+i.pathname;return o!==r}default:return e!==n}},Kb=function(){var t,e=[],n=function(d,s,u){d.addEventListener(s,u),e.push({element:d,type:s,handler:u})},l=function(){e.forEach(function(d){var s=d.element,u=d.type,b=d.handler;s==null||s.removeEventListener(u,b)}),e=[]},i="@amplitude/plugin-form-interaction-tracking-browser",o="enrichment",r=function(d,s){return W(void 0,void 0,void 0,function(){var u,b;return S(this,function(g){return u=function(){if(!s){d.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.");return}if(!(typeof document>„u”)){var V=function(X){var Z=!1;n(X,”change”,function(){var f,G=xr(X);Z||s.track(fr,(f={},f[zl]=Jt(X.id),f[Ql]=Jt(X.name),f[Kl]=G,f)),Z=!0}),n(X,”submit”,function(){var f,G,C=xr(X);Z||s.track(fr,(f={},f[zl]=Jt(X.id),f[Ql]=Jt(X.name),f[Kl]=C,f)),s.track(Ab,(G={},G[zl]=Jt(X.id),G[Ql]=Jt(X.name),G[Kl]=C,G)),Z=!1})},p=Array.from(document.getElementsByTagName(„form”));p.forEach(V),typeof MutationObserver<"u"&&(t=new MutationObserver(function(X){X.forEach(function(Z){Z.addedNodes.forEach(function(f){f.nodeName==="FORM"&&V(f),"querySelectorAll"in f&&typeof f.querySelectorAll=="function"&&Array.from(f.querySelectorAll("form")).map(V)})})}),t.observe(document.body,{subtree:!0,childList:!0}))}},document.readyState==="complete"?u():(b=Ce(),b?b.addEventListener("load",u):d.loggerProvider.debug("Form interaction tracking is not installed because global is undefined.")),[2]})})},c=function(d){return W(void 0,void 0,void 0,function(){return S(this,function(s){return[2,d]})})},a=function(){return W(void 0,void 0,void 0,function(){return S(this,function(d){return t==null||t.disconnect(),l(),[2]})})};return{name:i,type:o,setup:r,execute:c,teardown:a}},Jt=function(t){if(typeof t=="string")return t},xr=function(t){var e=t.getAttribute("action");try{e=new URL(encodeURI(e??""),window.location.href).href}catch{}return e},Lb=function(){var t,e=[],n=function(d,s,u){d.addEventListener(s,u),e.push({element:d,type:s,handler:u})},l=function(){e.forEach(function(d){var s=d.element,u=d.type,b=d.handler;s==null||s.removeEventListener(u,b)}),e=[]},i="@amplitude/plugin-file-download-tracking-browser",o="enrichment",r=function(d,s){return W(void 0,void 0,void 0,function(){var u,b;return S(this,function(g){return u=function(){if(!s){d.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.");return}if(!(typeof document>„u”)){var V=function(Z){var f;try{f=new URL(Z.href,window.location.href)}catch{return}var G=p.exec(f.href),C=G==null?void 0:G[1];C&&n(Z,”click”,function(){var E;C&&s.track(Zb,(E={},E[fb]=C,E[pb]=f.pathname,E[Gb]=Z.id,E[Xb]=Z.text,E[Ib]=Z.href,E))})},p=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)(\?.+)?$/,X=Array.from(document.getElementsByTagName(„a”));X.forEach(V),typeof MutationObserver<"u"&&(t=new MutationObserver(function(Z){Z.forEach(function(f){f.addedNodes.forEach(function(G){G.nodeName==="A"&&V(G),"querySelectorAll"in G&&typeof G.querySelectorAll=="function"&&Array.from(G.querySelectorAll("a")).map(V)})})}),t.observe(document.body,{subtree:!0,childList:!0}))}},document.readyState==="complete"?u():(b=Ce(),b?b.addEventListener("load",u):d.loggerProvider.debug("File download tracking is not installed because global is undefined.")),[2]})})},c=function(d){return W(void 0,void 0,void 0,function(){return S(this,function(s){return[2,d]})})},a=function(){return W(void 0,void 0,void 0,function(){return S(this,function(d){return t==null||t.disconnect(),l(),[2]})})};return{name:i,type:o,setup:r,execute:c,teardown:a}},wr=!1,Mb=function(t){if(!(wr||t.defaultTracking!==void 0)){var e=`\`options.defaultTracking\` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to \`options.defaultTracking\`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example: amplitude.init(, { defaultTracking: true, }); Visit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details.`;t.loggerProvider.warn(e),wr=!0}},Tb=function(){var t=”@amplitude/plugin-network-checker-browser”,e=”before”,n=Ce(),l=[],i=function(a,d){n&&(n.addEventListener(a,d),l.push({type:a,handler:d}))},o=function(){l.forEach(function(a){var d=a.type,s=a.handler;n&&n.removeEventListener(d,s)}),l=[]},r=function(a,d){return W(void 0,void 0,void 0,function(){return S(this,function(s){return typeof navigator>”u”?(a.loggerProvider.debug(„Network connectivity checker plugin is disabled because navigator is not available.”),a.offline=!1,[2]):(a.offline=!navigator.onLine,i(„online”,function(){a.loggerProvider.debug(„Network connectivity changed to online.”),a.offline=!1,setTimeout(function(){d.flush()},a.flushIntervalMillis)}),i(„offline”,function(){a.loggerProvider.debug(„Network connectivity changed to offline.”),a.offline=!0}),[2])})})},c=function(){return W(void 0,void 0,void 0,function(){return S(this,function(a){return o(),[2]})})};return{name:t,type:e,setup:r,teardown:c}},Hb=”Network error occurred, remote config fetch failed”,Db=”Remote config successfully fetched”,jb=”Remote config fetch rejected due to exceeded retry count”,kr=”Remote config fetch rejected due to timeout after 5 seconds”,zr=”Unexpected error occurred”,_b=”https://sr-client-cfg.amplitude.com/config”,Pb=”https://sr-client-cfg.stag2.amplitude.com/config”,Ob=”https://sr-client-cfg.eu.amplitude.com/config”,$b=function(){function t(e){var n=e.localConfig,l=e.configKeys,i=this;this.retryTimeout=1e3,this.attempts=0,this.sessionTargetingMatch=!1,this.metrics={},this.getRemoteConfig=function(o,r,c){return W(i,void 0,void 0,function(){var a,d,s;return S(this,function(u){switch(u.label){case 0:return a=Date.now(),[4,this.fetchWithTimeout(c)];case 1:return d=u.sent(),d&&(s=d.configs&&d.configs[o],s)?(this.metrics.fetchTimeAPISuccess=Date.now()-a,[2,s[r]]):(this.metrics.fetchTimeAPIFail=Date.now()-a,[2,void 0])}})})},this.fetchWithTimeout=function(o){return W(i,void 0,void 0,function(){var r,c,a;return S(this,function(d){switch(d.label){case 0:return r=new AbortController,c=setTimeout(function(){return r.abort()},5e3),[4,this.fetchRemoteConfig(r.signal,o)];case 1:return a=d.sent(),clearTimeout(c),[2,a]}})})},this.fetchRemoteConfig=function(o,r){return W(i,void 0,void 0,function(){var c,a,d,s,u,b,g,V,p,X,Z,f,G;return S(this,function(C){switch(C.label){case 0:if(r===this.lastFetchedSessionId&&this.attempts>=this.localConfig.flushMaxRetries)return[2,this.completeRequest({err:jb})];if(o.aborted)return[2,this.completeRequest({err:kr})];r!==this.lastFetchedSessionId&&(this.lastFetchedSessionId=r,this.attempts=0),C.label=1;case 1:C.trys.push([1,3,,4]),c=new URLSearchParams({api_key:this.localConfig.apiKey});try{for(a=ce(this.configKeys),d=a.next();!d.done;d=a.next())s=d.value,c.append(„config_keys”,s)}catch(E){Z={error:E}}finally{try{d&&!d.done&&(f=a.return)&&f.call(a)}finally{if(Z)throw Z.error}}return r&&c.set(„session_id”,String(r)),u={headers:{Accept:”*/*”},method:”GET”},b=””.concat(this.getServerUrl(),”?”).concat(c.toString()),this.attempts+=1,[4,fetch(b,B(B({},u),{signal:o}))];case 2:if(g=C.sent(),g===null)return[2,this.completeRequest({err:zr})];switch(V=new Gl().buildStatus(g.status),V){case dl.Success:return this.attempts=0,[2,this.parseAndStoreConfig(g)];case dl.Failed:return[2,this.retryFetch(o,r)];default:return[2,this.completeRequest({err:Hb})]}case 3:return p=C.sent(),X=p,o.aborted?[2,this.completeRequest({err:kr})]:[2,this.completeRequest({err:(G=X.message)!==null&&G!==void 0?G:zr})];case 4:return[2]}})})},this.retryFetch=function(o,r){return W(i,void 0,void 0,function(){var c=this;return S(this,function(a){switch(a.label){case 0:return[4,new Promise(function(d){return setTimeout(d,c.attempts*c.retryTimeout)})];case 1:return a.sent(),[2,this.fetchRemoteConfig(o,r)]}})})},this.parseAndStoreConfig=function(o){return W(i,void 0,void 0,function(){var r;return S(this,function(c){switch(c.label){case 0:return[4,o.json()];case 1:return r=c.sent(),this.completeRequest({success:Db}),[2,r]}})})},this.localConfig=n,this.configKeys=l}return t.prototype.getServerUrl=function(){return this.localConfig.serverZone===al.STAGING?Pb:this.localConfig.serverZone===al.EU?Ob:_b},t.prototype.completeRequest=function(e){var n=e.err,l=e.success;if(n)throw new Error(n);l&&this.localConfig.loggerProvider.log(l)},t}(),qb=function(t){var e=t.localConfig,n=t.configKeys;return W(void 0,void 0,void 0,function(){return S(this,function(l){return[2,new $b({localConfig:e,configKeys:n})]})})},eV=qb,tV=function(){function t(e){this.config=e,this.config.loggerProvider.debug(„Local configuration before merging with remote config”,JSON.stringify(this.config,null,2))}return t.prototype.initialize=function(){return W(this,void 0,void 0,function(){var e;return S(this,function(n){switch(n.label){case 0:return e=this,[4,eV({localConfig:this.config,configKeys:[„analyticsSDK”]})];case 1:return e.remoteConfigFetch=n.sent(),[2]}})})},t.prototype.generateJoinedConfig=function(){var e,n,l,i,o,r;return W(this,void 0,void 0,function(){var c,a,d,s,u,b,g,V,p,X,Z,f,G;return S(this,function(C){switch(C.label){case 0:return C.trys.push([0,3,,4]),a=this.remoteConfigFetch,a?[4,this.remoteConfigFetch.getRemoteConfig(„analyticsSDK”,”browserSDK”,this.config.sessionId)]:[3,2];case 1:a=C.sent(),C.label=2;case 2:if(c=a,this.config.loggerProvider.debug(„Remote configuration:”,JSON.stringify(c,null,2)),c&&”autocapture”in c){if(typeof c.autocapture==”boolean”&&(this.config.autocapture=c.autocapture),typeof c.autocapture==”object”){if(d=B({},c.autocapture),this.config.autocapture===void 0&&(this.config.autocapture=c.autocapture),typeof c.autocapture.elementInteractions==”object”&&(!((e=c.autocapture.elementInteractions.pageUrlAllowlistRegex)===null||e===void 0)&&e.length)){d.elementInteractions=B({},c.autocapture.elementInteractions),s=d.elementInteractions,u=(n=s.pageUrlAllowlist)!==null&&n!==void 0?n:[],b=[];try{for(g=ce(c.autocapture.elementInteractions.pageUrlAllowlistRegex),V=g.next();!V.done;V=g.next()){p=V.value;try{b.push(new RegExp(p))}catch(E){this.config.loggerProvider.warn(„Invalid regex pattern: „.concat(p),E)}}}catch(E){f={error:E}}finally{try{V&&!V.done&&(G=g.return)&&G.call(g)}finally{if(f)throw f.error}}X=u.concat(b),s.pageUrlAllowlist=X,delete s.pageUrlAllowlistRegex}typeof this.config.autocapture==”boolean”&&(this.config.autocapture=B({attribution:this.config.autocapture,fileDownloads:this.config.autocapture,formInteractions:this.config.autocapture,pageViews:this.config.autocapture,sessions:this.config.autocapture,elementInteractions:this.config.autocapture},d)),typeof this.config.autocapture==”object”&&(this.config.autocapture=B(B({},this.config.autocapture),d))}this.config.defaultTracking=this.config.autocapture}return this.config.loggerProvider.debug(„Joined configuration: „,JSON.stringify(this.config,null,2)),(l=(r=this.config).requestMetadata)!==null&&l!==void 0||(r.requestMetadata=new Ua),!((i=this.remoteConfigFetch)===null||i===void 0)&&i.metrics.fetchTimeAPISuccess&&this.config.requestMetadata.recordHistogram(„remote_config_fetch_time_API_success”,this.remoteConfigFetch.metrics.fetchTimeAPISuccess),!((o=this.remoteConfigFetch)===null||o===void 0)&&o.metrics.fetchTimeAPIFail&&this.config.requestMetadata.recordHistogram(„remote_config_fetch_time_API_fail”,this.remoteConfigFetch.metrics.fetchTimeAPIFail),[3,4];case 3:return Z=C.sent(),this.config.loggerProvider.error(„Failed to fetch remote configuration because of error: „,Z),[3,4];case 4:return[2,this.config]}})})},t}(),nV=function(t){return W(void 0,void 0,void 0,function(){var e;return S(this,function(n){switch(n.label){case 0:return e=new tV(t),[4,e.initialize()];case 1:return n.sent(),[2,e]}})})},lV=”@amplitude/plugin-autocapture-browser”,ri=”[Amplitude] Element Clicked”,iV=”[Amplitude] Element Changed”,oV=”[Amplitude] Element ID”,rV=”[Amplitude] Element Class”,Pa=”[Amplitude] Element Tag”,Oa=”[Amplitude] Element Text”,cV=”[Amplitude] Element Hierarchy”,aV=”[Amplitude] Element Href”,dV=”[Amplitude] Element Position Left”,sV=”[Amplitude] Element Position Top”,uV=”[Amplitude] Element Aria Label”,gV=”[Amplitude] Element Attributes”,hV=”[Amplitude] Element Parent Label”,$a=”[Amplitude] Page URL”,bV=”[Amplitude] Page Title”,VV=”[Amplitude] Viewport Height”,mV=”[Amplitude] Viewport Width”,Hn=”https://app.amplitude.com”,AV=”https://app.eu.amplitude.com”,ZV=”https://apps.stag2.amplitude.com”,fV={US:Hn,EU:AV,STAGING:ZV},pV=”https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz”,GV=”amp-visual-tagging-selector-highlight”;function te(t){return typeof t==”function”}function Li(t){var e=function(l){Error.call(l),l.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Ll=Li(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription: `+n.map(function(l,i){return i+1+”) „+l.toString()}).join(` `):””,this.name=”UnsubscriptionError”,this.errors=n}});function sl(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var En=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,l,i,o;if(!this.closed){this.closed=!0;var r=this._parentage;if(r)if(this._parentage=null,Array.isArray(r))try{for(var c=ce(r),a=c.next();!a.done;a=c.next()){var d=a.value;d.remove(this)}}catch(p){e={error:p}}finally{try{a&&!a.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}else r.remove(this);var s=this.initialTeardown;if(te(s))try{s()}catch(p){o=p instanceof Ll?p.errors:[p]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var b=ce(u),g=b.next();!g.done;g=b.next()){var V=g.value;try{Qr(V)}catch(p){o=o??[],p instanceof Ll?o=Ze(Ze([],K(o)),K(p.errors)):o.push(p)}}}catch(p){l={error:p}}finally{try{g&&!g.done&&(i=b.return)&&i.call(b)}finally{if(l)throw l.error}}}if(o)throw new Ll(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Qr(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&sl(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&sl(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),qa=En.EMPTY;function ed(t){return t instanceof En||t&&"closed"in t&&te(t.remove)&&te(t.add)&&te(t.unsubscribe)}function Qr(t){te(t)?t():t.unsubscribe()}var XV={Promise:void 0},IV={setTimeout:function(t,e){for(var n=[],l=2;l0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var l=this,i=this,o=i.hasError,r=i.isStopped,c=i.observers;return o||r?qa:(this.currentObservers=null,c.push(n),new En(function(){l.currentObservers=null,sl(c,n)}))},e.prototype._checkFinalizedStatuses=function(n){var l=this,i=l.hasError,o=l.thrownError,r=l.isStopped;i?n.error(o):r&&n.complete()},e.prototype.asObservable=function(){var n=new ye;return n.source=this,n},e.create=function(n,l){return new Lr(n,l)},e}(ye),Lr=function(t){Fe(e,t);function e(n,l){var i=t.call(this)||this;return i.destination=n,i.source=l,i}return e.prototype.next=function(n){var l,i;(i=(l=this.destination)===null||l===void 0?void 0:l.next)===null||i===void 0||i.call(l,n)},e.prototype.error=function(n){var l,i;(i=(l=this.destination)===null||l===void 0?void 0:l.error)===null||i===void 0||i.call(l,n)},e.prototype.complete=function(){var n,l;(l=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||l===void 0||l.call(n)},e.prototype._subscribe=function(n){var l,i;return(i=(l=this.source)===null||l===void 0?void 0:l.subscribe(n))!==null&&i!==void 0?i:qa},e}(ld),FV={now:function(){return Date.now()}},YV=function(t){Fe(e,t);function e(n,l){return t.call(this)||this}return e.prototype.schedule=function(n,l){return this},e}(En),Mr={setInterval:function(t,e){for(var n=[],l=2;l0&&Z(i)},void 0,void 0,function(){V!=null&&V.closed||V==null||V.unsubscribe(),p=null})),!X&&Z(l!=null?typeof l==”number”?l:+l-a.now():i)})}function n2(t){throw new e2(t)}function ct(t,e){return Oe(function(n,l){var i=0;n.subscribe(Me(l,function(o){l.next(t.call(e,o,i++))}))})}var l2=Array.isArray;function i2(t,e){return l2(e)?t.apply(void 0,Ze([],K(e))):t(e)}function o2(t){return ct(function(e){return i2(t,e)})}function r2(t,e,n,l,i,o,r,c){var a=[],d=0,s=0,u=!1,b=function(){u&&!a.length&&!d&&e.complete()},g=function(p){return d0&&(s=new Zn({next:function(y){return E.next(y)},error:function(y){p=!0,X(),u=Ml(Z,i,y),E.error(y)},complete:function(){V=!0,X(),u=Ml(Z,r),E.complete()}}),Te(G).subscribe(s))})(d)}}function Ml(t,e){for(var n=[],l=2;lspan,h1,h2,h3,h4,h5,h6″)}catch{n=null}if(n){var l=n.textContent||””;return Gd(l)?l:””}return Rd(e)},_i=function(t,e){return t?e.some(function(n){var l;return(l=t==null?void 0:t.matches)===null||l===void 0?void 0:l.call(t,n)})?t:_i(t==null?void 0:t.parentElement,e):null},y2=function(t){var e,n,l;if(!t)return{};var i=(l=(n=t==null?void 0:t.tagName)===null||n===void 0?void 0:n.toLowerCase)===null||l===void 0?void 0:l.call(n),o=(e={},e[Pa]=i,e[Oa]=ji(t),e[$a]=window.location.href.split(„?”)[0],e);return Id(o)},S2=function(t){return new Promise(function(e,n){var l;try{var i=document.createElement(„script”);i.type=”text/javascript”,i.async=!0,i.src=t,i.addEventListener(„load”,function(){e({status:!0})},{once:!0}),i.addEventListener(„error”,function(){n({status:!1,message:”Failed to load the script „.concat(t)})}),(l=document.head)===null||l===void 0||l.appendChild(i)}catch(o){n(o)}})};function W2(){return””.concat(Date.now(),”-„).concat(Math.random().toString(36).substr(2,9))}var Pi=function(t){return!(t.event.target===null||!t.closestTrackedAncestor)},v2=function(){function t(e){var n=e===void 0?{}:e,l=n.origin,i=l===void 0?Hn:l,o=this;this.endpoint=Hn,this.requestCallbacks={},this.onSelect=function(r){o.notify({action:”element-selected”,data:r})},this.onTrack=function(r,c){r===”selector-mode-changed”?o.notify({action:”track-selector-mode-changed”,data:c}):r===”selector-moved”&&o.notify({action:”track-selector-moved”,data:c})},this.endpoint=i}return t.prototype.notify=function(e){var n,l,i,o;(l=(n=this.logger)===null||n===void 0?void 0:n.debug)===null||l===void 0||l.call(n,”Message sent: „,JSON.stringify(e)),(o=(i=window.opener)===null||i===void 0?void 0:i.postMessage)===null||o===void 0||o.call(i,e,this.endpoint)},t.prototype.sendRequest=function(e,n,l){var i=this;l===void 0&&(l={timeout:15e3});var o=W2(),r={id:o,action:e,args:n},c=new Promise(function(a,d){i.requestCallbacks[o]={resolve:a,reject:d},i.notify(r),(l==null?void 0:l.timeout)>0&&setTimeout(function(){d(new Error(„”.concat(e,” timed out (id: „).concat(o,”)”))),delete i.requestCallbacks[o]},l.timeout)});return c},t.prototype.handleResponse=function(e){var n;if(!this.requestCallbacks[e.id]){(n=this.logger)===null||n===void 0||n.warn(„No callback found for request id: „.concat(e.id));return}this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]},t.prototype.setup=function(e){var n=this,l=e===void 0?{}:e,i=l.logger,o=l.endpoint,r=l.isElementSelectable,c=l.cssSelectorAllowlist,a=l.actionClickAllowlist;this.logger=i,o&&this.endpoint===Hn&&(this.endpoint=o);var d=null;window.addEventListener(„message”,function(s){var u,b,g,V,p;if((b=(u=n.logger)===null||u===void 0?void 0:u.debug)===null||b===void 0||b.call(u,”Message received: „,JSON.stringify(s)),n.endpoint===s.origin){var X=s==null?void 0:s.data,Z=X==null?void 0:X.action;if(Z)if(„id”in X)(V=(g=n.logger)===null||g===void 0?void 0:g.debug)===null||V===void 0||V.call(g,”Received Response to previous request: „,JSON.stringify(s)),n.handleResponse(X);else if(Z===”ping”)n.notify({action:”pong”});else if(Z===”initialize-visual-tagging-selector”){var f=X==null?void 0:X.data;S2(pV).then(function(){var G;d=(G=window==null?void 0:window.amplitudeVisualTaggingSelector)===null||G===void 0?void 0:G.call(window,{getEventTagProps:y2,isElementSelectable:function(C){return r?r((f==null?void 0:f.actionType)||”click”,C):!0},onTrack:n.onTrack,onSelect:n.onSelect,visualHighlightClass:GV,messenger:n,cssSelectorAllowlist:c,actionClickAllowlist:a}),n.notify({action:”selector-loaded”})}).catch(function(){var G;(G=n.logger)===null||G===void 0||G.warn(„Failed to initialize visual tagging selector”)})}else Z===”close-visual-tagging-selector”&&((p=d==null?void 0:d.close)===null||p===void 0||p.call(d))}}),this.notify({action:”page-loaded”})},t}(),B2=[„id”,”class”,”style”,”value”,”onclick”,”onchange”,”oninput”,”onblur”,”onsubmit”,”onfocus”,”onkeydown”,”onkeyup”,”onkeypress”,”data-reactid”,”data-react-checksum”,”data-reactroot”],N2=[„type”],F2=[„svg”,”path”,”g”],Y2=[„password”,”hidden”],U2=128,J2=1024;function x2(t){var e,n,l,i,o,r;if(t===null)return null;var c=String(t.tagName).toLowerCase(),a={tag:c},d=Array.from((i=(l=t.parentElement)===null||l===void 0?void 0:l.children)!==null&&i!==void 0?i:[]);d.length&&(a.index=d.indexOf(t),a.indexOfType=d.filter(function(C){return C.tagName===t.tagName}).indexOf(t));var s=(r=(o=t.previousElementSibling)===null||o===void 0?void 0:o.tagName)===null||r===void 0?void 0:r.toLowerCase();s&&(a.prevSib=String(s));var u=t.getAttribute(„id”);u&&(a.id=String(u));var b=Array.from(t.classList);b.length&&(a.classes=b);var g={},V=Array.from(t.attributes),p=V.filter(function(C){return!B2.includes(C.name)}),X=!Xd(t);if(!Y2.includes(String(t.getAttribute(„type”)))&&!F2.includes(c))try{for(var Z=ce(p),f=Z.next();!f.done;f=Z.next()){var G=f.value;X&&!N2.includes(G.name)||(g[G.name]=String(G.value).substring(0,U2))}}catch(C){e={error:C}}finally{try{f&&!f.done&&(n=Z.return)&&n.call(Z)}finally{if(e)throw e.error}}return Object.keys(g).length&&(a.attrs=g),a}function w2(t){var e=[];if(!t)return e;e.push(t);for(var n=t.parentElement;n&&n.tagName!==”HTML”;)e.push(n),n=n.parentElement;return e}var k2=function(t){var e=[];if(!t)return[];var n=w2(t);return e=z2(n.map(function(l){return x2(l)}),J2),e};function z2(t,e){for(var n=0,l=0;le)return t.slice(0,l)}return t}function jn(t,e){e===void 0&&(e=!1);try{if(t==null)return e?”None”:null;if(typeof t==”string”)return e?(t=t.replace(/\\/g,”\\\\”).replace(/\n/g,”\\n”).replace(/\t/g,”\\t”).replace(/\r/g,”\\r”),t.includes('”’)?”'”.concat(t,”'”):t.includes(„'”)?'”’.concat(t.replace(/’/g,”\\'”),'”’):”'”.concat(t,”'”)):t;if(typeof t==”boolean”)return t?”True”:”False”;if(Array.isArray(t)){var n=t.map(function(o){return jn(o,!0)});return”[„.concat(n.join(„, „),”]”)}else if(typeof t==”object”){var l=Object.entries(t).filter(function(o){var r=K(o,1),c=r[0];return c!=null}).map(function(o){var r=K(o,2),c=r[0],a=r[1];return””.concat(String(jn(c,!0)),”: „).concat(String(jn(a,!0)))}),i=”{„.concat(l.join(„, „),”}”);return i.includes(„\\'”)&&(i=i.replace(/’/g,”'”).replace(/’/g,”\\'”)),i}return t.toString()}catch{return null}}var Q2=5;function K2(t){var e=t.amplitude,n=t.allObservables,l=t.options,i=t.shouldTrackEvent,o=n.clickObservable,r=o.pipe(p2(),bt(function(s){var u=K(s,2),b=u[0],g=u[1],V=b.event.target!==g.event.target,p=Math.abs(g.event.screenX-b.event.screenX)<=20&&Math.abs(g.event.screenY-b.event.screenY)<=20;return V&&!p})),c=o.pipe(m2(l.debounceTime),ct(function(){return"timeout"})),a=fd(r,c),d=o.pipe(f2(0),bt(Pi),bt(function(s){return i("click",s.closestTrackedAncestor)}),V2(a));return d.subscribe(function(s){var u,b,g=(s.length>=Q2,ri);try{for(var V=ce(s),p=V.next();!p.done;p=V.next()){var X=p.value;e==null||e.track(g,X.targetElementProperties)}}catch(Z){u={error:Z}}finally{try{p&&!p.done&&(b=V.return)&&b.call(V)}finally{if(u)throw u.error}}})}function L2(t){var e=t.amplitude,n=t.allObservables,l=t.getEventProperties,i=t.shouldTrackEvent,o=n.changeObservable,r=o.pipe(bt(Pi),bt(function(c){return i(„change”,c.closestTrackedAncestor)}));return r.subscribe(function(c){e==null||e.track(iV,l(„change”,c.closestTrackedAncestor))})}function M2(t){var e=t.amplitude,n=t.allObservables,l=t.options,i=t.getEventProperties,o=t.shouldTrackEvent,r=t.shouldTrackActionClick,c=n.clickObservable,a=n.mutationObservable,d=n.navigateObservable,s=c.pipe(bt(function(V){return!o(„click”,V.closestTrackedAncestor)}),ct(function(V){var p=_i(V.event.target,l.actionClickAllowlist);return V.closestTrackedAncestor=p,V.closestTrackedAncestor!==null&&(V.targetElementProperties=i(V.type,V.closestTrackedAncestor)),V}),bt(Pi),bt(function(V){return r(„click”,V.closestTrackedAncestor)})),u=[a];d&&u.push(d);var b=fd.apply(void 0,Ze([],K(u),!1)),g=s.pipe(G2(function(V){return b.pipe(pd(1),t2({first:500,with:function(){return Hi}}),ct(function(){return V}))}));return g.subscribe(function(V){e==null||e.track(ri,i(„click”,V.closestTrackedAncestor))})}var zt;(function(t){t.ClickObservable=”clickObservable”,t.ChangeObservable=”changeObservable”,t.NavigateObservable=”navigateObservable”,t.MutationObservable=”mutationObservable”})(zt||(zt={}));function T2(t){return t.type===”click”||t.type===”change”}var H2=function(t){var e,n,l;t===void 0&&(t={});var i=t.dataAttributePrefix,o=i===void 0?H0:i,r=t.visualTaggingOptions,c=r===void 0?{enabled:!0,messenger:new v2}:r;t.cssSelectorAllowlist=(e=t.cssSelectorAllowlist)!==null&&e!==void 0?e:T0,t.actionClickAllowlist=(n=t.actionClickAllowlist)!==null&&n!==void 0?n:D0,t.debounceTime=(l=t.debounceTime)!==null&&l!==void 0?l:0;var a=lV,d=”enrichment”,s=[],u=function(){var Z,f=rn(document,”click”,{capture:!0}).pipe(ct(function(y){return g(y,”click”)}),xn()),G=rn(document,”change”,{capture:!0}).pipe(ct(function(y){return g(y,”change”)}),xn()),C;window.navigation&&(C=rn(window.navigation,”navigate”).pipe(ct(function(y){return g(y,”navigate”)}),xn()));var E=new ye(function(y){var A=new MutationObserver(function(F){y.next(F)});return A.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return A.disconnect()}}).pipe(ct(function(y){return g(y,”mutation”)}),xn());return Z={},Z[zt.ClickObservable]=f,Z[zt.ChangeObservable]=G,Z[zt.NavigateObservable]=C,Z[zt.MutationObservable]=E,Z},b=function(Z,f){var G,C,E,y=(E=(C=f==null?void 0:f.tagName)===null||C===void 0?void 0:C.toLowerCase)===null||E===void 0?void 0:E.call(C),A=typeof f.getBoundingClientRect==”function”?f.getBoundingClientRect():{left:null,top:null},F=f.getAttribute(„aria-label”),w=E2(f,o),_=Rd(f),D=(G={},G[oV]=f.getAttribute(„id”)||””,G[rV]=f.getAttribute(„class”),G[cV]=k2(f),G[Pa]=y,G[Oa]=ji(f),G[dV]=A.left==null?null:Math.round(A.left),G[sV]=A.top==null?null:Math.round(A.top),G[uV]=F,G[gV]=w,G[hV]=_,G[$a]=window.location.href.split(„?”)[0],G[bV]=typeof document<"u"&&document.title||"",G[VV]=window.innerHeight,G[mV]=window.innerWidth,G);return y==="a"&&Z==="click"&&f instanceof HTMLAnchorElement&&(D[aV]=f.href),Id(D)},g=function(Z,f){var G={event:Z,timestamp:Date.now(),type:f};if(T2(G)&&G.event.target!==null){var C=_i(G.event.target,t.cssSelectorAllowlist);return C&&(G.closestTrackedAncestor=C,G.targetElementProperties=b(G.type,C)),G}return G},V=function(Z,f){return W(void 0,void 0,void 0,function(){var G,C,E,y,A,F,w,_,D,T;return S(this,function(Ve){return typeof document>„u”?[2]:(G=Tl(t,t.cssSelectorAllowlist),C=Tl(t,t.actionClickAllowlist),E=u(),y=K2({allObservables:E,options:t,amplitude:f,shouldTrackEvent:G}),s.push(y),A=L2({allObservables:E,getEventProperties:b,amplitude:f,shouldTrackEvent:G}),s.push(A),F=M2({allObservables:E,options:t,getEventProperties:b,amplitude:f,shouldTrackEvent:G,shouldTrackActionClick:C}),s.push(F),(D=Z==null?void 0:Z.loggerProvider)===null||D===void 0||D.log(„”.concat(a,” has been successfully added.”)),window.opener&&c.enabled&&(w=t.cssSelectorAllowlist,_=t.actionClickAllowlist,(T=c.messenger)===null||T===void 0||T.setup(B(B({logger:Z==null?void 0:Z.loggerProvider},(Z==null?void 0:Z.serverZone)&&{endpoint:fV[Z.serverZone]}),{isElementSelectable:Tl(t,Ze(Ze([],K(w),!1),K(_),!1)),cssSelectorAllowlist:w,actionClickAllowlist:_}))),[2])})})},p=function(Z){return W(void 0,void 0,void 0,function(){return S(this,function(f){return[2,Z]})})},X=function(){return W(void 0,void 0,void 0,function(){var Z,f,G,C,E;return S(this,function(y){try{for(Z=ce(s),f=Z.next();!f.done;f=Z.next())G=f.value,G.unsubscribe()}catch(A){C={error:A}}finally{try{f&&!f.done&&(E=Z.return)&&E.call(Z)}finally{if(C)throw C.error}}return[2]})})};return{name:a,type:d,setup:V,execute:p,teardown:X}},D2=”@amplitude/plugin-network-capture-browser”,j2=”[Amplitude] Network Request”,Ed=”500-599″;function _n(t,e){var n=e.replace(/[-[\]{}()+?.,\\^$|#\s]/g,”\\$&”),l=”^”+n.replace(/\*/g,”.*”)+”$”,i=new RegExp(l);return i.test(t)}function Cd(t,e){var n,l,i=e.split(„,”);try{for(var o=ce(i),r=o.next();!r.done;r=o.next()){var c=r.value,a=K(c.split(„-„).map(Number),2),d=a[0],s=a[1];if(t===d&&s===void 0||t>=d&&t<=s)return!0}}catch(u){n={error:u}}finally{try{r&&!r.done&&(l=o.return)&&l.call(o)}finally{if(n)throw n.error}}return!1}function _2(t,e,n){if(!(t.hosts&&!t.hosts.find(function(i){return _n(e,i)}))){if(n||n===0){var l=t.statusCodeRange||Ed;if(!Cd(n,l))return!1}return!0}}function yd(t){var e;if(t)try{var n=(e=Ce())===null||e===void 0?void 0:e.location.href,l=new URL(t,n),i=l.searchParams.toString(),o=l.hash.replace("#",""),r=l.href,c=l.host;l.hash="",l.search="";var a=l.href;return{query:i,fragment:o,href:r,hrefWithoutQueryOrHash:a,host:c}}catch{return}}function P2(t,e){var n;e===void 0&&(e={});var l=yd(t.url);if(!l)return!1;var i=l.host;if(e.ignoreAmplitudeRequests!==!1&&(_n(i,"*.amplitude.com")||_n(i,"amplitude.com"))||!((n=e.ignoreHosts)===null||n===void 0)&&n.find(function(r){return _n(i,r)})||!e.captureRules&&t.status!==void 0&&!Cd(t.status,Ed))return!1;if(e.captureRules){var o;if(Ze([],K(e.captureRules),!1).reverse().find(function(r){return o=_2(r,i,t.status),o!==void 0}),!o)return!1}return!0}function O2(t){var e=t.allObservables,n=t.networkTrackingOptions,l=t.amplitude,i=e.networkObservable,o=i.pipe(bt(function(r){return P2(r.event,n)}));return o.subscribe(function(r){var c,a,d,s=r.event,u=yd(s.url);if(u){var b=(a=s.responseWrapper)===null||a===void 0?void 0:a.bodySize,g=(d=s.requestWrapper)===null||d===void 0?void 0:d.bodySize,V=(c={},c["[Amplitude] URL"]=u.hrefWithoutQueryOrHash,c["[Amplitude] URL Query"]=u.query,c["[Amplitude] URL Fragment"]=u.fragment,c["[Amplitude] Request Method"]=s.method,c["[Amplitude] Status Code"]=s.status,c["[Amplitude] Start Time"]=s.startTime,c["[Amplitude] Completion Time"]=s.endTime,c["[Amplitude] Duration"]=s.duration,c["[Amplitude] Request Body Size"]=g,c["[Amplitude] Response Body Size"]=b,c["[Amplitude] Request Type"]=s.type,c);l==null||l.track(j2,V)}})}var ai;(function(t){t.NetworkObservable="networkObservable"})(ai||(ai={}));var $2=function(t){t===void 0&&(t={});var e=D2,n="enrichment",l,i=[],o=function(s,u){var b={event:s,timestamp:Date.now(),type:u};return b},r=function(){var s,u=new ye(function(b){var g=new eb(function(V){var p=o(V,"network");b.next(p)});return Ar.subscribe(g,l),function(){Ar.unsubscribe(g)}});return s={},s[ai.NetworkObservable]=u,s},c=function(s,u){return W(void 0,void 0,void 0,function(){var b,g;return S(this,function(V){return typeof document>„u”?[2]:(b=r(),g=O2({allObservables:b,networkTrackingOptions:t,amplitude:u}),i.push(g),l=s==null?void 0:s.loggerProvider,l==null||l.log(„”.concat(e,” has been successfully added.”)),[2])})})},a=function(s){return W(void 0,void 0,void 0,function(){return S(this,function(u){return[2,s]})})},d=function(){return W(void 0,void 0,void 0,function(){var s,u,b,g,V;return S(this,function(p){try{for(s=ce(i),u=s.next();!u.done;u=s.next())b=u.value,b.unsubscribe()}catch(X){g={error:X}}finally{try{u&&!u.done&&(V=s.return)&&V.call(s)}finally{if(g)throw g.error}}return[2]})})};return{name:e,type:n,setup:c,execute:a,teardown:d}},q2=”utm_campaign”,em=”utm_content”,tm=”utm_id”,nm=”utm_medium”,lm=”utm_source”,im=”utm_term”,Dr=”dclid”,jr=”fbclid”,_r=”gbraid”,Pr=”gclid”,Or=”ko_click_id”,$r=”li_fat_id”,qr=”msclkid”,ec=”rtd_cid”,tc=”ttclid”,nc=”twclid”,lc=”wbraid”,Oi={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rtd_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},ic=function(t){var e=t.split(„.”);return e.length<=2?t:e.slice(e.length-2,e.length).join(".")},om=function(t){return Object.values(t).every(function(e){return!e})},rm=function(t,e,n,l,i){i===void 0&&(i=!0),t.referrer;var o=t.referring_domain,r=li(t,["referrer","referring_domain"]),c=e||{};c.referrer;var a=c.referring_domain,d=li(c,["referrer","referring_domain"]);if(cm(n.excludeReferrers,t.referring_domain))return l.debug("This is not a new campaign because ".concat(t.referring_domain," is in the exclude referrer list.")),!1;if(!i&&om(t)&&e)return l.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var s=JSON.stringify(r)!==JSON.stringify(d),u=ic(o||"")!==ic(a||""),b=!e||s||u;return b?l.debug("This is a new campaign. An $identify event will be sent."):l.debug("This is not a new campaign because it's the same as the previous one."),b},cm=function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=""),t.some(function(n){return n instanceof RegExp?n.test(e):n===e})},am=function(t,e){var n=B(B({},Oi),t),l=Object.entries(n).reduce(function(i,o){var r,c=K(o,2),a=c[0],d=c[1];return i.setOnce("initial_".concat(a),(r=d??e.initialEmptyValue)!==null&&r!==void 0?r:"EMPTY"),d?i.set(a,d):i.unset(a)},new _t);return Na(l)},dm=function(t){var e=t;return e?(e.startsWith(".")&&(e=e.substring(1)),[new RegExp("".concat(e.replace(".","\\."),"$"))]):[]},sm=function(){function t(){}return t.prototype.parse=function(){return W(this,void 0,void 0,function(){return S(this,function(e){return[2,B(B(B(B({},Oi),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},t.prototype.getUtmParam=function(){var e=ol(),n=e[q2],l=e[em],i=e[tm],o=e[nm],r=e[lm],c=e[im];return{utm_campaign:n,utm_content:l,utm_id:i,utm_medium:o,utm_source:r,utm_term:c}},t.prototype.getReferrer=function(){var e,n,l={referrer:void 0,referring_domain:void 0};try{l.referrer=document.referrer||void 0,l.referring_domain=(n=(e=l.referrer)===null||e===void 0?void 0:e.split("/")[2])!==null&&n!==void 0?n:void 0}catch{}return l},t.prototype.getClickIds=function(){var e,n=ol();return e={},e[Dr]=n[Dr],e[jr]=n[jr],e[_r]=n[_r],e[Pr]=n[Pr],e[Or]=n[Or],e[$r]=n[$r],e[qr]=n[qr],e[ec]=n[ec],e[tc]=n[tc],e[nc]=n[nc],e[lc]=n[lc],e},t}(),um=function(){function t(e,n){var l;this.shouldTrackNewCampaign=!1,this.options=B({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:dm((l=n.cookieOptions)===null||l===void 0?void 0:l.domain)},e),this.storage=n.cookieStorage,this.storageKey=K0(n.apiKey,"MKTG"),this.currentCampaign=Oi,this.sessionTimeout=n.sessionTimeout,this.lastEventTime=n.lastEventTime,this.logger=n.loggerProvider,n.loggerProvider.log("Installing web attribution tracking.")}return t.prototype.init=function(){return W(this,void 0,void 0,function(){var e,n;return S(this,function(l){switch(l.label){case 0:return[4,this.fetchCampaign()];case 1:return n=K.apply(void 0,[l.sent(),2]),this.currentCampaign=n[0],this.previousCampaign=n[1],e=this.lastEventTime?Ja(this.sessionTimeout,this.lastEventTime):!0,rm(this.currentCampaign,this.previousCampaign,this.options,this.logger,e)?(this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)]):[3,3];case 2:l.sent(),l.label=3;case 3:return[2]}})})},t.prototype.fetchCampaign=function(){return W(this,void 0,void 0,function(){return S(this,function(e){switch(e.label){case 0:return[4,Promise.all([new sm().parse(),this.storage.get(this.storageKey)])];case 1:return[2,e.sent()]}})})},t.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var n=am(this.currentCampaign,this.options);return e&&(n.event_id=e),n},t.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},t}(),gm=function(t){Fe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(n,l,i){n===void 0&&(n="");var o,r;return arguments.length>2?(o=l,r=i):typeof l==”string”?(o=l,r=void 0):(o=l==null?void 0:l.userId,r=l),xe(this._init(B(B({},r),{userId:o,apiKey:n})))},e.prototype._init=function(n){var l,i,o;return W(this,void 0,void 0,function(){var r,c,a,d,s,u,b=this;return S(this,function(g){switch(g.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,Cb(n.apiKey,n,this)]);case 1:return r=g.sent(),r.fetchRemoteConfig?[4,nV(r)]:[3,4];case 2:return c=g.sent(),[4,c.generateJoinedConfig()];case 3:r=g.sent(),g.label=4;case 4:return[4,t.prototype._init.call(this,r)];case 5:return g.sent(),this.logBrowserOptions(r),za(this.config.defaultTracking)?(a=cb(this.config),this.webAttribution=new um(a,this.config),[4,this.webAttribution.init()]):[3,7];case 6:g.sent(),g.label=7;case 7:return d=ol(),s=Number.isNaN(Number(d.ampSessionId))?void 0:Number(d.ampSessionId),this.setSessionId((o=(i=(l=n.sessionId)!==null&&l!==void 0?l:s)!==null&&i!==void 0?i:this.config.sessionId)!==null&&o!==void 0?o:Date.now()),u=An(n.instanceName),u.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),this.config.offline===M0?[3,9]:[4,this.add(Tb()).promise];case 8:g.sent(),g.label=9;case 9:return[4,this.add(new R0).promise];case 10:return g.sent(),[4,this.add(new ub).promise];case 11:return g.sent(),[4,this.add(new U0).promise];case 12:return g.sent(),Mb(this.config),nb(this.config.defaultTracking)?(this.config.loggerProvider.debug(„Adding file download tracking plugin”),[4,this.add(Lb()).promise]):[3,14];case 13:g.sent(),g.label=14;case 14:return lb(this.config.defaultTracking)?(this.config.loggerProvider.debug(„Adding form interaction plugin”),[4,this.add(Kb()).promise]):[3,16];case 15:g.sent(),g.label=16;case 16:return Qa(this.config.defaultTracking)?(this.config.loggerProvider.debug(„Adding page view tracking plugin”),[4,this.add(wb(rb(this.config))).promise]):[3,18];case 17:g.sent(),g.label=18;case 18:return La(this.config.autocapture)?(this.config.loggerProvider.debug(„Adding user interactions plugin (autocapture plugin)”),[4,this.add(H2(ib(this.config))).promise]):[3,20];case 19:g.sent(),g.label=20;case 20:return Ka(this.config.autocapture)?(this.config.loggerProvider.debug(„Adding network tracking plugin”),[4,this.add($2(ob(this.config))).promise]):[3,22];case 21:g.sent(),g.label=22;case 22:return this.initializing=!1,[4,this.runQueuedFunctions(„dispatchQ”)];case 23:return g.sent(),u.eventBridge.setEventReceiver(function(V){b.track(V.eventType,V.eventProperties)}),[2]}})})},e.prototype.getUserId=function(){var n;return(n=this.config)===null||n===void 0?void 0:n.userId},e.prototype.setUserId=function(n){if(!this.config){this.q.push(this.setUserId.bind(this,n));return}this.config.loggerProvider.debug(„function setUserId: „,n),(n!==this.config.userId||n===void 0)&&(this.config.userId=n,this.timeline.onIdentityChanged({userId:n}),F0(n,this.config.instanceName))},e.prototype.getDeviceId=function(){var n;return(n=this.config)===null||n===void 0?void 0:n.deviceId},e.prototype.setDeviceId=function(n){if(!this.config){this.q.push(this.setDeviceId.bind(this,n));return}this.config.loggerProvider.debug(„function setDeviceId: „,n),n!==this.config.deviceId&&(this.config.deviceId=n,this.timeline.onIdentityChanged({deviceId:n}),Y0(n,this.config.instanceName))},e.prototype.reset=function(){this.setDeviceId(Ft()),this.setUserId(void 0)},e.prototype.getSessionId=function(){var n;return(n=this.config)===null||n===void 0?void 0:n.sessionId},e.prototype.setSessionId=function(n){var l,i=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,n)),xe(Promise.resolve());if(n===this.config.sessionId)return xe(Promise.resolve());this.config.loggerProvider.debug(„function setSessionId: „,n);var o=this.getSessionId();o!==n&&this.timeline.onSessionIdChanged(n);var r=this.config.lastEventTime,c=(l=this.config.lastEventId)!==null&&l!==void 0?l:-1;this.config.sessionId=n,this.config.lastEventTime=void 0,this.config.pageCounter=0,Zr(this.config.defaultTracking)&&(o&&r&&i.push(this.track(Gr,void 0,{device_id:this.previousSessionDeviceId,event_id:++c,session_id:o,time:r+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var a=this.trackCampaignEventIfNeeded(++c,i);return Zr(this.config.defaultTracking)&&i.push(this.track(pr,void 0,{event_id:a?++c:c,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,xe(Promise.all(i))},e.prototype.extendSession=function(){if(!this.config){this.q.push(this.extendSession.bind(this));return}this.config.lastEventTime=Date.now()},e.prototype.setTransport=function(n){if(!this.config){this.q.push(this.setTransport.bind(this,n));return}this.config.transportProvider=Da(n)},e.prototype.identify=function(n,l){if(wl(n)){var i=n._q;n._q=[],n=xl(new _t,i)}return l!=null&&l.user_id&&this.setUserId(l.user_id),l!=null&&l.device_id&&this.setDeviceId(l.device_id),t.prototype.identify.call(this,n,l)},e.prototype.groupIdentify=function(n,l,i,o){if(wl(i)){var r=i._q;i._q=[],i=xl(new _t,r)}return t.prototype.groupIdentify.call(this,n,l,i,o)},e.prototype.revenue=function(n,l){if(wl(n)){var i=n._q;n._q=[],n=xl(new f0,i)}return t.prototype.revenue.call(this,n,l)},e.prototype.trackCampaignEventIfNeeded=function(n,l){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign)return!1;var i=this.webAttribution.generateCampaignEvent(n);return l?l.push(this.track(i).promise):this.track(i),this.config.loggerProvider.log(„Tracking attribution.”),!0},e.prototype.process=function(n){return W(this,void 0,void 0,function(){var l,i,o;return S(this,function(r){return l=Date.now(),i=Ja(this.config.sessionTimeout,this.config.lastEventTime),o=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),n.event_type!==pr&&n.event_type!==Gr&&(!n.session_id||n.session_id===this.getSessionId())&&(i||o?(this.setSessionId(l),o&&this.config.loggerProvider.log(„Created a new session for new campaign.”)):i||this.trackCampaignEventIfNeeded()),[2,t.prototype.process.call(this,n)]})})},e.prototype.logBrowserOptions=function(n){try{var l=B(B({},n),{apiKey:n.apiKey.substring(0,10)+”********”});this.config.loggerProvider.debug(„Initialized Amplitude with BrowserConfig:”,JSON.stringify(l))}catch(i){this.config.loggerProvider.error(„Error logging browser config”,i)}},e}(Z0),hm=function(){var t=new gm;return{init:ge(t.init.bind(t),”init”,se(t),ue(t,[„config”])),add:ge(t.add.bind(t),”add”,se(t),ue(t,[„config.apiKey”,”timeline.plugins”])),remove:ge(t.remove.bind(t),”remove”,se(t),ue(t,[„config.apiKey”,”timeline.plugins”])),track:ge(t.track.bind(t),”track”,se(t),ue(t,[„config.apiKey”,”timeline.queue.length”])),logEvent:ge(t.logEvent.bind(t),”logEvent”,se(t),ue(t,[„config.apiKey”,”timeline.queue.length”])),identify:ge(t.identify.bind(t),”identify”,se(t),ue(t,[„config.apiKey”,”timeline.queue.length”])),groupIdentify:ge(t.groupIdentify.bind(t),”groupIdentify”,se(t),ue(t,[„config.apiKey”,”timeline.queue.length”])),setGroup:ge(t.setGroup.bind(t),”setGroup”,se(t),ue(t,[„config.apiKey”,”timeline.queue.length”])),revenue:ge(t.revenue.bind(t),”revenue”,se(t),ue(t,[„config.apiKey”,”timeline.queue.length”])),flush:ge(t.flush.bind(t),”flush”,se(t),ue(t,[„config.apiKey”,”timeline.queue.length”])),getUserId:ge(t.getUserId.bind(t),”getUserId”,se(t),ue(t,[„config”,”config.userId”])),setUserId:ge(t.setUserId.bind(t),”setUserId”,se(t),ue(t,[„config”,”config.userId”])),getDeviceId:ge(t.getDeviceId.bind(t),”getDeviceId”,se(t),ue(t,[„config”,”config.deviceId”])),setDeviceId:ge(t.setDeviceId.bind(t),”setDeviceId”,se(t),ue(t,[„config”,”config.deviceId”])),reset:ge(t.reset.bind(t),”reset”,se(t),ue(t,[„config”,”config.userId”,”config.deviceId”])),getSessionId:ge(t.getSessionId.bind(t),”getSessionId”,se(t),ue(t,[„config”])),setSessionId:ge(t.setSessionId.bind(t),”setSessionId”,se(t),ue(t,[„config”])),extendSession:ge(t.extendSession.bind(t),”extendSession”,se(t),ue(t,[„config”])),setOptOut:ge(t.setOptOut.bind(t),”setOptOut”,se(t),ue(t,[„config”])),setTransport:ge(t.setTransport.bind(t),”setTransport”,se(t),ue(t,[„config”]))}};const Ot=hm();var bm=Ot.add,oc=Ot.identify,Vm=Ot.init,mm=Ot.reset,Am=Ot.setUserId,rc=Ot.track;const cn=class cn{constructor(){this.inited=!1,this.storageUserId=null,this.storageUserProperties={},this.experiment=null}static createPageViewTrackingEnrichment(){return{name:”page-view-tracking-enrichment”,type:”enrichment”,setup:async()=>{},execute:async e=>{if(e.event_properties&&typeof e.event_properties==”object”)for(const n of cn.PROPERTIES_TO_REMOVE)delete e.event_properties[n];return e}}}init(){this.inited||_e.amplitudeKey&&(this.inited=!0,bm(cn.createPageViewTrackingEnrichment()),Vm(_e.amplitudeKey,{transport:”beacon”,autocapture:{elementInteractions:!0}}))}reset(){this.inited=!1,this.storageUserId=null,this.storageUserProperties={},mm()}setUserId(e){!e||this.storageUserId===e||(this.inited||this.init(),this.storageUserId=e,Am(e))}trackOnce(e){this.inited||this.init(),rc(e)}batchTrack(e){this.inited||this.init();for(const n of e)rc(n)}customUserProperties(e){if(!e||Object.keys(e).length===0)return;this.inited||this.init();let n;this.storageUserProperties?n=this.extractChangedValues(this.storageUserProperties,e):n=e,this.storageUserProperties=e;const l=new _t;Object.entries(n).forEach(([i,o])=>{l.set(i,typeof o==”number”?`${o}`:o)}),oc(l)}customUserPropertyOne(e,n){if(!e||(this.inited||this.init(),this.storageUserProperties[e]===n))return;this.storageUserProperties[e]=n;const l=new _t;l.set(e,n),oc(l)}extractChangedValues(e,n){const l={};return Object.keys(n).forEach(i=>{(!(i in e)||e[i]!==n[i])&&(l[i]=n[i])}),l}formatToAmplitude(e){const{events:n,clientInfo:l}=e;return il(„server”,n.map(i=>{const{eventName:o,extData:r}=i;return{event_type:o,event_properties:{ext_data:r,client_info:l}}}))}};cn.PROPERTIES_TO_REMOVE=[„page_title”,”[Amplitude] Page Title”];let di=cn;const cc=new di;function at(t,e,n,l){return new(n||(n=Promise))(function(i,o){function r(d){try{a(l.next(d))}catch(s){o(s)}}function c(d){try{a(l.throw(d))}catch(s){o(s)}}function a(d){var s;d.done?i(d.value):(s=d.value,s instanceof n?s:new n(function(u){u(s)})).then(r,c)}a((l=l.apply(t,[])).next())})}function dt(t,e){var n,l,i,o,r={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol==”function”&&(o[Symbol.iterator]=function(){return this}),o;function c(a){return function(d){return function(s){if(n)throw new TypeError(„Generator is already executing.”);for(;o&&(o=0,s[0]&&(r=0)),r;)try{if(n=1,l&&(i=2&s[0]?l.return:s[0]?l.throw||((i=l.return)&&i.call(l),0):l.next)&&!(i=i.call(l,s[1])).done)return i;switch(l=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,l=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!((i=i.length>0&&i[i.length-1])||s[0]!==6&&s[0]!==2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]>>16,t=Math.imul(t,2246822507),t^=t>>>13,t=Math.imul(t,3266489909),(t^=t>>>16)>>>0}var Re=new Uint32Array([597399067,2869860233,951274213,2716044179]);function je(t,e){return t<>>32-e}function $i(t,e){var n;if(e===void 0&&(e=0),e=e?0|e:0,typeof t==”string”&&(n=t,t=new TextEncoder().encode(n).buffer),!(t instanceof ArrayBuffer))throw new TypeError(„Expected key to be ArrayBuffer or string”);var l=new Uint32Array([e,e,e,e]);(function(o,r){for(var c=o.byteLength/16|0,a=new Uint32Array(o,0,4*c),d=0;d0&&(i[d]=V)}},r=0,c=Object.entries(t);r„u”)return{name:”unknown”,version:”unknown”};for(var t=navigator.userAgent,e={edg:”Edge”,opr:”Opera”,samsung:”SamsungBrowser”},n=0,l=[/(?Edge|Edg)\/(?\d+(?:\.\d+)?)/,/(?(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?\d+(?:\.\d+)?)/,/(?(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?\d+(?:\.\d+)?)/,/(?Safari)\/(?\d+(?:\.\d+)?)/,/(?MSIE|Trident|IEMobile).+?(?\d+(?:\.\d+)?)/,/(?[A-Za-z]+)\/(?\d+(?:\.\d+)?)/,/(?SamsungBrowser)\/(?\d+(?:\.\d+)?)/,/(?samsung).*Version\/(?\d+(?:\.\d+)?)/i];ne[i]&&(i=parseInt(o,10));return i}[„SamsungBrowser”,”Safari”].includes(Rm.name)||tt(„audio”,function(){return at(this,void 0,void 0,function(){return dt(this,function(t){return[2,new Promise(function(e,n){try{var l=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),i=l.createBufferSource(),o=l.createOscillator();o.frequency.value=1e3;var r,c=l.createDynamicsCompressor();c.threshold.value=-50,c.knee.value=40,c.ratio.value=12,c.attack.value=0,c.release.value=.2,o.connect(c),c.connect(l.destination),o.start(),l.oncomplete=function(a){r=a.renderedBuffer.getChannelData(0),e({sampleHash:Im(r),oscillator:o.type,maxChannels:l.destination.maxChannelCount,channelCountMode:i.channelCountMode})},l.startRendering()}catch(a){console.error(„Error creating audio fingerprint:”,a),n(a)}})]})})});var Cm=Pt().name!==”SamsungBrowser”?1:3;Pt().name!=”Firefox”&&tt(„canvas”,function(){return document.createElement(„canvas”).getContext(„2d”),new Promise(function(t){var e=Array.from({length:Cm},function(){return function(){var n=document.createElement(„canvas”),l=n.getContext(„2d”);if(!l)return new ImageData(1,1);n.width=280,n.height=20;var i=l.createLinearGradient(0,0,n.width,n.height);i.addColorStop(0,”red”),i.addColorStop(.16666666666666666,”orange”),i.addColorStop(.3333333333333333,”yellow”),i.addColorStop(.5,”green”),i.addColorStop(.6666666666666666,”blue”),i.addColorStop(.8333333333333334,”indigo”),i.addColorStop(1,”violet”),l.fillStyle=i,l.fillRect(0,0,n.width,n.height);var o=”Random Text WMwmil10Oo”;l.font=”23.123px Arial”,l.fillStyle=”black”,l.fillText(o,-5,15),l.fillStyle=”rgba(0, 0, 255, 0.5)”,l.fillText(o,-3.3,17.7),l.beginPath(),l.moveTo(0,0),l.lineTo(2*n.width/7,n.height),l.strokeStyle=”white”,l.lineWidth=2,l.stroke();var r=l.getImageData(0,0,n.width,n.height);return r}()});t({commonImageDataHash:$i(Bd(e,280,20).data.toString()).toString()})})});var Dl,ym=[„Arial”,”Arial Black”,”Arial Narrow”,”Arial Rounded MT”,”Arimo”,”Archivo”,”Barlow”,”Bebas Neue”,”Bitter”,”Bookman”,”Calibri”,”Cabin”,”Candara”,”Century”,”Century Gothic”,”Comic Sans MS”,”Constantia”,”Courier”,”Courier New”,”Crimson Text”,”DM Mono”,”DM Sans”,”DM Serif Display”,”DM Serif Text”,”Dosis”,”Droid Sans”,”Exo”,”Fira Code”,”Fira Sans”,”Franklin Gothic Medium”,”Garamond”,”Geneva”,”Georgia”,”Gill Sans”,”Helvetica”,”Impact”,”Inconsolata”,”Indie Flower”,”Inter”,”Josefin Sans”,”Karla”,”Lato”,”Lexend”,”Lucida Bright”,”Lucida Console”,”Lucida Sans Unicode”,”Manrope”,”Merriweather”,”Merriweather Sans”,”Montserrat”,”Myriad”,”Noto Sans”,”Nunito”,”Nunito Sans”,”Open Sans”,”Optima”,”Orbitron”,”Oswald”,”Pacifico”,”Palatino”,”Perpetua”,”PT Sans”,”PT Serif”,”Poppins”,”Prompt”,”Public Sans”,”Quicksand”,”Rajdhani”,”Recursive”,”Roboto”,”Roboto Condensed”,”Rockwell”,”Rubik”,”Segoe Print”,”Segoe Script”,”Segoe UI”,”Sora”,”Source Sans Pro”,”Space Mono”,”Tahoma”,”Taviraj”,”Times”,”Times New Roman”,”Titillium Web”,”Trebuchet MS”,”Ubuntu”,”Varela Round”,”Verdana”,”Work Sans”],Sm=[„monospace”,”sans-serif”,”serif”];function ac(t,e){if(!t)throw new Error(„Canvas context not supported”);return t.font,t.font=”72px „.concat(e),t.measureText(„WwMmLli0Oo”).width}function Wm(){var t,e=document.createElement(„canvas”),n=(t=e.getContext(„webgl”))!==null&&t!==void 0?t:e.getContext(„experimental-webgl”);if(n&&”getParameter”in n)try{var l=(n.getParameter(n.VENDOR)||””).toString(),i=(n.getParameter(n.RENDERER)||””).toString(),o={vendor:l,renderer:i,version:(n.getParameter(n.VERSION)||””).toString(),shadingLanguageVersion:(n.getParameter(n.SHADING_LANGUAGE_VERSION)||””).toString()};if(!i.length||!l.length){var r=n.getExtension(„WEBGL_debug_renderer_info”);if(r){var c=(n.getParameter(r.UNMASKED_VENDOR_WEBGL)||””).toString(),a=(n.getParameter(r.UNMASKED_RENDERER_WEBGL)||””).toString();c&&(o.vendorUnmasked=c),a&&(o.rendererUnmasked=a)}}return o}catch{}return”undefined”}function vm(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=1/0,t[0]=t[0]-t[0],e[3]}function Bm(t,e){var n={};return e.forEach(function(l){var i=function(o){if(o.length===0)return null;var r={};o.forEach(function(d){var s=String(d);r[s]=(r[s]||0)+1});var c=o[0],a=1;return Object.keys(r).forEach(function(d){r[d]>a&&(c=d,a=r[d])}),c}(t.map(function(o){return l in o?o[l]:void 0}).filter(function(o){return o!==void 0}));i&&(n[l]=i)}),n}function Nm(){var t=[],e={„prefers-contrast”:[„high”,”more”,”low”,”less”,”forced”,”no-preference”],”any-hover”:[„hover”,”none”],”any-pointer”:[„none”,”coarse”,”fine”],pointer:[„none”,”coarse”,”fine”],hover:[„hover”,”none”],update:[„fast”,”slow”],”inverted-colors”:[„inverted”,”none”],”prefers-reduced-motion”:[„reduce”,”no-preference”],”prefers-reduced-transparency”:[„reduce”,”no-preference”],scripting:[„none”,”initial-only”,”enabled”],”forced-colors”:[„active”,”none”]};return Object.keys(e).forEach(function(n){e[n].forEach(function(l){matchMedia(„(„.concat(n,”: „).concat(l,”)”)).matches&&t.push(„”.concat(n,”: „).concat(l))})}),t}function Fm(){if(window.location.protocol===”https:”&&typeof window.ApplePaySession==”function”)try{for(var t=window.ApplePaySession.supportsVersion,e=15;e>0;e–)if(t(e))return e}catch{return 0}return 0}Pt().name!=”Firefox”&&tt(„fonts”,function(){var t=this;return new Promise(function(e,n){try{(function(l){var i;at(this,void 0,void 0,function(){var o,r,c;return dt(this,function(a){switch(a.label){case 0:return document.body?[3,2]:[4,(d=50,new Promise(function(u){return setTimeout(u,d,s)}))];case 1:return a.sent(),[3,0];case 2:if((o=document.createElement(„iframe”)).setAttribute(„frameBorder”,”0″),(r=o.style).setProperty(„position”,”fixed”),r.setProperty(„display”,”block”,”important”),r.setProperty(„visibility”,”visible”),r.setProperty(„border”,”0″),r.setProperty(„opacity”,”0″),o.src=”about:blank”,document.body.appendChild(o),!(c=o.contentDocument||((i=o.contentWindow)===null||i===void 0?void 0:i.document)))throw new Error(„Iframe document is not accessible”);return l({iframe:c}),setTimeout(function(){document.body.removeChild(o)},0),[2]}var d,s})})})(function(l){var i=l.iframe;return at(t,void 0,void 0,function(){var o,r,c,a;return dt(this,function(d){return o=i.createElement(„canvas”),r=o.getContext(„2d”),c=Sm.map(function(s){return ac(r,s)}),a={},ym.forEach(function(s){var u=ac(r,s);c.includes(u)||(a[s]=u)}),e(a),[2]})})})}catch{n({error:”unsupported”})}})}),tt(„hardware”,function(){return new Promise(function(t,e){var n=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,l=window.performance&&window.performance.memory?window.performance.memory:0;t({videocard:Wm(),architecture:vm(),deviceMemory:n.toString()||”undefined”,jsHeapSizeLimit:l.jsHeapSizeLimit||0})})}),tt(„locales”,function(){return new Promise(function(t){t({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),tt(„permissions”,function(){return at(this,void 0,void 0,function(){var t;return dt(this,function(e){return Dl=(be==null?void 0:be.permissions_to_check)||[„accelerometer”,”accessibility”,”accessibility-events”,”ambient-light-sensor”,”background-fetch”,”background-sync”,”bluetooth”,”camera”,”clipboard-read”,”clipboard-write”,”device-info”,”display-capture”,”gyroscope”,”geolocation”,”local-fonts”,”magnetometer”,”microphone”,”midi”,”nfc”,”notifications”,”payment-handler”,”persistent-storage”,”push”,”speaker”,”storage-access”,”top-level-storage-access”,”window-management”,”query”],t=Array.from({length:(be==null?void 0:be.retries)||3},function(){return function(){return at(this,void 0,void 0,function(){var n,l,i,o,r;return dt(this,function(c){switch(c.label){case 0:n={},l=0,i=Dl,c.label=1;case 1:if(!(l0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:Nm()})})}),tt(„system”,function(){return new Promise(function(t){var e=Pt();t({platform:window.navigator.platform,cookieEnabled:window.navigator.cookieEnabled,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:e.name,version:e.version},applePayVersion:Fm()})})});var ve,Ym=Pt().name!==”SamsungBrowser”?1:3,U=null;tt(„webgl”,function(){return at(this,void 0,void 0,function(){var t;return dt(this,function(e){typeof document<"u"&&((ve=document.createElement("canvas")).width=200,ve.height=100,U=ve.getContext("webgl"));try{if(!U)throw new Error("WebGL not supported");return t=Array.from({length:Ym},function(){return function(){try{if(!U)throw new Error("WebGL not supported");var n=` attribute vec2 position; void main() { gl_Position = vec4(position, 0.0, 1.0); } `,l=` precision mediump float; void main() { gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color } `,i=U.createShader(U.VERTEX_SHADER),o=U.createShader(U.FRAGMENT_SHADER);if(!i||!o)throw new Error("Failed to create shaders");if(U.shaderSource(i,n),U.shaderSource(o,l),U.compileShader(i),!U.getShaderParameter(i,U.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+U.getShaderInfoLog(i));if(U.compileShader(o),!U.getShaderParameter(o,U.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+U.getShaderInfoLog(o));var r=U.createProgram();if(!r)throw new Error("Failed to create shader program");if(U.attachShader(r,i),U.attachShader(r,o),U.linkProgram(r),!U.getProgramParameter(r,U.LINK_STATUS))throw new Error("Shader program linking failed: "+U.getProgramInfoLog(r));U.useProgram(r);for(var c=137,a=new Float32Array(4*c),d=2*Math.PI/c,s=0;sn!==e):[…this.currentIncludeOption,e],Hl(„include”,this.currentIncludeOption)):(this.currentIncludeOption=[…e],Hl(„include”,this.currentIncludeOption))}}const Jm=new Um;class xm{constructor(e,n){this.interval=e,this.getClientInfo=n,this.events=[],this.timer=null}push(e){e.extData||(e.extData={}),e.extData.url=window.location.href,this.events.push(e),this.doChecking()}doChecking(){this.timer&&this.clearTimer(),this.timer=setTimeout(()=>{this.send(),this.clearTimer()},this.interval)}clearTimer(){clearTimeout(this.timer),this.timer=null}async send(){var i;const e={…this.getClientInfo(),tmToken:await Jm.getId()},n={events:this.events,clientInfo:e},l=cc.formatToAmplitude(n);cc.batchTrack(l),(i=navigator==null?void 0:navigator.sendBeacon)==null||i.call(navigator,`${_e.apiHost}/api/user_behavior/batch_create_event_v2`,JSON.stringify(il(„server”,n))),this.events=[]}}function wm(){const t=new Date;return{clientType:”web”,clientVersion:””,productName:”Manus”,timezone:(()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}})(),timezoneOffset:t.getTimezoneOffset()}}const km=new xm(200,wm);function Ct(t){(Array.isArray(t)?t:[t]).map(n=>({…n,extData:{…n.extData},eventAt:new Date().toISOString()})).forEach(n=>{km.push(n)})}function xt(t){return`control-panel-view-${t}`}class zm extends fn{constructor(e,n){super(e),this.se=n,Mt.listenBy(this,”onViewTypeChange”,()=>{this.render()})}get template(){const e=()=>Je.viewType===”edit”?M``:M``;return M` ${e()}`}handleToggleEditMode(){Je.viewType===”default”?(Je.setViewType(„edit”),this.se.toggleEditMode(),$n.showToast({title:”You’re now editing – all changes auto-save”,variant:”success”}),Ct({eventName:”edit_click”,extData:{type:”space”}})):(Je.setViewType(„default”),this.se.toggleToPreviewMode(),$n.showToast({title:”Switched to preview mode”,variant:”success”}))}}function L(t){return`footer-toolbar-${t}`}class Qm extends fn{constructor(e){super(e,!1),this.container=e,this.hasPrivilege=!1,this.isRestoring=!1,this.isShowHistoryBtn=!1,this.isFolded=!1,this.isFolded=localStorage.getItem(ao.embedClosed)===”true”,this.init()}get template(){const e=()=>{const n=M`
${T1}
`;if(!this.hasPrivilege)return M``;const l=Je.viewType!==”history”?M``:M``,i=Je.viewType===”history”&&this.isShowHistoryBtn?M``:””,o=M`
this.toggleEditModeRef=c)} >
`,r=M`this.handleSetDialogRef(c))} title=”Restore to this version?”>

This will overwrite existing content and affect the current task.

`;return M`${l} ${i} ${o} ${n} ${r}`};return M`
${k1}
${e()}
`}handleRestore(){var e;(e=this.dialogRef)==null||e.show()}async handleRestoreConfirm(){var e,n,l;if(!this.isRestoring)try{this.isRestoring=!0,this.render(),await ll.SpaceService.restoreOriginalSite({spaceUid:_e.spaceId}),(e=this.se)==null||e.restoreToOriginal(),(n=this.dialogRef)==null||n.close(),Je.setViewType(Je.prevViewType),Je.viewType!==”edit”&&((l=this.se)==null||l.toggleToPreviewMode())}catch{}finally{this.isRestoring=!1,this.render()}}async init(){const e=new B1;this.se=e;const n=new URL(window.location.href);let l=”default”;n.searchParams.get(„edit”)===”1″?l=”edit”:n.searchParams.get(„history”)===”1″&&(l=”history”),this.updateIsShowHistoryBtn();const i=async()=>new Promise(r=>{l===”history”?(e.initWithoutApplyPatches(),jl([„history”]),this.isShowHistoryBtn&&Je.setViewType(„history”),r(!0)):jd()&&_e.patchList.length>0?(document.body.style.opacity=”0″,_d().then(()=>{e.init(),document.body.style.opacity=”1″,r(!0)})):(e.init(),r(!0))});let o=!1;_e.patchList.length>0&&(await i(),o=!0);try{l===”edit”&&(this.hasPrivilege=!0,e.toggleEditMode(),Je.setViewType(„edit”),this.render()),jl([„edit”])}catch{}if(await wt.waitReady(),this.hasPrivilege=await R1,this.render(),this.hasPrivilege){o||await i(),l===”edit”&&$n.showToast({title:”You’re now editing – all changes auto-save”,variant:”success”}),Mt.listenBy(this,”onViewTypeChange”,()=>{this.render()}),Mt.listenBy(this,”patchListChange”,()=>{this.updateIsShowHistoryBtn(),this.render()});const r=document.createElement(„div”);r.classList.add(J.textEditorPanelView);const c=document.createElement(„div”);c.classList.add(J.elementEditorPanelView),this.container.appendChild(c),this.container.appendChild(r);const a=new j1(r,e),d=new D1(c,e);e.registerViews({textEditPanelView:a,elementEditPanelView:d}),this.toggleEditModeRef&&new zm(this.toggleEditModeRef,e)}else e.toggleToPreviewMode(),Je.setViewType(„default”)}destroy(){var e;(e=this.se)==null||e.destroy(),super.destroy()}toggleFolded(){this.isFolded=!this.isFolded,localStorage.setItem(ao.embedClosed,this.isFolded?”true”:”false”),this.render()}handleViewOriginVersion(){const e=new URL(window.location.href);e.searchParams.append(„history”,”1″),window.location.href=e.toString()}handleExitOriginVersion(){const e=new URL(window.location.href);e.searchParams.delete(„history”),window.location.href=e.toString()}handleSetDialogRef(e){e instanceof gi&&(this.dialogRef=e)}updateIsShowHistoryBtn(){this.isShowHistoryBtn=(_e.patchList.length??0)>0}}const ul=”content-root”,Km=`#${ul} { /* Text Colors */ –text-primary: #34322d; –text-secondary: #535350; –text-tertiary: #858481; –text-disable: #b9b9b7; –text-brand: #0081f2; –text-onblack: #ffffff; –text-white: #ffffff; –text-white-tsp: #ffffff99; –theme-text-primary: #262626; –logo-color: #34322d; /* Background Colors */ –background-gray-main: #f8f8f7; –background-white-main: #ffffff; –background-menu-white: #ffffff; –background-tsp-menu-white: #ffffff14; –background-tsp-card-gray: #37352f0a; –background-nav: #ebebeb; –background-card: #fafafa; –background-mask: #000000a6; –background-card-gray: #fafafa; –background-preview-mask: #000000d9; /* Border Colors */ –border-main: #0000000f; –border-white: #ffffff33; –border-btn-main: #0000001f; –border-input-active: #0081f280; –border-light: #0000000a; –border-dark: #0000001f; –border-primary: #4f59661f; /* Icon Colors */ –icon-primary: #34322d; –icon-secondary: #535350; –icon-tertiary: #858481; –icon-disable: #b9b9b7; –icon-brand: #0081f2; –icon-onblack: #ffffff; –icon-white: #ffffff; –icon-white-tsp: #ffffff99; /* Function Colors */ –function-error: #f25a5a; –function-success: #25ba3b; –function-warning: #efa201; –function-error-tsp: #f25a5a14; –function-warning-tsp: #efa2011f; /* Fill Colors */ –fill-blue: #0081f214; –fill-tsp-white-main: #37352f0f; –fill-tsp-white-dark: #37352f14; –fill-tsp-white-light: #37352f0a; –fill-tsp-gray-dark: #37352f14; –fill-tsp-gray-main: #37352f0a; –fill-input-chat: #ffffff; –fill-white: #ffffff; –fill-black: #28282973; –fill-gray: #f8f8f7; /* Button Colors */ –Button-primary-black: #1a1a19; –Button-primary-white: #ffffff; –Button-primary-brand: #0081f2; –Button-primary-brand-disabled: #7cbdf5; –Button-secondary-brand: #0081f21a; –Button-secondary-error-border: #f25a5a80; –Button-secondary-error-fill: #ffffff; –Button-secondary-main: #ffffff; –Button-secondary-gray: #37352f0f; /* Tab Colors */ –tab-fill: rgba(0, 0, 0, 0.04); –tab-active-black: #1a1a19; /* Shadow Colors */ –shadow-L: #0000003d; –shadow-M: #0000001f; –shadow-S: #00000014; –shadow-XS: #0000000f; –shadows-inner-0: #ffffff00; –shadows-inner-1: #16191d14; –shadows-inner-2: #16191d1f; –shadows-drop-1: #16191d08; –shadows-drop-2: #16191d0a; –shadows-drop-3: #16191d14; –shadows-drop-4: #16191d1f; –shadows-highlight-1: #cce5ff; –shadows-highlight-2: #1487fa; –shadows-danger-1: #fed7d7; –shadows-danger-2: #ee3a3a; –shadows-card-border: #16191d1f; –shadows-card-border-2: #16191d1f; /* Tooltips */ –Tooltips-main: #000000e6; /* Gradual Colors */ –gradual-white-0: #ffffff00; –gradual-gray-100: #ffffff00; –gradual-gray-0: #ffffff00; –gradual-dark-20: #00000033; /** input */ –fill-input-chat: #ffffff; /** gradient */ –gradient-bg-mask-gray-0: #eaeaeb00; } #${ul}.dark { /* Text Colors */ –text-primary: #dadada; –text-secondary: #acacac; –text-tertiary: #7f7f7f; –text-disable: #5f5f5f; –text-brand: #1a93fe; –text-onblack: #000000e6; –text-white: #ffffff; –text-white-tsp: #ffffff99; –theme-text-primary: #dbdbdb; –logo-color: #dadada; /* Background Colors */ –background-gray-main: #272728; –background-white-main: #161618; –background-menu-white: #383739; –background-tsp-menu-white: #ffffff0f; –background-tsp-card-gray: #ffffff0f; –background-nav: #212122; –background-card: #383739; –background-mask: #000000a6; –background-card-gray: #383739; –background-preview-mask: #000000d9; /* Border Colors */ –border-main: #ffffff14; –border-white: #00000014; –border-btn-main: #ffffff1a; –border-input-active: #1a93fe80; –border-light: #ffffff0f; –border-dark: #ffffff29; –border-primary: #56565f52; /* Icon Colors */ –icon-primary: #dadada; –icon-secondary: #acacac; –icon-tertiary: #7f7f7f; –icon-disable: #5f5f5f; –icon-brand: #1a93fe; –icon-onblack: #000000d9; –icon-white: #ffffff; –icon-white-tsp: #ffffff99; /* Function Colors */ –function-error: #eb4d4d; –function-success: #5eb92d; –function-warning: #ffbf36; –function-error-tsp: #eb4d4d14; –function-warning-tsp: #ffbf361f; /* Fill Colors */ –fill-blue: #1a93fe1f; –fill-tsp-white-main: #ffffff0f; –fill-tsp-white-dark: #ffffff1f; –fill-tsp-white-light: #ffffff0a; –fill-tsp-gray-dark: #00000047; –fill-tsp-gray-main: #00000033; –fill-input-chat: #363537; –fill-white: #3e3d3e; –fill-black: #28282973; –fill-gray: #444345; /* Button Colors */ –Button-primary-black: #ffffff; –Button-primary-white: #ffffff14; –Button-primary-brand: #1a93fe; –Button-primary-brand-disabled: #215d93; –Button-secondary-brand: #1a93fe1f; –Button-secondary-error-border: #eb4d4d29; –Button-secondary-error-fill: #eb4d4d1f; –Button-secondary-main: #ffffff1f; –Button-secondary-gray: #ffffff0f; /* Tab Colors */ –tab-fill: rgba(255, 255, 255, 0.06); –tab-active-black: #ffffff; /* Shadow Colors */ –shadow-L: #00000066; –shadow-M: #0000003d; –shadow-S: #00000029; –shadow-XS: #0000001f; –shadows-inner-0: #ffffff1f; –shadows-inner-1: #ffffff14; –shadows-inner-2: #ffffff1f; –shadows-drop-1: #0000001f; –shadows-drop-2: #00000033; –shadows-drop-3: #00000047; –shadows-drop-4: #0000005c; –shadows-highlight-1: #1b61a6; –shadows-highlight-2: #1487fa; –shadows-danger-1: #8f1919; –shadows-danger-2: #ee3a3a; –shadows-card-border: #ffffff1f; –shadows-card-border-2: #ffffff00; /* Tooltips */ –Tooltips-main: #000000e6; /* Gradual Colors */ –gradual-white-0: #27272800; –gradual-gray-100: #444345; –gradual-gray-0: #44434500; –gradual-dark-20: #ffffff33; /** input */ –fill-input-chat: #363537; /** gradient */ –gradient-bg-mask-gray-0: #1E1E1E00; } `,Lm=`/* CSS Reset */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } ol, ul { list-style: none; } blockquote, q { quotes: none; } blockquote:before, blockquote:after, q:before, q:after { content: ”; content: none; } table { border-collapse: collapse; border-spacing: 0; } img, picture, video, canvas, svg { display: block; max-width: 100%; } input, button, textarea, select { font: inherit; } p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; } a { text-decoration: none; color: inherit; } button { background: none; border: none; cursor: pointer; } `,Mm=` .tooltip-trigger-css { position: relative; } .tooltip-trigger-css::after { content: attr(data-tooltip); display: flex; justify-content: center; align-items: center; max-width: 280px; min-width: 40px; padding: 10px; background: rgba(0, 0, 0, 0.90); border-radius: 12px; color: var(–text-white); font-size: 12px; line-height: 16px; word-wrap: break-word; white-space: pre-wrap; text-align: left; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(-8px); z-index: 10; width:max-content; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out, visibility 0s linear 0.2s; } .tooltip-trigger-css.tooltip-trigger-right-css::after { left: unset; right: 0; transform: translateX(0) translateY(-8px); } .tooltip-trigger-css.tooltip-trigger-right-css:hover::after { left: unset; right: 0; transform: translateX(0) translateY(-8px); } /* 当触发元素被 hover 或 focus 时显示 tooltip */ .tooltip-trigger-css:hover::after, .tooltip-trigger-css:focus::after { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(-10px); /* 轻微向上移动的动画 */ transition-delay: 0s, 0s, 0s; /* 确保立即显示,覆盖 visibility 的延迟 */ } /* 确保非交互元素可聚焦,以便 tooltip 可以通过键盘触发 */ .tooltip-trigger-css:not(button):not(input):not(a[href]) { outline: none; /* 移除默认轮廓,如果需要自定义焦点样式 */ } .tooltip-trigger-css:focus { /* 自定义焦点样式 (可选) */ box-shadow: 0 0 0 2px skyblue; }`,Tm=` ${Km} ${Lm} ${Mm} * { box-sizing: border-box; } p { margin-block-start:0; margin-block-end:0; } #${ul} { font-family: 'SF Pro’, -apple-system, BlinkMacSystemFont, 'Segoe UI’, Roboto, Helvetica, Arial, sans-serif } `;let kn;class Hm extends HTMLElement{constructor(){super(),this.attachShadow({mode:”open”})}connectedCallback(){const e=this.shadowRoot,n=document.createElement(„div”);n.id=ul,e.appendChild(n);const l=document.createElement(„style”);l.textContent=`${Tm} `,n.appendChild(l),kn=new Qm(n),$n.initRoot(n),Ct({eventName:”session_file_view”,extData:{type:”space”}}),Ct({eventName:”manus_space_show”})}disconnectedCallback(){kn==null||kn.destroy()}}class Dm extends HTMLElement{constructor(){super();const e=this.attachShadow({mode:”open”}),n=document.createElement(„div”);n.setAttribute(„class”,”wrapper”),n.innerHTML=` `;const l=document.createElement(„style”);l.textContent=` @keyframes changeWidth { 0% { width: 150px; background-color: transparent; } 100% { width: 574px; background-color: #fff; } }