PageSourceSearch

https://cdn-useast1.kapwing.com/static-pages/prod/_next/static/chunks/pages/_app-9d98d4aab351bed6.js

js kapwing.com collected 2026-09-24 09:12:47 UTC 208,795 bytes, 11 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{94784:function(e,t,n){var r={"./ar/messages":[1938,1938],"./cmn-hans-cn/messages":[85594,5594],"./de/messages":[74884,4884],"./en/messages":[48407,8407],"./es-es/messages":[76160,6160],"./es-mx/messages":[77808,7808],"./es/messages":[10737,737],"./fil-ph/messages":[6247,6247],"./fr-fr/messages":[53614,3614],"./fr/messages":[24512,4512],"./he/messages":[84488,4488],"./hi-in/messages":[37895,7895],"./id/messages":[53655,3655],"./it/messages":[25813,5813],"./ja/messages":[88392,8392],"./ko/messages":[90328,328],"./nl/messages":[88495,8495],"./pl/messages":[62482,2482],"./pt-br/messages":[56712,6712],"./pt/messages":[65219,5219],"./ru/messages":[27716,7716],"./tr/messages":[77676,7676]};function i(e){if(!n.o(r,e))return Promise.resolve().then(function(){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=r[e],i=t[0];return n.e(t[1]).then(function(){return n.t(i,23)})}i.keys=function(){return Object.keys(r)},i.id=94784,e.exports=i},63420:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=n(20503),i=n(73732);t.default=function({html:e,height:t=null,width:n=null,children:o,dataNtpc:s=""}){return(0,i.useEffect)(()=>{s&&performance.mark("mark_feature_usage",{detail:{feature:`next-third-parties-${s}`}})},[s]),(0,r.jsxs)(r.Fragment,{children:[o,e?(0,r.jsx)("div",{style:{height:null!=t?`${t}px`:"auto",width:null!=n?`${n}px`:"auto"},"data-ntpc":s,dangerouslySetInnerHTML:{__html:e}}):null]})}},84718:function(e,t,n){"use strict";let r;var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendGAEvent=t.GoogleAnalytics=void 0;let o=n(20503),s=n(73732),u=i(n(77181));t.GoogleAnalytics=function(e){let{gaId:t,dataLayerName:n="dataLayer"}=e;return void 0===r&&(r=n),(0,s.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-ga"}})},[]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u.default,{id:"_next-ga-init",dangerouslySetInnerHTML:{__html:`
2          window['${n}'] = window['${n}'] || [];
3          function gtag(){window['${n}'].push(arguments);}
4          gtag('js', new Date());
5
6          gtag('config', '${t}');`}}),(0,o.jsx)(u.default,{id:"_next-ga",src:`https://www.googletagmanager.com/gtag/js?id=${t}`})]})},t.sendGAEvent=function(...e){if(void 0===r){console.warn("@next/third-parties: GA has not been initialized");return}window[r]?window[r].push(arguments):console.warn(`@next/third-parties: GA dataLayer ${r} does not exist`)}},69211:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let i=n(20503),o=n(59517),s=r(n(63420));t.default=function(e){let{apiKey:t,...n}=e,r={...n,key:t},{html:u}=(0,o.GoogleMapsEmbed)(r);return(0,i.jsx)(s.default,{height:r.height||null,width:r.width||null,html:u,dataNtpc:"GoogleMapsEmbed"})}},65694:function(e,t,n){"use strict";let r;var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendGTMEvent=t.GoogleTagManager=void 0;let o=n(20503),s=n(73732),u=i(n(77181));t.GoogleTagManager=function(e){let{gtmId:t,dataLayerName:n="dataLayer",auth:i,preview:a,dataLayer:c}=e;void 0===r&&(r=n);let l="dataLayer"!==n?`&l=${n}`:"",d=i?`&gtm_auth=${i}`:"",f=a?`&gtm_preview=${a}&gtm_cookies_win=x`:"";return(0,s.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-gtm"}})},[]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u.default,{id:"_next-gtm-init",dangerouslySetInnerHTML:{__html:`
7      (function(w,l){
8        w[l]=w[l]||[];
9        w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});
10        ${c?`w[l].push(${JSON.stringify(c)})`:""}
11      })(window,'${n}');`}}),(0,o.jsx)(u.default,{id:"_next-gtm","data-ntpc":"GTM",src:`https://www.googletagmanager.com/gtm.js?id=${t}${l}${d}${f}`})]})},t.sendGTMEvent=e=>{if(void 0===r){console.warn("@next/third-parties: GTM has not been initialized");return}window[r]?window[r].push(e):console.warn(`@next/third-parties: GTM dataLayer ${r} does not exist`)}},58004:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esMo
11dule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendGAEvent=t.GoogleAnalytics=t.sendGTMEvent=t.GoogleTagManager=t.YouTubeEmbed=t.GoogleMapsEmbed=void 0;var i=n(69211);Object.defineProperty(t,"GoogleMapsEmbed",{enumerable:!0,get:function(){return r(i).default}});var o=n(89431);Object.defineProperty(t,"YouTubeEmbed",{enumerable:!0,get:function(){return r(o).default}});var s=n(65694);Object.defineProperty(t,"GoogleTagManager",{enumerable:!0,get:function(){return s.GoogleTagManager}}),Object.defineProperty(t,"sendGTMEvent",{enumerable:!0,get:function(){return s.sendGTMEvent}});var u=n(84718);Object.defineProperty(t,"GoogleAnalytics",{enumerable:!0,get:function(){return u.GoogleAnalytics}}),Object.defineProperty(t,"sendGAEvent",{enumerable:!0,get:function(){return u.sendGAEvent}})},89431:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let i=n(20503),o=r(n(77181)),s=n(59517),u=r(n(63420)),a={server:"beforeInteractive",client:"afterInteractive",idle:"lazyOnload",worker:"worker"};t.default=function(e){let{html:t,scripts:n,stylesheets:r}=(0,s.YouTubeEmbed)(e);return(0,i.jsx)(u.default,{height:e.height||null,width:e.width||null,html:t,dataNtpc:"YouTubeEmbed",children:null==n?void 0:n.map(e=>(0,i.jsx)(o.default,{src:e.url,strategy:a[e.strategy],stylesheets:r},e.url))})}},41494:function(){},35839:function(e,t,n){var r=n(80751)(n(73401),"DataView");e.exports=r},17973:function(e,t,n){var r=n(80751)(n(73401),"Map");e.exports=r},80712:function(e,t,n){var r=n(80751)(n(73401),"Promise");e.exports=r},353:function(e,t,n){var r=n(80751)(n(73401),"Set");e.exports=r},66293:function(e,t,n){var r=n(73401).Symbol;e.exports=r},53180:function(e,t,n){var r=n(80751)(n(73401),"WeakMap");e.exports=r},57398:function(e,t,n){var r=n(66293),i=n(46945),o=n(51584),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},75227:function(e,t,n){var r=n(57398),i=n(89109);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},99578:function(e,t,n){var r=n(7419),i=n(43283),o=n(6627),s=n(19235),u=/^\[object .+?Constructor\]$/,a=Object.prototype,c=Function.prototype.toString,l=a.hasOwnProperty,d=RegExp("^"+c.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?d:u).test(s(e))}},89126:function(e,t,n){var r=n(57398),i=n(6705),o=n(89109),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)]}},790:function(e,t,n){var r=n(92403),i=n(39339),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}},52715:function(e){e.exports=function(e){return function(t){return e(t)}}},54640:function(e,t,n){var r=n(73401)["__core-js_shared__"];e.exports=r},40151:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},80751:function(e,t,n){var r=n(99578),i=n(38027);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},46945:function(e,t,n){var r=n(66293),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[u]=n:delete e[u]),i}},65064:function(e,t,n){var r=n(35839),i=n(17973),o=n(80712),s=n(353),u=n(53180),a=n(57398),
11c=n(19235),l="[object Map]",d="[object Promise]",f="[object Set]",p="[object WeakMap]",h="[object DataView]",v=c(r),g=c(i),m=c(o),y=c(s),b=c(u),w=a;(r&&w(new r(new ArrayBuffer(1)))!=h||i&&w(new i)!=l||o&&w(o.resolve())!=d||s&&w(new s)!=f||u&&w(new u)!=p)&&(w=function(e){var t=a(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case v:return h;case g:return l;case m:return d;case y:return f;case b:return p}return t}),e.exports=w},38027:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},43283:function(e,t,n){var r,i=n(54640),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},92403:function(e){var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor,r="function"==typeof n&&n.prototype||t;return e===r}},39339:function(e,t,n){var r=n(73518)(Object.keys,Object);e.exports=r},20126:function(e,t,n){e=n.nmd(e);var r=n(40151),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i&&r.process,u=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=u},51584:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},73518:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},73401:function(e,t,n){var r=n(40151),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},19235:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},43735:function(e,t,n){var r=n(75227),i=n(89109),o=Object.prototype,s=o.hasOwnProperty,u=o.propertyIsEnumerable,a=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!u.call(e,"callee")};e.exports=a},2428:function(e){var t=Array.isArray;e.exports=t},71701:function(e,t,n){var r=n(7419),i=n(6705);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},7757:function(e,t,n){e=n.nmd(e);var r=n(73401),i=n(88553),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,u=s&&s.exports===o?r.Buffer:void 0,a=u?u.isBuffer:void 0;e.exports=a||i},68039:function(e,t,n){var r=n(790),i=n(65064),o=n(43735),s=n(2428),u=n(71701),a=n(7757),c=n(92403),l=n(56868),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(u(e)&&(s(e)||"string"==typeof e||"function"==typeof e.splice||a(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}},7419:function(e,t,n){var r=n(57398),i=n(6627);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},6705:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},6627:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},89109:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},56868:function(e,t,n){var r=n(89126),i=n(52715),o=n(20126),s=o&&o.isTypedArray,u=s?i(s):r;e.exports=u},88553:function(e){e.exports=function(){return!1}},11041:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(47581)}])},23828:function(e,t,n){"use strict";n.d(t,{M:function(){return l},j:function(){return c}});var r=n(20503),i=n(73732),o=n(8272);let s={toastState:{isOpen:!1}},u=(0,i.createContext)(void 0);function a(e,t){let{toastState:n}=e;return{toastState:(0,o.aU)(n,t)}}function c(e){let{children:t}=e,[n,o]=(0,i.useReducer)(a,s);return(0,r.jsx)(u.Provider,{value:{state:n,dispatch:o},children:t})}function l(){let e=(0,i.useContext)(u);if(void 0===e)throw Error("useCMSAppContext() must be used within a <CMSProvider>");return e}},8272:function(e,t,n){"use strict";var r,i;function o(e,t){switch(t.type){case r.Open:return{...e,isOpen:!0};case r.Close:return{...e,isOpen:!1};case r.Set:return{...e,...t.payload};default:return e}}n.d(t,{aU:function(){return o},fz:function(){return s},yg:function(){return u}}),(i=r||(r={}))[i.Open=0]="Open",i[i.Close=1]="Close",i[i.Set=2]="Set";let s=e=>({type:r.Set,payload:e}),u=()=>({type:r.Close})},75349:function(e,t,n){"use strict";n.d(t,{ZP:function(){return b},MV:function(){return m}});var r=n(20503),i=n(73732),o=n(70114),s=n(66073),u=n(32654),a=i.forwardRef((e,t)=>
11{let{container:n,...a}=e,[c,l]=i.useState(!1);(0,u.b)(()=>l(!0),[]);let d=n||c&&globalThis?.document?.body;return d?o.createPortal((0,r.jsx)(s.WV.div,{...a,ref:t}),d):null});a.displayName="Portal";var c=n(56356),l=n(32e3),d=n(98930),f=n.n(d);function p(e){let{description:t,type:n,onClose:o,duration:s}=e,u=(0,i.useRef)(null),[a,d]=(0,i.useState)(!0),p=[f().toast,"success"===n?f().success:f().error].join(" "),h="success"===n?l.hrl:l.Nkf,v=(0,i.useCallback)(e=>{d(e),setTimeout(()=>{o()},400)},[o]);return(0,r.jsxs)(c.fC,{open:a,ref:u,onOpenChange:v,duration:s||1e4,className:p,children:[(0,r.jsx)("div",{className:f().iconContainer,children:(0,r.jsx)(h,{className:f().icon})}),(0,r.jsxs)("div",{className:f().toastInfo,children:[(0,r.jsx)(c.Dx,{className:f().title,children:"success"===n?"Success":"Error"}),(0,r.jsx)(c.dk,{children:t})]}),(0,r.jsx)(c.x8,{className:f().close,children:(0,r.jsx)(l.APH,{})})]})}var h=n(73741),v=n.n(h);let g={},m=()=>{},y=(0,i.createContext)(g);function b(e){let{children:t}=e,[n,o]=(0,i.useState)(!1);(0,i.useEffect)(()=>{o(!0)},[]);let[s,u]=(0,i.useState)(g);return m=e=>{let t=Math.random().toString(36).substring(7);u(n=>({...n,[t]:e}))},(0,r.jsx)(c.zt,{children:(0,r.jsxs)(y.Provider,{value:s,children:[Object.entries(s).map(e=>{let[t,n]=e;return(0,i.createElement)(p,{...n,onClose:()=>{u(e=>{let n={...e};return delete n[t],n})},key:t})}),t,n&&(0,r.jsx)(a,{children:(0,r.jsx)(c._i,{className:v().viewport})})]})})}},59973:function(e,t){"use strict";let n=new class{get(e){if(!this.supported)return null;let t=localStorage.getItem(e);if(null===t)return null;try{return JSON.parse(t)}catch(e){return console.error(e),null}}set(e,t){if(this.supported){try{let n=JSON.stringify(t);localStorage.setItem(e,n);return}catch(e){console.error("localStorage.setItem failed with: ",e,"\ntrying again...")}localStorage.clear();try{let n=JSON.stringify(t);localStorage.setItem(e,n)}catch(t){console.error("Failed to write ".concat(e," in localstorage"),t)}}}getAndUnset(e){let t=this.get(e);return this.remove(e),t}remove(e){this.supported&&localStorage.removeItem(e)}constructor(){let e;this.storageEvictionAttempts=0;try{e=typeof localStorage}catch(e){console.error(e)}this.supported=!!e}};t.Z=n},51976:function(e,t,n){"use strict";n.d(t,{R:function(){return o}});var r=n(73732),i=n(46166);let o=(0,r.createContext)({isRtl:!1,locale:i.mt.EN})},45931:function(e,t,n){"use strict";n.d(t,{UK:function(){return r0},HI:function(){return r1},fx:function(){return rX}});var r,i,o,s,u,a,c,l,d,f,p,h,v,g,m,y,b,w,_,E,S,x,T,O,I,k,P={};n.r(P),n.d(P,{DEFAULT_ACTION_CLICK_ALLOWLIST:function(){return rC},DEFAULT_CSS_SELECTOR_ALLOWLIST:function(){return rk},DEFAULT_DATA_ATTRIBUTE_PREFIX:function(){return rP},IdentifyOperation:function(){return S},LogLevel:function(){return E},OfflineDisabled:function(){return eX},RevenueProperty:function(){return x},ServerZone:function(){return I},SpecialEventType:function(){return T},Status:function(){return O}});var C={};n.r(C),n.d(C,{Identify:function(){return ee},Revenue:function(){return en},Types:function(){return P},add:function(){return rj},createInstance:function(){return rO},extendSession:function(){return rR},flush:function(){return rA},getDeviceId:function(){return rN},getSessionId:function(){return rL},getUserId:function(){return rM},groupIdentify:function(){return rD},identify:function(){return rF},init:function(){return rU},logEvent:function(){return r$},remove:function(){return rG},reset:function(){return rq},revenue:function(){return rJ},runQueuedFunctions:function(){return eQ},setDeviceId:function(){return rV},setGroup:function(){return rW},setOptOut:function(){return rz},setSessionId:function(){return rB},setTransport:function(){return rK},setUserId:function(){return rH},track:function(){return rZ}});var j=n(5972);(r=g||(g={}))[r.None=0]="None",r[r.Error=1]="Error",r[r.Warn=2]="Warn",r[r.Verbose=3]="Verbose",r[r.Debug=4]="Debug";var R=function(e){return function(){var t=(0,j.pi)({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},A=function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=(0,j.XA)(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},N=function(e,t){return function(){var n,r,i={};try{for(var o=(0,j.XA)(t),s=o.next();!s.done;s=o.next()){var u=s.value;i[u]=A(e,u)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}},L=function(e,t,n,r,i){return void 0===i&&(i=null),function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var u=n(),a=u.logger,c=u.logLevel;if(c&&c<g.Debug||!c||!a)return e.apply(i,o);var l={type:"invoke public method",name:t,args:o,stacktrace:(Error().stack||"").split("\n").slice(3).map(function(e){return e.trim()}),time:{start:new Date().toISOString()},states:{}};r&&l.states&&(l.states.before=r());var d=e.apply(i,o);return d&&d.promise?d.promise.then(function(){r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=new Date().toISOString()),a.debug(JSON.stringify(l,null,2))}):(r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=new Date().toISOString()),a.debug(JSON.stringify(l,null,2))),d}},M=function(e){return{promise:e||Promise.resolve()}};(i=m||(m={})).Unknown="unknown",i.Skipped="skipped",i.Success="success",i.RateLimit="rate_limit",i.PayloadTooLarge="payload_too_large",i.Invalid="invalid",i.Failed="failed",i.Timeout="Timeout",i.SystemError="SystemError";var D="".concat("AMP","_unsent"),F="https://api2.amplitude.com/2/httpapi",U=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},[])},$=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=m.Unknown),{event:e,code:t,message:n}},G="Amplitude Logger ",q=function(){function e(){this.logLevel=g.None}return e.prototype.disable=function(){this.logLevel=g.None},e.prototype.enable=function(e){void 0===e&&(e=g.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<g.Verbose||console.log("".concat(G,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<g.Warn||console.warn("".concat(G,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<g.Error||console.error("".concat(G,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<g.Debug||console.log("".concat(G,"[Debug]: ").concat(e.join(" ")))},e}(),J=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:"$default_instance",logLevel:g.Warn,loggerProvider:new q,offline:!1,optOut:!1,serverUrl:F,serverZone:"US",useBatch:!1}},V=function(){function e(e){this._optOut=!1;var t,n,r,i,o=J();this.apiKey=e.apiKey,this.flushIntervalMillis=null!==(t=e.flushIntervalMillis)&&void 0!==t?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)&&void 0!==n?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)&&void 0!==r?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)&&void 0!==i?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var s=W(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}
11,enumerable:!1,configurable:!0}),e}(),W=function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=J().serverZone),void 0===n&&(n=J().useBatch),e)return{serverUrl:e,serverZone:void 0};var r,i=["US","EU"].includes(t)?t:J().serverZone;return{serverZone:i,serverUrl:(r=n,"EU"===i?r?"https://api.eu.amplitude.com/batch":"https://api.eu.amplitude.com/2/httpapi":r?"https://api2.amplitude.com/batch":F)}},z=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}(),B=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},K=(0,j.ev)([],(0,j.CR)(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),H=function(e){var t,n=B();if(!(null===(t=null==n?void 0:n.crypto)||void 0===t?void 0:t.getRandomValues))return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,H);var r=n.crypto.getRandomValues(new Uint8Array(16));return r[6]=15&r[6]|64,r[8]=63&r[8]|128,(0,j.ev)([],(0,j.CR)(r.entries()),!1).map(function(e){var t=(0,j.CR)(e,2),n=t[0],r=t[1];return[4,6,8,10].includes(n)?"-".concat(K[r]):K[r]}).join("")};function Z(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var Y=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,j.mG)(this,void 0,void 0,function(){var n,r=this;return(0,j.Jh)(this,function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(D,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(t=this.config.storageProvider)||void 0===t?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=H()),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,j.mG)(this,void 0,void 0,function(){var t,n,r=this;return(0,j.Jh)(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,U(t,this.config.flushQueueSize).reduce(function(t,n){return(0,j.mG)(r,void 0,void 0,function(){return(0,j.Jh)(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,j.mG)(this,void 0,void 0,function(){var n,r,i,o;return(0,j.Jh)(this,function(s){switch(s.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,j._T)(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,s.label=1;case 1:return s.trys.push([1,3,,4]),r=W(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(r,n)];case 2:if(null===(i=s.sent()))return this.fulfillRequest(e,0,"Unexpected error occurred"),[2];if(!t)return"body"in i?this.fulfillRequest(e,i.statusCode,"".concat(i.status,": ").concat(Z(i))):this.fulfillRequest(e,i.statusCode,i.status),[2];return this.handleResponse(i,e),[3,4];case 3:var u;return o=(u=s.sent())instanceof Error?u.message:String(u),this.config.loggerProvider.error(o),this.handleResponse({status:m.Failed,statusCode:0},e),[3,4];case 4:return[2]}})})},e.prototype.handleResponse=function(e,t){var n=e.status;switch(n){case m.Success:this.handleSuccessResponse(e,t);break;case m.Invalid:this.handleInvalidResponse(e,t);break;case m.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case m.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")){this.fulfillRequest(t,e.statusCode,e.body.error);return}var r=(0,j.ev)((0,j.ev)((0,j.ev)((0,j.ev)([],(0,j.CR)(Object.values(e.body.eventsWithInvalidFields)),!1),(0,j.CR)(Object.values(e.body.eventsWithMissingFields)),!1),(0,j.CR)(Object.values(e.body.eventsWithInvalidIdLengths)),!1),(0,j.CR)(e.body.silencedEvents),!1).flat(),i=new Set(r),o=t.filter(function(t,r){if(i.has(r)){n.fulfillRequest([t],e.statusCode,e.body.error);return}return!0});o.length>0&&this.config.loggerProvider.warn(Z(e));
11var s=this.removeEventsExceedFlushMaxRetries(o);this.scheduleEvents(s)},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(1===t.length){this.fulfillRequest(t,e.statusCode,e.body.error);return}this.config.loggerProvider.warn(Z(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),u=new Set(i),a=new Set(o),c=t.filter(function(t,r){if(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&u.has(t.event.device_id)){n.fulfillRequest([t],e.statusCode,e.body.error);return}return a.has(r)&&(t.timeout=n.throttleTimeout),!0});c.length>0&&this.config.loggerProvider.warn(Z(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($(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}(),X=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var n=e[t];if(!Q(t,n))return!1}return!0},Q=function(e,t){var n,r;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=(0,j.XA)(t),s=o.next();!s.done;s=o.next()){var u=s.value;if(Array.isArray(u))return!1;if("object"==typeof u)i=i&&X(u);else if(!["number","string"].includes(typeof u))return!1;if(!i)return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}else if(null==t)return!1;else if("object"==typeof t)return X(t);else if(!["number","string","boolean"].includes(typeof t))return!1;return!0},ee=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return(0,j.pi)({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(y.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(y.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(y.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(y.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(y.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(y.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(y.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(y.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(y.UNSET,e,"-"),this},e.prototype.clearAll=function(){return this._properties={},this._properties[y.CLEAR_ALL]="-",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[y.CLEAR_ALL]||this._propertySet.has(t))&&(e===y.ADD?"number"==typeof n:e===y.UNSET||e===y.REMOVE||Q(t,n))},e}();(o=y||(y={})).SET="$set",o.SET_ONCE="$setOnce",o.ADD="$add",o.APPEND="$append",o.PREPEND="$prepend",o.REMOVE="$remove",o.PREINSERT="$preInsert",o.POSTINSERT="$postInsert",o.UNSET="$unset",o.CLEAR_ALL="$clearAll";var et=[y.CLEAR_ALL,y.UNSET,y.SET,y.SET_ONCE,y.ADD,y.APPEND,y.PREPEND,y.PREINSERT,y.POSTINSERT,y.REMOVE],en=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 X(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?(0,j.pi)({},this.properties):{};return e[b.REVENUE_PRODUCT_ID]=this.productId,e[b.REVENUE_QUANTITY]=this.quantity,e[b.REVENUE_PRICE]=this.price,e[b.REVENUE_TYPE]=this.revenueType,e[b.REVENUE_CURRENCY]=this.currency,e[b.REVENUE]=this.revenue,e[b.RECEIPT]=this.receipt,e[b.RECEIPT_SIG]=this.receiptSig,e},e}();(s=b||(b={})).REVENUE_PRODUCT_ID="$productId",s.REVENUE_QUANTITY="$quantity",s.REVENUE_PRICE="$price",s.REVENUE_TYPE="$revenueType",s.REVENUE_CURRENCY="$currency",s.REVENUE="$revenue",s.RECEIPT="$receipt",s.RECEIPT_SIG="$receiptSig",(u=w||(w={})).SET="$set",u.SET_ONCE="$setOnce",u.ADD="$add",u.APPEND="$append",u.PREPEND="$prepend",u.REMOVE="$remove",u.PREINSERT="$preInsert",u.POSTINSERT="$postInsert",u.UNSET="$unset",u.CLEAR_ALL="$clearAll",(a=_||(_={})).IDENTIFY="$identify",a.GROUP_IDENTIFY="$groupidentify",a.REVENUE="revenue_amount";var er=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,j.mG)(this,void 0,void 0,function(){return(0,j.Jh)(this,function(i){switch(i.label){case 0:if(this.plugins.some(function(t){return t.name===e.name}))return this.loggerProvider.warn("Plugin with name ".concat(e.name," already exists, skipping registration")),[2];return void 0===e.name&&(e.name=H(),this.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)&&void 0!==n?n:"enrichment",[4,null===(r=e.setup)||void 0===r?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,j.mG)(this,void 0,void 0,function(){var r,i;return(0,j.Jh)(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?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?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,j.mG)(this,void 0,void 0,function(){var t,n,r,i,o,s,u,a,c,l,d,f,p,h,v;return(0,j.Jh)(this,function(g){switch(g.label){case 0:if(!e)return[2];t=(0,j.CR)(e,1)[0],n=(0,j.CR)(e,2)[1],this.loggerProvider.log("Timeline.apply: Initial event",t),r=this.plugins.filter(function(e){return"before"===e.type}),g.label=1;case 1:g.trys.push([1,6,7,8]),o=(i=(0,j.XA)(r)).next(),g.label=2;case 2:if(o.done)return[3,5];if(!(s=o.value).execute)return[3,4];return[4,s.execute((0,j.pi)({},t))];case 3:if(null===(u=g.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(s.name),"', event: ").concat(JSON.stringify(t))),n({event:t,code:0,message:""}),[2];t=u,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(s.name),"', event: ").concat(JSON.stringify(t))),g.label=4;case 4:return o=i.next(),[3,2];case 5:return[3,8];case 6:return f={error:g.sent()},[3,8];
11case 7:try{o&&!o.done&&(p=i.return)&&p.call(i)}finally{if(f)throw f.error}return[7];case 8:a=this.plugins.filter(function(e){return"enrichment"===e.type||void 0===e.type}),g.label=9;case 9:g.trys.push([9,14,15,16]),l=(c=(0,j.XA)(a)).next(),g.label=10;case 10:if(l.done)return[3,13];if(!(s=l.value).execute)return[3,12];return[4,s.execute((0,j.pi)({},t))];case 11:if(null===(u=g.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(s.name),"', event: ").concat(JSON.stringify(t))),n({event:t,code:0,message:""}),[2];t=u,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(s.name),"', event: ").concat(JSON.stringify(t))),g.label=12;case 12:return l=c.next(),[3,10];case 13:return[3,16];case 14:return h={error:g.sent()},[3,16];case 15:try{l&&!l.done&&(v=c.return)&&v.call(c)}finally{if(h)throw h.error}return[7];case 16:return d=this.plugins.filter(function(e){return"destination"===e.type}),this.loggerProvider.log("Timeline.apply: Final event before destinations, event: ".concat(JSON.stringify(t))),Promise.all(d.map(function(e){var n=(0,j.pi)({},t);return e.execute(n).catch(function(e){return $(n,0,String(e))})})).then(function(e){n((0,j.CR)(e,1)[0]||$(t,100,"Event not tracked, no destination plugins on the instance"))}),[2]}})})},e.prototype.flush=function(){return(0,j.mG)(this,void 0,void 0,function(){var e,t=this;return(0,j.Jh)(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.prototype.onIdentityChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onIdentityChanged)||void 0===n||n.call(t,e)})},e.prototype.onSessionIdChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onSessionIdChanged)||void 0===n||n.call(t,e)})},e.prototype.onOptOutChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onOptOutChanged)||void 0===n||n.call(t,e)})},e}(),ei=function(e,t,n){var r="string"==typeof e?{event_type:e}:e;return(0,j.pi)((0,j.pi)((0,j.pi)({},r),n),t&&{event_properties:t})},eo=function(e,t){return(0,j.pi)((0,j.pi)({},t),{event_type:_.IDENTIFY,user_properties:e.getUserProperties()})},es=function(e,t,n,r){var i;return(0,j.pi)((0,j.pi)({},r),{event_type:_.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:((i={})[e]=t,i)})},eu=function(e,t,n){var r,i=new ee;return i.set(e,t),(0,j.pi)((0,j.pi)({},n),{event_type:_.IDENTIFY,user_properties:i.getUserProperties(),groups:((r={})[e]=t,r)})},ea=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 er(this),this.name=e}return e.prototype._init=function(e){return(0,j.mG)(this,void 0,void 0,function(){return(0,j.Jh)(this,function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(this),this.timeline.loggerProvider=this.config.loggerProvider,[4,this.runQueuedFunctions("q")];case 1:return t.sent(),this.isReady=!0,[2]}})})},e.prototype.runQueuedFunctions=function(e){return(0,j.mG)(this,void 0,void 0,function(){var t,n,r,i,o,s;return(0,j.Jh)(this,function(u){switch(u.label){case 0:t=this[e],this[e]=[],u.label=1;case 1:u.trys.push([1,8,9,10]),r=(n=(0,j.XA)(t)).next(),u.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 u.sent(),[3,6];case 4:return[4,i];case 5:u.sent(),u.label=6;case 6:return r=n.next(),[3,2];case 7:return[3,10];case 8:return o={error:u.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:u.sent(),u.label=12;case 12:return[2]}})})},e.prototype.track=function(e,t,n){var r=ei(e,t,n);return M(this.dispatch(r))},e.prototype.identify=function(e,t){var n=eo(e,t);return M(this.dispatch(n))},e.prototype.groupIdentify=function(e,t,n,r){var i=es(e,t,n,r);return M(this.dispatch(i))},e.prototype.setGroup=function(e,t,n){var r=eu(e,t,n);return M(this.dispatch(r))},e.prototype.revenue=function(e,t){var n=(0,j.pi)((0,j.pi)({},t),{event_type:_.REVENUE,event_properties:e.getEventProperties()});return M(this.dispatch(n))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),M())},e.prototype._addPlugin=function(e){return M(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)),M())},e.prototype._removePlugin=function(e){return M(this.timeline.deregister(e,this.config))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t($(e,0,"Client not initialized"));this.process(e).then(t)},e.prototype.dispatch=function(e){return(0,j.mG)(this,void 0,void 0,function(){var t=this;return(0,j.Jh)(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.getOperationAppliedUserProperties=function(e){var t={};if(void 0===e)return t;var n={};return Object.keys(e).forEach(function(t){Object.values(w).includes(t)||(n[t]=e[t])}),et.forEach(function(n){if(Object.keys(e).includes(n)){var r=e[n];switch(n){case w.CLEAR_ALL:Object.keys(t).forEach(function(e){delete t[e]});break;case w.UNSET:Object.keys(r).forEach(function(e){delete t[e]});break;case w.SET:Object.assign(t,r)}}}),Object.assign(t,n),t},e.prototype.process=function(e){return(0,j.mG)(this,void 0,void 0,function(){var t,n,r;return(0,j.Jh)(this,function(i){switch(i.label){case 0:if(i.trys.push([0,2,,3]),this.config.optOut)return[2,$(e,0,"Event skipped due to optOut config")];return e.event_type===_.IDENTIFY&&(t=this.getOperationAppliedUserProperties(e.user_properties),this.timeline.onIdentityChanged({userProperties:t})),[4,this.timeline.push(e)];case 1:return 200===(n=i.sent()).code?this.config.loggerProvider.log(n.message):100===n.code?this.config.loggerProvider.warn(n.message):this.config.loggerProvider.error(n.message),[2,n];case 2:return r=String(i.sent()),this.config.loggerProvider.error(r),[2,n=$(e,0,r)];case 3:return[2]}})})},e.prototype.setOptOut=function(e){if(!this.isReady){this.q.push(this._setOptOut.bind(this,!!e));return}this._setOptOut(e)},e.prototype._setOptOut=function(e){this.config.optOut!==e&&(this.timeline.onOptOutChanged(e),this.config.optOut=!!e)},e.prototype.flush=function(){return M(this.timeline.flush())},e.prototype.plugin=function(e){var t=this.timeline.plugins.find(function(t){return t.name===e});if(void 0===t){this.config.loggerProvider.debug("Cannot find plugin with name ".concat(e));return}return t},e.prototype.plugins=function(e){return this.timeline.plugins.filter(function(t){return t instanceof e})},e}(),ec=function(e,t){return"boolean"==typeof e?e:(null==e?void 0:e[t])!==!1},el=function(e){return ec(e,"attribution")},ed=function(e){return ec(e,"pageViews")},ef=function(e){return ec(e,"sessions")},ep=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.elementInteractions||"object"==typeof e.elementInteractions)},eh=function(e){if(ep(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.elementInteractions)return e.autocapture.elementInteractions},ev=function(e){var t,n=function(){return!1},r=void 0,i=e.pageCounter;return ed(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}},eg="dclid",em="fbclid",ey="gbraid",eb="gclid",ew="ko_click_id",e_="li_fat_id",eE="msclkid",eS="rtd_cid",ex="ttclid",eT="twclid",eO="wbraid",eI={utm_campaign:void 0,utm_c
11ontent: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},ek=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},eP=function(e,t,n,r,i){void 0===i&&(i=!0),e.referrer;var o=e.referring_domain,s=(0,j._T)(e,["referrer","referring_domain"]),u=t||{},a=(u.referrer,u.referring_domain),c=(0,j._T)(u,["referrer","referring_domain"]);if(eC(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=ek(o||"")!==ek(a||""),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},eC=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})},ej=function(e){var t=e;return t?(t.startsWith(".")&&(t=t.substring(1)),[new RegExp("".concat(t.replace(".","\\."),"$"))]):[]},eR=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},eA=function(){var e,t=eR();return(null===(e=null==t?void 0:t.location)||void 0===e?void 0:e.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce(function(e,t){var n=t.split("=",2),r=eN(n[0]),i=eN(n[1]);return i&&(e[r]=i),e},{}):{}},eN=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},eL=function(){function e(){}return e.prototype.parse=function(){return(0,j.mG)(this,void 0,void 0,function(){return(0,j.Jh)(this,function(e){return[2,(0,j.pi)((0,j.pi)((0,j.pi)((0,j.pi)({},eI),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=eA();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?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch(e){}return n},e.prototype.getClickIds=function(){var e,t=eA();return(e={})[eg]=t[eg],e[em]=t[em],e[ey]=t[ey],e[eb]=t[eb],e[ew]=t[ew],e[e_]=t[e_],e[eE]=t[eE],e[eS]=t[eS],e[ex]=t[ex],e[eT]=t[eT],e[eO]=t[eO],e},e}(),eM=function(e,t){return void 0===t&&(t=Date.now()),Date.now()-t>e},eD=function(){function e(e,t){var n,r,i;this.shouldTrackNewCampaign=!1,this.options=(0,j.pi)({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:ej(null===(n=t.cookieOptions)||void 0===n?void 0:n.domain)},e),this.storage=t.cookieStorage,this.storageKey=(r=t.apiKey,void 0===i&&(i=10),["AMP","MKTG",r.substring(0,i)].filter(Boolean).join("_")),this.currentCampaign=eI,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,j.mG)(this,void 0,void 0,function(){var e,t;return(0,j.Jh)(this,function(n){switch(n.label){case 0:return[4,this.fetchCampaign()];case 1:if(t=j.CR.apply(void 0,[n.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||eM(this.sessionTimeout,this.lastEventTime),!eP(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,j.mG)(this,void 0,void 0,function(){return(0,j.Jh)(this,function(e){switch(e.label){case 0:return[4,Promise.all([new eL().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,eo(Object.entries((0,j.pi)((0,j.pi)({},eI),t)).reduce(function(e,t){var r,i=(0,j.CR)(t,2),o=i[0],s=i[1];return(e.setOnce("initial_".concat(o),null!==(r=null!=s?s:n.initialEmptyValue)&&void 0!==r?r:"EMPTY"),s)?e.set(o,s):e.unset(o)},new ee)));return e&&(r.event_id=e),r},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}(),eF=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:eU(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),eU=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},e$=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}(),eG=function(){return(eG=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 eq(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);
11if(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 eJ(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 eV=function(e,t){var n,r,i=typeof e;if(i!==typeof t)return!1;try{for(var o=eq(["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;if(null==e||null==t||e.length!==t.length)return!1;var u=Array.isArray(e),a=Array.isArray(t);if(u!==a)return!1;if(u&&a){for(var c=0;c<e.length;c++)if(!eV(e[c],t[c]))return!1}else{if(!eV(Object.keys(e).sort(),Object.keys(t).sort()))return!1;var l=!0;return Object.keys(e).forEach(function(n){eV(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 eW=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=eG({},this.identity.userProperties),n=eG(eG({},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,u,a=n.userProperties||{};try{for(var c=eq(Object.entries(e)),l=c.next();!l.done;l=c.next()){var d=eJ(l.value,2),f=d[0],p=d[1];switch(f){case"$set":try{for(var h=(i=void 0,eq(Object.entries(p))),v=h.next();!v.done;v=h.next()){var g=eJ(v.value,2),m=g[0],y=g[1];a[m]=y}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}break;case"$unset":try{for(var b=(s=void 0,eq(Object.keys(p))),w=b.next();!w.done;w=b.next()){var m=w.value;delete a[m]}}catch(e){s={error:e}}finally{try{w&&!w.done&&(u=b.return)&&u.call(b)}finally{if(s)throw s.error}}break;case"$clearAll":a={}}}}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=a,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return eG({},this.identity)},e.prototype.setIdentity=function(e){var t=eG({},this.identity);this.identity=eG({},e),eV(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}(),ez="undefined"!=typeof globalThis?globalThis:void 0!==n.g?n.g:self,eB=function(){function e(){this.identityStore=new eW,this.eventBridge=new e$,this.applicationContextProvider=new eF}return e.getInstance=function(t){return ez.analyticsConnectorInstances||(ez.analyticsConnectorInstances={}),ez.analyticsConnectorInstances[t]||(ez.analyticsConnectorInstances[t]=new e),ez.analyticsConnectorInstances[t]},e}(),eK=function(e){return void 0===e&&(e="$default_instance"),eB.getInstance(e)},eH=function(e,t){eK(t).identityStore.editIdentity().setUserId(e).commit()},eZ=function(e,t){eK(t).identityStore.editIdentity().setDeviceId(e).commit()},eY=function(){function e(){this.name="identity",this.type="before",this.identityStore=eK().identityStore}return e.prototype.execute=function(e){return(0,j.mG)(this,void 0,void 0,function(){var t;return(0,j.Jh)(this,function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return(0,j.mG)(this,void 0,void 0,function(){return(0,j.Jh)(this,function(t){return e.instanceName&&(this.identityStore=eK(e.instanceName).identityStore),[2]})})},e}(),eX=null,eQ=function(e,t){e0(e,t)},e0=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,s=r.resolve,u=e&&e[i];if("function"==typeof u){var a=u.apply(e,o);"function"==typeof s&&s(null==a?void 0:a.promise)}}return e},e1=function(e){return e&&void 0!==e._q},e2=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?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==n?n:i)&&void 0!==r?r:""},e4=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="amplitude-ts/".concat("2.11.7"),"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){var t,n;return(0,j.mG)(this,void 0,void 0,function(){var r,i,o;return(0,j.Jh)(this,function(s){return r=new Date().getTime(),i=null!==(t=this.config.lastEventId)&&void 0!==t?t:-1,o=null!==(n=e.event_id)&&void 0!==n?n:i+1,this.config.lastEventId=o,e.time||(this.config.lastEventTime=r),[2,(0,j.pi)((0,j.pi)((0,j.pi)((0,j.pi)((0,j.pi)((0,j.pi)((0,j.pi)((0,j.pi)({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:r},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.language&&{language:e2()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:H(),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:o,library:this.library,user_agent:this.userAgent})]})})},e}();(c=E||(E={}))[c.None=0]="None",c[c.Error=1]="Error",c[c.Warn=2]="Warn",c[c.Verbose
11=3]="Verbose",c[c.Debug=4]="Debug";var e3=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return(0,j.mG)(this,void 0,void 0,function(){return(0,j.Jh)(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return(0,j.mG)(this,void 0,void 0,function(){return(0,j.Jh)(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return(0,j.mG)(this,void 0,void 0,function(){var t;return(0,j.Jh)(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,j.mG)(this,void 0,void 0,function(){return(0,j.Jh)(this,function(n){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return(0,j.mG)(this,void 0,void 0,function(){return(0,j.Jh)(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return(0,j.mG)(this,void 0,void 0,function(){return(0,j.Jh)(this,function(e){return this.memoryStorage.clear(),[2]})})},e}(),e7=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),["AMP",t,e.substring(0,n)].filter(Boolean).join("_")},e5=function(){function e(e){this.options=(0,j.pi)({},e)}return e.prototype.isEnabled=function(){return(0,j.mG)(this,void 0,void 0,function(){var t,n;return(0,j.Jh)(this,function(r){switch(r.label){case 0:if(!eR())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,j.mG)(this,void 0,void 0,function(){var n,r;return(0,j.Jh)(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=e6(n))&&void 0!==t?t:e8(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]}return[2]}})})},e.prototype.getRaw=function(e){var t,n;return(0,j.mG)(this,void 0,void 0,function(){var r,i;return(0,j.Jh)(this,function(o){return(i=(null!==(n=null===(t=null==(r=eR())?void 0:r.document)||void 0===t?void 0:t.cookie.split("; "))&&void 0!==n?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,j.mG)(this,void 0,void 0,function(){var r,i,o,s,u,a,c;return(0,j.Jh)(this,function(l){try{r=null!==(n=this.options.expirationDays)&&void 0!==n?n:0,i=null!==t?r:-1,o=void 0,i&&((s=new Date).setTime(s.getTime()+864e5*i),o=s),u="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t)))),o&&(u+="; expires=".concat(o.toUTCString())),u+="; path=/",this.options.domain&&(u+="; domain=".concat(this.options.domain)),this.options.secure&&(u+="; Secure"),this.options.sameSite&&(u+="; SameSite=".concat(this.options.sameSite)),(a=eR())&&(a.document.cookie=u)}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,j.mG)(this,void 0,void 0,function(){return(0,j.Jh)(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,j.mG)(this,void 0,void 0,function(){return(0,j.Jh)(this,function(e){return[2]})})},e}(),e6=function(e){try{return decodeURIComponent(atob(e))}catch(e){return}},e8=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch(e){return}},e9=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,i,o,s,u,a,c,l,d,f,p,h,v,g,y,b,w,_,E,S,x=e.code||0,T=this.buildStatus(x);switch(T){case m.Success:return{status:T,statusCode:x,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(n=e.payload_size_bytes)&&void 0!==n?n:0,serverUploadTime:null!==(r=e.server_upload_time)&&void 0!==r?r:0}};case m.Invalid:return{status:T,statusCode:x,body:{error:null!==(i=e.error)&&void 0!==i?i:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(s=e.events_with_invali
11d_fields)&&void 0!==s?s:{},eventsWithMissingFields:null!==(u=e.events_with_missing_fields)&&void 0!==u?u:{},eventsWithInvalidIdLengths:null!==(a=e.events_with_invalid_id_lengths)&&void 0!==a?a:{},epsThreshold:null!==(c=e.eps_threshold)&&void 0!==c?c:0,exceededDailyQuotaDevices:null!==(l=e.exceeded_daily_quota_devices)&&void 0!==l?l:{},silencedDevices:null!==(d=e.silenced_devices)&&void 0!==d?d:[],silencedEvents:null!==(f=e.silenced_events)&&void 0!==f?f:[],throttledDevices:null!==(p=e.throttled_devices)&&void 0!==p?p:{},throttledEvents:null!==(h=e.throttled_events)&&void 0!==h?h:[]}};case m.PayloadTooLarge:return{status:T,statusCode:x,body:{error:null!==(v=e.error)&&void 0!==v?v:""}};case m.RateLimit:return{status:T,statusCode:x,body:{error:null!==(g=e.error)&&void 0!==g?g:"",epsThreshold:null!==(y=e.eps_threshold)&&void 0!==y?y:0,throttledDevices:null!==(b=e.throttled_devices)&&void 0!==b?b:{},throttledUsers:null!==(w=e.throttled_users)&&void 0!==w?w:{},exceededDailyQuotaDevices:null!==(_=e.exceeded_daily_quota_devices)&&void 0!==_?_:{},exceededDailyQuotaUsers:null!==(E=e.exceeded_daily_quota_users)&&void 0!==E?E:{},throttledEvents:null!==(S=e.throttled_events)&&void 0!==S?S:[]}};case m.Timeout:default:return{status:T,statusCode:x}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?m.Success:429===e?m.RateLimit:413===e?m.PayloadTooLarge:408===e?m.Timeout:e>=400&&e<500?m.Invalid:e>=500?m.Failed:m.Unknown},e}(),te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,j.ZT)(t,e),t.prototype.send=function(e,t){return(0,j.mG)(this,void 0,void 0,function(){var n,r,i;return(0,j.Jh)(this,function(o){switch(o.label){case 0:if("undefined"==typeof fetch)throw Error("FetchTransport is not supported");return n={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"},[4,fetch(e,n)];case 1:return[4,(r=o.sent()).text()];case 2:i=o.sent();try{return[2,this.buildResponse(JSON.parse(i))]}catch(e){return[2,this.buildResponse({code:r.status})]}return[2]}})})},t}(e9),tt=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return(0,j.mG)(this,void 0,void 0,function(){var t,n,r;return(0,j.Jh)(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,j.mG)(this,void 0,void 0,function(){var t;return(0,j.Jh)(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){var t;return(0,j.mG)(this,void 0,void 0,function(){return(0,j.Jh)(this,function(n){return[2,(null===(t=this.storage)||void 0===t?void 0:t.getItem(e))||void 0]})})},e.prototype.set=function(e,t){var n;return(0,j.mG)(this,void 0,void 0,function(){return(0,j.Jh)(this,function(r){try{null===(n=this.storage)||void 0===n||n.setItem(e,JSON.stringify(t))}catch(e){}return[2]})})},e.prototype.remove=function(e){var t;return(0,j.mG)(this,void 0,void 0,function(){return(0,j.Jh)(this,function(n){try{null===(t=this.storage)||void 0===t||t.removeItem(e)}catch(e){}return[2]})})},e.prototype.reset=function(){var e;return(0,j.mG)(this,void 0,void 0,function(){return(0,j.Jh)(this,function(t){try{null===(e=this.storage)||void 0===e||e.clear()}catch(e){}return[2]})})},e}(),tn=function(e){function t(t){var n,r=this;return(r=e.call(this,null===(n=eR())||void 0===n?void 0:n.localStorage)||this).loggerProvider=null==t?void 0:t.loggerProvider,r}return(0,j.ZT)(t,e),t.prototype.set=function(t,n){var r;return(0,j.mG)(this,void 0,void 0,function(){var i;return(0,j.Jh)(this,function(o){switch(o.label){case 0:if(!(Array.isArray(n)&&n.length>1e3))return[3,2];return i=n.length-1e3,[4,e.prototype.set.call(this,t,n.slice(0,1e3))];case 1:return o.sent(),null===(r=this.loggerProvider)||void 0===r||r.error("Failed to save ".concat(i," 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}(tt),tr=function(e){function t(){var t;return e.call(this,null===(t=eR())||void 0===t?void 0:t.sessionStorage)||this}return(0,j.ZT)(t,e),t}(tt),ti=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return(0,j.ZT)(t,e),t.prototype.send=function(e,t){return(0,j.mG)(this,void 0,void 0,function(){var n=this;return(0,j.Jh)(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}(e9),to=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,j.ZT)(t,e),t.prototype.send=function(e,t){return(0,j.mG)(this,void 0,void 0,function(){var n=this;return(0,j.Jh)(this,function(r){return[2,new Promise(function(r,i){var o=eR();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}(e9),ts=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},tu=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},ta="[Amplitude]",tc="".concat(ta," Form Started"),tl="".concat(ta," Form Submitted"),td="".concat(ta," File Downloaded"),tf="session_start",tp="session_end",th="".concat(ta," File Extension"),tv="".concat(ta," File Name"),tg="".concat(ta," Link ID"),tm="".concat(ta," Link Text"),ty="".concat(ta," Link URL"),tb="".concat(ta," Form ID"),tw="".concat(ta," Form Name"),t_="".concat(ta," Form Destination"),tE="cookie",tS=function(e){function t(t,n,r,i,o,s,u,a,c,l,d,f,p,h,v,g,m,y,b,w,_,S,x,T,O,I,k,P,C,j,R,A,N,L){void 0===r&&(r=new e3),void 0===i&&(i={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===a&&(a=1e3),void 0===c&&(c=5),void 0===l&&(l=30),void 0===d&&(d=tE),void 0===g&&(g=new q),void 0===m&&(m=E.Warn),void 0===b&&(b=!1),void 0===w&&(w=!1),void 0===x&&(x=""),void 0===T&&(T="US"),void 0===I&&(I=18e5),void 0===k&&(k=new tn({loggerProvider:g})),void 0===P&&(P={ipAddress:!0,language:!0,platform:!0}),void 0===C&&(C="fetch"),void 0===j&&(j=!1),void 0===R&&(R=!1);var M=e.call(this,{apiKey:t,storageProvider:k,transportProvider:tT(C)})||this;return M.apiKey=t,M.appVersion=n,M.cookieOptions=i,M.defaultTracking=o,M.autocapture=s,M.flushIntervalMillis=a,M.flushMaxRetries=c,M.flushQueueSize=l,M.identityStorage=d,M.ingestionMetadata=f,M.instanceName=p,M.loggerProvider=g,M.logLevel=m,M.minIdLength=y,M.offline=b,M.partnerId=_,M.plan=S,M.serverUrl=x,M.serverZone=T,M.sessionTimeout=I,M.storageProvider=k,M.trackingOptions=P,M.transport=C,M.useBatch=j,M.fetchRemoteConfig=R,M._optOut=!1,M._cookieStorage=r,M.deviceId=u,M.lastEventId=h,M.lastEventTime=v,M.optOut=w,M.sessionId=O,M.pageCounter=N,M.userId=A,M.debugLogsEnabled=L,M.loggerProvider.enable(L?E.Debug:M.logLevel),M}return(0,j.ZT)(t,e),Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())}
11,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(e7(this.apiKey),e)},t}(V),tx=function(e,t){switch(void 0===e&&(e=tE),void 0===t&&(t={}),e){case"localStorage":return new tn;case"sessionStorage":return new tr;case"none":return new e3;default:return new e5((0,j.pi)((0,j.pi)({},t),{expirationDays:t.expiration}))}},tT=function(e){return"xhr"===e?new ti:"beacon"===e?new to:new te};(l=S||(S={})).SET="$set",l.SET_ONCE="$setOnce",l.ADD="$add",l.APPEND="$append",l.PREPEND="$prepend",l.REMOVE="$remove",l.PREINSERT="$preInsert",l.POSTINSERT="$postInsert",l.UNSET="$unset",l.CLEAR_ALL="$clearAll",(d=x||(x={})).REVENUE_PRODUCT_ID="$productId",d.REVENUE_QUANTITY="$quantity",d.REVENUE_PRICE="$price",d.REVENUE_TYPE="$revenueType",d.REVENUE_CURRENCY="$currency",d.REVENUE="$revenue",(f=T||(T={})).IDENTIFY="$identify",f.GROUP_IDENTIFY="$groupidentify",f.REVENUE="revenue_amount";var tO=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},tI=function(e){void 0===e&&(e={});var t,n,r=eR(),i=void 0,o=!1,s=e.trackOn,u=e.trackHistoryChanges,a=e.eventType,c=void 0===a?"[Amplitude] Page Viewed":a,l=function(e){var t=e;try{t=decodeURI(e)}catch(e){null==i||i.error("Malformed URI sequence: ",e)}return t},d=function(){return(0,j.mG)(void 0,void 0,void 0,function(){var e,t,n;return(0,j.Jh)(this,function(r){switch(r.label){case 0:return e=l("undefined"!=typeof location&&location.href||""),n={event_type:c},t=[{}],[4,tk()];case 1:return[2,(n.event_properties=j.pi.apply(void 0,[j.pi.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()},p="undefined"!=typeof location?location.href:null,h=function(){return(0,j.mG)(void 0,void 0,void 0,function(){var e,n,r,o;return(0,j.Jh)(this,function(s){switch(s.label){case 0:if(n=tC(u,e=location.href,p||"")&&f(),p=e,!n)return[3,4];if(null==i||i.log("Tracking page view event"),null!=t)return[3,1];return[3,3];case 1:return o=(r=t).track,[4,d()];case 2:o.apply(r,[s.sent()]),s.label=3;case 3:s.label=4;case 4:return[2]}})})},v=function(){h()};return{name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(e,s){return(0,j.mG)(void 0,void 0,void 0,function(){var u,a;return(0,j.Jh)(this,function(c){switch(c.label){case 0:if(t=s,n=e,(i=e.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),o=!0,r&&(r.addEventListener("popstate",v),r.history.pushState=new Proxy(r.history.pushState,{apply:function(e,t,n){var r=(0,j.CR)(n,3),i=r[0],s=r[1],u=r[2];e.apply(t,[i,s,u]),o&&h()}})),!f())return[3,2];return i.log("Tracking page view event"),a=(u=t).track,[4,d()];case 1:a.apply(u,[c.sent()]),c.label=2;case 2:return[2]}})})},execute:function(e){return(0,j.mG)(void 0,void 0,void 0,function(){var t;return(0,j.Jh)(this,function(r){switch(r.label){case 0:if(!("attribution"===s&&tP(e)))return[3,2];
11return null==i||i.log("Enriching campaign event to page view event with campaign parameters"),[4,d()];case 1:t=r.sent(),e.event_type=t.event_type,e.event_properties=(0,j.pi)((0,j.pi)({},e.event_properties),t.event_properties),r.label=2;case 2:return n&&e.event_type===c&&(n.pageCounter=n.pageCounter?n.pageCounter+1:1,e.event_properties=(0,j.pi)((0,j.pi)({},e.event_properties),{"[Amplitude] Page Counter":n.pageCounter})),[2,e]}})})},teardown:function(){return(0,j.mG)(void 0,void 0,void 0,function(){return(0,j.Jh)(this,function(e){return r&&(r.removeEventListener("popstate",v),o=!1),[2]})})}}},tk=function(){return(0,j.mG)(void 0,void 0,void 0,function(){var e;return(0,j.Jh)(this,function(t){switch(t.label){case 0:return e=tO,[4,new eL().parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},tP=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,n=t[S.SET]||{},r=t[S.UNSET]||{},i=(0,j.ev)((0,j.ev)([],(0,j.CR)(Object.keys(n)),!1),(0,j.CR)(Object.keys(r)),!1);return Object.keys(eI).every(function(e){return i.includes(e)})}return!1},tC=function(e,t,n){if("pathOnly"===e){if(""==n)return!0;var r=new URL(t),i=new URL(n);return r.origin+r.pathname!==i.origin+i.pathname}return t!==n},tj=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,j.mG)(void 0,void 0,void 0,function(){var i;return(0,j.Jh)(this,function(o){return null===(i=eR())||void 0===i||i.addEventListener("load",function(){if(!r){t.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.");return}if("undefined"!=typeof document){var i=function(e){var t=!1;n(e,"change",function(){var n;t||r.track(tc,((n={})[tb]=tR(e.id),n[tw]=tR(e.name),n[t_]=e.action,n)),t=!0}),n(e,"submit",function(){var n,i;t||r.track(tc,((n={})[tb]=tR(e.id),n[tw]=tR(e.name),n[t_]=e.action,n)),r.track(tl,((i={})[tb]=tR(e.id),i[tw]=tR(e.name),i[t_]=e.action,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,j.mG)(void 0,void 0,void 0,function(){return(0,j.Jh)(this,function(t){return[2,e]})})},teardown:function(){return(0,j.mG)(void 0,void 0,void 0,function(){return(0,j.Jh)(this,function(t){return null==e||e.disconnect(),r(),[2]})})}}},tR=function(e){if("string"==typeof e)return e},tA=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,j.mG)(void 0,void 0,void 0,function(){var i;return(0,j.Jh)(this,function(o){return null===(i=eR())||void 0===i||i.addEventListener("load",function(){if(!r){t.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.");return}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(td,((n={})[th]=s,n[tv]=t.pathname,n[tg]=e.id,n[tm]=e.text,n[ty]=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)$/;Array.from(document.getElementsByTagName("a")).forEach(i),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEac
11h(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,j.mG)(void 0,void 0,void 0,function(){return(0,j.Jh)(this,function(t){return[2,e]})})},teardown:function(){return(0,j.mG)(void 0,void 0,void 0,function(){return(0,j.Jh)(this,function(t){return null==e||e.disconnect(),r(),[2]})})}}},tN=!1,tL=function(e){tN||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."),tN=!0)},tM=function(){var e=eR(),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,j.mG)(void 0,void 0,void 0,function(){return(0,j.Jh)(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,j.mG)(void 0,void 0,void 0,function(){return(0,j.Jh)(this,function(e){return r(),[2]})})}}};(p=O||(O={})).Unknown="unknown",p.Skipped="skipped",p.Success="success",p.RateLimit="rate_limit",p.PayloadTooLarge="payload_too_large",p.Invalid="invalid",p.Failed="failed",p.Timeout="Timeout",p.SystemError="SystemError",(h=I||(I={})).US="US",h.EU="EU";var tD="Remote config fetch rejected due to timeout after 5 seconds",tF="Unexpected error occurred",tU=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,j.mG)(r,void 0,void 0,function(){var r,i,o;return(0,j.Jh)(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,j.mG)(r,void 0,void 0,function(){var t,n,r;return(0,j.Jh)(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,j.mG)(r,void 0,void 0,function(){var n,r,i,o,s,u,a,c,l,d,f;return(0,j.Jh)(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:tD})];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,j.XA)(this.configKeys)).next();!i.done;i=r.next())o=i.value,n.append("config_keys",o)}catch(e){l={error:e}}finally{try{i&&!i.done&&(d=r.return)&&d.call(r)}finally{if(l)throw l.error}}return t&&n.set("session_id",String(t)),s={headers:{Accept:"*/*"},method:"GET"},u="".concat(this.getServerUrl(),"?").concat(n.toString()),this.attempts+=1,[4,fetch(u,(0,j.pi)((0,j.pi)({},s),{signal:e}))];case 2:if(null===(a=p.sent()))return[2,this.completeRequest({err:tF})];switch(new e9().buildStatus(a.status)){case O.Success:return this.attempts=0,[2,this.parseAndStore
11Config(a)];case O.Failed:return[2,this.retryFetch(e,t)];default:return[2,this.completeRequest({err:"Network error occurred, remote config fetch failed"})]}return[3,4];case 3:if(c=p.sent(),e.aborted)return[2,this.completeRequest({err:tD})];return[2,this.completeRequest({err:null!==(f=c.message)&&void 0!==f?f:tF})];case 4:return[2]}})})},this.retryFetch=function(e,t){return(0,j.mG)(r,void 0,void 0,function(){var n=this;return(0,j.Jh)(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,j.mG)(r,void 0,void 0,function(){var t;return(0,j.Jh)(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===I.STAGING?"https://sr-client-cfg.stag2.amplitude.com/config":this.localConfig.serverZone===I.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}(),t$=function(e){var t=e.localConfig,n=e.configKeys;return(0,j.mG)(void 0,void 0,void 0,function(){return(0,j.Jh)(this,function(e){return[2,new tU({localConfig:t,configKeys:n})]})})},tG=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,j.mG)(this,void 0,void 0,function(){var e;return(0,j.Jh)(this,function(t){switch(t.label){case 0:return e=this,[4,t$({localConfig:this.config,configKeys:["analyticsSDK"]})];case 1:return e.remoteConfigFetch=t.sent(),[2]}})})},e.prototype.generateJoinedConfig=function(){var e,t,n,r;return(0,j.mG)(this,void 0,void 0,function(){var i,o,s;return(0,j.Jh)(this,function(u){switch(u.label){case 0:if(u.trys.push([0,3,,4]),!(o=this.remoteConfigFetch))return[3,2];return[4,this.remoteConfigFetch.getRemoteConfig("analyticsSDK","browserSDK",this.config.sessionId)];case 1:o=u.sent(),u.label=2;case 2:return i=o,this.config.loggerProvider.debug("Remote configuration:",JSON.stringify(i,null,2)),i&&"autocapture"in i&&("boolean"==typeof i.autocapture&&(this.config.autocapture=i.autocapture),"object"==typeof i.autocapture&&(void 0===this.config.autocapture&&(this.config.autocapture=i.autocapture),"boolean"==typeof this.config.autocapture&&(this.config.autocapture=(0,j.pi)({attribution:this.config.autocapture,fileDownloads:this.config.autocapture,formInteractions:this.config.autocapture,pageViews:this.config.autocapture,sessions:this.config.autocapture,elementInteractions:this.config.autocapture},i.autocapture)),"object"==typeof this.config.autocapture&&(this.config.autocapture=(0,j.pi)((0,j.pi)({},this.config.autocapture),i.autocapture))),this.config.defaultTracking=this.config.autocapture),this.config.loggerProvider.debug("Joined configuration: ",JSON.stringify(this.config,null,2)),null!==(e=(r=this.config).requestMetadata)&&void 0!==e||(r.requestMetadata=new z),(null===(t=this.remoteConfigFetch)||void 0===t?void 0:t.metrics.fetchTimeAPISuccess)&&this.config.requestMetadata.recordHistogram("remote_config_fetch_time_API_success",this.remoteConfigFetch.metrics.fetchTimeAPISuccess),(null===(n=this.remoteConfigFetch)||void 0===n?void 0:n.metrics.fetchTimeAPIFail)&&this.config.requestMetadata.recordHistogram("remote_config_fetch_time_API_fail",this.remoteConfigFetch.metrics.fetchTimeAPIFail),[3,4];case 3:return s=u.sent(),this.config.loggerProvider.error("Failed to fetch remote configuration because of error: ",s),[3,4];case 4:return[2,this.config]}})})},e}(),tq=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],tJ=["div","span","h1","h2","h3","h4","h5","h6"],tV="[Amplitude] Element Clicked",tW="[Amplitude] Element Tag",tz="[Amplitude] Element Text",tB="[Amplitude] Page URL",tK="https://app.amplitude.com",tH={US:tK,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"};function tZ(e){return"function"==typeof e}function tY(e){return function(t){if(tZ(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 tX(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 tQ=tX(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 t0(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var t1=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,j.XA)(o),u=s.next();!u.done;u=s.next())u.value.remove(this)}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else o.remove(this)}var a=this.initialTeardown;
11if(tZ(a))try{a()}catch(e){i=e instanceof tQ?e.errors:[e]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var l=(0,j.XA)(c),d=l.next();!d.done;d=l.next()){var f=d.value;try{t3(f)}catch(e){i=null!=i?i:[],e instanceof tQ?i=(0,j.ev)((0,j.ev)([],(0,j.CR)(i)),(0,j.CR)(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 tQ(i)}},t.prototype.add=function(e){var n;if(e&&e!==this){if(this.closed)t3(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?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)&&t0(t,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&t0(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),t2=t1.EMPTY;function t4(e){return e instanceof t1||e&&"closed"in e&&tZ(e.remove)&&tZ(e.add)&&tZ(e.unsubscribe)}function t3(e){tZ(e)?e():e.unsubscribe()}var t7={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},t5={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=t5.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,(0,j.ev)([e,t],(0,j.CR)(n))):setTimeout.apply(void 0,(0,j.ev)([e,t],(0,j.CR)(n)))},clearTimeout:function(e){var t=t5.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function t6(e){t5.setTimeout(function(){var t=t7.onUnhandledError;if(t)t(e);else throw e})}function t8(){}var t9=ne("C",void 0,void 0);function ne(e,t,n){return{kind:e,value:t,error:n}}var nt=null;function nn(e){if(t7.useDeprecatedSynchronousErrorHandling){var t=!nt;if(t&&(nt={errorThrown:!1,error:null}),e(),t){var n=nt,r=n.errorThrown,i=n.error;if(nt=null,r)throw i}}else e()}var nr=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,t4(t)&&t.add(n)):n.destination=nl,n}return(0,j.ZT)(t,e),t.create=function(e,t,n){return new nu(e,t,n)},t.prototype.next=function(e){this.isStopped?nc(ne("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?nc(ne("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?nc(t9,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}(t1),ni=Function.prototype.bind;function no(e,t){return ni.call(e,t)}var ns=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){na(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){na(e)}else na(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){na(e)}},e}(),nu=function(e){function t(t,n,r){var i,o,s=e.call(this)||this;return tZ(t)||!t?i={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&t7.useDeprecatedNextContext?((o=Object.create(t)).unsubscribe=function(){return s.unsubscribe()},i={next:t.next&&no(t.next,o),error:t.error&&no(t.error,o),complete:t.complete&&no(t.complete,o)}):i=t,s.destination=new ns(i),s}return(0,j.ZT)(t,e),t}(nr);function na(e){t7.useDeprecatedSynchronousErrorHandling?t7.useDeprecatedSynchronousErrorHandling&&nt&&(nt.errorThrown=!0,nt.error=e):t6(e)}function nc(e,t){var n=t7.onStoppedNotification;n&&t5.setTimeout(function(){return n(e,t)})}var nl={closed:!0,next:t8,error:function(e){throw e},complete:t8};
11function nd(e,t,n,r,i){return new nf(e,t,n,r,i)}var nf=function(e){function t(t,n,r,i,o,s){var u=e.call(this,t)||this;return u.onFinalize=o,u.shouldUnsubscribe=s,u._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,u._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,u._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,u}return(0,j.ZT)(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)||void 0===t||t.call(this)}},t}(nr);function np(e,t){return tY(function(n,r){var i=0;n.subscribe(nd(r,function(n){r.next(e.call(t,n,i++))}))})}var nh=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function nv(e){return tZ(null==e?void 0:e.then)}var ng="function"==typeof Symbol&&Symbol.observable||"@@observable";function nm(e){return e}var ny=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,i=this,o=(r=e)&&r instanceof nr||r&&tZ(r.next)&&tZ(r.error)&&tZ(r.complete)&&t4(r)?e:new nu(e,t,n);return nn(function(){var e=i.operator,t=i.source;o.add(e?e.call(o,t):t?i._subscribe(o):i._trySubscribe(o))}),o},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=nb(t))(function(t,r){var i=new nu({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?void 0:t.subscribe(e)},e.prototype[ng]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0===e.length?nm: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=nb(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 nb(e){var t;return null!==(t=null!=e?e:t7.Promise)&&void 0!==t?t:Promise}function nw(e){return Symbol.asyncIterator&&tZ(null==e?void 0:e[Symbol.asyncIterator])}function n_(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var nE="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function nS(e){return tZ(null==e?void 0:e[nE])}function nx(e){return(0,j.FC)(this,arguments,function(){var t,n,r;return(0,j.Jh)(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,j.qq)(t.read())];case 3:if(r=(n=i.sent()).value,!n.done)return[3,5];return[4,(0,j.qq)(void 0)];case 4:return[2,i.sent()];case 5:return[4,(0,j.qq)(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 nT(e){return tZ(null==e?void 0:e.getReader)}function nO(e){if(e instanceof ny)return e;if(null!=e){if(tZ(e[ng]))return new ny(function(t){var n=e[ng]();if(tZ(n.subscribe))return n.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")});if(nh(e))return new ny(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()});if(nv(e))return new ny(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,t6)});if(nw(e))return nI(e);if(nS(e))return new ny(function(t){var n,r;try{for(var i=(0,j.XA)(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(t.next(s),t.closed)return}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()});if(nT(e))return nI(nx(e))}throw n_(e)}function nI(e){return new ny(function(t){(function(e,t){var n,r,i,o;return(0,j.mG)(this,void 0,void 0,function(){var s;return(0,j.Jh)(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),n=(0,j.KL)(e),u.label=1;case 1:return[4,n.next()];case 2:if((r=u.sent()).done)return[3,4];if(s=r.value,t.next(s),t.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i={error:u.sent()},[3,11];case 6:if(u.trys.push([6,,9,10]),!(r&&!r.done&&(o=n.return)))return[3,8];return[4,o.call(n)];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];
11case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}var nk=tX(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),nP=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return(0,j.ZT)(t,e),t.prototype.lift=function(e){var t=new nC(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new nk},t.prototype.next=function(e){var t=this;nn(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=(0,j.XA)(t.currentObservers),o=i.next();!o.done;o=i.next())o.value.next(e)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;nn(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;nn(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this.hasError,r=this.isStopped,i=this.observers;return n||r?t2:(this.currentObservers=null,i.push(e),new t1(function(){t.currentObservers=null,t0(i,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,n=this.thrownError,r=this.isStopped;t?e.error(n):r&&e.complete()},t.prototype.asObservable=function(){var e=new ny;return e.source=this,e},t.create=function(e,t){return new nC(e,t)},t}(ny),nC=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return(0,j.ZT)(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:t2},t}(nP);function nj(e){void 0===e&&(e={});var t=e.connector,n=void 0===t?function(){return new nP}:t,r=e.resetOnError,i=void 0===r||r,o=e.resetOnComplete,s=void 0===o||o,u=e.resetOnRefCountZero,a=void 0===u||u;return function(e){var t,r,o,u=0,c=!1,l=!1,d=function(){null==r||r.unsubscribe(),r=void 0},f=function(){d(),t=o=void 0,c=l=!1},p=function(){var e=t;f(),null==e||e.unsubscribe()};return tY(function(e,h){u++,l||c||d();var v=o=null!=o?o:n();h.add(function(){0!=--u||l||c||(r=nR(p,a))}),v.subscribe(h),!t&&u>0&&(t=new nu({next:function(e){return v.next(e)},error:function(e){l=!0,d(),r=nR(f,i,e),v.error(e)},complete:function(){c=!0,d(),r=nR(f,s),v.complete()}}),nO(e).subscribe(t))})(e)}}function nR(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!0===t){e();return}if(!1!==t){var i=new nu({next:function(){i.unsubscribe(),e()}});return nO(t.apply(void 0,(0,j.ev)([],(0,j.CR)(n)))).subscribe(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 nN(e,t,n){return(void 0===n&&(n=1/0),tZ(t))?nN(function(n,r){return np(function(e,i){return t(n,e,r,i)})(nO(e(n,r)))},n):("number"==typeof t&&(n=t),tY(function(t,r){var i,o,s,u,a,c,l,d,f,p,h,v;return i=n,c=[],l=0,d=0,f=!1,p=function(){!f||c.length||l||r.complete()},h=function(e){return l<i?v(e):c.push(e)},v=function(t){s&&r.next(t),l++;var n=!1;nO(e(t,d++)).subscribe(nd(r,function(e){null==o||o(e),s?h(e):r.next(e)},function(){n=!0},void 0,function(){if(n)try{for(l--;c.length&&l<i;)!function(){var e=c.shift();u?nA(r,u,function(){return v(e)}):v(e)}();p()}catch(e){r.error(e)}}))},t.subscribe(nd(r,h,function(){f=!0,p()})),function(){null==a||a()}}))}var nL=Array.isArray,nM=["addListener","removeListener"],nD=["addEventListener","removeEventListener"],nF=["on","off"];function nU(e,t,n,r){if(tZ(n)&&(r=n,n=void 0),r)return nU(e,t,n).pipe((i=r,np(function(e){return nL(e)?i.apply(void 0,(0,j.ev)([],(0,j.CR)(e))):i(e)})));var i,o=(0,j.CR)(tZ(e.addEventListener)&&tZ(e.removeEventListener)?nD.map(function(r){return function(i){return e[r](t,i,n)}}):tZ(e.addListener)&&tZ(e.removeListener)?nM.map(n$(e,t)):tZ(e.on)&&tZ(e.off)?nF.map(n$(e,t)):[],2),s=o[0],u=o[1];if(!s&&nh(e))return nN(function(e){return nU(e,t,n)})(nO(e));if(!s)throw TypeError("Invalid event target");return new ny(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 s(t),function(){return u(t)}})}function n$(e,t){return function(n){return function(r){return e[n](t,r)}}}var nG=["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot"],nq=["type"],nJ=["svg","path","g"],nV=["password","hidden"],nW=["input","select","textarea"],nz=function(e,t){var n,r=null===(n=null==window?void 0:window.getComputedStyle)||void 0===n?void 0:n.call(window,e);return(null==r?void 0:r.getPropertyValue("cursor"))==="pointer"&&"click"===t},nB=function(e,t,n){return void 0===n&&(n=!1),function(r,i){var o,s,u=e.pageUrlAllowlist,a=e.shouldTrackEventResolver,c=null===(s=null===(o=null==i?void 0:i.tagName)||void 0===o?void 0:o.toLowerCase)||void 0===s?void 0:s.call(o);if(!c)return!1;if(a)return a(r,i);if(!nY(window.location.href,u))return!1;var l=String(null==i?void 0:i.getAttribute("type"))||"";if("string"==typeof l)switch(l.toLowerCase()){case"hidden":case"password":return!1}var d=nz(i,r);if(n&&d)return!0;
11if(t&&!t.some(function(e){var t;return!!(null===(t=null==i?void 0:i.matches)||void 0===t?void 0:t.call(i,e))}))return!1;switch(c){case"input":case"select":case"textarea":return"change"===r||"click"===r;default:if(d)return!0;return"click"===r}}},nK=function(e){return!(null==e||"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})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((e||"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(e)))},nH=function(e){var t,n,r,i=null===(n=null===(t=null==e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase)||void 0===n?void 0:n.call(t),o=e instanceof HTMLElement&&(null===(r=e.getAttribute("contenteditable"))||void 0===r?void 0:r.toLowerCase())==="true";return!nW.includes(i)&&!o},nZ=function(e){var t="";return nH(e)&&e.childNodes&&e.childNodes.length&&e.childNodes.forEach(function(e){var n="";e&&3===e.nodeType?e.textContent&&(n=e.textContent):n=nZ(e),t+=n.split(/(\s+)/).filter(nK).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}),t},nY=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},nX=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},{})},nQ=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 nK(r)?r:""}return nQ(n)},n0=function(e,t){return e?t.some(function(t){var n;return null===(n=null==e?void 0:e.matches)||void 0===n?void 0:n.call(e,t)})?e:n0(null==e?void 0:e.parentElement,t):null},n1=function(e){if(!e)return{};var t,n,r,i=null===(r=null===(n=null==e?void 0:e.tagName)||void 0===n?void 0:n.toLowerCase)||void 0===r?void 0:r.call(n);return nX(((t={})[tW]=i,t[tz]=nZ(e),t[tB]=window.location.href.split("?")[0],t))},n2=function(e){return null!==e.event.target&&!!e.closestTrackedAncestor},n4=function(e,t,n){var r,i,o,s,u=null===(s=null===(o=null==t?void 0:t.tagName)||void 0===o?void 0:o.toLowerCase)||void 0===s?void 0:s.call(o),a="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},c=t.getAttribute("aria-label"),l=t.getAttributeNames().reduce(function(e,r){if(r.startsWith(n)){var i=r.replace(n,""),o=t.getAttribute(r);i&&(e[i]=o||"")}return e},{}),d=nQ(t),f=((i={})["[Amplitude] Element ID"]=t.getAttribute("id")||"",i["[Amplitude] Element Class"]=t.getAttribute("class"),i["[Amplitude] Element Hierarchy"]=(r=t)?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";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,j.CR)(e,1)[0];return null!=t}).map(function(t){var n=(0,j.CR)(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;
11t.push(e);for(var n=e.parentElement;n&&"HTML"!==n.tagName;)t.push(n),n=n.parentElement;return t})(r).map(function(e){return function(e){if(null===e)return null;var t,n,r,i,o,s,u=String(e.tagName).toLowerCase(),a={tag:u},c=Array.from(null!==(i=null===(r=e.parentElement)||void 0===r?void 0:r.children)&&void 0!==i?i:[]);c.length&&(a.index=c.indexOf(e),a.indexOfType=c.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var l=null===(s=null===(o=e.previousElementSibling)||void 0===o?void 0:o.tagName)||void 0===s?void 0:s.toLowerCase();l&&(a.prevSib=String(l));var d=e.getAttribute("id");d&&(a.id=String(d));var f=Array.from(e.classList);f.length&&(a.classes=f);var p={},h=Array.from(e.attributes).filter(function(e){return!nG.includes(e.name)}),v=!nH(e);if(!nV.includes(String(e.getAttribute("type")))&&!nJ.includes(u))try{for(var g=(0,j.XA)(h),m=g.next();!m.done;m=g.next()){var y=m.value;(!v||nq.includes(y.name))&&(p[y.name]=String(y.value).substring(0,128))}}catch(e){t={error:e}}finally{try{m&&!m.done&&(n=g.return)&&n.call(g)}finally{if(t)throw t.error}}return Object.keys(p).length&&(a.attrs=p),a}(e)}),0):[],i[tW]=u,i[tz]=nZ(t),i["[Amplitude] Element Position Left"]=null==a.left?null:Math.round(a.left),i["[Amplitude] Element Position Top"]=null==a.top?null:Math.round(a.top),i["[Amplitude] Element Aria Label"]=c,i["[Amplitude] Element Attributes"]=l,i["[Amplitude] Element Parent Label"]=d,i[tB]=window.location.href.split("?")[0],i["[Amplitude] Page Title"]="undefined"!=typeof document&&document.title||"",i["[Amplitude] Viewport Height"]=window.innerHeight,i["[Amplitude] Viewport Width"]=window.innerWidth,i);return"a"===u&&"click"===e&&t instanceof HTMLAnchorElement&&(f["[Amplitude] Element Href"]=t.href),nX(f)},n3=function(e,t,n,r,i){void 0===i&&(i=!1);var o={event:e,timestamp:Date.now(),type:t};if(("click"===o.type||"change"===o.type)&&null!==o.event.target){if(i&&nz(o.event.target,o.type))return o.closestTrackedAncestor=o.event.target,o.targetElementProperties=n4(o.type,o.closestTrackedAncestor,r),o;var s=n0(o.event.target,n);s&&(o.closestTrackedAncestor=s,o.targetElementProperties=n4(o.type,s,r))}return o},n7=function(){function e(e){var t=(void 0===e?{}:e).origin,n=void 0===t?tK:t,r=this;this.endpoint=tK,this.requestCallbacks={},this.onSelect=function(e){r.notify({action:"element-selected",data:e})},this.onTrack=function(e,t){"selector-mode-changed"===e?r.notify({action:"track-selector-mode-changed",data:t}):"selector-moved"===e&&r.notify({action:"track-selector-moved",data:t})},this.endpoint=n}return e.prototype.notify=function(e){var t,n,r,i;null===(n=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Message sent: ",JSON.stringify(e)),null===(i=null===(r=window.opener)||void 0===r?void 0:r.postMessage)||void 0===i||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)||void 0===t||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,u=n.actionClickAllowlist;this.logger=r,i&&this.endpoint===tK&&(this.endpoint=i);var a=null;window.addEventListener("message",function(e){if(null===(r=null===(n=t.logger)||void 0===n?void 0:n.debug)||void 0===r||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?void 0:i.debug)||void 0===c||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 p,h=null==d?void 0:d.data;(p="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=p,r.addEventListener("load",function(){e({status:!0})},{once:!0}),r.addEventListener("error",function(){t({status:!1,message:"Failed to load the script ".concat(p)})}),null===(n=document.head)||void 0===n||n.appendChild(r)}catch(e){t(e)}})).then(function(){var e;a=null===(e=null==window?void 0:window.amplitudeVisualTaggingSelector)||void 0===e?void 0:e.call(window,{getEventTagProps:n1,isElementSelectable:function(e){return!o||o((null==h?void 0:h.actionType)||"click",e)},onTrack:t.onTrack,onSelect:t.onSelect,visualHighlightClass:"amp-visual-tagging-selector-highlight",messenger:t,cssSelectorAllowlist:s,actionClickAllowlist:u}),t.notify({action:"selector-loaded"})}).catch(function(){var e;
11null===(e=t.logger)||void 0===e||e.warn("Failed to initialize visual tagging selector")})}else"close-visual-tagging-selector"===f&&(null===(l=null==a?void 0:a.close)||void 0===l||l.call(a))}}}),this.notify({action:"page-loaded"})},e}();function n5(e,t){return tY(function(n,r){var i=0;n.subscribe(nd(r,function(n){return e.call(t,n,i++)&&r.next(n)}))})}var n6=function(e){function t(t,n){return e.call(this)||this}return(0,j.ZT)(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(t1),n8={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n8.delegate;return(null==i?void 0:i.setInterval)?i.setInterval.apply(i,(0,j.ev)([e,t],(0,j.CR)(n))):setInterval.apply(void 0,(0,j.ev)([e,t],(0,j.CR)(n)))},clearInterval:function(e){var t=n8.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},n9=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,j.ZT)(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)&&void 0!==n?n:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),n8.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&&n8.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,t0(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(n6),re={now:function(){return(re.delegate||Date).now()},delegate:void 0},rt=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=re.now,e}(),rn=new(function(e){function t(t,n){void 0===n&&(n=rt.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return(0,j.ZT)(t,e),t.prototype.flush=function(e){var t,n=this.actions;if(this._active){n.push(e);return}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}(rt))(n9);function rr(e){return void 0===e&&(e=1/0),nN(nm,e)}var ri=new ny(function(e){return e.complete()});function ro(e){return e&&tZ(e.schedule)}function rs(e){return e[e.length-1]}function ru(e){return ro(rs(e))?e.pop():void 0}function ra(e,t){return void 0===t&&(t=0),tY(function(n,r){n.subscribe(nd(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 rc(e,t){return void 0===t&&(t=0),tY(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function rl(e,t){if(!e)throw Error("Iterable cannot be null");return new ny(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 rd(e,t){return t?function(e,t){if(null!=e){if(tZ(e[ng]))return nO(e).pipe(rc(t),ra(t));if(nh(e))return new ny(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})});if(nv(e))return nO(e).pipe(rc(t),ra(t));if(nw(e))return rl(e,t);if(nS(e))return new ny(function(n){var r;return nA(n,t,function(){r=e[nE](),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 tZ(null==r?void 0:r.return)&&r.return()}});if(nT(e))return rl(nx(e),t)}throw n_(e)}(e,t):nO(e)}function rf(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=ru(e),r="number"==typeof rs(e)?e.pop():1/0;return e.length?1===e.length?nO(e[0]):rr(r)(rd(e,n)):ri}function rp(e){return e<=0?function(){return ri}:tY(function(t,n){var r=0;t.subscribe(nd(n,function(t){++r<=e&&(n.next(t),e<=r&&n.complete())}))})}function rh(e){return e instanceof Date&&!isNaN(e)}var rv=tX(function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}});function rg(e){throw new rv(e)}var rm=function(e,t){try{if("[Amplitude] Element Text"===t.subprop_key)return"exact"===t.subprop_op&&t.subprop_value.includes(e.targetElementProperties["[Amplitude] Element Text"]);if("[Amplitude] Element Hierarchy"===t.subprop_key)return"autotrack css match"===t.subprop_op&&!!e.closestTrackedAncestor.closest(t.subprop_value.toString())}catch(e){console.error("Error matching event to filter",e)}return!1},ry=function(e){var t,n,r,i,o,s={click:new Set,change:new Set};if(!e)return s;try{for(var u=(0,j.XA)(e),a=u.next();!a.done;a=u.next()){var c=a.value;try{try{for(var l=(r=void 0,(0,j.XA)(c.definition)),d=l.next();!d.done;d=l.next()){var f=d.value;null===(o=s[f.event_type])||void 0===o||o.add(c.id)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}catch(e){console.warn("Skipping Labeled Event due to malformed definition",null==c?void 0:c.id,e)}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return s},rb=function(e){var t,n,r,i,o=new Map;try{for(var s=(0,j.XA)(e),u=s.next();!u.done;u=s.next()){var a=u.value;try{for(var c=(r=void 0,(0,j.XA)(a.conditions)),l=c.next();!l.done;l=c.next()){var d=l.value;if("LABELED_EVENT"===d.type){var f=d.match.eventId,p=o.get(f);p||(p=[],o.set(f,p)),p.push(a)}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return o},rw=function(e,t){var n,r,i=new Set;try{for(var o=(0,j.XA)(e),s=o.next();!s.done;s=o.next()){var u=s.value,a=t.get(u.id);a&&a.forEach(function(e){return i.add(e)})}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return Array.from(i)},r_=function(e,t){if("DOM_ELEMENT"===e.sourceType){var n=document.documentElement;return(e.scope&&t&&(n=t.closest(e.scope)),n&&e.selector)?n.querySelector(e.selector):n}},rE=function(e,t){if("DOM_ELEMENT"===e.sourceType){var n=r_(e,t);if(n){if("TEXT"===e.elementExtractType)return n.textContent;if("ATTRIBUTE"===e.elementExtractType&&e.attribute)return n.getAttribute(e.attribute)}}},rS=function(e,t){e.forEach(function(e){if("string"!=typeof e&&"ATTACH_EVENT_PROPERTY"===e.actionType){var n=rE(e.dataSource,t.closestTrackedAncestor);t.targetElementProperties[e.destinationKey]=n}})};(v=k||(k={})).ClickObservable="clickObservable",v.ChangeObservable="changeObservable",v.NavigateObservable="navigateObservable",v.MutationObservable="mutationObservable";var rx=function(e){void 0===e&&(e={});var t,n,r,i,o,s,u,a=e.dataAttributePrefix,c=void 0===a?"data-amp-track-":a,l=e.visualTaggingOptions,d=void 0===l?{enabled:!0,messenger:new n7}:l;e.cssSelectorAllowlist=null!==(t=e.cssSelectorAllowlist)&&void 0!==t?t:tq,e.actionClickAllowlist=null!==(n=e.actionClickAllowlist)&&void 0!==n?n:tJ,e.debounceTime=null!==(r=e.debounceTime)&&void 0!==r?r:0;var f="@amplitude/plugin-autocapture-browser",p=[],h=function(){var t,n,r=nU(document,"click",{capture:!0}).pipe(np(function(t){return n3(t,"click",e.cssSelectorAllowlist,c)}),nj()),i=nU(document,"change",{capture:!0}).pipe(np(function(t){return n3(t,"change",e.cssSelectorAllowlist,c)}),nj());window.navigation&&(n=nU(window.navigation,"navigate").pipe(np(function(t){return n3(t,"navigate",e.cssSelectorAllowlist,c)}),nj()));var o=new ny(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(np(function(t){return n3(t,"mutation",e.cssSelectorAllowlist,c)}),nj());return(t={})[k.ClickObservable]=r,t[k.ChangeObservable]=i,t[k.NavigateObservable]=n,t[k.MutationObservable]=o,t},v=ry(Object.values(null!==(o=null===(i=e.pageActions)||void 0===i?void 0:i.labeledEvents)&&void 0!==o?o:{})),g=rb(null!==(u=null===(s=e.pageActions)||void 0===s?void 0:s.triggers)&&void 0!==u?u:[]),m=function(t){var n,r,i=e.pageActions;if(!i)return t;var o=rw(Array.from(v[t.type]).map(function(e){return i.labeledEvents[e]}).filter(function(e){return e.definition.some(function(e){return e.event_type===t.type&&e.filters.every(function(e){return rm(t,e)})})}),g);try{for(var s=(0,j.XA)(o),u=s.next();!u.done;u=s.next()){var a=u.value;rS(a.actions,t)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return t};return{name:f,type:"enrichment",setup:function(t,n){return(0,j.mG)(void 0,void 0,void 0,function(){var r,i,o,s,u,a,l,v,g,y;return(0,j.Jh)(this,function(b){var w,_,E,S,x,T,O,I,k,P,C,R,A,N,L,M,D,F,U,$,G,q,J,V,W,z,B,K,H,Z,Y,X,Q,ee,et,en;return"undefined"==typeof document||(r=nB(e,e.cssSelectorAllowlist),i=nB(e,e.actionClickAllowlist),_=(w={allObservables:o=h(),options:e,amplitude:n,shouldTrackEvent:r,evaluateTriggers:m}).amplitude,E=w.allObservables,S=w.options,x=w.shouldTrackEvent,T=w.evaluateTriggers,P=rf((O=E.clickObservable).pipe(tY(function(e,t){var n,r=!1;e.subscribe(nd(t,function(e){var i=n;n=e,r&&t.next([i,e]),r=!0}))}),n5(function(e){var t=(0,j.CR)(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})),O.pipe((I=S.debounceTime,void 0===k&&(k=rn),tY(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+I,r=k.now();if(r<e){n=this.schedule(void 0,e-r),t.add(n);return}o()}e.subscribe(nd(t,function(e){r=e,i=k.now(),n||(n=k.schedule(s,I),t.add(n))},function(){o(),t.complete()},void 0,function(){r=n=null}))})),np(function(){return"timeout"}))),s=O.pipe((void 0===C&&(C=rn),R=0,A=C,void 0===R&&(R=0),void 0===N&&(N=rn),L=-1,null!=A&&(ro(A)?N=A:L=A),M=new ny(function(e){var t=rh(R)?+R-N.now():R;t<0&&(t=0);var n=0;return N.schedule(function(){e.closed||(e.next(n++),0<=L?this.schedule(void 0,L):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 rr(1)(rd(e,ru(e)))}(n.pipe(rp(1),tY(function(e,t){e.subscribe(nd(t,t8))})),r.pipe(e(t)))}:nN(function(e,n){return nO(t(e,n)).pipe(rp(1),np(function(){return e}))})}(function(){return M})),n5(n2),n5(function(e){return x("click",e.closestTrackedAncestor)}),np(function(e){return T(e)}),tY(function(e,t){var n=[];return e.subscribe(nd(t,function(e){return n.push(e)},function(){t.next(n),t.complete()}
11)),nO(P).subscribe(nd(t,function(){var e=n;n=[],t.next(e)},t8)),function(){n=null}})).subscribe(function(e){var t,n,r=(e.length,tV);try{for(var i=(0,j.XA)(e),o=i.next();!o.done;o=i.next()){var s=o.value;null==_||_.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}}}),p.push(s),F=(D={allObservables:o,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n4.apply(void 0,(0,j.ev)((0,j.ev)([],(0,j.CR)(e),!1),[c],!1))},amplitude:n,shouldTrackEvent:r,evaluateTriggers:m}).amplitude,U=D.allObservables,$=D.getEventProperties,G=D.shouldTrackEvent,q=D.evaluateTriggers,u=U.changeObservable.pipe(n5(n2),n5(function(e){return G("change",e.closestTrackedAncestor)}),np(function(e){return q(e)})).subscribe(function(e){null==F||F.track("[Amplitude] Element Changed",$("change",e.closestTrackedAncestor))}),p.push(u),V=(J={allObservables:o,options:e,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n4.apply(void 0,(0,j.ev)((0,j.ev)([],(0,j.CR)(e),!1),[c],!1))},amplitude:n,shouldTrackEvent:r,shouldTrackActionClick:i}).amplitude,W=J.allObservables,z=J.options,B=J.getEventProperties,K=J.shouldTrackEvent,H=J.shouldTrackActionClick,Z=W.clickObservable,Y=W.mutationObservable,X=W.navigateObservable,Q=Z.pipe(n5(function(e){return!K("click",e.closestTrackedAncestor)}),np(function(e){var t=n0(e.event.target,z.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=B(e.type,e.closestTrackedAncestor)),e}),n5(n2),n5(function(e){return H("click",e.closestTrackedAncestor)})),ee=[Y],X&&ee.push(X),et=rf.apply(void 0,(0,j.ev)([],(0,j.CR)(ee),!1)),a=Q.pipe(tY(function(e,t){var n=null,r=0,i=!1,o=function(){return i&&!n&&t.complete()};e.subscribe(nd(t,function(e){null==n||n.unsubscribe();var i=0,s=r++;nO(et.pipe(rp(1),function(e,t){var n=rh(e)?{first:e}:"number"==typeof e?{each:e}:e,r=n.first,i=n.each,o=n.with,s=void 0===o?rg:o,u=n.scheduler,a=void 0===u?null!=t?t:rn:u,c=n.meta,l=void 0===c?null:c;if(null==r&&null==i)throw TypeError("No timeout provided.");return tY(function(e,t){var n,o,u=null,c=0,d=function(e){o=nA(t,a,function(){try{n.unsubscribe(),nO(s({meta:l,lastValue:u,seen:c})).subscribe(t)}catch(e){t.error(e)}},e)};n=e.subscribe(nd(t,function(e){null==o||o.unsubscribe(),c++,t.next(u=e),i>0&&d(i)},void 0,void 0,function(){(null==o?void 0:o.closed)||null==o||o.unsubscribe(),u=null})),c||d(null!=r?"number"==typeof r?r:+r-a.now():i)})}({first:500,with:function(){return ri}}),np(function(){return e}))).subscribe(n=nd(t,function(n){return t.next(en?en(e,n,s,i++):n)},function(){n=null,o()}))},function(){i=!0,o()}))})).subscribe(function(e){null==V||V.track(tV,B("click",e.closestTrackedAncestor))}),p.push(a),null===(g=null==t?void 0:t.loggerProvider)||void 0===g||g.log("".concat(f," has been successfully added.")),window.opener&&d.enabled&&(l=e.cssSelectorAllowlist,v=e.actionClickAllowlist,null===(y=d.messenger)||void 0===y||y.setup((0,j.pi)((0,j.pi)({logger:null==t?void 0:t.loggerProvider},(null==t?void 0:t.serverZone)&&{endpoint:tH[t.serverZone]}),{isElementSelectable:nB(e,(0,j.ev)((0,j.ev)([],(0,j.CR)(l),!1),(0,j.CR)(v),!1)),cssSelectorAllowlist:l,actionClickAllowlist:v})))),[2]})})},execute:function(e){return(0,j.mG)(void 0,void 0,void 0,function(){return(0,j.Jh)(this,function(t){return[2,e]})})},teardown:function(){return(0,j.mG)(void 0,void 0,void 0,function(){var e,t,n,r;return(0,j.Jh)(this,function(i){try{for(t=(e=(0,j.XA)(p)).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]})})}}},rT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,j.ZT)(t,e),t.prototype.init=function(e,t,n){var r,i;return void 0===e&&(e=""),arguments.length>2?(r=t,i=n):"string"==typeof t?(r=t,i=void 0):(r=null==t?void 0:t.userId,i=t),M(this._init((0,j.pi)((0,j.pi)({},i),{userId:r,apiKey:e})))},t.prototype._init=function(t){var n,r,i;return(0,j.mG)(this,void 0,void 0,function(){var o,s,u,a,c,l=this;return(0,j.Jh)(this,function(d){var f,p,h,v,g;switch(d.label){case 0:if(this.initializing)return[2];return this.initializing=!0,[4,(f=t.apiKey,p=t,h=this,void 0===p&&(p={}),(0,j.mG)(void 0,void 0,void 0,function(){var e,t,n,r,i,o,s,u,a,c,l,d,v,g,m,y,b,w,_,E,S,x,T,O,I,k,P,C,R,A,N,L,M,D,F,U,$,G,q,J,V,W,z;return(0,j.Jh)(this,function(B){var K,Z,Y;switch(B.label){case 0:if(e=p.identityStorage||tE,_={}
11,!(e!==tE))return[3,1];return n="",[3,5];case 1:if(!(null!==(S=null===(E=p.cookieOptions)||void 0===E?void 0:E.domain)&&void 0!==S))return[3,2];return r=S,[3,4];case 2:return[4,(0,j.mG)(void 0,void 0,void 0,function(){var e,t,n,r,i,o,s;return(0,j.Jh)(this,function(u){switch(u.label){case 0:return[4,new e5().isEnabled()];case 1:if(!u.sent()||!K&&("undefined"==typeof location||!location.hostname))return[2,""];for(e=(null!=K?K:location.hostname).split("."),t=[],n="AMP_TLDTEST",r=e.length-2;r>=0;--r)t.push(e.slice(r).join("."));r=0,u.label=2;case 2:if(!(r<t.length))return[3,7];return o={domain:"."+(i=t[r])},[4,(s=new e5(o)).set(n,1)];case 3:return u.sent(),[4,s.get(n)];case 4:if(!u.sent())return[3,6];return[4,s.remove(n)];case 5:return u.sent(),[2,"."+i];case 6:return r++,[3,2];case 7:return[2,""]}})})];case 3:r=B.sent(),B.label=4;case 4:n=r,B.label=5;case 5:return t=j.pi.apply(void 0,[(_.domain=n,_.expiration=365,_.sameSite="Lax",_.secure=!1,_.upgrade=!0,_),p.cookieOptions]),[4,(Z=i=tx(p.identityStorage,t),void 0===(Y=null===(T=null===(x=p.cookieOptions)||void 0===x?void 0:x.upgrade)||void 0===T||T)&&(Y=!0),(0,j.mG)(void 0,void 0,void 0,function(){var e,t,n,r,i,o,s,u,a;return(0,j.Jh)(this,function(c){switch(c.label){case 0:return e="".concat("amp","_").concat(f.substring(0,6)),[4,Z.getRaw(e)];case 1:if(!(t=c.sent()))return[2,{optOut:!1}];if(!Y)return[3,3];return[4,Z.remove(e)];case 2:c.sent(),c.label=3;case 3:return r=(n=(0,j.CR)(t.split("."),6))[0],i=n[1],o=n[2],s=n[3],u=n[4],a=n[5],[2,{deviceId:r,userId:tu(i),sessionId:ts(s),lastEventId:ts(a),lastEventTime:ts(u),optOut:!!o}]}})}))];case 6:return o=B.sent(),[4,i.get(e7(f))];case 7:return s=B.sent(),u=eA(),a=null!==(C=null!==(P=null!==(k=null!==(I=null!==(O=p.deviceId)&&void 0!==O?O:u.ampDeviceId)&&void 0!==I?I:u.deviceId)&&void 0!==k?k:null==s?void 0:s.deviceId)&&void 0!==P?P:o.deviceId)&&void 0!==C?C:H(),c=null!==(R=null==s?void 0:s.lastEventId)&&void 0!==R?R:o.lastEventId,l=null!==(A=null==s?void 0:s.lastEventTime)&&void 0!==A?A:o.lastEventTime,d=null!==(L=null!==(N=p.optOut)&&void 0!==N?N:null==s?void 0:s.optOut)&&void 0!==L?L:o.optOut,v=null!==(M=null==s?void 0:s.sessionId)&&void 0!==M?M:o.sessionId,g=null!==(F=null!==(D=p.userId)&&void 0!==D?D:null==s?void 0:s.userId)&&void 0!==F?F:o.userId,h.previousSessionDeviceId=null!==(U=null==s?void 0:s.deviceId)&&void 0!==U?U:o.deviceId,h.previousSessionUserId=null!==($=null==s?void 0:s.userId)&&void 0!==$?$:o.userId,m={ipAddress:null===(q=null===(G=p.trackingOptions)||void 0===G?void 0:G.ipAddress)||void 0===q||q,language:null===(V=null===(J=p.trackingOptions)||void 0===J?void 0:J.language)||void 0===V||V,platform:null===(z=null===(W=p.trackingOptions)||void 0===W?void 0:W.platform)||void 0===z||z},y=null==s?void 0:s.pageCounter,b=null==s?void 0:s.debugLogsEnabled,void 0!==p.autocapture&&(p.defaultTracking=p.autocapture),[4,(w=new tS(f,p.appVersion,i,t,p.defaultTracking,p.autocapture,a,p.flushIntervalMillis,p.flushMaxRetries,p.flushQueueSize,e,p.ingestionMetadata,p.instanceName,c,l,p.loggerProvider,p.logLevel,p.minIdLength,p.offline,d,p.partnerId,p.plan,p.serverUrl,p.serverZone,v,p.sessionTimeout,p.storageProvider,m,p.transport,p.useBatch,p.fetchRemoteConfig,g,y,b)).storageProvider.isEnabled()];case 8:return B.sent()||(w.loggerProvider.warn("Storage provider ".concat(w.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),w.storageProvider=new e3),[2,w]}})}))];case 1:if(o=d.sent(),!t.fetchRemoteConfig)return[3,4];return[4,(v=o,(0,j.mG)(void 0,void 0,void 0,function(){var e;return(0,j.Jh)(this,function(t){switch(t.label){case 0:return[4,(e=new tG(v)).initialize()];case 1:return t.sent(),[2,e]}})}))];case 2:return[4,d.sent().generateJoinedConfig()];case 3:o=d.sent(),d.label=4;case 4:return[4,e.prototype._init.call(this,o)];case 5:if(d.sent(),this.logBrowserOptions(o),!el(this.config.defaultTracking))return[3,7];return s=el((g=this.config).defaultTracking)&&g.defaultTracking&&"object"==typeof g.defaultTracking&&g.defaultTracking.attribution&&"object"==typeof g.defaultTracking.attribution?(0,j.pi)({},g.defaultTracking.attribution):{},this.webAttribution=new eD(s,this.config),[4,this.webAttribution.init()];case 6:d.sent(),d.label=7;case 7:if(a=Number.isNaN(Number((u=eA()).ampSessionId))?void 0:Number(u.ampSessionId),this.setSessionId(null!==(i=null!==(r=null!==(n=t.sessionId)&&void 0!==n?n:a)&&void 0!==r?r:this.config.sessionId)&&void 0!==i?i:Date.now()),(c=eK(t.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),!(this.config.offline!==eX))return[3,9];return[4,this.add(tM()).promise];case 8:d.sent(),d.label=9;case 9:return[4,this.add(new Y).promise];case 10:return d.sent(),[4,this.add(new e4).promise];case 11:return d.sent(),[4,this.add(new eY).promise];case 12:if(d.sent(),tL(this.config),!ec(this.config.defaultTracking,"fileDownloads"))return[3,14];return this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(tA()).promise];case 13:d.sent(),d.label=14;case 14:if(!ec(this.config.defaultTracking,"formInteractions"))return[3,16
11];return this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(tj()).promise];case 15:d.sent(),d.label=16;case 16:if(!ed(this.config.defaultTracking))return[3,18];return this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(tI(ev(this.config))).promise];case 17:d.sent(),d.label=18;case 18:if(!ep(this.config.autocapture))return[3,20];return this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(rx(eh(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(),c.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?void 0:e.userId},t.prototype.setUserId=function(e){if(!this.config){this.q.push(this.setUserId.bind(this,e));return}this.config.loggerProvider.debug("function setUserId: ",e),(e!==this.config.userId||void 0===e)&&(this.config.userId=e,eH(e,this.config.instanceName))},t.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},t.prototype.setDeviceId=function(e){if(!this.config){this.q.push(this.setDeviceId.bind(this,e));return}this.config.loggerProvider.debug("function setDeviceId: ",e),this.config.deviceId=e,eZ(e,this.config.instanceName)},t.prototype.reset=function(){this.setDeviceId(H()),this.setUserId(void 0)},t.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},t.prototype.setSessionId=function(e){var t,n=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),M(Promise.resolve());if(e===this.config.sessionId)return M(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var r=this.getSessionId(),i=this.config.lastEventTime,o=null!==(t=this.config.lastEventId)&&void 0!==t?t:-1;this.config.sessionId=e,this.config.lastEventTime=void 0,this.config.pageCounter=0,ef(this.config.defaultTracking)&&(r&&i&&n.push(this.track(tp,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 ef(this.config.defaultTracking)&&n.push(this.track(tf,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,M(Promise.all(n))},t.prototype.extendSession=function(){if(!this.config){this.q.push(this.extendSession.bind(this));return}this.config.lastEventTime=Date.now()},t.prototype.setTransport=function(e){if(!this.config){this.q.push(this.setTransport.bind(this,e));return}this.config.transportProvider=tT(e)},t.prototype.identify=function(t,n){if(e1(t)){var r=t._q;t._q=[],t=e0(new ee,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(e1(r)){var o=r._q;r._q=[],r=e0(new ee,o)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if(e1(t)){var r=t._q;t._q=[],t=e0(new en,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,j.mG)(this,void 0,void 0,function(){var n,r,i;return(0,j.Jh)(this,function(o){return n=Date.now(),r=eM(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type===tf||t.event_type===tp||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,j.pi)((0,j.pi)({},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}(ea),rO=function(){var e=new rT;return{init:L(e.init.bind(e),"init",R(e),N(e,["config"])),add:L(e.add.bind(e),"add",R(e),N(e,["config.apiKey","timeline.plugins"])),remove:L(e.remove.bind(e),"remove",R(e),N(e,["config.apiKey","timeline.plugins"])),track:L(e.track.bind(e),"track",R(e),N(e,["config.apiKey","timeline.queue.length"])),logEvent:L(e.logEvent.bind(e),"logEvent",R(e),N(e,["config.apiKey","timeline.queue.length"])),identify:L(e.identify.bind(e),"identify",R(e),N(e,["config.apiKey","timeline.queue.length"])),groupIdentify:L(e.groupIdentify.bind(e),"groupIdentify",R(e),N(e,["config.apiKey","timeline.queue.length"])),setGroup:L(e.setGroup.bind(e),"setGroup",R(e),N(e,["config.apiKey","timeline.queue.length"])),revenue:L(e.revenue.bind(e),"revenue",R(e),N(e,["config.apiKey","timeline.queue.length"])),flush:L(e.flush.bind(e),"flush",R(e),N(e,["config.apiKey","timeline.queue.length"])),getUserId:L(e.getUserId.bind(e),"getUserId",R(e),N(e,["config","config.userId"])),setUserId:L(e.setUserId.bind(e),"setUserId",R(e),N(e,["config","config.userId"])),getDeviceId:L(e.getDeviceId.bind(e),"getDeviceId",R(e),N(e,["config","config.deviceId"])),setDeviceId:L(e.setDeviceId.bind(e),"setDeviceId",R(e),N(e,["config","config.deviceId"])),reset:L(e.reset.bind(e),"reset",R(e),N(e,["config","config.userId","config.deviceId"])),getSessionId:L(e.getSessionId.bind(e),"getSessionId",R(e),N(e,["config"])),setSessionId:L(e.setSessionId.bind(e),"setSessionId",R(e),N(e,["config"])),extendSession:L(e.extendSession.bind(e),"extendSession",R(e),N(e,["config"])),setOptOut:L(e.setOptOut.bind(e),"setOptOut",R(e),N(e,["config"])),setTransport:L(e.setTransport.bind(e),"setTransport",R(e),N(e,["config"]))}},rI=rO(),rk=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],rP="data-amp-track-",rC=["div","span","h1","h2","h3","h4","h5","h6"],rj=rI.add,rR=rI.extendSession,rA=rI.flush,rN=rI.getDeviceId,rL=rI.getSessionId,rM=rI.getUserId,rD=rI.groupIdentify,rF=rI.identify,rU=rI.init,r$=rI.logEvent,rG=rI.remove,rq=rI.reset,rJ=rI.revenue,rV=rI.setDeviceId,rW=rI.setGroup,rz=rI.setOptOut,rB=rI.setSessionId,rK=rI.setTransport,rH=rI.setUserId,rZ=rI.track,rY=n(59973);function rX(){rY.Z.set("amplitudeFlag",{Event:"Visit Checkout",EventProperties:{upgradeSource:"Pricing Page",Page:"Pricing"}})}let rQ=()=>{let e=document.domain||"",t=e.endsWith(".kapwing-dev.com")||e.startsWith("kapwing-dev")&&e.endsWith(".herokuapp.com")||e.startsWith("localhost")&&["3000","4000","5000","3030"].includes(window.location.port);return t},r0=()=>{try{if("undefined"!=typeof document){if(window.Cypress)return;let e=rQ();return rU(e?"461b8b8947f81e4f070013ded04799df":"e3eca64f2da6246ee6a22cd63f455a07",{includeUtm:!0,includeReferrer:!0,includeGclid:!0,includeFbclid:!0,useDynamicConfig:!0,saveParamsReferrerOncePerSession:!1,onExitPage:()=>{window.amplitudeOnExit&&window.amplitudeOnExit()},defaultTracking:{sessions:!1}}),C}}catch(e){}return null};function r1(e,t){rZ(e,t)}},34509:function(e,t,n){"use strict";n.d(t,{Q:function(){return u},x:function(){return a}});var r=n(73732),i=n(68039),o=n.n(i),s=n(59973);let u="kapwing-current-user-refresh",a=()=>{let[e,t]=(0,r.useState)();return(0,r.useEffect)(function(){function e(){try{let e=s.Z.get("state");if(e&&(null==e?void 0:e.currentUser)&&!o()(e.currentUser)&&e.currentUser.token){t(e.currentUser);return}t(void 0)}catch(e){console.error(e)}}return e(),window.addEventListener(u,e),()=>window.removeEventListener(u,e)}
11,[]),e}},47581:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return j}});var r=n(20503),i=n(56012),o=n.n(i),s=n(8574),u=n.n(s),a=n(58235),c=n.n(a),l=n(23757),d=n.n(l),f=n(73732),p=n(95922),h=n(2963),v=n(58004),g=n(56356),m=n(13154),y=n(77181),b=n.n(y),w=n(46166),_=n(23828),E=n(75349),S=n(34509),x=()=>{let e=(0,S.x)(),t=(0,f.useRef)(null),n=(0,f.useRef)(!1),[i,o]=(0,f.useState)();return((0,f.useEffect)(function(){return window.oneTapHandleSuccess=o,()=>{delete window.oneTapHandleSuccess}},[]),(0,f.useEffect)(function(){function e(e){var r,s,u,a,c;e.origin===window.location.origin&&e.source===(null===(r=t.current)||void 0===r?void 0:r.contentWindow)&&((null===(s=e.data)||void 0===s?void 0:s.type)==="kapwing-google-one-tap-ready"&&i&&(null===(c=t.current)||void 0===c||null===(a=c.contentWindow)||void 0===a||a.postMessage({type:"kapwing-google-one-tap",response:i},e.origin)),(null===(u=e.data)||void 0===u?void 0:u.type)==="kapwing-google-one-tap-complete"&&(n.current=!0,o(void 0)))}return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[i]),(0,f.useEffect)(function(){!i&&n.current&&(n.current=!1,window.dispatchEvent(new CustomEvent(S.Q)))},[i]),e)?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{id:"g_id_onload","data-client_id":"823730063895-iqn5t0hivtu1ss7c2mhpfdmh1ghlf9fa.apps.googleusercontent.com","data-callback":"oneTapHandleSuccess","data-itp_support":"true","data-cancel_on_tap_outside":"false"}),i&&(0,r.jsx)("iframe",{"aria-hidden":"true",ref:t,src:"/signin/onetap",style:{display:"none"},title:"Completing Google sign in"})]})},T=n(51976),O=n(45931);let I=async e=>{let{messages:t}=await n(94784)("./".concat(e,"/messages"));return t};n(81237);let k={"/ai":"p7x25e8ms7","/ai-video-generator":"otg78lj7yq","/ai/clip-maker":"kunrhgjlgs","/ai/dubbing":"pg56tae3ft","/tools/repurpose":"kuns1whwvv","/tools/audio-editor":"p7x2z9vhsw","/tools/convert":"p7x2mg1c32","/tools/make/deepfake":"p7x3xlbd8d","/tools/remove-background/noise":"p7x49r2r2h","/tools/translate":"p7x37mir54","/es/herramientas/traducir":"p7x3lsxchh","/meme-maker":"p7x1cc3u8i","/subtitles":"kunsgkxko7","/video-editor":"p7x1nvuoq0"},P=!0;function C(e){let{Component:t,pageProps:n}=e,{asPath:i}=(0,m.useRouter)(),{locale:s,messages:a}=n;P&&(p.ag.load(s||w.mt.EN,a),p.ag.activate(s||w.mt.EN)),(0,f.useEffect)(()=>{P||(p.ag.load(null!=s?s:w.mt.EN,a),p.ag.activate(null!=s?s:w.mt.EN)),P=!1},[s,a]),(0,f.useEffect)(()=>{(0,O.UK)()});let l=w.Pt.includes(s);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(v.GoogleTagManager,{gtmId:"GTM-MLK8X53L"}),(0,r.jsx)(x,{}),(0,r.jsx)(d(),{id:"5446cd2944a40aaf",dynamic:[o().style.fontFamily,u().style.fontFamily,c().style.fontFamily],children:":root{--font-instrument-sans:".concat(o().style.fontFamily,";--font-inconsolata:").concat(u().style.fontFamily,";--font-inter:").concat(c().style.fontFamily,"}")}),k[i]&&(0,r.jsx)(b(),{id:"microsoft-clarity",strategy:"afterInteractive",dangerouslySetInnerHTML:{__html:'\n            (function(c,l,a,r,i,t,y){\n              c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};\n              t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;\n              y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);\n            })(window, document, "clarity", "script", "'.concat(k[i],'");\n          ')}}),(0,r.jsx)(h.bd,{i18n:p.ag,children:(0,r.jsx)(T.R.Provider,{value:{isRtl:l,locale:s||w.mt.EN},children:(0,r.jsx)(_.j,{children:(0,r.jsxs)(g.zt,{swipeDirection:"right",children:[(0,r.jsx)(E.ZP,{children:(0,r.jsx)("span",{"data-direction":l?"rtl":"ltr",className:d().dynamic([["5446cd2944a40aaf",[o().style.fontFamily,u().style.fontFamily,c().style.fontFamily]]]),children:(0,r.jsx)(t,{...n,className:d().dynamic([["5446cd2944a40aaf",[o().style.fontFamily,u().style.fontFamily,c().style.fontFamily]]])+" "+(n&&null!=n.className&&n.className||"")})})}),(0,r.jsx)(g.l_,{className:"toast-viewport"})]})})})})]})}C.getInitialProps=async()=>{let e=await I(w.mt.EN);return{pageProps:{messages:e}}};var j=C},51700:function(e,t,n){var r=n(44675);n(41494);var i=n(73732),o=i&&"object"==typeof i&&"default"in i?i:{default:i};function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=void 0!==r&&r.env&&!0,a=function(e){return"[object String]"===Object.prototype.toString.call(e)},c=function(){function e(e){var t=void 0===e?{}:e,n=t.name,r=void 0===n?"stylesheet":n,i=t.optimizeForSpeed,o=void 0===i?u:i;l(a(r),"`name` must be a string"),this._name=r,this._deletedRulePlaceholder="#"+r+"-deleted-rule____{}",l("boolean"==typeof o,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=o,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var s=document.querySelector('meta[property="csp-nonce"]');this._nonce=s?s.getAttribute("content"):null}var t,n=e.prototype;return n.setOptimizeForSpeed=function(e){l("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),l(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},n.isOptimizeForSpeed=function(){return this._optimizeForSpeed},n.inject=function(){var e=this;if(l(!this._injected,"sheet already injected"),this._injected=!0,this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.get
11Sheet(),this._optimizeForSpeed||(u||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,n){return"number"==typeof n?e._serverSheet.cssRules[n]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),n},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},n.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},n.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},n.insertRule=function(e,t){if(l(a(e),"`insertRule` accepts only strings"),this._optimizeForSpeed){var n=this.getSheet();"number"!=typeof t&&(t=n.cssRules.length);try{n.insertRule(e,t)}catch(t){return u||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var r=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,r))}return this._rulesCount++},n.replaceRule=function(e,t){if(this._optimizeForSpeed){var n=this.getSheet();if(t.trim()||(t=this._deletedRulePlaceholder),!n.cssRules[e])return e;n.deleteRule(e);try{n.insertRule(t,e)}catch(r){u||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),n.insertRule(this._deletedRulePlaceholder,e)}}else{var r=this._tags[e];l(r,"old rule at index `"+e+"` not found"),r.textContent=t}return e},n.deleteRule=function(e){if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];l(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},n.flush=function(){this._injected=!1,this._rulesCount=0,this._tags.forEac
11h(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]},n.cssRules=function(){var e=this;return this._tags.reduce(function(t,n){return n?t=t.concat(Array.prototype.map.call(e.getSheetForTag(n).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},n.makeStyleTag=function(e,t,n){t&&l(a(t),"makeStyleTag accepts only strings as second parameter");var r=document.createElement("style");this._nonce&&r.setAttribute("nonce",this._nonce),r.type="text/css",r.setAttribute("data-"+e,""),t&&r.appendChild(document.createTextNode(t));var i=document.head||document.getElementsByTagName("head")[0];return n?i.insertBefore(r,n):i.appendChild(r),r},s(e.prototype,[{key:"length",get:function(){return this._rulesCount}}]),t&&s(e,t),e}();function l(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var d=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return t>>>0},f={};function p(e,t){if(!t)return"jsx-"+e;var n=String(t),r=e+n;return f[r]||(f[r]="jsx-"+d(e+"-"+n)),f[r]}function h(e,t){var n=e+t;return f[n]||(f[n]=t.replace(/__jsx-style-dynamic-selector/g,e)),f[n]}var v=function(){function e(e){var t=void 0===e?{}:e,n=t.styleSheet,r=void 0===n?null:n,i=t.optimizeForSpeed,o=void 0!==i&&i;this._sheet=r||new c({name:"styled-jsx",optimizeForSpeed:o}),this._sheet.inject(),r&&"boolean"==typeof o&&(this._sheet.setOptimizeForSpeed(o),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var n=this.getIdAndRules(e),r=n.styleId,i=n.rules;if(r in this._instancesCounts){this._instancesCounts[r]+=1;return}var o=i.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[r]=o,this._instancesCounts[r]=1},t.remove=function(e){var t=this,n=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(n in this._instancesCounts,"styleId: `"+n+"` not found"),this._instancesCounts[n]-=1,this._instancesCounts[n]<1){var r=this._fromServer&&this._fromServer[n];r?(r.parentNode.removeChild(r),delete this._fromServer[n]):(this._indices[n].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[n]),delete this._instancesCounts[n]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],n=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return n[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,n;return t=this.cssRules(),void 0===(n=e)&&(n={}),t.map(function(e){var t=e[0],r=e[1];return o.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:n.nonce?n.nonce:void 0,dangerouslySetInnerHTML:{__html:r}})})},t.getIdAndRules=function(e){var t=e.children,n=e.dynamic,r=e.id;if(n){var i=p(r,n);return{styleId:i,rules:Array.isArray(t)?t.map(function(e){return h(i,e)}):[h(i,t)]}}return{styleId:p(r),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),g=i.createContext(null);g.displayName="StyleSheetContext";var m=o.default.useInsertionEffect||o.default.useLayoutEffect,y=new v;function b(e){var t=y||i.useContext(g);return t&&m(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)]),null}b.dynamic=function(e){return e.map(function(e){return p(e[0],e[1])}).join(" ")},t.style=b},23757:function(e,t,n){"use strict";e.exports=n(51700).style},46166:function(e,t,n){"use strict";var r,i;n.d(t,{Bp:function(){return c},Pt:function(){return s},QS:function(){return a},RF:function(){return o},mt:function(){return r},tK:function(){return u}}),(i=r||(r={})).EN="en",i.ES="es",i.FR="fr",i.PT="pt",i.JA="ja",i.AR="ar",i.ES_ES="es-es",i.ES_MX="es-mx",i.PT_BR="pt-br",i.FR_FR="fr-fr",i.HI_IN="hi-in",i.ID="id",i.IT="it",i.RU="ru",i.FIL_PH="fil-ph",i.TR="tr",i.DE="de",i.PL="pl",i.CMN_HANS_CN="cmn-hans-cn",i.KO="ko",i.HE="he",i.NL="nl";let o=Object.values(r),s=[r.AR,r.HE],u={[r.EN]:"English",[r.ES]:"Espa\xf1ol",[r.FR]:"Fran\xe7ais",[r.PT]:"Portugu\xeas",[r.JA]:"日本語",[r.AR]:"عربي",[r.ES_ES]:"Espa\xf1ol (Espa\xf1a)",[r.ES_MX]:"Espa\xf1ol (M\xe9xico)",[r.PT_BR]:"Portugu\xeas (Brasil)",[r.FR_FR]:"Fran\xe7ais (France)",[r.HI_IN]:"हिन्दी",[r.ID]:"Bahasa Indonesia",[r.IT]:"Ital
11iano",[r.RU]:"Русский",[r.FIL_PH]:"Filipino",[r.TR]:"T\xfcrk\xe7e",[r.DE]:"Deutsch",[r.PL]:"Polski",[r.CMN_HANS_CN]:"简体中文",[r.KO]:"한국어",[r.HE]:"עברית",[r.NL]:"Nederlands"},a=["/","/tools","/meme-maker","/translate-studio","/404-illustrations"],c=(e,t)=>e!==r.EN?"/".concat(e).concat(t):t},81237:function(){},8574:function(e){e.exports={style:{fontFamily:"'__Inconsolata_f94e26', '__Inconsolata_Fallback_f94e26'",fontStyle:"normal"},className:"__className_f94e26"}},56012:function(e){e.exports={style:{fontFamily:"'__Instrument_Sans_b17f9c'",fontStyle:"normal"},className:"__className_b17f9c"}},58235:function(e){e.exports={style:{fontFamily:"'__Inter_290c74', '__Inter_Fallback_290c74'",fontStyle:"normal"},className:"__className_290c74"}},98930:function(e){e.exports={toast:"Toast_toast__1dkmn",show:"Toast_show__6F18A",hide:"Toast_hide__ICMDf",success:"Toast_success__SBgja",error:"Toast_error__V8VwU",iconContainer:"Toast_iconContainer__zUAeJ",toastInfo:"Toast_toastInfo__WixQP",icon:"Toast_icon__jAonu",title:"Toast_title__mGhj_",close:"Toast_close__vKkwh"}},73741:function(e){e.exports={viewport:"ToastContext_viewport__8dR_J"}},13154:function(e,t,n){e.exports=n(63842)},77181:function(e,t,n){e.exports=n(44680)},59517:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.YouTubeEmbed=t.GoogleMapsEmbed=t.GoogleAnalytics=void 0;var r=n(39479);Object.defineProperty(t,"GoogleAnalytics",{enumerable:!0,get:function(){return r.GoogleAnalytics}});var i=n(6169);Object.defineProperty(t,"GoogleMapsEmbed",{enumerable:!0,get:function(){return i.GoogleMapsEmbed}});var o=n(54638);Object.defineProperty(t,"YouTubeEmbed",{enumerable:!0,get:function(){return o.YouTubeEmbed}})},39479:function(e,t,n){"use strict";var r=this&&this.__rest||function(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},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleAnalytics=void 0;let o=i(n(93419)),s=n(26397);t.GoogleAnalytics=e=>{var t=r(e,[]);return(0,s.formatData)(o.default,t)}},6169:function(e,t,n){"use strict";var r=this&&this.__rest||function(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},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleMapsEmbed=void 0;let o=i(n(59030)),s=n(26397);t.GoogleMapsEmbed=e=>{var t=r(e,[]);return(0,s.formatData)(o.default,t)}},54638:function(e,t,n){"use strict";var r=this&&this.__rest||function(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},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.YouTubeEmbed=void 0;let o=i(n(91955)),s=n(26397);t.YouTubeEmbed=e=>{var t=r(e,[]);return(0,s.formatData)(o.default,t)}},26397:function(e,t){"use strict";function n(e,t,n=!1){return t?Object.keys(e).filter(e=>n?!t.includes(e):t.includes(e)).reduce((t,n)=>(t[n]=e[n],t),{}):{}}function r(e,t,n,r){let i=r&&Object.keys(r).length>0?new URL(Object.values(r)[0],e):new URL(e);return t&&n&&t.forEach(e=>{n[e]&&i.searchParams.set(e,n[e])}),i.toString()}function i(e,t,n,i,o){var s;if(!t)return`<${e}></${e}>`;let u=(null===(s=t.src)||void 0===s?void 0:s.url)?Object.assign(Object.assign({},t),{src:r(t.src.url,t.src.params,i,o)}):t,a=Object.keys(Object.assign(Object.assign({},u),n)).reduce((e,t)=>
11{let r=null==n?void 0:n[t],i=u[t],o=null!=r?r:i,s=!0===o?t:`${t}="${o}"`;return o?e+` ${s}`:e},"");return`<${e}${a}></${e}>`}Object.defineProperty(t,"__esModule",{value:!0}),t.formatData=t.createHtml=t.formatUrl=void 0,t.formatUrl=r,t.createHtml=i,t.formatData=function(e,t){var o,s,u,a,c;let l=null===(o=e.scripts)||void 0===o?void 0:o.reduce((e,t)=>[...e,...Array.isArray(t.params)?t.params:[]],[]),d=n(t,l),f=n(t,null===(u=null===(s=e.html)||void 0===s?void 0:s.attributes.src)||void 0===u?void 0:u.params),p=n(t,[null===(c=null===(a=e.html)||void 0===a?void 0:a.attributes.src)||void 0===c?void 0:c.slugParam]),h=n(t,[...Object.keys(d),...Object.keys(f),...Object.keys(p)],!0);return Object.assign(Object.assign({},e),{html:e.html?i(e.html.element,e.html.attributes,h,f,p):null,scripts:e.scripts?e.scripts.map(e=>Object.assign(Object.assign({},e),{url:r(e.url,e.params,d)})):null})}},7367:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.errorMessages=t.ErrorType=void 0,(r=n=t.ErrorType||(t.ErrorType={})).MalformedUnicode="MALFORMED_UNICODE",r.MalformedHexadecimal="MALFORMED_HEXADECIMAL",r.CodePointLimit="CODE_POINT_LIMIT",r.OctalDeprecation="OCTAL_DEPRECATION",r.EndOfString="END_OF_STRING",t.errorMessages=new Map([[n.MalformedUnicode,"malformed Unicode character escape sequence"],[n.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[n.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[n.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[n.EndOfString,"malformed escape sequence at end of string"]])},27375:function(e,t,n){"use strict";t.S6=void 0;let r=n(7367);function i(e,t,n){let i=function(e){let t=!e.match(/[^a-f0-9]/i);return t?parseInt(e,16):NaN}(e);if(Number.isNaN(i)||void 0!==n&&n!==e.length)throw SyntaxError(r.errorMessages.get(t));return i}function o(e,t){let n=i(e,r.ErrorType.MalformedUnicode,4);if(void 0!==t){let e=i(t,r.ErrorType.MalformedUnicode,4);return String.fromCharCode(n,e)}return String.fromCharCode(n)}let s=new Map([["b","\b"],["f","\f"],["n","\n"],["r","\r"],["t","	"],["v","\v"],["0","\x00"]]),u=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;t.S6=function(e,t=!1){return e.replace(u,function(e,n,u,a,c,l,d,f,p){if(void 0!==n)return"\\";if(void 0!==u)return function(e){let t=i(e,r.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(t)}(u);if(void 0!==a)return function(e){if(!("{"===e.charAt(0)&&"}"===e.charAt(e.length-1)))throw SyntaxError(r.errorMessages.get(r.ErrorType.MalformedUnicode));let t=e.slice(1,-1),n=i(t,r.ErrorType.MalformedUnicode);try{return String.fromCodePoint(n)}catch(e){throw e instanceof RangeError?SyntaxError(r.errorMessages.get(r.ErrorType.CodePointLimit)):e}}(a);if(void 0!==c)return o(c,l);if(void 0!==d)return o(d);if("0"===f)return"\x00";if(void 0!==f)return function(e,t=!1){if(t)throw SyntaxError(r.errorMessages.get(r.ErrorType.OctalDeprecation));let n=parseInt(e,8);return String.fromCharCode(n)}(f,!t);if(void 0!==p)return s.get(p)||p;throw SyntaxError(r.errorMessages.get(r.ErrorType.EndOfString))})}},95922:function(e,t,n){"use strict";n.d(t,{ag:function(){return T}});var r=n(27375);let i=e=>"string"==typeof e,o=e=>"function"==typeof e,s=new Map;function u(e){let t=Array.isArray(e)?e:[e];return[...t,"en"]}function a(e,t,n){let r=u(e),o=d(()=>f("date",r,n),()=>new Intl.DateTimeFormat(r,n));return o.format(i(t)?new Date(t):t)}function c(e,t,n){let r=u(e),i=d(()=>
11f("number",r,n),()=>new Intl.NumberFormat(r,n));return i.format(t)}function l(e,t,n,{offset:r=0,...i}){let o=u(e),s=t?d(()=>f("plural-ordinal",o),()=>new Intl.PluralRules(o,{type:"ordinal"})):d(()=>f("plural-cardinal",o),()=>new Intl.PluralRules(o,{type:"cardinal"}));return i[n]??i[s.select(n-r)]??i.other}function d(e,t){let n=e(),r=s.get(n);return r||(r=t(),s.set(n,r)),r}function f(e,t,n){let r=t.join("-");return`${e}-${r}-${JSON.stringify(n)}`}let p=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,h="%__lingui_octothorpe__%",v=(e,t,n={})=>{let r=t||e,i=e=>"object"==typeof e?e:n[e]||{style:e},o=(e,t)=>{let o=Object.keys(n).length?i("number"):void 0,s=c(r,e,o);return t.replace(RegExp(h,"g"),s)};return{plural:(e,t)=>{let{offset:n=0}=t,i=l(r,!1,e,t);return o(e-n,i)},selectordinal:(e,t)=>{let{offset:n=0}=t,i=l(r,!0,e,t);return o(e-n,i)},select:g,number:(e,t)=>c(r,e,i(t)),date:(e,t)=>a(r,e,i(t))}},g=(e,t)=>t[e]??t.other;var m=Object.defineProperty,y=(e,t,n)=>t in e?m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,b=(e,t,n)=>(y(e,"symbol"!=typeof t?t+"":t,n),n);class w{constructor(){b(this,"_events",{})}on(e,t){var n;return(n=this._events)[e]??(n[e]=[]),this._events[e].push(t),()=>this.removeListener(e,t)}removeListener(e,t){let n=this._getListeners(e);if(!n)return;let r=n.indexOf(t);~r&&n.splice(r,1)}emit(e,...t){let n=this._getListeners(e);n&&n.map(e=>e.apply(this,t))}_getListeners(e){let t=this._events[e];return!!Array.isArray(t)&&t}}var _=Object.defineProperty,E=(e,t,n)=>t in e?_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t,n)=>(E(e,"symbol"!=typeof t?t+"":t,n),n);class x extends w{constructor(e){super(),S(this,"_locale",""),S(this,"_locales"),S(this,"_localeData",{}),S(this,"_messages",{}),S(this,"_missing"),S(this,"t",this._.bind(this)),null!=e.missing&&(this._missing=e.missing),null!=e.messages&&this.load(e.messages),null!=e.localeData&&this.loadLocaleData(e.localeData),("string"==typeof e.locale||e.locales)&&this.activate(e.locale??"en",e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,t){let n=this._localeData[e];n?Object.assign(n,t):this._localeData[e]=t}loadLocaleData(e,t){null!=t?this._loadLocaleData(e,t):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,t){let n=this._messages[e];n?Object.assign(n,t):this._messages[e]=t}load(e,t){"string"==typeof e&&"object"==typeof t?this._load(e,t):Object.entries(e).forEach(([e,t])=>this._load(e,t)),this.emit("change")}loadAndActivate({locale:e,locales:t,messages:n}){this._locale=e,this._locales=t||void 0,this._messages[this._locale]=n,this.emit("change")}activate(e,t){this._locale=e,this._locales=t,this.emit("change")}_(e,t,n){var s,u;let a=n?.message;e||(e=""),i(e)||(t=e.values||t,a=e.message,e=e.id);let c=this.messages[e],l=void 0===c,d=this._missing;if(d&&l)return o(d)?d(this._locale,e):d;l&&this.emit("missing",{id:e,locale:this._locale});let f=c||a||e;return i(f)&&p.test(f)?JSON.parse(`"${f}"`):i(f)?f:(s=this._locale,u=this._locales,(e={},t)=>{let n=v(s,u,t),o=(t,r=!1)=>Array.isArray(t)?t.reduce((t,s)=>{let u;if("#"===s&&r)return t+h;if(i(s))return t+s;let[a,c,l]=s,d={};if("plural"===c||"selectordinal"===c||"select"===c?Object.entries(l).forEach(([e,t])=>{d[e]=o(t,"plural"===c||"selectordinal"===c)}):d=l,c){let t=n[c];u=t(e[a],d)}else u=e[a];return null==u?t:t+u},""):t,a=o(f);return i(a)&&p.test(a)?(0,r.S6)(a.trim()):i(a)?a.trim():a?String(a):""})(t,n?.formats)}date(e,t){return a(this._locales||this._locale,e,t)}number(e,t){return c(this._locales||this._locale,e,t)}}let T=function(e={}){return new x(e)}()},2963:function(e,t,n){"use strict";n.d(t,{bd:function(){return p},cC:function(){return h},mV:function(){return f}});var r=n(73732);let i=/<([a-zA-Z0-9]+)>(.*?)<\/\1>|<([a-zA-Z0-9]+)\/>/,o=/(?:\r\n|\r|\n)/g,s={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},u=(e=0,t="")=>()=>`${t}_${e++}`;function a(e){let{render:t,component:n,id:a,message:l,formats:d,lingui:{i18n:f,defaultComponent:p}}=e,h={...e.values},v={...e.components};
11h&&Object.keys(h).forEach(e=>{let t=h[e],n=r.isValidElement(t)||Array.isArray(t)&&t.every(r.isValidElement);if(!n)return;let i=Object.keys(v).length;v[i]=t,h[e]=`<${i}/>`});let g=f&&"function"==typeof f._?f._(a,h,{message:l,formats:d}):a,m=g?function e(t,n={}){let a=u(0,"$lingui$"),c=t.replace(o,"").split(i);if(1===c.length)return t;let l=[],d=c.shift();for(let[t,i,o]of(d&&l.push(d),function e(t){if(!t.length)return[];let[n,r,i,o]=t.slice(0,4);return[[n||i,r||"",o]].concat(e(t.slice(4,t.length)))}(c))){let u=void 0!==t?n[t]:void 0;(!u||s[u.type]&&i)&&(u?console.error(`${u.type} is a void element tag therefore it must have no children`):console.error(`Can't use element at index '${t}' as it is not declared in the original translation`),u=r.createElement(r.Fragment)),Array.isArray(u)&&(u=r.createElement(r.Fragment,{},u)),l.push(r.cloneElement(u,{key:a()},i?e(i,n):u.props.children)),o&&l.push(o)}return 1===l.length?l[0]:l}(g,v):null;if(null===t||null===n)return m;let y=p||c,b={id:a,message:l,translation:m,isTranslated:a!==m&&l!==m,children:m};if(t&&n)console.error("You can't use both `component` and `render` prop at the same time. `component` is ignored.");else if(t&&"function"!=typeof t)console.error(`Invalid value supplied to prop \`render\`. It must be a function, provided ${t}`);else if(n&&"function"!=typeof n)return console.error(`Invalid value supplied to prop \`component\`. It must be a React component, provided ${n}`),r.createElement(y,b,m);if("function"==typeof t)return t(b);let w=n||y;return r.createElement(w,b,m)}let c=({children:e})=>r.createElement(r.Fragment,null,e),l=r.createContext(null),d=e=>{let t=r.useContext(l);return t};function f(){return d()}let p=({i18n:e,defaultComponent:t,children:n})=>{let i=r.useRef(e.locale),o=r.useCallback(()=>({i18n:e,defaultComponent:t,_:e.t.bind(e)}),[e,t]),[s,u]=r.useState(o());return(r.useEffect(()=>{let t=()=>{i.current=e.locale,u(o())},n=e.on("change",t);return i.current!==e.locale&&t(),n},[e,o]),i.current)?r.createElement(l.Provider,{value:s},n):null};function h(e){let t=d(void 0);return r.createElement(a,{...e,lingui:t})}},63679:function(e,t,n){"use strict";function r(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}n.d(t,{Mj:function(){return r}}),"undefined"!=typeof window&&window.document&&window.document.createElement},40251:function(e,t,n){"use strict";n.d(t,{B:function(){return a}});var r=n(73732),i=n(91251),o=n(84755),s=n(56439),u=n(20503);function a(e){let t=e+"CollectionProvider",[n,a]=(0,i.b)(t),[c,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:n}=e,i=r.useRef(null),o=r.useRef(new Map).current;return(0,u.jsx)(c,{scope:t,itemMap:o,collectionRef:i,children:n})};d.displayName=t;let f=e+"CollectionSlot",p=(0,s.Z8)(f),h=r.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=l(f,n),s=(0,o.e)(t,i.collectionRef);return(0,u.jsx)(p,{ref:s,children:r})});h.displayName=f;let v=e+"CollectionItemSlot",g="data-radix-collection-item",m=(0,s.Z8)(v),y=r.forwardRef((e,t)=>{let{scope:n,children:i,...s}=e,a=r.useRef(null),c=(0,o.e)(t,a),d=l(v,n);return r.useEffect(()=>(d.itemMap.set(a,{ref:a,...s}),()=>void d.itemMap.delete(a))),(0,u.jsx)(m,{[g]:"",ref:c,children:i})});return y.displayName=v,[{Provider:d,Slot:h,ItemSlot:y},function(t){let n=l(e+"CollectionConsumer",t),i=r.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`)),r=Array.from(n.itemMap.values()),i=r.sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current));return i},[n.collectionRef,n.itemMap]);return i},a]}},84755:function(e,t,n){"use strict";n.d(t,{F:function(){return o},e:function(){return s}});var r=n(73732);function i(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function o(...e){return t=>{let n=!1,r=e.map(e=>{let r=i(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():i(e[t],null)}}}}function s(...e){return r.useCallback(o(...e),e)}},91251:function(e,t,n){"use strict";n.d(t,{b:function(){return s},k:function(){return o}});var r=n(73732),i=n(20503);function o(e,t){let n=r.createContext(t),o=e=>{let{children:t,...o}=e,s=r.useMemo(()=>o,Object.values(o));return(0,i.jsx)(n.Provider,{value:s,children:t})};return o.displayName=e+"Provider",[o,function(i){let o=r.useContext(n);if(o)return o;if(void 0!==t)return t;throw Error(`\`${i}\` must be used within \`${e}\``)}]}function s(e,t=[]){let n=[],o=()=>{let t=n.map(e=>r.createContext(e));return function(n){let i=n?.[e]||t;return r.useMemo(()=>({[`__scope${e}`]:{...n,[e]:i}}),[n,i])}};return o.scopeName=e,[function(t,o){let s=r.createContext(o),u=n.length;n=[...n,o];let a=t=>{let{scope:n,children:o,...a}=t,c=n?.[e]?.[u]||s,l=r.useMemo(()=>a,Object.values(a));return(0,i.jsx)(c.Provider,{value:l,children:o})};return a.displayName=t+"Provider",[a,function(n,i){let a=i?.[e]?.[u]||s,c=r.useContext(a);if(c)return c;if(void 0!==o)return o;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e),o=i[`__scope${r}`];return{...t,...o}},{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}(o,...t)]}},57159:function(e,t,n){"use strict";n.d(t,{I0:function(){return m},XB:function(){return f},fC:function(){return g}});var r,i=n(73732),o=n(63679),s=n(54223),u=n(84755),a=n(84914),c=n(20503),l="dismissableLayer.update",d=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),f=i.forwardRef((e,t)=>
11{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:g,onInteractOutside:m,onDismiss:y,...b}=e,w=i.useContext(d),[_,E]=i.useState(null),S=_?.ownerDocument??globalThis?.document,[,x]=i.useState({}),T=(0,u.e)(t,e=>E(e)),O=Array.from(w.layers),[I]=[...w.layersWithOutsidePointerEventsDisabled].slice(-1),k=O.indexOf(I),P=_?O.indexOf(_):-1,C=w.layersWithOutsidePointerEventsDisabled.size>0,j=P>=k,R=function(e,t=globalThis?.document){let n=(0,a.W)(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){v("dismissableLayer.pointerDownOutside",n,i,{discrete:!0})},i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{let t=e.target,n=[...w.branches].some(e=>e.contains(t));!j||n||(p?.(e),m?.(e),e.defaultPrevented||y?.())},S),A=function(e,t=globalThis?.document){let n=(0,a.W)(e),r=i.useRef(!1);return i.useEffect(()=>{let e=e=>{e.target&&!r.current&&v("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{let t=e.target,n=[...w.branches].some(e=>e.contains(t));n||(g?.(e),m?.(e),e.defaultPrevented||y?.())},S);return!function(e,t=globalThis?.document){let n=(0,a.W)(e);i.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{let t=P===w.layers.size-1;t&&(f?.(e),!e.defaultPrevented&&y&&(e.preventDefault(),y()))},S),i.useEffect(()=>{if(_)return n&&(0===w.layersWithOutsidePointerEventsDisabled.size&&(r=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),w.layersWithOutsidePointerEventsDisabled.add(_)),w.layers.add(_),h(),()=>{n&&1===w.layersWithOutsidePointerEventsDisabled.size&&(S.body.style.pointerEvents=r)}},[_,S,n,w]),i.useEffect(()=>()=>{_&&(w.layers.delete(_),w.layersWithOutsidePointerEventsDisabled.delete(_),h())},[_,w]),i.useEffect(()=>{let e=()=>x({});return document.addEventListener(l,e),()=>document.removeEventListener(l,e)},[]),(0,c.jsx)(s.WV.div,{...b,ref:T,style:{pointerEvents:C?j?"auto":"none":void 0,...e.style},onFocusCapture:(0,o.Mj)(e.onFocusCapture,A.onFocusCapture),onBlurCapture:(0,o.Mj)(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:(0,o.Mj)(e.onPointerDownCapture,R.onPointerDownCapture)})});f.displayName="DismissableLayer";var p=i.forwardRef((e,t)=>{let n=i.useContext(d),r=i.useRef(null),o=(0,u.e)(t,r);return i.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,c.jsx)(s.WV.div,{...e,ref:o})});function h(){let e=new CustomEvent(l);document.dispatchEvent(e)}function v(e,t,n,{discrete:r}){let i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?(0,s.jH)(i,o):i.dispatchEvent(o)}p.displayName="DismissableLayerBranch";var g=f,m=p},73329:function(e,t,n){"use strict";n.d(t,{h:function(){return a}});var r=n(73732),i=n(70114),o=n(54223),s=n(32654),u=n(20503),a=r.forwardRef((e,t)=>{let{container:n,...a}=e,[c,l]=r.useState(!1);(0,s.b)(()=>l(!0),[]);let d=n||c&&globalThis?.document?.body;return d?i.createPortal((0,u.jsx)(o.WV.div,{...a,ref:t}),d):null});a.displayName="Portal"},69101:function(e,t,n){"use strict";n.d(t,{z:function(){return s}});var r=n(73732),i=n(84755),o=n(32654),s=e=>{let t,n;let{present:s,children:a}=e,c=function(e){var t;let[n,i]=r.useState(),s=r.useRef(null),a=r.useRef(e),c=r.useRef("none"),l=e?"mounted":"unmounted",[d,f]=(t={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},r.useReducer((e,n)=>{let r=t[e][n];return r??e},l));return r.useEffect(()=>{let e=u(s.current);c.current="mounted"===d?e:"none"},[d]),(0,o.b)(()=>{let t=s.current,n=a.current,r=n!==e;if(r){let r=c.current,i=u(t);e?f("MOUNT"):"none"===i||t?.display==="none"?f("UNMOUNT"):n&&r!==i?f("ANIMATION_OUT"):f("UNMOUNT"),a.current=e}},[e,f]),(0,o.b)(()=>
11{if(n){let e;let t=n.ownerDocument.defaultView??window,r=r=>{let i=u(s.current),o=i.includes(CSS.escape(r.animationName));if(r.target===n&&o&&(f("ANIMATION_END"),!a.current)){let r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},i=e=>{e.target===n&&(c.current=u(s.current))};return n.addEventListener("animationstart",i),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",i),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}f("ANIMATION_END")},[n,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:r.useCallback(e=>{s.current=e?getComputedStyle(e):null,i(e)},[])}}(s),l="function"==typeof a?a({present:c.isPresent}):r.Children.only(a),d=(0,i.e)(c.ref,(n=(t=Object.getOwnPropertyDescriptor(l.props,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?l.ref:(n=(t=Object.getOwnPropertyDescriptor(l,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?l.props.ref:l.props.ref||l.ref),f="function"==typeof a;return f||c.isPresent?r.cloneElement(l,{ref:d}):null};function u(e){return e?.animationName||"none"}s.displayName="Presence"},54223:function(e,t,n){"use strict";n.d(t,{WV:function(){return u},jH:function(){return a}});var r=n(73732),i=n(70114),o=n(56439),s=n(20503),u=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=(0,o.Z8)(`Primitive.${t}`),i=r.forwardRef((e,r)=>{let{asChild:i,...o}=e,u=i?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,s.jsx)(u,{...o,ref:r})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function a(e,t){e&&i.flushSync(()=>e.dispatchEvent(t))}},66073:function(e,t,n){"use strict";n.d(t,{WV:function(){return f}});var r=n(73732),i=n.t(r,2);n(70114);var o=n(84755),s=n(20503),u=Symbol.for("react.lazy"),a=i[" use ".trim().toString()];function c(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===u&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var l=Symbol("radix.slottable");function d(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===l}var f=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=function(e){let t=function(e){let t=r.forwardRef((e,t)=>{let{children:n,...i}=e;if(c(n)&&"function"==typeof a&&(n=a(n._payload)),r.isValidElement(n)){var s;let e,u;let a=(s=n,(u=(e=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.ref:(u=(e=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.props.ref:s.props.ref||s.ref),c=function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r],s=/^on[A-Z]/.test(r);s?i&&o?n[r]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(i,n.props);return n.type!==r.Fragment&&(c.ref=t?(0,o.F)(t,a):a),r.cloneElement(n,c)}return r.Children.count(n)>1?r.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),n=r.forwardRef((e,n)=>{let{children:i,...o}=e;c(i)&&"function"==typeof a&&(i=a(i._payload));let u=r.Children.toArray(i),l=u.find(d);if(l){let e=l.props.children,i=u.map(t=>t!==l?t:r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null);return(0,s.jsx)(t,{...o,ref:n,children:r.isValidElement(e)?r.cloneElement(e,void 0,i):null})}return(0,s.jsx)(t,{...o,ref:n,children:i})});return n.displayName=`${e}.Slot`,n}(`Primitive.${t}`),i=r.forwardRef((e,r)=>{let{asChild:i,...o}=e,u=i?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,s.jsx)(u,{...o,ref:r})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{})},56439:function(e,t,n){"use strict";n.d(t,{Z8:function(){return s},sA:function(){return a}});var r=n(73732),i=n(84755),o=n(20503);function s(e){let t=function(e){let t=r.forwardRef((e,t)=>
11{let{children:n,...o}=e;if(r.isValidElement(n)){let e,s;let u=(s=(e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?n.ref:(s=(e=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?n.props.ref:n.props.ref||n.ref,a=function(e,t){let n={...t};for(let r in t){let i=e[r],o=t[r],s=/^on[A-Z]/.test(r);s?i&&o?n[r]=(...e)=>{let t=o(...e);return i(...e),t}:i&&(n[r]=i):"style"===r?n[r]={...i,...o}:"className"===r&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(o,n.props);return n.type!==r.Fragment&&(a.ref=t?(0,i.F)(t,u):u),r.cloneElement(n,a)}return r.Children.count(n)>1?r.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),n=r.forwardRef((e,n)=>{let{children:i,...s}=e,u=r.Children.toArray(i),a=u.find(c);if(a){let e=a.props.children,i=u.map(t=>t!==a?t:r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null);return(0,o.jsx)(t,{...s,ref:n,children:r.isValidElement(e)?r.cloneElement(e,void 0,i):null})}return(0,o.jsx)(t,{...s,ref:n,children:i})});return n.displayName=`${e}.Slot`,n}var u=Symbol("radix.slottable");function a(e){let t=({children:e})=>(0,o.jsx)(o.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=u,t}function c(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===u}},56356:function(e,t,n){"use strict";n.d(t,{Dx:function(){return Q},_i:function(){return j},aU:function(){return et},dk:function(){return ee},fC:function(){return X},l_:function(){return Y},x8:function(){return en},zt:function(){return Z}});var r=n(73732),i=n(70114),o=n(63679),s=n(84755),u=n(40251),a=n(91251),c=n(57159),l=n(73329),d=n(69101),f=n(54223),p=n(84914),h=n(61395),v=n(32654),g=n(72452),m=n(20503),y="ToastProvider",[b,w,_]=(0,u.B)("Toast"),[E,S]=(0,a.b)("Toast",[_]),[x,T]=E(y),O=e=>{let{__scopeToast:t,label:n="Notification",duration:i=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:u}=e,[a,c]=r.useState(null),[l,d]=r.useState(0),f=r.useRef(!1),p=r.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${y}\`. Expected non-empty \`string\`.`),(0,m.jsx)(b.Provider,{scope:t,children:(0,m.jsx)(x,{scope:t,label:n,duration:i,swipeDirection:o,swipeThreshold:s,toastCount:l,viewport:a,onViewportChange:c,onToastAdd:r.useCallback(()=>d(e=>e+1),[]),onToastRemove:r.useCallback(()=>d(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p,children:u})})};O.displayName=y;var I="ToastViewport",k=["F8"],P="toast.viewportPause",C="toast.viewportResume",j=r.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:i=k,label:o="Notifications ({hotkey})",...u}=e,a=T(I,n),l=w(n),d=r.useRef(null),p=r.useRef(null),h=r.useRef(null),v=r.useRef(null),g=(0,s.e)(t,v,a.onViewportChange),y=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=a.toastCount>0;r.useEffect(()=>{let e=e=>{let t=0!==i.length&&i.every(t=>e[t]||e.code===t);t&&v.current?.focus()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[i]),r.useEffect(()=>{let e=d.current,t=v.current;if(_&&e&&t){let n=()=>{if(!a.isClosePausedRef.current){let e=new CustomEvent(P);t.dispatchEvent(e),a.isClosePausedRef.current=!0}},r=()=>{if(a.isClosePausedRef.current){let e=new CustomEvent(C);t.dispatchEvent(e),a.isClosePausedRef.current=!1}},i=t=>{let n=!e.contains(t.relatedTarget);n&&r()},o=()=>{let t=e.contains(document.activeElement);t||r()};return e.addEventListener("focusin",n),e.addEventListener("focusout",i),e.addEventListener("pointermove",n),e.addEventListener("pointerleave",o),window.addEventListener("blur",n),window.addEventListener("focus",r),()=>{e.removeEventListener("focusin",n),e.removeEventListener("focusout",i),e.removeEventListener("pointermove",n),e.removeEventListener("pointerleave",o),window.removeEventListener("blur",n),window.removeEventListener("focus",r)}}},[_,a.isClosePausedRef]);let E=r.useCallback(({tabbingDirection:e})=>{let t=l(),n=t.map(t=>{let n=t.ref.current,r=[n,...function(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}(n)];return"forwards"===e?r:r.reverse()});return("forwards"===e?n.reverse():n).flat()},[l]);return r.useEffect(()=>{let e=v.current;if(e){let t=t=>{let n=t.altKey||t.ctrlKey||t.metaKey,r="Tab"===t.key&&!n;if(r){let n=document.activeElement,r=t.shiftKey,i=t.target===e;if(i&&r){p.current?.focus();return}let o=E({tabbingDirection:r?"backwards":"forwards"}),s=o.findIndex(e=>e===n);H(o.slice(s+1))?t.preventDefault():r?p.current?.focus():h.current?.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}},[l,E]),(0,m.jsxs)(c.I0,{ref:d,role:"region","aria-label":o.replace("{hotkey}",y),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&(0,m.jsx)(A,{ref:p,onFocusFromOutsideViewport:()=>{let e=E({tabbingDirection:"forwards"});H(e)}}),(0,m.jsx)(b.Slot,{scope:n,children:(0,m.jsx)(f.WV.ol,{tabIndex:-1,...u,ref:g})}),_&&(0,m.jsx)(A,{ref:h,onFocusFromOutsideViewport:()=>{let e=E({tabbingDirection:"backwards"});H(e)}})]})});j.displayName=I;var R="ToastFocusProxy",A=r.forwardRef((e,t)=>
11{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,o=T(R,n);return(0,m.jsx)(g.TX,{tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:e=>{let t=e.relatedTarget,n=!o.viewport?.contains(t);n&&r()}})});A.displayName=R;var N="Toast",L=r.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:i,onOpenChange:s,...u}=e,[a,c]=(0,h.T)({prop:r,defaultProp:i??!0,onChange:s,caller:N});return(0,m.jsx)(d.z,{present:n||a,children:(0,m.jsx)(F,{open:a,...u,ref:t,onClose:()=>c(!1),onPause:(0,p.W)(e.onPause),onResume:(0,p.W)(e.onResume),onSwipeStart:(0,o.Mj)(e.onSwipeStart,e=>{e.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:(0,o.Mj)(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","move"),e.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${n}px`)}),onSwipeCancel:(0,o.Mj)(e.onSwipeCancel,e=>{e.currentTarget.setAttribute("data-swipe","cancel"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:(0,o.Mj)(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","end"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${n}px`),c(!1)})})})});L.displayName=N;var[M,D]=E(N,{onClose(){}}),F=r.forwardRef((e,t)=>{let{__scopeToast:n,type:u="foreground",duration:a,open:l,onClose:d,onEscapeKeyDown:h,onPause:v,onResume:g,onSwipeStart:y,onSwipeMove:w,onSwipeCancel:_,onSwipeEnd:E,...S}=e,x=T(N,n),[O,I]=r.useState(null),k=(0,s.e)(t,e=>I(e)),j=r.useRef(null),R=r.useRef(null),A=a||x.duration,L=r.useRef(0),D=r.useRef(A),F=r.useRef(0),{onToastAdd:$,onToastRemove:G}=x,q=(0,p.W)(()=>{let e=O?.contains(document.activeElement);e&&x.viewport?.focus(),d()}),J=r.useCallback(e=>{e&&e!==1/0&&(window.clearTimeout(F.current),L.current=new Date().getTime(),F.current=window.setTimeout(q,e))},[q]);r.useEffect(()=>{let e=x.viewport;if(e){let t=()=>{J(D.current),g?.()},n=()=>{let e=new Date().getTime()-L.current;D.current=D.current-e,window.clearTimeout(F.current),v?.()};return e.addEventListener(P,n),e.addEventListener(C,t),()=>{e.removeEventListener(P,n),e.removeEventListener(C,t)}}},[x.viewport,A,v,g,J]),r.useEffect(()=>{l&&!x.isClosePausedRef.current&&J(A)},[l,A,x.isClosePausedRef,J]),r.useEffect(()=>($(),()=>G()),[$,G]);let V=r.useMemo(()=>O?function e(t){let n=[],r=Array.from(t.childNodes);return r.forEach(t=>{if(t.nodeType===t.TEXT_NODE&&t.textContent&&n.push(t.textContent),t.nodeType===t.ELEMENT_NODE){let r=t.ariaHidden||t.hidden||"none"===t.style.display,i=""===t.dataset.radixToastAnnounceExclude;if(!r){if(i){let e=t.dataset.radixToastAnnounceAlt;e&&n.push(e)}else n.push(...e(t))}}}),n}(O):null,[O]);return x.viewport?(0,m.jsxs)(m.Fragment,{children:[V&&(0,m.jsx)(U,{__scopeToast:n,role:"status","aria-live":"foreground"===u?"assertive":"polite",children:V}),(0,m.jsx)(M,{scope:n,onClose:q,children:i.createPortal((0,m.jsx)(b.ItemSlot,{scope:n,children:(0,m.jsx)(c.fC,{asChild:!0,onEscapeKeyDown:(0,o.Mj)(h,()=>{x.isFocusedToastEscapeKeyDownRef.current||q(),x.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,m.jsx)(f.WV.li,{tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":x.swipeDirection,...S,ref:k,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:(0,o.Mj)(e.onKeyDown,e=>{"Escape"!==e.key||(h?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(x.isFocusedToastEscapeKeyDownRef.current=!0,q()))}),onPointerDown:(0,o.Mj)(e.onPointerDown,e=>{0===e.button&&(j.current={x:e.clientX,y:e.clientY})}),onPointerMove:(0,o.Mj)(e.onPointerMove,e=>{if(!j.current)return;let t=e.clientX-j.current.x,n=e.clientY-j.current.y,r=!!R.current,i=["left","right"].includes(x.swipeDirection),o=["left","up"].includes(x.swipeDirection)?Math.min:Math.max,s=i?o(0,t):0,u=i?0:o(0,n),a="touch"===e.pointerType?10:2,c={x:s,y:u},l={originalEvent:e,delta:c};r?(R.current=c,B("toast.swipeMove",w,l,{discrete:!1})):K(c,x.swipeDirection,a)?(R.current=c,B("toast.swipeStart",y,l,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>a||Math.abs(n)>a)&&(j.current=null)}),onPointerUp:(0,o.Mj)(e.onPointerUp,e=>{let t=R.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),R.current=null,j.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};K(t,x.swipeDirection,x.swipeThreshold)?B("toast.swipeEnd",E,r,{discrete:!0}):B("toast.swipeCancel",_,r,{discrete:!0}),n.addEventListener("click",e=>e.preventDefault(),{once:!0})}})})})}),x.viewport)})]}):null}),U=e=>{let{__scopeToast:t,children:n,...i}=e,o=T(N,t),[s,u]=r.useState(!1),[a,c]=r.useState(!1);return function(e=()=>{}){let t=(0,p.W)(e);(0,v.b)(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}(()=>u(!0)),r.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),a?null:(0,m.jsx)(l.h,{asChild:!0,children:(0,m.jsx)(g.TX,{...i,children:s&&(0,m.jsxs)(m.Fragment,{children:[o.label," ",n]})})})},$=r.forwardRef((e,t)=>
11{let{__scopeToast:n,...r}=e;return(0,m.jsx)(f.WV.div,{...r,ref:t})});$.displayName="ToastTitle";var G=r.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,m.jsx)(f.WV.div,{...r,ref:t})});G.displayName="ToastDescription";var q="ToastAction",J=r.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?(0,m.jsx)(z,{altText:n,asChild:!0,children:(0,m.jsx)(W,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${q}\`. Expected non-empty \`string\`.`),null)});J.displayName=q;var V="ToastClose",W=r.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,i=D(V,n);return(0,m.jsx)(z,{asChild:!0,children:(0,m.jsx)(f.WV.button,{type:"button",...r,ref:t,onClick:(0,o.Mj)(e.onClick,i.onClose)})})});W.displayName=V;var z=r.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...i}=e;return(0,m.jsx)(f.WV.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function B(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?(0,f.jH)(i,o):i.dispatchEvent(o)}var K=(e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),o=r>i;return"left"===t||"right"===t?o&&r>n:!o&&i>n};function H(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}var Z=O,Y=j,X=L,Q=$,ee=G,et=J,en=W},84914:function(e,t,n){"use strict";n.d(t,{W:function(){return i}});var r=n(73732);function i(e){let t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...e)=>t.current?.(...e),[])}},61395:function(e,t,n){"use strict";n.d(t,{T:function(){return u}});var r,i=n(73732),o=n(32654),s=(r||(r=n.t(i,2)))[" useInsertionEffect ".trim().toString()]||o.b;function u({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[o,u,a]=function({defaultProp:e,onChange:t}){let[n,r]=i.useState(e),o=i.useRef(n),u=i.useRef(t);return s(()=>{u.current=t},[t]),i.useEffect(()=>{o.current!==n&&(u.current?.(n),o.current=n)},[n,o]),[n,r,u]}({defaultProp:t,onChange:n}),c=void 0!==e,l=c?e:o;{let t=i.useRef(void 0!==e);i.useEffect(()=>{let e=t.current;if(e!==c){let t=c?"controlled":"uncontrolled";console.warn(`${r} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=c},[c,r])}let d=i.useCallback(t=>{if(c){let n="function"==typeof t?t(e):t;n!==e&&a.current?.(n)}else u(t)},[c,e,u,a]);return[l,d]}Symbol("RADIX:SYNC_STATE")},32654:function(e,t,n){"use strict";n.d(t,{b:function(){return i}});var r=n(73732),i=globalThis?.document?r.useLayoutEffect:()=>{}},72452:function(e,t,n){"use strict";n.d(t,{C2:function(){return s},TX:function(){return u},fC:function(){return a}});var r=n(73732),i=n(54223),o=n(20503),s=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),u=r.forwardRef((e,t)=>(0,o.jsx)(i.WV.span,{...e,ref:t,style:{...s,...e.style}}));u.displayName="VisuallyHidden";var a=u},32900:function(e,t,n){"use strict";n.d(t,{w_:function(){return l}});var r=n(73732),i={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},o=r.createContext&&r.createContext(i),s=["attr","size","title"];function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach(function(t){var r,i;r=t,i=n[t],(r=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(r))in e?Object.defineProperty(e,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[r]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEac
11h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function l(e){return t=>r.createElement(d,u({attr:c({},e.attr)},t),function e(t){return t&&t.map((t,n)=>r.createElement(t.tag,c({key:n},t.attr),e(t.child)))}(e.child))}function d(e){var t=t=>{var n,{attr:i,size:o,title:a}=e,l=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,s),d=o||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),r.createElement("svg",u({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,i,l,{className:n,style:c(c({color:e.color||t.color},t.style),e.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),a&&r.createElement("title",null,a),e.children)};return void 0!==o?r.createElement(o.Consumer,null,e=>t(e)):t(i)}},32e3:function(e,t,n){"use strict";n.d(t,{APH:function(){return b},D3e:function(){return s},Epi:function(){return u},L6z:function(){return p},MoV:function(){return f},Nkf:function(){return i},VS2:function(){return h},Yj_:function(){return v},hBT:function(){return l},hrl:function(){return a},jKw:function(){return m},p8R:function(){return y},sFD:function(){return c},sfB:function(){return o},uij:function(){return d},wnj:function(){return g}});var r=n(32900);function i(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"},child:[]},{tag:"path",attr:{d:"M12 9v4"},child:[]},{tag:"path",attr:{d:"M12 17h.01"},child:[]}]})(e)}function o(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m12 19-7-7 7-7"},child:[]},{tag:"path",attr:{d:"M19 12H5"},child:[]}]})(e)}function s(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M5 12h14"},child:[]},{tag:"path",attr:{d:"m12 5 7 7-7 7"},child:[]}]})(e)}function u(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m5 12 7-7 7 7"},child:[]},{tag:"path",attr:{d:"M12 19V5"},child:[]}]})(e)}function a(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z"},child:[]},{tag:"path",attr:{d:"m9 12 2 2 4-4"},child:[]}]})(e)}function c(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m9 18 6-6-6-6"},child:[]}]})(e)}function l(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"},child:[]},{tag:"polyline",attr:{points:"14 2 14 8 20 8"},child:[]},{tag:"circle",attr:{cx:"10",cy:"13",r:"2"},child:[]},{tag:"path",attr:{d:"m20 17-1.09-1.09a2 2 0 0 0-2.82 0L10 22"},child:[]}]})(e)}function d(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"},child:[]},{tag:"polyline",attr:{points:"14 2 14 8 20 8"},child:[]},{tag:"path",attr:{d:"M9 13v-1h6v1"},child:[]},{tag:"path",attr:{d:"M11 18h2"},child:[]},{tag:"path",attr:{d:"M12 12v6"},child:[]}]})(e)}function f(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 8V4a2 2 0 0 1 2-2h8.5L20 7.5V20a2 2 0 0 1-2 2H4"},child:[]},{tag:"polyline",attr:{points:"14 2 14 8 20 8"},child:[]},{tag:"path",attr:{d:"m10 15.5 4 2.5v-6l-4 2.5"},child:[]}
11,{tag:"rect",attr:{width:"8",height:"6",x:"2",y:"12",rx:"1"},child:[]}]})(e)}function p(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 2v8"},child:[]},{tag:"path",attr:{d:"m16 6-4 4-4-4"},child:[]},{tag:"rect",attr:{width:"20",height:"8",x:"2",y:"14",rx:"2"},child:[]},{tag:"path",attr:{d:"M6 18h.01"},child:[]},{tag:"path",attr:{d:"M10 18h.01"},child:[]}]})(e)}function h(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"12 2 2 7 12 12 22 7 12 2"},child:[]},{tag:"polyline",attr:{points:"2 17 12 22 22 17"},child:[]},{tag:"polyline",attr:{points:"2 12 12 17 22 12"},child:[]}]})(e)}function v(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m16 6 4 14"},child:[]},{tag:"path",attr:{d:"M12 6v14"},child:[]},{tag:"path",attr:{d:"M8 8v12"},child:[]},{tag:"path",attr:{d:"M4 4v16"},child:[]}]})(e)}function g(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"13.5",cy:"6.5",r:".5"},child:[]},{tag:"circle",attr:{cx:"17.5",cy:"10.5",r:".5"},child:[]},{tag:"circle",attr:{cx:"8.5",cy:"7.5",r:".5"},child:[]},{tag:"circle",attr:{cx:"6.5",cy:"12.5",r:".5"},child:[]},{tag:"path",attr:{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z"},child:[]}]})(e)}function m(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"},child:[]},{tag:"polyline",attr:{points:"16 6 12 2 8 6"},child:[]},{tag:"line",attr:{x1:"12",x2:"12",y1:"2",y2:"15"},child:[]}]})(e)}function y(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m22 8-6 4 6 4V8Z"},child:[]},{tag:"rect",attr:{width:"14",height:"12",x:"2",y:"6",rx:"2",ry:"2"},child:[]}]})(e)}function b(e){return(0,r.w_)({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 6 6 18"},child:[]},{tag:"path",attr:{d:"m6 6 12 12"},child:[]}]})(e)}},5972:function(e,t,n){"use strict";n.d(t,{CR:function(){return l},FC:function(){return p},Jh:function(){return a},KL:function(){return h},XA:function(){return c},ZT:function(){return i},_T:function(){return s},ev:function(){return d},mG:function(){return u},pi:function(){return o},qq:function(){return f}});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}
11function u(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,u)}a((r=r.apply(e,t||[])).next())})}function a(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=u(0),s.throw=u(1),s.return=u(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function u(u){return function(a){return function(u){if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,a])}}}function c(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 l(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 d(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 f(e){return this instanceof f?(this.v=e,this):new f(e)}function p(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||u(e,t)})},t&&(r[e]=t(r[e])))}function u(e,t){try{var n;(n=i[e](t)).value instanceof f?Promise.resolve(n.value.v).then(a,c):l(o[0][2],n)}catch(e){l(o[0][3],e)}}function a(e){u("next",e)}function c(e){u("throw",e)}function l(e,t){e(t),o.shift(),o.length&&u(o[0][0],o[0][1])}}function h(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=c(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){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,i,(t=e[n](t)).done,t.value)})}}}"function"==typeof SuppressedError&&SuppressedError},93419:function(e){"use strict";e.exports=JSON.parse('{"id":"google-analytics","description":"Install a Google Analytics tag on your website","website":"https://analytics.google.com/analytics/web/","scripts":[{"url":"https://www.googletagmanager.com/gtag/js","params":["id"],"strategy":"worker","location":"head","action":"append"},{"code":"window.dataLayer=window.dataLayer||[];window.gtag=function gtag(){window.dataLayer.push(arguments);};gtag(\'js\',new Date());gtag(\'config\',\'${args.id}\')","strategy":"worker","location":"head","action":"append"}]}')},59030:function(e){"use strict";e.exports=JSON.parse('{"id":"google-maps-embed","description":"Embed a Google Maps embed on your webpage","website":"https://developers.google.com/maps/documentation/embed/get-started","html":{"element":"iframe","attributes":{"loading":"lazy","src":{"url":"https://www.google.com/maps/embed/v1/place","slugParam":"mode","params":["key","q","center","zoom","maptype","language","regi
11on"]},"referrerpolicy":"no-referrer-when-downgrade","frameborder":"0","style":"border:0","allowfullscreen":true,"width":null,"height":null}}}')},91955:function(e){"use strict";e.exports=JSON.parse('{"id":"youtube-embed","description":"Embed a YouTube embed on your webpage.","website":"https://github.com/paulirish/lite-youtube-embed","html":{"element":"lite-youtube","attributes":{"videoid":null,"playlabel":null}},"stylesheets":["https://cdn.jsdelivr.net/gh/paulirish/lite-youtube-embed@master/src/lite-yt-embed.css"],"scripts":[{"url":"https://cdn.jsdelivr.net/gh/paulirish/lite-youtube-embed@master/src/lite-yt-embed.js","strategy":"idle","location":"head","action":"append"}]}')}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[9774,179],function(){return t(11041),t(63842)}),_N_E=e.O()}]);

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.