PageSourceSearch

https://www.dongnealba.com/_next/static/chunks/2279-6374d567898e8761.js

js dongnealba.com collected 2026-09-24 13:24:47 UTC 187,612 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a068ccf4-6326-4bb3-92d9-09ecbe4d17b3",e._sentryDebugIdIdentifier="sentry-dbid-a068ccf4-6326-4bb3-92d9-09ecbe4d17b3")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2279],{519:(e,t,n)=>{e=n.nmd(e);var r=n(74718),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i&&r.process,a=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},2153:(e,t,n)=>{"use strict";n.d(t,{$1:()=>a,LJ:()=>o,wZ:()=>s});var r=n(71041),i=n(87385),o=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&!t.isReset()&&(e.retryOnMount=!1)},s=e=>{r.useEffect(()=>{e.clearReset()},[e])},a=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&void 0===e.data||(0,i.G)(n,[e.error,r]))},3680:(e,t,n)=>{"use strict";n.d(t,{OP:()=>c,bu:()=>a,fS:()=>o,mG:()=>r,mJ:()=>s,pL:()=>u,r:()=>i});var r="-",i="AMP",o="".concat(i,"_unsent"),s="https://api2.amplitude.com/2/httpapi",a="https://api.eu.amplitude.com/2/httpapi",u="https://api2.amplitude.com/batch",c="https://api.eu.amplitude.com/batch"},5617:(e,t,n)=>{"use strict";function r(){let e,t,n=new Promise((n,r)=>{e=n,t=r});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch(()=>{}),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}n.d(t,{T:()=>r})},6132:(e,t,n)=>{"use strict";n.d(t,{_:()=>i});var r=n(93475);function i(e,t){(0,r._)(e,t),t.add(e)}},8360:(e,t,n)=>{e.exports=n(11650)(n(28811),"Promise")},9096:function(e,t){"use strict";var n=this&&this.__spreadArray||function(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.FlatKeys=void 0;var r=function(e){for(var t=[],i=0,o=Object.keys(e);i<o.length;i++){var s=o[i],a=e[s];if("object"==typeof a&&null!==a&&a.constructor===Object)for(var u=r(a),c=0;c<u.length;c++){var l=u[c];t.push(n([s],l,!0))}else t.push([s])}return t};t.FlatKeys=r},9964:(e,t,n)=>{e.exports=n(96979)(Object.keys,Object)},11262:(e,t,n)=>{"use strict";n.d(t,{N9:()=>x,nk:()=>u,oR:()=>S});var r=n(71041),i=n(71623);let o=e=>"number"==typeof e&&!isNaN(e),s=e=>"string"==typeof e||"function"==typeof e?e:null,a=e=>(0,r.isValidElement)(e)||"string"==typeof e||"function"==typeof e||o(e);function u(e){let{enter:t,exit:n,appendPosition:i=!1,collapse:o=!0,collapseDuration:s=300}=e;return function(e){let{children:a,position:u,preventExitTransition:c,done:l,nodeRef:d,isIn:f,playToast:h}=e,p=i?`${t}--${u}`:t,v=i?`${n}--${u}`:n,g=(0,r.useRef)(0);return(0,r.useLayoutEffect)(()=>{let e=d.current,t=p.split(" "),n=r=>{r.target===d.current&&(h(),e.removeEventListener("animationend",n),e.removeEventListener("animationcancel",n),0===g.current&&"animationcancel"!==r.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",n),e.addEventListener("animationcancel",n)},[]),(0,r.useEffect)(()=>{let e=d.current,t=()=>{e.removeEventListener("animationend",t),o?function(e,t,n){void 0===n&&(n=300);let{scrollHeight:r,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)})})}(e,l,s):l()};f||(c?t():(g.current=1,e.className+=` ${v}`,e.addEventListener("animationend",t)))},[f]),r.createElement(r.Fragment,null,a)}}function c(e,t){return null!=e?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}let l=new Map,d=[],f=new Set,h=e=>f.forEach(t=>t(e));function p(e,t){var n;if(t)return!(null==(n=l.get(t))||!n.isToastActive(e));let r=!1;return l.forEach(t=>{t.isToastActive(e)&&(r=!0)}),r}function v(e,t){a(e)&&(l.size>0||d.push({content:e,options:t}),l.forEach(n=>
1{n.buildToast(e,t)}))}function g(e,t){l.forEach(n=>{null!=t&&null!=t&&t.containerId?(null==t?void 0:t.containerId)===n.id&&n.toggle(e,null==t?void 0:t.id):n.toggle(e,null==t?void 0:t.id)})}function y(e){let{delay:t,isRunning:n,closeToast:o,type:s="default",hide:a,className:u,style:c,controlledProgress:l,progress:d,rtl:f,isIn:h,theme:p}=e,v=a||l&&0===d,g={...c,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};l&&(g.transform=`scaleX(${d})`);let y=(0,i.A)("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${p}`,`Toastify__progress-bar--${s}`,{"Toastify__progress-bar--rtl":f}),_="function"==typeof u?u({rtl:f,type:s,defaultClassName:y}):(0,i.A)(y,u);return r.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":v},r.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${p} Toastify__progress-bar--${s}`}),r.createElement("div",{role:"progressbar","aria-hidden":v?"true":"false","aria-label":"notification timer",className:_,style:g,...{[l&&d>=1?"onTransitionEnd":"onAnimationEnd"]:l&&d<1?null:()=>{h&&o()}}}))}let _=1,m=()=>""+_++;function b(e,t){return v(e,t),t.toastId}function w(e,t){var n;return{...t,type:t&&t.type||e,toastId:(n=t)&&("string"==typeof n.toastId||o(n.toastId))?n.toastId:m()}}function E(e){return(t,n)=>b(t,w(e,n))}function S(e,t){return b(e,w("default",t))}S.loading=(e,t)=>
1b(e,w("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),S.promise=function(e,t,n){let r,{pending:i,error:o,success:s}=t;i&&(r="string"==typeof i?S.loading(i,n):S.loading(i.render,{...n,...i}));let a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},u=(e,t,i)=>{if(null==t)return void S.dismiss(r);let o={type:e,...a,...n,data:i},s="string"==typeof t?{render:t}:t;return r?S.update(r,{...o,...s}):S(s.render,{...o,...s}),i},c="function"==typeof e?e():e;return c.then(e=>u("success",s,e)).catch(e=>u("error",o,e)),c},S.success=E("success"),S.info=E("info"),S.error=E("error"),S.warning=E("warning"),S.warn=S.warning,S.dark=(e,t)=>b(e,w("default",{theme:"dark",...t})),S.dismiss=function(e){var t;if(l.size>0){if(null==e||"string"==typeof(t=e)||o(t))l.forEach(t=>{t.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){let t=l.get(e.containerId);t?t.removeToast(e.id):l.forEach(t=>{t.removeToast(e.id)})}}else d=d.filter(t=>null!=e&&t.options.toastId!==e)},S.clearWaitingQueue=function(e){void 0===e&&(e={}),l.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},S.isActive=p,S.update=function(e,t){void 0===t&&(t={});let n=((e,t)=>{var n;let{containerId:r}=t;return null==(n=l.get(r||1))?void 0:n.toasts.get(e)})(e,t);if(n){let{props:r,content:i}=n,o={delay:100,...r,...t,toastId:t.toastId||e,updateId:m()};o.toastId!==e&&(o.staleId=e);let s=o.render||i;delete o.render,b(s,o)}},S.done=e=>{S.update(e,{progress:1})},S.onChange=function(e){return f.add(e),()=>{f.delete(e)}},S.play=e=>g(!0,e),S.pause=e=>g(!1,e);let T="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,I=e=>{let{theme:t,type:n,isLoading:i,...o}=e;return r.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":`var(--toastify-icon-color-${n})`,...o})},k={info:function(e){return r.createElement(I,{...e},r.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return r.createElement(I,{...e},r.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return r.createElement(I,{...e},r.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return r.createElement(I,{...e},r.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return r.createElement("div",{className:"Toastify__spinner"})}},O=e=>{let{isRunning:t,preventExitTransition:n,toastRef:o,eventHandlers:s,playToast:a}=function(e){var t,n;let[i,o]=(0,r.useState)(!1),[s,a]=(0,r.useState)(!1),u=(0,r.useRef)(null),c=(0,r.useRef)({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:d,pauseOnHover:f,closeToast:h,onClick:p,closeOnClick:v}=e;function g(){o(!0)}function y(){o(!1)}function _(t){let n=u.current;c.canDrag&&n&&(c.didMove=!0,i&&y(),c.delta="x"===e.draggableDirection?t.clientX-c.start:t.clientY-c.start,c.start!==t.clientX&&(c.canCloseOnClick=!1),n.style.transform=`translate3d(${"x"===e.draggableDirection?`${c.delta}px, var(--y)`:`0, calc(${c.delta}px + var(--y))`},0)`,n.style.opacity=""+(1-Math.abs(c.delta/c.removalDistance)))}function m(){document.removeEventListener("pointermove",_),document.removeEventListener("pointerup",m);let t=u.current;if(c.canDrag&&c.didMove&&t){if(c.canDrag=!1,Math.abs(c.delta)>c.removalDistance)return a(!0),e.closeToast(),void e.collapseAll();t.style.transition="transform 0.2s, opacity 0.2s",t.style.removeProperty("transform"),t.style.removeProperty("opacity")}}null==(n=l.get((t={id:e.toastId,containerId:e.containerId,fn:o}).containerId||1))||n.setToggle(t.id,t.fn),(0,r.useEffect)(()=>
1{if(e.pauseOnFocusLoss)return document.hasFocus()||y(),window.addEventListener("focus",g),window.addEventListener("blur",y),()=>{window.removeEventListener("focus",g),window.removeEventListener("blur",y)}},[e.pauseOnFocusLoss]);let b={onPointerDown:function(t){if(!0===e.draggable||e.draggable===t.pointerType){c.didMove=!1,document.addEventListener("pointermove",_),document.addEventListener("pointerup",m);let n=u.current;c.canCloseOnClick=!0,c.canDrag=!0,n.style.transition="none","x"===e.draggableDirection?(c.start=t.clientX,c.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(c.start=t.clientY,c.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(t){let{top:n,bottom:r,left:i,right:o}=u.current.getBoundingClientRect();"touchend"!==t.nativeEvent.type&&e.pauseOnHover&&t.clientX>=i&&t.clientX<=o&&t.clientY>=n&&t.clientY<=r?y():g()}};return d&&f&&(b.onMouseEnter=y,e.stacked||(b.onMouseLeave=g)),v&&(b.onClick=e=>{p&&p(e),c.canCloseOnClick&&h()}),{playToast:g,pauseToast:y,isRunning:i,preventExitTransition:s,toastRef:u,eventHandlers:b}}(e),{closeButton:u,children:c,autoClose:d,onClick:f,type:h,hideProgressBar:p,closeToast:v,transition:g,position:_,className:m,style:b,bodyClassName:w,bodyStyle:E,progressClassName:S,progressStyle:T,updateId:I,role:O,progress:P,rtl:A,toastId:C,deleteToast:x,isIn:R,isLoading:N,closeOnClick:j,theme:L}=e,U=(0,i.A)("Toastify__toast",`Toastify__toast-theme--${L}`,`Toastify__toast--${h}`,{"Toastify__toast--rtl":A},{"Toastify__toast--close-on-click":j}),D="function"==typeof m?m({rtl:A,position:_,type:h,defaultClassName:U}):(0,i.A)(U,m),M=function(e){let{theme:t,type:n,isLoading:i,icon:o}=e,s=null,a={theme:t,type:n};return!1===o||("function"==typeof o?s=o({...a,isLoading:i}):(0,r.isValidElement)(o)?s=(0,r.cloneElement)(o,a):i?s=k.spinner():n in k&&(s=k[n](a))),s}(e),q=!!P||!d,F={closeToast:v,type:h,theme:L},$=null;return!1===u||($="function"==typeof u?u(F):(0,r.isValidElement)(u)?(0,r.cloneElement)(u,F):function(e){let{closeToast:t,theme:n,ariaLabel:i="close"}=e;return r.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:e=>{e.stopPropagation(),t(e)},"aria-label":i},r.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},r.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(F)),r.createElement(g,{isIn:R,done:x,position:_,preventExitTransition:n,nodeRef:o,playToast:a},r.createElement("div",{id:C,onClick:f,"data-in":R,className:D,...s,style:b,ref:o},r.createElement("div",{...R&&{role:O},className:"function"==typeof w?w({type:h}):(0,i.A)("Toastify__toast-body",w),style:E},null!=M&&r.createElement("div",{className:(0,i.A)("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!N})},M),r.createElement("div",null,c)),$,r.createElement(y,{...I&&!q?{key:`pb-${I}`}:{},rtl:A,theme:L,delay:d,isRunning:t,isIn:R,closeToast:v,hide:p,type:h,style:T,className:S,controlledProgress:q,progress:P||0})))}
1,P=function(e,t){return void 0===t&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},A=u(P("bounce",!0)),C=(u(P("slide",!0)),u(P("zoom")),u(P("flip")),{position:"top-right",transition:A,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"});function x(e){let t={...C,...e},n=e.stacked,[u,f]=(0,r.useState)(!0),g=(0,r.useRef)(null),{getToastToRender:y,isToastActive:_,count:m}=function(e){let{subscribe:t,getSnapshot:n,setProps:i}=(0,r.useRef)(function(e){let t=e.containerId||1;return{subscribe(n){let i=function(e,t,n){let i=1,u=0,l=[],d=[],f=[],h=t,p=new Map,v=new Set,g=()=>{f=Array.from(p.values()),v.forEach(e=>e())},y=e=>{d=null==e?[]:d.filter(t=>t!==e),g()},_=e=>{let{toastId:t,onOpen:i,updateId:o,children:s}=e.props,a=null==o;e.staleId&&p.delete(e.staleId),p.set(t,e),d=[...d,e.props.toastId].filter(t=>t!==e.staleId),g(),n(c(e,a?"added":"updated")),a&&"function"==typeof i&&i((0,r.isValidElement)(s)&&s.props)};return{id:e,props:h,observe:e=>(v.add(e),()=>v.delete(e)),toggle:(e,t)=>{p.forEach(n=>{null!=t&&t!==n.props.toastId||"function"==typeof n.toggle&&n.toggle(e)})},removeToast:y,toasts:p,clearQueue:()=>{u-=l.length,l=[]},buildToast:(t,d)=>{var f,v;if((t=>{let{containerId:n,toastId:r,updateId:i}=t,o=p.has(r)&&null==i;return(n?n!==e:1!==e)||o})(d))return;let{toastId:m,updateId:b,data:w,staleId:E,delay:S}=d,T=()=>{y(m)},I=null==b;I&&u++;let k={...h,style:h.toastStyle,key:i++,...Object.fromEntries(Object.entries(d).filter(e=>{let[t,n]=e;return null!=n})),toastId:m,updateId:b,data:w,closeToast:T,isIn:!1,className:s(d.className||h.toastClassName),bodyClassName:s(d.bodyClassName||h.bodyClassName),progressClassName:s(d.progressClassName||h.progressClassName),autoClose:!d.isLoading&&(f=d.autoClose,v=h.autoClose,!1===f||o(f)&&f>0?f:v),deleteToast(){let e=p.get(m),{onClose:t,children:i}=e.props;"function"==typeof t&&t((0,r.isValidElement)(i)&&i.props),n(c(e,"removed")),p.delete(m),--u<0&&(u=0),l.length>0?_(l.shift()):g()}};k.closeButton=h.closeButton,!1===d.closeButton||a(d.closeButton)?k.closeButton=d.closeButton:!0===d.closeButton&&(k.closeButton=!a(h.closeButton)||h.closeButton);let O=t;(0,r.isValidElement)(t)&&"string"!=typeof t.type?O=(0,r.cloneElement)(t,{closeToast:T,toastProps:k,data:w}):"function"==typeof t&&(O=t({closeToast:T,toastProps:k,data:w}));let P={content:O,props:k,staleId:E};h.limit&&h.limit>0&&u>h.limit&&I?l.push(P):o(S)?setTimeout(()=>{_(P)},S):_(P)},setProps(e){h=e},setToggle:(e,t)=>{p.get(e).toggle=t},isToastActive:e=>d.some(t=>t===e),getSnapshot:()=>f}}(t,e,h);l.set(t,i);let u=i.observe(n);return d.forEach(e=>v(e.content,e.options)),d=[],()=>{u(),l.delete(t)}},setProps(e){var n;null==(n=l.get(t))||n.setProps(e)},getSnapshot(){var e;return null==(e=l.get(t))?void 0:e.getSnapshot()}}}(e)).current;i(e);let u=(0,r.useSyncExternalStore)(t,n,n);return{getToastToRender:function(t){if(!u)return[];let n=new Map;return e.newestOnTop&&u.reverse(),u.forEach(e=>{let{position:t}=e.props;n.has(t)||n.set(t,[]),n.get(t).push(e)}),Array.from(n,e=>t(e[0],e[1]))},isToastActive:p,count:null==u?void 0:u.length}}(t),{className:b,style:w,rtl:E,containerId:I}=t;function k(){n&&(f(!0),S.play())}return T(()=>{if(n){var e;let n=g.current.querySelectorAll('[data-in="true"]'),r=null==(e=t.position)?void 0:e.includes("top"),i=0,o=0;Array.from(n).reverse().forEach((e,t)=>{e.classList.add("Toastify__toast--stacked"),t>0&&(e.dataset.collapsed=`${u}`),e.dataset.pos||(e.dataset.pos=r?"top":"bot");let n=i*(u?.2:1)+(u?0:12*t);e.style.setProperty("--y",`${r?n:-1*n}px`),e.style.setProperty("--g","12"),e.style.setProperty("--s",""+(1-(u?o:0))),i+=e.offsetHeight,o+=.025})}},[u,m,n]),r.createElement("div",{ref:g,className:"Toastify",id:I,onMouseEnter:()=>{n&&(f(!1),S.pause())},onMouseLeave:k},y((e,t)=>{let o=t.length?{...w}:{...w,pointerEvents:"none"};return r.createElement("div",{className:function(e){let t=(0,i.A)("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":E});return"function"==typeof b?b({position:e,rtl:E,defaultClassName:t}):(0,i.A)(t,s(b))}(e),style:o,key:`container-${e}`},t.map(e=>{let{content:t,props:i}=e;return r.createElement(O,{...i,stacked:n,collapseAll:k,isIn:_(i.toastId,i.containerId),style:i.style,key:`toast-${i.key}`},t)}))}))}}
1,11499:(e,t,n)=>{e.exports=n(11650)(n(28811),"WeakMap")},14658:(e,t,n)=>{"use strict";n.d(t,{X:()=>b,k:()=>w});var r,i,o,s,a,u,c,l,d=n(41292),f=n(88967),h=n(58075),p=n(73238),v=n(6132),g=n(29811),y=n(73334),_=n(64731),m=n(23571),b=(r=new WeakMap,i=new WeakMap,o=new WeakMap,s=new WeakMap,a=new WeakMap,u=new WeakMap,c=new WeakMap,l=new WeakSet,class extends m.k{get meta(){return this.options.meta}get promise(){return(0,d._)(this,a)?.promise}setOptions(e){this.options={...(0,d._)(this,u),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||(0,d._)(this,o).remove(this)}setData(e,t){let n=(0,g.pl)(this.state.data,e,this.options);return(0,p._)(this,l,E).call(this,{data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){(0,p._)(this,l,E).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){let t=(0,d._)(this,a)?.promise;return(0,d._)(this,a)?.cancel(e),t?t.then(g.lQ).catch(g.lQ):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState((0,d._)(this,r))}isActive(){return this.observers.some(e=>!1!==(0,g.Eh)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===g.hT||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data)}isStaleByTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.state.isInvalidated||void 0===this.state.data||!(0,g.j3)(this.state.dataUpdatedAt,e)}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),(0,d._)(this,a)?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),(0,d._)(this,a)?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),(0,d._)(this,o).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||((0,d._)(this,a)&&((0,d._)(this,c)?(0,d._)(this,a).cancel({revert:!0}):(0,d._)(this,a).cancelRetry()),this.scheduleGc()),(0,d._)(this,o).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||(0,p._)(this,l,E).call(this,{type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if((0,d._)(this,a))return(0,d._)(this,a).continueRetry(),(0,d._)(this,a).promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>((0,h._)(this,c,!0),n.signal)})},u=()=>{let e=(0,g.ZM)(this.options,t),n={client:(0,d._)(this,s),queryKey:this.queryKey,meta:this.meta};return(r(n),(0,h._)(this,c,!1),this.options.persister)?this.options.persister(e,n,this):e(n)},f={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:(0,d._)(this,s),state:this.state,fetchFn:u};r(f),this.options.behavior?.onFetch(f,this),(0,h._)(this,i,this.state),("idle"===this.state.fetchStatus||this.state.fetchMeta!==f.fetchOptions?.meta)&&(0,p._)(this,l,E).call(this,{type:"fetch",meta:f.fetchOptions?.meta});let v=e=>{(0,_.wm)(e)&&e.silent||(0,p._)(this,l,E).call(this,{type:"error",error:e}),(0,_.wm)(e)||((0,d._)(this,o).config.onError?.(e,this),(0,d._)(this,o).config.onSettled?.(this.state.data,e,this)),this.scheduleGc()};return(0,h._)(this,a,(0,_.II)({initialPromise:t?.initialPromise,fn:f.fetchFn,abort:n.abort.bind(n),onSuccess:e=>{if(void 0===e)return void v(Error(`${this.queryHash} data is undefined`));try{this.setData(e)}catch(e){v(e);return}(0,d._)(this,o).config.onSuccess?.(e,this),(0,d._)(this,o).config.onSettled?.(e,this.state.error,this),this.scheduleGc()},onError:v,onFail:(e,t)=>
1{(0,p._)(this,l,E).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{(0,p._)(this,l,E).call(this,{type:"pause"})},onContinue:()=>{(0,p._)(this,l,E).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0})),(0,d._)(this,a).start()}constructor(e){super(),(0,v._)(this,l),(0,f._)(this,r,{writable:!0,value:void 0}),(0,f._)(this,i,{writable:!0,value:void 0}),(0,f._)(this,o,{writable:!0,value:void 0}),(0,f._)(this,s,{writable:!0,value:void 0}),(0,f._)(this,a,{writable:!0,value:void 0}),(0,f._)(this,u,{writable:!0,value:void 0}),(0,f._)(this,c,{writable:!0,value:void 0}),(0,h._)(this,c,!1),(0,h._)(this,u,e.defaultOptions),this.setOptions(e.options),this.observers=[],(0,h._)(this,s,e.client),(0,h._)(this,o,(0,d._)(this,s).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,(0,h._)(this,r,function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}(this.options)),this.state=e.state??(0,d._)(this,r),this.scheduleGc()}});function w(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,_.v_)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function E(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...w(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let n=e.error;if((0,_.wm)(n)&&n.revert&&(0,d._)(this,i))return{...(0,d._)(this,i),fetchStatus:"idle"};return{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),y.j.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),(0,d._)(this,o).notify({query:this,type:"updated",action:e})})}},15408:(e,t,n)=>{"use strict";var r=n(92417),i=n(9096),o=function(){throw Error("Airbridge can not be runned on server side")},s={init:o,get isSDKEnabled(){return window.airbridge.isSDKEnabled},startTracking:o,stopTracking:o,fetchResource:o,openBanner:o,setBanner:o,setDownloads:o,setDeeplinks:o,openDeeplink:o,sendWeb:o,createTouchpoint:o,setUserID:o,clearUserID:o,setUserEmail:o,clearUserEmail:o,setUserPhone:o,clearUserPhone:o,setUserAttribute:o,removeUserAttribute:o,clearUserAttributes:o,setUserAlias:o,removeUserAlias:o,clearUserAlias:o,clearUser:o,setUserId:o,setUserAttributes:o,setDeviceAlias:o,removeDeviceAlias:o,clearDeviceAlias:o,createTrackingLink:o,events:{send:o,signIn:o,signUp:o,signOut:o,purchased:o,addedToCart:o,productDetailsViewEvent:o,homeViewEvent:o,productListViewEvent:o,searchResultViewEvent:o,wait:o}};"undefined"!=typeof window&&function(){(0,r.default)();for(var e=(0,i.FlatKeys)(s),t=function(e){var t=e.pop();if(!t||"isSDKEnabled"===t)return"continue";e.reduce(function(e,t){return e[t]},s)[t]=function(){var n=e.reduce(function(e,t){return e[t]},window.airbridge);n[t].apply(n,arguments)}},n=0;n<e.length;n++)t(e[n])}(),t.A=s},16040:(e,t,n)=>{"use strict";n.d(t,{t:()=>d});var r,i,o,s=n(41292),a=n(88967),u=n(58075),c=n(72371),l=n(29811),d=new(r=new WeakMap,i=new WeakMap,o=new WeakMap,class extends c.Q{onSubscribe(){(0,s._)(this,i)||this.setEventListener((0,s._)(this,o))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=(0,s._)(this,i))||e.call(this),(0,u._)(this,i,void 0))}setEventListener(e){var t;(0,u._)(this,o,e),null==(t=(0,s._)(this,i))||t.call(this),(0,u._)(this,i,e(this.setOnline.bind(this)))}setOnline(e){(0,s._)(this,r)!==e&&((0,u._)(this,r,e),this.listeners.forEac
1h(t=>{t(e)}))}isOnline(){return(0,s._)(this,r)}constructor(){super(),(0,a._)(this,r,{writable:!0,value:void 0}),(0,a._)(this,i,{writable:!0,value:void 0}),(0,a._)(this,o,{writable:!0,value:void 0}),(0,u._)(this,r,!0),(0,u._)(this,o,e=>{if(!l.S$&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}})}})},16450:(e,t,n)=>{var r=n(64162),i=n(50482),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable;e.exports=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")}},18298:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}},20815:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},23571:(e,t,n)=>{"use strict";n.d(t,{k:()=>u});var r,i=n(41292),o=n(88967),s=n(58075),a=n(29811),u=(r=new WeakMap,class{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,a.gn)(this.gcTime)&&(0,s._)(this,r,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(a.S$?1/0:3e5))}clearGcTimeout(){(0,i._)(this,r)&&(clearTimeout((0,i._)(this,r)),(0,s._)(this,r,void 0))}constructor(){(0,o._)(this,r,{writable:!0,value:void 0})}})},26697:(e,t,n)=>{"use strict";n.d(t,{T:()=>a});var r,i=n(82643),o=n(3680),s=n(27067),a=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return(0,i.__assign)({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(r.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(r.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(r.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(r.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(r.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(r.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(r.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(r.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(r.UNSET,e,o.mG),this},e.prototype.clearAll=function(){return this._properties={},this._properties[r.CLEAR_ALL]=o.mG,this},e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var r=this._properties[e];return void 0===r&&(r={},this._properties[e]=r),r[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return!(void 0!==this._properties[r.CLEAR_ALL]||this._propertySet.has(t))&&(e===r.ADD?"number"==typeof n:e===r.UNSET||e===r.REMOVE||(0,s.E)(t,n))},e}();!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(r||(r={}))},27067:(e,t,n)=>{"use strict";n.d(t,{E:()=>o,a:()=>i});var r=n(82643),i=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var n=e[t];if(!o(t,n))return!1}return!0},o=function(e,t){var n,o;if("string"!=typeof e)return!1;if(Array.isArray(t)){var s=!0;try{for(var a=(0,r.__values)(t),u=a.next();!u.done;u=a.next()){var c=u.value;if(Array.isArray(c))return!1;if("object"==typeof c)s=s&&i(c);else if(!["number","string"].includes(typeof c))return!1;if(!s)return!1}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}}else if(null==t)return!1;else if("object"==typeof t)return i(t);else if(!["number","string","boolean"].includes(typeof t))return!1;return!0}},29811:(e,t,n)=>{"use strict";n.d(t,{BH:()=>v,Cp:()=>p,EN:()=>h,Eh:()=>c,F$:()=>f,MK:()=>l,S$:()=>r,ZM:()=>I,ZZ:()=>S,Zw:()=>o,d2:()=>u,f8:()=>g,gn:()=>s,hT:()=>T,j3:()=>a,lQ:()=>i,nJ:()=>d,pl:()=>w,y9:()=>E,yy:()=>b});var r="Deno"in globalThis;function i(){}function o(e,t){return"function"==typeof e?e(t):e}function s(e){return"number"==typeof e&&e>=0&&e!==1/0}function a(e,t){return Math.max(e+(t||0)-Date.now(),0)}function u(e,t){return"function"==typeof e?e(t):e}function c(e,t){return"function"==typeof e?e(t):e}function l(e,t){let{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==f(s,t.options))return!1}else if(!p(t.queryKey,s))return!1}if("all"!==n){let e=t.isActive();if("active"===n&&!e||"inactive"===n&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&(!i||i===t.state.fetchStatus)&&(!o||!!o(t))}function d(e,t){let{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(h(t.options.mutationKey)!==h(o))return!1}else if(!p(t.options.mutationKey,o))return!1}return(!r||t.state.status===r)&&(!i||!!i(t))}function f(e,t){return(t?.queryKeyHashFn||h)(e)}function h(e){return JSON.stringify(e,(e,t)=>_(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function p(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(n=>!p(e[n],t[n]))}function v(e,t){if(e===t)return e;let n=y(e)&&y(t);if(n||_(e)&&_(t)){let r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),s=o.length,a=n?[]:{},u=0;for(let i=0;i<s;i++){let s=n?i:o[i];(!n&&r.includes(s)||n)&&void 0===e[s]&&void 0===t[s]?(a[s]=void 0,u++):(a[s]=v(e[s],t[s]),a[s]===e[s]&&void 0!==e[s]&&u++)}return i===s&&u===i?e:a}return t}function g(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function y(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function _(e){if(!m(e))return!1;let t=e.constructor;if(void 0===t)return!0;let n=t.prototype;return!!m(n)&&!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function m(e){return"[object Object]"===Object.prototype.toString.call(e)}function b(e){return new Promise(t=>{setTimeout(t,e)})}function w(e,t,n){return"function"==typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?v(e,t):t}function E(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=[...e,t];return n&&r.length>n?r.slice(1):r}function S(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var T=Symbol();function I(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==T?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}},36142:(e,t,n)=>{"use strict";n.d(t,{Ht:()=>a,jE:()=>s});var r=n(71041),i=n(74429),o=r.createContext(void 0),s=e=>{let t=r.useContext(o);if(e)return e;if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},a=({client:e,children:t})=>(r.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,i.jsx)(o.Provider,{value:e,children:t}))}
1,36989:(e,t,n)=>{"use strict";n.d(t,{NT:()=>f,i7:()=>d,q6:()=>l});var r=n(71041),i=n(97464);n(2272);let o=Symbol(),s=Symbol(),a="undefined"==typeof window||/ServerSideRendering/.test(window.navigator&&window.navigator.userAgent)?r.useEffect:r.useLayoutEffect,u=i.unstable_runWithPriority?e=>{try{(0,i.unstable_runWithPriority)(i.unstable_NormalPriority,e)}catch(t){if("Not implemented."===t.message)e();else throw t}}:e=>e(),c=e=>e;function l(e){var t;let n=(0,r.createContext)({[o]:{v:{current:e},n:{current:-1},l:new Set,u:e=>e()}});return n[s]=n.Provider,t=n.Provider,n.Provider=({value:e,children:n})=>{let i=(0,r.useRef)(e),s=(0,r.useRef)(0),[c,l]=(0,r.useState)(null);c&&(c(e),l(null));let d=(0,r.useRef)();if(!d.current){let e=new Set;d.current={[o]:{v:i,n:s,l:e,u:(t,n)=>{s.current+=1;let r={n:s.current};(null==n?void 0:n.suspense)&&(r.n*=-1,r.p=new Promise(e=>{l(()=>t=>{r.v=t,delete r.p,e(t)})})),e.forEach(e=>e(r)),t()}}}}return a(()=>{i.current=e,s.current+=1,u(()=>{d.current[o].l.forEach(t=>{t({n:s.current,v:e})})})},[e]),(0,r.createElement)(t,{value:d.current},n)},delete n.Consumer,n}function d(e,t){let{v:{current:n},n:{current:i},l:s}=(0,r.useContext)(e)[o],u=t(n),[c,l]=(0,r.useReducer)((e,r)=>{if(!r)return[n,u];if("p"in r)throw r.p;if(r.n===i)return Object.is(e[1],u)?e:[n,u];try{if("v"in r){if(Object.is(e[0],r.v))return e;let n=t(r.v);if(Object.is(e[1],n))return e;return[r.v,n]}}catch(e){}return[...e]},[n,u]);return Object.is(c[1],u)||l(),a(()=>(s.add(l),()=>{s.delete(l)}),[s]),c[1]}function f(e){return d(e,c)}}
1,38688:(e,t,n)=>{e=n.nmd(e);var r=n(28811),i=n(48285),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?r.Buffer:void 0,u=a?a.isBuffer:void 0;e.exports=u||i},38909:(e,t,n)=>{"use strict";n.d(t,{I:()=>o});var r=n(88052),i=n(40454);function o(e,t){return(0,i.t)(e,r.$,t)}},40454:(e,t,n)=>{"use strict";n.d(t,{t:()=>f});var r=n(71041),i=n(73334),o=n(29811),s=n(36142),a=n(85971),u=n(2153),c=n(85633),l=n(97536),d=n(87385);function f(e,t,n){let f=(0,s.jE)(n),h=(0,c.w)(),p=(0,a.h)(),v=f.defaultQueryOptions(e);f.getDefaultOptions().queries?._experimental_beforeQuery?.(v),v._optimisticResults=h?"isRestoring":"optimistic",(0,l.jv)(v),(0,u.LJ)(v,p),(0,u.wZ)(p);let g=!f.getQueryCache().get(v.queryHash),[y]=r.useState(()=>new t(f,v)),_=y.getOptimisticResult(v),m=!h&&!1!==e.subscribed;if(r.useSyncExternalStore(r.useCallback(e=>{let t=m?y.subscribe(i.j.batchCalls(e)):d.l;return y.updateResult(),t},[y,m]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),r.useEffect(()=>{y.setOptions(v,{listeners:!1})},[v,y]),(0,l.EU)(v,_))throw(0,l.iL)(v,y,p);if((0,u.$1)({result:_,errorResetBoundary:p,throwOnError:v.throwOnError,query:f.getQueryCache().get(v.queryHash),suspense:v.suspense}))throw _.error;if(f.getDefaultOptions().queries?._experimental_afterQuery?.(v,_),v.experimental_prefetchInRender&&!o.S$&&(0,l.nE)(_,h)){let e=g?(0,l.iL)(v,y,p):f.getQueryCache().get(v.queryHash)?.promise;e?.catch(d.l).finally(()=>{y.updateResult()})}return v.notifyOnChangeProps?_:y.trackResult(_)}},41292:(e,t,n)=>{"use strict";n.d(t,{_:()=>i});var r=n(89054);function i(e,t){var n=(0,r._)(e,t,"get");return n.get?n.get.call(e):n.value}},48285:e=>{e.exports=function(){return!1}},48842:(e,t,n)=>{var r=n(20815),i=n(9964),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},52719:(e,t,n)=>{var r=n(77882),i=n(18298),o=n(50482),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[r(e)]}},52783:(e,t,n)=>{var r=n(52719),i=n(63213),o=n(519),s=o&&o.isTypedArray;e.exports=s?i(s):r},58075:(e,t,n)=>{"use strict";n.d(t,{_:()=>i});var r=n(89054);function i(e,t,n){var i=(0,r._)(e,t,"set");if(i.set)i.set.call(e,n);else{if(!i.writable)throw TypeError("attempted to set read only private field");i.value=n}return n}},59156:(e,t,n)=>{var r=n(96230),i=n(18298);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},62735:(e,t)=>{"use strict";function n(e,t){var n=e.length;for(e.push(t);0<n;){var r=n-1>>>1,i=e[r];if(0<o(i,t))e[r]=t,e[n]=i,n=r;else break}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;for(var r=0,i=e.length,s=i>>>1;r<s;){var a=2*(r+1)-1,u=e[a],c=a+1,l=e[c];if(0>o(u,n))c<i&&0>o(l,u)?(e[r]=l,e[c]=n,r=c):(e[r]=u,e[a]=n,r=a);else if(c<i&&0>o(l,n))e[r]=l,e[c]=n,r=c;else break}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var s,a=performance;t.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();t.unstable_now=function(){return u.now()-c}}var l=[],d=[],f=1,h=null,p=3,v=!1,g=!1,y=!1,_="function"==typeof setTimeout?setTimeout:null,m="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(d);null!==t;){if(null===t.callback)i(d);else if(t.startTime<=e)i(d),t.sortIndex=t.expirationTime,n(l,t);else break;t=r(d)}}function E(e){if(y=!1,w(e),!g)if(null!==r(l))g=!0,N(S);else{var t=r(d);null!==t&&j(E,t.startTime-e)}}function S(e,n){g=!1,y&&(y=!1,m(k),k=-1),v=!0;var o=p;try{for(w(n),h=r(l);null!==h&&(!(h.expirationTime>n)||e&&!A());){var s=h.callback;if("function"==typeof s){h.callback=null,p=h.priorityLevel;var a=s(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof a?h.callback=a:h===r(l)&&i(l),w(n)}else i(l);h=r(l)}if(null!==h)var u=!0;else{var c=r(d);null!==c&&j(E,c.startTime-n),u=!1}return u}finally{h=null,p=o,v=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var T=!1,I=null,k=-1,O=5,P=-1;function A(){return!(t.unstable_now()-P<O)}function C(){if(null!==I){var e=t.unstable_now();P=e;var n=!0;try{n=I(!0,e)}finally{n?s():(T=!1,I=null)}}else T=!1}if("function"==typeof b)s=function(){b(C)};else if("undefined"!=typeof MessageChannel){var x=new MessageChannel,R=x.port2;x.port1.onmessage=C,s=function(){R.postMessage(null)}}else s=function(){_(C,0)};function N(e){I=e,T||(T=!0,s())}function j(e,n){k=_(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||v||(g=!0,N(S))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,i,o){var s=t.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?s+o:s,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=0x3fffffff;break;case 4:a=1e4;break;default:a=5e3}return a=o+a,e={id:f++,callback:i,priorityLevel:e,startTime:o,expirationTime:a,sortIndex:-1},o>s?(e.sortIndex=o,n(d,e),null===r(l)&&e===r(d)&&(y?(m(k),k=-1):y=!0,j(E,o-s))):(e.sortIndex=a,n(l,e),g||v||(g=!0,N(S))),e},t.unstable_shouldYield=A,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},63213:e=>{e.exports=function(e){return function(t){return e(t)}}},63837:(e,t,n)=>{"use strict";n.d(t,{m:()=>d});var r,i,o,s=n(41292),a=n(88967),u=n(58075),c=n(72371),l=n(29811),d=new(r=ne
1w WeakMap,i=new WeakMap,o=new WeakMap,class extends c.Q{onSubscribe(){(0,s._)(this,i)||this.setEventListener((0,s._)(this,o))}onUnsubscribe(){var e;this.hasListeners()||(null==(e=(0,s._)(this,i))||e.call(this),(0,u._)(this,i,void 0))}setEventListener(e){var t;(0,u._)(this,o,e),null==(t=(0,s._)(this,i))||t.call(this),(0,u._)(this,i,e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){(0,s._)(this,r)!==e&&((0,u._)(this,r,e),this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof(0,s._)(this,r)?(0,s._)(this,r):globalThis.document?.visibilityState!=="hidden"}constructor(){super(),(0,a._)(this,r,{writable:!0,value:void 0}),(0,a._)(this,i,{writable:!0,value:void 0}),(0,a._)(this,o,{writable:!0,value:void 0}),(0,u._)(this,o,e=>{if(!l.S$&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}})},64162:(e,t,n)=>{var r=n(77882),i=n(50482);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},64731:(e,t,n)=>{"use strict";n.d(t,{II:()=>d,v_:()=>u,wm:()=>l});var r=n(63837),i=n(16040),o=n(5617),s=n(29811);function a(e){return Math.min(1e3*2**e,3e4)}function u(e){return(e??"online")!=="online"||i.t.isOnline()}var c=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function l(e){return e instanceof c}function d(e){let t,n=!1,l=0,d=!1,f=(0,o.T)(),h=()=>r.m.isFocused()&&("always"===e.networkMode||i.t.isOnline())&&e.canRun(),p=()=>u(e.networkMode)&&e.canRun(),v=n=>{d||(d=!0,e.onSuccess?.(n),t?.(),f.resolve(n))},g=n=>{d||(d=!0,e.onError?.(n),t?.(),f.reject(n))},y=()=>new Promise(n=>{t=e=>{(d||h())&&n(e)},e.onPause?.()}).then(()=>{t=void 0,d||e.onContinue?.()}),_=()=>{let t;if(d)return;let r=0===l?e.initialPromise:void 0;try{t=r??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(v).catch(t=>{if(d)return;let r=e.retry??3*!s.S$,i=e.retryDelay??a,o="function"==typeof i?i(l,t):i,u=!0===r||"number"==typeof r&&l<r||"function"==typeof r&&r(l,t);if(n||!u)return void g(t);l++,e.onFail?.(l,t),(0,s.yy)(o).then(()=>h()?void 0:y()).then(()=>{n?g(t):_()})})};return{promise:f,cancel:t=>{d||(g(new c(t)),e.abort?.())},continue:()=>(t?.(),f),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:p,start:()=>(p()?_():y().then(_),f)}}},71623:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=function e(t){var n,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(n=0;n<o;n++)t[n]&&(r=e(t[n]))&&(i&&(i+=" "),i+=r)}else for(r in t)t[r]&&(i&&(i+=" "),i+=r);return i}(e))&&(r&&(r+=" "),r+=t);return r}},72371:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r});var r=class{subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}}},73238:(e,t,n)=>{"use strict";function r(e,t,n){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return n}n.d(t,{_:()=>r})},73334:(e,t,n)=>{"use strict";n.d(t,{j:()=>r});var r=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=e=>setTimeout(e,0),o=r=>{t?e.push(r):i(()=>{n(r)})};return{batch:o=>{let s;t++;try{s=o()}finally{--t||(()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})})()}return s},batchCalls:e=>function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];o(()=>{e(...n)})},schedule:o,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}()},82643:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__addDisposableResource:()=>L,__assign:()=>o,__asyncDelegator:()=>I,__asyncGenerator:()=>T,__asyncValues:()=>k,__await:()=>S,__awaiter:()=>p,__classPrivateFieldGet:()=>R,__classPrivateFieldIn:()=>j,__classPrivateFieldSet:()=>N,__createBinding:()=>g,__decorate:()=>a,__disposeResources:()=>D,__esDecorate:()=>c,__exportStar:()=>y,__extends:()=>i,__generator:()=>v,__importDefault:()=>x,__importStar:()=>
1C,__makeTemplateObject:()=>O,__metadata:()=>h,__param:()=>u,__propKey:()=>d,__read:()=>m,__rest:()=>s,__rewriteRelativeImportExtension:()=>M,__runInitializers:()=>l,__setFunctionName:()=>f,__spread:()=>b,__spreadArray:()=>E,__spreadArrays:()=>w,__values:()=>_,default:()=>q});var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function a(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t,n,r,i,o){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var a,u=r.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?r.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),f=!1,h=n.length-1;h>=0;h--){var p={};for(var v in r)p[v]="access"===v?{}:r[v];for(var v in r.access)p.access[v]=r.access[v];p.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(s(e||null))};var g=(0,n[h])("accessor"===u?{get:d.get,set:d.set}:d[c],p);if("accessor"===u){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw TypeError("Object expected");(a=s(g.get))&&(d.get=a),(a=s(g.set))&&(d.set=a),(a=s(g.init))&&i.unshift(a)}else(a=s(g))&&("field"===u?i.unshift(a):d[c]=a)}l&&Object.defineProperty(l,r.name,d),f=!0}function l(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function p(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})}function v(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){var c=[a,u];if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=t.call(e,o)}catch(e){c=[6,e],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var g=Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);
1(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function y(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||g(t,e,n)}function _(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function b(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function w(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}function E(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function S(e){return this instanceof S?(this.v=e,this):new S(e)}function T(e,t,n){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",function(e){return function(t){return Promise.resolve(t).then(e,c)}}),r[Symbol.asyncIterator]=function(){return this},r;function s(e,t){i[e]&&(r[e]=function(t){return new Promise(function(n,r){o.push([e,t,n,r])>1||a(e,t)})},t&&(r[e]=t(r[e])))}function a(e,t){try{var n;(n=i[e](t)).value instanceof S?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function I(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:S(e[r](t)),done:!1}:i?i(t):t}:i}}function k(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=_(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){var o,s,a;o=r,s=i,a=(t=e[n](t)).done,Promise.resolve(t.value).then(function(e){o({value:e,done:a})},s)})}}}function O(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var P=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},A=function(e){return(A=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t})(e)};function C(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=A(e),r=0;r<n.length;r++)"default"!==n[r]&&g(t,e,n[r]);return P(t,e),t}function x(e){return e&&e.__esModule?e:{default:e}}function R(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function N(e,t,n,r,i){if("m"===r)throw TypeError("Private method is not writable");if("a"===r&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function j(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function L(e,t,n){if(null!=t){var r,i;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");
1if(n){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(i=r)}if("function"!=typeof r)throw TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var U="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function D(e){function t(t){e.error=e.hasError?new U(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function i(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(i);if(n.dispose){var o=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(o).then(i,function(e){return t(e),i()})}else r|=1}catch(e){t(e)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function M(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,n,r,i,o){return n?t?".jsx":".js":!r||i&&o?r+i+"."+o.toLowerCase()+"js":e}):e}let q={__extends:i,__assign:o,__rest:s,__decorate:a,__param:u,__esDecorate:c,__runInitializers:l,__propKey:d,__setFunctionName:f,__metadata:h,__awaiter:p,__generator:v,__createBinding:g,__exportStar:y,__values:_,__read:m,__spread:b,__spreadArrays:w,__spreadArray:E,__await:S,__asyncGenerator:T,__asyncDelegator:I,__asyncValues:k,__makeTemplateOb
1ject:O,__importStar:C,__importDefault:x,__classPrivateFieldGet:R,__classPrivateFieldSet:N,__classPrivateFieldIn:j,__addDisposableResource:L,__disposeResources:D,__rewriteRelativeImportExtension:M}},82757:(e,t,n)=>{"use strict";n.d(t,{Q:()=>rw});var r,i,o,s,a,u,c,l,d,f,h,p,v,g=n(82643);!function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"}(r||(r={}));var y=function(e){return function(){var t=(0,g.__assign)({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},_=function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=(0,g.__values)(t.split(".")),o=i.next();!o.done;o=i.next()){var s=o.value;if(!(s in e))return;e=e[s]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},m=function(e,t){return function(){var n,r,i={};try{for(var o=(0,g.__values)(t),s=o.next();!s.done;s=o.next()){var a=s.value;i[a]=_(e,a)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}},b=function(e,t,n,i,o){return void 0===o&&(o=null),function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var u=n(),c=u.logger,l=u.logLevel;if(l&&l<r.Debug||!l||!c)return e.apply(o,s);var d={type:"invoke public method",name:t,args:s,stacktrace:(Error().stack||"").split("\n").slice(3).map(function(e){return e.trim()}),time:{start:new Date().toISOString()},states:{}};i&&d.states&&(d.states.before=i());var f=e.apply(o,s);return f&&f.promise?f.promise.then(function(){i&&d.states&&(d.states.after=i()),d.time&&(d.time.end=new Date().toISOString()),c.debug(JSON.stringify(d,null,2))}):(i&&d.states&&(d.states.after=i()),d.time&&(d.time.end=new Date().toISOString()),c.debug(JSON.stringify(d,null,2))),f}},w=function(e){return{promise:e||Promise.resolve()}},E=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==n.g?n.g:void 0},S=function(){var e,t=E();return(null==(e=null==t?void 0:t.location)?void 0:e.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce(function(e,t){var n=t.split("=",2),r=T(n[0]),i=T(n[1]);return i&&(e[r]=i),e},{}):{}},T=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},I=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:k(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),k=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},O=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(t){e(t)}),this.queue=[])},e}(),P=function(){return(P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function A(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function C(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}"function"==typeof SuppressedError&&SuppressedError;var x=function(e,t){var n,r,i=typeof e;if(i!==typeof t)return!1;try{for(var o=A(["string","number","boolean","undefined"]),s=o.next();!s.done;s=o.next())if(s.value===i)return e===t}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}if(null==e&&null==t)return!0;
1if(null==e||null==t||e.length!==t.length)return!1;var a=Array.isArray(e),u=Array.isArray(t);if(a!==u)return!1;if(a&&u){for(var c=0;c<e.length;c++)if(!x(e[c],t[c]))return!1}else{if(!x(Object.keys(e).sort(),Object.keys(t).sort()))return!1;var l=!0;return Object.keys(e).forEach(function(n){x(e[n],t[n])||(l=!1)}),l}return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var R=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=P({},this.identity.userProperties),n=P(P({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},setOptOut:function(e){return n.optOut=e,this},updateUserProperties:function(e){var t,r,i,o,s,a,u=n.userProperties||{};try{for(var c=A(Object.entries(e)),l=c.next();!l.done;l=c.next()){var d=C(l.value,2),f=d[0],h=d[1];switch(f){case"$set":try{for(var p=(i=void 0,A(Object.entries(h))),v=p.next();!v.done;v=p.next()){var g=C(v.value,2),y=g[0],_=g[1];u[y]=_}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}break;case"$unset":try{for(var m=(s=void 0,A(Object.keys(h))),b=m.next();!b.done;b=m.next()){var y=b.value;delete u[y]}}catch(e){s={error:e}}finally{try{b&&!b.done&&(a=m.return)&&a.call(m)}finally{if(s)throw s.error}}break;case"$clearAll":u={}}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(t)throw t.error}}return n.userProperties=u,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return P({},this.identity)},e.prototype.setIdentity=function(e){var t=P({},this.identity);this.identity=P({},e),x(t,this.identity)||this.listeners.forEach(function(t){t(e)})},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),N="undefined"!=typeof globalThis?globalThis:void 0!==n.g?n.g:self,j=function(){function e(){this.identityStore=new R,this.eventBridge=new O,this.applicationContextProvider=new I}return e.getInstance=function(t){return N.analyticsConnectorInstances||(N.analyticsConnectorInstances={}),N.analyticsConnectorInstances[t]||(N.analyticsConnectorInstances[t]=new e),N.analyticsConnectorInstances[t]},e}(),L=function(e){return void 0===e&&(e="$default_instance"),j.getInstance(e)},U=function(e,t){L(t).identityStore.editIdentity().setUserId(e).commit()},D=function(e,t){L(t).identityStore.editIdentity().setDeviceId(e).commit()};!function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(i||(i={}));var M=n(3680),q=function(e,t){var n=Math.max(t,1);return e.reduce(function(e,t,r){var i=Math.floor(r/n);return e[i]||(e[i]=[]),e[i].push(t),e},[])},F=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=i.Unknown),{event:e,code:t,message:n}},$="Amplitude Logger ",V=function(){function e(){this.logLevel=r.None}return e.prototype.disable=function(){this.logLevel=r.None},e.prototype.enable=function(e){void 0===e&&(e=r.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<r.Verbose||console.log("".concat($,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<r.Warn||console.warn("".concat($,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<r.Error||console.error("".concat($,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<r.Debug||console.log("".concat($,"[Debug]: ").concat(e.join(" ")))},e}(),W=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:"$default_instance",logLevel:r.Warn,loggerProvider:new V,offline:!1,optOut:!1,serverUrl:M.mJ,serverZone:"US",useBatch:!1}},K=function(){function e(e){this._optOut=!1;var t,n,r,i,o=W();this.apiKey=e.apiKey,this.flushIntervalMillis=null!=(t=e.flushIntervalMillis)?t:o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.instanceName=e.instanceName||o.instanceName,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!=(n=e.logLevel)?n:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:o.offline,this.optOut=null!=(r=e.optOut)?r:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!=(i=e.useBatch)?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var s=B(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=s.serverZone,this.serverUrl=s.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e}
1,enumerable:!1,configurable:!0}),e}(),B=function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=W().serverZone),void 0===n&&(n=W().useBatch),e)return{serverUrl:e,serverZone:void 0};var r,i=["US","EU"].includes(t)?t:W().serverZone;return{serverZone:i,serverUrl:(r=n,"EU"===i?r?M.OP:M.bu:r?M.pL:M.mJ)}},z=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}(),Q=function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,Q)};function H(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var G=function(){function e(){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduleId=null,this.scheduledTimeout=0,this.flushId=null,this.queue=[]}return e.prototype.setup=function(e){var t;return(0,g.__awaiter)(this,void 0,void 0,function(){var n,r=this;return(0,g.__generator)(this,function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(M.fS,"_").concat(this.config.apiKey.substring(0,10)),[4,null==(t=this.config.storageProvider)?void 0:t.get(this.storageKey)];case 1:return(n=i.sent())&&n.length>0&&Promise.all(n.map(function(e){return r.execute(e)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(e){var t=this;return e.insert_id||(e.insert_id=Q()),new Promise(function(n){t.queue.push({event:e,attempts:0,callback:function(e){return n(e)},timeout:0}),t.schedule(t.config.flushIntervalMillis),t.saveEvents()})},e.prototype.removeEventsExceedFlushMaxRetries=function(e){var t=this;return e.filter(function(e){return e.attempts+=1,e.attempts<t.config.flushMaxRetries||(t.fulfillRequest([e],500,"Event rejected due to exceeded retry count"),!1)})},e.prototype.scheduleEvents=function(e){var t=this;e.forEach(function(e){t.schedule(0===e.timeout?t.config.flushIntervalMillis:e.timeout)})},e.prototype.schedule=function(e){var t=this;if(!this.config.offline&&(null===this.scheduleId||this.scheduleId&&e>this.scheduledTimeout)){this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=e,this.scheduleId=setTimeout(function(){t.queue=t.queue.map(function(e){return e.timeout=0,e}),t.flush(!0)},e);return}},e.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},e.prototype.flush=function(e){return void 0===e&&(e=!1),(0,g.__awaiter)(this,void 0,void 0,function(){var t,n,r=this;return(0,g.__generator)(this,function(i){switch(i.label){case 0:if(this.config.offline)return this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush while offline."),[2];if(this.flushId)return this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush because previous flush has not resolved."),[2];return this.flushId=this.scheduleId,this.resetSchedule(),t=[],n=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):n.push(e)}),[4,q(t,this.config.flushQueueSize).reduce(function(t,n){return(0,g.__awaiter)(r,void 0,void 0,function(){return(0,g.__generator)(this,function(r){switch(r.label){case 0:return[4,t];case 1:return r.sent(),[4,this.send(n,e)];case 2:return[2,r.sent()]}})})},Promise.resolve())];case 1:return i.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}})})},e.prototype.send=function(e,t){return void 0===t&&(t=!0),(0,g.__awaiter)(this,void 0,void 0,function(){var n,r,o,s;return(0,g.__generator)(this,function(a){switch(a.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,"Event rejected due to missing API key")];n={api_key:this.config.apiKey,events:e.map(function(e){var t=e.event;return t.extra,(0,g.__rest)(t,["extra"])}),options:{min_id_length:this.config.minIdLength},client_upload_time:new Date().toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new z,a.label=1;case 1:return a.trys.push([1,3,,4]),r=B(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(r,n)];case 2:if(null===(o=a.sent()))return this.fulfillRequest(e,0,"Unexpected error occurred"),[2];if(!t)return"body"in o?this.fulfillRequest(e,o.statusCode,"".concat(o.status,": ").concat(H(o))):this.fulfillRequest(e,o.statusCode,o.status),[2];return this.handleResponse(o,e),[3,4];case 3:var u;return s=(u=a.sent())instanceof Error?u.message:String(u),this.config.loggerProvider.error(s),this.handleResponse({status:i.Failed,statusCode:0},e),[3,4];case 4:return[2]}})})},e.prototype.handleResponse=function(e,t){var n=e.status;switch(n){case i.Success:this.handleSuccessResponse(e,t);break;case i.Invalid:this.handleInvalidResponse(e,t);break;case i.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case i.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn("{code: 0, error: \"Status '".concat(n,"' provided for ").concat(t.length,' events"}')),this.handleOtherResponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,"Event tracked successfully")},e.prototype.handleInvalidResponse=function(e,t){var n=this;if(e.body.missingField||e.body.error.startsWith("Invalid API key"))return void this.fulfillRequest(t,e.statusCode,e.body.error);var r=new Set((0,g.__spreadArray)((0,g.__spreadArray)((0,g.__spreadArray)((0,g.__spreadArray)([],(0,g.__read)(Object.values(e.body.eventsWithInvalidFields)),!1),(0,g.__read)(Object.values(e.body.eventsWithMissingFields)),!1),(0,g.__read)(Object.values(e.body.eventsWithInvalidIdLengths)),!1),(0,g.__read)(e.body.silencedEvents),!1).flat()),i=t.filter(function(t,i){return!r.has(i)||void n.fulfillRequest([t],e.statusCode,e.body.error)});i.length>0&&this.config.loggerProvider.warn(H(e));
1var o=this.removeEventsExceedFlushMaxRetries(i);this.scheduleEvents(o)},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(1===t.length)return void this.fulfillRequest(t,e.statusCode,e.body.error);this.config.loggerProvider.warn(H(e)),this.config.flushQueueSize/=2;var n=this.removeEventsExceedFlushMaxRetries(t);this.scheduleEvents(n)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,r=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,s=new Set(r),a=new Set(i),u=new Set(o),c=t.filter(function(t,r){return t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&a.has(t.event.device_id)?void n.fulfillRequest([t],e.statusCode,e.body.error):(u.has(r)&&(t.timeout=n.throttleTimeout),!0)});c.length>0&&this.config.loggerProvider.warn(H(e));var l=this.removeEventsExceedFlushMaxRetries(c);this.scheduleEvents(l)},e.prototype.handleOtherResponse=function(e){var t=this,n=e.map(function(e){return e.timeout=e.attempts*t.retryTimeout,e}),r=this.removeEventsExceedFlushMaxRetries(n);this.scheduleEvents(r)},e.prototype.fulfillRequest=function(e,t,n){this.removeEvents(e),e.forEach(function(e){return e.callback(F(e.event,t,n))})},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=this.queue.map(function(e){return e.event});this.config.storageProvider.set(this.storageKey,e)}},e.prototype.removeEvents=function(e){this.queue=this.queue.filter(function(t){return!e.some(function(e){return e.event.insert_id===t.event.insert_id})}),this.saveEvents()},e}(),J=function(){function e(){this.name="identity",this.type="before",this.identityStore=L().identityStore}return e.prototype.execute=function(e){return(0,g.__awaiter)(this,void 0,void 0,function(){var t;return(0,g.__generator)(this,function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return(0,g.__awaiter)(this,void 0,void 0,function(){return(0,g.__generator)(this,function(t){return e.instanceName&&(this.identityStore=L(e.instanceName).identityStore),[2]})})},e}(),Y=n(26697),Z=n(27067),X=function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setCurrency=function(e){return this.currency=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setReceipt=function(e){return this.receipt=e,this},e.prototype.setReceiptSig=function(e){return this.receiptSig=e,this},e.prototype.setEventProperties=function(e){return(0,Z.a)(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?(0,g.__assign)({},this.properties):{};return e[o.REVENUE_PRODUCT_ID]=this.productId,e[o.REVENUE_QUANTITY]=this.quantity,e[o.REVENUE_PRICE]=this.price,e[o.REVENUE_TYPE]=this.revenueType,e[o.REVENUE_CURRENCY]=this.currency,e[o.REVENUE]=this.revenue,e[o.RECEIPT]=this.receipt,e[o.RECEIPT_SIG]=this.receiptSig,e},e}();!function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue",e.RECEIPT="$receipt",e.RECEIPT_SIG="$receiptSig"}(o||(o={}));var ee=function(e,t){return void 0===t&&(t=Date.now()),Date.now()-t>e},et=function(){function e(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[]}return e.prototype.register=function(e,t){var n,r;return(0,g.__awaiter)(this,void 0,void 0,function(){return(0,g.__generator)(this,function(i){switch(i.label){case 0:if(this.plugins.some(function(t){return t.name===e.name}))return t.loggerProvider.warn("Plugin with name ".concat(e.name," already exists, skipping registration")),[2];return void 0===e.name&&(e.name=Q(),t.loggerProvider.warn("Plugin name is undefined. \n      Generating a random UUID for plugin name: ".concat(e.name,". \n      Set a name for the plugin to prevent it from being added multiple times."))),e.type=null!=(n=e.type)?n:"enrichment",[4,null==(r=e.setup)?void 0:r.call(e,t,this.client)];case 1:return i.sent(),this.plugins.push(e),[2]}})})},e.prototype.deregister=function(e,t){var n;return(0,g.__awaiter)(this,void 0,void 0,function(){var r,i;return(0,g.__generator)(this,function(o){switch(o.label){case 0:if(-1===(r=this.plugins.findIndex(function(t){return t.name===e})))return t.loggerProvider.warn("Plugin with name ".concat(e," does not exist, skipping deregistration")),[2];return i=this.plugins[r],this.plugins.splice(r,1),[4,null==(n=i.teardown)?void 0:n.call(i)];case 1:return o.sent(),[2]}})})},e.prototype.reset=function(e){this.applying=!1,this.plugins.map(function(e){var t;return null==(t=e.teardown)?void 0:t.call(e)}),this.plugins=[],this.client=e},e.prototype.push=function(e){var t=this;return new Promise(function(n){t.queue.push([e,n]),t.scheduleApply(0)})},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout(function(){t.apply(t.queue.shift()).then(function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)})},e))},e.prototype.apply=function(e){return(0,g.__awaiter)(this,void 0,void 0,function(){var t,n,r,i,o,s,a,u,c,l,d,f,h,p;return(0,g.__generator)(this,function(v){switch(v.label){case 0:if(!e)return[2];t=(0,g.__read)(e,1)[0],n=(0,g.__read)(e,2)[1],r=this.plugins.filter(function(e){return"before"===e.type}),v.label=1;case 1:v.trys.push([1,6,7,8]),o=(i=(0,g.__values)(r)).next(),v.label=2;case 2:if(o.done)return[3,5];if(!(s=o.value).execute)return[3,4];return[4,s.execute((0,g.__assign)({},t))];case 3:if(null===(a=v.sent()))return n({event:t,code:0,message:""}),[2];t=a,v.label=4;case 4:return o=i.next(),[3,2];case 5:return[3,8];case 6:return d={error:v.sent()},[3,8];case 7:try{o&&!o.done&&(f=i.return)&&f.call(i)}finally{if(d)throw d.error}
1return[7];case 8:u=this.plugins.filter(function(e){return"enrichment"===e.type||void 0===e.type}),v.label=9;case 9:v.trys.push([9,14,15,16]),l=(c=(0,g.__values)(u)).next(),v.label=10;case 10:if(l.done)return[3,13];if(!(s=l.value).execute)return[3,12];return[4,s.execute((0,g.__assign)({},t))];case 11:if(null===(a=v.sent()))return n({event:t,code:0,message:""}),[2];t=a,v.label=12;case 12:return l=c.next(),[3,10];case 13:return[3,16];case 14:return h={error:v.sent()},[3,16];case 15:try{l&&!l.done&&(p=c.return)&&p.call(c)}finally{if(h)throw h.error}return[7];case 16:return Promise.all(this.plugins.filter(function(e){return"destination"===e.type}).map(function(e){var n=(0,g.__assign)({},t);return e.execute(n).catch(function(e){return F(n,0,String(e))})})).then(function(e){var r=(0,g.__read)(e,1)[0]||F(t,100,"Event not tracked, no destination plugins on the instance");n(r)}),[2]}})})},e.prototype.flush=function(){return(0,g.__awaiter)(this,void 0,void 0,function(){var e,t=this;return(0,g.__generator)(this,function(n){switch(n.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(e){return t.apply(e)}))];case 1:return n.sent(),[4,Promise.all(this.plugins.filter(function(e){return"destination"===e.type}).map(function(e){return e.flush&&e.flush()}))];case 2:return n.sent(),[2]}})})},e}();!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(s||(s={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(a||(a={}));var en=function(e,t){return(0,g.__assign)((0,g.__assign)({},t),{event_type:a.IDENTIFY,user_properties:e.getUserProperties()})},er=function(e,t,n,r){var i;return(0,g.__assign)((0,g.__assign)({},r),{event_type:a.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:((i={})[e]=t,i)})},ei=function(e,t,n){var r,i=new Y.T;return i.set(e,t),(0,g.__assign)((0,g.__assign)({},n),{event_type:a.IDENTIFY,user_properties:i.getUserProperties(),groups:((r={})[e]=t,r)})},eo=function(){function e(e){void 0===e&&(e="$default"),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new et(this),this.name=e}return e.prototype._init=function(e){return(0,g.__awaiter)(this,void 0,void 0,function(){return(0,g.__generator)(this,function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(this),[4,this.runQueuedFunctions("q")];case 1:return t.sent(),this.isReady=!0,[2]}})})},e.prototype.runQueuedFunctions=function(e){return(0,g.__awaiter)(this,void 0,void 0,function(){var t,n,r,i,o,s;return(0,g.__generator)(this,function(a){switch(a.label){case 0:t=this[e],this[e]=[],a.label=1;case 1:a.trys.push([1,8,9,10]),r=(n=(0,g.__values)(t)).next(),a.label=2;case 2:if(r.done)return[3,7];if(!((i=(0,r.value)())&&"promise"in i))return[3,4];return[4,i.promise];case 3:return a.sent(),[3,6];case 4:return[4,i];case 5:a.sent(),a.label=6;case 6:return r=n.next(),[3,2];case 7:return[3,10];case 8:return o={error:a.sent()},[3,10];case 9:try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(o)throw o.error}return[7];case 10:if(!this[e].length)return[3,12];return[4,this.runQueuedFunctions(e)];case 11:a.sent(),a.label=12;case 12:return[2]}})})},e.prototype.track=function(e,t,n){var r=(0,g.__assign)((0,g.__assign)((0,g.__assign)({},"string"==typeof e?{event_type:e}:e),n),t&&{event_properties:t});return w(this.dispatch(r))},e.prototype.identify=function(e,t){var n=en(e,t);return w(this.dispatch(n))},e.prototype.groupIdentify=function(e,t,n,r){var i=er(e,t,n,r);return w(this.dispatch(i))},e.prototype.setGroup=function(e,t,n){var r=ei(e,t,n);return w(this.dispatch(r))},e.prototype.revenue=function(e,t){var n=(0,g.__assign)((0,g.__assign)({},t),{event_type:a.REVENUE,event_properties:e.getEventProperties()});return w(this.dispatch(n))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),w())},e.prototype._addPlugin=function(e){return w(this.timeline.register(e,this.config))},e.prototype.remove=function(e){return this.isReady?this._removePlugin(e):(this.q.push(this._removePlugin.bind(this,e)),w())},e.prototype._removePlugin=function(e){return w(this.timeline.deregister(e,this.config))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(F(e,0,"Client not initialized"));this.process(e).then(t)},e.prototype.dispatch=function(e){return(0,g.__awaiter)(this,void 0,void 0,function(){var t=this;return(0,g.__generator)(this,function(n){return this.isReady?[2,this.process(e)]:[2,new Promise(function(n){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,n))})]})})},e.prototype.process=function(e){return(0,g.__awaiter)(this,void 0,void 0,function(){var t,n;return(0,g.__generator)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,2,,3]),this.config.optOut)return[2,F(e,0,"Event skipped due to optOut config")];return[4,this.timeline.push(e)];case 1:return 200===(t=r.sent()).code?this.config.loggerProvider.log(t.message):100===t.code?this.config.loggerProvider.warn(t.message):this.config.loggerProvider.error(t.message),[2,t];case 2:return n=String(r.sent()),this.config.loggerProvider.error(n),[2,t=F(e,0,n)];case 3:return[2]}})})},e.prototype.setOptOut=function(e){if(!this.isReady)return void this.q.push(this._setOptOut.bind(this,!!e));this._setOptOut(e)},e.prototype._setOptOut=function(e){this.config.optOut=!!e},e.prototype.flush=function(){return w(this.timeline.flush())},e}(),es=function(e,t){return"boolean"==typeof e?e:(null==e?void 0:e[t])!==!1},ea=function(e){return es(e,"attribution")},eu=function(e){return es(e,"pageViews")},ec=function(e){return es(e,"sessions")},el=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.elementInteractions||"object"==typeof e.elementInteractions)},ed=function(e){if(el(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.elementInteractions)return e.autocapture.elementInteractions},ef=function(e){var t,n=function(){return!1},r=void 0,i=e.pageCounter;return eu(e.defaultTracking)&&(n=void 0,t=void 0,e.defaultTracking&&"object"==typeof e.defaultTracking&&e.defaultTracking.pageViews&&"object"==typeof e.defaultTracking.pageViews&&("trackOn"in e.defaultTracking.pageViews&&(n=e.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in e.defaultTracking.pageViews&&(r=e.defaultTracking.pageViews.trackHistoryChanges),"eventType"in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(t=e.defaultTracking.pageViews.eventType))),{trackOn:n,trackHistoryChanges:r,eventType:t,pageCounter:i}},eh=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,s=r.resolve,a=e&&e[i];if("function"==typeof a){var u=a.apply(e,o);"function"==typeof s&&s(null==u?void 0:u.promise)}}return e},ep=function(e){return e&&void 0!==e._q},ev=function(){if("undefined"==typeof navigator)return"";var e,t,n,r,i=navigator.userLanguage;return null!=(r=null!=(n=null!=(t=null==(e=navigator.languages)?void 0:e[0])?t:navigator.language)?n:i)?r:""},eg=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat("amplitude-ts","/").concat("2.12.0"),"undefined"!=typeof navigator&&(this.userAgent=navigator.userAgent)}return e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){return(0,g.__awaiter)(this,void 0,void 0,function(){var t,n,r,i,o;return(0,g.__generator)(this,function(s){return t=new Date().getTime(),n=null!=(i=this.config.lastEventId)?i:-1,r=null!=(o=e.event_id)?o:n+1,this.config.lastEventId=r,e.time||(this.config.lastEventTime=t),[2,(0,g.__assign)((0,g.__assign)((0,g.__assign)((0,g.__assign)((0,g.__assign)((0,g.__assign)((0,g.__assign)((0,g.__assign)({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:t},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.language&&{language:ev()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:Q(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:r,library:this.library,user_agent:this.userAgent})]})})},e}(),ey=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return(0,g.__awaiter)(this,void 0,void 0,function(){return(0,g.__generator)(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return(0,g.__awaiter)(this,void 0,void 0,function(){return(0,g.__generator)(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return(0,g.__awaiter)(this,void 0,void 0,function(){var t;return(0,g.__generator)(this,function(n){switch(n.label){case 0:return[4,this.get(e)];case 1:return[2,(t=n.sent())?JSON.stringify(t):void 0]}})})},e.prototype.set=function(e,t){return(0,g.__awaiter)(this,void 0,void 0,function(){return(0,g.__generator)(this,function(n){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return(0,g.__awaiter)(this,void 0,void 0,function(){return(0,g.__generator)(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return(0,g.__awaiter)(this,void 0,void 0,function(){return(0,g.__generator)(this,function(e){return this.memoryStorage.clear(),[2]})})},e}(),e_=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[M.r,t,e.substring(0,n)].filter(
1Boolean).join("_")},em=function(){function e(e){this.options=(0,g.__assign)({},e)}return e.prototype.isEnabled=function(){return(0,g.__awaiter)(this,void 0,void 0,function(){var t,n;return(0,g.__generator)(this,function(r){switch(r.label){case 0:if(!E())return[2,!1];e.testValue=String(Date.now()),t=new e(this.options),n="AMP_TEST",r.label=1;case 1:return r.trys.push([1,4,5,7]),[4,t.set(n,e.testValue)];case 2:return r.sent(),[4,t.get(n)];case 3:return[2,r.sent()===e.testValue];case 4:return r.sent(),[2,!1];case 5:return[4,t.remove(n)];case 6:return r.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){var t;return(0,g.__awaiter)(this,void 0,void 0,function(){var n,r;return(0,g.__generator)(this,function(i){switch(i.label){case 0:return[4,this.getRaw(e)];case 1:if(!(n=i.sent()))return[2,void 0];try{if(r=null!=(t=eb(n))?t:ew(n),void 0===r)return console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(e,", value: ").concat(n)),[2,void 0];return[2,JSON.parse(r)]}catch(t){return console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(e,", value: ").concat(n)),[2,void 0]}}})})},e.prototype.getRaw=function(e){var t,n;return(0,g.__awaiter)(this,void 0,void 0,function(){var r,i;return(0,g.__generator)(this,function(o){return(i=(null!=(n=null==(t=null==(r=E())?void 0:r.document)?void 0:t.cookie.split("; "))?n:[]).find(function(t){return 0===t.indexOf(e+"=")}))?[2,i.substring(e.length+1)]:[2,void 0]})})},e.prototype.set=function(e,t){var n;return(0,g.__awaiter)(this,void 0,void 0,function(){var r,i,o,s,a,u,c;return(0,g.__generator)(this,function(l){try{r=null!=(n=this.options.expirationDays)?n:0,i=null!==t?r:-1,o=void 0,i&&((s=new Date).setTime(s.getTime()+24*i*36e5),o=s),a="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t)))),o&&(a+="; expires=".concat(o.toUTCString())),a+="; path=/",this.options.domain&&(a+="; domain=".concat(this.options.domain)),this.options.secure&&(a+="; Secure"),this.options.sameSite&&(a+="; SameSite=".concat(this.options.sameSite)),(u=E())&&(u.document.cookie=a)}catch(t){c=t instanceof Error?t.message:String(t),console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(e,". Error: ").concat(c))}return[2]})})},e.prototype.remove=function(e){return(0,g.__awaiter)(this,void 0,void 0,function(){return(0,g.__generator)(this,function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}})})},e.prototype.reset=function(){return(0,g.__awaiter)(this,void 0,void 0,function(){return(0,g.__generator)(this,function(e){return[2]})})},e}(),eb=function(e){try{return decodeURIComponent(atob(e))}catch(e){return}},ew=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch(e){return}},eE=function(){function e(){}return e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){if("object"!=typeof e)return null;var t,n,r,o,s,a,u,c,l,d,f,h,p,v,g,y,_,m,b,w,E,S,T=e.code||0,I=this.buildStatus(T);switch(I){case i.Success:return{status:I,statusCode:T,body:{eventsIngested:null!=(t=e.events_ingested)?t:0,payloadSizeBytes:null!=(n=e.payload_size_bytes)?n:0,serverUploadTime:null!=(r=e.server_upload_time)?r:0}};case i.Invalid:return{status:I,statusCode:T,body:{error:null!=(o=e.error)?o:"",missingField:null!=(s=e.missing_field)?s:"",eventsWithInvalidFields:null!=(a=e.events_with_invalid_fields)?a:{},eventsWithMissingFields:null!=(u=e.events_with_missing_fields)?u:{},eventsWithInvalidIdLengths:null!=(c=e.events_with_invalid_id_lengths)?c:{},epsThreshold:null!=(l=e.eps_threshold)?l:0,exceededDailyQuotaDevices:null!=(d=e.exceeded_daily_quota_devices)?d:{},silencedDevices:null!=(f=e.silenced_devices)?f:[],silencedEvents:null!=(h=e.silenced_events)?h:[],throttledDevices:null!=(p=e.throttled_devices)?p:{},throttledEvents:null!=(v=e.throttled_events)?v:[]}};case i.PayloadTooLarge:return{status:I,statusCode:T,body:{error:null!=(g=e.error)?g:""}};case i.RateLimit:return{status:I,statusCode:T,body:{error:null!=(y=e.error)?y:"",epsThreshold:null!=(_=e.eps_threshold)?_:0,throttledDevices:null!=(m=e.throttled_devices)?m:{},throttledUsers:null!=(b=e.throttled_users)?b:{},exceededDailyQuotaDevices:null!=(w=e.exceeded_daily_quota_devices)?w:{},exceededDailyQuotaUsers:null!=(E=e.exceeded_daily_quota_users)?E:{},throttledEvents:null!=(S=e.throttled_events)?S:[]}};case i.Timeout:default:return{status:I,statusCode:T}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?i.Success:429===e?i.RateLimit:413===e?i.PayloadTooLarge:408===e?i.Timeout:e>
1=400&&e<500?i.Invalid:e>=500?i.Failed:i.Unknown},e}(),eS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,g.__extends)(t,e),t.prototype.send=function(e,t){return(0,g.__awaiter)(this,void 0,void 0,function(){var n,r;return(0,g.__generator)(this,function(i){switch(i.label){case 0:if("undefined"==typeof fetch)throw Error("FetchTransport is not supported");return[4,fetch(e,{headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"})];case 1:return[4,(n=i.sent()).text()];case 2:r=i.sent();try{return[2,this.buildResponse(JSON.parse(r))]}catch(e){return[2,this.buildResponse({code:n.status})]}}})})},t}(eE),eT=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return(0,g.__awaiter)(this,void 0,void 0,function(){var t,n,r;return(0,g.__generator)(this,function(i){switch(i.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),n=new e(this.storage),r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return(0,g.__awaiter)(this,void 0,void 0,function(){var t;return(0,g.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:if(!(t=n.sent()))return[2,void 0];return[2,JSON.parse(t)];case 2:return n.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}})})},e.prototype.getRaw=function(e){return(0,g.__awaiter)(this,void 0,void 0,function(){var t;return(0,g.__generator)(this,function(n){return[2,(null==(t=this.storage)?void 0:t.getItem(e))||void 0]})})},e.prototype.set=function(e,t){return(0,g.__awaiter)(this,void 0,void 0,function(){var n;return(0,g.__generator)(this,function(r){try{null==(n=this.storage)||n.setItem(e,JSON.stringify(t))}catch(e){}return[2]})})},e.prototype.remove=function(e){return(0,g.__awaiter)(this,void 0,void 0,function(){var t;return(0,g.__generator)(this,function(n){try{null==(t=this.storage)||t.removeItem(e)}catch(e){}return[2]})})},e.prototype.reset=function(){return(0,g.__awaiter)(this,void 0,void 0,function(){var e;return(0,g.__generator)(this,function(t){try{null==(e=this.storage)||e.clear()}catch(e){}return[2]})})},e}(),eI=function(e){function t(t){var n,r=e.call(this,null==(n=E())?void 0:n.localStorage)||this;return r.loggerProvider=null==t?void 0:t.loggerProvider,r}return(0,g.__extends)(t,e),t.prototype.set=function(t,n){return(0,g.__awaiter)(this,void 0,void 0,function(){var r,i;return(0,g.__generator)(this,function(o){switch(o.label){case 0:if(!(Array.isArray(n)&&n.length>1e3))return[3,2];return r=n.length-1e3,[4,e.prototype.set.call(this,t,n.slice(0,1e3))];case 1:return o.sent(),null==(i=this.loggerProvider)||i.error("Failed to save ".concat(r," events because the queue length exceeded ").concat(1e3,".")),[3,4];case 2:return[4,e.prototype.set.call(this,t,n)];case 3:o.sent(),o.label=4;case 4:return[2]}})})},t}(eT),ek=function(e){function t(){var t;return e.call(this,null==(t=E())?void 0:t.sessionStorage)||this}return(0,g.__extends)(t,e),t}(eT),eO=function(e){function t(){var t=e.apply(this,(0,g.__spreadArray)([],(0,g.__read)(arguments),!1))||this;return t.state={done:4},t}return(0,g.__extends)(t,e),t.prototype.send=function(e,t){return(0,g.__awaiter)(this,void 0,void 0,function(){var n=this;return(0,g.__generator)(this,function(r){return[2,new Promise(function(r,i){"undefined"==typeof XMLHttpRequest&&i(Error("XHRTransport is not supported."));var o=new XMLHttpRequest;o.open("POST",e,!0),o.onreadystatechange=function(){if(o.readyState===n.state.done){var e=o.responseText;try{r(n.buildResponse(JSON.parse(e)))}catch(e){r(n.buildResponse({code:o.status}))}}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(t))})]})})},t}(eE),eP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,g.__extends)(t,e),t.prototype.send=function(e,t){return(0,g.__awaiter)(this,void 0,void 0,function(){var n=this;return(0,g.__generator)(this,function(r){return[2,new Promise(function(r,i){var o=E();if(!(null==o?void 0:o.navigator.sendBeacon))throw Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(t);if(o.navigator.sendBeacon(e,JSON.stringify(t)))return r(n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}));return r(n.buildResponse({code:500}))}catch(e){i(e)}})]})})},t}(eE),eA=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return(0,g.__awaiter)(void 0,(0,g.__spreadArray)([e,t],(0,g.__read)(n),!1),void 0,function(e,t,n){var r,i,o,s,a,u,c,l,d;return void 0===n&&(n=!0),(0,g.__generator)(this,function(f){switch(f.label){case 0:return r="".concat(M.r.toLowerCase(),"_").concat(e.substring(0,6)),[4,t.getRaw(r)];case 1:if(!(i=f.sent()))return[2,{optOut:!1}];if(!n)return[3,3];return[4,t.remove(r)];case 2:f.sent(),f.label=3;
1case 3:return s=(o=(0,g.__read)(i.split("."),6))[0],a=o[1],u=o[2],c=o[3],l=o[4],d=o[5],[2,{deviceId:s,userId:ex(a),sessionId:eC(c),lastEventId:eC(d),lastEventTime:eC(l),optOut:!!u}]}})})},eC=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},ex=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},eR="[Amplitude]",eN="".concat(eR," Form Started"),ej="".concat(eR," Form Submitted"),eL="".concat(eR," File Downloaded"),eU="session_start",eD="session_end",eM="".concat(eR," File Extension"),eq="".concat(eR," File Name"),eF="".concat(eR," Link ID"),e$="".concat(eR," Link Text"),eV="".concat(eR," Link URL"),eW="".concat(eR," Form ID"),eK="".concat(eR," Form Name"),eB="".concat(eR," Form Destination"),ez="cookie",eQ=function(e){function t(t,n,i,o,s,a,u,c,l,d,f,h,p,v,g,y,_,m,b,w,E,S,T,I,k,O,P,A,C,x,R,N,j,L){void 0===i&&(i=new ey),void 0===o&&(o={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===c&&(c=1e3),void 0===l&&(l=5),void 0===d&&(d=30),void 0===f&&(f=ez),void 0===y&&(y=new V),void 0===_&&(_=r.Warn),void 0===b&&(b=!1),void 0===w&&(w=!1),void 0===T&&(T=""),void 0===I&&(I="US"),void 0===O&&(O=18e5),void 0===P&&(P=new eI({loggerProvider:y})),void 0===A&&(A={ipAddress:!0,language:!0,platform:!0}),void 0===C&&(C="fetch"),void 0===x&&(x=!1),void 0===R&&(R=!1);var U=e.call(this,{apiKey:t,storageProvider:P,transportProvider:eJ(C)})||this;return U.apiKey=t,U.appVersion=n,U.cookieOptions=o,U.defaultTracking=s,U.autocapture=a,U.flushIntervalMillis=c,U.flushMaxRetries=l,U.flushQueueSize=d,U.identityStorage=f,U.ingestionMetadata=h,U.instanceName=p,U.loggerProvider=y,U.logLevel=_,U.minIdLength=m,U.offline=b,U.partnerId=E,U.plan=S,U.serverUrl=T,U.serverZone=I,U.sessionTimeout=O,U.storageProvider=P,U.trackingOptions=A,U.transport=C,U.useBatch=x,U.fetchRemoteConfig=R,U._optOut=!1,U._cookieStorage=i,U.deviceId=u,U.lastEventId=v,U.lastEventTime=g,U.optOut=w,U.sessionId=k,U.pageCounter=j,U.userId=N,U.debugLogsEnabled=L,U.loggerProvider.enable(L?r.Debug:U.logLevel),U}return(0,g.__extends)(t,e),Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(e){this._deviceId!==e&&(this._deviceId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(e){this._userId!==e&&(this._userId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(e){this._sessionId!==e&&(this._sessionId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut!==e&&(this._optOut=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(e){this._lastEventTime!==e&&(this._lastEventTime=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(e){this._lastEventId!==e&&(this._lastEventId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageCounter",{get:function(){return this._pageCounter},set:function(e){this._pageCounter!==e&&(this._pageCounter=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugLogsEnabled",{set:function(e){this._debugLogsEnabled!==e&&(this._debugLogsEnabled=e,this.updateStorage())},enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var e={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled};this.cookieStorage.set(e_(this.apiKey),e)},t}(K),eH=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return(0,g.__awaiter)(void 0,(0,g.__spreadArray)([e],(0,g.__read)(t),!1),void 0,function(e,t,n){var r,i,o,s,a,u,c,l,d,f,h,p,v,y,_,m,b,w,E,T,I,k,O,P,A,C,x,R,N,j,L,U,D,M,q,F,$,V,W,K,B,z,H;return void 0===t&&(t={}),(0,g.__generator)(this,function(G){switch(G.label){case 0:if(r=t.identityStorage||ez,E={},r===ez)return[3,1];return o="",[3,5];case 1:if(null==(I=null==(T=t.cookieOptions)?void 0:T.domain))return[3,2];return s=I,[3,4];case 2:return[4,eY()];case 3:s=G.sent(),G.label=4;case 4:o=s,G.label=5;case 5:return i=g.__assign.apply(void 0,[(E.domain=o,E.expiration=365,E.sameSite="Lax",E.secure=!1,E.upgrade=!0,E),t.cookieOptions]),[4,eA(e,a=eG(t.identityStorage,i),null==(O=null==(k=t.cookieOptions)?void 0:k.upgrade)||O)];case 6:return u=G.sent(),[4,a.get(e_(e))];case 7:return c=G.sent(),l=S(),d=null!=(R=null!=(x=null!=(C=null!=(A=null!=(P=t.deviceId)?P:l.ampDeviceId)?A:l.deviceId)?C:null==c?void 0:c.deviceId)?x:u.deviceId)?R:Q(),f=null!=(N=null==c?void 0:c.lastEventId)?N:u.lastEventId,h=null!=(j=null==c?void 0:c.lastEventTime)?j:u.lastEventTime,p=null!=(U=null!=(L=t.optOut)?L:null==c?void 0:c.optOut)?U:u.optOut,v=null!=(D=null==c?void 0:c.sessionId)?D:u.sessionId,y=null!=(q=null!=(M=t.userId)?M:null==c?void 0:c.userId)?q:u.userId,n.previousSessionDeviceId=null!=(F=null==c?void 0:c.deviceId)?F:u.deviceId,n.previousSessionUserId=null!=($=null==c?void 0:c.userId)?$:u.userId,_={ipAddress:null==(W=null==(V=t.trackingOptions)?void 0:V.ipAddress)||W,language:null==(B=null==(K=t.trackingOptions)?void 0:K.language)||B,platform:null==(H=null==(z=t.trackingOptions)?void 0:z.platform)||H},m=null==c?void 0:c.pageCounter,b=null==c?void 0:c.debugLogsEnabled,void 0!==t.autocapture&&(t.defaultTracking=t.autocapture),[4,(w=new eQ(e,t.appVersion,a,i,t.defaultTracking,t.autocapture,d,t.flushIntervalMillis,t.flushMaxRetries,t.flushQueueSize,r,t.ingestionMetadata,t.instanceName,f,h,t.loggerProvider,t.logLevel,t.minIdLength,t.offline,p,t.partnerId,t.plan,t.serverUrl,t.serverZone,v,t.sessionTimeout,t.storageProvider,_,t.transport,t.useBatch,t.fetchRemoteConfig,y,m,b)).storageProvider.isEnabled()];case 8:return G.sent()||(w.loggerProvider.warn("Storage provider ".concat(w.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),w.storageProvider=new ey),[2,w]}})})},eG=function(e,t){switch(void 0===e&&(e=ez),void 0===t&&(t={}),e){case"localStorage":return new eI;case"sessionStorage":return new ek;case"none":return new ey;default:return new em((0,g.__assign)((0,g.__assign)({},t),{expirationDays:t.expiration}))}},eJ=function(e){return"xhr"===e?new eO:"beacon"===e?new eP:new eS},eY=function(e){return(0,g.__awaiter)(void 0,void 0,void 0,function(){var t,n,r,i,o,s;return(0,g.__generator)(this,function(a){switch(a.label){case 0:return[4,new em().isEnabled()];case 1:if(!a.sent()||!e&&("undefined"==typeof location||!location.hostname))return[2,""];for(t=(null!=e?e:location.hostname).split("."),n=[],r="AMP_TLDTEST",i=t.length-2;i>=0;--i)n.push(t.slice(i).join("."));i=0,a.label=2;case 2:if(!(i<n.length))return[3,7];return[4,(s=new em({domain:"."+(o=n[i])})).set(r,1)];case 3:return a.sent(),[4,s.get(r)];case 4:if(!a.sent())return[3,6];return[4,s.remove(r)];case 5:return a.sent(),[2,"."+o];case 6:return i++,[3,2];case 7:return[2,""]}})})},eZ=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==n.g?n.g:void 0},eX=function(){var e,t=eZ();return(null==(e=null==t?void 0:t.location)?void 0:e.search)?t.location.search.substring(1).split("&").filter(
1Boolean).reduce(function(e,t){var n=t.split("=",2),r=e0(n[0]),i=e0(n[1]);return i&&(e[r]=i),e},{}):{}},e0=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},e1="dclid",e2="fbclid",e3="gbraid",e4="gclid",e5="ko_click_id",e8="li_fat_id",e7="msclkid",e6="rtd_cid",e9="ttclid",te="twclid",tt="wbraid",tn={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},tr=function(){function e(){}return e.prototype.parse=function(){return(0,g.__awaiter)(this,void 0,void 0,function(){return(0,g.__generator)(this,function(e){return[2,(0,g.__assign)((0,g.__assign)((0,g.__assign)((0,g.__assign)({},tn),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=eX();return{utm_campaign:e.utm_campaign,utm_content:e.utm_content,utm_id:e.utm_id,utm_medium:e.utm_medium,utm_source:e.utm_source,utm_term:e.utm_term}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!=(t=null==(e=n.referrer)?void 0:e.split("/")[2])?t:void 0}catch(e){}return n},e.prototype.getClickIds=function(){var e,t=eX();return(e={})[e1]=t[e1],e[e2]=t[e2],e[e3]=t[e3],e[e4]=t[e4],e[e5]=t[e5],e[e8]=t[e8],e[e7]=t[e7],e[e6]=t[e6],e[e9]=t[e9],e[te]=t[te],e[tt]=t[tt],e},e}();!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(u||(u={})),function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue"}(c||(c={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(l||(l={}));var ti=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},to=function(e){void 0===e&&(e={});var t,n,r,i=eZ(),o=void 0,s=e.trackOn,a=e.trackHistoryChanges,u=e.eventType,c=void 0===u?"[Amplitude] Page Viewed":u,l=function(e){var t=e;try{t=decodeURI(e)}catch(e){null==o||o.error("Malformed URI sequence: ",e)}return t},d=function(){return(0,g.__awaiter)(void 0,void 0,void 0,function(){var e,t,n;return(0,g.__generator)(this,function(r){switch(r.label){case 0:return e=l("undefined"!=typeof location&&location.href||""),n={event_type:c},t=[{}],[4,ts()];case 1:return[2,(n.event_properties=g.__assign.apply(void 0,[g.__assign.apply(void 0,t.concat([r.sent()])),{"[Amplitude] Page Domain":"undefined"!=typeof location&&location.hostname||"","[Amplitude] Page Location":e,"[Amplitude] Page Path":"undefined"!=typeof location&&l(location.pathname)||"","[Amplitude] Page Title":"undefined"!=typeof document&&document.title||"","[Amplitude] Page URL":e.split("?")[0]}]),n)]}})})},f=function(){return void 0===s||"function"==typeof s&&s()},h="undefined"!=typeof location?location.href:null,p=function(){return(0,g.__awaiter)(void 0,void 0,void 0,function(){var e,n,r,i;return(0,g.__generator)(this,function(s){switch(s.label){case 0:if(n=tu(a,e=location.href,h||"")&&f(),h=e,!n)return[3,4];if(null==o||o.log("Tracking page view event"),null!=t)return[3,1];return[3,3];case 1:return i=(r=t).track,[4,d()];case 2:i.apply(r,[s.sent()]),s.label=3;case 3:s.label=4;case 4:return[2]}})})},v=function(){p()};return{name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(e,s){return(0,g.__awaiter)(void 0,void 0,void 0,function(){var a,u;return(0,g.__generator)(this,function(c){switch(c.label){case 0:if(t=s,r=e,(o=e.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),i&&(i.addEventListener("popstate",v),n=i.history.pushState,i.history.pushState=new Proxy(i.history.pushState,{apply:function(e,t,n){var r=(0,g.__read)(n,3),i=r[0],o=r[1],s=r[2];e.apply(t,[i,o,s]),p()}})),!f())return[3,2];return o.log("Tracking page view event"),u=(a=t).track,[4,d()];case 1:u.apply(a,[c.sent()]),c.label=2;case 2:return[2]}})})},execute:function(e){return(0,g.__awaiter)(void 0,void 0,void 0,function(){var t;return(0,g.__generator)(this,function(n){switch(n.label){case 0:if(!("attribution"===s&&ta(e)))return[3,2];
1return null==o||o.log("Enriching campaign event to page view event with campaign parameters"),[4,d()];case 1:e.event_type=(t=n.sent()).event_type,e.event_properties=(0,g.__assign)((0,g.__assign)({},e.event_properties),t.event_properties),n.label=2;case 2:return r&&e.event_type===c&&(r.pageCounter=r.pageCounter?r.pageCounter+1:1,e.event_properties=(0,g.__assign)((0,g.__assign)({},e.event_properties),{"[Amplitude] Page Counter":r.pageCounter})),[2,e]}})})},teardown:function(){return(0,g.__awaiter)(void 0,void 0,void 0,function(){return(0,g.__generator)(this,function(e){return i&&(i.removeEventListener("popstate",v),n&&(i.history.pushState=n)),[2]})})}}},ts=function(){return(0,g.__awaiter)(void 0,void 0,void 0,function(){var e;return(0,g.__generator)(this,function(t){switch(t.label){case 0:return e=ti,[4,new tr().parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},ta=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,n=t[u.SET]||{},r=t[u.UNSET]||{},i=(0,g.__spreadArray)((0,g.__spreadArray)([],(0,g.__read)(Object.keys(n)),!1),(0,g.__read)(Object.keys(r)),!1);return Object.keys(tn).every(function(e){return i.includes(e)})}return!1},tu=function(e,t,n){if("pathOnly"!==e)return t!==n;if(""==n)return!0;var r=new URL(t),i=new URL(n);return r.origin+r.pathname!==i.origin+i.pathname},tc=function(){var e,t=[],n=function(e,n,r){e.addEventListener(n,r),t.push({element:e,type:n,handler:r})},r=function(){t.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),t=[]};return{name:"@amplitude/plugin-form-interaction-tracking-browser",type:"enrichment",setup:function(t,r){return(0,g.__awaiter)(void 0,void 0,void 0,function(){var i;return(0,g.__generator)(this,function(o){return null==(i=E())||i.addEventListener("load",function(){if(!r)return void t.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.");if("undefined"!=typeof document){var i=function(e){var t=!1;n(e,"change",function(){var n,i=td(e);t||r.track(eN,((n={})[eW]=tl(e.id),n[eK]=tl(e.name),n[eB]=i,n)),t=!0}),n(e,"submit",function(){var n,i,o=td(e);t||r.track(eN,((n={})[eW]=tl(e.id),n[eK]=tl(e.name),n[eB]=o,n)),r.track(ej,((i={})[eW]=tl(e.id),i[eK]=tl(e.name),i[eB]=o,i)),t=!1})};Array.from(document.getElementsByTagName("form")).forEach(i),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"FORM"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("form")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}}),[2]})})},execute:function(e){return(0,g.__awaiter)(void 0,void 0,void 0,function(){return(0,g.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,g.__awaiter)(void 0,void 0,void 0,function(){return(0,g.__generator)(this,function(t){return null==e||e.disconnect(),r(),[2]})})}}},tl=function(e){if("string"==typeof e)return e},td=function(e){var t=e.getAttribute("action");try{t=new URL(encodeURI(null!=t?t:""),window.location.href).href}catch(e){}return t},tf=function(){var e,t=[],n=function(e,n,r){e.addEventListener(n,r),t.push({element:e,type:n,handler:r})},r=function(){t.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),t=[]};return{name:"@amplitude/plugin-file-download-tracking-browser",type:"enrichment",setup:function(t,r){return(0,g.__awaiter)(void 0,void 0,void 0,function(){var i;return(0,g.__generator)(this,function(o){return null==(i=E())||i.addEventListener("load",function(){if(!r)return void t.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.");if("undefined"!=typeof document){var i=function(e){try{t=new URL(e.href,window.location.href)}catch(e){return}var t,i=o.exec(t.href),s=null==i?void 0:i[1];s&&n(e,"click",function(){var n;s&&r.track(eL,((n={})[eM]=s,n[eq]=t.pathname,n[eF]=e.id,n[e$]=e.text,n[eV]=e.href,n))})},o=/\.(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)(\?.+)?$/;
1Array.from(document.getElementsByTagName("a")).forEach(i),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"A"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("a")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}}),[2]})})},execute:function(e){return(0,g.__awaiter)(void 0,void 0,void 0,function(){return(0,g.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,g.__awaiter)(void 0,void 0,void 0,function(){return(0,g.__generator)(this,function(t){return null==e||e.disconnect(),r(),[2]})})}}},th=!1,tp=function(e){th||void 0!==e.defaultTracking||(e.loggerProvider.warn("`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:\n\namplitude.init(<YOUR_API_KEY>, {\n  defaultTracking: true,\n});\n\nVisit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details."),th=!0)},tv=function(){var e=E(),t=[],n=function(n,r){e&&(e.addEventListener(n,r),t.push({type:n,handler:r}))},r=function(){t.forEach(function(t){var n=t.type,r=t.handler;e&&e.removeEventListener(n,r)}),t=[]};return{name:"@amplitude/plugin-network-checker-browser",type:"before",setup:function(e,t){return(0,g.__awaiter)(void 0,void 0,void 0,function(){return(0,g.__generator)(this,function(r){return"undefined"==typeof navigator?(e.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),e.offline=!1):(e.offline=!navigator.onLine,n("online",function(){e.loggerProvider.debug("Network connectivity changed to online."),e.offline=!1,setTimeout(function(){t.flush()},e.flushIntervalMillis)}),n("offline",function(){e.loggerProvider.debug("Network connectivity changed to offline."),e.offline=!0})),[2]})})},teardown:function(){return(0,g.__awaiter)(void 0,void 0,void 0,function(){return(0,g.__generator)(this,function(e){return r(),[2]})})}}};!function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(d||(d={})),function(e){e.US="US",e.EU="EU"}(f||(f={}));var tg="Remote config fetch rejected due to timeout after 5 seconds",ty="Unexpected error occurred",t_=function(){function e(e){var t=e.localConfig,n=e.configKeys,r=this;this.retryTimeout=1e3,this.attempts=0,this.sessionTargetingMatch=!1,this.metrics={},this.getRemoteConfig=function(e,t,n){return(0,g.__awaiter)(r,void 0,void 0,function(){var r,i,o;return(0,g.__generator)(this,function(s){switch(s.label){case 0:return r=Date.now(),[4,this.fetchWithTimeout(n)];case 1:if((i=s.sent())&&(o=i.configs&&i.configs[e]))return this.metrics.fetchTimeAPISuccess=Date.now()-r,[2,o[t]];return this.metrics.fetchTimeAPIFail=Date.now()-r,[2,void 0]}})})},this.fetchWithTimeout=function(e){return(0,g.__awaiter)(r,void 0,void 0,function(){var t,n,r;return(0,g.__generator)(this,function(i){switch(i.label){case 0:return t=new AbortController,n=setTimeout(function(){return t.abort()},5e3),[4,this.fetchRemoteConfig(t.signal,e)];case 1:return r=i.sent(),clearTimeout(n),[2,r]}})})},this.fetchRemoteConfig=function(e,t){return(0,g.__awaiter)(r,void 0,void 0,function(){var n,r,i,o,s,a,u,c,l,f,h;return(0,g.__generator)(this,function(p){switch(p.label){case 0:if(t===this.lastFetchedSessionId&&this.attempts>=this.localConfig.flushMaxRetries)return[2,this.completeRequest({err:"Remote config fetch rejected due to exceeded retry count"})];if(e.aborted)return[2,this.completeRequest({err:tg})];t!==this.lastFetchedSessionId&&(this.lastFetchedSessionId=t,this.attempts=0);p.label=1;case 1:p.trys.push([1,3,,4]),n=new URLSearchParams({api_key:this.localConfig.apiKey});try{for(i=(r=(0,g.__values)(this.configKeys)).next();!i.done;
1i=r.next())o=i.value,n.append("config_keys",o)}catch(e){l={error:e}}finally{try{i&&!i.done&&(f=r.return)&&f.call(r)}finally{if(l)throw l.error}}return t&&n.set("session_id",String(t)),s={headers:{Accept:"*/*"},method:"GET"},a="".concat(this.getServerUrl(),"?").concat(n.toString()),this.attempts+=1,[4,fetch(a,(0,g.__assign)((0,g.__assign)({},s),{signal:e}))];case 2:if(null===(u=p.sent()))return[2,this.completeRequest({err:ty})];switch(new eE().buildStatus(u.status)){case d.Success:return this.attempts=0,[2,this.parseAndStoreConfig(u)];case d.Failed:return[2,this.retryFetch(e,t)];default:return[2,this.completeRequest({err:"Network error occurred, remote config fetch failed"})]}case 3:if(c=p.sent(),e.aborted)return[2,this.completeRequest({err:tg})];return[2,this.completeRequest({err:null!=(h=c.message)?h:ty})];case 4:return[2]}})})},this.retryFetch=function(e,t){return(0,g.__awaiter)(r,void 0,void 0,function(){var n=this;return(0,g.__generator)(this,function(r){switch(r.label){case 0:return[4,new Promise(function(e){return setTimeout(e,n.attempts*n.retryTimeout)})];case 1:return r.sent(),[2,this.fetchRemoteConfig(e,t)]}})})},this.parseAndStoreConfig=function(e){return(0,g.__awaiter)(r,void 0,void 0,function(){var t;return(0,g.__generator)(this,function(n){switch(n.label){case 0:return[4,e.json()];case 1:return t=n.sent(),this.completeRequest({success:"Remote config successfully fetched"}),[2,t]}})})},this.localConfig=t,this.configKeys=n}return e.prototype.getServerUrl=function(){return this.localConfig.serverZone===f.STAGING?"https://sr-client-cfg.stag2.amplitude.com/config":this.localConfig.serverZone===f.EU?"https://sr-client-cfg.eu.amplitude.com/config":"https://sr-client-cfg.amplitude.com/config"},e.prototype.completeRequest=function(e){var t=e.err,n=e.success;if(t)throw Error(t);n&&this.localConfig.loggerProvider.log(n)},e}(),tm=function(e){var t=e.localConfig,n=e.configKeys;return(0,g.__awaiter)(void 0,void 0,void 0,function(){return(0,g.__generator)(this,function(e){return[2,new t_({localConfig:t,configKeys:n})]})})},tb=function(){function e(e){this.config=e,this.config.loggerProvider.debug("Local configuration before merging with remote config",JSON.stringify(this.config,null,2))}return e.prototype.initialize=function(){return(0,g.__awaiter)(this,void 0,void 0,function(){var e;return(0,g.__generator)(this,function(t){switch(t.label){case 0:return e=this,[4,tm({localConfig:this.config,configKeys:["analyticsSDK"]})];case 1:return e.remoteConfigFetch=t.sent(),[2]}})})},e.prototype.generateJoinedConfig=function(){return(0,g.__awaiter)(this,void 0,void 0,function(){var e,t,n,r,i,o;return(0,g.__generator)(this,function(s){switch(s.label){case 0:if(s.trys.push([0,3,,4]),!(t=this.remoteConfigFetch))return[3,2];return[4,this.remoteConfigFetch.getRemoteConfig("analyticsSDK","browserSDK",this.config.sessionId)];case 1:t=s.sent(),s.label=2;case 2:return e=t,this.config.loggerProvider.debug("Remote configuration:",JSON.stringify(e,null,2)),e&&"autocapture"in e&&("boolean"==typeof e.autocapture&&(this.config.autocapture=e.autocapture),"object"==typeof e.autocapture&&(void 0===this.config.autocapture&&(this.config.autocapture=e.autocapture),"boolean"==typeof this.config.autocapture&&(this.config.autocapture=(0,g.__assign)({attribution:this.config.autocapture,fileDownloads:this.config.autocapture,formInteractions:this.config.autocapture,pageViews:this.config.autocapture,sessions:this.config.autocapture,elementInteractions:this.config.autocapture},e.autocapture)),"object"==typeof this.config.autocapture&&(this.config.autocapture=(0,g.__assign)((0,g.__assign)({},this.config.autocapture),e.autocapture))),this.config.defaultTracking=this.config.autocapture),this.config.loggerProvider.debug("Joined configuration: ",JSON.stringify(this.config,null,2)),null!=(o=this.config).requestMetadata||(o.requestMetadata=new z),(null==(r=this.remoteConfigFetch)?void 0:r.metrics.fetchTimeAPISuccess)&&this.config.requestMetadata.recordHistogram("remote_config_fetch_time_API_success",this.remoteConfigFetch.metrics.fetchTimeAPISuccess),(null==(i=this.remoteConfigFetch)?void 0:i.metrics.fetchTimeAPIFail)&&this.config.requestMetadata.recordHistogram("remote_config_fetch_time_API_fail",this.remoteConfigFetch.metrics.fetchTimeAPIFail),[3,4];case 3:return n=s.sent(),this.config.loggerProvider.error("Failed to fetch remote configuration because of error: ",n),[3,4];case 4:return[2,this.config]}})})},e}(),tw=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],tE=["div","span","h1","h2","h3","h4","h5","h6"],tS="[Amplitude] Element Clicked",tT="[Amplitude] Element Tag",tI="[Amplitude] Element Text",tk="[Amplitude] Element Selector",tO="[Amplitude] Page URL",tP="https://app.amplitude.com",tA={US:tP,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"},tC="amp-visual-tagging-selector-highlight",tx=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function tR(e){return"function"==typeof e}function tN(e){return tR(null==e?void 0:e.then)}function tj(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var tL=tj(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n  "):"",this.name="UnsubscriptionError",this.errors=t}});function tU(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var tD=function(){var e;function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e,t,n,r,i,o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=(0,g.__values)(o),a=s.next();!a.done;a=s.next())a.value.remove(this)}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else o.remove(this);var u=this.initialTeardown;
1if(tR(u))try{u()}catch(e){i=e instanceof tL?e.errors:[e]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var l=(0,g.__values)(c),d=l.next();!d.done;d=l.next()){var f=d.value;try{tq(f)}catch(e){i=null!=i?i:[],e instanceof tL?i=(0,g.__spreadArray)((0,g.__spreadArray)([],(0,g.__read)(i)),(0,g.__read)(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(i)throw new tL(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)tq(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(n=this._finalizers)?n:[]).push(e)}},t.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},t.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},t.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&tU(t,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&tU(n,e),e instanceof t&&e._removeParent(this)},(e=new t).closed=!0,t.EMPTY=e,t}();function tM(e){return e instanceof tD||e&&"closed"in e&&tR(e.remove)&&tR(e.add)&&tR(e.unsubscribe)}function tq(e){tR(e)?e():e.unsubscribe()}tD.EMPTY;var tF={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},t$={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=t$.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,(0,g.__spreadArray)([e,t],(0,g.__read)(n))):setTimeout.apply(void 0,(0,g.__spreadArray)([e,t],(0,g.__read)(n)))},clearTimeout:function(e){var t=t$.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function tV(e){t$.setTimeout(function(){var t=tF.onUnhandledError;if(t)t(e);else throw e})}function tW(){}var tK=tB("C",void 0,void 0);function tB(e,t,n){return{kind:e,value:t,error:n}}var tz=null,tQ=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,tM(t)&&t.add(n)):n.destination=t0,n}return(0,g.__extends)(t,e),t.create=function(e,t,n){return new tY(e,t,n)},t.prototype.next=function(e){this.isStopped?tX(tB("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?tX(tB("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?tX(tK,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(tD),tH=Function.prototype.bind;function tG(e,t){return tH.call(e,t)}var tJ=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){tZ(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){tZ(e)}else tZ(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){tZ(e)}},e}(),tY=function(e){function t(t,n,r){var i,o,s=e.call(this)||this;return tR(t)||!t?i={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&tF.useDeprecatedNextContext?((o=Object.create(t)).unsubscribe=function(){return s.unsubscribe()},i={next:t.next&&tG(t.next,o),error:t.error&&tG(t.error,o),complete:t.complete&&tG(t.complete,o)}):i=t,s.destination=new tJ(i),s}return(0,g.__extends)(t,e),t}(tQ);function tZ(e){if(tF.useDeprecatedSynchronousErrorHandling)tF.useDeprecatedSynchronousErrorHandling&&tz&&(tz.errorThrown=!0,tz.error=e);else tV(e)}function tX(e,t){var n=tF.onStoppedNotification;n&&t$.setTimeout(function(){return n(e,t)})}var t0={closed:!0,next:tW,error:function(e){throw e},complete:tW},t1="function"==typeof Symbol&&Symbol.observable||"@@observable";function t2(e){return e}var t3=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=!function(e){return e&&e instanceof tQ||e&&tR(e.next)&&tR(e.error)&&tR(e.complete)&&tM(e)}(e)?new tY(e,t,n):e;return!function(e){if(tF.useDeprecatedSynchronousErrorHandling){var t=!tz;if(t&&(tz={errorThrown:!1,error:null}),e(),t){var n=tz,r=n.errorThrown,i=n.error;if(tz=null,r)throw i}}else e()}(function(){var e=r.operator,t=r.source;i.add(e?e.call(i,t):t?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=t4(t))(function(t,r){var i=new tY({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},e.prototype[t1]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0===e.length?t2:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=t4(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function t4(e){var t;return null!=(t=null!=e?e:tF.Promise)?t:Promise}function t5(e){return Symbol.asyncIterator&&tR(null==e?void 0:e[Symbol.asyncIterator])}function t8(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invali
1d object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var t7="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function t6(e){return tR(null==e?void 0:e[t7])}function t9(e){return(0,g.__asyncGenerator)(this,arguments,function(){var t,n,r;return(0,g.__generator)(this,function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,(0,g.__await)(t.read())];case 3:if(r=(n=i.sent()).value,!n.done)return[3,5];return[4,(0,g.__await)(void 0)];case 4:return[2,i.sent()];case 5:return[4,(0,g.__await)(r)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function ne(e){return tR(null==e?void 0:e.getReader)}function nt(e){if(e instanceof t3)return e;if(null!=e){var t,n,r,i;if(tR(e[t1])){return t=e,new t3(function(e){var n=t[t1]();if(tR(n.subscribe))return n.subscribe(e);throw TypeError("Provided object does not correctly implement Symbol.observable")})}if(tx(e)){return n=e,new t3(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}if(tN(e)){return r=e,new t3(function(e){r.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,tV)})}if(t5(e))return nn(e);if(t6(e)){return i=e,new t3(function(e){var t,n;try{for(var r=(0,g.__values)(i),o=r.next();!o.done;o=r.next()){var s=o.value;if(e.next(s),e.closed)return}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}e.complete()})}if(ne(e))return nn(t9(e))}throw t8(e)}function nn(e){return new t3(function(t){(function(e,t){var n,r,i,o;return(0,g.__awaiter)(this,void 0,void 0,function(){var s;return(0,g.__generator)(this,function(a){switch(a.label){case 0:a.trys.push([0,5,6,11]),n=(0,g.__asyncValues)(e),a.label=1;case 1:return[4,n.next()];case 2:if((r=a.sent()).done)return[3,4];if(s=r.value,t.next(s),t.closed)return[2];a.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i={error:a.sent()},[3,11];case 6:if(a.trys.push([6,,9,10]),!(r&&!r.done&&(o=n.return)))return[3,8];return[4,o.call(n)];case 7:a.sent(),a.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}function nr(e){return function(t){if(tR(null==t?void 0:t.lift))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError("Unable to lift unknown Observable type")}}function ni(e,t,n,r,i){return new no(e,t,n,r,i)}var no=function(e){function t(t,n,r,i,o,s){var a=e.call(this,t)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return(0,g.__extends)(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),n||null==(t=this.onFinalize)||t.call(this)}},t}(tQ);function ns(e,t){return nr(function(n,r){var i=0;n.subscribe(ni(r,function(n){r.next(e.call(t,n,i++))}))})}function na(e,t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function nu(e,t,n){return(void 0===n&&(n=1/0),tR(t))?nu(function(n,r){return ns(function(e,i){return t(n,e,r,i)})(nt(e(n,r)))},n):("number"==typeof t&&(n=t),nr(function(t,r){var i,o,s,a,u,c,l,d,f;return i=n,s=[],a=0,u=0,c=!1,l=function(){!c||s.length||a||r.complete()},d=function(e){return a<i?f(e):s.push(e)},f=function(t){a++;var n=!1;nt(e(t,u++)).subscribe(ni(r,function(e){o?d(e):r.next(e)},function(){n=!0},void 0,function(){if(n)try{for(a--;s.length&&a<i;)!function(){var e=s.shift();f(e)}();l()}catch(e){r.error(e)}}))},t.subscribe(ni(r,d,function(){c=!0,l()})),function(){}}))}var nc=Array.isArray,nl=["addListener","removeListener"],nd=["addEventListener","removeEventListener"],nf=["on","off"];function nh(e,t,n,r){if(tR(n)&&(r=n,n=void 0),r){return nh(e,t,n
1).pipe((i=r,ns(function(e){return nc(e)?i.apply(void 0,(0,g.__spreadArray)([],(0,g.__read)(e))):i(e)})))}var i,o,s,a,u=(0,g.__read)(tR((o=e).addEventListener)&&tR(o.removeEventListener)?nd.map(function(r){return function(i){return e[r](t,i,n)}}):tR((s=e).addListener)&&tR(s.removeListener)?nl.map(np(e,t)):tR((a=e).on)&&tR(a.off)?nf.map(np(e,t)):[],2),c=u[0],l=u[1];if(!c&&tx(e))return nu(function(e){return nh(e,t,n)})(nt(e));if(!c)throw TypeError("Invalid event target");return new t3(function(e){var t=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.next(1<t.length?t:t[0])};return c(t),function(){return l(t)}})}function np(e,t){return function(n){return function(r){return e[n](t,r)}}}function nv(e,t,n){for(var r=null,i=[],o=e,s=0;o&&"break"!==function(){var e,a,u,c,l=nS((e=o.getAttribute("id"))&&h.idName(e)?{name:"#"+CSS.escape(e),penalty:0}:null)||nS.apply(void 0,(0,g.__spreadArray)([],(0,g.__read)(Array.from(o.attributes).filter(function(e){return h.attr(e.name,e.value)}).map(function(e){return{name:"[".concat(CSS.escape(e.name),'="').concat(CSS.escape(e.value),'"]'),penalty:.5}})),!1))||nS.apply(void 0,(0,g.__spreadArray)([],(0,g.__read)(Array.from(o.classList).filter(h.className).map(function(e){return{name:"."+CSS.escape(e),penalty:1}})),!1))||nS((a=o.tagName.toLowerCase(),h.tagName(a)?{name:a,penalty:2}:null))||[nb()],d=function(e){var t=e.parentNode;if(!t)return null;var n=t.firstChild;if(!n)return null;for(var r=0;n&&(n.nodeType===Node.ELEMENT_NODE&&r++,n!==e);)n=n.nextSibling;return r}(o);if("all"==t)d&&(l=l.concat(l.filter(nE).map(function(e){return nw(e,d)})));else if("two"==t)l=l.slice(0,1),d&&(l=l.concat(l.filter(nE).map(function(e){return nw(e,d)})));else if("one"==t){var f=(0,g.__read)(l=l.slice(0,1),1)[0];d&&nE(f)&&(l=[nw(f,d)])}else"none"==t&&(l=[nb()],d&&(l=[nw(l[0],d)]));try{for(var p=(u=void 0,(0,g.__values)(l)),v=p.next();!v.done;v=p.next()){var f=v.value;f.level=s}}catch(e){u={error:e}}finally{try{v&&!v.done&&(c=p.return)&&c.call(p)}finally{if(u)throw u.error}}if(i.push(l),i.length>=h.seedMinLength&&(r=ng(i,n)))return"break";o=o.parentElement,s++}(););return(r||(r=ng(i,n)),!r&&n)?n():r}function ng(e,t){if(e.reduce(function(e,t){return e*t.length},1)>h.threshold)return t?t():null;var n,r,i=nI(function e(t,n){var r,i,o,s,a;return void 0===n&&(n=[]),(0,g.__generator)(this,function(u){switch(u.label){case 0:if(!(t.length>0))return[3,9];u.label=1;case 1:u.trys.push([1,6,7,8]),i=(r=(0,g.__values)(t[0])).next(),u.label=2;case 2:if(i.done)return[3,5];return o=i.value,[5,(0,g.__values)(e(t.slice(1,t.length),n.concat(o)))];case 3:u.sent(),u.label=4;case 4:return i=r.next(),[3,2];case 5:return[3,8];case 6:return s={error:u.sent()},[3,8];case 7:try{i&&!i.done&&(a=r.return)&&a.call(r)}finally{if(s)throw s.error}return[7];case 8:return[3,11];case 9:return[4,n];case 10:u.sent(),u.label=11;case 11:return[2]}})}(e));try{for(var o=(0,g.__values)(i),s=o.next();!s.done;s=o.next()){var a=s.value;if(nm(a))return a}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return null}function ny(e){for(var t=e[0],n=t.name,r=1;r<e.length;r++){var i=e[r].level||0;n=t.level===i-1?"".concat(e[r].name," > ").concat(n):"".concat(e[r].name," ").concat(n),t=e[r]}return n}function n_(e){return e.map(function(e){return e.penalty}).reduce(function(e,t){return e+t},0)}function nm(e){var t=ny(e);switch(p.querySelectorAll(t).length){case 0:throw Error("Can't select any node with this selector: ".concat(t));case 1:return!0;default:return!1}}function nb(){return{name:"*",penalty:3}}function nw(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}}function nE(e){return"html"!==e.name&&!e.name.startsWith("#")}function nS(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.filter(nT);return n.length>0?n:null}function nT(e){return null!=e}function nI(e){return(0,g.__spreadArray)([],(0,g.__read)(e),!1).sort(function(e,t){return n_(e)-n_(t)})}var nk=["input","select","textarea"],nO=function(e,t){return function(n,r){var i,o,s,a=e.pageUrlAllowlist,u=e.shouldTrackEventResolver,c=null==(o=null==(i=null==r?void 0:r.tagName)?void 0:i.toLowerCase)?void 0:o.call(i);if(!c)return!1;if(u)return u(n,r);if(!nR(window.location.href,a))return!1;var l=String(null==r?void 0:r.getAttribute("type"))||"";if("string"==typeof l)switch(l.toLowerCase()){case"hidden":case"password":return!1}if(t&&!t.some(function(e){var t;return!!(null==(t=null==r?void 0:r.matches)?void 0:t.call(r,e))}))return!1;switch(c){case"input":case"select":case"textarea":return"change"===n||"click"===n;default:var d=null==(s=null==window?void 0:window.getComputedStyle)?void 0:s.call(window,r);if(d&&"pointer"===d.getPropertyValue("cursor")&&"click"===n)return!0;return"click"===n}}},nP=function(e){if(null==e)return!1;if("string"==typeof e&&(/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11}
1)|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((e||"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(e)))return!1;return!0},nA=function(e){var t,n,r,i=null==(n=null==(t=null==e?void 0:e.tagName)?void 0:t.toLowerCase)?void 0:n.call(t),o=e instanceof HTMLElement&&(null==(r=e.getAttribute("contenteditable"))?void 0:r.toLowerCase())==="true";return!nk.includes(i)&&!o},nC=function(e){var t="";return nA(e)&&e.childNodes&&e.childNodes.length&&e.childNodes.forEach(function(e){var n="";e&&3===e.nodeType?e.textContent&&(n=e.textContent):n=nC(e),t+=n.split(/(\s+)/).filter(nP).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}),t},nx=function(e,t){var n,r,i="";try{return i=function(e,t){if(e.nodeType!==Node.ELEMENT_NODE)throw Error("Can't generate CSS selector for non-element node type.");if("html"===e.tagName.toLowerCase())return"html";var n,r,i={root:document.body,idName:function(e){return!0},className:function(e){return!0},tagName:function(e){return!0},attr:function(e,t){return!1},seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4};n=(h=(0,g.__assign)((0,g.__assign)({},i),t)).root,r=i,p=n.nodeType===Node.DOCUMENT_NODE?n:n===r.root?n.ownerDocument:n;var o=nv(e,"all",function(){return nv(e,"two",function(){return nv(e,"one",function(){return nv(e,"none")})})});if(o){var s=nI(function e(t,n,r){var i,o,s;return void 0===r&&(r={counter:0,visited:new Map}),(0,g.__generator)(this,function(a){switch(a.label){case 0:if(!(t.length>2&&t.length>h.optimizedMinLength))return[3,5];i=1,a.label=1;case 1:var u,c;if(!(i<t.length-1))return[3,5];if(r.counter>h.maxNumberOfTries||(r.counter+=1,(o=(0,g.__spreadArray)([],(0,g.__read)(t),!1)).splice(i,1),s=ny(o),r.visited.has(s)))return[2];if(!(nm(o)&&(u=o,c=n,p.querySelector(ny(u))===c)))return[3,4];return[4,o];case 2:return a.sent(),r.visited.set(s,!0),[5,(0,g.__values)(e(o,n,r))];case 3:a.sent(),a.label=4;case 4:return i++,[3,1];case 5:return[2]}})}(o,e));return s.length>0&&(o=s[0]),ny(o)}throw Error("Selector was not found.")}(e,{className:function(e){return e!==tC},maxNumberOfTries:1e3})}catch(e){t&&t.warn("Failed to get selector with finder, use fallback strategy instead: ".concat(e.toString()))}var o=null==(r=null==(n=null==e?void 0:e.tagName)?void 0:n.toLowerCase)?void 0:r.call(n);o&&(i=o);var s=e.getAttribute("id"),a=e.getAttribute("class");if(s)i="#".concat(s);else if(a){var u=a.split(" ").filter(function(e){return e!==tC}).join(".");u&&(i="".concat(i,".").concat(u))}return i},nR=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},nN=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return null!=r&&("object"!=typeof r||0!==Object.keys(r).length)&&("string"!=typeof r||0!==r.trim().length)&&(t[n]=r),t},{})},nj=function(e){var t,n=e.parentElement;if(!n)return"";try{t=n.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch(e){t=null}if(t){var r=t.textContent||"";return nP(r)?r:""}return nj(n)},nL=function(e,t){return e?t.some(function(t){var n;return null==(n=null==e?void 0:e.matches)?void 0:n.call(e,t)})?e:nL(null==e?void 0:e.parentElement,t):null},nU=function(e,t){if(!e)return{};var n,r,i,o=null==(i=null==(r=null==e?void 0:e.tagName)?void 0:r.toLowerCase)?void 0:i.call(r),s=nx(e,t);return nN(((n={})[tT]=o,n[tI]=nC(e),n[tk]=s,n[tO]=window.location.href.split("?")[0],n))},nD=function(e){return null!==e.event.target&&!!e.closestTrackedAncestor},nM=function(){function e(e){var t=(void 0===e?{}:e).origin,n=this;this.endpoint=tP,this.requestCallbacks={},this.onSelect=function(e){n.notify({action:"element-selected",data:e})},this.onTrack=function(e,t){"selector-mode-changed"===e?n.notify({action:"track-selector-mode-changed",data:t}):"selector-moved"===e&&n.notify({action:"track-selector-moved",data:t})},this.endpoint=void 0===t?tP:t}return e.prototype.notify=function(e){var t,n,r,i;null==(n=null==(t=this.logger)?void 0:t.debug)||n.call(t,"Message sent: ",JSON.stringify(e)),null==(i=null==(r=window.opener)?void 0:r.postMessage)||i.call(r,e,this.endpoint)},e.prototype.sendRequest=function(e,t,n){var r=this;void 0===n&&(n={timeout:15e3});var i="".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),o={id:i,action:e,args:t};return new Promise(function(t,s){r.requestCallbacks[i]={resolve:t,reject:s},r.notify(o),(null==n?void 0:n.timeout)>0&&setTimeout(function(){s(Error("".concat(e," timed out (id: ").concat(i,")"))),delete r.requestCallbacks[i]},n.timeout)})},e.prototype.handleResponse=function(e){var t;if(!this.requestCallbacks[e.id]){null==(t=this.logger)||t.warn("No callback found for request id: ".concat(e.id));return}this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]},e.prototype.setup=function(e){var t=this,n=void 0===e?{}:e,r=n.logger,i=n.endpoint,o=n.isElementSelectable,s=n.cssSelectorAllowlist,a=n.actionClickAllowlist;this.logger=r,i&&this.endpoint===tP&&(this.endpoint=i);var u=null;window.addEventListener("message",function(e){if(null==(r=null==(n=t.logger)?void 0:n.debug)||r.call(n,"Message received: ",JSON.stringify(e)),t.endpoint===e.origin){var n,r,i,c,l,d=null==e?void 0:e.data,f=null==d?void 0:d.action;if(f)if("id"in d)null==(c=null==(i=t.logger)?void 0:i.debug)||c.call(i,"Received Response to previous request: ",JSON.stringify(e)),t.handleResponse(d);else if("ping"===f)t.notify({action:"pong"});else if("initialize-visual-tagging-selector"===f){var h,p=null==d?void 0:d.data;(h="https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz",new Promise(function(e,t){var n;try{var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src=h,r.addEventListener("load",function(){e({status:!0})},{once:!0}),r.addEventListener("error",function(){t({status:!1,message:"Failed to load the script ".concat(h)})}),null==(n=document.head)||n.appendChild(r)}catch(e){t(e)}})).then(function(){var e;u=null==(e=null==window?void 0:window.amplitudeVisualTaggingSelector)?void 0:e.call(window,{getEventTagProps:nU,isElementSelectable:function(e){return!o||o((null==p?void 0:p.actionType)||"click",e)},onTrack:t.onTrack,onSelect:t.onSelect,visualHighlightClass:tC,messenger:t,cssSelectorAllowlist:s,actionClickAllowlist:a}),t.notify({action:"selector-loaded"})}).catch(function(){var e;null==(e=t.logger)||e.warn("Failed to initialize visual tagging selector")})}else"close-visual-tagging-selector"===f&&(null==(l=null==u?void 0:u.close)||l.call(u))}}),this.notify({action:"page-loaded"})},e}(),nq=["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot"],nF=["type"],n$=["svg","path","g"],nV=["password","hidden"],nW=function(e){return e?function(e,t){for(var n=0,r=0;r<e.length;r++){var i=e[r];if(null===i)n+=4;else{var o=function e(t,n){void 0===n&&(n=!1);try{if(null==t){if(n)return"None";return null}if("string"==typeof t){if(n){if((t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")).includes('"'))return"'".concat(t,"'");if(t.includes("'"))return'"'.concat(t.replace(/'/g,"\\'"),'"');return"'".concat(t,"'")}return t}if("boolean"==typeof t)return t?"True":"False";else if(Array.isArray(t)){var r=t.map(function(t){return e(t,!0)});return"[".concat(r.join(", "),"]")}else if("object"==typeof t){var i=Object.entries(t).filter(function(e){var t=(0,g.__read)(e,1)[0];return null!=t}).map(function(t){var n=(0,g.__read)(t,2),r=n[0],i=n[1];return"".concat(String(e(r,!0)),": ").concat(String(e(i,!0)))}),o="{".concat(i.join(", "),"}");return o.includes("\\'")&&(o=o.replace(/'/g,"'").replace(/'/g,"\\'")),o}return t.toString()}catch(e){return null}}(i);n+=o?Array.from(o).length:4}if(n>1024)return e.slice(0,r)}return e}((function(e){var t=[];if(!e)return t;
1t.push(e);for(var n=e.parentElement;n&&"HTML"!==n.tagName;)t.push(n),n=n.parentElement;return t})(e).map(function(e){return function(e){if(null===e)return null;var t,n,r,i,o,s,a=String(e.tagName).toLowerCase(),u={tag:a},c=Array.from(null!=(i=null==(r=e.parentElement)?void 0:r.children)?i:[]);c.length&&(u.index=c.indexOf(e),u.indexOfType=c.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var l=null==(s=null==(o=e.previousElementSibling)?void 0:o.tagName)?void 0:s.toLowerCase();l&&(u.prevSib=String(l));var d=e.getAttribute("id");d&&(u.id=String(d));var f=Array.from(e.classList);f.length&&(u.classes=f);var h={},p=Array.from(e.attributes).filter(function(e){return!nq.includes(e.name)}),v=!nA(e);if(!nV.includes(String(e.getAttribute("type")))&&!n$.includes(a))try{for(var y=(0,g.__values)(p),_=y.next();!_.done;_=y.next()){var m=_.value;(!v||nF.includes(m.name))&&(h[m.name]=String(m.value).substring(0,128))}}catch(e){t={error:e}}finally{try{_&&!_.done&&(n=y.return)&&n.call(y)}finally{if(t)throw t.error}}return Object.keys(h).length&&(u.attrs=h),u}(e)}),1024):[]};function nK(e,t){return nr(function(n,r){var i=0;n.subscribe(ni(r,function(n){return e.call(t,n,i++)&&r.next(n)}))})}var nB=function(e){function t(t,n){return e.call(this)||this}return(0,g.__extends)(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(tD),nz={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=nz.delegate;return(null==i?void 0:i.setInterval)?i.setInterval.apply(i,(0,g.__spreadArray)([e,t],(0,g.__read)(n))):setInterval.apply(void 0,(0,g.__spreadArray)([e,t],(0,g.__read)(n)))},clearInterval:function(e){var t=nz.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},nQ=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return(0,g.__extends)(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n,r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=null!=(n=this.id)?n:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),nz.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&nz.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(e){r=!0,n=e||Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,tU(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(nB),nH={now:function(){return(nH.delegate||Date).now()},delegate:void 0},nG=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=nH.now,e}(),nJ=new(function(e){function t(t,n){void 0===n&&(n=nG.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return(0,g.__extends)(t,e),t.prototype.flush=function(e){var t,n=this.actions;if(this._active)return void n.push(e);this._active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=n.shift());if(this._active=!1,t){for(;e=n.shift();)e.unsubscribe();throw t}},t}(nG))(nQ);function nY(e){return void 0===e&&(e=1/0),nu(t2,e)}var nZ=new t3(function(e){return e.complete()});function nX(e){return e&&tR(e.schedule)}function n0(e){return e[e.length-1]}function n1(e){return nX(n0(e))?e.pop():void 0}function n2(e,t){return void 0===t&&(t=0),nr(function(n,r){n.subscribe(ni(r,function(n){return na(r,e,function(){return r.next(n)},t)},function(){return na(r,e,function(){return r.complete()},t)},function(n){return na(r,e,function(){return r.error(n)},t)}))})}function n3(e,t){return void 0===t&&(t=0),nr(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function n4(e,t){if(!e)throw Error("Iterable cannot be null");return new t3(function(n){na(n,t,function(){var r=e[Symbol.asyncIterator]();na(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function n5(e,t){return t?function(e,t){if(null!=e){if(tR(e[t1]))return nt(e).pipe(n3(t),n2(t));if(tx(e))return new t3(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})});if(tN(e))return nt(e).pipe(n3(t),n2(t));if(t5(e))return n4(e,t);if(t6(e))return new t3(function(n){var r;return na(n,t,function(){r=e[t7](),na(n,t,function(){var e,t,i;try{t=(e=r.next()).value,i=e.done}catch(e){n.error(e);return}i?n.complete():n.next(t)},0,!0)}),function(){return tR(null==r?void 0:r.return)&&r.return()}});if(ne(e))return n4(t9(e),t)}throw t8(e)}(e,t):nt(e)}function n8(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=n1(t),i=(e=1/0,"number"==typeof n0(t)?t.pop():e);return t.length?1===t.length?nt(t[0]):nY(i)(n5(t,r)):nZ}function n7(e){return e<=0?function(){return nZ}:nr(function(t,n){var r=0;t.subscribe(ni(n,function(t){++r<=e&&(n.next(t),e<=r&&n.complete())}))})}function n6(e){return e instanceof Date&&!isNaN(e)}var n9=tj(function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}});function re(e){throw new n9(e)}!function(e){e.ClickObservable="clickObservable",e.ChangeObservable="changeObservable",e.NavigateObservable="navigateObservable",e.MutationObservable="mutationObservable"}(v||(v={}));var rt=function(e){void 0===e&&(e={});var t,n,r,i=e.dataAttributePrefix,o=void 0===i?"data-amp-track-":i,s=e.visualTaggingOptions,a=void 0===s?{enabled:!0,messenger:new nM}:s;e.cssSelectorAllowlist=null!=(t=e.cssSelectorAllowlist)?t:tw,e.actionClickAllowlist=null!=(n=e.actionClickAllowlist)?n:tE,e.debounceTime=null!=(r=e.debounceTime)?r:0;var u="@amplitude/plugin-autocapture-browser",c=[],l=void 0,d=function(){var e,t,n=nh(document,"click",{capture:!0}).pipe(ns(function(e){return h(e,"click")})),r=nh(document,"change",{capture:!0}).pipe(ns(function(e){return h(e,"change")}));window.navigation&&(t=nh(window.navigation,"navigate").pipe(ns(function(e){return h(e,"navigate")})));var i=new t3(function(e){var t=new MutationObserver(function(t){e.next(t)});return t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}}).pipe(ns(function(e){return h(e,"mutation")}));return(e={})[v.ClickObservable]=n,e[v.ChangeObservable]=r,e[v.NavigateObservable]=t,e[v.MutationObservable]=i,e},f=function(e,t){var n,r,i,s=null==(i=null==(r=null==t?void 0:t.tagName)?void 0:r.toLowerCase)?void 0:i.call(r),a="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},u=t.getAttribute("aria-label"),c=t.getAttributeNames().reduce(function(e,n){if(n.startsWith(o)){var r=n.replace(o,""),i=t.getAttribute(n);r&&(e[r]=i||"")}return e},{}),d=nj(t),f=nx(t,l),h=((n={})["[Amplitude] Element ID"]=t.getAttribute("id")||"",n["[Amplitude] Element Class"]=t.getAttribute("class"),n["[Amplitude] Element Hierarchy"]=nW(t),n[tT]=s,n[tI]=nC(t),n["[Amplitude] Element Position Left"]=null==a.left?null:Math.round(a.left),n["[Amplitude] Element Position Top"]=null==a.top?null:Math.round(a.top),n["[Amplitude] Element Aria Label"]=u,n["[Amplitude] Element Attributes"]=c,n[tk]=f,n["[Amplitude] Element Parent Label"]=d,n[tO]=window.location.href.split("?")[0],n["[Amplitude] Page Title"]="undefined"!=typeof document&&document.title||"",n["[Amplitude] Viewport Height"]=window.innerHeight,n["[Amplitude] Viewport Width"]=window.innerWidth,n);return"a"===s&&"click"===e&&t instanceof HTMLAnchorElement&&(h["[Amplitude] Element Href"]=t.href),nN(h)},h=function(t,n){var r={event:t,timestamp:Date.now(),type:n};if(("click"===r.type||"change"===r.type)&&null!==r.event.target){var i=nL(r.event.target,e.cssSelectorAllowlist);
1i&&(r.closestTrackedAncestor=i,r.targetElementProperties=f(r.type,i))}return r};return{name:u,type:"enrichment",setup:function(t,n){return(0,g.__awaiter)(void 0,void 0,void 0,function(){var r,i,o,s,h,p,v,y,_,m;return(0,g.__generator)(this,function(b){var w,E,S,T,I,k,O,P,A,C,x,R,N,j,L,U,D,M,q,F,$,V,W,K,B,z,Q,H,G,J,Y,Z,X,ee;return(l=t.loggerProvider,"undefined"==typeof document)?[2]:(r=nO(e,e.cssSelectorAllowlist),i=nO(e,e.actionClickAllowlist),E=(w={allObservables:o=d(),options:e,amplitude:n,shouldTrackEvent:r}).amplitude,S=w.allObservables,T=w.options,I=w.shouldTrackEvent,A=n8((k=S.clickObservable).pipe(nr(function(e,t){var n,r=!1;e.subscribe(ni(t,function(e){var i=n;n=e,r&&t.next([i,e]),r=!0}))}),nK(function(e){var t=(0,g.__read)(e,2),n=t[0],r=t[1],i=n.event.target!==r.event.target,o=20>=Math.abs(r.event.screenX-n.event.screenX)&&20>=Math.abs(r.event.screenY-n.event.screenY);return i&&!o})),k.pipe((O=T.debounceTime,void 0===P&&(P=nJ),nr(function(e,t){var n=null,r=null,i=null,o=function(){if(n){n.unsubscribe(),n=null;var e=r;r=null,t.next(e)}};function s(){var e=i+O,r=P.now();if(r<e){n=this.schedule(void 0,e-r),t.add(n);return}o()}e.subscribe(ni(t,function(e){r=e,i=P.now(),n||(n=P.schedule(s,O),t.add(n))},function(){o(),t.complete()},void 0,function(){r=n=null}))})),ns(function(){return"timeout"}))),s=k.pipe((void 0===C&&(C=nJ),x=0,R=C,void 0===x&&(x=0),void 0===N&&(N=nJ),j=-1,null!=R&&(nX(R)?N=R:j=R),L=new t3(function(e){var t=n6(x)?x-N.now():x;t<0&&(t=0);var n=0;return N.schedule(function(){e.closed||(e.next(n++),0<=j?this.schedule(void 0,j):e.complete())},t)}),function e(t,n){return n?function(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return nY(1)(n5(e,n1(e)))}(n.pipe(n7(1),nr(function(e,t){e.subscribe(ni(t,tW))})),r.pipe(e(t)))}:nu(function(e,n){return nt(t(e,n)).pipe(n7(1),ns(function(){return e}))})}(function(){return L})),nK(nD),nK(function(e){return I("click",e.closestTrackedAncestor)}),nr(function(e,t){var n=[];return e.subscribe(ni(t,function(e){return n.push(e)},function(){t.next(n),t.complete()})),nt(A).subscribe(ni(t,function(){var e=n;n=[],t.next(e)},tW)),function(){n=null}})).subscribe(function(e){var t,n,r=(e.length,tS);try{for(var i=(0,g.__values)(e),o=i.next();!o.done;o=i.next()){var s=o.value;null==E||E.track(r,s.targetElementProperties)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}),c.push(s),D=(U={allObservables:o,getEventProperties:f,amplitude:n,shouldTrackEvent:r}).amplitude,M=U.allObservables,q=U.getEventProperties,F=U.shouldTrackEvent,h=M.changeObservable.pipe(nK(nD),nK(function(e){return F("change",e.closestTrackedAncestor)})).subscribe(function(e){null==D||D.track("[Amplitude] Element Changed",q("change",e.closestTrackedAncestor))}),c.push(h),V=($={allObservables:o,options:e,getEventProperties:f,amplitude:n,shouldTrackEvent:r,shouldTrackActionClick:i}).amplitude,W=$.allObservables,K=$.options,B=$.getEventProperties,z=$.shouldTrackEvent,Q=$.shouldTrackActionClick,H=W.clickObservable,G=W.mutationObservable,J=W.navigateObservable,Y=H.pipe(nK(function(e){return!z("click",e.closestTrackedAncestor)}),ns(function(e){var t=nL(e.event.target,K.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=B(e.type,e.closestTrackedAncestor)),e}),nK(nD),nK(function(e){return Q("click",e.closestTrackedAncestor)})),Z=[G],J&&Z.push(J),X=n8.apply(void 0,(0,g.__spreadArray)([],(0,g.__read)(Z),!1)),p=Y.pipe((ee=function(e){return X.pipe(n7(1),function(e,t){var n=n6(e)?{first:e}:"number"==typeof e?{each:e}:e,r=n.first,i=n.each,o=n.with,s=void 0===o?re:o,a=n.scheduler,u=void 0===a?nJ:a,c=n.meta,l=void 0===c?null:c;if(null==r&&null==i)throw TypeError("No timeout provided.");return nr(function(e,t){var n,o,a=null,c=0,d=function(e){o=na(t,u,function(){try{n.unsubscribe(),nt(s({meta:l,lastValue:a,seen:c})).subscribe(t)}catch(e){t.error(e)}},e)};n=e.subscribe(ni(t,function(e){null==o||o.unsubscribe(),c++,t.next(a=e),i>0&&d(i)},void 0,void 0,function(){(null==o?void 0:o.closed)||null==o||o.unsubscribe(),a=null})),c||d(null!=r?"number"==typeof r?r:r-u.now():i)})}({first:500,with:function(){return nZ}}),ns(function(){return e}))},nr(function(e,t){var n=null,r=0,i=!1,o=function(){return i&&!n&&t.complete()};e.subscribe(ni(t,function(e){null==n||n.unsubscribe(),nt(ee(e,r++)).subscribe(n=ni(t,function(e){return t.next(e)},function(){n=null,o()}))},function(){i=!0,o()}))}))).subscribe(function(e){null==V||V.track(tS,B("click",e.closestTrackedAncestor))}),c.push(p),null==(_=null==t?void 0:t.loggerProvider)||_.log("".concat(u," has been successfully added.")),window.opener&&a.enabled&&(v=e.cssSelectorAllowlist,y=e.actionClickAllowlist,null==(m
1=a.messenger)||m.setup((0,g.__assign)((0,g.__assign)({logger:null==t?void 0:t.loggerProvider},(null==t?void 0:t.serverZone)&&{endpoint:tA[t.serverZone]}),{isElementSelectable:nO(e,(0,g.__spreadArray)((0,g.__spreadArray)([],(0,g.__read)(v),!1),(0,g.__read)(y),!1)),cssSelectorAllowlist:v,actionClickAllowlist:y}))),[2])})})},execute:function(e){return(0,g.__awaiter)(void 0,void 0,void 0,function(){return(0,g.__generator)(this,function(t){return[2,e]})})},teardown:function(){return(0,g.__awaiter)(void 0,void 0,void 0,function(){var e,t,n,r;return(0,g.__generator)(this,function(i){try{for(t=(e=(0,g.__values)(c)).next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(r=e.return)&&r.call(e)}finally{if(n)throw n.error}}return[2]})})}}},rn="dclid",rr="fbclid",ri="gbraid",ro="gclid",rs="ko_click_id",ra="li_fat_id",ru="msclkid",rc="rtd_cid",rl="ttclid",rd="twclid",rf="wbraid",rh={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},rp=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},rv=function(e,t,n,r,i){void 0===i&&(i=!0),e.referrer;var o=e.referring_domain,s=(0,g.__rest)(e,["referrer","referring_domain"]),a=t||{},u=(a.referrer,a.referring_domain),c=(0,g.__rest)(a,["referrer","referring_domain"]);if(rg(n.excludeReferrers,e.referring_domain))return r.debug("This is not a new campaign because ".concat(e.referring_domain," is in the exclude referrer list.")),!1;if(!i&&Object.values(e).every(function(e){return!e})&&t)return r.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var l=JSON.stringify(s)!==JSON.stringify(c),d=rp(o||"")!==rp(u||""),f=!t||l||d;return f?r.debug("This is a new campaign. An $identify event will be sent."):r.debug("This is not a new campaign because it's the same as the previous one."),f},rg=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=""),e.some(function(e){return e instanceof RegExp?e.test(t):e===t})},ry=function(e){var t=e;return t?(t.startsWith(".")&&(t=t.substring(1)),[new RegExp("".concat(t.replace(".","\\."),"$"))]):[]},r_=function(){function e(){}return e.prototype.parse=function(){return(0,g.__awaiter)(this,void 0,void 0,function(){return(0,g.__generator)(this,function(e){return[2,(0,g.__assign)((0,g.__assign)((0,g.__assign)((0,g.__assign)({},rh),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=S();return{utm_campaign:e.utm_campaign,utm_content:e.utm_content,utm_id:e.utm_id,utm_medium:e.utm_medium,utm_source:e.utm_source,utm_term:e.utm_term}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!=(t=null==(e=n.referrer)?void 0:e.split("/")[2])?t:void 0}catch(e){}return n},e.prototype.getClickIds=function(){var e,t=S();return(e={})[rn]=t[rn],e[rr]=t[rr],e[ri]=t[ri],e[ro]=t[ro],e[rs]=t[rs],e[ra]=t[ra],e[ru]=t[ru],e[rc]=t[rc],e[rl]=t[rl],e[rd]=t[rd],e[rf]=t[rf],e},e}(),rm=function(){function e(e,t){var n,r,i;this.shouldTrackNewCampaign=!1,this.options=(0,g.__assign)({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:ry(null==(n=t.cookieOptions)?void 0:n.domain)},e),this.storage=t.cookieStorage,this.storageKey=(r=t.apiKey,void 0===i&&(i=10),[M.r,"MKTG",r.substring(0,i)].filter(Boolean).join("_")),this.currentCampaign=rh,this.sessionTimeout=t.sessionTimeout,this.lastEventTime=t.lastEventTime,this.logger=t.loggerProvider,t.loggerProvider.log("Installing web attribution tracking.")}return e.prototype.init=function(){return(0,g.__awaiter)(this,void 0,void 0,function(){var e,t;return(0,g.__generator)(this,function(n){switch(n.label){case 0:return[4,this.fetchCampaign()];case 1:if(t=g.__read.apply(void 0,[n.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||ee(this.sessionTimeout,this.lastEventTime),!rv(this.currentCampaign,this.previousCampaign,this.options,this.logger,e))return[3,3];return this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return(0,g.__awaiter)(this,void 0,void 0,function(){return(0,g.__generator)(this,function(e){switch(e.label){case 0:return[4,Promise.all([new r_().parse(),this.storage.get(this.storageKey)])];case 1:return[2,e.sent()]}})})},e.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var t,n,r=(t=this.currentCampaign,n=this.options,en(Object.entries((0,g.__assign)((0,g.__assign)({},rh),t)).reduce(function(e,t){var r,i=(0,g.__read)(t,2),o=i[0],s=i[1];return(e.setOnce("initial_".concat(o),null!=(r=null!=s?s:n.initialEmptyValue)?r:"EMPTY"),s)?e.set(o,s):e.unset(o)},new Y.T)));return e&&(r.event_id=e),r},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}(),rb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,g.__extends)(t,e),t.prototype.init=function(e,t,n){var r,i;return void 0===e&&(e=""),arguments.length>
12?(r=t,i=n):"string"==typeof t?(r=t,i=void 0):(r=null==t?void 0:t.userId,i=t),w(this._init((0,g.__assign)((0,g.__assign)({},i),{userId:r,apiKey:e})))},t.prototype._init=function(t){return(0,g.__awaiter)(this,void 0,void 0,function(){var n,r,i,o,s,a,u,c,l=this;return(0,g.__generator)(this,function(d){var f,h;switch(d.label){case 0:if(this.initializing)return[2];return this.initializing=!0,[4,eH(t.apiKey,t,this)];case 1:if(n=d.sent(),!t.fetchRemoteConfig)return[3,4];return[4,(f=n,(0,g.__awaiter)(void 0,void 0,void 0,function(){var e;return(0,g.__generator)(this,function(t){switch(t.label){case 0:return[4,(e=new tb(f)).initialize()];case 1:return t.sent(),[2,e]}})}))];case 2:return[4,d.sent().generateJoinedConfig()];case 3:n=d.sent(),d.label=4;case 4:return[4,e.prototype._init.call(this,n)];case 5:if(d.sent(),this.logBrowserOptions(n),!ea(this.config.defaultTracking))return[3,7];return r=ea((h=this.config).defaultTracking)&&h.defaultTracking&&"object"==typeof h.defaultTracking&&h.defaultTracking.attribution&&"object"==typeof h.defaultTracking.attribution?(0,g.__assign)({},h.defaultTracking.attribution):{},this.webAttribution=new rm(r,this.config),[4,this.webAttribution.init()];case 6:d.sent(),d.label=7;case 7:if(o=Number.isNaN(Number((i=S()).ampSessionId))?void 0:Number(i.ampSessionId),this.setSessionId(null!=(c=null!=(u=null!=(a=t.sessionId)?a:o)?u:this.config.sessionId)?c:Date.now()),(s=L(t.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),null===this.config.offline)return[3,9];return[4,this.add(tv()).promise];case 8:d.sent(),d.label=9;case 9:return[4,this.add(new G).promise];case 10:return d.sent(),[4,this.add(new eg).promise];case 11:return d.sent(),[4,this.add(new J).promise];case 12:if(d.sent(),tp(this.config),!es(this.config.defaultTracking,"fileDownloads"))return[3,14];return this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(tf()).promise];case 13:d.sent(),d.label=14;case 14:if(!es(this.config.defaultTracking,"formInteractions"))return[3,16];return this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(tc()).promise];case 15:d.sent(),d.label=16;case 16:if(!eu(this.config.defaultTracking))return[3,18];return this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(to(ef(this.config))).promise];case 17:d.sent(),d.label=18;case 18:if(!el(this.config.autocapture))return[3,20];return this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(rt(ed(this.config))).promise];case 19:d.sent(),d.label=20;case 20:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 21:return d.sent(),s.eventBridge.setEventReceiver(function(e){l.track(e.eventType,e.eventProperties)}),[2]}})})},t.prototype.getUserId=function(){var e;return null==(e=this.config)?void 0:e.userId},t.prototype.setUserId=function(e){if(!this.config)return void this.q.push(this.setUserId.bind(this,e));this.config.loggerProvider.debug("function setUserId: ",e),(e!==this.config.userId||void 0===e)&&(this.config.userId=e,U(e,this.config.instanceName))},t.prototype.getDeviceId=function(){var e;return null==(e=this.config)?void 0:e.deviceId},t.prototype.setDeviceId=function(e){if(!this.config)return void this.q.push(this.setDeviceId.bind(this,e));this.config.loggerProvider.debug("function setDeviceId: ",e),this.config.deviceId=e,D(e,this.config.instanceName)},t.prototype.reset=function(){this.setDeviceId(Q()),this.setUserId(void 0)},t.prototype.getSessionId=function(){var e;return null==(e=this.config)?void 0:e.sessionId},t.prototype.setSessionId=function(e){var t,n=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),w(Promise.resolve());if(e===this.config.sessionId)return w(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var r=this.getSessionId(),i=this.config.lastEventTime,o=null!=(t=this.config.lastEventId)?t:-1;this.config.sessionId=e,this.config.lastEventTime=void 0,this.config.pageCounter=0,ec(this.config.defaultTracking)&&(r&&i&&n.push(this.track(eD,void 0,{device_id:this.previousSessionDeviceId,event_id:++o,session_id:r,time:i+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var s=this.trackCampaignEventIfNeeded(++o,n);return ec(this.config.defaultTracking)&&n.push(this.track(eU,void 0,{event_id:s?++o:o,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,w(Promise.all(n))},t.prototype.extendSession=function(){if(!this.config)return void this.q.push(this.extendSession.bind(this));
1this.config.lastEventTime=Date.now()},t.prototype.setTransport=function(e){if(!this.config)return void this.q.push(this.setTransport.bind(this,e));this.config.transportProvider=eJ(e)},t.prototype.identify=function(t,n){if(ep(t)){var r=t._q;t._q=[],t=eh(new Y.T,r)}return(null==n?void 0:n.user_id)&&this.setUserId(n.user_id),(null==n?void 0:n.device_id)&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},t.prototype.groupIdentify=function(t,n,r,i){if(ep(r)){var o=r._q;r._q=[],r=eh(new Y.T,o)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if(ep(t)){var r=t._q;t._q=[],t=eh(new X,r)}return e.prototype.revenue.call(this,t,n)},t.prototype.trackCampaignEventIfNeeded=function(e,t){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign)return!1;var n=this.webAttribution.generateCampaignEvent(e);return t?t.push(this.track(n).promise):this.track(n),this.config.loggerProvider.log("Tracking attribution."),!0},t.prototype.process=function(t){return(0,g.__awaiter)(this,void 0,void 0,function(){var n,r,i;return(0,g.__generator)(this,function(o){return n=Date.now(),r=ee(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type!==eU&&t.event_type!==eD&&(!t.session_id||t.session_id===this.getSessionId())&&(r||i?(this.setSessionId(n),i&&this.config.loggerProvider.log("Created a new session for new campaign.")):r||this.trackCampaignEventIfNeeded()),[2,e.prototype.process.call(this,t)]})})},t.prototype.logBrowserOptions=function(e){try{var t=(0,g.__assign)((0,g.__assign)({},e),{apiKey:e.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",JSON.stringify(t))}catch(e){this.config.loggerProvider.error("Error logging browser config",e)}},t}(eo),rw=function(){var e=new rb;return{init:b(e.init.bind(e),"init",y(e),m(e,["config"])),add:b(e.add.bind(e),"add",y(e),m(e,["config.apiKey","timeline.plugins"])),remove:b(e.remove.bind(e),"remove",y(e),m(e,["config.apiKey","timeline.plugins"])),track:b(e.track.bind(e),"track",y(e),m(e,["config.apiKey","timeline.queue.length"])),logEvent:b(e.logEvent.bind(e),"logEvent",y(e),m(e,["config.apiKey","timeline.queue.length"])),identify:b(e.identify.bind(e),"identify",y(e),m(e,["config.apiKey","timeline.queue.length"])),groupIdentify:b(e.groupIdentify.bind(e),"groupIdentify",y(e),m(e,["config.apiKey","timeline.queue.length"])),setGroup:b(e.setGroup.bind(e),"setGroup",y(e),m(e,["config.apiKey","timeline.queue.length"])),revenue:b(e.revenue.bind(e),"revenue",y(e),m(e,["config.apiKey","timeline.queue.length"])),flush:b(e.flush.bind(e),"flush",y(e),m(e,["config.apiKey","timeline.queue.length"])),getUserId:b(e.getUserId.bind(e),"getUserId",y(e),m(e,["config","config.userId"])),setUserId:b(e.setUserId.bind(e),"setUserId",y(e),m(e,["config","config.userId"])),getDeviceId:b(e.getDeviceId.bind(e),"getDeviceId",y(e),m(e,["config","config.deviceId"])),setDeviceId:b(e.setDeviceId.bind(e),"setDeviceId",y(e),m(e,["config","config.deviceId"])),reset:b(e.reset.bind(e),"reset",y(e),m(e,["config","config.userId","config.deviceId"])),getSessionId:b(e.getSessionId.bind(e),"getSessionId",y(e),m(e,["config"])),setSessionId:b(e.setSessionId.bind(e),"setSessionId",y(e),m(e,["config"])),extendSession:b(e.extendSession.bind(e),"extendSession",y(e),m(e,["config"])),setOptOut:b(e.setOptOut.bind(e),"setOptOut",y(e),m(e,["config"])),setTransport:b(e.setTransport.bind(e),"setTransport",y(e),m(e,["config"]))}};rw()},85633:(e,t,n)=>{"use strict";n.d(t,{w:()=>o});var r=n(71041),i=r.createContext(!1),o=()=>r.useContext(i);i.Provider},85971:(e,t,n)=>{"use strict";n.d(t,{h:()=>o});var r=n(71041);n(74429);var i=r.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),o=()=>r.useContext(i)},87385:(e,t,n)=>{"use strict";function r(e,t){return"function"==typeof e?e(...t):!!e}function i(){}n.d(t,{G:()=>r,l:()=>i})}
1,88052:(e,t,n)=>{"use strict";n.d(t,{$:()=>M});var r,i,o,s,a,u,c,l,d,f,h,p,v,g,y,_,m,b,w,E,S,T,I,k,O=n(41292),P=n(88967),A=n(58075),C=n(73238),x=n(6132),R=n(63837),N=n(73334),j=n(14658),L=n(72371),U=n(5617),D=n(29811),M=(r=new WeakMap,i=new WeakMap,o=new WeakMap,s=new WeakMap,a=new WeakMap,u=new WeakMap,c=new WeakMap,l=new WeakMap,d=new WeakMap,f=new WeakMap,h=new WeakMap,p=new WeakMap,v=new WeakMap,g=new WeakMap,y=new WeakMap,_=new WeakSet,m=new WeakSet,b=new WeakSet,w=new WeakSet,E=new WeakSet,S=new WeakSet,T=new WeakSet,I=new WeakSet,k=new WeakSet,class extends L.Q{bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&((0,O._)(this,i).addObserver(this),q((0,O._)(this,i),this.options)?(0,C._)(this,_,W).call(this):this.updateResult(),(0,C._)(this,E,Q).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return F((0,O._)(this,i),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return F((0,O._)(this,i),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,(0,C._)(this,S,H).call(this),(0,C._)(this,T,G).call(this),(0,O._)(this,i).removeObserver(this)}setOptions(e,t){let n=this.options,o=(0,O._)(this,i);if(this.options=(0,O._)(this,r).defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,D.Eh)(this.options.enabled,(0,O._)(this,i)))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");(0,C._)(this,I,J).call(this),(0,O._)(this,i).setOptions(this.options),n._defaulted&&!(0,D.f8)(this.options,n)&&(0,O._)(this,r).getQueryCache().notify({type:"observerOptionsUpdated",query:(0,O._)(this,i),observer:this});let s=this.hasListeners();s&&$((0,O._)(this,i),o,this.options,n)&&(0,C._)(this,_,W).call(this),this.updateResult(t),s&&((0,O._)(this,i)!==o||(0,D.Eh)(this.options.enabled,(0,O._)(this,i))!==(0,D.Eh)(n.enabled,(0,O._)(this,i))||(0,D.d2)(this.options.staleTime,(0,O._)(this,i))!==(0,D.d2)(n.staleTime,(0,O._)(this,i)))&&(0,C._)(this,m,K).call(this);let a=(0,C._)(this,b,B).call(this);s&&((0,O._)(this,i)!==o||(0,D.Eh)(this.options.enabled,(0,O._)(this,i))!==(0,D.Eh)(n.enabled,(0,O._)(this,i))||a!==(0,O._)(this,g))&&(0,C._)(this,w,z).call(this,a)}getOptimisticResult(e){var t,n;let o=(0,O._)(this,r).getQueryCache().build((0,O._)(this,r),e),c=this.createResult(o,e);return t=this,n=c,(0,D.f8)(t.getCurrentResult(),n)||((0,A._)(this,s,c),(0,A._)(this,u,this.options),(0,A._)(this,a,(0,O._)(this,i).state)),c}getCurrentResult(){return(0,O._)(this,s)}trackResult(e,t){let n={};return Object.keys(e).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),t?.(r),e[r])})}),n}trackProp(e){(0,O._)(this,y).add(e)}getCurrentQuery(){return(0,O._)(this,i)}refetch(){let{...e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.fetch({...e})}fetchOptimistic(e){let t=(0,O._)(this,r).defaultQueryOptions(e),n=(0,O._)(this,r).getQueryCache().build((0,O._)(this,r),t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return(0,C._)(this,_,W).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),(0,O._)(this,s)))}createResult(e,t){let n,r=(0,O._)(this,i),p=this.options,v=(0,O._)(this,s),g=(0,O._)(this,a),y=(0,O._)(this,u),_=e!==r?e.state:(0,O._)(this,o),{state:m}=e,b={...m},w=!1;if(t._optimisticResults){let n=this.hasListeners(),i=!n&&q(e,t),o=n&&$(e,r,t,p);(i||o)&&(b={...b,...(0,j.k)(m.data,e.options)}),"isRestoring"===t._optimisticResults&&(b.fetchStatus="idle")}let{error:E,errorUpdatedAt:S,status:T}=b;if(t.select&&void 0!==b.data)if(v&&b.data===g?.data&&t.select===(0,O._)(this,d))n=(0,O._)(this,f);else try{(0,A._)(this,d,t.select),n=t.select(b.data),n=(0,D.pl)(v?.data,n,t),(0,A._)(this,f,n),(0,A._)(this,l,null)}catch(e){(0,A._)(this,l,e)}else n=b.data;if(void 0!==t.placeholderData&&void 0===n&&"pending"===T){let e;if(v?.isPlaceholderData&&t.placeholderData===y?.placeholderData)e=v.data;else if(e="function"==typeof t.placeholderData?t.placeholderData((0,O._)(this,h)?.state.data,(0,O._)(this,h)):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),(0,A._)(this,l,null)}catch(e){(0,A._)(this,l,e)}void 0!==e&&(T="success",n=(0,D.pl)(v?.data,e,t),w=!0)}(0,O._)(this,l)&&(E=(0,O._)(this,l),n=(0,O._)(this,f),S=Date.now(),T="error");let I="fetching"===b.fetchStatus,k="pending"===T,P="error"===T,C=k&&I,x=void 0!==n,R={status:T,fetchStatus:b.fetchStatus,isPending:k,isSuccess:"success"===T,isError:P,isInitialLoading:C,isLoading:C,data:n,dataUpdatedAt:b.dataUpdatedAt,error:E,errorUpdatedAt:S,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdate
1Count:b.errorUpdateCount,isFetched:b.dataUpdateCount>0||b.errorUpdateCount>0,isFetchedAfterMount:b.dataUpdateCount>_.dataUpdateCount||b.errorUpdateCount>_.errorUpdateCount,isFetching:I,isRefetching:I&&!k,isLoadingError:P&&!x,isPaused:"paused"===b.fetchStatus,isPlaceholderData:w,isRefetchError:P&&x,isStale:V(e,t),refetch:this.refetch,promise:(0,O._)(this,c)};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===R.status?e.reject(R.error):void 0!==R.data&&e.resolve(R.data)},n=()=>{t((0,A._)(this,c,R.promise=(0,U.T)()))},i=(0,O._)(this,c);switch(i.status){case"pending":e.queryHash===r.queryHash&&t(i);break;case"fulfilled":("error"===R.status||R.data!==i.value)&&n();break;case"rejected":("error"!==R.status||R.error!==i.reason)&&n()}}return R}updateResult(e){let t=(0,O._)(this,s),n=this.createResult((0,O._)(this,i),this.options);if((0,A._)(this,a,(0,O._)(this,i).state),(0,A._)(this,u,this.options),void 0!==(0,O._)(this,a).data&&(0,A._)(this,h,(0,O._)(this,i)),(0,D.f8)(n,t))return;(0,A._)(this,s,n);let r={},o=()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options,n="function"==typeof e?e():e;if("all"===n||!n&&!(0,O._)(this,y).size)return!0;let r=new Set(n??(0,O._)(this,y));return this.options.throwOnError&&r.add("error"),Object.keys((0,O._)(this,s)).some(e=>(0,O._)(this,s)[e]!==t[e]&&r.has(e))};e?.listeners!==!1&&o()&&(r.listeners=!0),(0,C._)(this,k,Y).call(this,{...r,...e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&(0,C._)(this,E,Q).call(this)}constructor(e,t){super(),(0,x._)(this,_),(0,x._)(this,m),(0,x._)(this,b),(0,x._)(this,w),(0,x._)(this,E),(0,x._)(this,S),(0,x._)(this,T),(0,x._)(this,I),(0,x._)(this,k),(0,P._)(this,r,{writable:!0,value:void 0}),(0,P._)(this,i,{writable:!0,value:void 0}),(0,P._)(this,o,{writable:!0,value:void 0}),(0,P._)(this,s,{writable:!0,value:void 0}),(0,P._)(this,a,{writable:!0,value:void 0}),(0,P._)(this,u,{writable:!0,value:void 0}),(0,P._)(this,c,{writable:!0,value:void 0}),(0,P._)(this,l,{writable:!0,value:void 0}),(0,P._)(this,d,{writable:!0,value:void 0}),(0,P._)(this,f,{writable:!0,value:void 0}),(0,P._)(this,h,{writable:!0,value:void 0}),(0,P._)(this,p,{writable:!0,value:void 0}),(0,P._)(this,v,{writable:!0,value:void 0}),(0,P._)(this,g,{writable:!0,value:void 0}),(0,P._)(this,y,{writable:!0,value:void 0}),(0,A._)(this,i,void 0),(0,A._)(this,o,void 0),(0,A._)(this,s,void 0),(0,A._)(this,y,new Set),this.options=t,(0,A._)(this,r,e),(0,A._)(this,l,null),(0,A._)(this,c,(0,U.T)()),this.options.experimental_prefetchInRender||(0,O._)(this,c).reject(Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}});function q(e,t){return!1!==(0,D.Eh)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&F(e,t,t.refetchOnMount)}function F(e,t,n){if(!1!==(0,D.Eh)(t.enabled,e)){let r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&V(e,t)}return!1}function $(e,t,n,r){return(e!==t||!1===(0,D.Eh)(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&V(e,n)}function V(e,t){return!1!==(0,D.Eh)(t.enabled,e)&&e.isStaleByTime((0,D.d2)(t.staleTime,e))}function W(e){(0,C._)(this,I,J).call(this);let t=(0,O._)(this,i).fetch(this.options,e);return e?.throwOnError||(t=t.catch(D.lQ)),t}function K(){(0,C._)(this,S,H).call(this);let e=(0,D.d2)(this.options.staleTime,(0,O._)(this,i));if(D.S$||(0,O._)(this,s).isStale||!(0,D.gn)(e))return;let t=(0,D.j3)((0,O._)(this,s).dataUpdatedAt,e);(0,A._)(this,p,setTimeout(()=>{(0,O._)(this,s).isStale||this.updateResult()},t+1))}function B(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval((0,O._)(this,i)):this.options.refetchInterval)??!1}function z(e){(0,C._)(this,T,G).call(this),(0,A._)(this,g,e),!D.S$&&!1!==(0,D.Eh)(this.options.enabled,(0,O._)(this,i))&&(0,D.gn)((0,O._)(this,g))&&0!==(0,O._)(this,g)&&(0,A._)(this,v,setInterval(()=>{(this.options.refetchIntervalInBackground||R.m.isFocused())&&(0,C._)(this,_,W).call(this)},(0,O._)(this,g)))}function Q(){(0,C._)(this,m,K).call(this),(0,C._)(this,w,z).call(this,(0,C._)(this,b,B).call(this))}function H(){(0,O._)(this,p)&&(clearTimeout((0,O._)(this,p)),(0,A._)(this,p,void 0))}function G(){(0,O._)(this,v)&&(clearInterval((0,O._)(this,v)),(0,A._)(this,v,void 0))}function J(){let e=(0,O._)(this,r).getQueryCache().build((0,O._)(this,r),this.options);if(e===(0,O._)(this,i))return;let t=(0,O._)(this,i);(0,A._)(this,i,e),(0,A._)(this,o,e.state),this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}function Y(e){N.j.batch(()=>
1{e.listeners&&this.listeners.forEach(e=>{e((0,O._)(this,s))}),(0,O._)(this,r).getQueryCache().notify({query:(0,O._)(this,i),type:"observerResultsUpdated"})})}},88967:(e,t,n)=>{"use strict";n.d(t,{_:()=>i});var r=n(93475);function i(e,t,n){(0,r._)(e,t),t.set(e,n)}},89054:(e,t,n)=>{"use strict";function r(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}n.d(t,{_:()=>r})},92417:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return function(e,t,n,r,i,o,s,a,u){if(!e[r]){var c=function(){var r=t.createElement(n);r.onerror=function(){l.queue.filter(function(e){return 0<=s.indexOf(e[0])}).forEach(function(e){"function"==typeof(e=(e=e[1])[e.length-1])&&e("error occur when load airbridge")})},r.async=1,r.src=i,"complete"===t.readyState?t.head.appendChild(r):e.addEventListener("load",function n(){e.removeEventListener("load",n),t.head.appendChild(r)})},l={queue:[],get isSDKEnabled(){return!1}};o.concat(s).forEach(function(e){var t=e.split("."),n=t.pop();t.reduce(function(e,t){return e[t]=e[t]||{}},l)[n]=function(){l.queue.push([e,arguments])}}),e[r]=l,0<a?(r=new(e.XDomainRequest||e.XMLHttpRequest),o=function(){},r.open("GET",i),r.timeout=a,r.onload=function(){c()},r.onerror=o,r.onprogress=o,r.ontimeout=o,r.send()):c()}}(window,document,"script","airbridge","//static.airbridge.io/sdk/latest/airbridge.min.js","init startTracking stopTracking fetchResource openBanner setBanner setDownload setDownloads openDeeplink setDeeplinks sendWeb setUserAgent setMobileAppData setUserID clearUserID setUserEmail clearUserEmail setUserPhone clearUserPhone setUserAttribute removeUserAttribute clearUserAttributes setUserAlias removeUserAlias clearUserAlias clearUser setUserId setUserAttributes addUserAlias setDeviceAlias removeDeviceAlias clearDeviceAlias setDeviceIFV setDeviceIFA setDeviceGAID events.send events.signIn events.signUp events.signOut events.purchased events.addedToCart events.productDetailsViewEvent events.homeViewEvent events.productListViewEvent events.searchResultViewEvent".split(" "),["events.wait","createTouchpoint"],0)}},93475:(e,t,n)=>{"use strict";function r(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}n.d(t,{_:()=>r})},94995:(e,t,n)=>{var r=n(96998),i=n(25671),o=n(8360),s=n(95881),a=n(11499),u=n(77882),c=n(75895),l="[object Map]",d="[object Promise]",f="[object Set]",h="[object WeakMap]",p="[object DataView]",v=c(r),g=c(i),y=c(o),_=c(s),m=c(a),b=u;
1(r&&b(new r(new ArrayBuffer(1)))!=p||i&&b(new i)!=l||o&&b(o.resolve())!=d||s&&b(new s)!=f||a&&b(new a)!=h)&&(b=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case v:return p;case g:return l;case y:return d;case _:return f;case m:return h}return t}),e.exports=b},95881:(e,t,n)=>{e.exports=n(11650)(n(28811),"Set")},96979:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},96998:(e,t,n)=>{e.exports=n(11650)(n(28811),"DataView")},97367:(e,t,n)=>{var r=n(48842),i=n(94995),o=n(16450),s=n(867),a=n(59156),u=n(38688),c=n(20815),l=n(52783),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(a(e)&&(s(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||o(e)))return!e.length;var t=i(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(d.call(e,n))return!1;return!0}},97464:(e,t,n)=>{"use strict";e.exports=n(62735)},97536:(e,t,n)=>{"use strict";n.d(t,{EU:()=>o,iL:()=>s,jv:()=>r,nE:()=>i});var r=e=>{let t=e.staleTime;e.suspense&&(e.staleTime="function"==typeof t?(...e)=>Math.max(t(...e),1e3):Math.max(t??1e3,1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))},i=(e,t)=>e.isLoading&&e.isFetching&&!t,o=(e,t)=>e?.suspense&&t.isPending,s=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.