@walkeros/web-destination-amplitude 4.8.1 → 4.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es5.js CHANGED
@@ -1 +1 @@
1
- "use strict";function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _assert_this_initialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _async_generator(e){var t,n;function r(t,n){try{var o=e[t](n),s=o.value,a=s instanceof _overload_yield;Promise.resolve(a?s.v:s).then(function(n){if(a){var u="return"===t?"return":"next";if(!s.k||n.done)return r(u,n);n=e[u](n).value}i(o.done?"return":"normal",n)},function(e){r("throw",e)})}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(o,s){var a={key:e,arg:i,resolve:o,reject:s,next:null};n?n=n.next=a:(t=n=a,r(e,i))})},"function"!=typeof e.return&&(this.return=void 0)}function asyncGeneratorStep(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,i)}function _async_to_generator(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(e){asyncGeneratorStep(o,r,i,s,a,"next",e)}function a(e){asyncGeneratorStep(o,r,i,s,a,"throw",e)}s(void 0)})}}function _await_async_generator(e){return new _overload_yield(e,0)}function _call_super(e,t,n){return t=_get_prototype_of(t),_possible_constructor_return(e,_is_native_reflect_construct()?Reflect.construct(t,n||[],_get_prototype_of(e).constructor):t.apply(e,n))}function _class_call_check(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _construct(e,t,n){return _construct=_is_native_reflect_construct()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&_set_prototype_of(i,n.prototype),i},_construct.apply(null,arguments)}function _defineProperties(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)}}function _create_class(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _define_property(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _get(e,t,n){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=_super_prop_base(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n||e):i.value}},_get(e,t,n||e)}function _get_prototype_of(e){return _get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_get_prototype_of(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_set_prototype_of(e,t)}function _instanceof(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _is_native_function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){_define_property(e,t,n[t])})}return e}function ownKeys(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 _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function _object_without_properties(e,t){if(null==e)return{};var n,r,i,o={};if("undefined"!=typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),i=0;i<n.length;i++)r=n[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}if(o=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),i=0;i<n.length;i++)r=n[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _object_without_properties_loose(e,t){if(null==e)return{};var n,r,i={},o=Object.getOwnPropertyNames(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}function _overload_yield(e,t){this.v=e,this.k=t}function _possible_constructor_return(e,t){return!t||"object"!==_type_of(t)&&"function"!=typeof t?_assert_this_initialized(e):t}function _set_prototype_of(e,t){return _set_prototype_of=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_set_prototype_of(e,t)}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _super_prop_base(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_get_prototype_of(e)););return e}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(e,t):void 0}}function _wrap_async_generator(e){return function(){return new _async_generator(e.apply(this,arguments))}}function _wrap_native_super(e){var t="function"==typeof Map?new Map:void 0;return _wrap_native_super=function(e){if(null===e||!_is_native_function(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return _construct(e,arguments,_get_prototype_of(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),_set_prototype_of(n,e)},_wrap_native_super(e)}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_is_native_reflect_construct=function(){return!!e})()}function _ts_generator(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),a=Object.defineProperty;return a(s,"next",{value:u(0)}),a(s,"throw",{value:u(1)}),a(s,"return",{value:u(2)}),"function"==typeof Symbol&&a(s,Symbol.iterator,{value:function(){return this}}),s;function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function _ts_values(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 new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}_async_generator.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},_async_generator.prototype.next=function(e){return this._invoke("next",e)},_async_generator.prototype.throw=function(e){return this._invoke("throw",e)},_async_generator.prototype.return=function(e){return this._invoke("return",e)};var Destination=function(){var e,t,n,r,i,o,s,a,u,l,c,d,f,h,p,v,g,y,m,b,w,_,S,k,x,E,C,I,O,T,A,P,R,M,N,L,D,j,U,F,B,q,z,W,V,H,K,G,J,$,Q,X,Y,Z,ee,te,ne,re,ie,oe,se,ae,ue,le,ce,de,fe,he,pe,ve,ge,ye,me,be,we,_e,Se,ke,xe,Ee,Ce,Ie,Oe,Te,Ae,Pe,Re,Me,Ne,Le,De,je,Ue,Fe,Be,qe,ze,We,Ve,He,Ke,Ge,Je,$e,Qe,Xe,Ye,Ze,et,tt,nt,rt,it,ot,st,at,ut,lt,ct,dt,ft,ht,pt,vt,gt,yt,mt,bt,wt,_t,St,kt,xt,Et,Ct,It,Ot,Tt,At,Pt,Rt,Mt,Nt,Lt,Dt,jt=function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)},Ut=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Ft=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,_instanceof(t,n)?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},Bt=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},qt=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},zt=function(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},Wt=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},Vt=function(e){return e>=200&&e<300},Ht=function(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t},Kt=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Gt=function(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},Jt=function(){return"undefined"!=typeof CompressionStream},$t=function(e){return Ft(this,void 0,void 0,function(){var t,n;return Bt(this,function(r){switch(r.label){case 0:if(void 0===(t=CompressionStream))return[2,void 0];r.label=1;case 1:return r.trys.push([1,3,,4]),n=new Blob([e]).stream().pipeThrough(new t("gzip")),[4,new Response(n).arrayBuffer()];case 2:return[2,r.sent()];case 3:return r.sent(),[2,void 0];case 4:return[2]}})})},Qt=function(e,t){var n,r=(n=e,!!bt&&"function"==typeof bt[n]&&(_t[n]||(_t[n]=bt[n],bt[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{if(wt[n]&&!St){St=!0;var r=wt[n];r&&r.forEach(function(t){try{t(n,e)}catch(e){}})}}catch(e){}return St=!1,_t[n].apply(bt,e)}),!0));if(!r)return new Error("Console override failed");wt[e]?wt[e].push(t):wt[e]=[t]},Xt=function(e){var t,n;try{for(var r=qt(Object.values(wt)),i=r.next();!i.done;i=r.next())for(var o=i.value,s=o.length-1;s>=0;s--)if(o[s]===e){o.splice(s,1);break}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},Yt=function(){var e,t;try{for(var n=qt(Object.entries(_t)),r=n.next();!r.done;r=n.next()){var i=zt(r.value,2),o=i[0],s=i[1];s&&(bt[o]=s)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}_t={},wt={}},Zt=function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e},en=function(e,t,n){e&&zl({json:e,allowlist:t.map(tn),excludelist:n.map(tn),ancestors:[]})},tn=function(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(e){return e.replace(/~0/g,"~").replace(/~1/g,"/")})},nn=function(e,t){return t.some(function(t){return Wl(e,t)})},rn=function(e,t){var n,r,i,o=K(),s=null==o?void 0:o.TextEncoder;if(s){var a;if("string"==typeof e)a=e,i=(new s).encode(a).length;else if(_instanceof(e,Blob))i=(a=e).size;else if(_instanceof(e,URLSearchParams))a=e,i=(new s).encode(a.toString()).length;else if(ArrayBuffer.isView(e))i=(a=e).byteLength;else if(_instanceof(e,ArrayBuffer))i=(a=e).byteLength;else if(_instanceof(e,FormData)){var u=e,l=0,c=0;try{for(var d=qt(u.entries()),f=d.next();!f.done;f=d.next()){var h=zt(f.value,2),p=h[0],v=h[1];if(l+=p.length,"string"==typeof v)l+=(new s).encode(v).length;else{if(!_instanceof(v,Blob))return;l+=v.size}if(++c>=t)return}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}i=l}else if(_instanceof(e,ReadableStream))return void(a=e);return i}},on=function(e,t,n){if(!e)return null;try{var r=JSON.parse(e);return en(r,t,n),r}catch(e){return null}},sn=function(e){try{e()}catch(e){}},an=function(e,t){return new lc.default(function(n){e.subscribe({next:function(e){t(e).then(function(e){return n.next(e)}).catch(function(e){return n.error(e)})},error:function(e){n.error(e)},complete:function(){n.complete()}})})},un=function(e,t){return new lc.default(function(n){var r=!1,i=new Set,o=function(){var e,t;r=!0;try{for(var n=qt(i),o=n.next();!o.done;o=n.next()){var s=o.value;try{s.unsubscribe()}catch(e){}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}i.clear()},s=function(e){var t=e.subscribe({next:function(e){r||n.next(e)},error:function(e){r||(r=!0,n.error(e),o())},complete:function(){i.delete(t),r||0!==i.size||(n.complete(),o(),r=!0)}});i.add(t)};return s(e),s(t),o})},ln=function(e){var t=new Set,n=null;function r(){null==n||n.unsubscribe(),n=null,t.clear()}return new lc.default(function(i){return t.add(i),null===n&&(n=e.subscribe({next:function(e){var n,r,i;try{for(var o=qt(t),s=o.next();!s.done;s=o.next()){var a=s.value;null===(i=a.next)||void 0===i||i.call(a,e)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},error:function(e){var n,i,o;try{for(var s=qt(t),a=s.next();!a.done;a=s.next()){var u=a.value;null===(o=u.error)||void 0===o||o.call(u,e)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}r()},complete:function(){var e,n,i;try{for(var o=qt(t),s=o.next();!s.done;s=o.next()){var a=s.value;null===(i=a.complete)||void 0===i||i.call(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}r()}})),function(){t.delete(i),0===t.size&&n&&(n.unsubscribe(),n=null)}})},cn=function(e){var t,n=K(),r=null==n?void 0:n[mc];if("object"===(void 0===(t=r)?"undefined":_type_of(t))&&null!==t&&yc in t&&!0===t[yc])return r;var i=new bc(e);return n&&(n[mc]=i),i},dn=function(e,t){var n,r=e;if(!0!==r[wc]){r[wc]=!0;var i=null!==(n=null==t?void 0:t.scriptUrl)&&void 0!==n?n:pc,o=null,s=function(t,n){var r,i;"background-capture-complete"===t&&(null===(i=null===(r=e.logger)||void 0===r?void 0:r.debug)||void 0===i||i.call(r,"Background capture complete"),e.notify({action:"background-capture-complete",data:n}))};e.registerActionHandler("initialize-background-capture",function(){var t,n;null===(n=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Initializing background capture (external script)");var r=new URL(i,e.endpoint).toString();e.loadScriptOnce(r).then(function(){var t,n,r;null===(n=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Background capture script loaded (external)"),o=null===(r=null===window||void 0===window?void 0:window.amplitudeBackgroundCapture)||void 0===r?void 0:r.call(window,{messenger:e,onBackgroundCapture:s}),e.notify({action:"background-capture-loaded"})}).catch(function(){var t;null===(t=e.logger)||void 0===t||t.warn("Failed to initialize background capture")})}),e.registerActionHandler("close-background-capture",function(){var e;null===(e=null==o?void 0:o.close)||void 0===e||e.call(o),o=null})}},fn=function(e){var t=new Promise(function(t,n){var r=function(){e.removeEventListener("success",i),e.removeEventListener("error",o)},i=function(){t(gn(e.result)),r()},o=function(){n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",o)});return Ic.set(t,e),t},hn=function(e){Oc=e(Oc)},pn=function(e){return(xc||(xc=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(Tc(this),n),gn(this.request)}:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return gn(e.apply(Tc(this),n))}},vn=function(e){return"function"==typeof e?pn(e):(_instanceof(e,IDBTransaction)&&function(e){if(!Ec.has(e)){var t=new Promise(function(t,n){var r=function(){e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=function(){t(),r()},o=function(){n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)});Ec.set(e,t)}}(e),Sc(e,kc||(kc=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,Oc):e)},gn=function(e){if(_instanceof(e,IDBRequest))return fn(e);if(Cc.has(e))return Cc.get(e);var t=vn(e);return t!==e&&(Cc.set(e,t),Ic.set(t,e)),t},yn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.blocked,i=n.upgrade,o=n.blocking,s=n.terminated,a=indexedDB.open(e,t),u=gn(a);return i&&a.addEventListener("upgradeneeded",function(e){i(gn(a.result),e.oldVersion,e.newVersion,gn(a.transaction),e)}),r&&a.addEventListener("blocked",function(e){return r(e.oldVersion,e.newVersion,e)}),u.then(function(e){s&&e.addEventListener("close",function(){return s()}),o&&e.addEventListener("versionchange",function(e){return o(e.oldVersion,e.newVersion,e)})}).catch(function(){}),u},mn=function(e,t){if(_instanceof(e,IDBDatabase)&&!(t in e)&&"string"==typeof t){if(Rc.get(t))return Rc.get(t);var n=t.replace(/FromIndex$/,""),r=t!==n,i=Pc.includes(n);if(n in(r?IDBIndex:IDBObjectStore).prototype&&(i||Ac.includes(n))){var o=function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];return _async_to_generator(function(){var t,s,a;return _ts_generator(this,function(u){switch(u.label){case 0:return s=this.transaction(e,i?"readwrite":"readonly"),a=s.store,r&&(a=a.index(o.shift())),[4,Promise.all([(t=a)[n].apply(t,_to_consumable_array(o)),i&&s.done])];case 1:return[2,u.sent()[0]]}})}).call(this)};return Rc.set(t,o),o}}},bn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _wrap_async_generator(function(){var e,n,r;return _ts_generator(this,function(i){switch(i.label){case 0:return _instanceof(e=this,IDBCursor)?[3,2]:[4,_await_async_generator((n=e).openCursor.apply(n,_to_consumable_array(t)))];case 1:e=i.sent(),i.label=2;case 2:if(!e)return[2];r=new Proxy(e,jc),Dc.set(r,e),Ic.set(r,Tc(e)),i.label=3;case 3:return e?[4,r]:[3,6];case 4:return i.sent(),[4,_await_async_generator(Lc.get(r)||e.continue())];case 5:return e=i.sent(),Lc.delete(r),[3,3];case 6:return[2]}})}).call(this)},wn=function(e,t){return t===Symbol.asyncIterator&&Sc(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&Sc(e,[IDBIndex,IDBObjectStore])},_n=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,_instanceof(t,n)?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},Sn=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},kn=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},xn=function(e){if(Pf[e])return Pf[e];var t=function(e){var t,n,r=null==(n=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:n.call(t,e);return r&&globalThis[r]?globalThis[r]:void 0}(e)||globalThis[e],n=t.prototype,r=e in Tf?Tf[e]:void 0,i=Boolean(r&&r.every(function(e){var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),o=e in Af?Af[e]:void 0,s=Boolean(o&&o.every(function(e){var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))}));if(i&&s)return Pf[e]=t.prototype,t.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var u=a.contentWindow;if(!u)return t.prototype;var l=u[e].prototype;return document.body.removeChild(a),l?Pf[e]=l:n}catch(e){return n}},En=function(e,t,n){var r,i="".concat(e,".").concat(String(n));if(Rf[i])return Rf[i].call(t);var o=xn(e),s=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return s?(Rf[i]=s,s.call(t)):t[n]},Cn=function(e,t,n){var r="".concat(e,".").concat(String(n));if(Mf[r])return Mf[r].bind(t);var i=xn(e)[n];return"function"!=typeof i?t[n]:(Mf[r]=i,i.bind(t))},In=function(e){return En("Node",e,"childNodes")},On=function(e){return En("Node",e,"parentNode")},Tn=function(e){return En("Node",e,"parentElement")},An=function(e){return En("Node",e,"textContent")},Pn=function(e,t){return Cn("Node",e,"contains")(t)},Rn=function(e){return Cn("Node",e,"getRootNode")()},Mn=function(e){return e&&"host"in e?En("ShadowRoot",e,"host"):null},Nn=function(e){return e.styleSheets},Ln=function(e){return e&&"shadowRoot"in e?En("Element",e,"shadowRoot"):null},Dn=function(e,t){return En("Element",e,"querySelector")(t)},jn=function(e,t){return En("Element",e,"querySelectorAll")(t)},Un=function(){return xn("MutationObserver").constructor},Fn=function(){if(Wf)return zf;Wf=1;var e=function(){if(Uf)return jf.exports;Uf=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return jf.exports=t(),jf.exports.createColors=t,jf.exports}(),t=qf,n=function(){function n(e,t,r,i,o,s){var a;return _class_call_check(this,n),(a=_call_super(this,n,[e])).name="CssSyntaxError",a.reason=e,o&&(a.file=o),i&&(a.source=i),s&&(a.plugin=s),void 0!==t&&void 0!==r&&("number"==typeof t?(a.line=t,a.column=r):(a.line=t.line,a.column=t.column,a.endLine=r.line,a.endColumn=r.column)),a.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(a,n),a}return _inherits(n,_wrap_native_super(Error)),_create_class(n,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(n){var r=this;if(!this.source)return"";var i=this.source;null==n&&(n=e.isColorSupported),t&&n&&(i=t(i));var o,s,a=i.split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),c=String(l).length;if(n){var d=e.createColors(!0),f=d.bold,h=d.gray,p=d.red;o=function(e){return f(p(e))},s=function(e){return h(e)}}else o=s=function(e){return e};return a.slice(u,l).map(function(e,t){var n=u+1+t,i=" "+(" "+n).slice(-c)+" | ";if(n===r.line){var a=s(i.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," ");return o(">")+s(i)+e+"\n "+a+o("^")}return" "+s(i)+e}).join("\n")}},{key:"toString",value:function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}]),n}();return zf=n,n.default=n,zf},Bn=function(){return Hf||(Hf=1,Vf.isClean=Symbol("isClean"),Vf.my=Symbol("my")),Vf},qn=function(){if(Gf)return Kf;Gf=1;var e={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var t=function(){function t(e){_class_call_check(this,t),this.builder=e}return _create_class(t,[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{var i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}}},{key:"beforeAfter",value:function(e,t){var n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var s=0;s<i;s++)n+=o}return n}},{key:"block",value:function(e,t){var n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}},{key:"body",value:function(e){for(var t=e.nodes.length-1;t>0&&"comment"===e.nodes[t].type;)t-=1;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}},{key:"comment",value:function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}},{key:"decl",value:function(e,t){var n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}},{key:"document",value:function(e){this.body(e)}},{key:"raw",value:function(t,n,r){var i;if(r||(r=n),n&&void 0!==(i=t.raws[n]))return i;var o=t.parent;if("before"===r){if(!o||"root"===o.type&&o.first===t)return"";if(o&&"document"===o.type)return""}if(!o)return e[r];var s=t.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[r])return s.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var a,u="raw"+((a=r)[0].toUpperCase()+a.slice(1));return this[u]?i=this[u](s,t):s.walk(function(e){if(void 0!==(i=e.raws[n]))return!1}),void 0===i&&(i=e[r]),s.rawCache[r]=i,i}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}},{key:"rawBeforeComment",value:function(e,t){var n;return e.walkComments(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}},{key:"rawBeforeDecl",value:function(e,t){var n;return e.walkDecls(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}},{key:"rawBeforeOpen",value:function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}},{key:"rawBeforeRule",value:function(e){var t;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return(t=n.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}},{key:"rawColon",value:function(e){var t;return e.walkDecls(function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}},{key:"rawEmptyBody",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}},{key:"rawIndent",value:function(e){return e.raws.indent?e.raws.indent:(e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){var i=n.raws.before.split("\n");return t=(t=i[i.length-1]).replace(/\S/g,""),!1}}),t);var t}},{key:"rawSemicolon",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}},{key:"rawValue",value:function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}},{key:"root",value:function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}},{key:"rule",value:function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}},{key:"stringify",value:function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}]),t}();return Kf=t,t.default=t,Kf},zn=function(){if($f)return Jf;$f=1;var e=qn();function t(t,n){new e(n).stringify(t)}return Jf=t,t.default=t,Jf},Wn=function(){if(Xf)return Qf;Xf=1;var e=Bn(),t=e.isClean,n=e.my,r=Fn(),i=qn(),o=zn();function s(e,t){var n=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){var i=e[r],o=void 0===i?"undefined":_type_of(i);"parent"===r&&"object"===o?t&&(n[r]=t):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map(function(e){return s(e,n)}):("object"===o&&null!==i&&(i=s(i)),n[r]=i)}return n}var a=function(){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var i in _class_call_check(this,e),this.raws={},this[t]=!1,this[n]=!0,r)if("nodes"===i){this.nodes=[];var o=!0,s=!1,a=void 0;try{for(var u,l=r[i][Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;"function"==typeof c.clone?this.append(c.clone()):this.append(c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}}else this[i]=r[i]}return _create_class(e,[{key:"addToError",value:function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))}return e}},{key:"after",value:function(e){return this.parent.insertAfter(this,e),this}},{key:"assign",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e)this[t]=e[t];return this}},{key:"before",value:function(e){return this.parent.insertBefore(this,e),this}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=s(this);for(var n in e)t[n]=e[n];return t}},{key:"cloneAfter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertAfter(this,t),t}},{key:"cloneBefore",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertBefore(this,t),t}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.source){var n=this.rangeBy(t),i=n.end,o=n.start;return this.source.input.error(e,{column:o.column,line:o.line},{column:i.column,line:i.line},t)}return new r(e)}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0}}}},{key:"markDirty",value:function(){if(this[t]){this[t]=!1;for(var e=this;e=e.parent;)e[t]=!1}}},{key:"next",value:function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}}},{key:"positionBy",value:function(e,t){var n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){var r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n}},{key:"positionInside",value:function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?(r=1,i+=1):r+=1;return{column:r,line:i}}},{key:"prev",value:function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}}},{key:"rangeBy",value:function(e){var t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var r=this.toString(),i=r.indexOf(e.word);-1!==i&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}},{key:"raw",value:function(e,t){return(new i).raw(this,e,t)}},{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"replaceWith",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this.parent){var r=this,i=!1,o=!0,s=!1,a=void 0;try{for(var u,l=t[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;c===this?i=!0:i?(this.parent.insertAfter(r,c),r=c):this.parent.insertBefore(r,c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}i||this.remove()}return this}},{key:"root",value:function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}},{key:"toJSON",value:function(e,t){var n={},r=null==t;t=t||new Map;var i=0;for(var o in this)if(Object.prototype.hasOwnProperty.call(this,o)&&"parent"!==o&&"proxyCache"!==o){var s=this[o];if(Array.isArray(s))n[o]=s.map(function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&e.toJSON?e.toJSON(null,t):e});else if("object"===(void 0===s?"undefined":_type_of(s))&&s.toJSON)n[o]=s.toJSON(null,t);else if("source"===o){var a=t.get(s.input);null==a&&(a=i,t.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=_to_consumable_array(t.keys()).map(function(e){return e.toJSON()})),n}},{key:"toProxy",value:function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;e.stringify&&(e=e.stringify);var t="";return e(this,function(e){t+=e}),t}},{key:"warn",value:function(e,t,n){var r={node:this};for(var i in n)r[i]=n[i];return e.warn(t,r)}},{key:"proxyOf",get:function(){return this}}]),e}();return Qf=a,a.default=a,Qf},Vn=function(){if(Zf)return Yf;Zf=1;var e=function(e){function t(e){var n;return _class_call_check(this,t),e&&void 0!==e.value&&"string"!=typeof e.value&&(e=_object_spread_props(_object_spread({},e),{value:String(e.value)})),(n=_call_super(this,t,[e])).type="decl",n}return _inherits(t,e),_create_class(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),t}(Wn());return Yf=e,e.default=e,Yf},Hn=function(){if(rh)return nh;rh=1;var e=qf.SourceMapConsumer,t=qf.SourceMapGenerator,n=qf.existsSync,r=qf.readFileSync,i=qf.dirname,o=qf.join;var s=function(){function s(e,t){if(_class_call_check(this,s),!1!==t.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),r&&(this.text=r)}}return _create_class(s,[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}},{key:"decodeInline",value:function(e){var t;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}},{key:"getAnnotationURL",value:function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}},{key:"loadAnnotation",value:function(e){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(t){var n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}}},{key:"loadFile",value:function(e){if(this.root=i(e),n(e))return this.mapFile=e,r(e,"utf-8").toString().trim()}},{key:"loadMap",value:function(n,r){if(!1===r)return!1;if(r){if("string"==typeof r)return r;if("function"!=typeof r){if(_instanceof(r,e))return t.fromSourceMap(r).toString();if(_instanceof(r,t))return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}var s=r(n);if(s){var a=this.loadFile(s);if(!a)throw new Error("Unable to load previous source map: "+s.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var u=this.annotation;return n&&(u=o(i(n),u)),this.loadFile(u)}}}},{key:"startWith",value:function(e,t){return!!e&&e.substr(0,t.length)===t}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}]),s}();return nh=s,s.default=s,nh},Kn=function(){if(oh)return ih;oh=1;var e=qf.SourceMapConsumer,t=qf.SourceMapGenerator,n=qf.fileURLToPath,r=qf.pathToFileURL,i=qf.isAbsolute,o=qf.resolve,s=(th||(th=1,eh={nanoid:function(){for(var e="",t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21;return function(){for(var n="",r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t;r--;)n+=e[Math.random()*e.length|0];return n}}}),eh).nanoid,a=qf,u=Fn(),l=Hn(),c=Symbol("fromOffsetCache"),d=Boolean(e&&t),f=Boolean(o&&i),h=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_class_call_check(this,e),null==t||"object"===(void 0===t?"undefined":_type_of(t))&&!t.toString)throw new Error("PostCSS received ".concat(t," instead of CSS string"));if(this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!f||/^\w+:\/\//.test(n.from)||i(n.from)?this.file=n.from:this.file=o(n.from)),f&&d){var r=new l(this.css,n);if(r.text){this.map=r;var a=r.consumer().file;!this.file&&a&&(this.file=this.mapResolve(a))}}this.file||(this.id="<input css "+s(6)+">"),this.map&&(this.map.file=this.from)}return _create_class(e,[{key:"error",value:function(e,t,n){var i,o,s,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(t&&"object"===(void 0===t?"undefined":_type_of(t))){var l=t,c=n;if("number"==typeof l.offset){var d=this.fromOffset(l.offset);t=d.line,n=d.col}else t=l.line,n=l.column;if("number"==typeof c.offset){var f=this.fromOffset(c.offset);o=f.line,s=f.col}else o=c.line,s=c.column}else if(!n){var h=this.fromOffset(t);t=h.line,n=h.col}var p=this.origin(t,n,o,s);return(i=p?new u(e,void 0===p.endLine?p.line:{column:p.column,line:p.line},void 0===p.endLine?p.column:{column:p.endColumn,line:p.endLine},p.source,p.file,a.plugin):new u(e,void 0===o?t:{column:n,line:t},void 0===o?n:{column:s,line:o},this.css,this.file,a.plugin)).input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(r&&(i.input.url=r(this.file).toString()),i.input.file=this.file),i}},{key:"fromOffset",value:function(e){var t;if(this[c])t=this[c];else{var n=this.css.split("\n");t=new Array(n.length);for(var r=0,i=0,o=n.length;i<o;i++)t[i]=r,r+=n[i].length+1;this[c]=t}var s=0;if(e>=t[t.length-1])s=t.length-1;else for(var a,u=t.length-2;s<u;)if(e<t[a=s+(u-s>>1)])u=a-1;else{if(!(e>=t[a+1])){s=a;break}s=a+1}return{col:e-t[s]+1,line:s+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}},{key:"origin",value:function(e,t,o,s){if(!this.map)return!1;var a,u,l=this.map.consumer(),c=l.originalPositionFor({column:t,line:e});if(!c.source)return!1;"number"==typeof o&&(a=l.originalPositionFor({column:s,line:o})),u=i(c.source)?r(c.source):new URL(c.source,this.map.consumer().sourceRoot||r(this.map.mapFile));var d={column:c.column,endColumn:a&&a.column,endLine:a&&a.line,line:c.line,url:u.toString()};if("file:"===u.protocol){if(!n)throw new Error("file: protocol is not available in this PostCSS build");d.file=n(u)}var f=l.sourceContentFor(c.source);return f&&(d.source=f),d}},{key:"toJSON",value:function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=_object_spread({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}},{key:"from",get:function(){return this.file||this.id}}]),e}();return ih=h,h.default=h,a&&a.registerInput&&a.registerInput(h),ih},Gn=function(){if(ah)return sh;ah=1;var e=qf.SourceMapConsumer,t=qf.SourceMapGenerator,n=qf.dirname,r=qf.relative,i=qf.resolve,o=qf.sep,s=qf.pathToFileURL,a=Kn(),u=Boolean(e&&t),l=Boolean(n&&i&&r&&o);return sh=function(){function c(e,t,n,r){_class_call_check(this,c),this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}return _create_class(c,[{key:"addAnnotation",value:function(){var e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}},{key:"applyPrevMaps",value:function(){var t=!0,r=!1,i=void 0;try{for(var o,s=this.previous()[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){var a=o.value,u=this.toUrl(this.path(a.file)),l=a.root||n(a.file),c=void 0;!1===this.mapOpts.sourcesContent?(c=new e(a.text)).sourcesContent&&(c.sourcesContent=null):c=a.consumer(),this.map.applySourceMap(c,u,this.toUrl(this.path(l)))}}catch(e){r=!0,i=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}},{key:"generate",value:function(){if(this.clearAnnotation(),l&&u&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]}},{key:"generateMap",value:function(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var e=this;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});var n,r,i=1,o=1,s="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(t,u,l){if(e.css+=t,u&&"end"!==l&&(a.generated.line=i,a.generated.column=o-1,u.source&&u.source.start?(a.source=e.sourcePath(u),a.original.line=u.source.start.line,a.original.column=u.source.start.column-1,e.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,e.map.addMapping(a))),(n=t.match(/\n/g))?(i+=n.length,r=t.lastIndexOf("\n"),o=t.length-r):o+=t.length,u&&"start"!==l){var c=u.parent||{raws:{}};("decl"===u.type||"atrule"===u.type&&!u.nodes)&&u===c.last&&!c.raws.semicolon||(u.source&&u.source.end?(a.source=e.sourcePath(u),a.original.line=u.source.end.line,a.original.column=u.source.end.column-1,a.generated.line=i,a.generated.column=o-2,e.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,a.generated.line=i,a.generated.column=o-1,e.map.addMapping(a)))}})}},{key:"isAnnotation",value:function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))}},{key:"isMap",value:function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}},{key:"isSourcesContent",value:function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var o=this.opts.to?n(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=n(i(o,this.mapOpts.annotation)));var s=r(o,e);return this.memoizedPaths.set(e,s),s}},{key:"previous",value:function(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;e.previousMaps.includes(n)||e.previousMaps.push(n)}});else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}},{key:"setSourcesContent",value:function(){var e=this,t={};if(this.root)this.root.walk(function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.usesFileUrls?e.toFileUrl(r):e.toUrl(e.path(r));e.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){var n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}},{key:"sourcePath",value:function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}},{key:"toBase64",value:function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}},{key:"toFileUrl",value:function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(s){var n=s(e).toString();return this.memoizedFileURLs.set(e,n),n}throw new Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));var n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}]),c}()},Jn=function(){if(lh)return uh;lh=1;var e=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t,[e])).type="comment",n}return _inherits(t,e),t}(Wn());return uh=e,e.default=e,uh},$n=function(){if(dh)return ch;dh=1;var e,t,n,r,i=Bn(),o=i.isClean,s=i.my,a=Vn(),u=Jn();function l(e){return e.map(function(e){return e.nodes&&(e.nodes=l(e.nodes)),delete e.source,e})}function c(e){if(e[o]=!1,e.proxyOf.nodes){var t=!0,n=!1,r=void 0;try{for(var i,s=e.proxyOf.nodes[Symbol.iterator]();!(t=(i=s.next()).done);t=!0){c(i.value)}}catch(e){n=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(n)throw r}}}}var d=function(r){function i(){return _class_call_check(this,i),_call_super(this,i,arguments)}return _inherits(i,r),_create_class(i,[{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value,l=this.normalize(u,this.last),c=!0,d=!1,f=void 0;try{for(var h,p=l[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;this.proxyOf.nodes.push(v)}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if(_get(_get_prototype_of(i.prototype),"cleanRaws",this).call(this,e),this.nodes){var t=!0,n=!1,r=void 0;try{for(var o,s=this.nodes[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){o.value.cleanRaws(e)}}catch(e){n=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(n)throw r}}}}},{key:"each",value:function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"getIterator",value:function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o;return(o=e)[t].apply(o,_to_consumable_array(r.map(function(e){return"function"==typeof e?function(t,n){return e(t.toProxy(),n)}:e})))}:"every"===t||"some"===t?function(n){return e[t](function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return n.apply(void 0,[e.toProxy()].concat(_to_consumable_array(r)))})}:"root"===t?function(){return e.root().toProxy()}:"nodes"===t?e.nodes.map(function(e){return e.toProxy()}):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0}}}},{key:"index",value:function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}},{key:"insertAfter",value:function(e,t){var n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);var i,o=!0,s=!1,a=void 0;try{for(var u,l=r[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;this.proxyOf.nodes.splice(n+1,0,c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}for(var d in this.indexes)n<(i=this.indexes[d])&&(this.indexes[d]=i+r.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n=this.index(e),r=0===n&&"prepend",i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);var o,s=!0,a=!1,u=void 0;try{for(var l,c=i[Symbol.iterator]();!(s=(l=c.next()).done);s=!0){var d=l.value;this.proxyOf.nodes.splice(n,0,d)}}catch(e){a=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(a)throw u}}for(var f in this.indexes)n<=(o=this.indexes[f])&&(this.indexes[f]=o+i.length);return this.markDirty(),this}},{key:"normalize",value:function(r,d){var f=this;if("string"==typeof r)r=l(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r)){r=r.slice(0);var h=!0,p=!1,v=void 0;try{for(var g,y=r[Symbol.iterator]();!(h=(g=y.next()).done);h=!0){var m=g.value;m.parent&&m.parent.removeChild(m,"ignore")}}catch(e){p=!0,v=e}finally{try{h||null==y.return||y.return()}finally{if(p)throw v}}}else if("root"===r.type&&"document"!==this.type){r=r.nodes.slice(0);var b=!0,w=!1,_=void 0;try{for(var S,k=r[Symbol.iterator]();!(b=(S=k.next()).done);b=!0){var x=S.value;x.parent&&x.parent.removeChild(x,"ignore")}}catch(e){w=!0,_=e}finally{try{b||null==k.return||k.return()}finally{if(w)throw _}}}else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new a(r)]}else if(r.selector)r=[new t(r)];else if(r.name)r=[new n(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new u(r)]}var E=r.map(function(e){return e[s]||i.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[o]&&c(e),void 0===e.raws.before&&d&&void 0!==d.raws.before&&(e.raws.before=d.raws.before.replace(/\S/g,"")),e.parent=f.proxyOf,e});return E}},{key:"prepend",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.reverse();var r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value,l=this.normalize(u,this.first,"prepend").reverse(),c=!0,d=!1,f=void 0;try{for(var h,p=l[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;this.proxyOf.nodes.unshift(v)}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}for(var g in this.indexes)this.indexes[g]=this.indexes[g]+l.length}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return this.markDirty(),this}},{key:"push",value:function(e){return e.parent=this,this.proxyOf.nodes.push(e),this}},{key:"removeAll",value:function(){var e=!0,t=!1,n=void 0;try{for(var r,i=this.proxyOf.nodes[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){r.value.parent=void 0}}catch(e){t=!0,n=e}finally{try{e||null==i.return||i.return()}finally{if(t)throw n}}return this.proxyOf.nodes=[],this.markDirty(),this}},{key:"removeChild",value:function(e){var t;for(var n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}},{key:"replaceValues",value:function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"walk",value:function(e){return this.each(function(t,n){var r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}},{key:"walkAtRules",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("atrule"===e.type)return t(e,n)}))}},{key:"walkComments",value:function(e){return this.walk(function(t,n){if("comment"===t.type)return e(t,n)})}},{key:"walkDecls",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("decl"===e.type)return t(e,n)}))}},{key:"walkRules",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("rule"===e.type)return t(e,n)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),i}(Wn());return d.registerParse=function(t){e=t},d.registerRule=function(e){t=e},d.registerAtRule=function(e){n=e},d.registerRoot=function(e){r=e},ch=d,d.default=d,d.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,n.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,a.prototype):"comment"===e.type?Object.setPrototypeOf(e,u.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[s]=!0,e.nodes&&e.nodes.forEach(function(e){d.rebuild(e)})},ch},Qn=function(){if(hh)return fh;hh=1;var e,t,n=function(n){function r(e){var t;return _class_call_check(this,r),(t=_call_super(this,r,[_object_spread({type:"document"},e)])).nodes||(t.nodes=[]),t}return _inherits(r,n),_create_class(r,[{key:"toResult",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(new t,this,n).stringify()}}]),r}($n());return n.registerLazyResult=function(t){e=t},n.registerProcessor=function(e){t=e},fh=n,n.default=n,fh},Xn=function(){if(vh)return ph;vh=1;var e={};return ph=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}},Yn=function(){if(yh)return gh;yh=1;var e=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_class_call_check(this,e),this.type="warning",this.text=t,n.node&&n.node.source){var r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in n)this[i]=n[i]}return _create_class(e,[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),e}();return gh=e,e.default=e,gh},Zn=function(){if(bh)return mh;bh=1;var e=Yn(),t=function(){function t(e,n,r){_class_call_check(this,t),this.processor=e,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}return _create_class(t,[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);var r=new e(t,n);return this.messages.push(r),r}},{key:"warnings",value:function(){return this.messages.filter(function(e){return"warning"===e.type})}},{key:"content",get:function(){return this.css}}]),t}();return mh=t,t.default=t,mh},er=function(){if(kh)return Sh;kh=1;var e=$n(),t=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t,[e])).type="atrule",n}return _inherits(t,e),_create_class(t,[{key:"append",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=_get(_get_prototype_of(t.prototype),"append",this)).call.apply(i,[this].concat(_to_consumable_array(n)))}},{key:"prepend",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=_get(_get_prototype_of(t.prototype),"prepend",this)).call.apply(i,[this].concat(_to_consumable_array(n)))}}]),t}(e);return Sh=t,t.default=t,e.registerAtRule(t),Sh},tr=function(){if(Eh)return xh;Eh=1;var e,t,n=$n(),r=function(n){function r(e){var t;return _class_call_check(this,r),(t=_call_super(this,r,[e])).type="root",t.nodes||(t.nodes=[]),t}return _inherits(r,n),_create_class(r,[{key:"normalize",value:function(e,t,n){var i=_get(_get_prototype_of(r.prototype),"normalize",this).call(this,e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t){var o=!0,s=!1,a=void 0;try{for(var u,l=i[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){u.value.raws.before=t.raws.before}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}}return i}},{key:"removeChild",value:function(e,t){var n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),_get(_get_prototype_of(r.prototype),"removeChild",this).call(this,e)}},{key:"toResult",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(new t,this,n).stringify()}}]),r}(n);return r.registerLazyResult=function(t){e=t},r.registerProcessor=function(e){t=e},xh=r,r.default=r,n.registerRoot(r),xh},nr=function(){if(Ih)return Ch;Ih=1;var e={comma:function(t){return e.split(t,[","],!0)},space:function(t){return e.split(t,[" ","\n","\t"])},split:function(e,t,n){var r=[],i="",o=!1,s=0,a=!1,u="",l=!1,c=!0,d=!1,f=void 0;try{for(var h,p=e[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;l?l=!1:"\\"===v?l=!0:a?v===u&&(a=!1):'"'===v||"'"===v?(a=!0,u=v):"("===v?s+=1:")"===v?s>0&&(s-=1):0===s&&t.includes(v)&&(o=!0),o?(""!==i&&r.push(i.trim()),i="",o=!1):i+=v}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}return(n||""!==i)&&r.push(i.trim()),r}};return Ch=e,e.default=e,Ch},rr=function(){if(Th)return Oh;Th=1;var e=$n(),t=nr(),n=function(e){function n(e){var t;return _class_call_check(this,n),(t=_call_super(this,n,[e])).type="rule",t.nodes||(t.nodes=[]),t}return _inherits(n,e),_create_class(n,[{key:"selectors",get:function(){return t.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}]),n}(e);return Oh=n,n.default=n,e.registerRule(n),Oh},ir=function(){if(Ph)return Ah;Ph=1;var e=Vn(),t=function(){if(_h)return wh;_h=1;var e="'".charCodeAt(0),t='"'.charCodeAt(0),n="\\".charCodeAt(0),r="/".charCodeAt(0),i="\n".charCodeAt(0),o=" ".charCodeAt(0),s="\f".charCodeAt(0),a="\t".charCodeAt(0),u="\r".charCodeAt(0),l="[".charCodeAt(0),c="]".charCodeAt(0),d="(".charCodeAt(0),f=")".charCodeAt(0),h="{".charCodeAt(0),p="}".charCodeAt(0),v=";".charCodeAt(0),g="*".charCodeAt(0),y=":".charCodeAt(0),m="@".charCodeAt(0),b=/[\t\n\f\r "#'()/;[\\\]{}]/g,w=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return wh=function(k){var x,E,C,I,O,T,A,P,R,M,N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},L=k.css.valueOf(),D=N.ignoreErrors,j=L.length,U=0,F=[],B=[];function q(e){throw k.error("Unclosed "+e,U)}return{back:function(e){B.push(e)},endOfFile:function(){return 0===B.length&&U>=j},nextToken:function(k){if(B.length)return B.pop();if(!(U>=j)){var N=!!k&&k.ignoreUnclosed;switch(x=L.charCodeAt(U)){case i:case o:case a:case u:case s:E=U;do{E+=1,x=L.charCodeAt(E)}while(x===o||x===i||x===a||x===u||x===s);M=["space",L.slice(U,E)],U=E-1;break;case l:case c:case h:case p:case y:case v:case f:var z=String.fromCharCode(x);M=[z,z,U];break;case d:if(P=F.length?F.pop()[1]:"",R=L.charCodeAt(U+1),"url"===P&&R!==e&&R!==t&&R!==o&&R!==i&&R!==a&&R!==s&&R!==u){E=U;do{if(T=!1,-1===(E=L.indexOf(")",E+1))){if(D||N){E=U;break}q("bracket")}for(A=E;L.charCodeAt(A-1)===n;)A-=1,T=!T}while(T);M=["brackets",L.slice(U,E+1),U,E],U=E}else E=L.indexOf(")",U+1),I=L.slice(U,E+1),-1===E||_.test(I)?M=["(","(",U]:(M=["brackets",I,U,E],U=E);break;case e:case t:C=x===e?"'":'"',E=U;do{if(T=!1,-1===(E=L.indexOf(C,E+1))){if(D||N){E=U+1;break}q("string")}for(A=E;L.charCodeAt(A-1)===n;)A-=1,T=!T}while(T);M=["string",L.slice(U,E+1),U,E],U=E;break;case m:b.lastIndex=U+1,b.test(L),E=0===b.lastIndex?L.length-1:b.lastIndex-2,M=["at-word",L.slice(U,E+1),U,E],U=E;break;case n:for(E=U,O=!0;L.charCodeAt(E+1)===n;)E+=1,O=!O;if(x=L.charCodeAt(E+1),O&&x!==r&&x!==o&&x!==i&&x!==a&&x!==u&&x!==s&&(E+=1,S.test(L.charAt(E)))){for(;S.test(L.charAt(E+1));)E+=1;L.charCodeAt(E+1)===o&&(E+=1)}M=["word",L.slice(U,E+1),U,E],U=E;break;default:x===r&&L.charCodeAt(U+1)===g?(0===(E=L.indexOf("*/",U+2)+1)&&(D||N?E=L.length:q("comment")),M=["comment",L.slice(U,E+1),U,E],U=E):(w.lastIndex=U+1,w.test(L),E=0===w.lastIndex?L.length-1:w.lastIndex-2,M=["word",L.slice(U,E+1),U,E],F.push(M),U=E)}return U++,M}},position:function(){return U}}},wh}(),n=Jn(),r=er(),i=tr(),o=rr(),s={empty:!0,space:!0};return Ah=function(){function a(e){_class_call_check(this,a),this.input=e,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}return _create_class(a,[{key:"atrule",value:function(e){var t,n,i,o=new r;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);for(var s=!1,a=!1,u=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(u.length>0){for(n=u[i=u.length-1];n&&"space"===n[0];)n=u[--i];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(e);break}u.push(e)}else u.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(o.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(o,"params",u),s&&(e=u[u.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}},{key:"checkMissedSemicolon",value:function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;i>=0&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},{key:"colon",value:function(e){var t,n,r,i=0,o=!0,s=!1,a=void 0;try{for(var u,l=e.entries()[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=_sliced_to_array(u.value,2),d=c[0];if("("===(n=(t=c[1])[0])&&(i+=1),")"===n&&(i-=1),0===i&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return d}this.doubleColon(t)}r=t}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}return!1}},{key:"comment",value:function(e){var t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{var i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}},{key:"createTokenizer",value:function(){this.tokenizer=t(this.input)}},{key:"decl",value:function(t,n){var r=new e;this.init(r,t[0][2]);var i,o=t[t.length-1];for(";"===o[0]&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(o[3]||o[2]||function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=n[3]||n[2];if(r)return r}}(t)),r.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){var s=t[0][0];if(":"===s||"space"===s||"comment"===s)break;r.prop+=t.shift()[1]}for(r.raws.between="";t.length;){if(":"===(i=t.shift())[0]){r.raws.between+=i[1];break}"word"===i[0]&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));for(var a,u=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)u.push(t.shift());this.precheckMissedSemicolon(t);for(var l=t.length-1;l>=0;l--){if("!important"===(i=t[l])[1].toLowerCase()){r.important=!0;var c=this.stringFrom(t,l);" !important"!==(c=this.spacesFromEnd(t)+c)&&(r.raws.important=c);break}if("important"===i[1].toLowerCase()){for(var d=t.slice(0),f="",h=l;h>0;h--){var p=d[h][0];if(0===f.trim().indexOf("!")&&"space"!==p)break;f=d.pop()[1]+f}0===f.trim().indexOf("!")&&(r.important=!0,r.raws.important=f,t=d)}if("space"!==i[0]&&"comment"!==i[0])break}var v=t.some(function(e){return"space"!==e[0]&&"comment"!==e[0]});v&&(r.raws.between+=u.map(function(e){return e[1]}).join(""),u=[]),this.raw(r,"value",u.concat(t),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}},{key:"doubleColon",value:function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}},{key:"emptyRule",value:function(e){var t=new o;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}},{key:"end",value:function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}},{key:"getPosition",value:function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}},{key:"init",value:function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}},{key:"other",value:function(e){for(var t=!1,n=null,r=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],u=e;u;){if(n=u[0],a.push(u),"("===n||"["===n)i||(i=u),o.push("("===n?")":"]");else if(s&&r&&"{"===n)i||(i=u),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(a,s);break}if("{"===n)return void this.rule(a);if("}"===n){this.tokenizer.back(a.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!s)for(;a.length&&("space"===(u=a[a.length-1][0])||"comment"===u);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}},{key:"parse",value:function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(e,t,n,r){for(var i,o,a,u,l=n.length,c="",d=!0,f=0;f<l;f+=1)"space"!==(o=(i=n[f])[0])||f!==l-1||r?"comment"===o?(u=n[f-1]?n[f-1][0]:"empty",a=n[f+1]?n[f+1][0]:"empty",s[u]||s[a]||","===c.slice(-1)?d=!1:c+=i[1]):c+=i[1]:d=!1;if(!d){var h=n.reduce(function(e,t){return e+t[1]},"");e.raws[t]={raw:h,value:c}}e[t]=c}},{key:"rule",value:function(e){e.pop();var t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}},{key:"spacesAndCommentsFromEnd",value:function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}},{key:"spacesAndCommentsFromStart",value:function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}},{key:"spacesFromEnd",value:function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}},{key:"stringFrom",value:function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}},{key:"unclosedBlock",value:function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}},{key:"unclosedBracket",value:function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}},{key:"unexpectedClose",value:function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}},{key:"unknownWord",value:function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}},{key:"unnamedAtrule",value:function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}]),a}()},or=function(){if(Mh)return Rh;Mh=1;var e=$n(),t=ir(),n=Kn();function r(e,r){var i=new n(e,r),o=new t(i);try{o.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&r&&r.from&&(/\.scss$/i.test(r.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(r.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(r.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return o.root}return Rh=r,r.default=r,e.registerParse(r),Rh},sr=function(){if(Lh)return Nh;Lh=1;var e=Bn(),t=e.isClean,n=e.my,r=Gn(),i=zn(),o=$n(),s=Qn(),a=Xn(),u=Zn(),l=or(),c=tr(),d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0};function p(e){return"object"===(void 0===e?"undefined":_type_of(e))&&"function"==typeof e.then}function v(e){var t=!1,n=d[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function g(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:v(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function y(e){return e[t]=!1,e.nodes&&e.nodes.forEach(function(e){return y(e)}),e}var m={},b=function(){function e(t,r,i){var s,a=this;if(_class_call_check(this,e),this.stringified=!1,this.processed=!1,"object"!==(void 0===r?"undefined":_type_of(r))||null===r||"root"!==r.type&&"document"!==r.type)if(_instanceof(r,e)||_instanceof(r,u))s=y(r.root),r.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=r.map);else{var c=l;i.syntax&&(c=i.syntax.parse),i.parser&&(c=i.parser),c.parse&&(c=c.parse);try{s=c(r,i)}catch(e){this.processed=!0,this.error=e}s&&!s[n]&&o.rebuild(s)}else s=y(r);this.result=new u(t,s,i),this.helpers=_object_spread_props(_object_spread({},m),{postcss:m,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&e.prepare?_object_spread({},e,e.prepare(a.result)):e})}return _create_class(e,[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(e){return this.async().catch(e)}},{key:"finally",value:function(e){return this.async().then(e,e)}},{key:"getAsyncError",value:function(){throw new Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(e,t){var n=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(n.postcssVersion&&"production"!==process.env.NODE_ENV){var r=n.postcssPlugin,i=n.postcssVersion,o=this.result.processor.version,s=i.split("."),a=o.split(".");(s[0]!==a[0]||parseInt(s[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+r+" uses "+i+". Perhaps this is the source of the error below.")}}else e.plugin=n.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}},{key:"prepareVisitors",value:function(){var e=this;this.listeners={};var t=function(t,n,r){e.listeners[n]||(e.listeners[n]=[]),e.listeners[n].push([t,r])},n=!0,r=!1,i=void 0;try{for(var o,s=this.plugins[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;if("object"===(void 0===a?"undefined":_type_of(a)))for(var u in a){if(!f[u]&&/^[A-Z]/.test(u))throw new Error("Unknown event ".concat(u," in ").concat(a.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!h[u])if("object"===_type_of(a[u]))for(var l in a[u])t(a,"*"===l?u:u+"-"+l.toLowerCase(),a[u][l]);else"function"==typeof a[u]&&t(a,u,a[u])}}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}this.hasListener=Object.keys(this.listeners).length>0}},{key:"runAsync",value:function(){return _async_to_generator(function(){var e,n,r,i,o,s,a,u,l,c,d,f,h,v,y,m,b,w;return _ts_generator(this,function(_){switch(_.label){case 0:e=this,this.plugin=0,n=0,_.label=1;case 1:if(!(n<this.plugins.length))return[3,6];if(r=this.plugins[n],!p(i=this.runOnRoot(r)))return[3,5];_.label=2;case 2:return _.trys.push([2,4,,5]),[4,i];case 3:return _.sent(),[3,5];case 4:throw o=_.sent(),this.handleError(o);case 5:return n++,[3,1];case 6:if(this.prepareVisitors(),!this.hasListener)return[3,22];s=this.result.root,_.label=7;case 7:if(s[t])return[3,14];s[t]=!0,a=[g(s)],_.label=8;case 8:if(!(a.length>0))return[3,13];if(!p(u=this.visitTick(a)))return[3,12];_.label=9;case 9:return _.trys.push([9,11,,12]),[4,u];case 10:return _.sent(),[3,12];case 11:throw l=_.sent(),c=a[a.length-1].node,this.handleError(l,c);case 12:return[3,8];case 13:return[3,7];case 14:if(!this.listeners.OnceExit)return[3,22];d=!0,f=!1,h=void 0,_.label=15;case 15:_.trys.push([15,20,21,22]),y=function(){var t,n,r,i,o;return _ts_generator(this,function(a){switch(a.label){case 0:t=_sliced_to_array(b.value,2),n=t[0],r=t[1],v.result.lastPlugin=n,a.label=1;case 1:return a.trys.push([1,6,,7]),"document"!==s.type?[3,3]:(i=s.nodes.map(function(t){return r(t,e.helpers)}),[4,Promise.all(i)]);case 2:return a.sent(),[3,5];case 3:return[4,r(s,v.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw o=a.sent(),v.handleError(o);case 7:return[2]}})},m=this.listeners.OnceExit[Symbol.iterator](),_.label=16;case 16:return(d=(b=m.next()).done)?[3,19]:(v=this,[5,_ts_values(y())]);case 17:_.sent(),_.label=18;case 18:return d=!0,[3,16];case 19:return[3,22];case 20:return w=_.sent(),f=!0,h=w,[3,22];case 21:try{d||null==m.return||m.return()}finally{if(f)throw h}return[7];case 22:return this.processed=!0,[2,this.stringify()]}})}).call(this)}},{key:"runOnRoot",value:function(e){var t=this;this.result.lastPlugin=e;try{if("object"===(void 0===e?"undefined":_type_of(e))&&e.Once){if("document"===this.result.root.type){var n=this.result.root.nodes.map(function(n){return e.Once(n,t.helpers)});return p(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}},{key:"stringify",value:function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=i;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new r(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();var e=!0,n=!1,r=void 0;try{for(var i,o=this.plugins[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var s=i.value;if(p(this.runOnRoot(s)))throw this.getAsyncError()}}catch(e){n=!0,r=e}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}if(this.prepareVisitors(),this.hasListener){for(var a=this.result.root;!a[t];)a[t]=!0,this.walkSync(a);if(this.listeners.OnceExit)if("document"===a.type){var u=!0,l=!1,c=void 0;try{for(var d,f=a.nodes[Symbol.iterator]();!(u=(d=f.next()).done);u=!0){var h=d.value;this.visitSync(this.listeners.OnceExit,h)}}catch(e){l=!0,c=e}finally{try{u||null==f.return||f.return()}finally{if(l)throw c}}}else this.visitSync(this.listeners.OnceExit,a)}return this.result}},{key:"then",value:function(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||a("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=_sliced_to_array(o.value,2),u=a[0],l=a[1];this.result.lastPlugin=u;var c=void 0;try{c=l(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(p(c))throw this.getAsyncError()}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"visitTick",value:function(e){var n=e[e.length-1],r=n.node,i=n.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&n.visitorIndex<i.length){var o=_sliced_to_array(i[n.visitorIndex],2),s=o[0],a=o[1];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==n.iterator){for(var u,l=n.iterator;u=r.nodes[r.indexes[l]];)if(r.indexes[l]+=1,!u[t])return u[t]=!0,void e.push(g(u));n.iterator=0,delete r.indexes[l]}for(var c=n.events;n.eventIndex<c.length;){var d=c[n.eventIndex];if(n.eventIndex+=1,0===d)return void(r.nodes&&r.nodes.length&&(r[t]=!0,n.iterator=r.getIterator()));if(this.listeners[d])return void(n.visitors=this.listeners[d])}e.pop()}else e.pop()}},{key:"walkSync",value:function(e){var n=this;e[t]=!0;var r=v(e),i=!0,o=!1,s=void 0;try{for(var a,u=r[Symbol.iterator]();!(i=(a=u.next()).done);i=!0){var l=a.value;if(0===l)e.nodes&&e.each(function(e){e[t]||n.walkSync(e)});else{var c=this.listeners[l];if(c&&this.visitSync(c,e.toProxy()))return}}}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}}},{key:"warnings",value:function(){return this.sync().warnings()}},{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e}();return b.registerPostcss=function(e){m=e},Nh=b,b.default=b,c.registerLazyResult(b),s.registerLazyResult(b),Nh},ar=function(){if(Fh)return Uh;Fh=1;var e=function(){if(jh)return Dh;jh=1;var e=Gn(),t=zn(),n=Xn(),r=or(),i=Zn(),o=function(){function o(n,r,s){var a;_class_call_check(this,o),r=r.toString(),this.stringified=!1,this._processor=n,this._css=r,this._opts=s,this._map=void 0;var u=t;this.result=new i(this._processor,a,this._opts),this.result.css=r;var l=this;Object.defineProperty(this.result,"root",{get:function(){return l.root}});var c=new e(u,a,this._opts,r);if(c.isMap()){var d=_sliced_to_array(c.generate(),2),f=d[0],h=d[1];f&&(this.result.css=f),h&&(this.result.map=h)}else c.clearAnnotation(),this.result.css=c.css}return _create_class(o,[{key:"async",value:function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}},{key:"catch",value:function(e){return this.async().catch(e)}},{key:"finally",value:function(e){return this.async().then(e,e)}},{key:"sync",value:function(){if(this.error)throw this.error;return this.result}},{key:"then",value:function(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}},{key:"toString",value:function(){return this._css}},{key:"warnings",value:function(){return[]}},{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),o}();return Dh=o,o.default=o,Dh}(),t=sr(),n=Qn(),r=tr(),i=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];_class_call_check(this,n),this.version="8.4.38",this.plugins=this.normalize(e)}return _create_class(n,[{key:"normalize",value:function(e){var t=[],n=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;if(!0===a.postcss?a=a():a.postcss&&(a=a.postcss),"object"===(void 0===a?"undefined":_type_of(a))&&Array.isArray(a.plugins))t=t.concat(a.plugins);else if("object"===(void 0===a?"undefined":_type_of(a))&&a.postcssPlugin)t.push(a);else if("function"==typeof a)t.push(a);else{if("object"!==(void 0===a?"undefined":_type_of(a))||!a.parse&&!a.stringify)throw new Error(a+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}return t}},{key:"process",value:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.plugins.length||r.parser||r.stringifier||r.syntax?new t(this,n,r):new e(this,n,r)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),n}();return Uh=i,i.default=i,r.registerProcessor(i),n.registerProcessor(i),Uh},ur=function(){if(Wh)return zh;Wh=1;var e=Fn(),t=Vn(),n=sr(),r=$n(),i=ar(),o=zn(),s=function(){if(qh)return Bh;qh=1;var e=Vn(),t=Hn(),n=Jn(),r=er(),i=Kn(),o=tr(),s=rr();function a(u,l){if(Array.isArray(u))return u.map(function(e){return a(e)});var c=u.inputs,d=_object_without_properties(u,["inputs"]);if(c){l=[];var f=!0,h=!1,p=void 0;try{for(var v,g=c[Symbol.iterator]();!(f=(v=g.next()).done);f=!0){var y=_object_spread_props(_object_spread({},v.value),{__proto__:i.prototype});y.map&&(y.map=_object_spread_props(_object_spread({},y.map),{__proto__:t.prototype})),l.push(y)}}catch(e){h=!0,p=e}finally{try{f||null==g.return||g.return()}finally{if(h)throw p}}}if(d.nodes&&(d.nodes=u.nodes.map(function(e){return a(e,l)})),d.source){var m=d.source,b=m.inputId,w=_object_without_properties(m,["inputId"]);d.source=w,null!=b&&(d.source.input=l[b])}if("root"===d.type)return new o(d);if("decl"===d.type)return new e(d);if("rule"===d.type)return new s(d);if("comment"===d.type)return new n(d);if("atrule"===d.type)return new r(d);throw new Error("Unknown node type: "+u.type)}return Bh=a,a.default=a,Bh}(),a=Qn(),u=Yn(),l=Jn(),c=er(),d=Zn(),f=Kn(),h=or(),p=nr(),v=rr(),g=tr(),y=Wn();function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new i(t)}return m.plugin=function(e,t){var n,r=!1;function o(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var a=t.apply(void 0,_to_consumable_array(o));return a.postcssPlugin=e,a.postcssVersion=(new i).version,a}return Object.defineProperty(o,"postcss",{get:function(){return n||(n=o()),n}}),o.process=function(e,t,n){return m([o(n)]).process(e,t)},o},m.stringify=o,m.parse=h,m.fromJSON=s,m.list=p,m.comment=function(e){return new l(e)},m.atRule=function(e){return new c(e)},m.decl=function(e){return new t(e)},m.rule=function(e){return new v(e)},m.root=function(e){return new g(e)},m.document=function(e){return new a(e)},m.CssSyntaxError=e,m.Declaration=t,m.Container=r,m.Processor=i,m.Document=a,m.Comment=l,m.Warning=u,m.AtRule=c,m.Result=d,m.Input=f,m.Rule=v,m.Root=g,m.Node=y,n.registerPostcss(m),zh=m,m.default=m,zh},lr=function(){if(tp)return ep;tp=1;var e=function(){if(Qh)return $h.exports;Qh=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return $h.exports=t(),$h.exports.createColors=t,$h.exports}(),t=Zh,n=function(){function n(e,t,r,i,o,s){var a;return _class_call_check(this,n),(a=_call_super(this,n,[e])).name="CssSyntaxError",a.reason=e,o&&(a.file=o),i&&(a.source=i),s&&(a.plugin=s),void 0!==t&&void 0!==r&&("number"==typeof t?(a.line=t,a.column=r):(a.line=t.line,a.column=t.column,a.endLine=r.line,a.endColumn=r.column)),a.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(a,n),a}return _inherits(n,_wrap_native_super(Error)),_create_class(n,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(n){var r=this;if(!this.source)return"";var i=this.source;null==n&&(n=e.isColorSupported),t&&n&&(i=t(i));var o,s,a=i.split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),c=String(l).length;if(n){var d=e.createColors(!0),f=d.bold,h=d.gray,p=d.red;o=function(e){return f(p(e))},s=function(e){return h(e)}}else o=s=function(e){return e};return a.slice(u,l).map(function(e,t){var n=u+1+t,i=" "+(" "+n).slice(-c)+" | ";if(n===r.line){var a=s(i.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," ");return o(">")+s(i)+e+"\n "+a+o("^")}return" "+s(i)+e}).join("\n")}},{key:"toString",value:function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}]),n}();return ep=n,n.default=n,ep},cr=function(){return rp||(rp=1,np.isClean=Symbol("isClean"),np.my=Symbol("my")),np},dr=function(){if(op)return ip;op=1;var e={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var t=function(){function t(e){_class_call_check(this,t),this.builder=e}return _create_class(t,[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{var i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}}},{key:"beforeAfter",value:function(e,t){var n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var s=0;s<i;s++)n+=o}return n}},{key:"block",value:function(e,t){var n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}},{key:"body",value:function(e){for(var t=e.nodes.length-1;t>0&&"comment"===e.nodes[t].type;)t-=1;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}},{key:"comment",value:function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}},{key:"decl",value:function(e,t){var n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}},{key:"document",value:function(e){this.body(e)}},{key:"raw",value:function(t,n,r){var i;if(r||(r=n),n&&void 0!==(i=t.raws[n]))return i;var o=t.parent;if("before"===r){if(!o||"root"===o.type&&o.first===t)return"";if(o&&"document"===o.type)return""}if(!o)return e[r];var s=t.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[r])return s.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var a,u="raw"+((a=r)[0].toUpperCase()+a.slice(1));return this[u]?i=this[u](s,t):s.walk(function(e){if(void 0!==(i=e.raws[n]))return!1}),void 0===i&&(i=e[r]),s.rawCache[r]=i,i}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}},{key:"rawBeforeComment",value:function(e,t){var n;return e.walkComments(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}},{key:"rawBeforeDecl",value:function(e,t){var n;return e.walkDecls(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}},{key:"rawBeforeOpen",value:function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}},{key:"rawBeforeRule",value:function(e){var t;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return(t=n.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}},{key:"rawColon",value:function(e){var t;return e.walkDecls(function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}},{key:"rawEmptyBody",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}},{key:"rawIndent",value:function(e){return e.raws.indent?e.raws.indent:(e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){var i=n.raws.before.split("\n");return t=(t=i[i.length-1]).replace(/\S/g,""),!1}}),t);var t}},{key:"rawSemicolon",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}},{key:"rawValue",value:function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}},{key:"root",value:function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}},{key:"rule",value:function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}},{key:"stringify",value:function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}]),t}();return ip=t,t.default=t,ip},fr=function(){if(ap)return sp;ap=1;var e=dr();function t(t,n){new e(n).stringify(t)}return sp=t,t.default=t,sp},hr=function(){if(lp)return up;lp=1;var e=cr(),t=e.isClean,n=e.my,r=lr(),i=dr(),o=fr();function s(e,t){var n=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){var i=e[r],o=void 0===i?"undefined":_type_of(i);"parent"===r&&"object"===o?t&&(n[r]=t):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map(function(e){return s(e,n)}):("object"===o&&null!==i&&(i=s(i)),n[r]=i)}return n}var a=function(){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var i in _class_call_check(this,e),this.raws={},this[t]=!1,this[n]=!0,r)if("nodes"===i){this.nodes=[];var o=!0,s=!1,a=void 0;try{for(var u,l=r[i][Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;"function"==typeof c.clone?this.append(c.clone()):this.append(c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}}else this[i]=r[i]}return _create_class(e,[{key:"addToError",value:function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))}return e}},{key:"after",value:function(e){return this.parent.insertAfter(this,e),this}},{key:"assign",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e)this[t]=e[t];return this}},{key:"before",value:function(e){return this.parent.insertBefore(this,e),this}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=s(this);for(var n in e)t[n]=e[n];return t}},{key:"cloneAfter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertAfter(this,t),t}},{key:"cloneBefore",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertBefore(this,t),t}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.source){var n=this.rangeBy(t),i=n.end,o=n.start;return this.source.input.error(e,{column:o.column,line:o.line},{column:i.column,line:i.line},t)}return new r(e)}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0}}}},{key:"markDirty",value:function(){if(this[t]){this[t]=!1;for(var e=this;e=e.parent;)e[t]=!1}}},{key:"next",value:function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}}},{key:"positionBy",value:function(e,t){var n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){var r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n}},{key:"positionInside",value:function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?(r=1,i+=1):r+=1;return{column:r,line:i}}},{key:"prev",value:function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}}},{key:"rangeBy",value:function(e){var t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var r=this.toString(),i=r.indexOf(e.word);-1!==i&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}},{key:"raw",value:function(e,t){return(new i).raw(this,e,t)}},{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"replaceWith",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this.parent){var r=this,i=!1,o=!0,s=!1,a=void 0;try{for(var u,l=t[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;c===this?i=!0:i?(this.parent.insertAfter(r,c),r=c):this.parent.insertBefore(r,c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}i||this.remove()}return this}},{key:"root",value:function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}},{key:"toJSON",value:function(e,t){var n={},r=null==t;t=t||new Map;var i=0;for(var o in this)if(Object.prototype.hasOwnProperty.call(this,o)&&"parent"!==o&&"proxyCache"!==o){var s=this[o];if(Array.isArray(s))n[o]=s.map(function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&e.toJSON?e.toJSON(null,t):e});else if("object"===(void 0===s?"undefined":_type_of(s))&&s.toJSON)n[o]=s.toJSON(null,t);else if("source"===o){var a=t.get(s.input);null==a&&(a=i,t.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=_to_consumable_array(t.keys()).map(function(e){return e.toJSON()})),n}},{key:"toProxy",value:function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;e.stringify&&(e=e.stringify);var t="";return e(this,function(e){t+=e}),t}},{key:"warn",value:function(e,t,n){var r={node:this};for(var i in n)r[i]=n[i];return e.warn(t,r)}},{key:"proxyOf",get:function(){return this}}]),e}();return up=a,a.default=a,up},pr=function(){if(dp)return cp;dp=1;var e=function(e){function t(e){var n;return _class_call_check(this,t),e&&void 0!==e.value&&"string"!=typeof e.value&&(e=_object_spread_props(_object_spread({},e),{value:String(e.value)})),(n=_call_super(this,t,[e])).type="decl",n}return _inherits(t,e),_create_class(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),t}(hr());return cp=e,e.default=e,cp},vr=function(){if(vp)return pp;vp=1;var e=Zh.SourceMapConsumer,t=Zh.SourceMapGenerator,n=Zh.existsSync,r=Zh.readFileSync,i=Zh.dirname,o=Zh.join;var s=function(){function s(e,t){if(_class_call_check(this,s),!1!==t.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),r&&(this.text=r)}}return _create_class(s,[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}},{key:"decodeInline",value:function(e){var t;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}},{key:"getAnnotationURL",value:function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}},{key:"loadAnnotation",value:function(e){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(t){var n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}}},{key:"loadFile",value:function(e){if(this.root=i(e),n(e))return this.mapFile=e,r(e,"utf-8").toString().trim()}},{key:"loadMap",value:function(n,r){if(!1===r)return!1;if(r){if("string"==typeof r)return r;if("function"!=typeof r){if(_instanceof(r,e))return t.fromSourceMap(r).toString();if(_instanceof(r,t))return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}var s=r(n);if(s){var a=this.loadFile(s);if(!a)throw new Error("Unable to load previous source map: "+s.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var u=this.annotation;return n&&(u=o(i(n),u)),this.loadFile(u)}}}},{key:"startWith",value:function(e,t){return!!e&&e.substr(0,t.length)===t}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}]),s}();return pp=s,s.default=s,pp},gr=function(){if(yp)return gp;yp=1;var e=Zh.SourceMapConsumer,t=Zh.SourceMapGenerator,n=Zh.fileURLToPath,r=Zh.pathToFileURL,i=Zh.isAbsolute,o=Zh.resolve,s=(hp||(hp=1,fp={nanoid:function(){for(var e="",t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21;return function(){for(var n="",r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t;r--;)n+=e[Math.random()*e.length|0];return n}}}),fp).nanoid,a=Zh,u=lr(),l=vr(),c=Symbol("fromOffsetCache"),d=Boolean(e&&t),f=Boolean(o&&i),h=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_class_call_check(this,e),null==t||"object"===(void 0===t?"undefined":_type_of(t))&&!t.toString)throw new Error("PostCSS received ".concat(t," instead of CSS string"));if(this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!f||/^\w+:\/\//.test(n.from)||i(n.from)?this.file=n.from:this.file=o(n.from)),f&&d){var r=new l(this.css,n);if(r.text){this.map=r;var a=r.consumer().file;!this.file&&a&&(this.file=this.mapResolve(a))}}this.file||(this.id="<input css "+s(6)+">"),this.map&&(this.map.file=this.from)}return _create_class(e,[{key:"error",value:function(e,t,n){var i,o,s,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(t&&"object"===(void 0===t?"undefined":_type_of(t))){var l=t,c=n;if("number"==typeof l.offset){var d=this.fromOffset(l.offset);t=d.line,n=d.col}else t=l.line,n=l.column;if("number"==typeof c.offset){var f=this.fromOffset(c.offset);o=f.line,s=f.col}else o=c.line,s=c.column}else if(!n){var h=this.fromOffset(t);t=h.line,n=h.col}var p=this.origin(t,n,o,s);return(i=p?new u(e,void 0===p.endLine?p.line:{column:p.column,line:p.line},void 0===p.endLine?p.column:{column:p.endColumn,line:p.endLine},p.source,p.file,a.plugin):new u(e,void 0===o?t:{column:n,line:t},void 0===o?n:{column:s,line:o},this.css,this.file,a.plugin)).input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(r&&(i.input.url=r(this.file).toString()),i.input.file=this.file),i}},{key:"fromOffset",value:function(e){var t;if(this[c])t=this[c];else{var n=this.css.split("\n");t=new Array(n.length);for(var r=0,i=0,o=n.length;i<o;i++)t[i]=r,r+=n[i].length+1;this[c]=t}var s=0;if(e>=t[t.length-1])s=t.length-1;else for(var a,u=t.length-2;s<u;)if(e<t[a=s+(u-s>>1)])u=a-1;else{if(!(e>=t[a+1])){s=a;break}s=a+1}return{col:e-t[s]+1,line:s+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}},{key:"origin",value:function(e,t,o,s){if(!this.map)return!1;var a,u,l=this.map.consumer(),c=l.originalPositionFor({column:t,line:e});if(!c.source)return!1;"number"==typeof o&&(a=l.originalPositionFor({column:s,line:o})),u=i(c.source)?r(c.source):new URL(c.source,this.map.consumer().sourceRoot||r(this.map.mapFile));var d={column:c.column,endColumn:a&&a.column,endLine:a&&a.line,line:c.line,url:u.toString()};if("file:"===u.protocol){if(!n)throw new Error("file: protocol is not available in this PostCSS build");d.file=n(u)}var f=l.sourceContentFor(c.source);return f&&(d.source=f),d}},{key:"toJSON",value:function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=_object_spread({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}},{key:"from",get:function(){return this.file||this.id}}]),e}();return gp=h,h.default=h,a&&a.registerInput&&a.registerInput(h),gp},yr=function(){if(bp)return mp;bp=1;var e=Zh.SourceMapConsumer,t=Zh.SourceMapGenerator,n=Zh.dirname,r=Zh.relative,i=Zh.resolve,o=Zh.sep,s=Zh.pathToFileURL,a=gr(),u=Boolean(e&&t),l=Boolean(n&&i&&r&&o);return mp=function(){function c(e,t,n,r){_class_call_check(this,c),this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}return _create_class(c,[{key:"addAnnotation",value:function(){var e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}},{key:"applyPrevMaps",value:function(){var t=!0,r=!1,i=void 0;try{for(var o,s=this.previous()[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){var a=o.value,u=this.toUrl(this.path(a.file)),l=a.root||n(a.file),c=void 0;!1===this.mapOpts.sourcesContent?(c=new e(a.text)).sourcesContent&&(c.sourcesContent=null):c=a.consumer(),this.map.applySourceMap(c,u,this.toUrl(this.path(l)))}}catch(e){r=!0,i=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}},{key:"generate",value:function(){if(this.clearAnnotation(),l&&u&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]}},{key:"generateMap",value:function(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var e=this;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});var n,r,i=1,o=1,s="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(t,u,l){if(e.css+=t,u&&"end"!==l&&(a.generated.line=i,a.generated.column=o-1,u.source&&u.source.start?(a.source=e.sourcePath(u),a.original.line=u.source.start.line,a.original.column=u.source.start.column-1,e.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,e.map.addMapping(a))),(n=t.match(/\n/g))?(i+=n.length,r=t.lastIndexOf("\n"),o=t.length-r):o+=t.length,u&&"start"!==l){var c=u.parent||{raws:{}};("decl"===u.type||"atrule"===u.type&&!u.nodes)&&u===c.last&&!c.raws.semicolon||(u.source&&u.source.end?(a.source=e.sourcePath(u),a.original.line=u.source.end.line,a.original.column=u.source.end.column-1,a.generated.line=i,a.generated.column=o-2,e.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,a.generated.line=i,a.generated.column=o-1,e.map.addMapping(a)))}})}},{key:"isAnnotation",value:function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))}},{key:"isMap",value:function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}},{key:"isSourcesContent",value:function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var o=this.opts.to?n(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=n(i(o,this.mapOpts.annotation)));var s=r(o,e);return this.memoizedPaths.set(e,s),s}},{key:"previous",value:function(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;e.previousMaps.includes(n)||e.previousMaps.push(n)}});else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}},{key:"setSourcesContent",value:function(){var e=this,t={};if(this.root)this.root.walk(function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.usesFileUrls?e.toFileUrl(r):e.toUrl(e.path(r));e.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){var n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}},{key:"sourcePath",value:function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}},{key:"toBase64",value:function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}},{key:"toFileUrl",value:function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(s){var n=s(e).toString();return this.memoizedFileURLs.set(e,n),n}throw new Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));var n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}]),c}()},mr=function(){if(_p)return wp;_p=1;var e=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t,[e])).type="comment",n}return _inherits(t,e),t}(hr());return wp=e,e.default=e,wp},br=function(){if(kp)return Sp;kp=1;var e,t,n,r,i=cr(),o=i.isClean,s=i.my,a=pr(),u=mr();function l(e){return e.map(function(e){return e.nodes&&(e.nodes=l(e.nodes)),delete e.source,e})}function c(e){if(e[o]=!1,e.proxyOf.nodes){var t=!0,n=!1,r=void 0;try{for(var i,s=e.proxyOf.nodes[Symbol.iterator]();!(t=(i=s.next()).done);t=!0){c(i.value)}}catch(e){n=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(n)throw r}}}}var d=function(r){function i(){return _class_call_check(this,i),_call_super(this,i,arguments)}return _inherits(i,r),_create_class(i,[{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value,l=this.normalize(u,this.last),c=!0,d=!1,f=void 0;try{for(var h,p=l[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;this.proxyOf.nodes.push(v)}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if(_get(_get_prototype_of(i.prototype),"cleanRaws",this).call(this,e),this.nodes){var t=!0,n=!1,r=void 0;try{for(var o,s=this.nodes[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){o.value.cleanRaws(e)}}catch(e){n=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(n)throw r}}}}},{key:"each",value:function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"getIterator",value:function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o;return(o=e)[t].apply(o,_to_consumable_array(r.map(function(e){return"function"==typeof e?function(t,n){return e(t.toProxy(),n)}:e})))}:"every"===t||"some"===t?function(n){return e[t](function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return n.apply(void 0,[e.toProxy()].concat(_to_consumable_array(r)))})}:"root"===t?function(){return e.root().toProxy()}:"nodes"===t?e.nodes.map(function(e){return e.toProxy()}):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0}}}},{key:"index",value:function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}},{key:"insertAfter",value:function(e,t){var n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);var i,o=!0,s=!1,a=void 0;try{for(var u,l=r[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;this.proxyOf.nodes.splice(n+1,0,c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}for(var d in this.indexes)n<(i=this.indexes[d])&&(this.indexes[d]=i+r.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n=this.index(e),r=0===n&&"prepend",i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);var o,s=!0,a=!1,u=void 0;try{for(var l,c=i[Symbol.iterator]();!(s=(l=c.next()).done);s=!0){var d=l.value;this.proxyOf.nodes.splice(n,0,d)}}catch(e){a=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(a)throw u}}for(var f in this.indexes)n<=(o=this.indexes[f])&&(this.indexes[f]=o+i.length);return this.markDirty(),this}},{key:"normalize",value:function(r,d){var f=this;if("string"==typeof r)r=l(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r)){r=r.slice(0);var h=!0,p=!1,v=void 0;try{for(var g,y=r[Symbol.iterator]();!(h=(g=y.next()).done);h=!0){var m=g.value;m.parent&&m.parent.removeChild(m,"ignore")}}catch(e){p=!0,v=e}finally{try{h||null==y.return||y.return()}finally{if(p)throw v}}}else if("root"===r.type&&"document"!==this.type){r=r.nodes.slice(0);var b=!0,w=!1,_=void 0;try{for(var S,k=r[Symbol.iterator]();!(b=(S=k.next()).done);b=!0){var x=S.value;x.parent&&x.parent.removeChild(x,"ignore")}}catch(e){w=!0,_=e}finally{try{b||null==k.return||k.return()}finally{if(w)throw _}}}else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new a(r)]}else if(r.selector)r=[new t(r)];else if(r.name)r=[new n(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new u(r)]}var E=r.map(function(e){return e[s]||i.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[o]&&c(e),void 0===e.raws.before&&d&&void 0!==d.raws.before&&(e.raws.before=d.raws.before.replace(/\S/g,"")),e.parent=f.proxyOf,e});return E}},{key:"prepend",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.reverse();var r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value,l=this.normalize(u,this.first,"prepend").reverse(),c=!0,d=!1,f=void 0;try{for(var h,p=l[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;this.proxyOf.nodes.unshift(v)}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}for(var g in this.indexes)this.indexes[g]=this.indexes[g]+l.length}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return this.markDirty(),this}},{key:"push",value:function(e){return e.parent=this,this.proxyOf.nodes.push(e),this}},{key:"removeAll",value:function(){var e=!0,t=!1,n=void 0;try{for(var r,i=this.proxyOf.nodes[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){r.value.parent=void 0}}catch(e){t=!0,n=e}finally{try{e||null==i.return||i.return()}finally{if(t)throw n}}return this.proxyOf.nodes=[],this.markDirty(),this}},{key:"removeChild",value:function(e){var t;for(var n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}},{key:"replaceValues",value:function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"walk",value:function(e){return this.each(function(t,n){var r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}},{key:"walkAtRules",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("atrule"===e.type)return t(e,n)}))}},{key:"walkComments",value:function(e){return this.walk(function(t,n){if("comment"===t.type)return e(t,n)})}},{key:"walkDecls",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("decl"===e.type)return t(e,n)}))}},{key:"walkRules",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("rule"===e.type)return t(e,n)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),i}(hr());return d.registerParse=function(t){e=t},d.registerRule=function(e){t=e},d.registerAtRule=function(e){n=e},d.registerRoot=function(e){r=e},Sp=d,d.default=d,d.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,n.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,a.prototype):"comment"===e.type?Object.setPrototypeOf(e,u.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[s]=!0,e.nodes&&e.nodes.forEach(function(e){d.rebuild(e)})},Sp},wr=function(){if(Ep)return xp;Ep=1;var e,t,n=function(n){function r(e){var t;return _class_call_check(this,r),(t=_call_super(this,r,[_object_spread({type:"document"},e)])).nodes||(t.nodes=[]),t}return _inherits(r,n),_create_class(r,[{key:"toResult",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(new t,this,n).stringify()}}]),r}(br());return n.registerLazyResult=function(t){e=t},n.registerProcessor=function(e){t=e},xp=n,n.default=n,xp},_r=function(){if(Ip)return Cp;Ip=1;var e={};return Cp=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}},Sr=function(){if(Tp)return Op;Tp=1;var e=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_class_call_check(this,e),this.type="warning",this.text=t,n.node&&n.node.source){var r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in n)this[i]=n[i]}return _create_class(e,[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),e}();return Op=e,e.default=e,Op},kr=function(){if(Pp)return Ap;Pp=1;var e=Sr(),t=function(){function t(e,n,r){_class_call_check(this,t),this.processor=e,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}return _create_class(t,[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);var r=new e(t,n);return this.messages.push(r),r}},{key:"warnings",value:function(){return this.messages.filter(function(e){return"warning"===e.type})}},{key:"content",get:function(){return this.css}}]),t}();return Ap=t,t.default=t,Ap},xr=function(){if(Lp)return Np;Lp=1;var e=br(),t=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t,[e])).type="atrule",n}return _inherits(t,e),_create_class(t,[{key:"append",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=_get(_get_prototype_of(t.prototype),"append",this)).call.apply(i,[this].concat(_to_consumable_array(n)))}},{key:"prepend",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=_get(_get_prototype_of(t.prototype),"prepend",this)).call.apply(i,[this].concat(_to_consumable_array(n)))}}]),t}(e);return Np=t,t.default=t,e.registerAtRule(t),Np},Er=function(){if(jp)return Dp;jp=1;var e,t,n=br(),r=function(n){function r(e){var t;return _class_call_check(this,r),(t=_call_super(this,r,[e])).type="root",t.nodes||(t.nodes=[]),t}return _inherits(r,n),_create_class(r,[{key:"normalize",value:function(e,t,n){var i=_get(_get_prototype_of(r.prototype),"normalize",this).call(this,e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t){var o=!0,s=!1,a=void 0;try{for(var u,l=i[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){u.value.raws.before=t.raws.before}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}}return i}},{key:"removeChild",value:function(e,t){var n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),_get(_get_prototype_of(r.prototype),"removeChild",this).call(this,e)}},{key:"toResult",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(new t,this,n).stringify()}}]),r}(n);return r.registerLazyResult=function(t){e=t},r.registerProcessor=function(e){t=e},Dp=r,r.default=r,n.registerRoot(r),Dp},Cr=function(){if(Fp)return Up;Fp=1;var e={comma:function(t){return e.split(t,[","],!0)},space:function(t){return e.split(t,[" ","\n","\t"])},split:function(e,t,n){var r=[],i="",o=!1,s=0,a=!1,u="",l=!1,c=!0,d=!1,f=void 0;try{for(var h,p=e[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;l?l=!1:"\\"===v?l=!0:a?v===u&&(a=!1):'"'===v||"'"===v?(a=!0,u=v):"("===v?s+=1:")"===v?s>0&&(s-=1):0===s&&t.includes(v)&&(o=!0),o?(""!==i&&r.push(i.trim()),i="",o=!1):i+=v}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}return(n||""!==i)&&r.push(i.trim()),r}};return Up=e,e.default=e,Up},Ir=function(){if(qp)return Bp;qp=1;var e=br(),t=Cr(),n=function(e){function n(e){var t;return _class_call_check(this,n),(t=_call_super(this,n,[e])).type="rule",t.nodes||(t.nodes=[]),t}return _inherits(n,e),_create_class(n,[{key:"selectors",get:function(){return t.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}]),n}(e);return Bp=n,n.default=n,e.registerRule(n),Bp},Or=function(){if(Wp)return zp;Wp=1;var e=pr(),t=function(){if(Mp)return Rp;Mp=1;var e="'".charCodeAt(0),t='"'.charCodeAt(0),n="\\".charCodeAt(0),r="/".charCodeAt(0),i="\n".charCodeAt(0),o=" ".charCodeAt(0),s="\f".charCodeAt(0),a="\t".charCodeAt(0),u="\r".charCodeAt(0),l="[".charCodeAt(0),c="]".charCodeAt(0),d="(".charCodeAt(0),f=")".charCodeAt(0),h="{".charCodeAt(0),p="}".charCodeAt(0),v=";".charCodeAt(0),g="*".charCodeAt(0),y=":".charCodeAt(0),m="@".charCodeAt(0),b=/[\t\n\f\r "#'()/;[\\\]{}]/g,w=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return Rp=function(k){var x,E,C,I,O,T,A,P,R,M,N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},L=k.css.valueOf(),D=N.ignoreErrors,j=L.length,U=0,F=[],B=[];function q(e){throw k.error("Unclosed "+e,U)}return{back:function(e){B.push(e)},endOfFile:function(){return 0===B.length&&U>=j},nextToken:function(k){if(B.length)return B.pop();if(!(U>=j)){var N=!!k&&k.ignoreUnclosed;switch(x=L.charCodeAt(U)){case i:case o:case a:case u:case s:E=U;do{E+=1,x=L.charCodeAt(E)}while(x===o||x===i||x===a||x===u||x===s);M=["space",L.slice(U,E)],U=E-1;break;case l:case c:case h:case p:case y:case v:case f:var z=String.fromCharCode(x);M=[z,z,U];break;case d:if(P=F.length?F.pop()[1]:"",R=L.charCodeAt(U+1),"url"===P&&R!==e&&R!==t&&R!==o&&R!==i&&R!==a&&R!==s&&R!==u){E=U;do{if(T=!1,-1===(E=L.indexOf(")",E+1))){if(D||N){E=U;break}q("bracket")}for(A=E;L.charCodeAt(A-1)===n;)A-=1,T=!T}while(T);M=["brackets",L.slice(U,E+1),U,E],U=E}else E=L.indexOf(")",U+1),I=L.slice(U,E+1),-1===E||_.test(I)?M=["(","(",U]:(M=["brackets",I,U,E],U=E);break;case e:case t:C=x===e?"'":'"',E=U;do{if(T=!1,-1===(E=L.indexOf(C,E+1))){if(D||N){E=U+1;break}q("string")}for(A=E;L.charCodeAt(A-1)===n;)A-=1,T=!T}while(T);M=["string",L.slice(U,E+1),U,E],U=E;break;case m:b.lastIndex=U+1,b.test(L),E=0===b.lastIndex?L.length-1:b.lastIndex-2,M=["at-word",L.slice(U,E+1),U,E],U=E;break;case n:for(E=U,O=!0;L.charCodeAt(E+1)===n;)E+=1,O=!O;if(x=L.charCodeAt(E+1),O&&x!==r&&x!==o&&x!==i&&x!==a&&x!==u&&x!==s&&(E+=1,S.test(L.charAt(E)))){for(;S.test(L.charAt(E+1));)E+=1;L.charCodeAt(E+1)===o&&(E+=1)}M=["word",L.slice(U,E+1),U,E],U=E;break;default:x===r&&L.charCodeAt(U+1)===g?(0===(E=L.indexOf("*/",U+2)+1)&&(D||N?E=L.length:q("comment")),M=["comment",L.slice(U,E+1),U,E],U=E):(w.lastIndex=U+1,w.test(L),E=0===w.lastIndex?L.length-1:w.lastIndex-2,M=["word",L.slice(U,E+1),U,E],F.push(M),U=E)}return U++,M}},position:function(){return U}}},Rp}(),n=mr(),r=xr(),i=Er(),o=Ir(),s={empty:!0,space:!0};return zp=function(){function a(e){_class_call_check(this,a),this.input=e,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}return _create_class(a,[{key:"atrule",value:function(e){var t,n,i,o=new r;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);for(var s=!1,a=!1,u=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(u.length>0){for(n=u[i=u.length-1];n&&"space"===n[0];)n=u[--i];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(e);break}u.push(e)}else u.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(o.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(o,"params",u),s&&(e=u[u.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}},{key:"checkMissedSemicolon",value:function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;i>=0&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},{key:"colon",value:function(e){var t,n,r,i=0,o=!0,s=!1,a=void 0;try{for(var u,l=e.entries()[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=_sliced_to_array(u.value,2),d=c[0];if("("===(n=(t=c[1])[0])&&(i+=1),")"===n&&(i-=1),0===i&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return d}this.doubleColon(t)}r=t}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}return!1}},{key:"comment",value:function(e){var t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{var i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}},{key:"createTokenizer",value:function(){this.tokenizer=t(this.input)}},{key:"decl",value:function(t,n){var r=new e;this.init(r,t[0][2]);var i,o=t[t.length-1];for(";"===o[0]&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(o[3]||o[2]||function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=n[3]||n[2];if(r)return r}}(t)),r.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){var s=t[0][0];if(":"===s||"space"===s||"comment"===s)break;r.prop+=t.shift()[1]}for(r.raws.between="";t.length;){if(":"===(i=t.shift())[0]){r.raws.between+=i[1];break}"word"===i[0]&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));for(var a,u=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)u.push(t.shift());this.precheckMissedSemicolon(t);for(var l=t.length-1;l>=0;l--){if("!important"===(i=t[l])[1].toLowerCase()){r.important=!0;var c=this.stringFrom(t,l);" !important"!==(c=this.spacesFromEnd(t)+c)&&(r.raws.important=c);break}if("important"===i[1].toLowerCase()){for(var d=t.slice(0),f="",h=l;h>0;h--){var p=d[h][0];if(0===f.trim().indexOf("!")&&"space"!==p)break;f=d.pop()[1]+f}0===f.trim().indexOf("!")&&(r.important=!0,r.raws.important=f,t=d)}if("space"!==i[0]&&"comment"!==i[0])break}var v=t.some(function(e){return"space"!==e[0]&&"comment"!==e[0]});v&&(r.raws.between+=u.map(function(e){return e[1]}).join(""),u=[]),this.raw(r,"value",u.concat(t),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}},{key:"doubleColon",value:function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}},{key:"emptyRule",value:function(e){var t=new o;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}},{key:"end",value:function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}},{key:"getPosition",value:function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}},{key:"init",value:function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}},{key:"other",value:function(e){for(var t=!1,n=null,r=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],u=e;u;){if(n=u[0],a.push(u),"("===n||"["===n)i||(i=u),o.push("("===n?")":"]");else if(s&&r&&"{"===n)i||(i=u),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(a,s);break}if("{"===n)return void this.rule(a);if("}"===n){this.tokenizer.back(a.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!s)for(;a.length&&("space"===(u=a[a.length-1][0])||"comment"===u);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}},{key:"parse",value:function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(e,t,n,r){for(var i,o,a,u,l=n.length,c="",d=!0,f=0;f<l;f+=1)"space"!==(o=(i=n[f])[0])||f!==l-1||r?"comment"===o?(u=n[f-1]?n[f-1][0]:"empty",a=n[f+1]?n[f+1][0]:"empty",s[u]||s[a]||","===c.slice(-1)?d=!1:c+=i[1]):c+=i[1]:d=!1;if(!d){var h=n.reduce(function(e,t){return e+t[1]},"");e.raws[t]={raw:h,value:c}}e[t]=c}},{key:"rule",value:function(e){e.pop();var t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}},{key:"spacesAndCommentsFromEnd",value:function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}},{key:"spacesAndCommentsFromStart",value:function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}},{key:"spacesFromEnd",value:function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}},{key:"stringFrom",value:function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}},{key:"unclosedBlock",value:function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}},{key:"unclosedBracket",value:function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}},{key:"unexpectedClose",value:function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}},{key:"unknownWord",value:function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}},{key:"unnamedAtrule",value:function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}]),a}()},Tr=function(){if(Hp)return Vp;Hp=1;var e=br(),t=Or(),n=gr();function r(e,r){var i=new n(e,r),o=new t(i);try{o.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&r&&r.from&&(/\.scss$/i.test(r.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(r.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(r.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return o.root}return Vp=r,r.default=r,e.registerParse(r),Vp},Ar=function(){if(Gp)return Kp;Gp=1;var e=cr(),t=e.isClean,n=e.my,r=yr(),i=fr(),o=br(),s=wr(),a=_r(),u=kr(),l=Tr(),c=Er(),d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0};function p(e){return"object"===(void 0===e?"undefined":_type_of(e))&&"function"==typeof e.then}function v(e){var t=!1,n=d[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function g(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:v(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function y(e){return e[t]=!1,e.nodes&&e.nodes.forEach(function(e){return y(e)}),e}var m={},b=function(){function e(t,r,i){var s,a=this;if(_class_call_check(this,e),this.stringified=!1,this.processed=!1,"object"!==(void 0===r?"undefined":_type_of(r))||null===r||"root"!==r.type&&"document"!==r.type)if(_instanceof(r,e)||_instanceof(r,u))s=y(r.root),r.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=r.map);else{var c=l;i.syntax&&(c=i.syntax.parse),i.parser&&(c=i.parser),c.parse&&(c=c.parse);try{s=c(r,i)}catch(e){this.processed=!0,this.error=e}s&&!s[n]&&o.rebuild(s)}else s=y(r);this.result=new u(t,s,i),this.helpers=_object_spread_props(_object_spread({},m),{postcss:m,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&e.prepare?_object_spread({},e,e.prepare(a.result)):e})}return _create_class(e,[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(e){return this.async().catch(e)}},{key:"finally",value:function(e){return this.async().then(e,e)}},{key:"getAsyncError",value:function(){throw new Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(e,t){var n=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(n.postcssVersion&&"production"!==process.env.NODE_ENV){var r=n.postcssPlugin,i=n.postcssVersion,o=this.result.processor.version,s=i.split("."),a=o.split(".");(s[0]!==a[0]||parseInt(s[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+r+" uses "+i+". Perhaps this is the source of the error below.")}}else e.plugin=n.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}},{key:"prepareVisitors",value:function(){var e=this;this.listeners={};var t=function(t,n,r){e.listeners[n]||(e.listeners[n]=[]),e.listeners[n].push([t,r])},n=!0,r=!1,i=void 0;try{for(var o,s=this.plugins[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;if("object"===(void 0===a?"undefined":_type_of(a)))for(var u in a){if(!f[u]&&/^[A-Z]/.test(u))throw new Error("Unknown event ".concat(u," in ").concat(a.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!h[u])if("object"===_type_of(a[u]))for(var l in a[u])t(a,"*"===l?u:u+"-"+l.toLowerCase(),a[u][l]);else"function"==typeof a[u]&&t(a,u,a[u])}}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}this.hasListener=Object.keys(this.listeners).length>0}},{key:"runAsync",value:function(){return _async_to_generator(function(){var e,n,r,i,o,s,a,u,l,c,d,f,h,v,y,m,b,w;return _ts_generator(this,function(_){switch(_.label){case 0:e=this,this.plugin=0,n=0,_.label=1;case 1:if(!(n<this.plugins.length))return[3,6];if(r=this.plugins[n],!p(i=this.runOnRoot(r)))return[3,5];_.label=2;case 2:return _.trys.push([2,4,,5]),[4,i];case 3:return _.sent(),[3,5];case 4:throw o=_.sent(),this.handleError(o);case 5:return n++,[3,1];case 6:if(this.prepareVisitors(),!this.hasListener)return[3,22];s=this.result.root,_.label=7;case 7:if(s[t])return[3,14];s[t]=!0,a=[g(s)],_.label=8;case 8:if(!(a.length>0))return[3,13];if(!p(u=this.visitTick(a)))return[3,12];_.label=9;case 9:return _.trys.push([9,11,,12]),[4,u];case 10:return _.sent(),[3,12];case 11:throw l=_.sent(),c=a[a.length-1].node,this.handleError(l,c);case 12:return[3,8];case 13:return[3,7];case 14:if(!this.listeners.OnceExit)return[3,22];d=!0,f=!1,h=void 0,_.label=15;case 15:_.trys.push([15,20,21,22]),y=function(){var t,n,r,i,o;return _ts_generator(this,function(a){switch(a.label){case 0:t=_sliced_to_array(b.value,2),n=t[0],r=t[1],v.result.lastPlugin=n,a.label=1;case 1:return a.trys.push([1,6,,7]),"document"!==s.type?[3,3]:(i=s.nodes.map(function(t){return r(t,e.helpers)}),[4,Promise.all(i)]);case 2:return a.sent(),[3,5];case 3:return[4,r(s,v.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw o=a.sent(),v.handleError(o);case 7:return[2]}})},m=this.listeners.OnceExit[Symbol.iterator](),_.label=16;case 16:return(d=(b=m.next()).done)?[3,19]:(v=this,[5,_ts_values(y())]);case 17:_.sent(),_.label=18;case 18:return d=!0,[3,16];case 19:return[3,22];case 20:return w=_.sent(),f=!0,h=w,[3,22];case 21:try{d||null==m.return||m.return()}finally{if(f)throw h}return[7];case 22:return this.processed=!0,[2,this.stringify()]}})}).call(this)}},{key:"runOnRoot",value:function(e){var t=this;this.result.lastPlugin=e;try{if("object"===(void 0===e?"undefined":_type_of(e))&&e.Once){if("document"===this.result.root.type){var n=this.result.root.nodes.map(function(n){return e.Once(n,t.helpers)});return p(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}},{key:"stringify",value:function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=i;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new r(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();var e=!0,n=!1,r=void 0;try{for(var i,o=this.plugins[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var s=i.value;if(p(this.runOnRoot(s)))throw this.getAsyncError()}}catch(e){n=!0,r=e}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}if(this.prepareVisitors(),this.hasListener){for(var a=this.result.root;!a[t];)a[t]=!0,this.walkSync(a);if(this.listeners.OnceExit)if("document"===a.type){var u=!0,l=!1,c=void 0;try{for(var d,f=a.nodes[Symbol.iterator]();!(u=(d=f.next()).done);u=!0){var h=d.value;this.visitSync(this.listeners.OnceExit,h)}}catch(e){l=!0,c=e}finally{try{u||null==f.return||f.return()}finally{if(l)throw c}}}else this.visitSync(this.listeners.OnceExit,a)}return this.result}},{key:"then",value:function(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||a("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=_sliced_to_array(o.value,2),u=a[0],l=a[1];this.result.lastPlugin=u;var c=void 0;try{c=l(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(p(c))throw this.getAsyncError()}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"visitTick",value:function(e){var n=e[e.length-1],r=n.node,i=n.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&n.visitorIndex<i.length){var o=_sliced_to_array(i[n.visitorIndex],2),s=o[0],a=o[1];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==n.iterator){for(var u,l=n.iterator;u=r.nodes[r.indexes[l]];)if(r.indexes[l]+=1,!u[t])return u[t]=!0,void e.push(g(u));n.iterator=0,delete r.indexes[l]}for(var c=n.events;n.eventIndex<c.length;){var d=c[n.eventIndex];if(n.eventIndex+=1,0===d)return void(r.nodes&&r.nodes.length&&(r[t]=!0,n.iterator=r.getIterator()));if(this.listeners[d])return void(n.visitors=this.listeners[d])}e.pop()}else e.pop()}},{key:"walkSync",value:function(e){var n=this;e[t]=!0;var r=v(e),i=!0,o=!1,s=void 0;try{for(var a,u=r[Symbol.iterator]();!(i=(a=u.next()).done);i=!0){var l=a.value;if(0===l)e.nodes&&e.each(function(e){e[t]||n.walkSync(e)});else{var c=this.listeners[l];if(c&&this.visitSync(c,e.toProxy()))return}}}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}}},{key:"warnings",value:function(){return this.sync().warnings()}},{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e}();return b.registerPostcss=function(e){m=e},Kp=b,b.default=b,c.registerLazyResult(b),s.registerLazyResult(b),Kp},Pr=function(){if(Xp)return Qp;Xp=1;var e=function(){if($p)return Jp;$p=1;var e=yr(),t=fr(),n=_r(),r=Tr(),i=kr(),o=function(){function o(n,r,s){var a;_class_call_check(this,o),r=r.toString(),this.stringified=!1,this._processor=n,this._css=r,this._opts=s,this._map=void 0;var u=t;this.result=new i(this._processor,a,this._opts),this.result.css=r;var l=this;Object.defineProperty(this.result,"root",{get:function(){return l.root}});var c=new e(u,a,this._opts,r);if(c.isMap()){var d=_sliced_to_array(c.generate(),2),f=d[0],h=d[1];f&&(this.result.css=f),h&&(this.result.map=h)}else c.clearAnnotation(),this.result.css=c.css}return _create_class(o,[{key:"async",value:function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}},{key:"catch",value:function(e){return this.async().catch(e)}},{key:"finally",value:function(e){return this.async().then(e,e)}},{key:"sync",value:function(){if(this.error)throw this.error;return this.result}},{key:"then",value:function(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}},{key:"toString",value:function(){return this._css}},{key:"warnings",value:function(){return[]}},{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),o}();return Jp=o,o.default=o,Jp}(),t=Ar(),n=wr(),r=Er(),i=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];_class_call_check(this,n),this.version="8.4.38",this.plugins=this.normalize(e)}return _create_class(n,[{key:"normalize",value:function(e){var t=[],n=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;if(!0===a.postcss?a=a():a.postcss&&(a=a.postcss),"object"===(void 0===a?"undefined":_type_of(a))&&Array.isArray(a.plugins))t=t.concat(a.plugins);else if("object"===(void 0===a?"undefined":_type_of(a))&&a.postcssPlugin)t.push(a);else if("function"==typeof a)t.push(a);else{if("object"!==(void 0===a?"undefined":_type_of(a))||!a.parse&&!a.stringify)throw new Error(a+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}return t}},{key:"process",value:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.plugins.length||r.parser||r.stringifier||r.syntax?new t(this,n,r):new e(this,n,r)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),n}();return Qp=i,i.default=i,r.registerProcessor(i),n.registerProcessor(i),Qp},Rr=function(){if(tv)return ev;tv=1;var e=lr(),t=pr(),n=Ar(),r=br(),i=Pr(),o=fr(),s=function(){if(Zp)return Yp;Zp=1;var e=pr(),t=vr(),n=mr(),r=xr(),i=gr(),o=Er(),s=Ir();function a(u,l){if(Array.isArray(u))return u.map(function(e){return a(e)});var c=u.inputs,d=_object_without_properties(u,["inputs"]);if(c){l=[];var f=!0,h=!1,p=void 0;try{for(var v,g=c[Symbol.iterator]();!(f=(v=g.next()).done);f=!0){var y=_object_spread_props(_object_spread({},v.value),{__proto__:i.prototype});y.map&&(y.map=_object_spread_props(_object_spread({},y.map),{__proto__:t.prototype})),l.push(y)}}catch(e){h=!0,p=e}finally{try{f||null==g.return||g.return()}finally{if(h)throw p}}}if(d.nodes&&(d.nodes=u.nodes.map(function(e){return a(e,l)})),d.source){var m=d.source,b=m.inputId,w=_object_without_properties(m,["inputId"]);d.source=w,null!=b&&(d.source.input=l[b])}if("root"===d.type)return new o(d);if("decl"===d.type)return new e(d);if("rule"===d.type)return new s(d);if("comment"===d.type)return new n(d);if("atrule"===d.type)return new r(d);throw new Error("Unknown node type: "+u.type)}return Yp=a,a.default=a,Yp}(),a=wr(),u=Sr(),l=mr(),c=xr(),d=kr(),f=gr(),h=Tr(),p=Cr(),v=Ir(),g=Er(),y=hr();function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new i(t)}return m.plugin=function(e,t){var n,r=!1;function o(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var a=t.apply(void 0,_to_consumable_array(o));return a.postcssPlugin=e,a.postcssVersion=(new i).version,a}return Object.defineProperty(o,"postcss",{get:function(){return n||(n=o()),n}}),o.process=function(e,t,n){return m([o(n)]).process(e,t)},o},m.stringify=o,m.parse=h,m.fromJSON=s,m.list=p,m.comment=function(e){return new l(e)},m.atRule=function(e){return new c(e)},m.decl=function(e){return new t(e)},m.rule=function(e){return new v(e)},m.root=function(e){return new g(e)},m.document=function(e){return new a(e)},m.CssSyntaxError=e,m.Declaration=t,m.Container=r,m.Processor=i,m.Document=a,m.Comment=l,m.Warning=u,m.AtRule=c,m.Result=d,m.Input=f,m.Rule=v,m.Root=g,m.Node=y,n.registerPostcss(m),ev=m,m.default=m,ev},Mr=function(e){if(av[e])return av[e];var t=function(e){var t,n,r=null==(n=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:n.call(t,e);return r&&globalThis[r]?globalThis[r]:void 0}(e)||globalThis[e],n=t.prototype,r=e in ov?ov[e]:void 0,i=Boolean(r&&r.every(function(e){var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),o=e in sv?sv[e]:void 0,s=Boolean(o&&o.every(function(e){var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))}));if(i&&s)return av[e]=t.prototype,t.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var u=a.contentWindow;if(!u)return t.prototype;var l=u[e].prototype;return document.body.removeChild(a),l?av[e]=l:n}catch(e){return n}},Nr=function(e,t,n){var r,i="".concat(e,".").concat(String(n));if(uv[i])return uv[i].call(t);var o=Mr(e),s=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return s?(uv[i]=s,s.call(t)):t[n]},Lr=function(e,t,n){var r="".concat(e,".").concat(String(n));if(lv[r])return lv[r].bind(t);var i=Mr(e)[n];return"function"!=typeof i?t[n]:(lv[r]=i,i.bind(t))},Dr=function(e){return Nr("Node",e,"childNodes")},jr=function(e){return Nr("Node",e,"parentNode")},Ur=function(e){return Nr("Node",e,"parentElement")},Fr=function(e){return Nr("Node",e,"textContent")},Br=function(e,t){return Lr("Node",e,"contains")(t)},qr=function(e){return Lr("Node",e,"getRootNode")()},zr=function(e){return e&&"host"in e?Nr("ShadowRoot",e,"host"):null},Wr=function(e){return e.styleSheets},Vr=function(e){return e&&"shadowRoot"in e?Nr("Element",e,"shadowRoot"):null},Hr=function(e,t){return Nr("Element",e,"querySelector")(t)},Kr=function(e,t){return Nr("Element",e,"querySelectorAll")(t)},Gr=function(){return Mr("MutationObserver").constructor},Jr=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}},$r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=0;return function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];var u=Date.now();i||!1!==n.leading||(i=u);var l=t-(u-i),c=this;l<=0||l>t?(r&&(clearTimeout(r),r=null),i=u,e.apply(c,s)):r||!1===n.trailing||(r=setTimeout(function(){i=!1===n.leading?0:Date.now(),r=null,e.apply(c,s)},l))}},Qr=function(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch(e){return function(){}}},Xr=function(e){var t,n,r,i,o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=cv.parentElement(o.body))?void 0:t.scrollLeft)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(r=cv.parentElement(o.body))?void 0:r.scrollTop)||(null==(i=null==o?void 0:o.body)?void 0:i.scrollTop)||0}},Yr=function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},Zr=function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},ei=function(e){return e?e.nodeType===e.ELEMENT_NODE?e:cv.parentElement(e):null},ti=function(e,t,n,r){if(!e)return!1;var i=ei(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t))return!0;if(r&&null!==i.closest("."+t))return!0}else if(Tv(i,t,r))return!0}catch(e){}if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1},ni=function(e,t){return-1!==t.getId(e)},ri=function(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||t.getId(e)===Df},ii=function(e){return Boolean(e.changedTouches)},oi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)},si=function(e){var t={},n=function(e,n){var r={value:e,parent:n,children:[]};return t[e.node.id]=r,r},r=[],i=!0,o=!1,s=void 0;try{for(var a,u=e[Symbol.iterator]();!(i=(a=u.next()).done);i=!0){var l=a.value,c=l.nextId,d=l.parentId;if(c&&c in t){var f=t[c];if(f.parent){var h=f.parent.children.indexOf(f);f.parent.children.splice(h,0,n(l,f.parent))}else{var p=r.indexOf(f);r.splice(p,0,n(l,null))}}else if(d in t){var v=t[d];v.children.push(n(l,v))}else r.push(n(l,null))}}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}return r},ai=function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},ui=function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},li=function(e){return!!e&&(_instanceof(e,iv)&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(cv.shadowRoot(e)))},ci=function(e){var t=_to_consumable_array(e),n=t.pop();return{positions:t,index:n}},di=function(e){for(var t=new Set,n=[],r=e.length;r--;){var i=e[r];t.has(i.id)||(n.push(i),t.add(i.id))}return n},fi=function(e){var t,n=null;return"getRootNode"in e&&(null==(t=cv.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&cv.host(cv.getRootNode(e))&&(n=cv.host(cv.getRootNode(e))),n},hi=function(e){for(var t,n=e;t=fi(n);)n=t;return n},pi=function(e){var t=e.ownerDocument;if(!t)return!1;var n=hi(e);return cv.contains(t,n)},vi=function(e){var t=e.ownerDocument;return!!t&&(cv.contains(t,e)||pi(e))},gi=function(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var n=e.localName;if(!n)break;n=n.toLowerCase();var r=e.parentElement,i=[];if(r.children&&r.children.length>0)for(var o=0;o<r.children.length;o++){var s=r.children[o];s.localName&&s.localName.toLowerCase&&s.localName.toLowerCase()===n&&i.push(s)}i.length>1&&(n+=":eq(".concat(i.indexOf(e),")")),t=n+(t?">"+t:""),e=r}return t},yi=function(e){return"[object Object]"===Object.prototype.toString.call(e)},mi=function(e,t){var n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);var r=[],i=[];return JSON.stringify(e,function(e,t){if(r.length>0){var o=r.indexOf(this);~o?r.splice(o+1):r.push(this),~o?i.splice(o,1/0,e):i.push(e),~r.indexOf(t)&&(t=r[0]===t?"[Circular ~]":"[Circular ~."+i.slice(0,r.indexOf(t)).join(".")+"]")}else r.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(yi(e)&&Object.keys(e).length>n.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(yi(e)&&Lv(e,n.depthOfLimit))return!0;return!1}(t))return function(e){var t=e.toString();n.stringLengthLimit&&t.length>n.stringLengthLimit&&(t="".concat(t.slice(0,n.stringLengthLimit),"..."));return t}(t);if("bigint"===(void 0===t?"undefined":_type_of(t)))return t.toString()+"n";if(_instanceof(t,Event)){var s={};for(var a in t){var u=t[a];Array.isArray(u)?s[a]=gi(u.length?u[0]:null):s[a]=u}return s}return _instanceof(t,Node)?_instanceof(t,HTMLElement)?t?t.outerHTML:"":t.nodeName:_instanceof(t,Error)?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t})},bi=function(e,t,n){var r,i=n?Object.assign({},xv,n):xv,o=i.logger;if(!o)return function(){};r="string"==typeof o?t[o]:o;var s=0,a=!1,u=[];if(i.level.includes("error")){var l=function(t){var n=t.message,r=t.error,o=kv.parse(r).map(function(e){return e.toString()}),s=[mi(n,i.stringifyOptions)];e({level:"error",trace:o,payload:s})};t.addEventListener("error",l),u.push(function(){t.removeEventListener("error",l)});var c=function(t){var n,r;_instanceof(t.reason,Error)?(n=t.reason,r=[mi("Uncaught (in promise) ".concat(n.name,": ").concat(n.message),i.stringifyOptions)]):(n=new Error,r=[mi("Uncaught (in promise)",i.stringifyOptions),mi(t.reason,i.stringifyOptions)]);var o=kv.parse(n).map(function(e){return e.toString()});e({level:"error",trace:o,payload:r})};t.addEventListener("unhandledrejection",c),u.push(function(){t.removeEventListener("unhandledrejection",c)})}var d=!0,f=!1,h=void 0;try{for(var p,v=i.level[Symbol.iterator]();!(d=(p=v.next()).done);d=!0){var g=p.value;u.push(y(r,g))}}catch(e){f=!0,h=e}finally{try{d||null==v.return||v.return()}finally{if(f)throw h}}return function(){u.forEach(function(e){return e()})};function y(t,n){var r=this;return t[n]?vv.patch(t,n,function(t){var o=r;return function(){for(var r=arguments.length,u=new Array(r),l=0;l<r;l++)u[l]=arguments[l];if(t.apply(o,u),!("assert"===n&&u[0]||a)){a=!0;try{var c=kv.parse(new Error).map(function(e){return e.toString()}).splice(1),d=("assert"===n?u.slice(1):u).map(function(e){return mi(e,i.stringifyOptions)});++s<i.lengthThreshold?e({level:n,trace:c,payload:d}):s===i.lengthThreshold&&e({level:"warn",trace:[],payload:[mi("The number of log records reached the threshold.")]})}catch(e){t.apply(void 0,["rrweb logger error:",e].concat(_to_consumable_array(u)))}finally{a=!1}}}}):function(){}}},wi=function(e){if(Kv[e])return Kv[e];var t=function(e){var t,n,r=null==(n=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:n.call(t,e);return r&&globalThis[r]?globalThis[r]:void 0}(e)||globalThis[e],n=t.prototype,r=e in Vv?Vv[e]:void 0,i=Boolean(r&&r.every(function(e){var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),o=e in Hv?Hv[e]:void 0,s=Boolean(o&&o.every(function(e){var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))}));if(i&&s)return Kv[e]=t.prototype,t.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var u=a.contentWindow;if(!u)return t.prototype;var l=u[e].prototype;return document.body.removeChild(a),l?Kv[e]=l:n}catch(e){return n}},_i=function(e,t,n){var r,i="".concat(e,".").concat(String(n));if(Gv[i])return Gv[i].call(t);var o=wi(e),s=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return s?(Gv[i]=s,s.call(t)):t[n]},Si=function(e,t,n){var r="".concat(e,".").concat(String(n));if(Jv[r])return Jv[r].bind(t);var i=wi(e)[n];return"function"!=typeof i?t[n]:(Jv[r]=i,i.bind(t))},ki=function(e){return _i("Node",e,"childNodes")},xi=function(e){return _i("Node",e,"parentNode")},Ei=function(e){return _i("Node",e,"parentElement")},Ci=function(e){return _i("Node",e,"textContent")},Ii=function(e,t){return Si("Node",e,"contains")(t)},Oi=function(e){return Si("Node",e,"getRootNode")()},Ti=function(e){return e&&"host"in e?_i("ShadowRoot",e,"host"):null},Ai=function(e){return e.styleSheets},Pi=function(e){return e&&"shadowRoot"in e?_i("Element",e,"shadowRoot"):null},Ri=function(e,t){return _i("Element",e,"querySelector")(t)},Mi=function(e,t){return _i("Element",e,"querySelectorAll")(t)},Ni=function(){return wi("MutationObserver").constructor},Li=function(e){return e.nodeType===e.ELEMENT_NODE},Di=function(e){var t=e&&"host"in e&&"mode"in e&&$v.host(e)||null;return Boolean(t&&"shadowRoot"in t&&$v.shadowRoot(t)===e)},ji=function(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)},Ui=function(e){try{var t=e.rules||e.cssRules;if(!t)return null;var n=e.href;!n&&e.ownerNode&&e.ownerNode.ownerDocument&&(n=e.ownerNode.ownerDocument.location.href);var r=Array.from(t,function(e){return Fi(e,n)}).join("");return(i=r).includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")&&(i=i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),i}catch(e){return null}var i},Fi=function(e,t){if(qi(e)){var n;try{n=Ui(e.styleSheet)||function(e){var t=e.cssText;if(t.split('"').length<3)return t;var n=["@import","url(".concat(JSON.stringify(e.href),")")];return""===e.layerName?n.push("layer"):e.layerName&&n.push("layer(".concat(e.layerName,")")),e.supportsText&&n.push("supports(".concat(e.supportsText,")")),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(t){n=e.cssText}return e.styleSheet.href?Gi(n,e.styleSheet.href):n}var r=e.cssText;return zi(e)&&e.selectorText.includes(":")&&(r=Bi(r)),t?Gi(r,t):r},Bi=function(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")},qi=function(e){return"styleSheet"in e},zi=function(e){return"selectorText"in e},Wi=function(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,i=e.type,o=e.value,s=e.maskInputFn,a=o||"",u=i&&Vi(i);return(n[r.toLowerCase()]||u&&n[u])&&(a=s?s(a,t):"*".repeat(a.length)),a},Vi=function(e){return e.toLowerCase()},Hi=function(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Vi(t):null},Ki=function(e,t){var n,r;try{r=new URL(e,null!=t?t:window.location.href)}catch(e){return null}var i=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(n=null==i?void 0:i[1])&&void 0!==n?n:null},Gi=function(e,t){return(e||"").replace(Yv,function(e,n,r,i,o,s){var a,u=r||o||s,l=n||i||"";if(!u)return e;if(Zv.test(u)||eg.test(u))return"url(".concat(l).concat(u).concat(l,")");if(tg.test(u))return"url(".concat(l).concat(u).concat(l,")");if("/"===u[0])return"url(".concat(l).concat((a=t,(a.indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+u)).concat(l,")");var c=t.split("/"),d=u.split("/");c.pop();var f=!0,h=!1,p=void 0;try{for(var v,g=d[Symbol.iterator]();!(f=(v=g.next()).done);f=!0){var y=v.value;"."!==y&&(".."===y?c.pop():c.push(y))}}catch(e){h=!0,p=e}finally{try{f||null==g.return||g.return()}finally{if(h)throw p}}return"url(".concat(l).concat(c.join("/")).concat(l,")")})},Ji=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")},$i=function(e,t){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=Array.from(t.childNodes),i=[],o=0;if(r.length>1&&e&&"string"==typeof e)for(var s=Ji(e,n),a=s.length/e.length,u=1;u<r.length;u++)if(r[u].textContent&&"string"==typeof r[u].textContent){for(var l=Ji(r[u].textContent,n),c=3;c<l.length&&(l[c].match(/[a-zA-Z0-9]/)||-1!==l.indexOf(l.substring(0,c),1));c++);for(;c<l.length;c++){var d=l.substring(0,c),f=s.split(d),h=-1;if(2===f.length)h=f[0].length;else if(f.length>2&&""===f[0]&&""!==r[u-1].textContent)h=s.indexOf(d,1);else if(1===f.length){if(d=d.substring(0,d.length-1),(f=s.split(d)).length<=1)return i.push(e),i;c=101}else c===l.length-1&&(h=s.indexOf(d));if(f.length>=2&&c>100){var p=r[u-1].textContent;if(p&&"string"==typeof p){var v=Ji(p).length;h=s.indexOf(d,v)}-1===h&&(h=f[0].length)}if(-1!==h){for(var g=Math.floor(h/a);g>0&&g<e.length;){if((o+=1)>50*r.length)return i.push(e),i;var y=Ji(e.substring(0,g),n);if(y.length===h){i.push(e.substring(0,g)),e=e.substring(g),s=s.substring(h);break}y.length<h?g+=Math.max(1,Math.floor((h-y.length)/a)):g-=Math.max(1,Math.floor((y.length-h)*a))}break}}}return i.push(e),i}(e,t).join("/* rr_split */")},Qi=function(){return rg++},Xi=function(e,t){return t&&""!==t.trim()?Yi(e,t):t},Yi=function(e,t){var n=cg.get(e);if(n||(n=e.createElement("a"),cg.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href},Zi=function(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?Xi(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}for(var i=[];r(lg),!(n>=t.length);){var o=r(ug);if(","===o.slice(-1))o=Xi(e,o.substring(0,o.length-1)),i.push(o);else{var s="";o=Xi(e,o);for(var a=!1;;){var u=t.charAt(n);if(""===u){i.push((o+s).trim());break}if(a)")"===u&&(a=!1);else{if(","===u){n+=1,i.push((o+s).trim());break}"("===u&&(a=!0)}s+=u,n+=1}}}return i.join(", ")}(e,r):"style"===n?Gi(r,Yi(e)):"object"===t&&"data"===n?Xi(e,r):r:Xi(e,r):r},eo=function(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t},to=function(e,t,n,r){var i;if(Li(e)){if(i=e,!$v.childNodes(i).length)return!1}else{if(null===$v.parentElement(e))return!1;i=$v.parentElement(e)}try{if("string"==typeof t){if(r){if(i.closest(".".concat(t)))return!0}else if(i.classList.contains(t))return!0}else if(Ob(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(e){}return!1},no=function(e,t){if(t.hasNode(e)){var n=t.getId(e);return 1===n?void 0:n}},ro=function(e,t){var n=t.needsMask,r=t.maskTextFn,i=t.rootId,o=t.cssCaptured,s=$v.parentNode(e),a=s&&s.tagName,u="",l="STYLE"===a||void 0,c="SCRIPT"===a||void 0;return c?u="SCRIPT_PLACEHOLDER":o||(u=$v.textContent(e),l&&u&&(u=Gi(u,Yi(t.doc)))),!l&&!c&&u&&n&&(u=r?r(u,$v.parentElement(e)):u.replace(/[\S]/g,"*")),{type:Wv.Text,textContent:u||"",rootId:i}},io=function(e,t){for(var n,r,i=t.doc,o=t.blockClass,s=t.blockSelector,a=t.inlineStylesheet,u=t.maskInputOptions,l=void 0===u?{}:u,c=t.maskInputFn,d=t.maskAttributeFn,f=t.dataURLOptions,h=void 0===f?{}:f,p=t.inlineImages,v=t.recordCanvas,g=t.keepIframeSrcFn,y=t.newlyAddedElement,m=void 0!==y&&y,b=t.rootId,w=t.applyBackgroundColorToBlockedElements,_=void 0!==w&&w,S=function(e,t,n){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,o,s),k=function(e){if(_instanceof(e,HTMLFormElement))return"form";var t=Vi(e.tagName);return ig.test(t)?"div":t}(e),x={},E=e.attributes.length,C=0;C<E;C++){var I=e.attributes[C];if(!eo(k,I.name,I.value)){var O=Zi(i,k,Vi(I.name),I.value);if(d&&null!==O){var T=d(I.name,O,e);null!==T&&(x[I.name]=T)}else x[I.name]=O}}if("link"===k&&a){var A=Array.from(i.styleSheets).find(function(t){return t.href===e.href}),P=null;A&&(P=Ui(A)),P&&(delete x.rel,delete x.href,x._cssText=P)}if("style"===k&&e.sheet){var R=Ui(e.sheet);R&&(e.childNodes.length>1&&(R=$i(R,e)),x._cssText=R)}if("input"===k||"textarea"===k||"select"===k){var M=e.value,N=e.checked;"radio"!==x.type&&"checkbox"!==x.type&&"submit"!==x.type&&"button"!==x.type&&M?x.value=Wi({element:e,type:Hi(e),tagName:k,value:M,maskInputOptions:l,maskInputFn:c}):N&&(x.checked=N)}if("option"===k&&(e.selected&&!l.select?x.selected=!0:delete x.selected),"dialog"===k&&e.open&&(x.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),"canvas"===k&&v)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var i=t.getImageData,o=Xv in i?i[Xv]:i;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(function(e){return 0!==e}))return!1}return!0})(e)||(x.rr_dataURL=e.toDataURL(h.type,h.quality));else if(!("__context"in e)){var L=e.toDataURL(h.type,h.quality),D=i.createElement("canvas");D.width=e.width,D.height=e.height,L!==D.toDataURL(h.type,h.quality)&&(x.rr_dataURL=L)}if("img"===k&&p){sg||(sg=i.createElement("canvas"),ag=sg.getContext("2d"));var j=e,U=j.currentSrc||j.getAttribute("src")||"<unknown-src>",F=j.crossOrigin,B=function(){j.removeEventListener("load",B);try{sg.width=j.naturalWidth,sg.height=j.naturalHeight,ag.drawImage(j,0,0),x.rr_dataURL=sg.toDataURL(h.type,h.quality)}catch(e){if("anonymous"!==j.crossOrigin)return j.crossOrigin="anonymous",void(j.complete&&0!==j.naturalWidth?B():j.addEventListener("load",B));console.warn("Cannot inline img src=".concat(U,"! Error: ").concat(e))}"anonymous"===j.crossOrigin&&(F?x.crossOrigin=F:j.removeAttribute("crossorigin"))};j.complete&&0!==j.naturalWidth?B():j.addEventListener("load",B)}if("audio"===k||"video"===k){var q=x;q.rr_mediaState=e.paused?"paused":"played",q.rr_mediaCurrentTime=e.currentTime,q.rr_mediaPlaybackRate=e.playbackRate,q.rr_mediaMuted=e.muted,q.rr_mediaLoop=e.loop,q.rr_mediaVolume=e.volume}if(m||(e.scrollLeft&&(x.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(x.rr_scrollTop=e.scrollTop)),S){var z=e.getBoundingClientRect(),W=z.width,V=z.height;x=_object_spread({class:x.class,rr_width:"".concat(W,"px"),rr_height:"".concat(V,"px")},_?{rr_background_color:ng}:{})}"iframe"!==k||g(x.src)||(e.contentDocument||(x.rr_src=x.src),delete x.src);try{customElements.get(k)&&(n=!0)}catch(e){}return{type:Wv.Element,tagName:k,attributes:x,childNodes:[],isSVG:(r=e,Boolean("svg"===r.tagName||r.ownerSVGElement)||void 0),needBlock:S,rootId:b,isCustom:n}},oo=function(e){return null==e?"":e.toLowerCase()},so=function(e,t,n){return Array.from(e).map(function(e){var r=t(e),i=[];if(!n.has(r)){n.add(r);try{i=Array.from(e.cssRules,function(t,n){return{rule:Fi(t,e.href),index:n}})}catch(e){if(!_instanceof(e,DOMException)||"SecurityError"!==e.name)throw e}}return{styleId:r,rules:i}})},ao=function(){if(yg)return gg;yg=1;var e=function(){if(fg)return dg.exports;fg=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return dg.exports=t(),dg.exports.createColors=t,dg.exports}(),t=vg,n=function(){function n(e,t,r,i,o,s){var a;return _class_call_check(this,n),(a=_call_super(this,n,[e])).name="CssSyntaxError",a.reason=e,o&&(a.file=o),i&&(a.source=i),s&&(a.plugin=s),void 0!==t&&void 0!==r&&("number"==typeof t?(a.line=t,a.column=r):(a.line=t.line,a.column=t.column,a.endLine=r.line,a.endColumn=r.column)),a.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(a,n),a}return _inherits(n,_wrap_native_super(Error)),_create_class(n,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(n){var r=this;if(!this.source)return"";var i=this.source;null==n&&(n=e.isColorSupported),t&&n&&(i=t(i));var o,s,a=i.split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),c=String(l).length;if(n){var d=e.createColors(!0),f=d.bold,h=d.gray,p=d.red;o=function(e){return f(p(e))},s=function(e){return h(e)}}else o=s=function(e){return e};return a.slice(u,l).map(function(e,t){var n=u+1+t,i=" "+(" "+n).slice(-c)+" | ";if(n===r.line){var a=s(i.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," ");return o(">")+s(i)+e+"\n "+a+o("^")}return" "+s(i)+e}).join("\n")}},{key:"toString",value:function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}]),n}();return gg=n,n.default=n,gg},uo=function(){return bg||(bg=1,mg.isClean=Symbol("isClean"),mg.my=Symbol("my")),mg},lo=function(){if(_g)return wg;_g=1;var e={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var t=function(){function t(e){_class_call_check(this,t),this.builder=e}return _create_class(t,[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{var i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}}},{key:"beforeAfter",value:function(e,t){var n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var s=0;s<i;s++)n+=o}return n}},{key:"block",value:function(e,t){var n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}},{key:"body",value:function(e){for(var t=e.nodes.length-1;t>0&&"comment"===e.nodes[t].type;)t-=1;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}},{key:"comment",value:function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}},{key:"decl",value:function(e,t){var n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}},{key:"document",value:function(e){this.body(e)}},{key:"raw",value:function(t,n,r){var i;if(r||(r=n),n&&void 0!==(i=t.raws[n]))return i;var o=t.parent;if("before"===r){if(!o||"root"===o.type&&o.first===t)return"";if(o&&"document"===o.type)return""}if(!o)return e[r];var s=t.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[r])return s.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var a,u="raw"+((a=r)[0].toUpperCase()+a.slice(1));return this[u]?i=this[u](s,t):s.walk(function(e){if(void 0!==(i=e.raws[n]))return!1}),void 0===i&&(i=e[r]),s.rawCache[r]=i,i}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}},{key:"rawBeforeComment",value:function(e,t){var n;return e.walkComments(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}},{key:"rawBeforeDecl",value:function(e,t){var n;return e.walkDecls(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}},{key:"rawBeforeOpen",value:function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}},{key:"rawBeforeRule",value:function(e){var t;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return(t=n.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}},{key:"rawColon",value:function(e){var t;return e.walkDecls(function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}},{key:"rawEmptyBody",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}},{key:"rawIndent",value:function(e){return e.raws.indent?e.raws.indent:(e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){var i=n.raws.before.split("\n");return t=(t=i[i.length-1]).replace(/\S/g,""),!1}}),t);var t}},{key:"rawSemicolon",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}},{key:"rawValue",value:function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}},{key:"root",value:function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}},{key:"rule",value:function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}},{key:"stringify",value:function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}]),t}();return wg=t,t.default=t,wg},co=function(){if(kg)return Sg;kg=1;var e=lo();function t(t,n){new e(n).stringify(t)}return Sg=t,t.default=t,Sg},fo=function(){if(Eg)return xg;Eg=1;var e=uo(),t=e.isClean,n=e.my,r=ao(),i=lo(),o=co();function s(e,t){var n=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){var i=e[r],o=void 0===i?"undefined":_type_of(i);"parent"===r&&"object"===o?t&&(n[r]=t):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map(function(e){return s(e,n)}):("object"===o&&null!==i&&(i=s(i)),n[r]=i)}return n}var a=function(){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var i in _class_call_check(this,e),this.raws={},this[t]=!1,this[n]=!0,r)if("nodes"===i){this.nodes=[];var o=!0,s=!1,a=void 0;try{for(var u,l=r[i][Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;"function"==typeof c.clone?this.append(c.clone()):this.append(c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}}else this[i]=r[i]}return _create_class(e,[{key:"addToError",value:function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))}return e}},{key:"after",value:function(e){return this.parent.insertAfter(this,e),this}},{key:"assign",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e)this[t]=e[t];return this}},{key:"before",value:function(e){return this.parent.insertBefore(this,e),this}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=s(this);for(var n in e)t[n]=e[n];return t}},{key:"cloneAfter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertAfter(this,t),t}},{key:"cloneBefore",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertBefore(this,t),t}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.source){var n=this.rangeBy(t),i=n.end,o=n.start;return this.source.input.error(e,{column:o.column,line:o.line},{column:i.column,line:i.line},t)}return new r(e)}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0}}}},{key:"markDirty",value:function(){if(this[t]){this[t]=!1;for(var e=this;e=e.parent;)e[t]=!1}}},{key:"next",value:function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}}},{key:"positionBy",value:function(e,t){var n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){var r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n}},{key:"positionInside",value:function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?(r=1,i+=1):r+=1;return{column:r,line:i}}},{key:"prev",value:function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}}},{key:"rangeBy",value:function(e){var t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var r=this.toString(),i=r.indexOf(e.word);-1!==i&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}},{key:"raw",value:function(e,t){return(new i).raw(this,e,t)}},{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"replaceWith",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this.parent){var r=this,i=!1,o=!0,s=!1,a=void 0;try{for(var u,l=t[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;c===this?i=!0:i?(this.parent.insertAfter(r,c),r=c):this.parent.insertBefore(r,c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}i||this.remove()}return this}},{key:"root",value:function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}},{key:"toJSON",value:function(e,t){var n={},r=null==t;t=t||new Map;var i=0;for(var o in this)if(Object.prototype.hasOwnProperty.call(this,o)&&"parent"!==o&&"proxyCache"!==o){var s=this[o];if(Array.isArray(s))n[o]=s.map(function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&e.toJSON?e.toJSON(null,t):e});else if("object"===(void 0===s?"undefined":_type_of(s))&&s.toJSON)n[o]=s.toJSON(null,t);else if("source"===o){var a=t.get(s.input);null==a&&(a=i,t.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=_to_consumable_array(t.keys()).map(function(e){return e.toJSON()})),n}},{key:"toProxy",value:function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;e.stringify&&(e=e.stringify);var t="";return e(this,function(e){t+=e}),t}},{key:"warn",value:function(e,t,n){var r={node:this};for(var i in n)r[i]=n[i];return e.warn(t,r)}},{key:"proxyOf",get:function(){return this}}]),e}();return xg=a,a.default=a,xg},ho=function(){if(Ig)return Cg;Ig=1;var e=function(e){function t(e){var n;return _class_call_check(this,t),e&&void 0!==e.value&&"string"!=typeof e.value&&(e=_object_spread_props(_object_spread({},e),{value:String(e.value)})),(n=_call_super(this,t,[e])).type="decl",n}return _inherits(t,e),_create_class(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),t}(fo());return Cg=e,e.default=e,Cg},po=function(){if(Pg)return Ag;Pg=1;var e=vg.SourceMapConsumer,t=vg.SourceMapGenerator,n=vg.existsSync,r=vg.readFileSync,i=vg.dirname,o=vg.join;var s=function(){function s(e,t){if(_class_call_check(this,s),!1!==t.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),r&&(this.text=r)}}return _create_class(s,[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}},{key:"decodeInline",value:function(e){var t;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}},{key:"getAnnotationURL",value:function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}},{key:"loadAnnotation",value:function(e){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(t){var n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}}},{key:"loadFile",value:function(e){if(this.root=i(e),n(e))return this.mapFile=e,r(e,"utf-8").toString().trim()}},{key:"loadMap",value:function(n,r){if(!1===r)return!1;if(r){if("string"==typeof r)return r;if("function"!=typeof r){if(_instanceof(r,e))return t.fromSourceMap(r).toString();if(_instanceof(r,t))return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}var s=r(n);if(s){var a=this.loadFile(s);if(!a)throw new Error("Unable to load previous source map: "+s.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var u=this.annotation;return n&&(u=o(i(n),u)),this.loadFile(u)}}}},{key:"startWith",value:function(e,t){return!!e&&e.substr(0,t.length)===t}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}]),s}();return Ag=s,s.default=s,Ag},vo=function(){if(Mg)return Rg;Mg=1;var e=vg.SourceMapConsumer,t=vg.SourceMapGenerator,n=vg.fileURLToPath,r=vg.pathToFileURL,i=vg.isAbsolute,o=vg.resolve,s=(Tg||(Tg=1,Og={nanoid:function(){for(var e="",t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21;return function(){for(var n="",r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t;r--;)n+=e[Math.random()*e.length|0];return n}}}),Og).nanoid,a=vg,u=ao(),l=po(),c=Symbol("fromOffsetCache"),d=Boolean(e&&t),f=Boolean(o&&i),h=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_class_call_check(this,e),null==t||"object"===(void 0===t?"undefined":_type_of(t))&&!t.toString)throw new Error("PostCSS received ".concat(t," instead of CSS string"));if(this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!f||/^\w+:\/\//.test(n.from)||i(n.from)?this.file=n.from:this.file=o(n.from)),f&&d){var r=new l(this.css,n);if(r.text){this.map=r;var a=r.consumer().file;!this.file&&a&&(this.file=this.mapResolve(a))}}this.file||(this.id="<input css "+s(6)+">"),this.map&&(this.map.file=this.from)}return _create_class(e,[{key:"error",value:function(e,t,n){var i,o,s,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(t&&"object"===(void 0===t?"undefined":_type_of(t))){var l=t,c=n;if("number"==typeof l.offset){var d=this.fromOffset(l.offset);t=d.line,n=d.col}else t=l.line,n=l.column;if("number"==typeof c.offset){var f=this.fromOffset(c.offset);o=f.line,s=f.col}else o=c.line,s=c.column}else if(!n){var h=this.fromOffset(t);t=h.line,n=h.col}var p=this.origin(t,n,o,s);return(i=p?new u(e,void 0===p.endLine?p.line:{column:p.column,line:p.line},void 0===p.endLine?p.column:{column:p.endColumn,line:p.endLine},p.source,p.file,a.plugin):new u(e,void 0===o?t:{column:n,line:t},void 0===o?n:{column:s,line:o},this.css,this.file,a.plugin)).input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(r&&(i.input.url=r(this.file).toString()),i.input.file=this.file),i}},{key:"fromOffset",value:function(e){var t;if(this[c])t=this[c];else{var n=this.css.split("\n");t=new Array(n.length);for(var r=0,i=0,o=n.length;i<o;i++)t[i]=r,r+=n[i].length+1;this[c]=t}var s=0;if(e>=t[t.length-1])s=t.length-1;else for(var a,u=t.length-2;s<u;)if(e<t[a=s+(u-s>>1)])u=a-1;else{if(!(e>=t[a+1])){s=a;break}s=a+1}return{col:e-t[s]+1,line:s+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}},{key:"origin",value:function(e,t,o,s){if(!this.map)return!1;var a,u,l=this.map.consumer(),c=l.originalPositionFor({column:t,line:e});if(!c.source)return!1;"number"==typeof o&&(a=l.originalPositionFor({column:s,line:o})),u=i(c.source)?r(c.source):new URL(c.source,this.map.consumer().sourceRoot||r(this.map.mapFile));var d={column:c.column,endColumn:a&&a.column,endLine:a&&a.line,line:c.line,url:u.toString()};if("file:"===u.protocol){if(!n)throw new Error("file: protocol is not available in this PostCSS build");d.file=n(u)}var f=l.sourceContentFor(c.source);return f&&(d.source=f),d}},{key:"toJSON",value:function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=_object_spread({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}},{key:"from",get:function(){return this.file||this.id}}]),e}();return Rg=h,h.default=h,a&&a.registerInput&&a.registerInput(h),Rg},go=function(){if(Lg)return Ng;Lg=1;var e=vg.SourceMapConsumer,t=vg.SourceMapGenerator,n=vg.dirname,r=vg.relative,i=vg.resolve,o=vg.sep,s=vg.pathToFileURL,a=vo(),u=Boolean(e&&t),l=Boolean(n&&i&&r&&o);return Ng=function(){function c(e,t,n,r){_class_call_check(this,c),this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}return _create_class(c,[{key:"addAnnotation",value:function(){var e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}},{key:"applyPrevMaps",value:function(){var t=!0,r=!1,i=void 0;try{for(var o,s=this.previous()[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){var a=o.value,u=this.toUrl(this.path(a.file)),l=a.root||n(a.file),c=void 0;!1===this.mapOpts.sourcesContent?(c=new e(a.text)).sourcesContent&&(c.sourcesContent=null):c=a.consumer(),this.map.applySourceMap(c,u,this.toUrl(this.path(l)))}}catch(e){r=!0,i=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}},{key:"generate",value:function(){if(this.clearAnnotation(),l&&u&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]}},{key:"generateMap",value:function(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var e=this;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});var n,r,i=1,o=1,s="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(t,u,l){if(e.css+=t,u&&"end"!==l&&(a.generated.line=i,a.generated.column=o-1,u.source&&u.source.start?(a.source=e.sourcePath(u),a.original.line=u.source.start.line,a.original.column=u.source.start.column-1,e.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,e.map.addMapping(a))),(n=t.match(/\n/g))?(i+=n.length,r=t.lastIndexOf("\n"),o=t.length-r):o+=t.length,u&&"start"!==l){var c=u.parent||{raws:{}};("decl"===u.type||"atrule"===u.type&&!u.nodes)&&u===c.last&&!c.raws.semicolon||(u.source&&u.source.end?(a.source=e.sourcePath(u),a.original.line=u.source.end.line,a.original.column=u.source.end.column-1,a.generated.line=i,a.generated.column=o-2,e.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,a.generated.line=i,a.generated.column=o-1,e.map.addMapping(a)))}})}},{key:"isAnnotation",value:function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))}},{key:"isMap",value:function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}},{key:"isSourcesContent",value:function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var o=this.opts.to?n(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=n(i(o,this.mapOpts.annotation)));var s=r(o,e);return this.memoizedPaths.set(e,s),s}},{key:"previous",value:function(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;e.previousMaps.includes(n)||e.previousMaps.push(n)}});else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}},{key:"setSourcesContent",value:function(){var e=this,t={};if(this.root)this.root.walk(function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.usesFileUrls?e.toFileUrl(r):e.toUrl(e.path(r));e.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){var n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}},{key:"sourcePath",value:function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}},{key:"toBase64",value:function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}},{key:"toFileUrl",value:function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(s){var n=s(e).toString();return this.memoizedFileURLs.set(e,n),n}throw new Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));var n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}]),c}()},yo=function(){if(jg)return Dg;jg=1;var e=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t,[e])).type="comment",n}return _inherits(t,e),t}(fo());return Dg=e,e.default=e,Dg},mo=function(){if(Fg)return Ug;Fg=1;var e,t,n,r,i=uo(),o=i.isClean,s=i.my,a=ho(),u=yo();function l(e){return e.map(function(e){return e.nodes&&(e.nodes=l(e.nodes)),delete e.source,e})}function c(e){if(e[o]=!1,e.proxyOf.nodes){var t=!0,n=!1,r=void 0;try{for(var i,s=e.proxyOf.nodes[Symbol.iterator]();!(t=(i=s.next()).done);t=!0){c(i.value)}}catch(e){n=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(n)throw r}}}}var d=function(r){function i(){return _class_call_check(this,i),_call_super(this,i,arguments)}return _inherits(i,r),_create_class(i,[{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value,l=this.normalize(u,this.last),c=!0,d=!1,f=void 0;try{for(var h,p=l[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;this.proxyOf.nodes.push(v)}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if(_get(_get_prototype_of(i.prototype),"cleanRaws",this).call(this,e),this.nodes){var t=!0,n=!1,r=void 0;try{for(var o,s=this.nodes[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){o.value.cleanRaws(e)}}catch(e){n=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(n)throw r}}}}},{key:"each",value:function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"getIterator",value:function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o;return(o=e)[t].apply(o,_to_consumable_array(r.map(function(e){return"function"==typeof e?function(t,n){return e(t.toProxy(),n)}:e})))}:"every"===t||"some"===t?function(n){return e[t](function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return n.apply(void 0,[e.toProxy()].concat(_to_consumable_array(r)))})}:"root"===t?function(){return e.root().toProxy()}:"nodes"===t?e.nodes.map(function(e){return e.toProxy()}):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0}}}},{key:"index",value:function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}},{key:"insertAfter",value:function(e,t){var n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);var i,o=!0,s=!1,a=void 0;try{for(var u,l=r[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;this.proxyOf.nodes.splice(n+1,0,c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}for(var d in this.indexes)n<(i=this.indexes[d])&&(this.indexes[d]=i+r.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n=this.index(e),r=0===n&&"prepend",i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);var o,s=!0,a=!1,u=void 0;try{for(var l,c=i[Symbol.iterator]();!(s=(l=c.next()).done);s=!0){var d=l.value;this.proxyOf.nodes.splice(n,0,d)}}catch(e){a=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(a)throw u}}for(var f in this.indexes)n<=(o=this.indexes[f])&&(this.indexes[f]=o+i.length);return this.markDirty(),this}},{key:"normalize",value:function(r,d){var f=this;if("string"==typeof r)r=l(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r)){r=r.slice(0);var h=!0,p=!1,v=void 0;try{for(var g,y=r[Symbol.iterator]();!(h=(g=y.next()).done);h=!0){var m=g.value;m.parent&&m.parent.removeChild(m,"ignore")}}catch(e){p=!0,v=e}finally{try{h||null==y.return||y.return()}finally{if(p)throw v}}}else if("root"===r.type&&"document"!==this.type){r=r.nodes.slice(0);var b=!0,w=!1,_=void 0;try{for(var S,k=r[Symbol.iterator]();!(b=(S=k.next()).done);b=!0){var x=S.value;x.parent&&x.parent.removeChild(x,"ignore")}}catch(e){w=!0,_=e}finally{try{b||null==k.return||k.return()}finally{if(w)throw _}}}else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new a(r)]}else if(r.selector)r=[new t(r)];else if(r.name)r=[new n(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new u(r)]}var E=r.map(function(e){return e[s]||i.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[o]&&c(e),void 0===e.raws.before&&d&&void 0!==d.raws.before&&(e.raws.before=d.raws.before.replace(/\S/g,"")),e.parent=f.proxyOf,e});return E}},{key:"prepend",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.reverse();var r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value,l=this.normalize(u,this.first,"prepend").reverse(),c=!0,d=!1,f=void 0;try{for(var h,p=l[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;this.proxyOf.nodes.unshift(v)}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}for(var g in this.indexes)this.indexes[g]=this.indexes[g]+l.length}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return this.markDirty(),this}},{key:"push",value:function(e){return e.parent=this,this.proxyOf.nodes.push(e),this}},{key:"removeAll",value:function(){var e=!0,t=!1,n=void 0;try{for(var r,i=this.proxyOf.nodes[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){r.value.parent=void 0}}catch(e){t=!0,n=e}finally{try{e||null==i.return||i.return()}finally{if(t)throw n}}return this.proxyOf.nodes=[],this.markDirty(),this}},{key:"removeChild",value:function(e){var t;for(var n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}},{key:"replaceValues",value:function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"walk",value:function(e){return this.each(function(t,n){var r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}},{key:"walkAtRules",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("atrule"===e.type)return t(e,n)}))}},{key:"walkComments",value:function(e){return this.walk(function(t,n){if("comment"===t.type)return e(t,n)})}},{key:"walkDecls",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("decl"===e.type)return t(e,n)}))}},{key:"walkRules",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("rule"===e.type)return t(e,n)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),i}(fo());return d.registerParse=function(t){e=t},d.registerRule=function(e){t=e},d.registerAtRule=function(e){n=e},d.registerRoot=function(e){r=e},Ug=d,d.default=d,d.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,n.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,a.prototype):"comment"===e.type?Object.setPrototypeOf(e,u.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[s]=!0,e.nodes&&e.nodes.forEach(function(e){d.rebuild(e)})},Ug},bo=function(){if(qg)return Bg;qg=1;var e,t,n=function(n){function r(e){var t;return _class_call_check(this,r),(t=_call_super(this,r,[_object_spread({type:"document"},e)])).nodes||(t.nodes=[]),t}return _inherits(r,n),_create_class(r,[{key:"toResult",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(new t,this,n).stringify()}}]),r}(mo());return n.registerLazyResult=function(t){e=t},n.registerProcessor=function(e){t=e},Bg=n,n.default=n,Bg},wo=function(){if(Wg)return zg;Wg=1;var e={};return zg=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}},_o=function(){if(Hg)return Vg;Hg=1;var e=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_class_call_check(this,e),this.type="warning",this.text=t,n.node&&n.node.source){var r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in n)this[i]=n[i]}return _create_class(e,[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),e}();return Vg=e,e.default=e,Vg},So=function(){if(Gg)return Kg;Gg=1;var e=_o(),t=function(){function t(e,n,r){_class_call_check(this,t),this.processor=e,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}return _create_class(t,[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);var r=new e(t,n);return this.messages.push(r),r}},{key:"warnings",value:function(){return this.messages.filter(function(e){return"warning"===e.type})}},{key:"content",get:function(){return this.css}}]),t}();return Kg=t,t.default=t,Kg},ko=function(){if(Xg)return Qg;Xg=1;var e=mo(),t=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t,[e])).type="atrule",n}return _inherits(t,e),_create_class(t,[{key:"append",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=_get(_get_prototype_of(t.prototype),"append",this)).call.apply(i,[this].concat(_to_consumable_array(n)))}},{key:"prepend",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=_get(_get_prototype_of(t.prototype),"prepend",this)).call.apply(i,[this].concat(_to_consumable_array(n)))}}]),t}(e);return Qg=t,t.default=t,e.registerAtRule(t),Qg},xo=function(){if(Zg)return Yg;Zg=1;var e,t,n=mo(),r=function(n){function r(e){var t;return _class_call_check(this,r),(t=_call_super(this,r,[e])).type="root",t.nodes||(t.nodes=[]),t}return _inherits(r,n),_create_class(r,[{key:"normalize",value:function(e,t,n){var i=_get(_get_prototype_of(r.prototype),"normalize",this).call(this,e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t){var o=!0,s=!1,a=void 0;try{for(var u,l=i[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){u.value.raws.before=t.raws.before}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}}return i}},{key:"removeChild",value:function(e,t){var n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),_get(_get_prototype_of(r.prototype),"removeChild",this).call(this,e)}},{key:"toResult",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(new t,this,n).stringify()}}]),r}(n);return r.registerLazyResult=function(t){e=t},r.registerProcessor=function(e){t=e},Yg=r,r.default=r,n.registerRoot(r),Yg},Eo=function(){if(ty)return ey;ty=1;var e={comma:function(t){return e.split(t,[","],!0)},space:function(t){return e.split(t,[" ","\n","\t"])},split:function(e,t,n){var r=[],i="",o=!1,s=0,a=!1,u="",l=!1,c=!0,d=!1,f=void 0;try{for(var h,p=e[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;l?l=!1:"\\"===v?l=!0:a?v===u&&(a=!1):'"'===v||"'"===v?(a=!0,u=v):"("===v?s+=1:")"===v?s>0&&(s-=1):0===s&&t.includes(v)&&(o=!0),o?(""!==i&&r.push(i.trim()),i="",o=!1):i+=v}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}return(n||""!==i)&&r.push(i.trim()),r}};return ey=e,e.default=e,ey},Co=function(){if(ry)return ny;ry=1;var e=mo(),t=Eo(),n=function(e){function n(e){var t;return _class_call_check(this,n),(t=_call_super(this,n,[e])).type="rule",t.nodes||(t.nodes=[]),t}return _inherits(n,e),_create_class(n,[{key:"selectors",get:function(){return t.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}]),n}(e);return ny=n,n.default=n,e.registerRule(n),ny},Io=function(){if(oy)return iy;oy=1;var e=ho(),t=function(){if($g)return Jg;$g=1;var e="'".charCodeAt(0),t='"'.charCodeAt(0),n="\\".charCodeAt(0),r="/".charCodeAt(0),i="\n".charCodeAt(0),o=" ".charCodeAt(0),s="\f".charCodeAt(0),a="\t".charCodeAt(0),u="\r".charCodeAt(0),l="[".charCodeAt(0),c="]".charCodeAt(0),d="(".charCodeAt(0),f=")".charCodeAt(0),h="{".charCodeAt(0),p="}".charCodeAt(0),v=";".charCodeAt(0),g="*".charCodeAt(0),y=":".charCodeAt(0),m="@".charCodeAt(0),b=/[\t\n\f\r "#'()/;[\\\]{}]/g,w=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return Jg=function(k){var x,E,C,I,O,T,A,P,R,M,N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},L=k.css.valueOf(),D=N.ignoreErrors,j=L.length,U=0,F=[],B=[];function q(e){throw k.error("Unclosed "+e,U)}return{back:function(e){B.push(e)},endOfFile:function(){return 0===B.length&&U>=j},nextToken:function(k){if(B.length)return B.pop();if(!(U>=j)){var N=!!k&&k.ignoreUnclosed;switch(x=L.charCodeAt(U)){case i:case o:case a:case u:case s:E=U;do{E+=1,x=L.charCodeAt(E)}while(x===o||x===i||x===a||x===u||x===s);M=["space",L.slice(U,E)],U=E-1;break;case l:case c:case h:case p:case y:case v:case f:var z=String.fromCharCode(x);M=[z,z,U];break;case d:if(P=F.length?F.pop()[1]:"",R=L.charCodeAt(U+1),"url"===P&&R!==e&&R!==t&&R!==o&&R!==i&&R!==a&&R!==s&&R!==u){E=U;do{if(T=!1,-1===(E=L.indexOf(")",E+1))){if(D||N){E=U;break}q("bracket")}for(A=E;L.charCodeAt(A-1)===n;)A-=1,T=!T}while(T);M=["brackets",L.slice(U,E+1),U,E],U=E}else E=L.indexOf(")",U+1),I=L.slice(U,E+1),-1===E||_.test(I)?M=["(","(",U]:(M=["brackets",I,U,E],U=E);break;case e:case t:C=x===e?"'":'"',E=U;do{if(T=!1,-1===(E=L.indexOf(C,E+1))){if(D||N){E=U+1;break}q("string")}for(A=E;L.charCodeAt(A-1)===n;)A-=1,T=!T}while(T);M=["string",L.slice(U,E+1),U,E],U=E;break;case m:b.lastIndex=U+1,b.test(L),E=0===b.lastIndex?L.length-1:b.lastIndex-2,M=["at-word",L.slice(U,E+1),U,E],U=E;break;case n:for(E=U,O=!0;L.charCodeAt(E+1)===n;)E+=1,O=!O;if(x=L.charCodeAt(E+1),O&&x!==r&&x!==o&&x!==i&&x!==a&&x!==u&&x!==s&&(E+=1,S.test(L.charAt(E)))){for(;S.test(L.charAt(E+1));)E+=1;L.charCodeAt(E+1)===o&&(E+=1)}M=["word",L.slice(U,E+1),U,E],U=E;break;default:x===r&&L.charCodeAt(U+1)===g?(0===(E=L.indexOf("*/",U+2)+1)&&(D||N?E=L.length:q("comment")),M=["comment",L.slice(U,E+1),U,E],U=E):(w.lastIndex=U+1,w.test(L),E=0===w.lastIndex?L.length-1:w.lastIndex-2,M=["word",L.slice(U,E+1),U,E],F.push(M),U=E)}return U++,M}},position:function(){return U}}},Jg}(),n=yo(),r=ko(),i=xo(),o=Co(),s={empty:!0,space:!0};return iy=function(){function a(e){_class_call_check(this,a),this.input=e,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}return _create_class(a,[{key:"atrule",value:function(e){var t,n,i,o=new r;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);for(var s=!1,a=!1,u=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(u.length>0){for(n=u[i=u.length-1];n&&"space"===n[0];)n=u[--i];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(e);break}u.push(e)}else u.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(o.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(o,"params",u),s&&(e=u[u.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}},{key:"checkMissedSemicolon",value:function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;i>=0&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},{key:"colon",value:function(e){var t,n,r,i=0,o=!0,s=!1,a=void 0;try{for(var u,l=e.entries()[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=_sliced_to_array(u.value,2),d=c[0];if("("===(n=(t=c[1])[0])&&(i+=1),")"===n&&(i-=1),0===i&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return d}this.doubleColon(t)}r=t}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}return!1}},{key:"comment",value:function(e){var t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{var i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}},{key:"createTokenizer",value:function(){this.tokenizer=t(this.input)}},{key:"decl",value:function(t,n){var r=new e;this.init(r,t[0][2]);var i,o=t[t.length-1];for(";"===o[0]&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(o[3]||o[2]||function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=n[3]||n[2];if(r)return r}}(t)),r.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){var s=t[0][0];if(":"===s||"space"===s||"comment"===s)break;r.prop+=t.shift()[1]}for(r.raws.between="";t.length;){if(":"===(i=t.shift())[0]){r.raws.between+=i[1];break}"word"===i[0]&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));for(var a,u=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)u.push(t.shift());this.precheckMissedSemicolon(t);for(var l=t.length-1;l>=0;l--){if("!important"===(i=t[l])[1].toLowerCase()){r.important=!0;var c=this.stringFrom(t,l);" !important"!==(c=this.spacesFromEnd(t)+c)&&(r.raws.important=c);break}if("important"===i[1].toLowerCase()){for(var d=t.slice(0),f="",h=l;h>0;h--){var p=d[h][0];if(0===f.trim().indexOf("!")&&"space"!==p)break;f=d.pop()[1]+f}0===f.trim().indexOf("!")&&(r.important=!0,r.raws.important=f,t=d)}if("space"!==i[0]&&"comment"!==i[0])break}var v=t.some(function(e){return"space"!==e[0]&&"comment"!==e[0]});v&&(r.raws.between+=u.map(function(e){return e[1]}).join(""),u=[]),this.raw(r,"value",u.concat(t),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}},{key:"doubleColon",value:function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}},{key:"emptyRule",value:function(e){var t=new o;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}},{key:"end",value:function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}},{key:"getPosition",value:function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}},{key:"init",value:function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}},{key:"other",value:function(e){for(var t=!1,n=null,r=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],u=e;u;){if(n=u[0],a.push(u),"("===n||"["===n)i||(i=u),o.push("("===n?")":"]");else if(s&&r&&"{"===n)i||(i=u),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(a,s);break}if("{"===n)return void this.rule(a);if("}"===n){this.tokenizer.back(a.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!s)for(;a.length&&("space"===(u=a[a.length-1][0])||"comment"===u);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}},{key:"parse",value:function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(e,t,n,r){for(var i,o,a,u,l=n.length,c="",d=!0,f=0;f<l;f+=1)"space"!==(o=(i=n[f])[0])||f!==l-1||r?"comment"===o?(u=n[f-1]?n[f-1][0]:"empty",a=n[f+1]?n[f+1][0]:"empty",s[u]||s[a]||","===c.slice(-1)?d=!1:c+=i[1]):c+=i[1]:d=!1;if(!d){var h=n.reduce(function(e,t){return e+t[1]},"");e.raws[t]={raw:h,value:c}}e[t]=c}},{key:"rule",value:function(e){e.pop();var t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}},{key:"spacesAndCommentsFromEnd",value:function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}},{key:"spacesAndCommentsFromStart",value:function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}},{key:"spacesFromEnd",value:function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}},{key:"stringFrom",value:function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}},{key:"unclosedBlock",value:function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}},{key:"unclosedBracket",value:function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}},{key:"unexpectedClose",value:function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}},{key:"unknownWord",value:function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}},{key:"unnamedAtrule",value:function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}]),a}()},Oo=function(){if(ay)return sy;ay=1;var e=mo(),t=Io(),n=vo();function r(e,r){var i=new n(e,r),o=new t(i);try{o.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&r&&r.from&&(/\.scss$/i.test(r.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(r.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(r.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return o.root}return sy=r,r.default=r,e.registerParse(r),sy},To=function(){if(ly)return uy;ly=1;var e=uo(),t=e.isClean,n=e.my,r=go(),i=co(),o=mo(),s=bo(),a=wo(),u=So(),l=Oo(),c=xo(),d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0};function p(e){return"object"===(void 0===e?"undefined":_type_of(e))&&"function"==typeof e.then}function v(e){var t=!1,n=d[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function g(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:v(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function y(e){return e[t]=!1,e.nodes&&e.nodes.forEach(function(e){return y(e)}),e}var m={},b=function(){function e(t,r,i){var s,a=this;if(_class_call_check(this,e),this.stringified=!1,this.processed=!1,"object"!==(void 0===r?"undefined":_type_of(r))||null===r||"root"!==r.type&&"document"!==r.type)if(_instanceof(r,e)||_instanceof(r,u))s=y(r.root),r.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=r.map);else{var c=l;i.syntax&&(c=i.syntax.parse),i.parser&&(c=i.parser),c.parse&&(c=c.parse);try{s=c(r,i)}catch(e){this.processed=!0,this.error=e}s&&!s[n]&&o.rebuild(s)}else s=y(r);this.result=new u(t,s,i),this.helpers=_object_spread_props(_object_spread({},m),{postcss:m,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&e.prepare?_object_spread({},e,e.prepare(a.result)):e})}return _create_class(e,[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(e){return this.async().catch(e)}},{key:"finally",value:function(e){return this.async().then(e,e)}},{key:"getAsyncError",value:function(){throw new Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(e,t){var n=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(n.postcssVersion&&"production"!==process.env.NODE_ENV){var r=n.postcssPlugin,i=n.postcssVersion,o=this.result.processor.version,s=i.split("."),a=o.split(".");(s[0]!==a[0]||parseInt(s[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+r+" uses "+i+". Perhaps this is the source of the error below.")}}else e.plugin=n.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}},{key:"prepareVisitors",value:function(){var e=this;this.listeners={};var t=function(t,n,r){e.listeners[n]||(e.listeners[n]=[]),e.listeners[n].push([t,r])},n=!0,r=!1,i=void 0;try{for(var o,s=this.plugins[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;if("object"===(void 0===a?"undefined":_type_of(a)))for(var u in a){if(!f[u]&&/^[A-Z]/.test(u))throw new Error("Unknown event ".concat(u," in ").concat(a.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!h[u])if("object"===_type_of(a[u]))for(var l in a[u])t(a,"*"===l?u:u+"-"+l.toLowerCase(),a[u][l]);else"function"==typeof a[u]&&t(a,u,a[u])}}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}this.hasListener=Object.keys(this.listeners).length>0}},{key:"runAsync",value:function(){return _async_to_generator(function(){var e,n,r,i,o,s,a,u,l,c,d,f,h,v,y,m,b,w;return _ts_generator(this,function(_){switch(_.label){case 0:e=this,this.plugin=0,n=0,_.label=1;case 1:if(!(n<this.plugins.length))return[3,6];if(r=this.plugins[n],!p(i=this.runOnRoot(r)))return[3,5];_.label=2;case 2:return _.trys.push([2,4,,5]),[4,i];case 3:return _.sent(),[3,5];case 4:throw o=_.sent(),this.handleError(o);case 5:return n++,[3,1];case 6:if(this.prepareVisitors(),!this.hasListener)return[3,22];s=this.result.root,_.label=7;case 7:if(s[t])return[3,14];s[t]=!0,a=[g(s)],_.label=8;case 8:if(!(a.length>0))return[3,13];if(!p(u=this.visitTick(a)))return[3,12];_.label=9;case 9:return _.trys.push([9,11,,12]),[4,u];case 10:return _.sent(),[3,12];case 11:throw l=_.sent(),c=a[a.length-1].node,this.handleError(l,c);case 12:return[3,8];case 13:return[3,7];case 14:if(!this.listeners.OnceExit)return[3,22];d=!0,f=!1,h=void 0,_.label=15;case 15:_.trys.push([15,20,21,22]),y=function(){var t,n,r,i,o;return _ts_generator(this,function(a){switch(a.label){case 0:t=_sliced_to_array(b.value,2),n=t[0],r=t[1],v.result.lastPlugin=n,a.label=1;case 1:return a.trys.push([1,6,,7]),"document"!==s.type?[3,3]:(i=s.nodes.map(function(t){return r(t,e.helpers)}),[4,Promise.all(i)]);case 2:return a.sent(),[3,5];case 3:return[4,r(s,v.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw o=a.sent(),v.handleError(o);case 7:return[2]}})},m=this.listeners.OnceExit[Symbol.iterator](),_.label=16;case 16:return(d=(b=m.next()).done)?[3,19]:(v=this,[5,_ts_values(y())]);case 17:_.sent(),_.label=18;case 18:return d=!0,[3,16];case 19:return[3,22];case 20:return w=_.sent(),f=!0,h=w,[3,22];case 21:try{d||null==m.return||m.return()}finally{if(f)throw h}return[7];case 22:return this.processed=!0,[2,this.stringify()]}})}).call(this)}},{key:"runOnRoot",value:function(e){var t=this;this.result.lastPlugin=e;try{if("object"===(void 0===e?"undefined":_type_of(e))&&e.Once){if("document"===this.result.root.type){var n=this.result.root.nodes.map(function(n){return e.Once(n,t.helpers)});return p(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}},{key:"stringify",value:function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=i;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new r(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();var e=!0,n=!1,r=void 0;try{for(var i,o=this.plugins[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var s=i.value;if(p(this.runOnRoot(s)))throw this.getAsyncError()}}catch(e){n=!0,r=e}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}if(this.prepareVisitors(),this.hasListener){for(var a=this.result.root;!a[t];)a[t]=!0,this.walkSync(a);if(this.listeners.OnceExit)if("document"===a.type){var u=!0,l=!1,c=void 0;try{for(var d,f=a.nodes[Symbol.iterator]();!(u=(d=f.next()).done);u=!0){var h=d.value;this.visitSync(this.listeners.OnceExit,h)}}catch(e){l=!0,c=e}finally{try{u||null==f.return||f.return()}finally{if(l)throw c}}}else this.visitSync(this.listeners.OnceExit,a)}return this.result}},{key:"then",value:function(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||a("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=_sliced_to_array(o.value,2),u=a[0],l=a[1];this.result.lastPlugin=u;var c=void 0;try{c=l(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(p(c))throw this.getAsyncError()}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"visitTick",value:function(e){var n=e[e.length-1],r=n.node,i=n.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&n.visitorIndex<i.length){var o=_sliced_to_array(i[n.visitorIndex],2),s=o[0],a=o[1];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==n.iterator){for(var u,l=n.iterator;u=r.nodes[r.indexes[l]];)if(r.indexes[l]+=1,!u[t])return u[t]=!0,void e.push(g(u));n.iterator=0,delete r.indexes[l]}for(var c=n.events;n.eventIndex<c.length;){var d=c[n.eventIndex];if(n.eventIndex+=1,0===d)return void(r.nodes&&r.nodes.length&&(r[t]=!0,n.iterator=r.getIterator()));if(this.listeners[d])return void(n.visitors=this.listeners[d])}e.pop()}else e.pop()}},{key:"walkSync",value:function(e){var n=this;e[t]=!0;var r=v(e),i=!0,o=!1,s=void 0;try{for(var a,u=r[Symbol.iterator]();!(i=(a=u.next()).done);i=!0){var l=a.value;if(0===l)e.nodes&&e.each(function(e){e[t]||n.walkSync(e)});else{var c=this.listeners[l];if(c&&this.visitSync(c,e.toProxy()))return}}}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}}},{key:"warnings",value:function(){return this.sync().warnings()}},{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e}();return b.registerPostcss=function(e){m=e},uy=b,b.default=b,c.registerLazyResult(b),s.registerLazyResult(b),uy},Ao=function(){if(hy)return fy;hy=1;var e=function(){if(dy)return cy;dy=1;var e=go(),t=co(),n=wo(),r=Oo(),i=So(),o=function(){function o(n,r,s){var a;_class_call_check(this,o),r=r.toString(),this.stringified=!1,this._processor=n,this._css=r,this._opts=s,this._map=void 0;var u=t;this.result=new i(this._processor,a,this._opts),this.result.css=r;var l=this;Object.defineProperty(this.result,"root",{get:function(){return l.root}});var c=new e(u,a,this._opts,r);if(c.isMap()){var d=_sliced_to_array(c.generate(),2),f=d[0],h=d[1];f&&(this.result.css=f),h&&(this.result.map=h)}else c.clearAnnotation(),this.result.css=c.css}return _create_class(o,[{key:"async",value:function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}},{key:"catch",value:function(e){return this.async().catch(e)}},{key:"finally",value:function(e){return this.async().then(e,e)}},{key:"sync",value:function(){if(this.error)throw this.error;return this.result}},{key:"then",value:function(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}},{key:"toString",value:function(){return this._css}},{key:"warnings",value:function(){return[]}},{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),o}();return cy=o,o.default=o,cy}(),t=To(),n=bo(),r=xo(),i=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];_class_call_check(this,n),this.version="8.4.38",this.plugins=this.normalize(e)}return _create_class(n,[{key:"normalize",value:function(e){var t=[],n=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;if(!0===a.postcss?a=a():a.postcss&&(a=a.postcss),"object"===(void 0===a?"undefined":_type_of(a))&&Array.isArray(a.plugins))t=t.concat(a.plugins);else if("object"===(void 0===a?"undefined":_type_of(a))&&a.postcssPlugin)t.push(a);else if("function"==typeof a)t.push(a);else{if("object"!==(void 0===a?"undefined":_type_of(a))||!a.parse&&!a.stringify)throw new Error(a+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}return t}},{key:"process",value:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.plugins.length||r.parser||r.stringifier||r.syntax?new t(this,n,r):new e(this,n,r)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),n}();return fy=i,i.default=i,r.registerProcessor(i),n.registerProcessor(i),fy},Po=function(){if(yy)return gy;yy=1;var e=ao(),t=ho(),n=To(),r=mo(),i=Ao(),o=co(),s=function(){if(vy)return py;vy=1;var e=ho(),t=po(),n=yo(),r=ko(),i=vo(),o=xo(),s=Co();function a(u,l){if(Array.isArray(u))return u.map(function(e){return a(e)});var c=u.inputs,d=_object_without_properties(u,["inputs"]);if(c){l=[];var f=!0,h=!1,p=void 0;try{for(var v,g=c[Symbol.iterator]();!(f=(v=g.next()).done);f=!0){var y=_object_spread_props(_object_spread({},v.value),{__proto__:i.prototype});y.map&&(y.map=_object_spread_props(_object_spread({},y.map),{__proto__:t.prototype})),l.push(y)}}catch(e){h=!0,p=e}finally{try{f||null==g.return||g.return()}finally{if(h)throw p}}}if(d.nodes&&(d.nodes=u.nodes.map(function(e){return a(e,l)})),d.source){var m=d.source,b=m.inputId,w=_object_without_properties(m,["inputId"]);d.source=w,null!=b&&(d.source.input=l[b])}if("root"===d.type)return new o(d);if("decl"===d.type)return new e(d);if("rule"===d.type)return new s(d);if("comment"===d.type)return new n(d);if("atrule"===d.type)return new r(d);throw new Error("Unknown node type: "+u.type)}return py=a,a.default=a,py}(),a=bo(),u=_o(),l=yo(),c=ko(),d=So(),f=vo(),h=Oo(),p=Eo(),v=Co(),g=xo(),y=fo();function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new i(t)}return m.plugin=function(e,t){var n,r=!1;function o(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var a=t.apply(void 0,_to_consumable_array(o));return a.postcssPlugin=e,a.postcssVersion=(new i).version,a}return Object.defineProperty(o,"postcss",{get:function(){return n||(n=o()),n}}),o.process=function(e,t,n){return m([o(n)]).process(e,t)},o},m.stringify=o,m.parse=h,m.fromJSON=s,m.list=p,m.comment=function(e){return new l(e)},m.atRule=function(e){return new c(e)},m.decl=function(e){return new t(e)},m.rule=function(e){return new v(e)},m.root=function(e){return new g(e)},m.document=function(e){return new a(e)},m.CssSyntaxError=e,m.Declaration=t,m.Container=r,m.Processor=i,m.Document=a,m.Comment=l,m.Warning=u,m.AtRule=c,m.Result=d,m.Input=f,m.Rule=v,m.Root=g,m.Node=y,n.registerPostcss(m),gy=m,m.default=m,gy},Ro=function(){if(Ty)return Oy;Ty=1;var e=function(){if(xy)return ky.exports;xy=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return ky.exports=t(),ky.exports.createColors=t,ky.exports}(),t=Iy,n=function(){function n(e,t,r,i,o,s){var a;return _class_call_check(this,n),(a=_call_super(this,n,[e])).name="CssSyntaxError",a.reason=e,o&&(a.file=o),i&&(a.source=i),s&&(a.plugin=s),void 0!==t&&void 0!==r&&("number"==typeof t?(a.line=t,a.column=r):(a.line=t.line,a.column=t.column,a.endLine=r.line,a.endColumn=r.column)),a.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(a,n),a}return _inherits(n,_wrap_native_super(Error)),_create_class(n,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(n){var r=this;if(!this.source)return"";var i=this.source;null==n&&(n=e.isColorSupported),t&&n&&(i=t(i));var o,s,a=i.split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),c=String(l).length;if(n){var d=e.createColors(!0),f=d.bold,h=d.gray,p=d.red;o=function(e){return f(p(e))},s=function(e){return h(e)}}else o=s=function(e){return e};return a.slice(u,l).map(function(e,t){var n=u+1+t,i=" "+(" "+n).slice(-c)+" | ";if(n===r.line){var a=s(i.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," ");return o(">")+s(i)+e+"\n "+a+o("^")}return" "+s(i)+e}).join("\n")}},{key:"toString",value:function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}]),n}();return Oy=n,n.default=n,Oy},Mo=function(){return Py||(Py=1,Ay.isClean=Symbol("isClean"),Ay.my=Symbol("my")),Ay},No=function(){if(My)return Ry;My=1;var e={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var t=function(){function t(e){_class_call_check(this,t),this.builder=e}return _create_class(t,[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{var i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}}},{key:"beforeAfter",value:function(e,t){var n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var s=0;s<i;s++)n+=o}return n}},{key:"block",value:function(e,t){var n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}},{key:"body",value:function(e){for(var t=e.nodes.length-1;t>0&&"comment"===e.nodes[t].type;)t-=1;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}},{key:"comment",value:function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}},{key:"decl",value:function(e,t){var n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}},{key:"document",value:function(e){this.body(e)}},{key:"raw",value:function(t,n,r){var i;if(r||(r=n),n&&void 0!==(i=t.raws[n]))return i;var o=t.parent;if("before"===r){if(!o||"root"===o.type&&o.first===t)return"";if(o&&"document"===o.type)return""}if(!o)return e[r];var s=t.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[r])return s.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var a,u="raw"+((a=r)[0].toUpperCase()+a.slice(1));return this[u]?i=this[u](s,t):s.walk(function(e){if(void 0!==(i=e.raws[n]))return!1}),void 0===i&&(i=e[r]),s.rawCache[r]=i,i}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}},{key:"rawBeforeComment",value:function(e,t){var n;return e.walkComments(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}},{key:"rawBeforeDecl",value:function(e,t){var n;return e.walkDecls(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}},{key:"rawBeforeOpen",value:function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}},{key:"rawBeforeRule",value:function(e){var t;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return(t=n.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}},{key:"rawColon",value:function(e){var t;return e.walkDecls(function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}},{key:"rawEmptyBody",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}},{key:"rawIndent",value:function(e){return e.raws.indent?e.raws.indent:(e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){var i=n.raws.before.split("\n");return t=(t=i[i.length-1]).replace(/\S/g,""),!1}}),t);var t}},{key:"rawSemicolon",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}},{key:"rawValue",value:function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}},{key:"root",value:function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}},{key:"rule",value:function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}},{key:"stringify",value:function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}]),t}();return Ry=t,t.default=t,Ry},Lo=function(){if(Ly)return Ny;Ly=1;var e=No();function t(t,n){new e(n).stringify(t)}return Ny=t,t.default=t,Ny},Do=function(){if(jy)return Dy;jy=1;var e=Mo(),t=e.isClean,n=e.my,r=Ro(),i=No(),o=Lo();function s(e,t){var n=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){var i=e[r],o=void 0===i?"undefined":_type_of(i);"parent"===r&&"object"===o?t&&(n[r]=t):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map(function(e){return s(e,n)}):("object"===o&&null!==i&&(i=s(i)),n[r]=i)}return n}var a=function(){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var i in _class_call_check(this,e),this.raws={},this[t]=!1,this[n]=!0,r)if("nodes"===i){this.nodes=[];var o=!0,s=!1,a=void 0;try{for(var u,l=r[i][Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;"function"==typeof c.clone?this.append(c.clone()):this.append(c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}}else this[i]=r[i]}return _create_class(e,[{key:"addToError",value:function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))}return e}},{key:"after",value:function(e){return this.parent.insertAfter(this,e),this}},{key:"assign",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e)this[t]=e[t];return this}},{key:"before",value:function(e){return this.parent.insertBefore(this,e),this}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=s(this);for(var n in e)t[n]=e[n];return t}},{key:"cloneAfter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertAfter(this,t),t}},{key:"cloneBefore",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertBefore(this,t),t}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.source){var n=this.rangeBy(t),i=n.end,o=n.start;return this.source.input.error(e,{column:o.column,line:o.line},{column:i.column,line:i.line},t)}return new r(e)}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0}}}},{key:"markDirty",value:function(){if(this[t]){this[t]=!1;for(var e=this;e=e.parent;)e[t]=!1}}},{key:"next",value:function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}}},{key:"positionBy",value:function(e,t){var n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){var r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n}},{key:"positionInside",value:function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?(r=1,i+=1):r+=1;return{column:r,line:i}}},{key:"prev",value:function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}}},{key:"rangeBy",value:function(e){var t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var r=this.toString(),i=r.indexOf(e.word);-1!==i&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}},{key:"raw",value:function(e,t){return(new i).raw(this,e,t)}},{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"replaceWith",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this.parent){var r=this,i=!1,o=!0,s=!1,a=void 0;try{for(var u,l=t[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;c===this?i=!0:i?(this.parent.insertAfter(r,c),r=c):this.parent.insertBefore(r,c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}i||this.remove()}return this}},{key:"root",value:function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}},{key:"toJSON",value:function(e,t){var n={},r=null==t;t=t||new Map;var i=0;for(var o in this)if(Object.prototype.hasOwnProperty.call(this,o)&&"parent"!==o&&"proxyCache"!==o){var s=this[o];if(Array.isArray(s))n[o]=s.map(function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&e.toJSON?e.toJSON(null,t):e});else if("object"===(void 0===s?"undefined":_type_of(s))&&s.toJSON)n[o]=s.toJSON(null,t);else if("source"===o){var a=t.get(s.input);null==a&&(a=i,t.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=_to_consumable_array(t.keys()).map(function(e){return e.toJSON()})),n}},{key:"toProxy",value:function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;e.stringify&&(e=e.stringify);var t="";return e(this,function(e){t+=e}),t}},{key:"warn",value:function(e,t,n){var r={node:this};for(var i in n)r[i]=n[i];return e.warn(t,r)}},{key:"proxyOf",get:function(){return this}}]),e}();return Dy=a,a.default=a,Dy},jo=function(){if(Fy)return Uy;Fy=1;var e=function(e){function t(e){var n;return _class_call_check(this,t),e&&void 0!==e.value&&"string"!=typeof e.value&&(e=_object_spread_props(_object_spread({},e),{value:String(e.value)})),(n=_call_super(this,t,[e])).type="decl",n}return _inherits(t,e),_create_class(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),t}(Do());return Uy=e,e.default=e,Uy},Uo=function(){if(Wy)return zy;Wy=1;var e=Iy.SourceMapConsumer,t=Iy.SourceMapGenerator,n=Iy.existsSync,r=Iy.readFileSync,i=Iy.dirname,o=Iy.join;var s=function(){function s(e,t){if(_class_call_check(this,s),!1!==t.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),r&&(this.text=r)}}return _create_class(s,[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}},{key:"decodeInline",value:function(e){var t;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}},{key:"getAnnotationURL",value:function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}},{key:"loadAnnotation",value:function(e){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(t){var n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}}},{key:"loadFile",value:function(e){if(this.root=i(e),n(e))return this.mapFile=e,r(e,"utf-8").toString().trim()}},{key:"loadMap",value:function(n,r){if(!1===r)return!1;if(r){if("string"==typeof r)return r;if("function"!=typeof r){if(_instanceof(r,e))return t.fromSourceMap(r).toString();if(_instanceof(r,t))return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}var s=r(n);if(s){var a=this.loadFile(s);if(!a)throw new Error("Unable to load previous source map: "+s.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var u=this.annotation;return n&&(u=o(i(n),u)),this.loadFile(u)}}}},{key:"startWith",value:function(e,t){return!!e&&e.substr(0,t.length)===t}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}]),s}();return zy=s,s.default=s,zy},Fo=function(){if(Hy)return Vy;Hy=1;var e=Iy.SourceMapConsumer,t=Iy.SourceMapGenerator,n=Iy.fileURLToPath,r=Iy.pathToFileURL,i=Iy.isAbsolute,o=Iy.resolve,s=(qy||(qy=1,By={nanoid:function(){for(var e="",t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21;return function(){for(var n="",r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t;r--;)n+=e[Math.random()*e.length|0];return n}}}),By).nanoid,a=Iy,u=Ro(),l=Uo(),c=Symbol("fromOffsetCache"),d=Boolean(e&&t),f=Boolean(o&&i),h=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_class_call_check(this,e),null==t||"object"===(void 0===t?"undefined":_type_of(t))&&!t.toString)throw new Error("PostCSS received ".concat(t," instead of CSS string"));if(this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!f||/^\w+:\/\//.test(n.from)||i(n.from)?this.file=n.from:this.file=o(n.from)),f&&d){var r=new l(this.css,n);if(r.text){this.map=r;var a=r.consumer().file;!this.file&&a&&(this.file=this.mapResolve(a))}}this.file||(this.id="<input css "+s(6)+">"),this.map&&(this.map.file=this.from)}return _create_class(e,[{key:"error",value:function(e,t,n){var i,o,s,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(t&&"object"===(void 0===t?"undefined":_type_of(t))){var l=t,c=n;if("number"==typeof l.offset){var d=this.fromOffset(l.offset);t=d.line,n=d.col}else t=l.line,n=l.column;if("number"==typeof c.offset){var f=this.fromOffset(c.offset);o=f.line,s=f.col}else o=c.line,s=c.column}else if(!n){var h=this.fromOffset(t);t=h.line,n=h.col}var p=this.origin(t,n,o,s);return(i=p?new u(e,void 0===p.endLine?p.line:{column:p.column,line:p.line},void 0===p.endLine?p.column:{column:p.endColumn,line:p.endLine},p.source,p.file,a.plugin):new u(e,void 0===o?t:{column:n,line:t},void 0===o?n:{column:s,line:o},this.css,this.file,a.plugin)).input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(r&&(i.input.url=r(this.file).toString()),i.input.file=this.file),i}},{key:"fromOffset",value:function(e){var t;if(this[c])t=this[c];else{var n=this.css.split("\n");t=new Array(n.length);for(var r=0,i=0,o=n.length;i<o;i++)t[i]=r,r+=n[i].length+1;this[c]=t}var s=0;if(e>=t[t.length-1])s=t.length-1;else for(var a,u=t.length-2;s<u;)if(e<t[a=s+(u-s>>1)])u=a-1;else{if(!(e>=t[a+1])){s=a;break}s=a+1}return{col:e-t[s]+1,line:s+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}},{key:"origin",value:function(e,t,o,s){if(!this.map)return!1;var a,u,l=this.map.consumer(),c=l.originalPositionFor({column:t,line:e});if(!c.source)return!1;"number"==typeof o&&(a=l.originalPositionFor({column:s,line:o})),u=i(c.source)?r(c.source):new URL(c.source,this.map.consumer().sourceRoot||r(this.map.mapFile));var d={column:c.column,endColumn:a&&a.column,endLine:a&&a.line,line:c.line,url:u.toString()};if("file:"===u.protocol){if(!n)throw new Error("file: protocol is not available in this PostCSS build");d.file=n(u)}var f=l.sourceContentFor(c.source);return f&&(d.source=f),d}},{key:"toJSON",value:function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=_object_spread({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}},{key:"from",get:function(){return this.file||this.id}}]),e}();return Vy=h,h.default=h,a&&a.registerInput&&a.registerInput(h),Vy},Bo=function(){if(Gy)return Ky;Gy=1;var e=Iy.SourceMapConsumer,t=Iy.SourceMapGenerator,n=Iy.dirname,r=Iy.relative,i=Iy.resolve,o=Iy.sep,s=Iy.pathToFileURL,a=Fo(),u=Boolean(e&&t),l=Boolean(n&&i&&r&&o);return Ky=function(){function c(e,t,n,r){_class_call_check(this,c),this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}return _create_class(c,[{key:"addAnnotation",value:function(){var e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}},{key:"applyPrevMaps",value:function(){var t=!0,r=!1,i=void 0;try{for(var o,s=this.previous()[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){var a=o.value,u=this.toUrl(this.path(a.file)),l=a.root||n(a.file),c=void 0;!1===this.mapOpts.sourcesContent?(c=new e(a.text)).sourcesContent&&(c.sourcesContent=null):c=a.consumer(),this.map.applySourceMap(c,u,this.toUrl(this.path(l)))}}catch(e){r=!0,i=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}},{key:"generate",value:function(){if(this.clearAnnotation(),l&&u&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]}},{key:"generateMap",value:function(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var e=this;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});var n,r,i=1,o=1,s="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(t,u,l){if(e.css+=t,u&&"end"!==l&&(a.generated.line=i,a.generated.column=o-1,u.source&&u.source.start?(a.source=e.sourcePath(u),a.original.line=u.source.start.line,a.original.column=u.source.start.column-1,e.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,e.map.addMapping(a))),(n=t.match(/\n/g))?(i+=n.length,r=t.lastIndexOf("\n"),o=t.length-r):o+=t.length,u&&"start"!==l){var c=u.parent||{raws:{}};("decl"===u.type||"atrule"===u.type&&!u.nodes)&&u===c.last&&!c.raws.semicolon||(u.source&&u.source.end?(a.source=e.sourcePath(u),a.original.line=u.source.end.line,a.original.column=u.source.end.column-1,a.generated.line=i,a.generated.column=o-2,e.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,a.generated.line=i,a.generated.column=o-1,e.map.addMapping(a)))}})}},{key:"isAnnotation",value:function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))}},{key:"isMap",value:function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}},{key:"isSourcesContent",value:function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var o=this.opts.to?n(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=n(i(o,this.mapOpts.annotation)));var s=r(o,e);return this.memoizedPaths.set(e,s),s}},{key:"previous",value:function(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;e.previousMaps.includes(n)||e.previousMaps.push(n)}});else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}},{key:"setSourcesContent",value:function(){var e=this,t={};if(this.root)this.root.walk(function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.usesFileUrls?e.toFileUrl(r):e.toUrl(e.path(r));e.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){var n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}},{key:"sourcePath",value:function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}},{key:"toBase64",value:function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}},{key:"toFileUrl",value:function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(s){var n=s(e).toString();return this.memoizedFileURLs.set(e,n),n}throw new Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));var n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}]),c}()},qo=function(){if($y)return Jy;$y=1;var e=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t,[e])).type="comment",n}return _inherits(t,e),t}(Do());return Jy=e,e.default=e,Jy},zo=function(){if(Xy)return Qy;Xy=1;var e,t,n,r,i=Mo(),o=i.isClean,s=i.my,a=jo(),u=qo();function l(e){return e.map(function(e){return e.nodes&&(e.nodes=l(e.nodes)),delete e.source,e})}function c(e){if(e[o]=!1,e.proxyOf.nodes){var t=!0,n=!1,r=void 0;try{for(var i,s=e.proxyOf.nodes[Symbol.iterator]();!(t=(i=s.next()).done);t=!0){c(i.value)}}catch(e){n=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(n)throw r}}}}var d=function(r){function i(){return _class_call_check(this,i),_call_super(this,i,arguments)}return _inherits(i,r),_create_class(i,[{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value,l=this.normalize(u,this.last),c=!0,d=!1,f=void 0;try{for(var h,p=l[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;this.proxyOf.nodes.push(v)}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if(_get(_get_prototype_of(i.prototype),"cleanRaws",this).call(this,e),this.nodes){var t=!0,n=!1,r=void 0;try{for(var o,s=this.nodes[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){o.value.cleanRaws(e)}}catch(e){n=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(n)throw r}}}}},{key:"each",value:function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"getIterator",value:function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o;return(o=e)[t].apply(o,_to_consumable_array(r.map(function(e){return"function"==typeof e?function(t,n){return e(t.toProxy(),n)}:e})))}:"every"===t||"some"===t?function(n){return e[t](function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return n.apply(void 0,[e.toProxy()].concat(_to_consumable_array(r)))})}:"root"===t?function(){return e.root().toProxy()}:"nodes"===t?e.nodes.map(function(e){return e.toProxy()}):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0}}}},{key:"index",value:function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}},{key:"insertAfter",value:function(e,t){var n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);var i,o=!0,s=!1,a=void 0;try{for(var u,l=r[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;this.proxyOf.nodes.splice(n+1,0,c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}for(var d in this.indexes)n<(i=this.indexes[d])&&(this.indexes[d]=i+r.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n=this.index(e),r=0===n&&"prepend",i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);var o,s=!0,a=!1,u=void 0;try{for(var l,c=i[Symbol.iterator]();!(s=(l=c.next()).done);s=!0){var d=l.value;this.proxyOf.nodes.splice(n,0,d)}}catch(e){a=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(a)throw u}}for(var f in this.indexes)n<=(o=this.indexes[f])&&(this.indexes[f]=o+i.length);return this.markDirty(),this}},{key:"normalize",value:function(r,d){var f=this;if("string"==typeof r)r=l(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r)){r=r.slice(0);var h=!0,p=!1,v=void 0;try{for(var g,y=r[Symbol.iterator]();!(h=(g=y.next()).done);h=!0){var m=g.value;m.parent&&m.parent.removeChild(m,"ignore")}}catch(e){p=!0,v=e}finally{try{h||null==y.return||y.return()}finally{if(p)throw v}}}else if("root"===r.type&&"document"!==this.type){r=r.nodes.slice(0);var b=!0,w=!1,_=void 0;try{for(var S,k=r[Symbol.iterator]();!(b=(S=k.next()).done);b=!0){var x=S.value;x.parent&&x.parent.removeChild(x,"ignore")}}catch(e){w=!0,_=e}finally{try{b||null==k.return||k.return()}finally{if(w)throw _}}}else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new a(r)]}else if(r.selector)r=[new t(r)];else if(r.name)r=[new n(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new u(r)]}var E=r.map(function(e){return e[s]||i.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[o]&&c(e),void 0===e.raws.before&&d&&void 0!==d.raws.before&&(e.raws.before=d.raws.before.replace(/\S/g,"")),e.parent=f.proxyOf,e});return E}},{key:"prepend",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.reverse();var r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value,l=this.normalize(u,this.first,"prepend").reverse(),c=!0,d=!1,f=void 0;try{for(var h,p=l[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;this.proxyOf.nodes.unshift(v)}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}for(var g in this.indexes)this.indexes[g]=this.indexes[g]+l.length}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return this.markDirty(),this}},{key:"push",value:function(e){return e.parent=this,this.proxyOf.nodes.push(e),this}},{key:"removeAll",value:function(){var e=!0,t=!1,n=void 0;try{for(var r,i=this.proxyOf.nodes[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){r.value.parent=void 0}}catch(e){t=!0,n=e}finally{try{e||null==i.return||i.return()}finally{if(t)throw n}}return this.proxyOf.nodes=[],this.markDirty(),this}},{key:"removeChild",value:function(e){var t;for(var n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}},{key:"replaceValues",value:function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"walk",value:function(e){return this.each(function(t,n){var r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}},{key:"walkAtRules",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("atrule"===e.type)return t(e,n)}))}},{key:"walkComments",value:function(e){return this.walk(function(t,n){if("comment"===t.type)return e(t,n)})}},{key:"walkDecls",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("decl"===e.type)return t(e,n)}))}},{key:"walkRules",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("rule"===e.type)return t(e,n)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),i}(Do());return d.registerParse=function(t){e=t},d.registerRule=function(e){t=e},d.registerAtRule=function(e){n=e},d.registerRoot=function(e){r=e},Qy=d,d.default=d,d.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,n.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,a.prototype):"comment"===e.type?Object.setPrototypeOf(e,u.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[s]=!0,e.nodes&&e.nodes.forEach(function(e){d.rebuild(e)})},Qy},Wo=function(){if(Zy)return Yy;Zy=1;var e,t,n=function(n){function r(e){var t;return _class_call_check(this,r),(t=_call_super(this,r,[_object_spread({type:"document"},e)])).nodes||(t.nodes=[]),t}return _inherits(r,n),_create_class(r,[{key:"toResult",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(new t,this,n).stringify()}}]),r}(zo());return n.registerLazyResult=function(t){e=t},n.registerProcessor=function(e){t=e},Yy=n,n.default=n,Yy},Vo=function(){if(tm)return em;tm=1;var e={};return em=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}},Ho=function(){if(rm)return nm;rm=1;var e=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_class_call_check(this,e),this.type="warning",this.text=t,n.node&&n.node.source){var r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in n)this[i]=n[i]}return _create_class(e,[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),e}();return nm=e,e.default=e,nm},Ko=function(){if(om)return im;om=1;var e=Ho(),t=function(){function t(e,n,r){_class_call_check(this,t),this.processor=e,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}return _create_class(t,[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);var r=new e(t,n);return this.messages.push(r),r}},{key:"warnings",value:function(){return this.messages.filter(function(e){return"warning"===e.type})}},{key:"content",get:function(){return this.css}}]),t}();return im=t,t.default=t,im},Go=function(){if(lm)return um;lm=1;var e=zo(),t=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t,[e])).type="atrule",n}return _inherits(t,e),_create_class(t,[{key:"append",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=_get(_get_prototype_of(t.prototype),"append",this)).call.apply(i,[this].concat(_to_consumable_array(n)))}},{key:"prepend",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=_get(_get_prototype_of(t.prototype),"prepend",this)).call.apply(i,[this].concat(_to_consumable_array(n)))}}]),t}(e);return um=t,t.default=t,e.registerAtRule(t),um},Jo=function(){if(dm)return cm;dm=1;var e,t,n=zo(),r=function(n){function r(e){var t;return _class_call_check(this,r),(t=_call_super(this,r,[e])).type="root",t.nodes||(t.nodes=[]),t}return _inherits(r,n),_create_class(r,[{key:"normalize",value:function(e,t,n){var i=_get(_get_prototype_of(r.prototype),"normalize",this).call(this,e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t){var o=!0,s=!1,a=void 0;try{for(var u,l=i[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){u.value.raws.before=t.raws.before}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}}return i}},{key:"removeChild",value:function(e,t){var n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),_get(_get_prototype_of(r.prototype),"removeChild",this).call(this,e)}},{key:"toResult",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(new t,this,n).stringify()}}]),r}(n);return r.registerLazyResult=function(t){e=t},r.registerProcessor=function(e){t=e},cm=r,r.default=r,n.registerRoot(r),cm},$o=function(){if(hm)return fm;hm=1;var e={comma:function(t){return e.split(t,[","],!0)},space:function(t){return e.split(t,[" ","\n","\t"])},split:function(e,t,n){var r=[],i="",o=!1,s=0,a=!1,u="",l=!1,c=!0,d=!1,f=void 0;try{for(var h,p=e[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;l?l=!1:"\\"===v?l=!0:a?v===u&&(a=!1):'"'===v||"'"===v?(a=!0,u=v):"("===v?s+=1:")"===v?s>0&&(s-=1):0===s&&t.includes(v)&&(o=!0),o?(""!==i&&r.push(i.trim()),i="",o=!1):i+=v}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}return(n||""!==i)&&r.push(i.trim()),r}};return fm=e,e.default=e,fm},Qo=function(){if(vm)return pm;vm=1;var e=zo(),t=$o(),n=function(e){function n(e){var t;return _class_call_check(this,n),(t=_call_super(this,n,[e])).type="rule",t.nodes||(t.nodes=[]),t}return _inherits(n,e),_create_class(n,[{key:"selectors",get:function(){return t.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}]),n}(e);return pm=n,n.default=n,e.registerRule(n),pm},Xo=function(){if(ym)return gm;ym=1;var e=jo(),t=function(){if(am)return sm;am=1;var e="'".charCodeAt(0),t='"'.charCodeAt(0),n="\\".charCodeAt(0),r="/".charCodeAt(0),i="\n".charCodeAt(0),o=" ".charCodeAt(0),s="\f".charCodeAt(0),a="\t".charCodeAt(0),u="\r".charCodeAt(0),l="[".charCodeAt(0),c="]".charCodeAt(0),d="(".charCodeAt(0),f=")".charCodeAt(0),h="{".charCodeAt(0),p="}".charCodeAt(0),v=";".charCodeAt(0),g="*".charCodeAt(0),y=":".charCodeAt(0),m="@".charCodeAt(0),b=/[\t\n\f\r "#'()/;[\\\]{}]/g,w=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return sm=function(k){var x,E,C,I,O,T,A,P,R,M,N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},L=k.css.valueOf(),D=N.ignoreErrors,j=L.length,U=0,F=[],B=[];function q(e){throw k.error("Unclosed "+e,U)}return{back:function(e){B.push(e)},endOfFile:function(){return 0===B.length&&U>=j},nextToken:function(k){if(B.length)return B.pop();if(!(U>=j)){var N=!!k&&k.ignoreUnclosed;switch(x=L.charCodeAt(U)){case i:case o:case a:case u:case s:E=U;do{E+=1,x=L.charCodeAt(E)}while(x===o||x===i||x===a||x===u||x===s);M=["space",L.slice(U,E)],U=E-1;break;case l:case c:case h:case p:case y:case v:case f:var z=String.fromCharCode(x);M=[z,z,U];break;case d:if(P=F.length?F.pop()[1]:"",R=L.charCodeAt(U+1),"url"===P&&R!==e&&R!==t&&R!==o&&R!==i&&R!==a&&R!==s&&R!==u){E=U;do{if(T=!1,-1===(E=L.indexOf(")",E+1))){if(D||N){E=U;break}q("bracket")}for(A=E;L.charCodeAt(A-1)===n;)A-=1,T=!T}while(T);M=["brackets",L.slice(U,E+1),U,E],U=E}else E=L.indexOf(")",U+1),I=L.slice(U,E+1),-1===E||_.test(I)?M=["(","(",U]:(M=["brackets",I,U,E],U=E);break;case e:case t:C=x===e?"'":'"',E=U;do{if(T=!1,-1===(E=L.indexOf(C,E+1))){if(D||N){E=U+1;break}q("string")}for(A=E;L.charCodeAt(A-1)===n;)A-=1,T=!T}while(T);M=["string",L.slice(U,E+1),U,E],U=E;break;case m:b.lastIndex=U+1,b.test(L),E=0===b.lastIndex?L.length-1:b.lastIndex-2,M=["at-word",L.slice(U,E+1),U,E],U=E;break;case n:for(E=U,O=!0;L.charCodeAt(E+1)===n;)E+=1,O=!O;if(x=L.charCodeAt(E+1),O&&x!==r&&x!==o&&x!==i&&x!==a&&x!==u&&x!==s&&(E+=1,S.test(L.charAt(E)))){for(;S.test(L.charAt(E+1));)E+=1;L.charCodeAt(E+1)===o&&(E+=1)}M=["word",L.slice(U,E+1),U,E],U=E;break;default:x===r&&L.charCodeAt(U+1)===g?(0===(E=L.indexOf("*/",U+2)+1)&&(D||N?E=L.length:q("comment")),M=["comment",L.slice(U,E+1),U,E],U=E):(w.lastIndex=U+1,w.test(L),E=0===w.lastIndex?L.length-1:w.lastIndex-2,M=["word",L.slice(U,E+1),U,E],F.push(M),U=E)}return U++,M}},position:function(){return U}}},sm}(),n=qo(),r=Go(),i=Jo(),o=Qo(),s={empty:!0,space:!0};return gm=function(){function a(e){_class_call_check(this,a),this.input=e,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}return _create_class(a,[{key:"atrule",value:function(e){var t,n,i,o=new r;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);for(var s=!1,a=!1,u=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(u.length>0){for(n=u[i=u.length-1];n&&"space"===n[0];)n=u[--i];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(e);break}u.push(e)}else u.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(o.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(o,"params",u),s&&(e=u[u.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}},{key:"checkMissedSemicolon",value:function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;i>=0&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},{key:"colon",value:function(e){var t,n,r,i=0,o=!0,s=!1,a=void 0;try{for(var u,l=e.entries()[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=_sliced_to_array(u.value,2),d=c[0];if("("===(n=(t=c[1])[0])&&(i+=1),")"===n&&(i-=1),0===i&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return d}this.doubleColon(t)}r=t}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}return!1}},{key:"comment",value:function(e){var t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{var i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}},{key:"createTokenizer",value:function(){this.tokenizer=t(this.input)}},{key:"decl",value:function(t,n){var r=new e;this.init(r,t[0][2]);var i,o=t[t.length-1];for(";"===o[0]&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(o[3]||o[2]||function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=n[3]||n[2];if(r)return r}}(t)),r.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){var s=t[0][0];if(":"===s||"space"===s||"comment"===s)break;r.prop+=t.shift()[1]}for(r.raws.between="";t.length;){if(":"===(i=t.shift())[0]){r.raws.between+=i[1];break}"word"===i[0]&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));for(var a,u=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)u.push(t.shift());this.precheckMissedSemicolon(t);for(var l=t.length-1;l>=0;l--){if("!important"===(i=t[l])[1].toLowerCase()){r.important=!0;var c=this.stringFrom(t,l);" !important"!==(c=this.spacesFromEnd(t)+c)&&(r.raws.important=c);break}if("important"===i[1].toLowerCase()){for(var d=t.slice(0),f="",h=l;h>0;h--){var p=d[h][0];if(0===f.trim().indexOf("!")&&"space"!==p)break;f=d.pop()[1]+f}0===f.trim().indexOf("!")&&(r.important=!0,r.raws.important=f,t=d)}if("space"!==i[0]&&"comment"!==i[0])break}var v=t.some(function(e){return"space"!==e[0]&&"comment"!==e[0]});v&&(r.raws.between+=u.map(function(e){return e[1]}).join(""),u=[]),this.raw(r,"value",u.concat(t),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}},{key:"doubleColon",value:function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}},{key:"emptyRule",value:function(e){var t=new o;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}},{key:"end",value:function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}},{key:"getPosition",value:function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}},{key:"init",value:function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}},{key:"other",value:function(e){for(var t=!1,n=null,r=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],u=e;u;){if(n=u[0],a.push(u),"("===n||"["===n)i||(i=u),o.push("("===n?")":"]");else if(s&&r&&"{"===n)i||(i=u),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(a,s);break}if("{"===n)return void this.rule(a);if("}"===n){this.tokenizer.back(a.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!s)for(;a.length&&("space"===(u=a[a.length-1][0])||"comment"===u);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}},{key:"parse",value:function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(e,t,n,r){for(var i,o,a,u,l=n.length,c="",d=!0,f=0;f<l;f+=1)"space"!==(o=(i=n[f])[0])||f!==l-1||r?"comment"===o?(u=n[f-1]?n[f-1][0]:"empty",a=n[f+1]?n[f+1][0]:"empty",s[u]||s[a]||","===c.slice(-1)?d=!1:c+=i[1]):c+=i[1]:d=!1;if(!d){var h=n.reduce(function(e,t){return e+t[1]},"");e.raws[t]={raw:h,value:c}}e[t]=c}},{key:"rule",value:function(e){e.pop();var t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}},{key:"spacesAndCommentsFromEnd",value:function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}},{key:"spacesAndCommentsFromStart",value:function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}},{key:"spacesFromEnd",value:function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}},{key:"stringFrom",value:function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}},{key:"unclosedBlock",value:function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}},{key:"unclosedBracket",value:function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}},{key:"unexpectedClose",value:function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}},{key:"unknownWord",value:function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}},{key:"unnamedAtrule",value:function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}]),a}()},Yo=function(){if(bm)return mm;bm=1;var e=zo(),t=Xo(),n=Fo();function r(e,r){var i=new n(e,r),o=new t(i);try{o.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&r&&r.from&&(/\.scss$/i.test(r.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(r.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(r.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return o.root}return mm=r,r.default=r,e.registerParse(r),mm},Zo=function(){if(_m)return wm;_m=1;var e=Mo(),t=e.isClean,n=e.my,r=Bo(),i=Lo(),o=zo(),s=Wo(),a=Vo(),u=Ko(),l=Yo(),c=Jo(),d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0};function p(e){return"object"===(void 0===e?"undefined":_type_of(e))&&"function"==typeof e.then}function v(e){var t=!1,n=d[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function g(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:v(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function y(e){return e[t]=!1,e.nodes&&e.nodes.forEach(function(e){return y(e)}),e}var m={},b=function(){function e(t,r,i){var s,a=this;if(_class_call_check(this,e),this.stringified=!1,this.processed=!1,"object"!==(void 0===r?"undefined":_type_of(r))||null===r||"root"!==r.type&&"document"!==r.type)if(_instanceof(r,e)||_instanceof(r,u))s=y(r.root),r.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=r.map);else{var c=l;i.syntax&&(c=i.syntax.parse),i.parser&&(c=i.parser),c.parse&&(c=c.parse);try{s=c(r,i)}catch(e){this.processed=!0,this.error=e}s&&!s[n]&&o.rebuild(s)}else s=y(r);this.result=new u(t,s,i),this.helpers=_object_spread_props(_object_spread({},m),{postcss:m,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&e.prepare?_object_spread({},e,e.prepare(a.result)):e})}return _create_class(e,[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(e){return this.async().catch(e)}},{key:"finally",value:function(e){return this.async().then(e,e)}},{key:"getAsyncError",value:function(){throw new Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(e,t){var n=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(n.postcssVersion&&"production"!==process.env.NODE_ENV){var r=n.postcssPlugin,i=n.postcssVersion,o=this.result.processor.version,s=i.split("."),a=o.split(".");(s[0]!==a[0]||parseInt(s[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+r+" uses "+i+". Perhaps this is the source of the error below.")}}else e.plugin=n.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}},{key:"prepareVisitors",value:function(){var e=this;this.listeners={};var t=function(t,n,r){e.listeners[n]||(e.listeners[n]=[]),e.listeners[n].push([t,r])},n=!0,r=!1,i=void 0;try{for(var o,s=this.plugins[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;if("object"===(void 0===a?"undefined":_type_of(a)))for(var u in a){if(!f[u]&&/^[A-Z]/.test(u))throw new Error("Unknown event ".concat(u," in ").concat(a.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!h[u])if("object"===_type_of(a[u]))for(var l in a[u])t(a,"*"===l?u:u+"-"+l.toLowerCase(),a[u][l]);else"function"==typeof a[u]&&t(a,u,a[u])}}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}this.hasListener=Object.keys(this.listeners).length>0}},{key:"runAsync",value:function(){return _async_to_generator(function(){var e,n,r,i,o,s,a,u,l,c,d,f,h,v,y,m,b,w;return _ts_generator(this,function(_){switch(_.label){case 0:e=this,this.plugin=0,n=0,_.label=1;case 1:if(!(n<this.plugins.length))return[3,6];if(r=this.plugins[n],!p(i=this.runOnRoot(r)))return[3,5];_.label=2;case 2:return _.trys.push([2,4,,5]),[4,i];case 3:return _.sent(),[3,5];case 4:throw o=_.sent(),this.handleError(o);case 5:return n++,[3,1];case 6:if(this.prepareVisitors(),!this.hasListener)return[3,22];s=this.result.root,_.label=7;case 7:if(s[t])return[3,14];s[t]=!0,a=[g(s)],_.label=8;case 8:if(!(a.length>0))return[3,13];if(!p(u=this.visitTick(a)))return[3,12];_.label=9;case 9:return _.trys.push([9,11,,12]),[4,u];case 10:return _.sent(),[3,12];case 11:throw l=_.sent(),c=a[a.length-1].node,this.handleError(l,c);case 12:return[3,8];case 13:return[3,7];case 14:if(!this.listeners.OnceExit)return[3,22];d=!0,f=!1,h=void 0,_.label=15;case 15:_.trys.push([15,20,21,22]),y=function(){var t,n,r,i,o;return _ts_generator(this,function(a){switch(a.label){case 0:t=_sliced_to_array(b.value,2),n=t[0],r=t[1],v.result.lastPlugin=n,a.label=1;case 1:return a.trys.push([1,6,,7]),"document"!==s.type?[3,3]:(i=s.nodes.map(function(t){return r(t,e.helpers)}),[4,Promise.all(i)]);case 2:return a.sent(),[3,5];case 3:return[4,r(s,v.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw o=a.sent(),v.handleError(o);case 7:return[2]}})},m=this.listeners.OnceExit[Symbol.iterator](),_.label=16;case 16:return(d=(b=m.next()).done)?[3,19]:(v=this,[5,_ts_values(y())]);case 17:_.sent(),_.label=18;case 18:return d=!0,[3,16];case 19:return[3,22];case 20:return w=_.sent(),f=!0,h=w,[3,22];case 21:try{d||null==m.return||m.return()}finally{if(f)throw h}return[7];case 22:return this.processed=!0,[2,this.stringify()]}})}).call(this)}},{key:"runOnRoot",value:function(e){var t=this;this.result.lastPlugin=e;try{if("object"===(void 0===e?"undefined":_type_of(e))&&e.Once){if("document"===this.result.root.type){var n=this.result.root.nodes.map(function(n){return e.Once(n,t.helpers)});return p(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}},{key:"stringify",value:function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=i;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new r(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();var e=!0,n=!1,r=void 0;try{for(var i,o=this.plugins[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var s=i.value;if(p(this.runOnRoot(s)))throw this.getAsyncError()}}catch(e){n=!0,r=e}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}if(this.prepareVisitors(),this.hasListener){for(var a=this.result.root;!a[t];)a[t]=!0,this.walkSync(a);if(this.listeners.OnceExit)if("document"===a.type){var u=!0,l=!1,c=void 0;try{for(var d,f=a.nodes[Symbol.iterator]();!(u=(d=f.next()).done);u=!0){var h=d.value;this.visitSync(this.listeners.OnceExit,h)}}catch(e){l=!0,c=e}finally{try{u||null==f.return||f.return()}finally{if(l)throw c}}}else this.visitSync(this.listeners.OnceExit,a)}return this.result}},{key:"then",value:function(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||a("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=_sliced_to_array(o.value,2),u=a[0],l=a[1];this.result.lastPlugin=u;var c=void 0;try{c=l(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(p(c))throw this.getAsyncError()}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"visitTick",value:function(e){var n=e[e.length-1],r=n.node,i=n.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&n.visitorIndex<i.length){var o=_sliced_to_array(i[n.visitorIndex],2),s=o[0],a=o[1];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==n.iterator){for(var u,l=n.iterator;u=r.nodes[r.indexes[l]];)if(r.indexes[l]+=1,!u[t])return u[t]=!0,void e.push(g(u));n.iterator=0,delete r.indexes[l]}for(var c=n.events;n.eventIndex<c.length;){var d=c[n.eventIndex];if(n.eventIndex+=1,0===d)return void(r.nodes&&r.nodes.length&&(r[t]=!0,n.iterator=r.getIterator()));if(this.listeners[d])return void(n.visitors=this.listeners[d])}e.pop()}else e.pop()}},{key:"walkSync",value:function(e){var n=this;e[t]=!0;var r=v(e),i=!0,o=!1,s=void 0;try{for(var a,u=r[Symbol.iterator]();!(i=(a=u.next()).done);i=!0){var l=a.value;if(0===l)e.nodes&&e.each(function(e){e[t]||n.walkSync(e)});else{var c=this.listeners[l];if(c&&this.visitSync(c,e.toProxy()))return}}}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}}},{key:"warnings",value:function(){return this.sync().warnings()}},{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e}();return b.registerPostcss=function(e){m=e},wm=b,b.default=b,c.registerLazyResult(b),s.registerLazyResult(b),wm},es=function(){if(Em)return xm;Em=1;var e=function(){if(km)return Sm;km=1;var e=Bo(),t=Lo(),n=Vo(),r=Yo(),i=Ko(),o=function(){function o(n,r,s){var a;_class_call_check(this,o),r=r.toString(),this.stringified=!1,this._processor=n,this._css=r,this._opts=s,this._map=void 0;var u=t;this.result=new i(this._processor,a,this._opts),this.result.css=r;var l=this;Object.defineProperty(this.result,"root",{get:function(){return l.root}});var c=new e(u,a,this._opts,r);if(c.isMap()){var d=_sliced_to_array(c.generate(),2),f=d[0],h=d[1];f&&(this.result.css=f),h&&(this.result.map=h)}else c.clearAnnotation(),this.result.css=c.css}return _create_class(o,[{key:"async",value:function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}},{key:"catch",value:function(e){return this.async().catch(e)}},{key:"finally",value:function(e){return this.async().then(e,e)}},{key:"sync",value:function(){if(this.error)throw this.error;return this.result}},{key:"then",value:function(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}},{key:"toString",value:function(){return this._css}},{key:"warnings",value:function(){return[]}},{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),o}();return Sm=o,o.default=o,Sm}(),t=Zo(),n=Wo(),r=Jo(),i=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];_class_call_check(this,n),this.version="8.4.38",this.plugins=this.normalize(e)}return _create_class(n,[{key:"normalize",value:function(e){var t=[],n=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;if(!0===a.postcss?a=a():a.postcss&&(a=a.postcss),"object"===(void 0===a?"undefined":_type_of(a))&&Array.isArray(a.plugins))t=t.concat(a.plugins);else if("object"===(void 0===a?"undefined":_type_of(a))&&a.postcssPlugin)t.push(a);else if("function"==typeof a)t.push(a);else{if("object"!==(void 0===a?"undefined":_type_of(a))||!a.parse&&!a.stringify)throw new Error(a+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}return t}},{key:"process",value:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.plugins.length||r.parser||r.stringifier||r.syntax?new t(this,n,r):new e(this,n,r)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),n}();return xm=i,i.default=i,r.registerProcessor(i),n.registerProcessor(i),xm},ts=function(){if(Tm)return Om;Tm=1;var e=Ro(),t=jo(),n=Zo(),r=zo(),i=es(),o=Lo(),s=function(){if(Im)return Cm;Im=1;var e=jo(),t=Uo(),n=qo(),r=Go(),i=Fo(),o=Jo(),s=Qo();function a(u,l){if(Array.isArray(u))return u.map(function(e){return a(e)});var c=u.inputs,d=_object_without_properties(u,["inputs"]);if(c){l=[];var f=!0,h=!1,p=void 0;try{for(var v,g=c[Symbol.iterator]();!(f=(v=g.next()).done);f=!0){var y=_object_spread_props(_object_spread({},v.value),{__proto__:i.prototype});y.map&&(y.map=_object_spread_props(_object_spread({},y.map),{__proto__:t.prototype})),l.push(y)}}catch(e){h=!0,p=e}finally{try{f||null==g.return||g.return()}finally{if(h)throw p}}}if(d.nodes&&(d.nodes=u.nodes.map(function(e){return a(e,l)})),d.source){var m=d.source,b=m.inputId,w=_object_without_properties(m,["inputId"]);d.source=w,null!=b&&(d.source.input=l[b])}if("root"===d.type)return new o(d);if("decl"===d.type)return new e(d);if("rule"===d.type)return new s(d);if("comment"===d.type)return new n(d);if("atrule"===d.type)return new r(d);throw new Error("Unknown node type: "+u.type)}return Cm=a,a.default=a,Cm}(),a=Wo(),u=Ho(),l=qo(),c=Go(),d=Ko(),f=Fo(),h=Yo(),p=$o(),v=Qo(),g=Jo(),y=Do();function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new i(t)}return m.plugin=function(e,t){var n,r=!1;function o(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var a=t.apply(void 0,_to_consumable_array(o));return a.postcssPlugin=e,a.postcssVersion=(new i).version,a}return Object.defineProperty(o,"postcss",{get:function(){return n||(n=o()),n}}),o.process=function(e,t,n){return m([o(n)]).process(e,t)},o},m.stringify=o,m.parse=h,m.fromJSON=s,m.list=p,m.comment=function(e){return new l(e)},m.atRule=function(e){return new c(e)},m.decl=function(e){return new t(e)},m.rule=function(e){return new v(e)},m.root=function(e){return new g(e)},m.document=function(e){return new a(e)},m.CssSyntaxError=e,m.Declaration=t,m.Container=r,m.Processor=i,m.Document=a,m.Comment=l,m.Warning=u,m.AtRule=c,m.Result=d,m.Input=f,m.Rule=v,m.Root=g,m.Node=y,n.registerPostcss(m),Om=m,m.default=m,Om},ns=function(e){if(Lm[e])return Lm[e];var t=function(e){var t,n,r=null==(n=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:n.call(t,e);return r&&globalThis[r]?globalThis[r]:void 0}(e)||globalThis[e],n=t.prototype,r=e in Mm?Mm[e]:void 0,i=Boolean(r&&r.every(function(e){var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),o=e in Nm?Nm[e]:void 0,s=Boolean(o&&o.every(function(e){var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))}));if(i&&s)return Lm[e]=t.prototype,t.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var u=a.contentWindow;if(!u)return t.prototype;var l=u[e].prototype;return document.body.removeChild(a),l?Lm[e]=l:n}catch(e){return n}},rs=function(e,t,n){var r,i="".concat(e,".").concat(String(n));if(Dm[i])return Dm[i].call(t);var o=ns(e),s=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return s?(Dm[i]=s,s.call(t)):t[n]},is=function(e,t,n){var r="".concat(e,".").concat(String(n));if(jm[r])return jm[r].bind(t);var i=ns(e)[n];return"function"!=typeof i?t[n]:(jm[r]=i,i.bind(t))},os=function(e){return rs("Node",e,"childNodes")},ss=function(e){return rs("Node",e,"parentNode")},as=function(e){return rs("Node",e,"parentElement")},us=function(e){return rs("Node",e,"textContent")},ls=function(e,t){return is("Node",e,"contains")(t)},cs=function(e){return is("Node",e,"getRootNode")()},ds=function(e){return e&&"host"in e?rs("ShadowRoot",e,"host"):null},fs=function(e){return e.styleSheets},hs=function(e){return e&&"shadowRoot"in e?rs("Element",e,"shadowRoot"):null},ps=function(e,t){return rs("Element",e,"querySelector")(t)},vs=function(e,t){return rs("Element",e,"querySelectorAll")(t)},gs=function(){return ns("MutationObserver").constructor},ys=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}},ms=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=0;return function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];var u=Date.now();i||!1!==n.leading||(i=u);var l=t-(u-i),c=this;l<=0||l>t?(r&&(clearTimeout(r),r=null),i=u,e.apply(c,s)):r||!1===n.trailing||(r=setTimeout(function(){i=!1===n.leading?0:Date.now(),r=null,e.apply(c,s)},l))}},bs=function(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch(e){return function(){}}},ws=function(e){var t,n,r,i,o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=Um.parentElement(o.body))?void 0:t.scrollLeft)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(r=Um.parentElement(o.body))?void 0:r.scrollTop)||(null==(i=null==o?void 0:o.body)?void 0:i.scrollTop)||0}},_s=function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},Ss=function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},ks=function(e){return e?e.nodeType===e.ELEMENT_NODE?e:Um.parentElement(e):null},xs=function(e,t,n,r){if(!e)return!1;var i=ks(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t))return!0;if(r&&null!==i.closest("."+t))return!0}else if(Ob(i,t,r))return!0}catch(e){}if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1},Es=function(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||t.getId(e)===og},Cs=function(e){return Boolean(e.changedTouches)},Is=function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},Os=function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},Ts=function(e){return!!e&&(_instanceof(e,Rm)&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Um.shadowRoot(e)))},As=function(e){var t,n=null;return"getRootNode"in e&&(null==(t=Um.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Um.host(Um.getRootNode(e))&&(n=Um.host(Um.getRootNode(e))),n},Ps=function(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=As(n);)n=t;return n}(e);return Um.contains(t,n)},Rs=function(e){var t=e.ownerDocument;return!!t&&(Um.contains(t,e)||Ps(e))},Ms=function(e){return"__ln"in e},Ns=function(e,t,n){return 0!==e.size&&Ls(e,t)},Ls=function(e,t,n){var r=Um.parentNode(t);return!!r&&e.has(r)},Ds=function(e,t){return 0!==e.size&&Mb(e,t)},js=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];try{return e.apply(void 0,_to_consumable_array(n))}catch(e){try{e._external_=!0}catch(e){}throw e}}},Us=function(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target},Fs=function(e,t){var n=new Ym;tb.push(n),n.init(e);var r=new(gs())(eb(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r},Bs=function(e){var t=e.mouseInteractionCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,s=e.sampling;if(!1===s.mouseInteraction)return function(){};var a=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,u=[],l=null;return Object.keys(Hm).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]}).forEach(function(e){var s=Vi(e),a=function(e){return function(n){var s=Us(n);if(!xs(s,i,o,!0)){var a=null,u=e;if("pointerType"in n){switch(n.pointerType){case"mouse":a=Km.Mouse;break;case"touch":a=Km.Touch;break;case"pen":a=Km.Pen}a===Km.Touch?Hm[e]===Hm.MouseDown?u="TouchStart":Hm[e]===Hm.MouseUp&&(u="TouchEnd"):Km.Pen}else Cs(n)&&(a=Km.Touch);null!==a?(l=a,(u.startsWith("Touch")&&a===Km.Touch||u.startsWith("Mouse")&&a===Km.Mouse)&&(a=null)):Hm[e]===Hm.Click&&(a=l,l=null);var c=Cs(n)?n.changedTouches[0]:n;if(c){var d=r.getId(s),f=c.clientX,h=c.clientY;eb(t)(_object_spread({type:Hm[u],id:d,x:f,y:h},null!==a&&{pointerType:a}))}}}}(e);if(window.PointerEvent)switch(Hm[e]){case Hm.MouseDown:case Hm.MouseUp:s=s.replace("mouse","pointer");break;case Hm.TouchStart:case Hm.TouchEnd:return}u.push(ys(s,a,n))}),eb(function(){u.forEach(function(e){return e()})})},qs=function(e){var t=e.scrollCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,s=e.sampling,a=eb(ms(eb(function(e){var s=Us(e);if(s&&!xs(s,i,o,!0)){var a=r.getId(s);if(s===n&&n.defaultView){var u=ws(n.defaultView);t({id:a,x:u.left,y:u.top})}else t({id:a,x:s.scrollLeft,y:s.scrollTop})}}),s.scroll||100));return ys("scroll",a,n)},zs=function(e){return function(e,t){if(Ks("CSSGroupingRule")&&_instanceof(e.parentRule,CSSGroupingRule)||Ks("CSSMediaRule")&&_instanceof(e.parentRule,CSSMediaRule)||Ks("CSSSupportsRule")&&_instanceof(e.parentRule,CSSSupportsRule)||Ks("CSSConditionRule")&&_instanceof(e.parentRule,CSSConditionRule)){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){var r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])},Ws=function(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}},Vs=function(e,t){var n,r,i,o=e.mirror,s=e.stylesheetManager,a=null;a="#document"===t.nodeName?o.getId(t):o.getId(Um.host(t));var u="#document"===t.nodeName?null==(n=t.defaultView)?void 0:n.Document:null==(i=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:i.ShadowRoot,l=(null==u?void 0:u.prototype)?Object.getOwnPropertyDescriptor(null==u?void 0:u.prototype,"adoptedStyleSheets"):void 0;return null!==a&&-1!==a&&u&&l?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:function(){var e;return null==(e=l.get)?void 0:e.call(this)},set:function(e){var t,n=null==(t=l.set)?void 0:t.call(this,e);if(null!==a&&-1!==a)try{s.adoptStyleSheets(e,a)}catch(e){}return n}}),eb(function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):function(){}},Hs=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.doc.defaultView;if(!r)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,i=e.mouseInteractionCb,o=e.scrollCb,s=e.viewportResizeCb,a=e.inputCb,u=e.mediaInteractionCb,l=e.styleSheetRuleCb,c=e.styleDeclarationCb,d=e.canvasMutationCb,f=e.fontCb,h=e.selectionCb,p=e.customElementCb;e.mutationCb=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var o;t.mutation&&(o=t).mutation.apply(o,_to_consumable_array(r)),n.apply(void 0,_to_consumable_array(r))},e.mousemoveCb=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];var o;t.mousemove&&(o=t).mousemove.apply(o,_to_consumable_array(n)),r.apply(void 0,_to_consumable_array(n))},e.mouseInteractionCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o;t.mouseInteraction&&(o=t).mouseInteraction.apply(o,_to_consumable_array(n)),i.apply(void 0,_to_consumable_array(n))},e.scrollCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.scroll&&(i=t).scroll.apply(i,_to_consumable_array(n)),o.apply(void 0,_to_consumable_array(n))},e.viewportResizeCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.viewportResize&&(i=t).viewportResize.apply(i,_to_consumable_array(n)),s.apply(void 0,_to_consumable_array(n))},e.inputCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.input&&(i=t).input.apply(i,_to_consumable_array(n)),a.apply(void 0,_to_consumable_array(n))},e.mediaInteractionCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.mediaInteaction&&(i=t).mediaInteaction.apply(i,_to_consumable_array(n)),u.apply(void 0,_to_consumable_array(n))},e.styleSheetRuleCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.styleSheetRule&&(i=t).styleSheetRule.apply(i,_to_consumable_array(n)),l.apply(void 0,_to_consumable_array(n))},e.styleDeclarationCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.styleDeclaration&&(i=t).styleDeclaration.apply(i,_to_consumable_array(n)),c.apply(void 0,_to_consumable_array(n))},e.canvasMutationCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.canvasMutation&&(i=t).canvasMutation.apply(i,_to_consumable_array(n)),d.apply(void 0,_to_consumable_array(n))},e.fontCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.font&&(i=t).font.apply(i,_to_consumable_array(n)),f.apply(void 0,_to_consumable_array(n))},e.selectionCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.selection&&(i=t).selection.apply(i,_to_consumable_array(n)),h.apply(void 0,_to_consumable_array(n))},e.customElementCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.customElement&&(i=t).customElement.apply(i,_to_consumable_array(n)),p.apply(void 0,_to_consumable_array(n))}}(e,n),e.recordDOM&&(t=Fs(e,e.doc));var i,o,s,a,u,l,c=function(e){var t=e.mousemoveCb,n=e.sampling,r=e.doc,i=e.mirror;if(!1===n.mousemove)return function(){};var o,s="number"==typeof n.mousemove?n.mousemove:50,a="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,u=[],l=ms(eb(function(e){var n=Date.now()-o;t(u.map(function(e){return e.timeOffset-=n,e}),e),u=[],o=null}),a),c=eb(ms(eb(function(e){var t=Us(e),n=Cs(e)?e.changedTouches[0]:e,r=n.clientX,s=n.clientY;o||(o=qm()),u.push({x:r,y:s,id:i.getId(t),timeOffset:qm()-o}),l("undefined"!=typeof DragEvent&&_instanceof(e,DragEvent)?Vm.Drag:_instanceof(e,MouseEvent)?Vm.MouseMove:Vm.TouchMove)}),s,{trailing:!1})),d=[ys("mousemove",c,r),ys("touchmove",c,r),ys("drag",c,r)];return eb(function(){d.forEach(function(e){return e()})})}(e),d=Bs(e),f=qs(e),h=(i={win:r},o=e.viewportResizeCb,s=i.win,a=-1,u=-1,l=eb(ms(eb(function(){var e=_s(),t=Ss();a===e&&u===t||(o({width:Number(t),height:Number(e)}),a=e,u=t)}),200)),ys("resize",l,s)),p=function(e){var t=e.inputCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,s=e.ignoreClass,a=e.ignoreSelector,u=e.maskInputOptions,l=e.maskInputFn,c=e.sampling,d=e.userTriggeredOnInput;function f(e){var t=Us(e),r=e.isTrusted,c=t&&t.tagName;if(t&&"OPTION"===c&&(t=Um.parentElement(t)),t&&c&&!(nb.indexOf(c)<0)&&!xs(t,i,o,!0)&&!(t.classList.contains(s)||a&&t.matches(a))){var f=t.value,p=!1,v=Hi(t)||"";"radio"===v||"checkbox"===v?p=t.checked:(u[c.toLowerCase()]||u[v])&&(f=Wi({element:t,maskInputOptions:u,tagName:c,type:v,value:f,maskInputFn:l})),h(t,d?{text:f,isChecked:p,userTriggered:r}:{text:f,isChecked:p});var g=t.name;"radio"===v&&g&&p&&n.querySelectorAll('input[type="radio"][name="'.concat(g,'"]')).forEach(function(e){if(e!==t){var n=e.value;h(e,d?{text:n,isChecked:!p,userTriggered:!1}:{text:n,isChecked:!p})}})}}function h(e,n){var i=rb.get(e);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){rb.set(e,n);var o=r.getId(e);eb(t)(_object_spread_props(_object_spread({},n),{id:o}))}}var p=("last"===c.input?["change"]:["input","change"]).map(function(e){return ys(e,eb(f),n)}),v=n.defaultView;if(!v)return function(){p.forEach(function(e){return e()})};var g,y=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),m=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return y&&y.set&&(g=p).push.apply(g,_to_consumable_array(m.map(function(e){return Ab(e[0],e[1],{set:function(){eb(f)({target:this,isTrusted:!1})}},!1,v)}))),eb(function(){p.forEach(function(e){return e()})})}(e),v=function(e){var t=e.mediaInteractionCb,n=e.blockClass,r=e.blockSelector,i=e.mirror,o=e.sampling,s=e.doc,a=eb(function(e){return ms(eb(function(o){var s=Us(o);if(s&&!xs(s,n,r,!0)){var a=s.currentTime,u=s.volume,l=s.muted,c=s.playbackRate,d=s.loop;t({type:e,id:i.getId(s),currentTime:a,volume:u,muted:l,playbackRate:c,loop:d})}}),o.media||500)}),u=[ys("play",a(Jm.Play),s),ys("pause",a(Jm.Pause),s),ys("seeked",a(Jm.Seeked),s),ys("volumechange",a(Jm.VolumeChange),s),ys("ratechange",a(Jm.RateChange),s)];return eb(function(){u.forEach(function(e){return e()})})}(e),g=function(){},y=function(){},m=function(){},b=function(){};e.recordDOM&&(g=function(e,t){var n=e.styleSheetRuleCb,r=e.mirror,i=e.stylesheetManager,o=t.win;if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return function(){};var s=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:eb(function(e,t,o){var s=_sliced_to_array(o,2),a=s[0],u=s[1],l=Ws(t,r,i.styleMirror),c=l.id,d=l.styleId;return(c&&-1!==c||d&&-1!==d)&&n({id:c,styleId:d,adds:[{rule:a,index:u}]}),js(function(){return e.apply(t,o)})()})}),o.CSSStyleSheet.prototype.addRule=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.cssRules.length,r="".concat(e," { ").concat(t," }");return o.CSSStyleSheet.prototype.insertRule.apply(this,[r,n])};var a,u,l=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:eb(function(e,t,o){var s=_sliced_to_array(o,1)[0],a=Ws(t,r,i.styleMirror),u=a.id,l=a.styleId;return(u&&-1!==u||l&&-1!==l)&&n({id:u,styleId:l,removes:[{index:s}]}),js(function(){return e.apply(t,o)})()})}),o.CSSStyleSheet.prototype.removeRule=function(e){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},o.CSSStyleSheet.prototype.replace&&(a=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:eb(function(e,t,o){var s=_sliced_to_array(o,1)[0],a=Ws(t,r,i.styleMirror),u=a.id,l=a.styleId;return(u&&-1!==u||l&&-1!==l)&&n({id:u,styleId:l,replace:s}),e.apply(t,o)})})),o.CSSStyleSheet.prototype.replaceSync&&(u=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:eb(function(e,t,o){var s=_sliced_to_array(o,1)[0],a=Ws(t,r,i.styleMirror),u=a.id,l=a.styleId;return(u&&-1!==u||l&&-1!==l)&&n({id:u,styleId:l,replaceSync:s}),e.apply(t,o)})}));var c={};Gs("CSSGroupingRule")?c.CSSGroupingRule=o.CSSGroupingRule:(Gs("CSSMediaRule")&&(c.CSSMediaRule=o.CSSMediaRule),Gs("CSSConditionRule")&&(c.CSSConditionRule=o.CSSConditionRule),Gs("CSSSupportsRule")&&(c.CSSSupportsRule=o.CSSSupportsRule));var d={};return Object.entries(c).forEach(function(e){var t=_sliced_to_array(e,2),o=t[0],s=t[1];d[o]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(d[o].insertRule,{apply:eb(function(e,t,o){var s=_sliced_to_array(o,2),a=s[0],u=s[1],l=Ws(t.parentStyleSheet,r,i.styleMirror),c=l.id,d=l.styleId;return(c&&-1!==c||d&&-1!==d)&&n({id:c,styleId:d,adds:[{rule:a,index:_to_consumable_array(zs(t)).concat([u||0])}]}),e.apply(t,o)})}),s.prototype.deleteRule=new Proxy(d[o].deleteRule,{apply:eb(function(e,t,o){var s=_sliced_to_array(o,1)[0],a=Ws(t.parentStyleSheet,r,i.styleMirror),u=a.id,l=a.styleId;return(u&&-1!==u||l&&-1!==l)&&n({id:u,styleId:l,removes:[{index:_to_consumable_array(zs(t)).concat([s])}]}),e.apply(t,o)})})}),eb(function(){o.CSSStyleSheet.prototype.insertRule=s,o.CSSStyleSheet.prototype.deleteRule=l,a&&(o.CSSStyleSheet.prototype.replace=a),u&&(o.CSSStyleSheet.prototype.replaceSync=u),Object.entries(c).forEach(function(e){var t=_sliced_to_array(e,2),n=t[0],r=t[1];r.prototype.insertRule=d[n].insertRule,r.prototype.deleteRule=d[n].deleteRule})})}(e,{win:r}),y=Vs(e,e.doc),m=function(e,t){var n=e.styleDeclarationCb,r=e.mirror,i=e.ignoreCSSAttributes,o=e.stylesheetManager,s=t.win,a=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:eb(function(e,t,s){var u,l=_sliced_to_array(s,3),c=l[0],d=l[1],f=l[2];if(i.has(c))return a.apply(t,[c,d,f]);var h=Ws(null==(u=t.parentRule)?void 0:u.parentStyleSheet,r,o.styleMirror),p=h.id,v=h.styleId;return(p&&-1!==p||v&&-1!==v)&&n({id:p,styleId:v,set:{property:c,value:d,priority:f},index:zs(t.parentRule)}),e.apply(t,s)})});var u=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:eb(function(e,t,s){var a,l=_sliced_to_array(s,1)[0];if(i.has(l))return u.apply(t,[l]);var c=Ws(null==(a=t.parentRule)?void 0:a.parentStyleSheet,r,o.styleMirror),d=c.id,f=c.styleId;return(d&&-1!==d||f&&-1!==f)&&n({id:d,styleId:f,remove:{property:l},index:zs(t.parentRule)}),e.apply(t,s)})}),eb(function(){s.CSSStyleDeclaration.prototype.setProperty=a,s.CSSStyleDeclaration.prototype.removeProperty=u})}(e,{win:r}),e.collectFonts&&(b=function(e){var t=e.fontCb,n=e.doc,r=n.defaultView;if(!r)return function(){};var i=[],o=new WeakMap,s=r.FontFace;r.FontFace=function(e,t,n){var r=new s(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var a=bs(n.fonts,"add",function(e){return function(n){return setTimeout(eb(function(){var e=o.get(n);e&&(t(e),o.delete(n))}),0),e.apply(this,[n])}});return i.push(function(){r.FontFace=s}),i.push(a),eb(function(){i.forEach(function(e){return e()})})}(e)));var w=function(e){var t=e.doc,n=e.mirror,r=e.blockClass,i=e.blockSelector,o=e.selectionCb,s=!0,a=eb(function(){var e=t.getSelection();if(!(!e||s&&(null==e?void 0:e.isCollapsed))){s=e.isCollapsed||!1;for(var a=[],u=e.rangeCount||0,l=0;l<u;l++){var c=e.getRangeAt(l),d=c.startContainer,f=c.startOffset,h=c.endContainer,p=c.endOffset;xs(d,r,i,!0)||xs(h,r,i,!0)||a.push({start:n.getId(d),startOffset:f,end:n.getId(h),endOffset:p})}o({ranges:a})}});return a(),ys("selectionchange",a)}(e),_=function(e){var t=e.doc,n=e.customElementCb,r=t.defaultView;return r&&r.customElements?bs(r.customElements,"define",function(e){return function(t,r,i){try{n({define:{name:t}})}catch(e){console.warn("Custom element callback failed for ".concat(t))}return e.apply(this,[t,r,i])}}):function(){}}(e),S=[],k=!0,x=!1,E=void 0;try{for(var C,I=e.plugins[Symbol.iterator]();!(k=(C=I.next()).done);k=!0){var O=C.value;S.push(O.observer(O.callback,r,O.options))}}catch(e){x=!0,E=e}finally{try{k||null==I.return||I.return()}finally{if(x)throw E}}return eb(function(){tb.forEach(function(e){return e.reset()}),null==t||t.disconnect(),c(),d(),f(),h(),p(),v(),g(),y(),m(),b(),w(),_(),S.forEach(function(e){return e()})})},Ks=function(e){return void 0!==window[e]},Gs=function(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)},Js=function(e,t,n,r){var i=[];try{var o=bs(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(i){for(var o=arguments.length,s=new Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];if(!xs(this,t,n,!0)){var u=function(e){return"experimental-webgl"===e?"webgl":e}(i);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(s[0]&&"object"===_type_of(s[0])){var l=s[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else s.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[i].concat(_to_consumable_array(s)))}});i.push(o)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){i.forEach(function(e){return e()})}},$s=function(e,t,n,r,i,o){var s=[],a=Object.getOwnPropertyNames(e),u=!0,l=!1,c=void 0;try{for(var d,f=function(){var a=d.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))return"continue";try{if("function"!=typeof e[a])return"continue";var u=bs(e,a,function(e){return function(){for(var s=arguments.length,u=new Array(s),l=0;l<s;l++)u[l]=arguments[l];var c=e.apply(this,u);if(fb(c,o,this),"tagName"in this.canvas&&!xs(this.canvas,r,i,!0)){var d=hb(u,o,this),f={type:t,property:a,args:d};n(this.canvas,f)}return c}});s.push(u)}catch(r){var l=Ab(e,a,{set:function(e){n(this.canvas,{type:t,property:a,args:[e],setter:!0})}});s.push(l)}},h=a[Symbol.iterator]();!(u=(d=h.next()).done);u=!0)f()}catch(e){l=!0,c=e}finally{try{u||null==h.return||h.return()}finally{if(l)throw c}}return s},Qs=function(e){var t;try{if(!(t=gb&&(self.URL||self.webkitURL).createObjectURL(gb)))throw"";var n=new Worker(t,{name:null==e?void 0:e.name});return n.addEventListener("error",function(){(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch(t){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(vb),{name:null==e?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}},Xs=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.emit,n=e.checkoutEveryNms,r=e.checkoutEveryNth,i=e.blockClass,o=void 0===i?"rr-block":i,s=e.blockSelector,a=void 0===s?null:s,u=e.ignoreClass,l=void 0===u?"rr-ignore":u,c=e.ignoreSelector,d=void 0===c?null:c,f=e.maskTextClass,h=void 0===f?"rr-mask":f,p=e.maskTextSelector,v=void 0===p?null:p,g=e.inlineStylesheet,y=void 0===g||g,m=e.maskAllInputs,b=e.maskInputOptions,w=e.slimDOMOptions,_=e.maskInputFn,S=e.maskTextFn,k=e.maskAttributeFn,x=e.hooks,E=e.packFn,C=e.sampling,I=void 0===C?{}:C,O=e.dataURLOptions,T=void 0===O?{}:O,A=e.mousemoveWait,P=e.recordDOM,R=void 0===P||P,M=e.recordCanvas,N=void 0!==M&&M,L=e.recordCrossOriginIframes,D=void 0!==L&&L,j=e.recordAfter,U=void 0===j?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":j,F=e.userTriggeredOnInput,B=void 0!==F&&F,q=e.collectFonts,z=void 0!==q&&q,W=e.inlineImages,V=void 0!==W&&W,H=e.captureAdoptedStyleSheets,K=void 0===H||H,G=e.plugins,J=e.keepIframeSrcFn,$=void 0===J?function(){return!1}:J,Q=e.ignoreCSSAttributes,X=void 0===Q?new Set([]):Q,Y=e.errorHandler,Z=e.applyBackgroundColorToBlockedElements,ee=void 0!==Z&&Z;Zm=Y;var te=!D||window.parent===window,ne=!1;if(!te)try{window.parent.document&&(ne=!1)}catch(e){ne=!0}if(te&&!t)throw new Error("emit function is required");if(!te&&!ne)return function(){};void 0!==A&&void 0===I.mousemove&&(I.mousemove=A),xb.reset();var re,ie=!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==b?b:{password:!0},oe=!0===w||"all"===w?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===w,headMetaDescKeywords:"all"===w,headTitleMutations:"all"===w}:w||{};!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();var se=0,ae=function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=(G||[])[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var s=i.value;s.eventProcessor&&(e=s.eventProcessor(e))}}catch(e){n=!0,r=e}finally{try{t||null==o.return||o.return()}finally{if(n)throw r}}return E&&!ne&&(e=E(e)),e};wb=function(e,i){var o,s=e;if(s.timestamp=qm(),!(null==(o=tb[0])?void 0:o.isFrozen())||s.type===Wm.FullSnapshot||s.type===Wm.IncrementalSnapshot&&s.data.source===Vm.Mutation||tb.forEach(function(e){return e.unfreeze()}),te)null==t||t(ae(s),i);else if(ne){var a={type:"rrweb",event:ae(s),origin:window.location.origin,isCheckout:i};window.parent.postMessage(a,"*")}if(s.type===Wm.FullSnapshot)re=s,se=0;else if(s.type===Wm.IncrementalSnapshot){if(s.data.source===Vm.Mutation&&s.data.isAttachIframe)return;se++;var u=r&&se>=r,l=n&&s.timestamp-re.timestamp>n;(u||l)&&_b(!0)}};var ue=function(e){wb({type:Wm.IncrementalSnapshot,data:_object_spread({source:Vm.Mutation},e)})},le=function(e){return wb({type:Wm.IncrementalSnapshot,data:_object_spread({source:Vm.Scroll},e)})},ce=function(e){return wb({type:Wm.IncrementalSnapshot,data:_object_spread({source:Vm.CanvasMutation},e)})},de=new mb({mutationCb:ue,adoptedStyleSheetCb:function(e){return wb({type:Wm.IncrementalSnapshot,data:_object_spread({source:Vm.AdoptedStyleSheet},e)})}}),fe=new ob({mirror:xb,mutationCb:ue,stylesheetManager:de,recordCrossOriginIframes:D,wrappedEmit:wb}),he=!0,pe=!1,ve=void 0;try{for(var ge,ye=(G||[])[Symbol.iterator]();!(he=(ge=ye.next()).done);he=!0){var me=ge.value;me.getMirror&&me.getMirror({nodeMirror:xb,crossOriginIframeMirror:fe.crossOriginIframeMirror,crossOriginIframeStyleMirror:fe.crossOriginIframeStyleMirror})}}catch(e){pe=!0,ve=e}finally{try{he||null==ye.return||ye.return()}finally{if(pe)throw ve}}var be=new bb;Sb=new yb({recordCanvas:N,mutationCb:ce,win:window,blockClass:o,blockSelector:a,mirror:xb,sampling:I.canvas,dataURLOptions:T});var we=new sb({mutationCb:ue,scrollCb:le,bypassOptions:{blockClass:o,blockSelector:a,maskTextClass:h,maskTextSelector:v,inlineStylesheet:y,maskInputOptions:ie,dataURLOptions:T,maskTextFn:S,maskInputFn:_,maskAttributeFn:k,recordCanvas:N,inlineImages:V,sampling:I,slimDOMOptions:oe,iframeManager:fe,stylesheetManager:de,canvasManager:Sb,keepIframeSrcFn:$,processedNodeManager:be},mirror:xb});_b=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(R){wb({type:Wm.Meta,data:{href:window.location.href,width:Ss(),height:_s()}},e),de.reset(),we.init(),tb.forEach(function(e){return e.lock()});var t=function(e,t){var n=t||{},r=n.mirror,i=void 0===r?new Qv:r,o=n.blockClass,s=void 0===o?"rr-block":o,a=n.blockSelector,u=void 0===a?null:a,l=n.maskTextClass,c=void 0===l?"rr-mask":l,d=n.maskTextSelector,f=void 0===d?null:d,h=n.inlineStylesheet,p=void 0===h||h,v=n.inlineImages,g=void 0!==v&&v,y=n.recordCanvas,m=void 0!==y&&y,b=n.maskAllInputs,w=void 0!==b&&b,_=n.maskTextFn,S=n.maskInputFn,k=n.maskAttributeFn,x=n.slimDOM,E=void 0!==x&&x,C=n.dataURLOptions,I=n.preserveWhiteSpace,O=n.onSerialize,T=n.onAdoptedStyleSheet,A=n.onIframeLoad,P=n.iframeLoadTimeout,R=n.onStylesheetLoad,M=n.stylesheetLoadTimeout,N=n.keepIframeSrcFn,L=void 0===N?function(){return!1}:N,D=n.applyBackgroundColorToBlockedElements;return Tb(e,{doc:e,mirror:i,blockClass:s,blockSelector:u,maskTextClass:c,maskTextSelector:f,skipChild:!1,inlineStylesheet:p,maskInputOptions:!0===w?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===w?{password:!0}:w,maskTextFn:_,maskInputFn:S,maskAttributeFn:k,slimDOMOptions:!0===E||"all"===E?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===E,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===E?{}:E,dataURLOptions:C,inlineImages:g,recordCanvas:m,preserveWhiteSpace:I,onSerialize:O,onAdoptedStyleSheet:T,onIframeLoad:A,iframeLoadTimeout:P,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:L,newlyAddedElement:!1,applyBackgroundColorToBlockedElements:void 0!==D&&D})}(document,{mirror:xb,blockClass:o,blockSelector:a,maskTextClass:h,maskTextSelector:v,inlineStylesheet:y,maskAllInputs:ie,maskTextFn:S,maskInputFn:_,maskAttributeFn:k,slimDOM:oe,dataURLOptions:T,recordCanvas:N,inlineImages:V,applyBackgroundColorToBlockedElements:ee,onSerialize:function(e){Is(e,xb)&&fe.addIframe(e),Os(e,xb)&&de.trackLinkElement(e),Ts(e)&&we.addShadowRoot(Um.shadowRoot(e),document)},onAdoptedStyleSheet:K?function(e){return de.styleMirror.add(e)}:void 0,onIframeLoad:function(e,t){fe.attachIframe(e,t),we.observeAttachShadow(e)},onStylesheetLoad:function(e,t){de.attachLinkElement(e,t)},keepIframeSrcFn:$});if(!t)return console.warn("Failed to snapshot the document");wb({type:Wm.FullSnapshot,data:{node:t,initialOffset:ws(window)}},e),tb.forEach(function(e){return e.unlock()}),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&de.adoptStyleSheets(document.adoptedStyleSheets,xb.getId(document))}};try{var _e=[],Se=function(e){var t;return eb(Hs)({mutationCb:ue,mousemoveCb:function(e,t){return wb({type:Wm.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return wb({type:Wm.IncrementalSnapshot,data:_object_spread({source:Vm.MouseInteraction},e)})},scrollCb:le,viewportResizeCb:function(e){return wb({type:Wm.IncrementalSnapshot,data:_object_spread({source:Vm.ViewportResize},e)})},inputCb:function(e){return wb({type:Wm.IncrementalSnapshot,data:_object_spread({source:Vm.Input},e)})},mediaInteractionCb:function(e){return wb({type:Wm.IncrementalSnapshot,data:_object_spread({source:Vm.MediaInteraction},e)})},styleSheetRuleCb:function(e){return wb({type:Wm.IncrementalSnapshot,data:_object_spread({source:Vm.StyleSheetRule},e)})},styleDeclarationCb:function(e){return wb({type:Wm.IncrementalSnapshot,data:_object_spread({source:Vm.StyleDeclaration},e)})},canvasMutationCb:ce,fontCb:function(e){return wb({type:Wm.IncrementalSnapshot,data:_object_spread({source:Vm.Font},e)})},selectionCb:function(e){wb({type:Wm.IncrementalSnapshot,data:_object_spread({source:Vm.Selection},e)})},customElementCb:function(e){wb({type:Wm.IncrementalSnapshot,data:_object_spread({source:Vm.CustomElement},e)})},blockClass:o,ignoreClass:l,ignoreSelector:d,maskTextClass:h,maskTextSelector:v,maskInputOptions:ie,inlineStylesheet:y,sampling:I,recordDOM:R,recordCanvas:N,inlineImages:V,userTriggeredOnInput:B,collectFonts:z,doc:e,maskInputFn:_,maskTextFn:S,maskAttributeFn:k,keepIframeSrcFn:$,blockSelector:a,slimDOMOptions:oe,dataURLOptions:T,mirror:xb,iframeManager:fe,stylesheetManager:de,shadowDomManager:we,processedNodeManager:be,canvasManager:Sb,ignoreCSSAttributes:X,plugins:(null==(t=null==G?void 0:G.filter(function(e){return e.observer}))?void 0:t.map(function(e){return{observer:e.observer,options:e.options,callback:function(t){return wb({type:Wm.Plugin,data:{plugin:e.name,payload:t}})}}}))||[]},x)};fe.addLoadListener(function(e){try{_e.push(Se(e.contentDocument))}catch(e){console.warn(e)}});var ke=function(){_b(),_e.push(Se(document)),kb=!0};return"interactive"===document.readyState||"complete"===document.readyState?ke():(_e.push(ys("DOMContentLoaded",function(){wb({type:Wm.DomContentLoaded,data:{}}),"DOMContentLoaded"===U&&ke()})),_e.push(ys("load",function(){wb({type:Wm.Load,data:{}}),"load"===U&&ke()},window))),function(){_e.forEach(function(e){return e()}),be.destroy(),kb=!1,Zm=void 0}}catch(e){console.warn(e)}},Ys=function(e,t){if(new Blob([e]).size<=t)return{value:e,truncated:!1};for(var n=0,r=Math.min(e.length,t);n<r;){var i=Math.ceil((n+r)/2);new Blob([e.slice(0,i)]).size<=t?n=i:r=i-1}return n>0&&e.charCodeAt(n-1)>=55296&&e.charCodeAt(n-1)<=56319&&(n-=1),{value:e.slice(0,n),truncated:!0}},Zs=function(e,t){if("collector"===e)return"collector";if(!t)throw new Error("stepId(".concat(e,") requires an id"));return"".concat(e,".").concat(t)},ea=function(e,t){var n=e.destinations[t];if(!n)throw new Error("Destination not found: ".concat(t));return n},ta=function(e,t){var n=e.transformers[t];if(!n)throw new Error("Transformer not found: ".concat(t));return n},na=function(e,t){var n=e.sources[t];if(!n)throw new Error("Source not found: ".concat(t));return n},ra=function(e,t){var n=e.stores[t];if(!n)throw new Error("Store not found: ".concat(t));return n},ia=function(e,t){return _async_to_generator(function(){return _ts_generator(this,function(n){switch(n.label){case 0:return[4,e.get(t)];case 1:return[2,n.sent()]}})})()},oa=function(e){return Array.isArray(e)},sa=function(e){return void 0!==e},aa=function(e){return"number"==typeof e&&!Number.isNaN(e)},ua=function(e){return"object"==(void 0===e?"undefined":_type_of(e))&&null!==e&&!oa(e)&&"[object Object]"===Object.prototype.toString.call(e)},la=function(e){return"string"==typeof e},ca=function(e){return Gb(e)?e:void 0},da=function(e,t,n){return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return _async_to_generator(function(){var r;return _ts_generator(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,4,6]),[4,e.apply(void 0,_to_consumable_array(i))];case 1:case 3:return[2,o.sent()];case 2:return r=o.sent(),t?[4,t(r)]:[2];case 4:return[4,null==n?void 0:n()];case 5:return o.sent(),[7];case 6:return[2]}})})()}},fa=function(e,t){return _async_to_generator(function(e){var t,n,r,i,o,s,a,u,l,c,d,f,h,p,v,g=arguments;return _ts_generator(this,function(y){switch(y.label){case 0:if(t=g.length>1&&void 0!==g[1]?g[1]:{},!(n=g.length>2?g[2]:void 0).collector)throw new Error("getMappingValue: context.collector is required");i=n.consent||n.collector.consent,o=null!==(r=n.event)&&void 0!==r?r:{},s={event:o,mapping:t,collector:n.collector,logger:n.collector.logger,consent:i},a=oa(t)?t:[t],u=!0,l=!1,c=void 0,y.label=1;case 1:y.trys.push([1,6,7,8]),d=a[Symbol.iterator](),y.label=2;case 2:return(u=(f=d.next()).done)?[3,5]:(h=f.value,[4,da($b,function(e){if(_instanceof(e,Jb))throw e;n.collector.status.failed++,s.logger.error("mapping processing failed",{event:o,error:e})})(e,h,_object_spread_props(_object_spread({},s),{mapping:h}))]);case 3:if(p=y.sent(),sa(p))return[2,p];y.label=4;case 4:return u=!0,[3,2];case 5:return[3,8];case 6:return v=y.sent(),l=!0,c=v,[3,8];case 7:try{u||null==d.return||d.return()}finally{if(l)throw c}return[7];case 8:return[2]}})}).apply(this,arguments)},ha=function(e,t){return _async_to_generator(function(e){var t,n,r,i,o,s,a=arguments;return _ts_generator(this,function(u){return t=a.length>1&&void 0!==a[1]?a[1]:{},n=a.length>2?a[2]:void 0,sa(e)?(o=ua(e)&&e.consent||(null==n?void 0:n.consent)||(null==n||null===(i=n.collector)||void 0===i?void 0:i.consent),s=null!==(r=null==n?void 0:n.event)&&void 0!==r?r:ua(e)?e:{},[2,fa(e,t,_object_spread_props(_object_spread({},n),{consent:o,event:s}))]):[2]})}).apply(this,arguments)},pa=function(e,t,n){var r="This is not a new campaign because referring_domain=".concat(t," is on the same domain as the current page and it is configured to exclude internal referrers");"always"===e?n.debug(r):"ifEmptyCampaign"===e&&n.debug("".concat(r," with empty campaign parameters"))},va=function(e,t,n){var r,i,o=[];try{for(var s=qt(null!=t?t:[]),a=s.next();!a.done;a=s.next()){var u=a.value;try{o.push(new RegExp(u))}catch(e){n.loggerProvider.warn("Invalid regex pattern: ".concat(u),e)}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return e.concat(o)},ga=function(e,n){var r,i,o,s,a,u,l;if(e){l_(e);try{n.loggerProvider.debug("Update browser config with remote configuration:",JSON.stringify(e));var c=e;if(c&&"autocapture"in c){if("boolean"==typeof c.autocapture&&(n.autocapture=c.autocapture),"object"===_type_of(c.autocapture)&&null!==c.autocapture){var d=t({},c.autocapture);if(void 0===n.autocapture&&(n.autocapture=c.autocapture),"object"===_type_of(c.autocapture.elementInteractions)&&null!==c.autocapture.elementInteractions&&(null===(o=c.autocapture.elementInteractions.pageUrlAllowlistRegex)||void 0===o?void 0:o.length)){d.elementInteractions=t({},c.autocapture.elementInteractions);var f=d.elementInteractions,h=null!==(s=f.pageUrlAllowlist)&&void 0!==s?s:[],p=c.autocapture.elementInteractions.pageUrlAllowlistRegex;f.pageUrlAllowlist=va(h,p,n),delete f.pageUrlAllowlistRegex}if("object"===_type_of(c.autocapture.networkTracking)&&null!==c.autocapture.networkTracking&&(null===(a=c.autocapture.networkTracking.captureRules)||void 0===a?void 0:a.length)){d.networkTracking=t({},c.autocapture.networkTracking);var v=null!==(u=d.networkTracking.captureRules)&&void 0!==u?u:[];try{for(var g=qt(v),y=g.next();!y.done;y=g.next()){var m=y.value;m.urls=va(null!==(l=m.urls)&&void 0!==l?l:[],m.urlsRegex,n),delete m.urlsRegex}}catch(e){r={error:e}}finally{try{y&&!y.done&&(i=g.return)&&i.call(g)}finally{if(r)throw r.error}}}"boolean"==typeof n.autocapture&&(n.autocapture=t({attribution:n.autocapture,fileDownloads:n.autocapture,formInteractions:n.autocapture,pageViews:n.autocapture,sessions:n.autocapture,elementInteractions:n.autocapture,webVitals:n.autocapture,frustrationInteractions:n.autocapture},d)),"object"===_type_of(n.autocapture)&&(n.autocapture=t(t({},n.autocapture),d))}n.defaultTracking=n.autocapture}"customEnrichment"in c&&null!==c.customEnrichment&&!1!==n.customEnrichment&&(n.customEnrichment=c.customEnrichment),n.loggerProvider.debug("Browser config after remote config update:",JSON.stringify(n))}catch(e){n.loggerProvider.error("Failed to apply remote configuration because of error: ",e)}}},ya=function(e,t){var n,r,i,o,s=t.event,a=s.pageX,u=s.pageY;e.yMin=Math.min(null!==(n=e.yMin)&&void 0!==n?n:u,u),e.yMax=Math.max(null!==(r=e.yMax)&&void 0!==r?r:u,u),e.xMin=Math.min(null!==(i=e.xMin)&&void 0!==i?i:a,a),e.xMax=Math.max(null!==(o=e.xMax)&&void 0!==o?o:a,a),e.isOutOfBounds=e.yMax-e.yMin>hS||e.xMax-e.xMin>hS},ma=function(e){if(0===e.length)return null;var n=e[0],r=e[e.length-1];return{rageClickEvent:t({"[Amplitude] Begin Time":new Date(n.timestamp).toISOString(),"[Amplitude] End Time":new Date(r.timestamp).toISOString(),"[Amplitude] Duration":r.timestamp-n.timestamp,"[Amplitude] Clicks":e.map(function(e){return{X:e.event.pageX,Y:e.event.pageY,Time:e.timestamp}}),"[Amplitude] Click Count":e.length},n.targetElementProperties),time:n.timestamp}},ba=function(e){var t=this,n=e.amplitude,r=e.allObservables,i=e.shouldTrackRageClick,o=r.clickObservable,s=r.selectionObservable,a=[],u={},l=null;function c(e){a=[],u={},e&&(ya(u,e),a.push(e))}var d=an(o.filter(function(e){return i("click",e.closestTrackedAncestor)}),function(e){return Ft(t,void 0,void 0,function(){var t;return Bt(this,function(n){return ya(u,e),t=null,0===a.length||function(e,t){return e.length>0&&e[e.length-1].closestTrackedAncestor!==t.closestTrackedAncestor}(a,e)||function(e,t){var n=e[Math.max(0,e.length-dS+1)];return t.timestamp-n.timestamp>=fS}(a,e)||u.isOutOfBounds?(l&&(t=ma(a)),c(e)):a.push(e),l&&(clearTimeout(l.timerId),l.resolve(t),l=null),a.length>=dS?[2,new Promise(function(e){l={resolve:e,timerId:setTimeout(function(){e(ma(a))},fS)}})]:[2,null]})})}),f=null==s?void 0:s.subscribe(function(){c()}),h=d.subscribe(function(e){null!==e&&n.track(h_,e.rageClickEvent,{time:e.time})});return{unsubscribe:function(){h.unsubscribe(),null==f||f.unsubscribe()}}},wa=function(e){var t=e.changes,n=e.changesThreshold,r=e.thresholdMs;return!(t.length<n)&&t[t.length-1]-t[0]<r},_a=function(e){e.changes=[],e.startTime=void 0},Sa=function(e){for(var t=e.changes,n=e.thresholdMs,r=0,i=t[t.length-1];r<t.length;r++){if(i-t[r]<n)break}0!==r&&(e.startTime=t[r],e.changes.splice(0,r))},ka=function(e,t,n,r){if(!r)return[];var i=e[t];return"object"===(void 0===i?"undefined":_type_of(i))&&null!==i&&"cssSelectorAllowlist"in i&&Array.isArray(i.cssSelectorAllowlist)?i.cssSelectorAllowlist:n},xa=function(e,t){var n=e.startTime+e.duration;return t.filter(function(t){return t.startTime<n&&t.startTime+t.duration>e.startTime}).map(function(e){return e.name})},Ea=function(e,n){var r,i=xa(e,n),o=null!==(r=e.scripts)&&void 0!==r?r:[],s=o.map(function(e){return e.sourceURL}).filter(Boolean),a=o.map(function(e){return e.sourceFunctionName}).filter(Boolean),u=o.map(function(e){return e.sourceCharPosition}).filter(function(e){return"number"==typeof e&&e>=0}),l=o.map(function(e){return e.invokerType}).filter(Boolean),c=o.map(function(e){return e.invoker}).filter(Boolean);return t(t(t(t(t(t(t({"[Amplitude] Main Thread Block Source":"long-animation-frame","[Amplitude] Main Thread Block Duration":e.duration,"[Amplitude] Main Thread Block Blocking Duration":e.blockingDuration,"[Amplitude] Main Thread Block Start Time":e.startTime},i.length>0&&{"[Amplitude] Main Thread Block Measures":i}),{"[Amplitude] Main Thread Block Render Start":e.renderStart,"[Amplitude] Main Thread Block Style And Layout Start":e.styleAndLayoutStart,"[Amplitude] Main Thread Block Script Count":o.length}),s.length>0&&{"[Amplitude] Main Thread Block Script URLs":s}),a.length>0&&{"[Amplitude] Main Thread Block Script Functions":a}),u.length>0&&{"[Amplitude] Main Thread Block Script Positions":u}),l.length>0&&{"[Amplitude] Main Thread Block Invoker Types":l}),c.length>0&&{"[Amplitude] Main Thread Block Invokers":c})},Ca=function(e,n){var r,i=xa(e,n),o=null!==(r=e.attribution)&&void 0!==r?r:[];return t(t({"[Amplitude] Main Thread Block Source":"long-task","[Amplitude] Main Thread Block Duration":e.duration,"[Amplitude] Main Thread Block Blocking Duration":e.duration,"[Amplitude] Main Thread Block Start Time":e.startTime},i.length>0&&{"[Amplitude] Main Thread Block Measures":i}),o.length>0&&{"[Amplitude] Main Thread Block Attribution":o.map(function(e){return e.name})})},Ia=function(e){var t=e.amplitude,n=e.options,r=e.durationThreshold,i=void 0===r?kS:r,o=function(){if("undefined"==typeof PerformanceObserver)return null;try{var e=PerformanceObserver.supportedEntryTypes;if(e.includes("long-animation-frame"))return"long-animation-frame";if(e.includes("longtask"))return"longtask"}catch(e){}return null}();if(!o)return{unsubscribe:function(){}};var s=[],a=new PerformanceObserver(function(e){var t,n,r=performance.now();try{for(var i=qt(e.getEntries()),o=i.next();!o.done;o=i.next()){var a=o.value;s.push(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}for(var u=r-xS;s.length>0&&s[0].startTime<u;)s.shift()});try{a.observe({entryTypes:["measure"]})}catch(e){}var u=new PerformanceObserver(function(e){var r,a;try{for(var u=qt(e.getEntries()),l=u.next();!l.done;l=u.next()){var c=l.value;if(!N_(n))return;if(!(c.duration<i)){var d="long-animation-frame"===o?Ea(c,s):Ca(c,s);t.track(g_,d)}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=u.return)&&a.call(u)}finally{if(r)throw r.error}}});try{u.observe({entryTypes:[o]})}catch(e){return a.disconnect(),{unsubscribe:function(){}}}return{unsubscribe:function(){u.disconnect(),a.disconnect()}}},Oa=function(e,t){var n="^"+t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$";return new RegExp(n).test(e)},Ta=function(e,t){var n,r,i=t.split(",");try{for(var o=qt(i),s=o.next();!s.done;s=o.next()){var a=s.value,u=zt(a.split("-").map(Number),2),l=u[0],c=u[1];if(e===l&&void 0===c)return!0;if(e>=l&&e<=c)return!0}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1},Aa=function(e){var t;if(e)try{var n=null===(t=K())||void 0===t?void 0:t.location.href,r=new URL(e,n),i=r.searchParams.toString(),o=r.hash.replace("#",""),s=r.href,a=r.host;return r.hash="",r.search="",{query:i,fragment:o,href:s,hrefWithoutQueryOrHash:r.href,host:a}}catch(e){return}},Pa=function(e){return"object"!==(void 0===e?"undefined":_type_of(e))||null===e?e?Wt([],zt(A),!1):void 0===e?IS?void 0:Wt([],zt(A),!1):void 0:0!==e.length?e:void 0},Ra=function(e){var t,n,r;return!(null===(t=null==e?void 0:e.allowlist)||void 0===t?void 0:t.length)&&!(null===(n=null==e?void 0:e.blocklist)||void 0===n?void 0:n.length)&&!(null===(r=null==e?void 0:e.excludelist)||void 0===r?void 0:r.length)},Ma=function(e,t){var n;void 0===t&&(t={});var r=Aa(e.url);if(!r)return!1;var i,o=r.host;if(!1!==t.ignoreAmplitudeRequests&&(Oa(o,"*.amplitude.com")||Oa(o,"amplitude.com")))return!1;if(null===(n=t.ignoreHosts)||void 0===n?void 0:n.find(function(e){return Oa(o,e)}))return!1;if(!t.captureRules&&void 0!==e.status&&!Ta(e.status,AS))return!1;if(t.captureRules&&(Wt([],zt(t.captureRules),!1).reverse().find(function(t){if(i=function(e,t,n,r,i){if((!e.hosts||e.hosts.find(function(e){return Oa(t,e)}))&&(!r||!e.urls||qe(r,e.urls))&&(!i||!e.methods||e.methods.find(function(e){return i.toLowerCase()===e.toLowerCase()||"*"===e}))){if(n||0===n){var o=e.statusCodeRange||AS;if(!Ta(n,o))return!1}return!0}}(t,o,e.status,e.url,e.method),i){var n=Pa(t.responseHeaders);if(e.responseWrapper&&n){var r=e.responseWrapper.headers(n);r&&(e.responseHeaders=r)}var s=Pa(t.requestHeaders);if(e.requestWrapper&&s){var a=e.requestWrapper.headers(s);a&&(e.requestHeaders=a)}if(e.responseWrapper&&t.responseBody&&!Ra(t.responseBody)){var u=t.responseBody.excludelist||t.responseBody.blocklist;e.responseBodyJson=e.responseWrapper.json(t.responseBody.allowlist,u)}if(e.requestWrapper&&t.requestBody&&!Ra(t.requestBody)){u=t.requestBody.excludelist||t.requestBody.blocklist;e.requestBodyJson=e.requestWrapper.json(t.requestBody.allowlist,u)}}return void 0!==i}),!i))return!1;return!e.requestWrapper||!function(e,t){if(e.includes("amplitude.com"))try{var n=t.body;if("string"!=typeof n)return!1;if(JSON.parse(n).events.find(function(e){return e.event_type===CS}))return!0}catch(e){}return!1}(o,e.requestWrapper)},Na=function(e){var t=e.allObservables,n=e.networkTrackingOptions,r=e.amplitude,i=e.loggerProvider;return t.networkObservable.filter(function(e){return Ma(e.event,n)}).subscribe(function(e){var t,n,o,s=e.event,a=Aa(s.url);if(a){var u=null===(n=s.responseWrapper)||void 0===n?void 0:n.bodySize,l=null===(o=s.requestWrapper)||void 0===o?void 0:o.bodySize;!function(e,t,n,r){Ft(this,void 0,void 0,function(){var i,o,s;return Bt(this,function(a){switch(a.label){case 0:return t.requestBodyJson||t.responseBodyJson?[4,Promise.all([t.requestBodyJson,t.responseBodyJson])]:[3,2];case 1:if(i=zt.apply(void 0,[a.sent(),2]),o=i[0],s=i[1],o)try{e["[Amplitude] Request Body"]=JSON.stringify(o)}catch(e){null==r||r.debug("Failed to stringify request body",e)}if(s)try{e["[Amplitude] Response Body"]=JSON.stringify(s)}catch(e){null==r||r.debug("Failed to stringify response body")}a.label=2;case 2:return null==n||n.track(CS,e),[2]}})})}(((t={})["[Amplitude] URL"]=a.hrefWithoutQueryOrHash,t["[Amplitude] URL Query"]=a.query,t["[Amplitude] URL Fragment"]=a.fragment,t["[Amplitude] Request Method"]=s.method,t["[Amplitude] Status Code"]=s.status,t["[Amplitude] Start Time"]=s.startTime,t["[Amplitude] Completion Time"]=s.endTime,t["[Amplitude] Duration"]=s.duration,t["[Amplitude] Request Body Size"]=l,t["[Amplitude] Response Body Size"]=u,t["[Amplitude] Request Type"]=s.type,t["[Amplitude] Request Headers"]=s.requestHeaders,t["[Amplitude] Response Headers"]=s.responseHeaders,t),s,r,i)}})},La=function(e,t){return BS.get(e)||BS.set(e,new t),BS.get(e)},Da=function(e){var t,n=(null===(t=e.entries[0])||void 0===t?void 0:t.startTime)||0;return performance.timeOrigin+n},ja=function(e){return{value:e.value,rating:e.rating,delta:e.delta,navigationType:e.navigationType,id:e.id,timestamp:Math.floor(Da(e)),navigationStart:Math.floor(performance.timeOrigin)}},Ua=function(e,t,n){return e.event_properties||(e.event_properties={}),void 0===e.event_properties[t]?n:e.event_properties[t]},Fa=function(e,t){return t||("STAGING"===e?Vk:"EU"===e?Wk:zk)},Ba=function(e){if(e.type!==yx.IncrementalSnapshot)return!1;var t=e.data;return t.source===mx.Mutation&&!t.isAttachIframe},qa=function(e){var n,r,i,o,s=e[0],a=new Map,u=new Map,l=new Map,c=new Map,d=new Map;e.forEach(function(e,t){var n,r,i,o,s=e.data;try{for(var f=qt(s.adds),h=f.next();!h.done;h=f.next()){var p=h.value;a.has(p.node.id)||a.set(p.node.id,t),u.set(p.node.id,t),d.set(p.node.id,p.parentId)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}try{for(var v=qt(s.removes),g=v.next();!g.done;g=v.next()){var y=g.value;l.has(y.id)||l.set(y.id,t),c.set(y.id,t)}}catch(e){i={error:e}}finally{try{g&&!g.done&&(o=v.return)&&o.call(v)}finally{if(i)throw i.error}}});var f=new Set,h=new Set;try{for(var p=qt(a),v=p.next();!v.done;v=p.next()){var g=zt(v.value,2),y=g[0],m=g[1],b=l.get(y);if(void 0!==b)u.get(y)>=c.get(y)||(m<b?f.add(y):b<m&&h.add(y))}}catch(e){n={error:e}}finally{try{v&&!v.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}var w=new Set;if(f.size>0||h.size>0)for(var _=!0;_;){_=!1;try{for(var S=(i=void 0,qt(d)),k=S.next();!k.done;k=S.next()){var x=zt(k.value,2),E=x[0],C=x[1];if(!f.has(E)&&!h.has(E)&&!w.has(E)&&(f.has(C)||h.has(C)||w.has(C))){var I=l.get(E),O=a.get(E);void 0!==I&&void 0!==O&&I<O?h.add(E):void 0!==I&&void 0!==O&&I===O?w.add(E):f.add(E),_=!0}}}catch(e){i={error:e}}finally{try{k&&!k.done&&(o=S.return)&&o.call(S)}finally{if(i)throw i.error}}}var T=f.size>0||h.size>0||w.size>0,A=[];e.forEach(function(e,t){var n,r;try{for(var i=qt(e.data.removes),o=i.next();!o.done;o=i.next()){var s=o.value;f.has(s.id)||(h.has(s.id)&&t>=a.get(s.id)||w.has(s.id)&&(f.has(s.parentId)||h.has(s.parentId)||w.has(s.parentId))||A.push(s))}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}});var P=e.flatMap(function(e){return e.data.adds}),R=e.flatMap(function(e){return e.data.texts}),M=e.flatMap(function(e){return e.data.attributes}),N={source:mx.Mutation,removes:A,adds:T?P.filter(function(e){return!f.has(e.node.id)&&!h.has(e.node.id)&&!w.has(e.node.id)}):P,texts:T?R.filter(function(e){return!f.has(e.id)&&!h.has(e.id)&&!w.has(e.id)}):R,attributes:T?M.filter(function(e){return!f.has(e.id)&&!h.has(e.id)&&!w.has(e.id)}):M};return t(t({},s),{data:N})},za=function(e){if(e.length<=1)return e;for(var t=[],n=0;n<e.length;)if(Ba(e[n])){for(var r=n+1;r<e.length&&Ba(e[r]);)r++;t.push(r>n+1?qa(e.slice(n,r)):e[n]),n=r}else t.push(e[n]),n++;return t},Wa=function(e,t){return Ft(this,void 0,void 0,function(){var n,r,i,o,s,a,u,l,c,d,f,h,p,v,g=this;return Bt(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),n=t.CompressionStream,r=new n("gzip"),i=r.writable.getWriter(),o=r.readable.getReader(),s=[],a=Ft(g,void 0,void 0,function(){var e,t,n;return Bt(this,function(r){switch(r.label){case 0:return[4,o.read()];case 1:if(e=r.sent(),t=e.done,n=e.value,t)return[3,3];s.push(n),r.label=2;case 2:return[3,0];case 3:return[2]}})}),[4,i.write((new TextEncoder).encode(e))];case 1:return y.sent(),[4,i.close()];case 2:return y.sent(),[4,a];case 3:y.sent(),u=s.reduce(function(e,t){return e+t.length},0),l=new Uint8Array(u),c=0;try{for(d=qt(s),f=d.next();!f.done;f=d.next())h=f.value,l.set(h,c),c+=h.length}catch(e){p={error:e}}finally{try{f&&!f.done&&(v=d.return)&&v.call(d)}finally{if(p)throw p.error}}return[2,l];case 4:return y.sent(),[2,null];case 5:return[2]}})})},Va=function(e,t,n){var r=setTimeout(n,t);return e.then(function(){return clearTimeout(r)},function(){return clearTimeout(r)}),function(){return clearTimeout(r)}},Ha=function(e,n){if(qx=new Date,e.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if("html"===e.tagName.toLowerCase())return"html";var r={root:document.body,idName:function(e){return!0},className:function(e){return!0},tagName:function(e){return!0},attr:function(e,t){return!1},seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};Fx=t(t({},r),n),Bx=Ka(Fx.root,r);var i=Ga(e,"all",function(){return Ga(e,"two",function(){return Ga(e,"one",function(){return Ga(e,"none")})})});if(i){var o=uu(Vx(i,e));return o.length>0&&(i=o[0]),$a(i)}throw new Error("Selector was not found.")},Ka=function(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e},Ga=function(e,t,n){for(var r=null,i=[],o=e,s=0,a=function(){var e,a,u=(new Date).getTime()-qx.getTime();if(void 0!==Fx.timeoutMs&&u>Fx.timeoutMs)throw new Error("Timeout: Can't find a unique selector after ".concat(u,"ms"));var l=su(Ya(o))||su.apply(void 0,Wt([],zt(Za(o)),!1))||su.apply(void 0,Wt([],zt(eu(o)),!1))||su(tu(o))||[nu()],c=ru(o);if("all"==t)c&&(l=l.concat(l.filter(ou).map(function(e){return iu(e,c)})));else if("two"==t)l=l.slice(0,1),c&&(l=l.concat(l.filter(ou).map(function(e){return iu(e,c)})));else if("one"==t){var d=zt(l=l.slice(0,1),1)[0];c&&ou(d)&&(l=[iu(d,c)])}else"none"==t&&(l=[nu()],c&&(l=[iu(l[0],c)]));try{for(var f=(e=void 0,qt(l)),h=f.next();!h.done;h=f.next()){(d=h.value).level=s}}catch(t){e={error:t}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(e)throw e.error}}if(i.push(l),i.length>=Fx.seedMinLength&&(r=Ja(i,n)))return"break";o=o.parentElement,s++};o;){if("break"===a())break}return r||(r=Ja(i,n)),!r&&n?n():r},Ja=function(e,t){var n,r,i=uu(Wx(e));if(i.length>Fx.threshold)return t?t():null;try{for(var o=qt(i),s=o.next();!s.done;s=o.next()){var a=s.value;if(Xa(a))return a}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return null},$a=function(e){for(var t=e[0],n=t.name,r=1;r<e.length;r++){var i=e[r].level||0;n=t.level===i-1?"".concat(e[r].name," > ").concat(n):"".concat(e[r].name," ").concat(n),t=e[r]}return n},Qa=function(e){return e.map(function(e){return e.penalty}).reduce(function(e,t){return e+t},0)},Xa=function(e){var t=$a(e);switch(Bx.querySelectorAll(t).length){case 0:throw new Error("Can't select any node with this selector: ".concat(t));case 1:return!0;default:return!1}},Ya=function(e){var t=e.getAttribute("id");return t&&Fx.idName(t)?{name:"#"+CSS.escape(t),penalty:0}:null},Za=function(e){return Array.from(e.attributes).filter(function(e){return Fx.attr(e.name,e.value)}).map(function(e){return{name:"[".concat(CSS.escape(e.name),'="').concat(CSS.escape(e.value),'"]'),penalty:.5}})},eu=function(e){return Array.from(e.classList).filter(Fx.className).map(function(e){return{name:"."+CSS.escape(e),penalty:1}})},tu=function(e){var t=e.tagName.toLowerCase();return Fx.tagName(t)?{name:t,penalty:2}:null},nu=function(){return{name:"*",penalty:3}},ru=function(e){var t=e.parentNode;if(!t)return null;var n=t.firstChild;if(!n)return null;for(var r=0;n&&(n.nodeType===Node.ELEMENT_NODE&&r++,n!==e);)n=n.nextSibling;return r},iu=function(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}},ou=function(e){return"html"!==e.name&&!e.name.startsWith("#")},su=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.filter(au);return n.length>0?n:null},au=function(e){return null!=e},uu=function(e){return Wt([],zt(e),!1).sort(function(e,t){return Qa(e)-Qa(t)})},lu=function(e,t){return Bx.querySelector($a(e))===t},cu=function(){var e=K();return(null==e?void 0:e.innerHeight)||document.documentElement&&document.documentElement.clientHeight||0},du=function(){var e=K();return(null==e?void 0:e.innerWidth)||document.documentElement&&document.documentElement.clientWidth||0},fu=function(e,t){return(e<<t|e>>>32-t)>>>0},hu=function(e,t){return e=e+Math.imul(t,iE)>>>0,e=fu(e,13),e=Math.imul(e,rE)>>>0},pu=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},vu=function(e,t){void 0===t&&(t=0);var n,r=function(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r>=55296&&r<=56319&&n+1<e.length){var i=e.charCodeAt(n+1);i>=56320&&i<=57343&&(r=i-56320+(r-55296<<10)+65536,n++)}r<128?t.push(r):r<2048?t.push(192|r>>6,128|63&r):r<65536?t.push(224|r>>12,128|r>>6&63,128|63&r):t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r)}return new Uint8Array(t)}(e),i=r.length,o=0;if(i>=16){for(var s=t+rE+iE>>>0,a=t+iE>>>0,u=t>>>0,l=t-rE>>>0;o<=i-16;)s=hu(s,pu(r,o)),a=hu(a,pu(r,o+=4)),u=hu(u,pu(r,o+=4)),l=hu(l,pu(r,o+=4)),o+=4;n=fu(s,1)+fu(a,7)+fu(u,12)+fu(l,18)>>>0}else n=t+aE>>>0;for(n=n+i>>>0;o<=i-4;)n=n+Math.imul(pu(r,o),oE)>>>0,n=Math.imul(fu(n,17),sE)>>>0,o+=4;for(;o<i;)n=n+Math.imul(r[o],aE)>>>0,n=Math.imul(fu(n,11),rE)>>>0,o++;return n^=n>>>15,n=Math.imul(n,iE)>>>0,n^=n>>>13,n=Math.imul(n,oE)>>>0,(n^=n>>>16)>>>0},gu=function(e,t,n){if(void 0===n&&(n={}),!(null==e?void 0:e.location))return function(){};var r=n.enablePolling,i=void 0!==r&&r,o=n.pollingInterval,s=void 0===o?Uk:o;if(i){var a=function(){var t;return null!==(t=e.location.href)&&void 0!==t?t:""},u=a(),l=e.setInterval(function(){var e=a();e!==u&&(u=e,t(e))},s);return function(){null!=l&&e.clearInterval(l)}}var c=lE.get(e);if(!c){var d=void 0,f=new Set,h=function(){var t,n=null!==(t=e.location.href)&&void 0!==t?t:"";void 0!==d&&n===d||(d=n,f.forEach(function(e){return e(n)}))},p=function(e){var t=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=e.apply(this,t);return h(),r};return t[uE]=!0,t},v=e.history;if(null==v?void 0:v.pushState){var g=Reflect.get(v,"pushState");g[uE]||(v.pushState=p(g))}if(null==v?void 0:v.replaceState){var y=Reflect.get(v,"replaceState");y[uE]||(v.replaceState=p(y))}c={callbacks:f,notify:h,onPopStateOrHashChange:function(){return h()},listenersAttached:!1},lE.set(e,c)}var m=c;return m.listenersAttached||(e.addEventListener("popstate",m.onPopStateOrHashChange),e.addEventListener("hashchange",m.onPopStateOrHashChange),m.listenersAttached=!0),m.callbacks.add(t),function(){m.callbacks.delete(t),0===m.callbacks.size&&m.listenersAttached&&(e.removeEventListener("popstate",m.onPopStateOrHashChange),e.removeEventListener("hashchange",m.onPopStateOrHashChange),m.listenersAttached=!1)}},yu=function(e){return void 0===e&&(e={}),{name:"amplitude/url-tracking@1",observer:function(n,r,i){var o,s,a,u=t(t({},e),i),l=u.ugcFilterRules||[],c=null!==(o=u.enablePolling)&&void 0!==o&&o,d=null!==(s=u.pollingInterval)&&void 0!==s?s:Uk,f=null!==(a=u.captureDocumentTitle)&&void 0!==a&&a;if(!r)return function(){};var h=void 0,p=function(){return r.location&&r.location.href||""},v=function(){var e=p();if(void 0===h||e!==h){h=e;var t=function(){var e=r.innerHeight,t=r.innerWidth,n=r.document,i=p(),o="";return f&&(o=(null==n?void 0:n.title)||""),{href:l.length>0?ux(i,l):i,title:o,viewportHeight:e,viewportWidth:t,type:"url-change-event"}}();n(t)}},g=gu(r,function(){return v()},c?{enablePolling:!0,pollingInterval:d}:{});return v(),function(){return g()}},options:e}},mu=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}ME(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},bu=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,_instanceof(t,n)?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},wu=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},_u=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Su=function(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},ku=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},xu=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,_instanceof(t,n)?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},Eu=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Cu=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Iu=function(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},Ou=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},Tu=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Au=function(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},Pu=function(e){var t;return null!==(t=null==e?void 0:e.amplitude)&&void 0!==t?t:Qb},Ru=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=_object_spread({},n);if("user"in t){var i=t.user;null===i||""===i?(e.setUserId(void 0),delete r.user):la(i)&&i!==n.user&&(e.setUserId(i),r.user=i)}if("device"in t){var o=t.device;la(o)&&o!==n.device&&(e.setDeviceId(o),r.device=o)}if("session"in t){var s=t.session,a=aa(s)?s:la(s)&&/^\d+$/.test(s)?Number(s):la(s)?function(e){for(var t=5381,n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)|0;return Math.abs(t)}(s):void 0;void 0!==a&&a!==n.session&&(e.setSessionId(a),r.session=a)}return r},Mu=function(e,t){var n,r=function(){return n||(n=new e.Identify),n},i=!0,o=!1,s=void 0;try{for(var a,u=wO[Symbol.iterator]();!(i=(a=u.next()).done);i=!0){var l=a.value,c=t[l];if(ua(c)){var d=!0,f=!1,h=void 0;try{for(var p,v=Object.entries(c)[Symbol.iterator]();!(d=(p=v.next()).done);d=!0){var g=_sliced_to_array(p.value,2),y=g[0],m=g[1];sa(m)&&("add"===l?aa(m)&&r().add(y,m):r()[l](y,m))}}catch(e){f=!0,h=e}finally{try{d||null==v.return||v.return()}finally{if(f)throw h}}}}}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}if(oa(t.unset)){var b=!0,w=!1,_=void 0;try{for(var S,k=t.unset[Symbol.iterator]();!(b=(S=k.next()).done);b=!0){var x=S.value;la(x)&&r().unset(x)}}catch(e){w=!0,_=e}finally{try{b||null==k.return||k.return()}finally{if(w)throw _}}}return!0===t.clearAll&&r().clearAll(),n},Nu=function(e,t){var n=new e.Revenue,r=!0,i=!1,o=void 0;try{for(var s,a=Object.entries(_O)[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=_sliced_to_array(s.value,2),l=u[0],c=u[1],d=t[l];sa(d)&&n[c](d)}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return ua(t.eventProperties)&&n.setEventProperties(t.eventProperties),n},Lu=Object.create,Du=Object.defineProperty,ju=Object.getOwnPropertyDescriptor,Uu=Object.getOwnPropertyNames,Fu=Object.getPrototypeOf,Bu=Object.prototype.hasOwnProperty,qu=function(e,t){return function(){return e&&(t=(0,e[Uu(e)[0]])(e=0)),t}},zu=function(e,t){return function(){return t||(0,e[Uu(e)[0]])((t={exports:{}}).exports,t),t.exports}},Wu=function(e,t){for(var n in t)Du(e,n,{get:t[n],enumerable:!0})},Vu=function(e,t,n,r){if(t&&"object"===(void 0===t?"undefined":_type_of(t))||"function"==typeof t){var i=!0,o=!1,s=void 0;try{for(var a,u=function(){var i=a.value;Bu.call(e,i)||i===n||Du(e,i,{get:function(){return t[i]},enumerable:!(r=ju(t,i))||r.enumerable})},l=Uu(t)[Symbol.iterator]();!(i=(a=l.next()).done);i=!0)u()}catch(e){o=!0,s=e}finally{try{i||null==l.return||l.return()}finally{if(o)throw s}}}return e},Hu=function(e,t,n){return n=null!=e?Lu(Fu(e)):{},Vu(!t&&e&&e.__esModule?n:Du(n,"default",{value:e,enumerable:!0}),e)},Ku=function(e,t,n){return function(e,t,n){return t in e?Du(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==(void 0===t?"undefined":_type_of(t))?t+"":t,n)},Gu=qu({"../../../../node_modules/tslib/tslib.es6.mjs":function(){e=function(t,n){return(e=Object.setPrototypeOf||_instanceof({__proto__:[]},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])})(t,n)},t=function(){return t=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},t.apply(this,arguments)}}}),Ju=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js":function(){var e,t;(e=n||(n={})).SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll",(t=r||(r={})).IDENTIFY="$identify",t.GROUP_IDENTIFY="$groupidentify",t.REVENUE="revenue_amount"}}),$u=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/constants.js":function(){i="-",s="".concat(o="AMP","_unsent"),a="$default_instance",u="https://api2.amplitude.com/2/httpapi",l="https://api.eu.amplitude.com/2/httpapi",c="https://api2.amplitude.com/batch",d="https://api.eu.amplitude.com/batch",f="utm_campaign",h="utm_content",p="utm_id",v="utm_medium",g="utm_source",y="utm_term",m="dclid",b="fbclid",w="gbraid",_="gclid",S="ko_click_id",k="li_fat_id",x="msclkid",E="rdt_cid",C="ttclid",I="twclid",O="wbraid",T={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rdt_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},A=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],P=["authorization","cookie","set-cookie"]}}),Qu=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.js":function(){Gu(),R=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var n=e[t];if(!M(t,n))return!1}return!0},M=function(e,t){var n,r;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=qt(t),s=o.next();!s.done;s=o.next()){var a=s.value;if(Array.isArray(a))return!1;if("object"===(void 0===a?"undefined":_type_of(a)))i=i&&R(a);else if(!["number","string"].includes(void 0===a?"undefined":_type_of(a)))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;if("object"===(void 0===t?"undefined":_type_of(t)))return R(t);if(!["number","string","boolean"].includes(void 0===t?"undefined":_type_of(t)))return!1}return!0}}}),Xu=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/identify.js":function(){var e;Gu(),$u(),Qu(),N=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return t({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(L.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(L.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(L.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(L.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(L.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(L.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(L.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(L.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(L.UNSET,e,i),this},e.prototype.clearAll=function(){return this._properties={},this._properties[L.CLEAR_ALL]=i,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[L.CLEAR_ALL]&&(!this._propertySet.has(t)&&(e===L.ADD?"number"==typeof n:e===L.UNSET||e===L.REMOVE||M(t,n)))},e}(),(e=L||(L={})).SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll",D=[L.CLEAR_ALL,L.UNSET,L.SET,L.SET_ONCE,L.ADD,L.APPEND,L.PREPEND,L.PREINSERT,L.POSTINSERT,L.REMOVE]}}),Yu=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/messages.js":function(){j="Event tracked successfully",U="Unexpected error occurred",F="Event rejected due to exceeded retry count",B="Event skipped due to optOut config",q="Event rejected due to missing API key",z="Invalid API key",W="Client not initialized"}}),Zu=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/status.js":function(){var e;(e=V||(V={})).Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}}),el=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/result-builder.js":function(){Zu(),H=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=V.Unknown),{event:e,code:t,message:n}}}}),tl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/global-scope.js":function(){K=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:"undefined"!=typeof global?global:void 0}}}),nl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js":function(){Gu(),tl(),G=function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,$)},J=Wt([],zt(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),$=function(e){var t,n=K();if(!(null===(t=null==n?void 0:n.crypto)||void 0===t?void 0:t.getRandomValues))return G(e);var r=n.crypto.getRandomValues(new Uint8Array(16));return r[6]=15&r[6]|64,r[8]=63&r[8]|128,Wt([],zt(r.entries()),!1).map(function(e){var t=zt(e,2),n=t[0],r=t[1];return[4,6,8,10].includes(n)?"-".concat(J[r]):J[r]}).join("")}}}),rl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/timeline.js":function(){Gu(),el(),nl(),Q=function(){function e(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[],this.pluginStatus=new Map,this._optOutListeners=[]}return e.prototype.register=function(e,t){var n,r;return Ft(this,void 0,void 0,function(){var i;return Bt(this,function(o){switch(o.label){case 0:return void 0===e.name&&(e.name=$(),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."))),i=e.name,this.pluginStatus.has(i)?(this.loggerProvider.warn("Plugin with name ".concat(i," already exists, skipping registration")),[2]):(e.type=null!==(n=e.type)&&void 0!==n?n:"enrichment",this.pluginStatus.set(i,"locked"),[4,null===(r=e.setup)||void 0===r?void 0:r.call(e,t,this.client)]);case 1:return o.sent(),"locked"!==this.pluginStatus.get(i)?[2]:(this.plugins.push(e),this.pluginStatus.set(i,"installed"),[2])}})})},e.prototype.deregister=function(e,t){var n;return Ft(this,void 0,void 0,function(){var r,i;return Bt(this,function(o){switch(o.label){case 0:return this.pluginStatus.delete(e),-1===(r=this.plugins.findIndex(function(t){return t.name===e}))?(t.loggerProvider.warn("Plugin with name ".concat(e," does not exist, skipping deregistration")),[2]):(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._clearOptOutListeners(),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.pluginStatus.clear(),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 Ft(this,void 0,void 0,function(){var n,r,i,o,s,a,u,l,c,d,f,h,p,v,g,y,m,b,w,_;return Bt(this,function(S){switch(S.label){case 0:if(!e)return[2];n=zt(e,1),r=n[0],i=zt(e,2),o=i[1],this.loggerProvider.log("Timeline.apply: Initial event",r),s=this.plugins.filter(function(e){return"before"===e.type}),S.label=1;case 1:S.trys.push([1,6,7,8]),a=qt(s),u=a.next(),S.label=2;case 2:return u.done?[3,5]:(h=u.value).execute?[4,h.execute(t({},r))]:[3,4];case 3:if(null===(p=S.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(h.name),"', event: ").concat(JSON.stringify(r))),o({event:r,code:0,message:""}),[2];r=p,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(h.name),"', event: ").concat(JSON.stringify(r))),S.label=4;case 4:return u=a.next(),[3,2];case 5:return[3,8];case 6:return l=S.sent(),m={error:l},[3,8];case 7:try{u&&!u.done&&(b=a.return)&&b.call(a)}finally{if(m)throw m.error}return[7];case 8:c=this.plugins.filter(function(e){return"enrichment"===e.type||void 0===e.type}),S.label=9;case 9:S.trys.push([9,14,15,16]),d=qt(c),f=d.next(),S.label=10;case 10:return f.done?[3,13]:(h=f.value).execute?[4,h.execute(t({},r))]:[3,12];case 11:if(null===(p=S.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(h.name),"', event: ").concat(JSON.stringify(r))),o({event:r,code:0,message:""}),[2];r=p,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(h.name),"', event: ").concat(JSON.stringify(r))),S.label=12;case 12:return f=d.next(),[3,10];case 13:return[3,16];case 14:return v=S.sent(),w={error:v},[3,16];case 15:try{f&&!f.done&&(_=d.return)&&_.call(d)}finally{if(w)throw w.error}return[7];case 16:return g=this.plugins.filter(function(e){return"destination"===e.type}),this.loggerProvider.log("Timeline.apply: Final event before destinations, event: ".concat(JSON.stringify(r))),y=g.map(function(e){var n=t({},r);return e.execute(n).catch(function(e){return H(n,0,String(e))})}),Promise.all(y).then(function(e){var t=zt(e,1)[0]||H(r,100,"Event not tracked, no destination plugins on the instance");o(t)}),[2]}})})},e.prototype.flush=function(){return Ft(this,void 0,void 0,function(){var e,t,n,r=this;return Bt(this,function(i){switch(i.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(e){return r.apply(e)}))];case 1:return i.sent(),t=this.plugins.filter(function(e){return"destination"===e.type}),n=t.map(function(e){return e.flush&&e.flush()}),[4,Promise.all(n)];case 2:return i.sent(),[2]}})})},e.prototype.addOptOutListener=function(e){this._optOutListeners.push(e)},e.prototype._clearOptOutListeners=function(){this._optOutListeners=[]},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)}),this._callOptOutListeners(e)},e.prototype._callOptOutListeners=function(e){return Ft(this,void 0,void 0,function(){var t,n,r,i,o,s,a;return Bt(this,function(u){switch(u.label){case 0:u.trys.push([0,7,8,9]),t=qt(this._optOutListeners),n=t.next(),u.label=1;case 1:if(n.done)return[3,6];r=n.value,u.label=2;case 2:return u.trys.push([2,4,,5]),[4,r(e)];case 3:return u.sent(),[3,5];case 4:return i=u.sent(),this.loggerProvider.error("Error calling optOut listener",i),[3,5];case 5:return n=t.next(),[3,1];case 6:return[3,9];case 7:return o=u.sent(),s={error:o},[3,9];case 8:try{n&&!n.done&&(a=t.return)&&a.call(t)}finally{if(s)throw s.error}return[7];case 9:return[2]}})})},e.prototype.onReset=function(){this.plugins.forEach(function(e){var t;null===(t=e.onReset)||void 0===t||t.call(e)})},e}()}}),il=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js":function(){Gu(),Xu(),Ju(),X=function(e,n,r){return t(t(t({},"string"==typeof e?{event_type:e}:e),r),n&&{event_properties:n})},Y=function(e,n){return t(t({},n),{event_type:r.IDENTIFY,user_properties:e.getUserProperties()})},Z=function(e,n,i,o){var s;return t(t({},o),{event_type:r.GROUP_IDENTIFY,group_properties:i.getUserProperties(),groups:(s={},s[e]=n,s)})},ee=function(e,n,i){var o,s=new N;return s.set(e,n),t(t({},i),{event_type:r.IDENTIFY,user_properties:s.getUserProperties(),groups:(o={},o[e]=n,o)})},te=function(e,n){return t(t({},n),{event_type:r.REVENUE,event_properties:e.getEventProperties()})}}}),ol=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js":function(){ne=function(e){return{promise:e||Promise.resolve()}}}}),sl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/core-client.js":function(){Gu(),Ju(),Xu(),Yu(),rl(),il(),el(),ol(),re=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 Q(this),this.name=e}return e.prototype._init=function(e){return Ft(this,void 0,void 0,function(){return Bt(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 Ft(this,void 0,void 0,function(){var t,n,r,i,o,s,a,u;return Bt(this,function(l){switch(l.label){case 0:t=this[e],this[e]=[],l.label=1;case 1:l.trys.push([1,8,9,10]),n=qt(t),r=n.next(),l.label=2;case 2:return r.done?[3,7]:(i=r.value,(o=i())&&"promise"in o?[4,o.promise]:[3,4]);case 3:return l.sent(),[3,6];case 4:return[4,o];case 5:l.sent(),l.label=6;case 6:return r=n.next(),[3,2];case 7:return[3,10];case 8:return s=l.sent(),a={error:s},[3,10];case 9:try{r&&!r.done&&(u=n.return)&&u.call(n)}finally{if(a)throw a.error}return[7];case 10:return this[e].length?[4,this.runQueuedFunctions(e)]:[3,12];case 11:l.sent(),l.label=12;case 12:return[2]}})})},e.prototype.track=function(e,t,n){var r=X(e,t,n);return this.userProperties=this.getOperationAppliedUserProperties(r.user_properties),ne(this.dispatch(r))},e.prototype.identify=function(e,t){var n=Y(e,t);return this.userProperties=this.getOperationAppliedUserProperties(n.user_properties),ne(this.dispatch(n))},e.prototype.groupIdentify=function(e,t,n,r){var i=Z(e,t,n,r);return ne(this.dispatch(i))},e.prototype.setGroup=function(e,t,n){var r=ee(e,t,n);return this.userProperties=this.getOperationAppliedUserProperties(r.user_properties),ne(this.dispatch(r))},e.prototype.revenue=function(e,t){var n=te(e,t);return ne(this.dispatch(n))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),ne())},e.prototype._addPlugin=function(e){return ne(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)),ne())},e.prototype._removePlugin=function(e){return ne(this.timeline.deregister(e,this.config))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(H(e,0,W));this.process(e).then(t)},e.prototype.dispatch=function(e){return Ft(this,void 0,void 0,function(){var t=this;return Bt(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 r,i=null!==(r=this.userProperties)&&void 0!==r?r:{},o=t({},i);if(void 0===e)return o;var s={};return Object.keys(e).forEach(function(t){Object.values(n).includes(t)||(s[t]=e[t])}),D.forEach(function(t){if(Object.keys(e).includes(t)){var r=e[t];switch(t){case n.CLEAR_ALL:Object.keys(o).forEach(function(e){delete o[e]});break;case n.UNSET:Object.keys(r).forEach(function(e){delete o[e]});break;case n.SET:Object.assign(o,r)}}}),Object.assign(o,s),o},e.prototype.process=function(e){return Ft(this,void 0,void 0,function(){var t,n,i;return Bt(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),this.config.optOut?[2,H(e,0,B)]:(e.event_type===r.IDENTIFY&&this.timeline.onIdentityChanged({userProperties:this.userProperties}),[4,this.timeline.push(e)]);case 1:return 200===(i=o.sent()).code?this.config.loggerProvider.log(i.message):100===i.code?this.config.loggerProvider.warn(i.message):this.config.loggerProvider.error(i.message),[2,i];case 2:return t=o.sent(),n=String(t),this.config.loggerProvider.error(n),[2,i=H(e,0,n)];case 3:return[2]}})})},e.prototype.setOptOut=function(e){this.isReady?this._setOptOut(e):this.q.push(this._setOptOut.bind(this,Boolean(e)))},e.prototype._setOptOut=function(e){this.config.optOut!==e&&(this.config.optOut=Boolean(e),this.timeline.onOptOutChanged(e))},e.prototype.flush=function(){return ne(this.timeline.flush())},e.prototype.plugin=function(e){var t=this.timeline.plugins.find(function(t){return t.name===e});if(void 0!==t)return t;this.config.loggerProvider.debug("Cannot find plugin with name ".concat(e))},e.prototype.plugins=function(e){return this.timeline.plugins.filter(function(t){return _instanceof(t,e)})},e}()}}),al=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/revenue.js":function(){var e;Gu(),Qu(),ie=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){try{var t=JSON.parse(JSON.stringify(e));R(t)&&(this.properties=t)}catch(e){}return this},e.prototype.getEventProperties=function(){var e=this.properties?t({},this.properties):{};return e[oe.REVENUE_PRODUCT_ID]=this.productId,e[oe.REVENUE_QUANTITY]=this.quantity,e[oe.REVENUE_PRICE]=this.price,e[oe.REVENUE_TYPE]=this.revenueType,e[oe.REVENUE_CURRENCY]=this.currency,e[oe.REVENUE]=this.revenue,e[oe.RECEIPT]=this.receipt,e[oe.RECEIPT_SIG]=this.receiptSig,e},e}(),(e=oe||(oe={})).REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue",e.RECEIPT="$receipt",e.RECEIPT_SIG="$receiptSig"}}),ul=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/chunk.js":function(){se=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},[])}}}),ll=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js":function(){var e;(e=ae||(ae={}))[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"}}),cl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/logger.js":function(){ll(),ue="Amplitude Logger ",le=function(){function e(){this.logLevel=ae.None}return e.prototype.disable=function(){this.logLevel=ae.None},e.prototype.enable=function(e){void 0===e&&(e=ae.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<ae.Verbose||console.log("".concat(ue,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<ae.Warn||console.warn("".concat(ue,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<ae.Error||console.error("".concat(ue,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<ae.Debug||console.log("".concat(ue,"[Debug]: ").concat(e.join(" ")))},e}()}}),dl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/config.js":function(){$u(),cl(),ll(),ce=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:a,logLevel:ae.Warn,loggerProvider:new le,offline:!1,optOut:!1,serverUrl:u,serverZone:"US",useBatch:!1}},de=function(){function e(e){var t,n,r,i;this._optOut=!1;var o=ce();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=he(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},enumerable:!1,configurable:!0}),e}(),fe=function(e,t){return"EU"===e?t?d:l:t?c:u},he=function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=ce().serverZone),void 0===n&&(n=ce().useBatch),e)return{serverUrl:e,serverZone:void 0};var r=["US","EU"].includes(t)?t:ce().serverZone;return{serverZone:r,serverUrl:fe(r,n)}},pe=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}()}}),fl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/status-code.js":function(){}}),hl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js":function(){Gu(),ll(),ve=function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map(function(e){return e.trim()})},ge=function(e){return function(){var n=t({},e.config);return{logger:n.loggerProvider,logLevel:n.logLevel}}},ye=function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=qt(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},me=function(e,t){return function(){var n,r,i={};try{for(var o=qt(t),s=o.next();!s.done;s=o.next()){var a=s.value;i[a]=ye(e,a)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}},be=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 a=n(),u=a.logger,l=a.logLevel;if(l&&l<ae.Debug||!l||!u)return e.apply(i,o);var c={type:"invoke public method",name:t,args:o,stacktrace:ve(1),time:{start:(new Date).toISOString()},states:{}};r&&c.states&&(c.states.before=r());var d=e.apply(i,o);return d&&d.promise?d.promise.then(function(){r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=(new Date).toISOString()),u.debug(JSON.stringify(c,null,2))}):(r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=(new Date).toISOString()),u.debug(JSON.stringify(c,null,2))),d}}}}),pl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js":function(){Gu(),Zu(),Yu(),$u(),ul(),el(),dl(),nl(),fl(),hl(),we=new Set([u,l,c,d]),_e=function(e,t){return void 0===t&&(t=!1),!!we.has(e)||t},Se=function(){function e(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=[],this.diagnosticsClient=null==e?void 0:e.diagnosticsClient}return e.prototype.setup=function(e){var t;return Ft(this,void 0,void 0,function(){var n,r=this;return Bt(this,function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(s,"_").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=$()),new Promise(function(n){var r={event:e,attempts:0,callback:function(e){return n(e)},timeout:0};t.queue.push(r),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,F),!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)return null===this.scheduleId||this.scheduleId&&e>this.scheduledTimeout?(this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=e,void(this.scheduleId=setTimeout(function(){t.queue=t.queue.map(function(e){return e.timeout=0,e}),t.flush(!0)},e))):void 0},e.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},e.prototype.flush=function(e){return void 0===e&&(e=!1),Ft(this,void 0,void 0,function(){var t,n,r=this;return Bt(this,function(i){switch(i.label){case 0:return this.config.offline?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush while offline."),[2]):this.flushId?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush because previous flush has not resolved."),[2]):(this.flushId=this.scheduleId,this.resetSchedule(),t=[],n=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):n.push(e)}),[4,se(t,this.config.flushQueueSize).reduce(function(t,n){return Ft(r,void 0,void 0,function(){return Bt(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){var n;return void 0===t&&(t=!0),Ft(this,void 0,void 0,function(){var r,i,o,s,a,u;return Bt(this,function(l){switch(l.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,q)];r={api_key:this.config.apiKey,events:e.map(function(e){var t=e.event;t.extra;return Ut(t,["extra"])}),options:{min_id_length:this.config.minIdLength},client_upload_time:(new Date).toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new pe,l.label=1;case 1:return l.trys.push([1,3,,4]),i=he(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,o=_e(i,this.config.enableRequestBodyCompression),[4,this.config.transportProvider.send(i,r,o)];case 2:return null===(s=l.sent())?(this.fulfillRequest(e,0,U),[2]):t?(this.handleResponse(s,e),[3,4]):("body"in s?this.fulfillRequest(e,s.statusCode,"".concat(s.status,": ").concat(Ht(s))):this.fulfillRequest(e,s.statusCode,s.status),[2]);case 3:return a=l.sent(),u=_instanceof(c=a,Error)?c.message:String(c),this.config.loggerProvider.error(u),null===(n=this.diagnosticsClient)||void 0===n||n.recordEvent("analytics.events.unsuccessful.from.catch.error",{events:e.map(function(e){return e.event.event_type}),message:u,stack_trace:ve()}),this.handleResponse({status:V.Failed,statusCode:0},e),[3,4];case 4:return[2]}var c})})},e.prototype.handleResponse=function(e,t){var n;Vt(e.statusCode)||null===(n=this.diagnosticsClient)||void 0===n||n.recordEvent("analytics.events.unsuccessful",{events:t.map(function(e){return e.event.event_type}),code:e.statusCode,status:e.status,body:Ht(e),stack_trace:ve()});var r=e.status;switch(r){case V.Success:this.handleSuccessResponse(e,t);break;case V.Invalid:this.handleInvalidResponse(e,t);break;case V.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case V.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn("{code: 0, error: \"Status '".concat(r,"' provided for ").concat(t.length,' events"}')),this.handleOtherResponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,j)},e.prototype.handleInvalidResponse=function(e,t){var n=this;if(e.body.missingField||e.body.error.startsWith(z))this.fulfillRequest(t,e.statusCode,e.body.error);else{var r=Wt(Wt(Wt(Wt([],zt(Object.values(e.body.eventsWithInvalidFields)),!1),zt(Object.values(e.body.eventsWithMissingFields)),!1),zt(Object.values(e.body.eventsWithInvalidIdLengths)),!1),zt(e.body.silencedEvents),!1).flat(),i=new Set(r),o=t.filter(function(t,r){if(!i.has(r))return!0;n.fulfillRequest([t],e.statusCode,e.body.error)});o.length>0&&this.config.loggerProvider.warn(Ht(e));var s=this.removeEventsExceedFlushMaxRetries(o);this.scheduleEvents(s)}},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(1!==t.length){this.config.loggerProvider.warn(Ht(e)),this.config.flushQueueSize/=2;var n=this.removeEventsExceedFlushMaxRetries(t);this.scheduleEvents(n)}else this.fulfillRequest(t,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,r=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,s=new Set(r),a=new Set(i),u=new Set(o),l=t.filter(function(t,r){if(!(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&a.has(t.event.device_id)))return u.has(r)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)});l.length>0&&this.config.loggerProvider.warn(Ht(e));var c=this.removeEventsExceedFlushMaxRetries(l);this.scheduleEvents(c)},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){var r,i,o;Vt(t)?null===(o=this.diagnosticsClient)||void 0===o||o.increment("analytics.events.sent",e.length):(null===(r=this.diagnosticsClient)||void 0===r||r.increment("analytics.events.dropped",e.length),null===(i=this.diagnosticsClient)||void 0===i||i.recordEvent("analytics.events.dropped",{events:e.map(function(e){return e.event.event_type}),code:t,message:n,stack_trace:ve()})),this.removeEvents(e),e.forEach(function(e){return e.callback(H(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}()}}),vl=qu({"../../../../node_modules/@amplitude/analytics-connector/dist/analytics-connector.esm.js":function(){ke=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:xe(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),xe=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},Ee=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}(),Ce=function(){return Ce=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},Ce.apply(this,arguments)},Ie=function(e,t){var n,r,i=void 0===e?"undefined":_type_of(e);if(i!==(void 0===t?"undefined":_type_of(t)))return!1;try{for(var o=Kt(["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)return!1;if(e.length!==t.length)return!1;var a=Array.isArray(e),u=Array.isArray(t);if(a!==u)return!1;if(!a||!u){var l=Object.keys(e).sort(),c=Object.keys(t).sort();if(!Ie(l,c))return!1;var d=!0;return Object.keys(e).forEach(function(n){Ie(e[n],t[n])||(d=!1)}),d}for(var f=0;f<e.length;f++)if(!Ie(e[f],t[f]))return!1;return!0},Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}),Oe=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=Ce({},this.identity.userProperties),n=Ce(Ce({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},setOptOut:function(e){return n.optOut=e,this},updateUserProperties:function(e){var t,r,i,o,s,a,u=n.userProperties||{};try{for(var l=Kt(Object.entries(e)),c=l.next();!c.done;c=l.next()){var d=Gt(c.value,2),f=d[0],h=d[1];switch(f){case"$set":try{for(var p=(i=void 0,Kt(Object.entries(h))),v=p.next();!v.done;v=p.next()){var g=Gt(v.value,2),y=g[0],m=g[1];u[y]=m}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}break;case"$unset":try{for(var b=(s=void 0,Kt(Object.keys(h))),w=b.next();!w.done;w=b.next()){delete u[y=w.value]}}catch(e){s={error:e}}finally{try{w&&!w.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}break;case"$clearAll":u={}}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}return n.userProperties=u,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return Ce({},this.identity)},e.prototype.setIdentity=function(e){var t=Ce({},this.identity);this.identity=Ce({},e),Ie(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}(),Te="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:self,Ae=function(){function e(){this.identityStore=new Oe,this.eventBridge=new Ee,this.applicationContextProvider=new ke}return e.getInstance=function(t){return Te.analyticsConnectorInstances||(Te.analyticsConnectorInstances={}),Te.analyticsConnectorInstances[t]||(Te.analyticsConnectorInstances[t]=new e),Te.analyticsConnectorInstances[t]},e}()}}),gl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/analytics-connector.js":function(){vl(),$u(),Pe=function(e){return void 0===e&&(e=a),Ae.getInstance(e)},Re=function(e,t){Pe(t).identityStore.editIdentity().setUserId(e).commit()},Me=function(e,t){Pe(t).identityStore.editIdentity().setDeviceId(e).commit()}}}),yl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/plugins/identity.js":function(){Gu(),gl(),Ne=function(){function e(){this.name="identity",this.type="before",this.identityStore=Pe().identityStore}return e.prototype.execute=function(e){return Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return Ft(this,void 0,void 0,function(){return Bt(this,function(t){return e.instanceName&&(this.identityStore=Pe(e.instanceName).identityStore),[2]})})},e}()}}),ml=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/session.js":function(){Le=function(e,t){return void 0===t&&(t=Date.now()),Date.now()-t>e}}}),bl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/cookie-name.js":function(){$u(),De=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[o,t,e.substring(0,n)].filter(Boolean).join("_")},je=function(e){return"".concat(o.toLowerCase(),"_").concat(e.substring(0,6))}}}),wl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/language.js":function(){Ue=function(){var e,t,n,r;if("undefined"==typeof navigator)return"";var 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:""}}}),_l=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/query-params.js":function(){tl(),Fe=function(){var e,t=K();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=Be(n[0]),i=Be(n[1]);return i?(e[r]=i,e):e},{}):{}},Be=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}}}}),Sl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/url-utils.js":function(){qe=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},ze=function(e,t){var n=e;try{n=decodeURI(e)}catch(e){null==t||t.error("Malformed URI sequence: ",e)}return n}}}),kl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/sampling.js":function(){We=function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++){t=(t<<5)-t+e.charCodeAt(n),t|=0}return t},Ve=function(e,t){var n=We(e.toString());return 31*Math.abs(n)%1e5/1e5<t}}}),xl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/omit-undefined.js":function(){He=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t}}}),El=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/storage/memory.js":function(){Gu(),Ke=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return Ft(this,void 0,void 0,function(){return Bt(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return Ft(this,void 0,void 0,function(){return Bt(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return Ft(this,void 0,void 0,function(){var t;return Bt(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 Ft(this,void 0,void 0,function(){return Bt(this,function(n){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return Ft(this,void 0,void 0,function(){return Bt(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return Ft(this,void 0,void 0,function(){return Bt(this,function(e){return this.memoryStorage.clear(),[2]})})},e}()}}),Cl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/storage/cookie.js":function(){Gu(),tl(),Ge=function(){var e,t=K();return null===(e=null==t?void 0:t.navigator)||void 0===e?void 0:e.locks},Je=function(){function e(e,n){void 0===n&&(n={}),this.options=t({},e),this.config=n}return e.prototype.isEnabled=function(){return Ft(this,void 0,void 0,function(){var n,r,i,o,s=this;return Bt(this,function(a){switch(a.label){case 0:return n="AMP_TEST",r=t({},this.options),i=new e(r),o=String(Date.now()),[4,i.transaction(n,function(e){var t,r;try{e.set(o);var i=e.get()===o;return!i&&s.config.diagnosticsClient&&(null===(t=s.config.diagnosticsClient)||void 0===t||t.recordEvent("cookies.isEnabled.failure",{reason:"Test Value mismatch",testKey:n,testValue:o,sync:!0})),i}catch(e){if(s.config.diagnosticsClient){var a=_instanceof(e,Error)?e.message:String(e);null===(r=s.config.diagnosticsClient)||void 0===r||r.recordEvent("cookies.isEnabled.failure",{reason:"Cookie getter/setter failed",testKey:n,testValue:o,error:a,sync:!0})}return!1}finally{e.set(null)}})];case 1:return[2,a.sent()]}})})},e.prototype.get=function(e){return Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){switch(n.label){case 0:return[4,this.getRaw(e)];case 1:return t=n.sent(),[2,this.decodeCookieValue(e,t)]}})})},e.prototype.decodeCookieValue=function(e,t){if(t)try{var n=Xe(t);return void 0===n?void console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(e,", value: ").concat(t)):JSON.parse(n)}catch(n){return void console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(e,", value: ").concat(t))}},e.prototype.getSync=function(e){var t=this.getRawSync(e);return this.decodeCookieValue(e,t)},e.prototype.getRaw=function(e){var t,n;return Ft(this,void 0,void 0,function(){var r,i,o,s,a,u,l,c,d;return Bt(this,function(f){switch(f.label){case 0:r=K(),i=r,f.label=1;case 1:return f.trys.push([1,4,,5]),(o=null==i?void 0:i.cookieStore)?[4,o.getAll(e)]:[3,3];case 2:if(s=f.sent()){s.length>1&&(null===(t=this.config.diagnosticsClient)||void 0===t||t.recordEvent("cookies.duplicate",{cookies:s.map(function(e){return e.domain})}),null===(n=this.config.diagnosticsClient)||void 0===n||n.increment("cookies.duplicate.occurrence.cookieStore"));try{for(a=qt(s),u=a.next();!u.done;u=a.next())if(l=u.value,Ye(l.domain,this.options.domain))return[2,l.value]}catch(e){c={error:e}}finally{try{u&&!u.done&&(d=a.return)&&d.call(a)}finally{if(c)throw c.error}}}f.label=3;case 3:return[3,5];case 4:return f.sent(),[3,5];case 5:return[2,this.getRawSync(e)]}})})},e.prototype.getRawSync=function(e){var t,n,r=this,i=K(),o=(null!==(n=null===(t=null==i?void 0:i.document)||void 0===t?void 0:t.cookie.split("; "))&&void 0!==n?n:[]).filter(function(t){return 0===t.indexOf(e+"=")}),s=void 0,a=this.config.duplicateResolverFn;if("function"==typeof a&&o.length>1&&(s=o.find(function(t){var n;try{var i=a(t.substring(e.length+1));return i||null===(n=r.config.diagnosticsClient)||void 0===n||n.increment("cookies.duplicate.occurrence.document.cookie"),i}catch(e){return!1}})),s||(s=o[0]),s)return s.substring(e.length+1)},e.prototype.set=function(e,t){return Ft(this,void 0,void 0,function(){return Bt(this,function(n){return this.setSync(e,t),[2]})})},e.prototype.setSync=function(e,t){var n;try{var r=null!==(n=this.options.expirationDays)&&void 0!==n?n:0,i=null!==t?r:-1,o=void 0;if(i){var s=new Date;s.setTime(s.getTime()+24*i*60*60*1e3),o=s}var a="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t))));o&&(a+="; expires=".concat(o.toUTCString())),a+="; path=/",this.options.domain&&(a+="; domain=".concat(this.options.domain)),this.options.secure&&(a+="; Secure"),this.options.sameSite&&(a+="; SameSite=".concat(this.options.sameSite));var u=K();(null==u?void 0:u.document)&&(u.document.cookie=a)}catch(t){var l=_instanceof(t,Error)?t.message:String(t);console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(e,". Error: ").concat(l))}},e.prototype.remove=function(e){return Ft(this,void 0,void 0,function(){return Bt(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 Ft(this,void 0,void 0,function(){return Bt(this,function(e){return[2]})})},e.isDomainWritable=function(t){return Ft(this,void 0,void 0,function(){var n,r;return Bt(this,function(i){switch(i.label){case 0:if(e.cachedTlds[t])return[2,!0];n="AMP_TLDTEST",r=new e({domain:"."+t}),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,r.transaction(n,function(n){if(e.cachedTlds[t])return!0;try{n.set(1);var r=!!n.get();return r&&(e.cachedTlds[t]=!0),r}finally{n.set(null)}})];case 2:return[2,!!i.sent()];case 3:return i.sent(),[2,!1];case 4:return[2]}})})},e.prototype.transaction=function(e,t){return Ft(this,void 0,void 0,function(){var n,r,i=this;return Bt(this,function(o){switch(o.label){case 0:if(n=Ge(),r=function(){return t({get:function(){return i.getSync(e)},set:function(t){return i.setSync(e,t)}})},!n)return[2,r()];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,n.request("com.amplitude:cookie-lock:".concat(e),r)];case 2:return[2,o.sent()];case 3:return o.sent(),[2,r()];case 4:return[2]}})})},e.cachedTlds={},e}(),$e=function(e){try{return decodeURIComponent(atob(e))}catch(e){return}},Qe=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch(e){return}},Xe=function(e){var t;return null!==(t=$e(e))&&void 0!==t?t:Qe(e)},Ye=function(e,t){if(""===e&&""===t)return!0;if(!e||!t)return!1;var n=e.startsWith(".")?e.substring(1):e,r=t.startsWith(".")?t.substring(1):t;return n.toLowerCase()===r.toLowerCase()}}}),Il=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/storage/helpers.js":function(){$u(),Ze=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[o,t,e.substring(0,n)].filter(Boolean).join("_")}}}),Ol=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/storage/browser-storage.js":function(){Gu(),et=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return Ft(this,void 0,void 0,function(){var t,n,r;return Bt(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 Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(t=n.sent())?[2,JSON.parse(t)]:[2,void 0];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 Ft(this,void 0,void 0,function(){return Bt(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 Ft(this,void 0,void 0,function(){return Bt(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 Ft(this,void 0,void 0,function(){return Bt(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 Ft(this,void 0,void 0,function(){return Bt(this,function(t){try{null===(e=this.storage)||void 0===e||e.clear()}catch(e){}return[2]})})},e}()}}),Tl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/diagnostics/diagnostics-storage.js":function(){Gu(),tl(),tt={TAGS:"tags",COUNTERS:"counters",HISTOGRAMS:"histograms",EVENTS:"events",INTERNAL:"internal"},nt={LAST_FLUSH_TIMESTAMP:"last_flush_timestamp"},rt=function(){function e(e,t){this.dbPromise=null,this.logger=t,this.dbName="AMP_diagnostics_".concat(e.substring(0,10))}return e.isSupported=function(){var e;return void 0!==(null===(e=K())||void 0===e?void 0:e.indexedDB)},e.prototype.getDB=function(){return Ft(this,void 0,void 0,function(){return Bt(this,function(e){return this.dbPromise||(this.dbPromise=this.openDB()),[2,this.dbPromise]})})},e.prototype.openDB=function(){var e=this;return new Promise(function(t,n){var r=indexedDB.open(e.dbName,1);r.onerror=function(){e.dbPromise=null,n(new Error("Failed to open IndexedDB"))},r.onsuccess=function(){var n=r.result;n.onclose=function(){e.dbPromise=null,e.logger.debug("DiagnosticsStorage: DB connection closed.")},n.onerror=function(t){e.logger.debug("DiagnosticsStorage: A global database error occurred.",t),n.close()},t(n)},r.onupgradeneeded=function(t){var n=t.target.result;e.createTables(n)}})},e.prototype.createTables=function(e){(e.objectStoreNames.contains(tt.TAGS)||e.createObjectStore(tt.TAGS,{keyPath:"key"}),e.objectStoreNames.contains(tt.COUNTERS)||e.createObjectStore(tt.COUNTERS,{keyPath:"key"}),e.objectStoreNames.contains(tt.HISTOGRAMS)||e.createObjectStore(tt.HISTOGRAMS,{keyPath:"key"}),e.objectStoreNames.contains(tt.EVENTS))||e.createObjectStore(tt.EVENTS,{keyPath:"id",autoIncrement:!0}).createIndex("time_idx","time",{unique:!1});e.objectStoreNames.contains(tt.INTERNAL)||e.createObjectStore(tt.INTERNAL,{keyPath:"key"})},e.prototype.setTags=function(e){return Ft(this,void 0,void 0,function(){var t,n,r,i,o=this;return Bt(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),0===Object.entries(e).length?[2]:[4,this.getDB()];case 1:return t=s.sent(),n=t.transaction([tt.TAGS],"readwrite"),r=n.objectStore(tt.TAGS),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to set tags",e),t()},i.forEach(function(e){var t=zt(e,2),n=t[0],i=t[1];r.put({key:n,value:i}).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to set tag",n,i,e)}})})];case 2:return i=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to set tags",i),[3,3];case 3:return[2]}})})},e.prototype.incrementCounters=function(e){return Ft(this,void 0,void 0,function(){var t,n,r,i,o=this;return Bt(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),0===Object.entries(e).length?[2]:[4,this.getDB()];case 1:return t=s.sent(),n=t.transaction([tt.COUNTERS],"readwrite"),r=n.objectStore(tt.COUNTERS),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to increment counters",e),t()},i.forEach(function(e){var t=zt(e,2),n=t[0],i=t[1],s=r.get(n);s.onsuccess=function(){var e=s.result,t=e?e.value:0;r.put({key:n,value:t+i}).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to update counter",n,e)}},s.onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to read existing counter",n,e)}})})];case 2:return i=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to increment counters",i),[3,3];case 3:return[2]}})})},e.prototype.setHistogramStats=function(e){return Ft(this,void 0,void 0,function(){var t,n,r,i,o=this;return Bt(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),0===Object.entries(e).length?[2]:[4,this.getDB()];case 1:return t=s.sent(),n=t.transaction([tt.HISTOGRAMS],"readwrite"),r=n.objectStore(tt.HISTOGRAMS),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to set histogram stats",e),t()},i.forEach(function(e){var t=zt(e,2),n=t[0],i=t[1],s=r.get(n);s.onsuccess=function(){var e,t=s.result;e=t?{key:n,count:t.count+i.count,min:Math.min(t.min,i.min),max:Math.max(t.max,i.max),sum:t.sum+i.sum}:{key:n,count:i.count,min:i.min,max:i.max,sum:i.sum},r.put(e).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to set histogram stats",n,e)}},s.onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to read existing histogram stats",n,e)}})})];case 2:return i=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to set histogram stats",i),[3,3];case 3:return[2]}})})},e.prototype.addEventRecords=function(e){return Ft(this,void 0,void 0,function(){var t,n,r,i,o=this;return Bt(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),0===e.length?[2]:[4,this.getDB()];case 1:return t=s.sent(),n=t.transaction([tt.EVENTS],"readwrite"),r=n.objectStore(tt.EVENTS),[2,new Promise(function(t){n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to add event records",e),t()};var i=r.count();i.onsuccess=function(){var t=i.result,n=Math.max(0,10-t);n<e.length&&o.logger.debug("DiagnosticsStorage: Only added ".concat(n," of ").concat(e.length," events due to storage limit")),e.slice(0,n).forEach(function(e){r.add(e).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to add event record",e)}})},i.onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to count existing events",e)}})];case 2:return i=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to add event records",i),[3,3];case 3:return[2]}})})},e.prototype.setInternal=function(e,t){return Ft(this,void 0,void 0,function(){var n,r,i,o;return Bt(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,this.getDB()];case 1:return n=s.sent(),r=n.transaction([tt.INTERNAL],"readwrite"),i=r.objectStore(tt.INTERNAL),[2,new Promise(function(n,o){r.onabort=function(){return o(new Error("Failed to set internal value"))};var s=i.put({key:e,value:t});s.onsuccess=function(){return n()},s.onerror=function(){return o(new Error("Failed to set internal value"))}})];case 2:return o=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to set internal value",o),[3,3];case 3:return[2]}})})},e.prototype.getInternal=function(e){return Ft(this,void 0,void 0,function(){var t,n,r,i;return Bt(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.getDB()];case 1:return t=o.sent(),n=t.transaction([tt.INTERNAL],"readonly"),r=n.objectStore(tt.INTERNAL),[2,new Promise(function(t,i){n.onabort=function(){return i(new Error("Failed to get internal value"))};var o=r.get(e);o.onsuccess=function(){return t(o.result)},o.onerror=function(){return i(new Error("Failed to get internal value"))}})];case 2:return i=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to get internal value",i),[2,void 0];case 3:return[2]}})})},e.prototype.getLastFlushTimestamp=function(){return Ft(this,void 0,void 0,function(){var e,t;return Bt(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getInternal(nt.LAST_FLUSH_TIMESTAMP)];case 1:return[2,(e=n.sent())?parseInt(e.value,10):void 0];case 2:return t=n.sent(),this.logger.debug("DiagnosticsStorage: Failed to get last flush timestamp",t),[2,void 0];case 3:return[2]}})})},e.prototype.setLastFlushTimestamp=function(e){return Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.setInternal(nt.LAST_FLUSH_TIMESTAMP,e.toString())];case 1:return n.sent(),[3,3];case 2:return t=n.sent(),this.logger.debug("DiagnosticsStorage: Failed to set last flush timestamp",t),[3,3];case 3:return[2]}})})},e.prototype.clearTable=function(e,t){return new Promise(function(n,r){var i=e.objectStore(t).clear();i.onsuccess=function(){return n()},i.onerror=function(){return r(new Error("Failed to clear table ".concat(t)))}})},e.prototype.getAllAndClear=function(){return Ft(this,void 0,void 0,function(){var e,t,n,r,i,o,s,a;return Bt(this,function(u){switch(u.label){case 0:return u.trys.push([0,4,,5]),[4,this.getDB()];case 1:return e=u.sent(),t=e.transaction([tt.TAGS,tt.COUNTERS,tt.HISTOGRAMS,tt.EVENTS],"readwrite"),[4,Promise.all([this.getAllFromStore(t,tt.TAGS),this.getAllFromStore(t,tt.COUNTERS),this.getAllFromStore(t,tt.HISTOGRAMS),this.getAllFromStore(t,tt.EVENTS)])];case 2:return n=zt.apply(void 0,[u.sent(),4]),r=n[0],i=n[1],o=n[2],s=n[3],[4,Promise.all([this.clearTable(t,tt.COUNTERS),this.clearTable(t,tt.HISTOGRAMS),this.clearTable(t,tt.EVENTS)])];case 3:return u.sent(),[2,{tags:r,counters:i,histogramStats:o,events:s}];case 4:return a=u.sent(),this.logger.debug("DiagnosticsStorage: Failed to get all and clear data",a),[2,{tags:[],counters:[],histogramStats:[],events:[]}];case 5:return[2]}})})},e.prototype.getAllFromStore=function(e,t){return new Promise(function(n,r){var i=e.objectStore(t).getAll();i.onsuccess=function(){return n(i.result)},i.onerror=function(){return r(new Error("Failed to get all from ".concat(t)))}})},e}()}}),Al=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/diagnostics/uncaught-sdk-errors.js":function(){Gu(),tl(),it=function(){var e=K();if(!e)return[];var t=e.__AMPLITUDE_SCRIPT_URL__;return Array.isArray(t)?t:"string"==typeof t?[t]:[]},ot=function(e){var n=K();if(n&&"function"==typeof n.addEventListener){var r=function(n){e.recordEvent("sdk.error.uncaught",t({type:n.type,message:n.message,filename:n.filename,error_name:n.errorName,stack:n.stack},n.metadata))};n.addEventListener("error",function(e){var t=_instanceof(e.error,Error)?e.error:void 0,n=null==t?void 0:t.stack,i=st({filename:e.filename,stack:n});i&&r({type:"error",message:e.message,stack:n,filename:e.filename,errorName:null==t?void 0:t.name,metadata:{colno:e.colno,lineno:e.lineno,isTrusted:e.isTrusted,matchReason:i}})},!0),n.addEventListener("unhandledrejection",function(e){var t,n=_instanceof(e.reason,Error)?e.reason:void 0,i=null==n?void 0:n.stack,o=at(i),s=st({filename:o,stack:i});s&&r({type:"unhandledrejection",message:null!==(t=null==n?void 0:n.message)&&void 0!==t?t:ut(e.reason),stack:i,filename:o,errorName:null==n?void 0:n.name,metadata:{isTrusted:e.isTrusted,matchReason:s}})},!0)}},st=function(e){var t,n,r=it();if(0!==r.length)try{for(var i=qt(r),o=i.next();!o.done;o=i.next()){var s=o.value;if(e.filename&&e.filename.includes(s))return"filename";if(e.stack&&e.stack.includes(s))return"stack"}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},at=function(e){if(e){var t=e.match(/(https?:\/\/\S+?)(?=[)\s]|$)/);return t?t[1]:void 0}},ut=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(e){return"[object Object]"}}}}),Pl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/diagnostics/diagnostics-client.js":function(){Gu(),Tl(),tl(),kl(),Al(),lt=3e5,ct=1e4,dt=function(){function e(e,n,r,i){void 0===r&&(r="US"),this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},this.inMemoryEvents=[],this.saveTimer=null,this.flushTimer=null,this.apiKey=e,this.logger=n,this.serverUrl="US"===r?"https://diagnostics.prod.us-west-2.amplitude.com/v1/capture":"https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture",this.logger.debug("DiagnosticsClient: Initializing with options",JSON.stringify(i,null,2)),this.config=t({enabled:!0,sampleRate:0},i),this.startTimestamp=Date.now(),this.shouldTrack=Ve(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,rt.isSupported()?this.storage=new rt(e,n):this.logger.debug("DiagnosticsClient: IndexedDB is not supported"),this.initializeFlushInterval(),this.shouldTrack&&(this.increment("sdk.diagnostics.sampled.in.and.enabled"),ot(this))}return e.prototype.isStorageAndTrackEnabled=function(){return Boolean(this.storage)&&Boolean(this.shouldTrack)},e.prototype.setTag=function(e,t){this.isStorageAndTrackEnabled()&&(Object.keys(this.inMemoryTags).length>=ct?this.logger.debug("DiagnosticsClient: Early return setTags as reaching memory limit"):(this.inMemoryTags[e]=t,this.startTimersIfNeeded()))},e.prototype.increment=function(e,t){void 0===t&&(t=1),this.isStorageAndTrackEnabled()&&(Object.keys(this.inMemoryCounters).length>=ct?this.logger.debug("DiagnosticsClient: Early return increment as reaching memory limit"):(this.inMemoryCounters[e]=(this.inMemoryCounters[e]||0)+t,this.startTimersIfNeeded()))},e.prototype.recordHistogram=function(e,t){if(this.isStorageAndTrackEnabled())if(Object.keys(this.inMemoryHistograms).length>=ct)this.logger.debug("DiagnosticsClient: Early return recordHistogram as reaching memory limit");else{var n=this.inMemoryHistograms[e];n?(n.count+=1,n.min=Math.min(n.min,t),n.max=Math.max(n.max,t),n.sum+=t):this.inMemoryHistograms[e]={count:1,min:t,max:t,sum:t},this.startTimersIfNeeded()}},e.prototype.recordEvent=function(e,t){this.isStorageAndTrackEnabled()&&(this.inMemoryEvents.length>=10?this.logger.debug("DiagnosticsClient: Early return recordEvent as reaching memory limit"):(this.inMemoryEvents.push({event_name:e,time:Date.now(),event_properties:t}),this.startTimersIfNeeded()))},e.prototype.startTimersIfNeeded=function(){var e=this;this.saveTimer||(this.saveTimer=setTimeout(function(){e.saveAllDataToStorage().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to save all data to storage",t)}).finally(function(){e.saveTimer=null})},1e3)),this.flushTimer||(this.flushTimer=setTimeout(function(){e._flush().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to flush",t)}).finally(function(){e.flushTimer=null})},lt))},e.prototype.saveAllDataToStorage=function(){return Ft(this,void 0,void 0,function(){var e,n,r,i;return Bt(this,function(o){switch(o.label){case 0:return this.storage?(e=t({},this.inMemoryTags),n=t({},this.inMemoryCounters),r=t({},this.inMemoryHistograms),i=Wt([],zt(this.inMemoryEvents),!1),this.inMemoryEvents=[],this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},[4,Promise.all([this.storage.setTags(e),this.storage.incrementCounters(n),this.storage.setHistogramStats(r),this.storage.addEventRecords(i)])]):[2];case 1:return o.sent(),[2]}})})},e.prototype._flush=function(){return Ft(this,void 0,void 0,function(){var e,t,n,r,i,o,s,a,u,l;return Bt(this,function(c){switch(c.label){case 0:return this.storage?[4,this.saveAllDataToStorage()]:[2];case 1:return c.sent(),this.saveTimer=null,this.flushTimer=null,[4,this.storage.getAllAndClear()];case 2:return e=c.sent(),t=e.tags,n=e.counters,r=e.histogramStats,i=e.events,this.storage.setLastFlushTimestamp(Date.now()),o={},t.forEach(function(e){o[e.key]=e.value}),s={},n.forEach(function(e){s[e.key]=e.value}),a={},r.forEach(function(e){a[e.key]={count:e.count,min:e.min,max:e.max,avg:Math.round(e.sum/e.count*100)/100}}),u=i.map(function(e){return{event_name:e.event_name,time:e.time,event_properties:e.event_properties}}),0===Object.keys(s).length&&0===Object.keys(a).length&&0===u.length?[2]:(l={tags:o,histogram:a,counters:s,events:u},this.fetch(l),[2])}})})},e.prototype.fetch=function(e){return Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){switch(n.label){case 0:if(n.trys.push([0,2,,3]),!K())throw new Error("DiagnosticsClient: Fetch is not supported");return[4,fetch(this.serverUrl,{method:"POST",headers:{"X-ApiKey":this.apiKey,"Content-Type":"application/json"},body:JSON.stringify(e)})];case 1:return n.sent().ok?(this.logger.debug("DiagnosticsClient: Successfully sent diagnostics data"),[3,3]):(this.logger.debug("DiagnosticsClient: Failed to send diagnostics data."),[2]);case 2:return t=n.sent(),this.logger.debug("DiagnosticsClient: Failed to send diagnostics data. ",t),[3,3];case 3:return[2]}})})},e.prototype.initializeFlushInterval=function(){return Ft(this,void 0,void 0,function(){var e,t,n;return Bt(this,function(r){switch(r.label){case 0:return this.storage?(e=Date.now(),[4,this.storage.getLastFlushTimestamp()]):[2];case 1:return-1===(t=r.sent()||-1)?(this.storage.setLastFlushTimestamp(e),this._setFlushTimer(lt),[2]):(n=e-t)>=lt?(this._flush(),[2]):(this._setFlushTimer(lt-n),[2])}})})},e.prototype._setFlushTimer=function(e){var t=this;this.flushTimer=setTimeout(function(){t._flush().catch(function(e){t.logger.debug("DiagnosticsClient: Failed to flush",e)}).finally(function(){t.flushTimer=null})},e)},e.prototype._setSampleRate=function(e){this.logger.debug("DiagnosticsClient: Setting sample rate to",e),this.config.sampleRate=e,this.shouldTrack=Ve(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug("DiagnosticsClient: Should track is",this.shouldTrack)},e}()}}),Rl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/transports/base.js":function(){Zu(),fl(),ft=function(){function e(){}return e.prototype.send=function(e,t,n){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,n,r,i,o,s,a,u,l,c,d,f,h,p,v,g,y,m,b,w,_,S;if("object"!==(void 0===e?"undefined":_type_of(e)))return null;var k=e.code||0,x=this.buildStatus(k);switch(x){case V.Success:return{status:x,statusCode:k,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 V.Invalid:return{status:x,statusCode:k,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_invalid_fields)&&void 0!==s?s:{},eventsWithMissingFields:null!==(a=e.events_with_missing_fields)&&void 0!==a?a:{},eventsWithInvalidIdLengths:null!==(u=e.events_with_invalid_id_lengths)&&void 0!==u?u:{},epsThreshold:null!==(l=e.eps_threshold)&&void 0!==l?l:0,exceededDailyQuotaDevices:null!==(c=e.exceeded_daily_quota_devices)&&void 0!==c?c:{},silencedDevices:null!==(d=e.silenced_devices)&&void 0!==d?d:[],silencedEvents:null!==(f=e.silenced_events)&&void 0!==f?f:[],throttledDevices:null!==(h=e.throttled_devices)&&void 0!==h?h:{},throttledEvents:null!==(p=e.throttled_events)&&void 0!==p?p:[]}};case V.PayloadTooLarge:return{status:x,statusCode:k,body:{error:null!==(v=e.error)&&void 0!==v?v:""}};case V.RateLimit:return{status:x,statusCode:k,body:{error:null!==(g=e.error)&&void 0!==g?g:"",epsThreshold:null!==(y=e.eps_threshold)&&void 0!==y?y:0,throttledDevices:null!==(m=e.throttled_devices)&&void 0!==m?m:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(w=e.exceeded_daily_quota_devices)&&void 0!==w?w:{},exceededDailyQuotaUsers:null!==(_=e.exceeded_daily_quota_users)&&void 0!==_?_:{},throttledEvents:null!==(S=e.throttled_events)&&void 0!==S?S:[]}};case V.Timeout:default:return{status:x,statusCode:k}}},e.prototype.buildStatus=function(e){return Vt(e)?V.Success:429===e?V.RateLimit:413===e?V.PayloadTooLarge:408===e?V.Timeout:e>=400&&e<500?V.Invalid:e>=500?V.Failed:V.Unknown},e}()}}),Ml=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/transports/fetch.js":function(){Gu(),Rl(),ht=function(e){function n(t){void 0===t&&(t={});var n=e.call(this)||this;return n.customHeaders=t,n}return jt(n,e),n.prototype.send=function(e,n){return Ft(this,void 0,void 0,function(){var r,i,o;return Bt(this,function(s){switch(s.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return r={headers:t({"Content-Type":"application/json",Accept:"*/*"},this.customHeaders),body:JSON.stringify(n),method:"POST"},[4,fetch(e,r)];case 1:return[4,(i=s.sent()).text()];case 2:o=s.sent();try{return[2,this.buildResponse(JSON.parse(o))]}catch(e){return[2,this.buildResponse({code:i.status})]}return[2]}})})},n}(ft)}}),Nl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/transports/gzip.js":function(){Gu(),pt=2048}}),Ll=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/remote-config/remote-config-localstorage.js":function(){vt=function(){function e(e,t){this.key="AMP_remote_config_".concat(e.substring(0,10)),this.logger=t}return e.prototype.fetchConfig=function(){var e=null,t={remoteConfig:null,lastFetch:new Date};try{e=localStorage.getItem(this.key)}catch(e){return this.logger.debug("Remote config localstorage failed to access: ",e),Promise.resolve(t)}if(null===e)return this.logger.debug("Remote config localstorage gets null because the key does not exist"),Promise.resolve(t);try{var n=JSON.parse(e);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(n))),Promise.resolve({remoteConfig:n.remoteConfig,lastFetch:new Date(n.lastFetch)})}catch(e){return this.logger.debug("Remote config localstorage failed to parse: ",e),localStorage.removeItem(this.key),Promise.resolve(t)}},e.prototype.setConfig=function(e){try{return localStorage.setItem(this.key,JSON.stringify(e)),this.logger.debug("Remote config localstorage set successfully."),Promise.resolve(!0)}catch(e){this.logger.debug("Remote config localstorage failed to set: ",e)}return Promise.resolve(!1)},e}()}}),Dl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/remote-config/remote-config.js":function(){Gu(),Ll(),nl(),gt={INVALID_API_KEY:401,FORBIDDEN:403,RATE_LIMIT:429},yt=function(){function e(e,t,n,r){void 0===n&&(n="US"),this.callbackInfos=[],this.lastSuccessfulFetch=null,this.fetchPromise=null,this.isLastFetchInvalidApiKey=!1,this.apiKey=e,this.serverUrl=r||("US"===n?"https://sr-client-cfg.amplitude.com/config":"https://sr-client-cfg.eu.amplitude.com/config"),this.logger=t,this.storage=new vt(e,t)}return e.prototype.subscribe=function(e,t,n){var r=$(),i={id:r,key:e,deliveryMode:t,callback:n};return this.callbackInfos.push(i),"all"===t?this.subscribeAll(i):this.subscribeWaitForRemote(i,t.timeout),r},e.prototype.unsubscribe=function(e){var t=this.callbackInfos.findIndex(function(t){return t.id===e});return-1===t?(this.logger.debug("Remote config client unsubscribe failed because callback with id ".concat(e," doesn't exist.")),!1):(this.callbackInfos.splice(t,1),this.logger.debug("Remote config client unsubscribe succeeded removing callback with id ".concat(e,".")),!0)},e.prototype.updateConfigs=function(){return Ft(this,void 0,void 0,function(){var e,t=this;return Bt(this,function(n){switch(n.label){case 0:return this.lastSuccessfulFetch&&Date.now()-this.lastSuccessfulFetch<3e5?(this.logger.debug("Remote config client skipping updateConfigs: Too recent"),[2]):[4,this.getOrCreateFetchPromise()];case 1:return e=n.sent(),this.storage.setConfig(e),this.callbackInfos.forEach(function(n){t.sendCallback(n,e,"remote")}),[2]}})})},e.prototype.getOrCreateFetchPromise=function(){var e=this;return this.fetchPromise?this.fetchPromise:this.isLastFetchInvalidApiKey?(this.logger.debug("Remote config client skipping fetch: Invalid API key"),this.fetchPromise=Promise.resolve({remoteConfig:null,lastFetch:new Date}).finally(function(){e.fetchPromise=null}),this.fetchPromise):(this.fetchPromise=this.fetch().then(function(t){return null!==t.remoteConfig&&(e.lastSuccessfulFetch=Date.now()),t}).finally(function(){e.fetchPromise=null}),this.fetchPromise)},e.prototype.subscribeAll=function(e){return Ft(this,void 0,void 0,function(){var t,n,r,i=this;return Bt(this,function(o){switch(o.label){case 0:return t=this.getOrCreateFetchPromise().then(function(t){i.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(t))),i.sendCallback(e,t,"remote"),i.storage.setConfig(t)}),n=this.storage.fetchConfig().then(function(e){return e}),[4,Promise.race([t,n])];case 1:return void 0!==(r=o.sent())&&(this.logger.debug("Remote config client subscription all mode fetched from cache: ".concat(JSON.stringify(r))),null!==r.remoteConfig?this.sendCallback(e,r,"cache"):this.logger.debug("Remote config client skips sending callback because cache is empty (first time user).")),[4,t];case 2:return o.sent(),[2]}})})},e.prototype.subscribeWaitForRemote=function(e,t){return Ft(this,void 0,void 0,function(){var n,r;return Bt(this,function(i){switch(i.label){case 0:n=new Promise(function(e,n){setTimeout(function(){n("Timeout exceeded")},t)}),i.label=1;case 1:return i.trys.push([1,3,,5]),[4,Promise.race([this.getOrCreateFetchPromise(),n])];case 2:return r=i.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(e,r,"remote"),this.storage.setConfig(r),[3,5];case 3:return i.sent(),this.logger.debug("Remote config client subscription wait for remote mode exceeded timeout. Try to fetch from cache."),[4,this.storage.fetchConfig()];case 4:return null!==(r=i.sent()).remoteConfig?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(e,r,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(e,r,"remote")),[3,5];case 5:return[2]}})})},e.prototype.sendCallback=function(e,t,n){var r;e.lastCallback=new Date,r=e.key?e.key.split(".").reduce(function(e,t){return null===e?e:t in e?e[t]:null},t.remoteConfig):t.remoteConfig,e.callback(r,n,t.lastFetch)},e.prototype.fetch=function(e,t){return void 0===e&&(e=3),void 0===t&&(t=1e3),Ft(this,void 0,void 0,function(){var n,r,i,o,s,a,u=this;return Bt(this,function(l){switch(l.label){case 0:n=t/e,r={remoteConfig:null,lastFetch:new Date},i=function(r){var i,s,a,l,c,d;return Bt(this,function(f){switch(f.label){case 0:i=!0,s=new AbortController,a=setTimeout(function(){return s.abort()},t),f.label=1;case 1:return f.trys.push([1,7,8,9]),[4,fetch(o.getUrlParams(),{method:"GET",headers:{Accept:"*/*"},signal:s.signal})];case 2:return(l=f.sent()).ok?[3,4]:[4,l.text()];case 3:return c=f.sent(),o.logger.debug("Remote config client fetch with retry time ".concat(e," failed with ").concat(l.status,": ").concat(c)),l.status===gt.INVALID_API_KEY||l.status===gt.FORBIDDEN?(o.logger.error("Remote config client fetch failed with ".concat(l.status,". Invalid API key; future fetches will be skipped.")),o.isLastFetchInvalidApiKey=!0,i=!1):l.status>=400&&l.status<500&&l.status!==gt.RATE_LIMIT&&(i=!1),[3,6];case 4:return[4,l.json()];case 5:return[2,{value:{remoteConfig:f.sent(),lastFetch:new Date}}];case 6:return[3,9];case 7:return _instanceof(d=f.sent(),Error)&&"AbortError"===d.name?o.logger.debug("Remote config client fetch with retry time ".concat(e," timed out after ").concat(t,"ms")):o.logger.debug("Remote config client fetch with retry time ".concat(e," is rejected because: "),d),[3,9];case 8:return clearTimeout(a),[7];case 9:return i?r<e-1?[4,new Promise(function(e){return setTimeout(e,u.getJitterDelay(n))})]:[3,11]:[2,"break"];case 10:f.sent(),f.label=11;case 11:return[2]}})},o=this,s=0,l.label=1;case 1:return s<e?[5,i(s)]:[3,4];case 2:if("object"===(void 0===(a=l.sent())?"undefined":_type_of(a)))return[2,a.value];if("break"===a)return[3,4];l.label=3;case 3:return s++,[3,1];case 4:return[2,r]}})})},e.prototype.getJitterDelay=function(e){return Math.floor(Math.random()*e)},e.prototype.getUrlParams=function(){var t=encodeURIComponent(this.apiKey),n=new URLSearchParams;return n.append("config_group",e.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(t,"?").concat(n.toString())},e.CONFIG_GROUP="browser",e}()}}),jl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/observers/console.js":function(){Gu(),tl(),mt=K(),bt=null==mt?void 0:mt.console,wt={},_t={},St=!1,kt={addListener:Qt,removeListener:Xt,_restoreConsole:Yt}}}),Ul=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/server-zone.js":function(){var e;(e=xt||(xt={})).US="US",e.EU="EU",e.STAGING="STAGING"}}),Fl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/offline.js":function(){Et=null}}),Bl=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/element-interactions.js":function(){Ct=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],It="data-amp-track-",Ot=["div","span","h1","h2","h3","h4","h5","h6"],Tt=150}}),ql=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/frustration-interactions.js":function(){Gu(),At=Wt(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],zt(["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]']),!1),Pt=At,Rt=At,Mt=["*"],Nt=1e3,Lt=4,Dt=50}});function zl(e){var t,n,r=e.json,i=e.targetObject,o=e.allowlist,s=e.excludelist,a=e.ancestors,u=e.parentObject,l=e.targetKey;i||(i=r);var c=Object.keys(i);try{for(var d=qt(c),f=d.next();!f.done;f=d.next()){var h=f.value,p=Wt(Wt([],zt(a),!1),[h],!1);Zt(i[h])?nn(p,o)&&!nn(p,s)||delete i[h]:zl({json:r,targetObject:i[h],allowlist:o,excludelist:s,ancestors:p,parentObject:i,targetKey:h})}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}0===Object.keys(i).length&&u&&l&&delete u[l]}function Wl(e,t,n,r){if(void 0===n&&(n=0),void 0===r&&(r=0),r===t.length)return n===e.length;if(n===e.length){for(;r<t.length&&"**"===t[r];)r++;return r===t.length}var i=t[r];if("**"===i){if(r+1===t.length)return!0;for(var o=n;o<=e.length;o++)if(Wl(e,t,o,r+1))return!0;return!1}return("*"===i||i===e[n])&&Wl(e,t,n+1,r+1)}var Vl,Hl,Kl,Gl,Jl,$l,Ql,Xl,Yl,Zl,ec,tc,nc,rc,ic,oc,sc,ac,uc,lc,cc,dc,fc,hc,pc,vc,gc,yc,mc,bc,wc,_c,Sc,kc,xc,Ec,Cc,Ic,Oc,Tc,Ac,Pc,Rc,Mc,Nc,Lc,Dc,jc,Uc,Fc,Bc,qc,zc,Wc,Vc,Hc,Kc,Gc,Jc,$c,Qc,Xc,Yc,Zc,ed,td,nd,rd,id,od,sd,ad,ud,ld,cd,dd,fd,hd,pd,vd,gd,yd,md,bd,wd,_d,Sd,kd,xd,Ed,Cd,Id,Od,Td,Ad,Pd,Rd,Md,Nd,Ld,Dd,jd,Ud,Fd,Bd,qd,zd,Wd,Vd,Hd=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/json-query.js":function(){Gu()}}),Kd=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/network-request-event.js":function(){var e;Gu(),tl(),Hd(),$u(),Vl=function(){function e(e){this.request=e}return e.prototype.headers=function(e){var t,n;void 0===e&&(e=[]);var r=this.request.headers,i={};if(Array.isArray(r))r.forEach(function(e){var t=zt(e,2),n=t[0],r=t[1];i[n]=r});else if(_instanceof(r,Headers))r.forEach(function(e,t){i[t]=e});else if("object"===(void 0===r?"undefined":_type_of(r))&&null!==r)try{for(var o=qt(Object.entries(r)),s=o.next();!s.done;s=o.next()){var a=zt(s.value,2),u=a[0],l=a[1];i[u]=l}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return Ql(i,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var e=K();if(null==e?void 0:e.TextEncoder){var t=this.request.body;return this._bodySize=rn(t,100),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.request.body?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),Ft(this,void 0,void 0,function(){var n;return Bt(this,function(r){return 0===e.length?[2,null]:(n=this.body,[2,on(n,e,t)])})})},e}(),Hl=function(){function e(e,t){this.bodyRaw=e,this.requestHeaders=t}return e.prototype.headers=function(e){return void 0===e&&(e=[]),Ql(this.requestHeaders,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return rn(this.bodyRaw,100)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.bodyRaw?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),Ft(this,void 0,void 0,function(){var n;return Bt(this,function(r){return 0===e.length?[2,null]:(n=this.body,[2,on(n,e,t)])})})},e}(),Kl=function(){function e(e){this.response=e}return e.prototype.headers=function(e){var t;if(void 0===e&&(e=[]),_instanceof(this.response.headers,Headers)){var n=this.response.headers,r={};return null===(t=null==n?void 0:n.forEach)||void 0===t||t.call(n,function(e,t){r[t]=e}),Ql(r,{allow:e})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){var e,t;if(void 0!==this._bodySize)return this._bodySize;var n=null===(t=null===(e=this.response.headers)||void 0===e?void 0:e.get)||void 0===t?void 0:t.call(e,"content-length"),r=n?parseInt(n,10):void 0;return this._bodySize=r,r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return Ft(this,void 0,void 0,function(){var e,t;return Bt(this,function(n){switch(n.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),n.label=1;case 1:return n.trys.push([1,3,,4]),e=this.clonedResponse.text(),t=new Promise(function(e){return setTimeout(function(){return e(null)},500)}),[4,Promise.race([e,t])];case 2:return[2,n.sent()];case 3:return n.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),Ft(this,void 0,void 0,function(){var n;return Bt(this,function(r){switch(r.label){case 0:return 0===e.length?[2,null]:[4,this.text()];case 1:return n=r.sent(),[2,on(n,e,t)]}})})},e}(),Gl=function(){function e(e,t,n,r){this.statusCode=e,this.headersString=t,this.size=n,this.getJson=r}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),e.prototype.headers=function(e){var t,n;if(void 0===e&&(e=[]),!this.headersString)return{};var r={},i=this.headersString.split("\r\n");try{for(var o=qt(i),s=o.next();!s.done;s=o.next()){var a=s.value,u=zt(a.split(": "),2),l=u[0],c=u[1];l&&c&&(r[l]=c)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return Ql(r,{allow:e})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),Ft(this,void 0,void 0,function(){var n;return Bt(this,function(r){return 0===e.length?[2,null]:(n=this.getJson())?(en(n,e,t),[2,n]):[2,null]})})},e}(),(e=Jl||(Jl={})).REDACT="redact",e.REMOVE="remove",$l="[REDACTED]",Ql=function(e,t){var n,r,i=t.allow,o=void 0===i?[]:i,s=t.strategy,a=void 0===s?Jl.REMOVE:s,u=Wt([],zt(P),!1),l={},c=function(t){var n=t.toLowerCase();u.find(function(e){return e.toLowerCase()===n})?a===Jl.REDACT&&(l[t]=$l):o.find(function(e){return e.toLowerCase()===n})?l[t]=e[t]:a===Jl.REDACT&&(l[t]=$l)};try{for(var d=qt(Object.keys(e)),f=d.next();!f.done;f=d.next()){c(f.value)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}return l},Xl=function(){function e(e,t,n,r,i,o,s,a,u,l,c){void 0===s&&(s=0),this.type=e,this.method=t,this.timestamp=n,this.startTime=r,this.url=i,this.requestWrapper=o,this.status=s,this.duration=a,this.responseWrapper=u,this.error=l,this.endTime=c}return e.prototype.toSerializable=function(){var e,t,n,r,i={type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:null===(e=this.requestWrapper)||void 0===e?void 0:e.headers(Wt([],zt(A),!1)),requestBodySize:null===(t=this.requestWrapper)||void 0===t?void 0:t.bodySize,responseHeaders:null===(n=this.responseWrapper)||void 0===n?void 0:n.headers(Wt([],zt(A),!1)),responseBodySize:null===(r=this.responseWrapper)||void 0===r?void 0:r.bodySize};return Object.fromEntries(Object.entries(i).filter(function(e){var t=zt(e,2);t[0];return void 0!==t[1]}))},e}()}}),Gd=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/observers/network.js":function(){Gu(),tl(),nl(),Kd(),Yl=function(e,t){void 0===t&&(t=$()),this.callback=e,this.id=t},Zl=function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var n=K();e.isSupported()&&(this.globalScope=n)}return e.isSupported=function(){var e=K();return!!e&&!!e.fetch},e.prototype.subscribe=function(e,t){var n,r,i,o,s,a,u,l,c,d;if(this.logger||(this.logger=t),this.eventCallbacks.set(e.id,e),!this.isObserving){var f=null===(i=null===(r=null===(n=this.globalScope)||void 0===n?void 0:n.XMLHttpRequest)||void 0===r?void 0:r.prototype)||void 0===i?void 0:i.open,h=null===(a=null===(s=null===(o=this.globalScope)||void 0===o?void 0:o.XMLHttpRequest)||void 0===s?void 0:s.prototype)||void 0===a?void 0:a.send,p=null===(c=null===(l=null===(u=this.globalScope)||void 0===u?void 0:u.XMLHttpRequest)||void 0===l?void 0:l.prototype)||void 0===c?void 0:c.setRequestHeader;f&&h&&p&&this.observeXhr(f,h,p);var v=null===(d=this.globalScope)||void 0===d?void 0:d.fetch;v&&this.observeFetch(v),this.isObserving=!0}},e.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},e.prototype.triggerEventCallbacks=function(e){var t=this;this.eventCallbacks.forEach(function(n){try{n.callback(e)}catch(e){sn(function(){var n;null===(n=t.logger)||void 0===n||n.debug("an unexpected error occurred while triggering event callbacks",e)})}})},e.prototype.handleNetworkRequestEvent=function(e,t,n,r,i,o,s){var a;if(void 0!==o&&void 0!==s){var u,l,c,d="GET";if(!function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&null!==e&&"url"in e&&"method"in e}(t)?u=null===(a=null==t?void 0:t.toString)||void 0===a?void 0:a.call(t):(u=t.url,d=t.method),u)try{var f=new URL(u);u="".concat(f.protocol,"//").concat(f.host).concat(f.pathname).concat(f.search).concat(f.hash)}catch(e){}d=(null==n?void 0:n.method)||d,r&&(l=r.status),i&&(c={name:i.name||"UnknownError",message:i.message||"An unknown error occurred"},l=0);var h=Math.floor(performance.now()-s),p=Math.floor(o+h),v=new Xl(e,d,o,o,u,n,l,h,r,c,p);this.triggerEventCallbacks(v)}},e.prototype.getTimestamps=function(){var e,t;return{startTime:null===(e=Date.now)||void 0===e?void 0:e.call(Date),durationStart:null===(t=null===performance||void 0===performance?void 0:performance.now)||void 0===t?void 0:t.call(performance)}},e.prototype.observeFetch=function(e){var t=this;this.globalScope&&e&&(this.globalScope.fetch=function(n,r){return Ft(t,void 0,void 0,function(){var t,i,o,s,a=this;return Bt(this,function(u){switch(u.label){case 0:try{t=this.getTimestamps()}catch(e){sn(function(){var t;return null===(t=a.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while retrieving timestamps",e)})}u.label=1;case 1:return u.trys.push([1,3,,4]),[4,e(n,r)];case 2:return i=u.sent(),[3,4];case 3:return s=u.sent(),o=s,[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",n,r?new Vl(r):void 0,i?new Kl(i):void 0,o,null==t?void 0:t.startTime,null==t?void 0:t.durationStart)}catch(e){sn(function(){var t;return null===(t=a.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while handling fetch",e)})}if(i)return[2,i];throw o}})})})},e.createXhrJsonParser=function(e,t){return function(){var n;try{if("json"===e.responseType){if(null===(n=t.globalScope)||void 0===n?void 0:n.structuredClone)return t.globalScope.structuredClone(e.response)}else if(["text",""].includes(e.responseType))return JSON.parse(e.responseText)}catch(n){return _instanceof(n,Error)&&"InvalidStateError"===n.name&&sn(function(){var n;return null===(n=t.logger)||void 0===n?void 0:n.debug("unexpected error when retrieving responseText. responseType='".concat(e.responseType,"'"))}),null}return null}},e.prototype.observeXhr=function(n,r,i){if(this.globalScope&&n&&r){var o=this.globalScope.XMLHttpRequest.prototype,s=this;o.open=function(){for(var e,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=zt(r,2),a=o[0],u=o[1];try{this.$$AmplitudeAnalyticsEvent=t({method:a,url:null===(e=null==u?void 0:u.toString)||void 0===e?void 0:e.call(u),headers:{}},s.getTimestamps())}catch(e){sn(function(){var t;return null===(t=s.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while calling xhr open",e)})}return n.apply(this,r)},o.send=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=this,o=e.createXhrJsonParser(this,s),a=t[0],u=i.$$AmplitudeAnalyticsEvent;return i.$$AmplitudeAnalyticsEvent&&i.addEventListener("loadend",function(){try{var e=i.getAllResponseHeaders(),t=i.getResponseHeader("content-length"),n=new Gl(i.status,e,t?parseInt(t,10):void 0,o),r=i.$$AmplitudeAnalyticsEvent.headers,l=new Hl(a,r);u.status=i.status,s.handleNetworkRequestEvent("xhr",{url:u.url,method:u.method},l,n,void 0,u.startTime,u.durationStart)}catch(e){sn(function(){var t;return null===(t=s.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while handling xhr send",e)})}}),r.apply(i,t)},o.setRequestHeader=function(e,t){try{var n=this.$$AmplitudeAnalyticsEvent;n&&(n.headers[e]=t)}catch(e){sn(function(){var t;return null===(t=s.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while calling xhr setRequestHeader",e)})}i.apply(this,[e,t])}}},e}(),ec=new Zl}}),Jd=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/campaign/campaign-parser.js":function(){Gu(),_l(),$u(),tc=function(){function e(){}return e.prototype.parse=function(){return Ft(this,void 0,void 0,function(){return Bt(this,function(e){return[2,t(t(t(t({},T),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=Fe();return{utm_campaign:e[f],utm_content:e[h],utm_id:e[p],utm_medium:e[v],utm_source:e[g],utm_term:e[y]}},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=Fe();return(e={})[m]=t[m],e[b]=t[b],e[w]=t[w],e[_]=t[_],e[S]=t[S],e[k]=t[k],e[x]=t[x],e[E]=t[E],e[C]=t[C],e[I]=t[I],e[O]=t[O],e},e}()}}),$d=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/plugins/helpers.js":function(){Gu(),nc="data-amp-mask",rc="*****",ic=/\b(?:\d[ -]*?){13,16}\b/,oc=/(\d{3}-?\d{2}-?\d{4})/g,sc=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,ac=function(e,t){var n,r;if(void 0===t&&(t=[]),"string"!=typeof e)return"";var i=e;i=(i=(i=i.replace(ic,rc)).replace(oc,rc)).replace(sc,rc);try{for(var o=qt(t),s=o.next();!s.done;s=o.next()){var a=s.value;try{i=i.replace(a,rc)}catch(e){}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},uc=function(e){if("undefined"==typeof document||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute(nc)?rc:e?e(document.title):document.title}}}),Qd=zu({"../../../../node_modules/zen-observable/lib/Observable.js":function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Observable=void 0;var t=function(e){return Boolean(Symbol[e])},n=function(e){return t(e)?Symbol[e]:"@@"+e},r=n("iterator"),i=n("observable"),o=n("species");function s(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function a(e){var t=e.constructor;return void 0!==t&&null===(t=t[o])&&(t=void 0),void 0!==t?t:v}function u(e){u.log?u.log(e):setTimeout(function(){throw e})}function l(e){Promise.resolve().then(function(){try{e()}catch(e){u(e)}})}function c(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=s(t,"unsubscribe");n&&n.call(t)}}catch(e){u(e)}}function d(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function f(e,t,n){e._state="running";var r=e._observer;try{var i=s(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(d(e),!i)throw n;i.call(r,n);break;case"complete":d(e),i&&i.call(r)}}catch(e){u(e)}"closed"===e._state?c(e):"running"===e._state&&(e._state="ready")}function h(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void l(function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(f(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e)})):void f(e,t,n);e._queue.push({type:t,value:n})}}var p=function(){function e(t,n){_class_call_check(this,e),this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";var r=this,i={get closed(){return"closed"===r._state},next:function(e){h(r,"next",e)},error:function(e){h(r,"error",e)},complete:function(){h(r,"complete")}};try{this._cleanup=n.call(void 0,i)}catch(e){i.error(e)}"initializing"===this._state&&(this._state="ready")}return _create_class(e,[{key:"closed",get:function(){return"closed"===this._state}},{key:"unsubscribe",value:function(){"closed"!==this._state&&(d(this),c(this))}}]),e}(),v=function(){function e(t){if(_class_call_check(this,e),!_instanceof(this,e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}return _create_class(e,[{key:"subscribe",value:function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new p(e,this._subscriber)}},{key:"forEach",value:function(e){var t=this;return new Promise(function(n,r){var i=function(){o.unsubscribe(),n()};if("function"==typeof e)var o=t.subscribe({next:function(t){try{e(t,i)}catch(e){r(e),o.unsubscribe()}},error:r,complete:n});else r(new TypeError(e+" is not a function"))})}},{key:"map",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(a(this))(function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})})}},{key:"filter",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(a(this))(function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})})}},{key:"reduce",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=a(this),r=arguments.length>1,i=!1,o=arguments[1];return new n(function(n){return t.subscribe({next:function(t){var s=!i;if(i=!0,!s||r)try{o=e(o,t)}catch(e){return n.error(e)}else o=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(o),n.complete()}})})}},{key:"all",value:function(){return _async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:return e=[],[4,this.forEach(function(t){return e.push(t)})];case 1:return t.sent(),[2,e]}})}).call(this)}},{key:"concat",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=a(this);return new i(function(t){var r,o=0;return function e(s){r=s.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===n.length?(r=void 0,t.complete()):e(i.from(n[o++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}})}},{key:"flatMap",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=a(this);return new n(function(r){var i=function(){s.closed&&0===o.length&&r.complete()},o=[],s=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return r.error(e)}var s=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=o.indexOf(s);e>=0&&o.splice(e,1),i()}});o.push(s)},error:function(e){r.error(e)},complete:function(){i()}});return function(){o.forEach(function(e){return e.unsubscribe()}),s.unsubscribe()}})}},{key:i,value:function(){return this}}],[{key:"from",value:function(n){var o="function"==typeof this?this:e;if(null==n)throw new TypeError(n+" is not an object");var a=s(n,i);if(a){var u=a.call(n);if(Object(u)!==u)throw new TypeError(u+" is not an object");return function(e){return _instanceof(e,v)}(u)&&u.constructor===o?u:new o(function(e){return u.subscribe(e)})}if(t("iterator")&&(a=s(n,r)))return new o(function(e){l(function(){if(!e.closed){var t=!0,r=!1,i=void 0;try{for(var o,s=a.call(n)[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){var u=o.value;if(e.next(u),e.closed)return}}catch(e){r=!0,i=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw i}}e.complete()}})});if(Array.isArray(n))return new o(function(e){l(function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}})});throw new TypeError(n+" is not observable")}},{key:"of",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return new("function"==typeof this?this:e)(function(e){l(function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}})})}},{key:o,get:function(){return this}}]),e}();e.Observable=v,Object.defineProperty(v,Symbol("extensions"),{value:{symbol:i,hostReportError:u},configurable:!0})}}),Xd=zu({"../../../../node_modules/zen-observable/index.js":function(e,t){t.exports=Qd().Observable}}),Yd=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/observable.js":function(){Gu(),lc=Hu(Xd())}}),Zd=zu({"../../../../node_modules/safe-json-stringify/index.js":function(e,t){var n=Object.prototype.hasOwnProperty;function r(e){return"[Throws: "+(e?e.message:"?")+"]"}function i(e){var t=[];return function e(i){if(null===i||"object"!==(void 0===i?"undefined":_type_of(i)))return i;if(-1!==t.indexOf(i))return"[Circular]";if(t.push(i),"function"==typeof i.toJSON)try{var o=e(i.toJSON());return t.pop(),o}catch(e){return r(e)}if(Array.isArray(i)){var s=i.map(e);return t.pop(),s}var a=Object.keys(i).reduce(function(t,o){return t[o]=e(function(e,t){if(n.call(e,t))try{return e[t]}catch(e){return r(e)}return e[t]}(i,o)),t},{});return t.pop(),a}(e)}t.exports=function(e,t,n){return JSON.stringify(i(e),t,n)},t.exports.ensureProperties=i}}),ef=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/safe-stringify.js":function(){cc=Hu(Zd()),dc=cc.default||cc}}),tf=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/messenger/constants.js":function(){hc={US:fc="https://app.amplitude.com",EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"},pc="https://cdn.amplitude.com/libs/background-capture-1.0.1.js.gz"}}),nf=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/messenger/utils.js":function(){vc=function(e){return document.querySelector('script[src="'.concat(CSS.escape(e),'"]'))?Promise.resolve({status:!0}):new Promise(function(t,n){var r;try{var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.addEventListener("load",function(){t({status:!0})},{once:!0}),i.addEventListener("error",function(){n({status:!1,message:"Failed to load the script ".concat(e)})}),null===(r=document.head)||void 0===r||r.appendChild(i)}catch(e){n(e)}})}}}),rf=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/messenger/base-window-messenger.js":function(){Gu(),tl(),tf(),nf(),yc="__AMPLITUDE_MESSENGER_INSTANCE__",mc="__AMPLITUDE_MESSENGER__",bc=function(){function e(e){var t=(void 0===e?{}:e).origin,n=void 0===t?fc:t;this[gc]=!0,this.isSetup=!1,this.messageHandler=null,this.requestCallbacks={},this.actionHandlers=new Map,this.pendingMessages=new Map,this.scriptLoadPromises=new Map,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),n.timeout>0&&setTimeout(function(){s(new Error("".concat(e," timed out (id: ").concat(i,")"))),delete r.requestCallbacks[i]},n.timeout)})},e.prototype.handleResponse=function(e){var t;this.requestCallbacks[e.id]?(this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]):null===(t=this.logger)||void 0===t||t.warn("No callback found for request id: ".concat(e.id))},e.prototype.registerActionHandler=function(e,t){var n,r,i,o;this.actionHandlers.has(e)&&(null===(o=null===(i=this.logger)||void 0===i?void 0:i.warn)||void 0===o||o.call(i,"Overwriting existing action handler for: ".concat(e))),this.actionHandlers.set(e,t);var s=this.pendingMessages.get(e);if(s){this.pendingMessages.delete(e);try{for(var a=qt(s),u=a.next();!u.done;u=a.next()){t(u.value)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}},e.prototype.loadScriptOnce=function(e){return Ft(this,void 0,void 0,function(){var t,n,r;return Bt(this,function(i){switch(i.label){case 0:if(t=this.scriptLoadPromises.get(e))return[2,t];n=vc(e).then(function(){}),this.scriptLoadPromises.set(e,n),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,n];case 2:return i.sent(),[3,4];case 3:throw r=i.sent(),this.scriptLoadPromises.delete(e),r;case 4:return[2]}})})},e.prototype.setup=function(e){var t,n,r=this,i=void 0===e?{}:e,o=i.logger,s=i.endpoint;o&&(this.logger=o),s&&this.endpoint===fc&&(this.endpoint=s),this.isSetup||(this.isSetup=!0,null===(n=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Setting up messenger"),this.messageHandler=function(e){var t,n,i,o,s;if(null===(n=null===(t=r.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Message received: ",JSON.stringify(e)),r.endpoint===e.origin){var a=e.data,u=null==a?void 0:a.action;if(u)if("id"in a&&a.id)null===(o=null===(i=r.logger)||void 0===i?void 0:i.debug)||void 0===o||o.call(i,"Received Response to previous request: ",JSON.stringify(e)),r.handleResponse(a);else{if("ping"===u)return void r.notify({action:"pong"});var l=r.actionHandlers.get(u);if(l)l(a.data);else{var c=null!==(s=r.pendingMessages.get(u))&&void 0!==s?s:[];c.push(a.data),r.pendingMessages.set(u,c)}}}},window.addEventListener("message",this.messageHandler),this.notify({action:"page-loaded"}))},e.prototype.destroy=function(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=null),this.isSetup=!1,this.actionHandlers.clear(),this.pendingMessages.clear(),this.requestCallbacks={},this.scriptLoadPromises.clear();var e=K();(null==e?void 0:e[mc])===this&&delete e[mc]},e}(),gc=yc}}),of=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/messenger/background-capture.js":function(){tf(),wc="__AMPLITUDE_BACKGROUND_CAPTURE__"}}),sf=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/config/browser-config.js":function(){_c={always:"always",ifEmptyCampaign:"ifEmptyCampaign"}}}),af=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/environment.js":function(){tl()}}),uf=qu({"../../../../node_modules/@amplitude/analytics-core/lib/esm/index.js":function(){sl(),Xu(),al(),pl(),yl(),dl(),cl(),tl(),gl(),ml(),bl(),wl(),_l(),ol(),hl(),nl(),il(),Sl(),kl(),xl(),El(),Cl(),Il(),Ol(),Pl(),Rl(),Ml(),Nl(),Dl(),ll(),$u(),jl(),Ju(),Ul(),Fl(),Bl(),ql(),Zu(),Gd(),$u(),$u(),Jd(),$d(),Yd(),ef(),rf(),of(),tf(),sf(),af()}}),lf=qu({"../../../../node_modules/idb/build/index.js":function(){Sc=function(e,t){return t.some(function(t){return _instanceof(e,t)})},Ec=new WeakMap,Cc=new WeakMap,Ic=new WeakMap,Oc={get:function(e,t,n){if(_instanceof(e,IDBTransaction)){if("done"===t)return Ec.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return gn(e[t])},set:function(e,t,n){return e[t]=n,!0},has:function(e,t){return!(!_instanceof(e,IDBTransaction)||"done"!==t&&"store"!==t)||t in e}},Tc=function(e){return Ic.get(e)},Ac=["get","getKey","getAll","getAllKeys","count"],Pc=["put","add","delete","clear"],Rc=new Map,hn(function(e){return _object_spread_props(_object_spread({},e),{get:function(t,n,r){return mn(t,n)||e.get(t,n,r)},has:function(t,n){return!!mn(t,n)||e.has(t,n)}})}),Mc=["continue","continuePrimaryKey","advance"],Nc={},Lc=new WeakMap,Dc=new WeakMap,jc={get:function(e,t){if(!Mc.includes(t))return e[t];var n=Nc[t];return n||(n=Nc[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;Lc.set(this,(i=Dc.get(this))[t].apply(i,_to_consumable_array(n)))}),n}},hn(function(e){return _object_spread_props(_object_spread({},e),{get:function(t,n,r){return wn(t,n)?bn:e.get(t,n,r)},has:function(t,n){return wn(t,n)||e.has(t,n)}})})}}),cf=qu({"../../../../node_modules/@amplitude/targeting/node_modules/@amplitude/experiment-core/dist/experiment-core.esm.js":function(){var e;Uc=function(e,t){return(Uc=Object.setPrototypeOf||_instanceof({__proto__:[]},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)},Fc=function(){return Fc=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},Fc.apply(this,arguments)},Bc={IS:"is",IS_NOT:"is not",CONTAINS:"contains",DOES_NOT_CONTAIN:"does not contain",LESS_THAN:"less",LESS_THAN_EQUALS:"less or equal",GREATER_THAN:"greater",GREATER_THAN_EQUALS:"greater or equal",VERSION_LESS_THAN:"version less",VERSION_LESS_THAN_EQUALS:"version less or equal",VERSION_GREATER_THAN:"version greater",VERSION_GREATER_THAN_EQUALS:"version greater or equal",SET_IS:"set is",SET_IS_NOT:"set is not",SET_CONTAINS:"set contains",SET_DOES_NOT_CONTAIN:"set does not contain",SET_CONTAINS_ANY:"set contains any",SET_DOES_NOT_CONTAIN_ANY:"set does not contain any",REGEX_MATCH:"regex match",REGEX_DOES_NOT_MATCH:"regex does not match"},qc=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296==(64512&i)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return Uint8Array.from(t)},zc=-862048943,Wc=461845907,Vc=function(e,t){void 0===t&&(t=0);for(var n=qc(e),r=n.length,i=r>>2,o=t,s=0;s<i;s++){var a=Jc(n,s<<2);o=Hc(a,o)}var u=i<<2,l=0;switch(r-u){case 3:l^=n[u+2]<<16,l^=n[u+1]<<8,l^=n[u],l=Math.imul(l,zc),l=Gc(l,15),o^=l=Math.imul(l,Wc);break;case 2:l^=n[u+1]<<8,l^=n[u],l=Math.imul(l,zc),l=Gc(l,15),o^=l=Math.imul(l,Wc);break;case 1:l^=n[u],l=Math.imul(l,zc),l=Gc(l,15),o^=l=Math.imul(l,Wc)}return Kc(o^=r)>>>0},Hc=function(e,t){var n=e,r=t;return n=Math.imul(n,zc),n=Gc(n,15),n=Math.imul(n,Wc),r=Gc(r^=n,13),(r=Math.imul(r,5))+-430675100|0},Kc=function(e){var t=e;return t^=t>>>16,t=Math.imul(t,-2048144789),t^=t>>>13,t=Math.imul(t,-1028477387),t^=t>>>16},Gc=function(e,t,n){return void 0===n&&(n=32),t>n&&(t%=n),(e<<t|(e&4294967295<<n-t>>>0)>>>0>>>n-t>>>0)>>>0},Jc=function(e,t){void 0===t&&(t=0);var n=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return $c(n)},$c=function(e){return(-16777216&e)>>>24|(16711680&e)>>>8|(65280&e)<<8|(255&e)<<24},Qc=function(e,t){var n,r;if(t&&0!==t.length){try{for(var i=kn(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!s||!e||"object"!==(void 0===e?"undefined":_type_of(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||void 0}},Xc="^".concat("(\\d+)\\.(\\d+)","(\\.").concat("(\\d+)").concat("(-(([-\\w]+\\.?)*))?",")?$"),Yc=function(){function e(e,t,n,r){void 0===r&&(r=void 0),this.major=e,this.minor=t,this.patch=n,this.preRelease=r}return e.parse=function(t){if(t){var n=new RegExp(Xc).exec(t);if(n){var r=Number(n[1]),i=Number(n[2]);if(!isNaN(r)&&!isNaN(i))return new e(r,i,Number(n[4])||0,n[5]||void 0)}}},e.prototype.compareTo=function(e){return this.major>e.major?1:this.major<e.major?-1:this.minor>e.minor?1:this.minor<e.minor?-1:this.patch>e.patch?1:this.patch<e.patch||this.preRelease&&!e.preRelease?-1:!this.preRelease&&e.preRelease?1:this.preRelease&&e.preRelease?this.preRelease>e.preRelease?1:this.preRelease<e.preRelease?-1:0:0},e}(),Zc=function(){function e(){}return e.prototype.evaluate=function(e,t){var n,r,i={},o={context:e,result:i};try{for(var s=kn(t),a=s.next();!a.done;a=s.next()){var u=a.value,l=this.evaluateFlag(o,u);l&&(i[u.key]=l)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i},e.prototype.evaluateFlag=function(e,t){var n,r,i;try{for(var o=kn(t.segments),s=o.next();!s.done;s=o.next()){var a=s.value;if(i=this.evaluateSegment(e,t,a)){var u=Fc(Fc(Fc({},t.metadata),a.metadata),i.metadata);i=Fc(Fc({},i),{metadata:u});break}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},e.prototype.evaluateSegment=function(e,t,n){var r,i,o,s;if(!n.conditions)return void 0!==(l=this.bucket(e,n))?t.variants[l]:void 0;try{for(var a=kn(n.conditions),u=a.next();!u.done;u=a.next()){var l,c=u.value,d=!0;try{for(var f=(o=void 0,kn(c)),h=f.next();!h.done;h=f.next()){var p=h.value;if(!(d=this.matchCondition(e,p)))break}}catch(e){o={error:e}}finally{try{h&&!h.done&&(s=f.return)&&s.call(f)}finally{if(o)throw o.error}}if(d)return void 0!==(l=this.bucket(e,n))?t.variants[l]:void 0}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}},e.prototype.matchCondition=function(e,t){var n=Qc(e,t.selector);if(n){if(this.isSetOperator(t.op)){var r=this.coerceStringArray(n);return!!r&&this.matchSet(r,t.op,t.values)}var i=this.coerceString(n);return void 0!==i&&this.matchString(i,t.op,t.values)}return this.matchNull(t.op,t.values)},e.prototype.getHash=function(e){return Vc(e)},e.prototype.bucket=function(e,t){var n,r,i,o;if(!t.bucket)return t.variant;var s=this.coerceString(Qc(e,t.bucket.selector));if(!s||0===s.length)return t.variant;var a="".concat(t.bucket.salt,"/").concat(s),u=this.getHash(a),l=u%100,c=Math.floor(u/100);try{for(var d=kn(t.bucket.allocations),f=d.next();!f.done;f=d.next()){var h=f.value,p=h.range[0],v=h.range[1];if(l>=p&&l<v)try{for(var g=(i=void 0,kn(h.distributions)),y=g.next();!y.done;y=g.next()){var m=y.value,b=m.range[0],w=m.range[1];if(c>=b&&c<w)return m.variant}}catch(e){i={error:e}}finally{try{y&&!y.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}return t.variant},e.prototype.matchNull=function(e,t){var n=this.containsNone(t);switch(e){case Bc.IS:case Bc.CONTAINS:case Bc.LESS_THAN:case Bc.LESS_THAN_EQUALS:case Bc.GREATER_THAN:case Bc.GREATER_THAN_EQUALS:case Bc.VERSION_LESS_THAN:case Bc.VERSION_LESS_THAN_EQUALS:case Bc.VERSION_GREATER_THAN:case Bc.VERSION_GREATER_THAN_EQUALS:case Bc.SET_IS:case Bc.SET_CONTAINS:case Bc.SET_CONTAINS_ANY:return n;case Bc.IS_NOT:case Bc.DOES_NOT_CONTAIN:case Bc.SET_DOES_NOT_CONTAIN:case Bc.SET_DOES_NOT_CONTAIN_ANY:return!n;default:return!1}},e.prototype.matchSet=function(e,t,n){switch(t){case Bc.SET_IS:return this.setEquals(e,n);case Bc.SET_IS_NOT:return!this.setEquals(e,n);case Bc.SET_CONTAINS:return this.matchesSetContainsAll(e,n);case Bc.SET_DOES_NOT_CONTAIN:return!this.matchesSetContainsAll(e,n);case Bc.SET_CONTAINS_ANY:return this.matchesSetContainsAny(e,n);case Bc.SET_DOES_NOT_CONTAIN_ANY:return!this.matchesSetContainsAny(e,n);default:return!1}},e.prototype.matchString=function(e,t,n){var r=this;switch(t){case Bc.IS:return this.matchesIs(e,n);case Bc.IS_NOT:return!this.matchesIs(e,n);case Bc.CONTAINS:return this.matchesContains(e,n);case Bc.DOES_NOT_CONTAIN:return!this.matchesContains(e,n);case Bc.LESS_THAN:case Bc.LESS_THAN_EQUALS:case Bc.GREATER_THAN:case Bc.GREATER_THAN_EQUALS:return this.matchesComparable(e,t,n,function(e){return r.parseNumber(e)},this.comparator);case Bc.VERSION_LESS_THAN:case Bc.VERSION_LESS_THAN_EQUALS:case Bc.VERSION_GREATER_THAN:case Bc.VERSION_GREATER_THAN_EQUALS:return this.matchesComparable(e,t,n,function(e){return Yc.parse(e)},this.versionComparator);case Bc.REGEX_MATCH:return this.matchesRegex(e,n);case Bc.REGEX_DOES_NOT_MATCH:return!this.matchesRegex(e,n);default:return!1}},e.prototype.matchesIs=function(e,t){if(this.containsBooleans(t)){var n=e.toLowerCase();if("true"===n||"false"===n)return t.some(function(e){return e.toLowerCase()===n})}return t.some(function(t){return e===t})},e.prototype.matchesContains=function(e,t){var n,r;try{for(var i=kn(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(e.toLowerCase().includes(s.toLowerCase()))return!0}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1},e.prototype.matchesComparable=function(e,t,n,r,i){var o=this,s=r(e),a=n.map(function(e){return r(e)}).filter(function(e){return void 0!==e});return void 0===s||0===a.length?n.some(function(n){return o.comparator(e,t,n)}):a.some(function(e){return i(s,t,e)})},e.prototype.comparator=function(e,t,n){switch(t){case Bc.LESS_THAN:case Bc.VERSION_LESS_THAN:return e<n;case Bc.LESS_THAN_EQUALS:case Bc.VERSION_LESS_THAN_EQUALS:return e<=n;case Bc.GREATER_THAN:case Bc.VERSION_GREATER_THAN:return e>n;case Bc.GREATER_THAN_EQUALS:case Bc.VERSION_GREATER_THAN_EQUALS:return e>=n;default:return!1}},e.prototype.versionComparator=function(e,t,n){var r=e.compareTo(n);switch(t){case Bc.LESS_THAN:case Bc.VERSION_LESS_THAN:return r<0;case Bc.LESS_THAN_EQUALS:case Bc.VERSION_LESS_THAN_EQUALS:return r<=0;case Bc.GREATER_THAN:case Bc.VERSION_GREATER_THAN:return r>0;case Bc.GREATER_THAN_EQUALS:case Bc.VERSION_GREATER_THAN_EQUALS:return r>=0;default:return!1}},e.prototype.matchesRegex=function(e,t){return t.some(function(t){return Boolean(new RegExp(t).exec(e))})},e.prototype.containsNone=function(e){return e.some(function(e){return"(none)"===e})},e.prototype.containsBooleans=function(e){return e.some(function(e){switch(e.toLowerCase()){case"true":case"false":return!0;default:return!1}})},e.prototype.parseNumber=function(e){var t;return null!==(t=Number(e))&&void 0!==t?t:void 0},e.prototype.coerceString=function(e){if(e)return"object"===(void 0===e?"undefined":_type_of(e))?JSON.stringify(e):String(e)},e.prototype.coerceStringArray=function(e){var t=this;if(Array.isArray(e))return e.map(function(e){return t.coerceString(e)}).filter(Boolean);var n=String(e);try{var r=JSON.parse(n);return Array.isArray(r)?e.map(function(e){return t.coerceString(e)}).filter(Boolean):void 0}catch(e){return}},e.prototype.isSetOperator=function(e){switch(e){case Bc.SET_IS:case Bc.SET_IS_NOT:case Bc.SET_CONTAINS:case Bc.SET_DOES_NOT_CONTAIN:case Bc.SET_CONTAINS_ANY:case Bc.SET_DOES_NOT_CONTAIN_ANY:return!0;default:return!1}},e.prototype.setEquals=function(e,t){var n=new Set(e),r=new Set(t);return n.size===r.size&&function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([],function(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}(r),!1).every(function(e){return n.has(e)})},e.prototype.matchesSetContainsAll=function(e,t){var n,r;if(e.length<t.length)return!1;try{for(var i=kn(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!this.matchesIs(s,e))return!1}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0},e.prototype.matchesSetContainsAny=function(e,t){var n,r;try{for(var i=kn(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(this.matchesIs(s,e))return!0}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1},e}(),td=ed="3.7.5",nd="function"==typeof atob,rd="function"==typeof btoa,id="function"==typeof Buffer,od="function"==typeof TextDecoder?new TextDecoder:void 0,sd="function"==typeof TextEncoder?new TextEncoder:void 0,ad=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),e={},ad.forEach(function(t,n){return e[t]=n}),ud=e,ld=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,cd=String.fromCharCode.bind(String),dd="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(e){return new Uint8Array(Array.prototype.slice.call(e,0))},fd=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,function(e){return"+"==e?"-":"_"})},hd=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},pd=function(e){for(var t,n,r,i,o="",s=e.length%3,a=0;a<e.length;){if((n=e.charCodeAt(a++))>255||(r=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");o+=ad[(t=n<<16|r<<8|i)>>18&63]+ad[t>>12&63]+ad[t>>6&63]+ad[63&t]}return s?o.slice(0,s-3)+"===".substring(s):o},gd=id?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],n=0,r=e.length;n<r;n+=4096)t.push(cd.apply(null,e.subarray(n,n+4096)));return vd(t.join(""))},yd=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?fd(gd(e)):gd(e)},md=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?cd(192|t>>>6)+cd(128|63&t):cd(224|t>>>12&15)+cd(128|t>>>6&63)+cd(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return cd(240|t>>>18&7)+cd(128|t>>>12&63)+cd(128|t>>>6&63)+cd(128|63&t)},bd=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,_d=id?function(e){return Buffer.from(e,"utf8").toString("base64")}:sd?function(e){return gd(sd.encode(e))}:function(e){return vd(wd(e))},Sd=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?fd(_d(e)):_d(e)},kd=function(e){return Sd(e,!0)},xd=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Ed=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return cd((t>>>10)+55296)+cd(56320+(1023&t));case 3:return cd((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return cd((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},Id=function(e){if(e=e.replace(/\s+/g,""),!ld.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));for(var t,n,r,i="",o=0;o<e.length;)t=ud[e.charAt(o++)]<<18|ud[e.charAt(o++)]<<12|(n=ud[e.charAt(o++)])<<6|(r=ud[e.charAt(o++)]),i+=64===n?cd(t>>16&255):64===r?cd(t>>16&255,t>>8&255):cd(t>>16&255,t>>8&255,255&t);return i},Td=id?function(e){return dd(Buffer.from(e,"base64"))}:function(e){return dd(Od(e).split("").map(function(e){return e.charCodeAt(0)}))},Ad=function(e){return Td(Rd(e))},Pd=id?function(e){return Buffer.from(e,"base64").toString("utf8")}:od?function(e){return od.decode(Td(e))}:function(e){return Cd(Od(e))},Rd=function(e){return hd(e.replace(/[-_]/g,function(e){return"-"==e?"+":"/"}))},Nd=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},Ld=function(){var e=function(e,t){return Object.defineProperty(String.prototype,e,Nd(t))};e("fromBase64",function(){return Md(this)}),e("toBase64",function(e){return Sd(this,e)}),e("toBase64URI",function(){return Sd(this,!0)}),e("toBase64URL",function(){return Sd(this,!0)}),e("toUint8Array",function(){return Ad(this)})},Dd=function(){var e=function(e,t){return Object.defineProperty(Uint8Array.prototype,e,Nd(t))};e("toBase64",function(e){return yd(this,e)}),e("toBase64URI",function(){return yd(this,!0)}),e("toBase64URL",function(){return yd(this,!0)})},jd=function(){Ld(),Dd()},Ud={version:ed,VERSION:td,atob:Od=nd?function(e){return atob(hd(e))}:id?function(e){return Buffer.from(e,"base64").toString("binary")}:Id,atobPolyfill:Id,btoa:vd=rd?function(e){return btoa(e)}:id?function(e){return Buffer.from(e,"binary").toString("base64")}:pd,btoaPolyfill:pd,fromBase64:Md=function(e){return Pd(Rd(e))},toBase64:Sd,encode:Sd,encodeURI:kd,encodeURL:kd,utob:wd=function(e){return e.replace(bd,md)},btou:Cd=function(e){return e.replace(xd,Ed)},decode:Md,isValid:function(e){if("string"!=typeof e)return!1;var t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:yd,toUint8Array:Ad,extendString:Ld,extendUint8Array:Dd,extendBuiltins:jd},Fd=function(e){function t(n,r){var i=e.call(this,r)||this;return i.statusCode=n,Object.setPrototypeOf(i,t.prototype),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Uc(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error),function(){function e(e,t,n){this.deploymentKey=e,this.serverUrl=t,this.httpClient=n}return e.prototype.getVariants=function(e,t){return _n(this,void 0,void 0,function(){var n,r,i;return Sn(this,function(o){switch(o.label){case 0:return n=Ud.encodeURL(JSON.stringify(e)),r={Authorization:"Api-Key ".concat(this.deploymentKey),"X-Amp-Exp-User":n},(null==t?void 0:t.flagKeys)&&(r["X-Amp-Exp-Flag-Keys"]=Ud.encodeURL(JSON.stringify(t.flagKeys))),(null==t?void 0:t.trackingOption)&&(r["X-Amp-Exp-Track"]=t.trackingOption),[4,this.httpClient.request({requestUrl:"".concat(this.serverUrl,"/sdk/v2/vardata?v=0"),method:"GET",headers:r,timeoutMillis:null==t?void 0:t.timeoutMillis})];case 1:if(200!=(i=o.sent()).status)throw new Fd(i.status,"Fetch error response: status=".concat(i.status));return[2,JSON.parse(i.body)]}})})},e}(),function(){function e(e,t,n){this.deploymentKey=e,this.serverUrl=t,this.httpClient=n}return e.prototype.getFlags=function(e){return _n(this,void 0,void 0,function(){var t,n;return Sn(this,function(r){switch(r.label){case 0:return t={Authorization:"Api-Key ".concat(this.deploymentKey)},(null==e?void 0:e.libraryName)&&(null==e?void 0:e.libraryVersion)&&(t["X-Amp-Exp-Library"]="".concat(e.libraryName,"/").concat(e.libraryVersion)),[4,this.httpClient.request({requestUrl:"".concat(this.serverUrl,"/sdk/v2/flags"),method:"GET",headers:t,timeoutMillis:null==e?void 0:e.timeoutMillis})];case 1:if(200!=(n=r.sent()).status)throw Error("Flags error response: status=".concat(n.status));return[2,JSON.parse(n.body).reduce(function(e,t){return e[t.key]=t,e},{})]}})})},e}(),Bd="undefined"!=typeof globalThis?globalThis:global||self,function(){function e(e,t){this.poller=void 0,this.action=e,this.ms=t}return e.prototype.start=function(){this.poller||(this.poller=Bd.setInterval(this.action,this.ms),this.action())},e.prototype.stop=function(){this.poller&&(Bd.clearInterval(this.poller),this.poller=void 0)},e}()}}),df=qu({"../../../../node_modules/@amplitude/targeting/lib/esm/targeting-idb-store.js":function(){Gu(),lf(),qd=new function(){var e=this;this.dbs={},this.createStore=function(t){return Ft(e,void 0,void 0,function(){return Bt(this,function(e){switch(e.label){case 0:return[4,yn(t,1,{upgrade:function(e){e.objectStoreNames.contains("eventTypesForSession")||e.createObjectStore("eventTypesForSession",{keyPath:"sessionId"})}})];case 1:return[2,e.sent()]}})})},this.openOrCreateDB=function(t){return Ft(e,void 0,void 0,function(){var e,n;return Bt(this,function(r){switch(r.label){case 0:return this.dbs&&this.dbs[t]?[2,this.dbs[t]]:(e="".concat(t.substring(0,10),"_amp_targeting"),[4,this.createStore(e)]);case 1:return n=r.sent(),this.dbs[t]=n,[2,n]}})})},this.updateEventListForSession=function(n){var r=n.sessionId,i=n.eventType,o=n.eventTime,s=n.loggerProvider,a=n.tx;return Ft(e,void 0,void 0,function(){var e,n,u,l,c,d,f;return Bt(this,function(h){switch(h.label){case 0:return h.trys.push([0,3,,4]),[4,a.store.get(r)];case 1:return e=h.sent(),n=e?e.eventTypes:{},u=n[i]||{},l=t(t({},n),((d={})[i]=t(t({},u),((f={})[o]={event_type:i},f)),d)),[4,a.store.put({sessionId:r,eventTypes:l})];case 2:return h.sent(),[2,l];case 3:return c=h.sent(),s.warn("Failed to store events for targeting ".concat(r,": ").concat(c)),[3,4];case 4:return[2,void 0]}})})},this.deleteOldSessionEventTypes=function(t){var n=t.currentSessionId,r=t.loggerProvider,i=t.tx;return Ft(e,void 0,void 0,function(){var e,t,o,s,a;return Bt(this,function(u){switch(u.label){case 0:return u.trys.push([0,6,,7]),[4,i.store.getAll()];case 1:e=u.sent(),t=0,u.label=2;case 2:return t<e.length?(o=e[t],s=Date.now()-o.sessionId,o.sessionId!==n&&s>1728e5?[4,i.store.delete(o.sessionId)]:[3,4]):[3,5];case 3:u.sent(),u.label=4;case 4:return t++,[3,2];case 5:return[3,7];case 6:return a=u.sent(),r.warn("Failed to clear old session events for targeting: ".concat(a)),[3,7];case 7:return[2]}})})},this.storeEventTypeForSession=function(t){var n=t.loggerProvider,r=t.sessionId,i=t.eventType,o=t.eventTime,s=t.apiKey;return Ft(e,void 0,void 0,function(){var e,t,a,u;return Bt(this,function(l){switch(l.label){case 0:return l.trys.push([0,5,,6]),[4,this.openOrCreateDB(s)];case 1:return e=l.sent(),(t=e.transaction("eventTypesForSession","readwrite"))?[4,this.updateEventListForSession({sessionId:r,tx:t,loggerProvider:n,eventType:i,eventTime:o})]:[2];case 2:return a=l.sent(),[4,this.deleteOldSessionEventTypes({currentSessionId:r,tx:t,loggerProvider:n})];case 3:return l.sent(),[4,t.done];case 4:return l.sent(),[2,a];case 5:return u=l.sent(),n.warn("Failed to store events for targeting ".concat(r,": ").concat(u)),[3,6];case 6:return[2,void 0]}})})}}}}),ff=qu({"../../../../node_modules/@amplitude/targeting/lib/esm/targeting.js":function(){Gu(),cf(),df(),zd=function(){var e=this;this.evaluateTargeting=function(t){var n=t.apiKey,r=t.loggerProvider,i=t.event,o=t.sessionId,s=t.userProperties,a=t.deviceId,u=t.flag;return Ft(e,void 0,void 0,function(){var e,t,l,c;return Bt(this,function(d){switch(d.label){case 0:return i&&i.time?[4,qd.storeEventTypeForSession({loggerProvider:r,apiKey:n,sessionId:o,eventType:i.event_type,eventTime:i.time})]:[3,2];case 1:return t=d.sent(),[3,3];case 2:t=void 0,d.label=3;case 3:return l=(e=t)&&new Set(Object.keys(e)),c={session_id:o,event:i,event_types:l&&Array.from(l),user:{device_id:a,user_properties:s}},[2,this.evaluationEngine.evaluate(c,[u])]}})})},this.evaluationEngine=new Zc}}}),hf=qu({"../../../../node_modules/@amplitude/targeting/lib/esm/targeting-factory.js":function(){ff(),Wd=function(){var e=new zd;return{evaluateTargeting:e.evaluateTargeting.bind(e)}}()}}),pf={};Wu(pf,{evaluateTargeting:function(){return Vd}});var vf,gf,yf=qu({"../../../../node_modules/@amplitude/targeting/lib/esm/index.js":function(){hf(),Vd=Wd.evaluateTargeting}}),mf={};Wu(mf,{compressionScript:function(){return vf},trackDestinationScript:function(){return gf}});var bf,wf,_f,Sf,kf,xf,Ef,Cf,If,Of,Tf,Af,Pf,Rf,Mf,Nf,Lf,Df,jf,Uf,Ff,Bf,qf,zf,Wf,Vf,Hf,Kf,Gf,Jf,$f,Qf,Xf,Yf,Zf,eh,th,nh,rh,ih,oh,sh,ah,uh,lh,ch,dh,fh,hh,ph,vh,gh,yh,mh,bh,wh,_h,Sh,kh,xh,Eh,Ch,Ih,Oh,Th,Ah,Ph,Rh,Mh,Nh,Lh,Dh,jh,Uh,Fh,Bh,qh,zh,Wh,Vh,Hh,Kh,Gh,Jh,$h,Qh,Xh,Yh,Zh,ep,tp,np,rp,ip,op,sp,ap,up,lp,cp,dp,fp,hp,pp,vp,gp,yp,mp,bp,wp,_p,Sp,kp,xp,Ep,Cp,Ip,Op,Tp,Ap,Pp,Rp,Mp,Np,Lp,Dp,jp,Up,Fp,Bp,qp,zp,Wp,Vp,Hp,Kp,Gp,Jp,$p,Qp,Xp,Yp,Zp,ev,tv,nv,rv,iv,ov,sv,av,uv,lv,cv,dv,fv,hv,pv,vv,gv,yv,mv,bv,wv,_v,Sv,kv,xv,Ev,Cv,Iv=qu({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/worker/index.js":function(){vf='var WebWorker=function(e){"use strict";onmessage=function(e){var s="string"==typeof e.data?JSON.parse(e.data):e.data,t=s.event,a=s.sessionId,n=t.type,r=t.timestamp,i=t.delay,o=t.data,d=null!=i?JSON.stringify({type:n,timestamp:r,delay:i,data:o}):JSON.stringify({type:n,timestamp:r,data:o});postMessage({compressedEvent:d,sessionId:a})};var s=onmessage;return e.compressionOnMessage=s,Object.defineProperty(e,"__esModule",{value:!0}),e}({});\n',gf='var WebWorker=function(e){"use strict";var t,r=function(){return r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},r.apply(this,arguments)};function n(e,t,r,n){return new(r||(r=Promise))(function(s,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function i(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(o,i)}c((n=n.apply(e,t||[])).next())})}function s(e,t){var r,n,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=i(0),o.throw=i(1),o.return=i(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,i[0]&&(a=0)),a;)try{if(r=1,n&&(s=2&i[0]?n.return:i[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(s=a.trys,(s=s.length>0&&s[s.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){a.label=i[1];break}if(6===i[0]&&a.label<s[1]){a.label=s[1],s=i;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(i);break}s[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}"function"==typeof SuppressedError&&SuppressedError,function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(t||(t={})),t.US;var a,o=/payload.*exceed/i;!function(e){e.GET_SR_PROPS="get-sr-props",e.DEBUG_INFO="debug-info",e.FETCH_REQUEST="fetch-request",e.METADATA="metadata",e.TARGETING_DECISION="targeting-decision",e.REPLAY_GATE_DECISION="replay-gate-decision"}(a||(a={}));var i="Network error occurred, event batch rejected";function c(e,t){return n(this,void 0,void 0,function(){var r,a,o,i,c,u,l,d,p,f,h,v,y,g,b=this;return s(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),r=t.CompressionStream,a=new r("gzip"),o=a.writable.getWriter(),i=a.readable.getReader(),c=[],u=n(b,void 0,void 0,function(){var e,t,r;return s(this,function(n){switch(n.label){case 0:return[4,i.read()];case 1:if(e=n.sent(),t=e.done,r=e.value,t)return[3,3];c.push(r),n.label=2;case 2:return[3,0];case 3:return[2]}})}),[4,o.write((new TextEncoder).encode(e))];case 1:return m.sent(),[4,o.close()];case 2:return m.sent(),[4,u];case 3:m.sent(),l=c.reduce(function(e,t){return e+t.length},0),d=new Uint8Array(l),p=0;try{for(f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(c),h=f.next();!h.done;h=f.next())v=h.value,d.set(v,p),p+=v.length}catch(e){y={error:e}}finally{try{h&&!h.done&&(g=f.return)&&g.call(f)}finally{if(y)throw y.error}}return[2,d];case 4:return m.sent(),[2,null];case 5:return[2]}})})}function u(e,t){var a,u,l,d,p,f,h;return n(this,void 0,void 0,function(){var n,v,y,g,b,m,S,w,T,E,R,k;return s(this,function(s){switch(s.label){case 0:return s.trys.push([0,10,,11]),"CompressionStream"in self?[4,c(e,self)]:[3,2];case 1:return v=s.sent(),[3,3];case 2:v=null,s.label=3;case 3:return n=v,y="".concat(null!==(u=null===(a=t.version)||void 0===a?void 0:a.type)&&void 0!==u?u:"standalone","/").concat(null!==(d=null===(l=t.version)||void 0===l?void 0:l.version)&&void 0!==d?d:t.sdkVersion),g=new URLSearchParams({device_id:t.deviceId,session_id:"".concat(t.sessionId),type:t.eventType}),b="".concat((x=t.serverZone,C=t.trackServerUrl,C||("STAGING"===x?"https://api-sr.stag2.amplitude.com/sessions/v2/track":"EU"===x?"https://api-sr.eu.amplitude.com/sessions/v2/track":"https://api-sr.amplitude.com/sessions/v2/track")),"?").concat(g.toString()),m=r({"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(t.apiKey),"X-Client-Version":t.sdkVersion,"X-Client-Library":y,"X-Client-Url":t.currentUrl.substring(0,1e3),"X-Client-Sample-Rate":"".concat(t.sampleRate),"X-Sampling-Hash-Alg":"xxhash32"},n?{"Content-Encoding":"gzip"}:{}),S=n?n.byteLength:new Blob([e]).size,[4,fetch(b,{method:"POST",headers:m,body:null!=n?n:e,keepalive:S<=65536})];case 4:if(null===(w=s.sent()))return[2,{shouldRetry:!1,success:!1,message:"Unexpected error occurred"}];if(w.status>=200&&w.status<300)return T=Math.round(new Blob(t.events).size/1024),E=null!==(h=null===(f=null===(p=w.headers)||void 0===p?void 0:p.get)||void 0===f?void 0:f.call(p,"X-Session-Replay-Event-Skipped"))&&void 0!==h?h:null,[2,{shouldRetry:!1,success:!0,message:"Session replay event batch tracked successfully for session id ".concat(t.sessionId,", size of events: ").concat(T," KB"),skipCode:E}];if(413!==w.status)return[3,9];R="",s.label=5;case 5:return s.trys.push([5,7,,8]),[4,w.text()];case 6:return R=s.sent(),[3,8];case 7:return s.sent(),[3,8];case 8:return[2,{shouldRetry:!1,success:!1,message:i,payloadTooLarge:!0,isWaf:o.test(R)}];case 9:return w.status>=500||408===w.status||429===w.status||499===w.status?[2,{shouldRetry:!0,success:!1,message:"HTTP ".concat(w.status)}]:[2,{shouldRetry:!1,success:!1,message:i}];case 10:return k=s.sent(),[2,{shouldRetry:!1,success:!1,message:String(k)}];case 11:return[2]}var x,C})})}function l(e,t,r,a){var o;return n(this,void 0,void 0,function(){var n,i,c;return s(this,function(s){switch(s.label){case 0:n=1,s.label=1;case 1:return[4,u(t,r)];case 2:return(i=s.sent()).success?(postMessage({type:"log",id:e,message:i.message}),postMessage({type:"complete",id:e,skipCode:null!==(o=i.skipCode)&&void 0!==o?o:null}),[2]):i.payloadTooLarge&&a?(postMessage({type:"payload_too_large",id:e,isWaf:!0===i.isWaf}),[2]):a&&i.shouldRetry&&n<r.flushMaxRetries?[4,new Promise(function(e){return setTimeout(e,Math.random()*n*1e3)})]:[3,4];case 3:return s.sent(),n++,[3,5];case 4:return c=n>=r.flushMaxRetries?"Session replay event batch rejected due to exceeded retry count":i.message,postMessage({type:"warn",id:e,message:c}),postMessage({type:"complete",id:e}),[2];case 5:return[3,1];case 6:return[2]}})})}onmessage=function(e){return n(void 0,void 0,void 0,function(){var t,r,n,a,o,i,c;return s(this,function(s){switch(s.label){case 0:return t=e.data,r=t.type,n=t.id,a=t.payload,o=t.context,i=t.useRetry,"send"!==r?[3,2]:(c=JSON.stringify(a),[4,l(n,c,o,i)]);case 1:s.sent(),s.label=2;case 2:return[2]}})})};var d=onmessage;return e.trackDestinationOnMessage=d,Object.defineProperty(e,"__esModule",{value:!0}),e}({});\n'}}),Ov={};function Tv(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&Tv(Nf.parentNode(e),t,n);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&Tv(Nf.parentNode(e),t,n)}function Av(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return Av(e,t,o||{},!0)}}function Pv(e,t){if(r=(n=e)&&"host"in n&&"mode"in n&&Nf.host(n)||null,Boolean(r&&"shadowRoot"in r&&Nf.shadowRoot(r)===n))return!1;var n,r,i=t.getId(e);if(!t.has(i))return!0;var o=cv.parentNode(e);return(!o||o.nodeType!==e.DOCUMENT_NODE)&&(!o||Pv(o,t))}function Rv(e,t){t(e.value);for(var n=e.children.length-1;n>=0;n--)Rv(e.children[n],t)}function Mv(e,t){var n,r,i=null==(r=null==(n=e.ownerDocument)?void 0:n.defaultView)?void 0:r.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};var o=i.getBoundingClientRect(),s=Mv(i,t),a=o.height/i.clientHeight;return{x:o.x*s.relativeScale+s.x,y:o.y*s.relativeScale+s.y,relativeScale:a,absoluteScale:s.absoluteScale*a}}function Nv(e,t){var n=e[t[0]];return 1===t.length?n:Nv(n.cssRules[t[1]].cssRules,t.slice(2))}function Lv(e,t){if(0===t)return!0;var n=Object.keys(e),r=!0,i=!1,o=void 0;try{for(var s,a=n[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value;if(yi(e[u])&&Lv(e[u],t-1))return!0}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return!1}Wu(Ov,{PLUGIN_NAME:function(){return Ev},getRecordConsolePlugin:function(){return Cv}});var Dv,jv,Uv,Fv,Bv,qv,zv,Wv,Vv,Hv,Kv,Gv,Jv,$v,Qv,Xv,Yv,Zv,eg,tg,ng,rg,ig,og,sg,ag,ug,lg,cg,dg,fg,hg,pg,vg,gg,yg,mg,bg,wg,_g,Sg,kg,xg,Eg,Cg,Ig,Og,Tg,Ag,Pg,Rg,Mg,Ng,Lg,Dg,jg,Ug,Fg,Bg,qg,zg,Wg,Vg,Hg,Kg,Gg,Jg,$g,Qg,Xg,Yg,Zg,ey,ty,ny,ry,iy,oy,sy,ay,uy,ly,cy,dy,fy,hy,py,vy,gy,yy,my,by,wy,_y,Sy,ky,xy,Ey,Cy,Iy,Oy,Ty,Ay,Py,Ry,My,Ny,Ly,Dy,jy,Uy,Fy,By,qy,zy,Wy,Vy,Hy,Ky,Gy,Jy,$y,Qy,Xy,Yy,Zy,em,tm,nm,rm,im,om,sm,am,um,lm,cm,dm,fm,hm,pm,vm,gm,ym,mm,bm,wm,_m,Sm,km,xm,Em,Cm,Im,Om,Tm,Am,Pm,Rm,Mm,Nm,Lm,Dm,jm,Um,Fm,Bm,qm,zm,Wm,Vm,Hm,Km,Gm,Jm,$m,Qm,Xm,Ym,Zm,eb,tb,nb,rb,ib,ob,sb,ab,ub,lb,cb,db,fb,hb,pb,vb,gb,yb,mb,bb,wb,_b,Sb,kb,xb,Eb,Cb=qu({"../../../../node_modules/@amplitude/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.js":function(){var e,t;for(bf=Object.defineProperty,wf=function(e,t,n){return t in e?bf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},_f=function(e,t,n){return wf(e,"symbol"!==(void 0===t?"undefined":_type_of(t))?t+"":t,n)},Sf=Object.defineProperty,kf=function(e,t,n){return t in e?Sf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},xf=function(e,t,n){return kf(e,"symbol"!==(void 0===t?"undefined":_type_of(t))?t+"":t,n)},Cf=Object.defineProperty,If=function(e,t,n){return t in e?Cf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Of=function(e,t,n){return If(e,"symbol"!==(void 0===t?"undefined":_type_of(t))?t+"":t,n)},Tf={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Af={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Pf={},Rf={},Mf={},Nf={childNodes:In,parentNode:On,parentElement:Tn,textContent:An,contains:Pn,getRootNode:Rn,host:Mn,styleSheets:Nn,shadowRoot:Ln,querySelector:Dn,querySelectorAll:jn,mutationObserver:Un},Lf=function(){function e(){_class_call_check(this,e),Of(this,"idNodeMap",new Map),Of(this,"nodeMetaMap",new WeakMap)}return _create_class(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null==(t=this.getMeta(e))?void 0:t.id;return null!=n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}(),Df=-2,jf={exports:{}},Ff={},Bf=Object.freeze(Object.defineProperty({__proto__:null,default:Ff},Symbol.toStringTag,{value:"Module"})),qf=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){return _instanceof(this,e)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}(Bf),Vf={},Vh=ur(),(Hh=(e=Vh)&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e).stringify,Hh.fromJSON,Hh.plugin,Hh.parse,Hh.list,Hh.document,Hh.comment,Hh.atRule,Hh.rule,Hh.decl,Hh.root,Hh.CssSyntaxError,Hh.Declaration,Hh.Container,Hh.Processor,Hh.Document,Hh.Comment,Hh.Warning,Hh.AtRule,Hh.Result,Hh.Input,Hh.Rule,Hh.Root,Hh.Node,Kh=Object.defineProperty,Gh=function(e,t,n){return t in e?Kh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Jh=function(e,t,n){return Gh(e,"symbol"!==(void 0===t?"undefined":_type_of(t))?t+"":t,n)},$h={exports:{}},Xh={},Yh=Object.freeze(Object.defineProperty({__proto__:null,default:Xh},Symbol.toStringTag,{value:"Module"})),Zh=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){return _instanceof(this,e)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}(Yh),np={},nv=Rr(),rv=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(nv),rv.stringify,rv.fromJSON,rv.plugin,rv.parse,rv.list,rv.document,rv.comment,rv.atRule,rv.rule,rv.decl,rv.root,rv.CssSyntaxError,rv.Declaration,rv.Container,rv.Processor,rv.Document,rv.Comment,rv.Warning,rv.AtRule,rv.Result,rv.Input,rv.Rule,rv.Root,rv.Node,iv=function(){function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];_class_call_check(this,e),Jh(this,"parentElement",null),Jh(this,"parentNode",null),Jh(this,"ownerDocument"),Jh(this,"firstChild",null),Jh(this,"lastChild",null),Jh(this,"previousSibling",null),Jh(this,"nextSibling",null),Jh(this,"ELEMENT_NODE",1),Jh(this,"TEXT_NODE",3),Jh(this,"nodeType"),Jh(this,"nodeName"),Jh(this,"RRNodeType")}return _create_class(e,[{key:"childNodes",get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}},{key:"contains",value:function(t){if(!_instanceof(t,e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}},{key:"appendChild",value:function(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"insertBefore",value:function(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}},{key:"removeChild",value:function(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"toString",value:function(){return"RRNode"}}]),e}(),ov={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},sv={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},av={},uv={},lv={},cv={childNodes:Dr,parentNode:jr,parentElement:Ur,textContent:Fr,contains:Br,getRootNode:qr,host:zr,styleSheets:Wr,shadowRoot:Vr,querySelector:Hr,querySelectorAll:Kr,mutationObserver:Gr},dv="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",fv={map:{},getId:function(){return console.error(dv),-1},getNode:function(){return console.error(dv),null},removeNodeFromMap:function(){console.error(dv)},has:function(){return console.error(dv),!1},reset:function(){console.error(dv)}},"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(fv=new Proxy(fv,{get:function(e,t,n){return"map"===t&&console.error(dv),Reflect.get(e,t,n)}})),hv=Date.now,/[1-9][0-9]{12}/.test(Date.now().toString())||(hv=function(){return(new Date).getTime()}),pv=function(){function e(){_class_call_check(this,e),xf(this,"id",1),xf(this,"styleIDMap",new WeakMap),xf(this,"idStyleMap",new Map)}return _create_class(e,[{key:"getId",value:function(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]),e}(),vv=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:pv,get _mirror(){return fv},closestElementOfNode:ei,getBaseDimension:Mv,getNestedRule:Nv,getPositionsAndIndex:ci,getRootShadowHost:hi,getShadowHost:fi,getWindowHeight:Yr,getWindowScroll:Xr,getWindowWidth:Zr,hasShadowRoot:li,hookSetter:Av,inDom:vi,isAncestorRemoved:Pv,isBlocked:ti,isIgnored:ri,isSerialized:ni,isSerializedIframe:ai,isSerializedStylesheet:ui,iterateResolveTree:Rv,legacy_isTouchEvent:ii,get nowTimestamp(){return hv},on:Jr,patch:Qr,polyfill:oi,queueToResolveTrees:si,shadowHostInDom:pi,throttle:$r,uniqueTextMutations:di},Symbol.toStringTag,{value:"Module"})),gv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yv="undefined"==typeof Uint8Array?[]:new Uint8Array(256),lb=0;lb<64;lb++)yv[gv.charCodeAt(lb)]=lb;"undefined"!=typeof self&&self.Blob&&new Blob(['(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastBlobMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext("2d");\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n if (!lastBlobMap.has(id) && await transparentBase64 === base64) {\n lastBlobMap.set(id, base64);\n return worker.postMessage({ id });\n }\n if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });\n worker.postMessage({\n id,\n type,\n base64,\n width,\n height\n });\n lastBlobMap.set(id, base64);\n } else {\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map\n'],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],function(e){return 2*e})[0]){var n=document.createElement("iframe");document.body.appendChild(n),Array.from=(null==(Ef=n.contentWindow)?void 0:Ef.Array.from)||Array.from,document.body.removeChild(n)}}catch(e){console.debug("Unable to override Array.from",e)}new Lf,(t=mv||(mv={}))[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped",bv=function(){function e(t){_class_call_check(this,e),_f(this,"fileName"),_f(this,"functionName"),_f(this,"lineNumber"),_f(this,"columnNumber"),this.fileName=t.fileName||"",this.functionName=t.functionName||"",this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber}return _create_class(e,[{key:"toString",value:function(){var e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?"".concat(this.functionName," (").concat(this.fileName,":").concat(e,":").concat(t,")"):"".concat(this.fileName,":").concat(e,":").concat(t)}}]),e}(),wv=/(^|@)\S+:\d+/,_v=/^\s*at .*(\S+:\d+|\(native\))/m,Sv=/^(eval@)?(\[native code])?$/,kv={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(_v)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error("Cannot parse given url: ".concat(e));return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(_v)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=t.match(/ (\((.+):(\d+):(\d+)\)$)/),r=(t=n?t.replace(n[0],""):t).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:r.pop()),o=r.join(" ")||void 0,s=["eval","<anonymous>"].indexOf(i[0])>-1?void 0:i[0];return new bv({functionName:o,fileName:s,lineNumber:i[1],columnNumber:i[2]})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(Sv)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new bv({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(t,""));return new bv({functionName:r,fileName:i[0],lineNumber:i[1],columnNumber:i[2]})},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),r=[],i=2,o=n.length;i<o;i+=2){var s=t.exec(n[i]);s&&r.push(new bv({fileName:s[2],lineNumber:parseFloat(s[1])}))}return r},parseOpera10:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=e.stacktrace.split("\n"),r=[],i=0,o=n.length;i<o;i+=2){var s=t.exec(n[i]);s&&r.push(new bv({functionName:s[3]||void 0,fileName:s[2],lineNumber:parseFloat(s[1])}))}return r},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(wv)&&!e.match(/^Error created at/)},this).map(function(e){var t=e.split("@"),n=this.extractLocation(t.pop()),r=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new bv({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})},this)}},xv={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"},Ev="rrweb/console@1",Cv=function(e){return{name:Ev,observer:bi,options:e}}}}),Ib={};function Ob(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&Ob($v.parentNode(e),t,n);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&Ob($v.parentNode(e),t,n)}function Tb(e,t){var n,r,i,o=t.doc,s=t.mirror,a=t.blockClass,u=t.blockSelector,l=t.maskTextClass,c=t.maskTextSelector,d=t.skipChild,f=void 0!==d&&d,h=t.inlineStylesheet,p=void 0===h||h,v=t.maskInputOptions,g=void 0===v?{}:v,y=t.maskTextFn,m=t.maskInputFn,b=t.maskAttributeFn,w=t.slimDOMOptions,_=t.dataURLOptions,S=void 0===_?{}:_,k=t.inlineImages,x=void 0!==k&&k,E=t.recordCanvas,C=void 0!==E&&E,I=t.onSerialize,O=t.onAdoptedStyleSheet,T=t.onIframeLoad,A=t.iframeLoadTimeout,P=void 0===A?5e3:A,R=t.onStylesheetLoad,M=t.stylesheetLoadTimeout,N=void 0===M?5e3:M,L=t.keepIframeSrcFn,D=void 0===L?function(){return!1}:L,j=t.newlyAddedElement,U=void 0!==j&&j,F=t.cssCaptured,B=void 0!==F&&F,q=t.applyBackgroundColorToBlockedElements,z=void 0!==q&&q,W=null!==(n=t._emittedStyleIds)&&void 0!==n?n:new Set,V=t.needsMask,H=t.preserveWhiteSpace,K=void 0===H||H;V||(V=to(e,l,c,void 0===V));var G,J=function(e,t){var n=t.doc,r=t.mirror,i=t.blockClass,o=t.blockSelector,s=t.needsMask,a=t.inlineStylesheet,u=t.maskInputOptions,l=void 0===u?{}:u,c=t.maskTextFn,d=t.maskInputFn,f=t.maskAttributeFn,h=t.dataURLOptions,p=void 0===h?{}:h,v=t.inlineImages,g=t.recordCanvas,y=t.keepIframeSrcFn,m=t.newlyAddedElement,b=void 0!==m&&m,w=t.cssCaptured,_=void 0!==w&&w,S=t.applyBackgroundColorToBlockedElements,k=void 0!==S&&S,x=no(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Wv.Document,childNodes:[],compatMode:e.compatMode}:{type:Wv.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Wv.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:x};case e.ELEMENT_NODE:return io(e,{doc:n,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:d,maskAttributeFn:f,dataURLOptions:p,inlineImages:v,recordCanvas:g,keepIframeSrcFn:y,newlyAddedElement:b,rootId:x,applyBackgroundColorToBlockedElements:k});case e.TEXT_NODE:return ro(e,{doc:n,needsMask:s,maskTextFn:c,rootId:x,cssCaptured:_});case e.CDATA_SECTION_NODE:return{type:Wv.CDATA,textContent:"",rootId:x};case e.COMMENT_NODE:return{type:Wv.Comment,textContent:$v.textContent(e)||"",rootId:x};default:return!1}}(e,{doc:o,mirror:s,blockClass:a,blockSelector:u,needsMask:V,inlineStylesheet:p,maskInputOptions:g,maskTextFn:y,maskInputFn:m,maskAttributeFn:b,dataURLOptions:S,inlineImages:x,recordCanvas:C,keepIframeSrcFn:D,newlyAddedElement:U,cssCaptured:B,applyBackgroundColorToBlockedElements:z});if(!J)return console.warn(e,"not serialized"),null;G=s.hasNode(e)?s.getId(e):function(e,t){if(t.comment&&e.type===Wv.Comment)return!0;if(e.type===Wv.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===Ki(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(oo(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===oo(e.attributes.name)||"icon"===oo(e.attributes.rel)||"apple-touch-icon"===oo(e.attributes.rel)||"shortcut icon"===oo(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&oo(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(oo(e.attributes.property).match(/^(og|twitter|fb):/)||oo(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===oo(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===oo(e.attributes.name)||"googlebot"===oo(e.attributes.name)||"bingbot"===oo(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===oo(e.attributes.name)||"generator"===oo(e.attributes.name)||"framework"===oo(e.attributes.name)||"publisher"===oo(e.attributes.name)||"progid"===oo(e.attributes.name)||oo(e.attributes.property).match(/^article:/)||oo(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===oo(e.attributes.name)||"yandex-verification"===oo(e.attributes.name)||"csrf-token"===oo(e.attributes.name)||"p:domain_verify"===oo(e.attributes.name)||"verify-v1"===oo(e.attributes.name)||"verification"===oo(e.attributes.name)||"shopify-checkout-api-token"===oo(e.attributes.name)))return!0}}return!1}(J,w)||!K&&J.type===Wv.Text&&!J.textContent.replace(/^\s+|\s+$/gm,"").length?og:Qi();var $=Object.assign(J,{id:G});if(s.add(e,$),G===og)return null;I&&I(e);var Q=!f;if($.type===Wv.Element){Q=Q&&!$.needBlock,delete $.needBlock;var X=$v.shadowRoot(e);X&&ji(X)&&($.isShadowHost=!0,O&&(null==(r=X.adoptedStyleSheets)?void 0:r.length)&&($.adoptedStyleSheets=so(X.adoptedStyleSheets,O,W)))}if($.type===Wv.Document&&O){var Y=e;(null==(i=Y.adoptedStyleSheets)?void 0:i.length)&&($.adoptedStyleSheets=so(Y.adoptedStyleSheets,O,W))}if(($.type===Wv.Document||$.type===Wv.Element)&&Q){w.headWhitespace&&$.type===Wv.Element&&"head"===$.tagName&&(K=!1);var Z={doc:o,mirror:s,blockClass:a,blockSelector:u,needsMask:V,maskTextClass:l,maskTextSelector:c,skipChild:f,inlineStylesheet:p,maskInputOptions:g,maskTextFn:y,maskInputFn:m,maskAttributeFn:b,slimDOMOptions:w,dataURLOptions:S,inlineImages:x,recordCanvas:C,preserveWhiteSpace:K,onSerialize:I,onAdoptedStyleSheet:O,_emittedStyleIds:W,onIframeLoad:T,iframeLoadTimeout:P,onStylesheetLoad:R,stylesheetLoadTimeout:N,keepIframeSrcFn:D,cssCaptured:!1,applyBackgroundColorToBlockedElements:z};if($.type===Wv.Element&&"textarea"===$.tagName&&void 0!==$.attributes.value);else{$.type===Wv.Element&&void 0!==$.attributes._cssText&&"string"==typeof $.attributes._cssText&&(Z.cssCaptured=!0);var ee=!0,te=!1,ne=void 0;try{for(var re,ie=Array.from($v.childNodes(e))[Symbol.iterator]();!(ee=(re=ie.next()).done);ee=!0){var oe=Tb(re.value,Z);oe&&$.childNodes.push(oe)}}catch(e){te=!0,ne=e}finally{try{ee||null==ie.return||ie.return()}finally{if(te)throw ne}}}var se=null;if(Li(e)&&(se=$v.shadowRoot(e))){var ae=!0,ue=!1,le=void 0;try{for(var ce,de=Array.from($v.childNodes(se))[Symbol.iterator]();!(ae=(ce=de.next()).done);ae=!0){var fe=Tb(ce.value,Z);fe&&(ji(se)&&(fe.isShadow=!0),$.childNodes.push(fe))}}catch(e){ue=!0,le=e}finally{try{ae||null==de.return||de.return()}finally{if(ue)throw le}}}}var he=$v.parentNode(e);return he&&Di(he)&&ji(he)&&($.isShadow=!0),$.type===Wv.Element&&"iframe"===$.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(e){return}if("complete"===i){var s="about:blank";if(r.location.href!==s||e.src===s||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var a=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(a),o=!0,t()})}}}(e,function(){var t=e.contentDocument;if(t&&T){var n=Tb(t,{doc:t,mirror:s,blockClass:a,blockSelector:u,needsMask:V,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:p,maskInputOptions:g,maskTextFn:y,maskInputFn:m,maskAttributeFn:b,slimDOMOptions:w,dataURLOptions:S,inlineImages:x,recordCanvas:C,preserveWhiteSpace:K,onSerialize:I,onAdoptedStyleSheet:O,onIframeLoad:T,iframeLoadTimeout:P,onStylesheetLoad:R,stylesheetLoadTimeout:N,keepIframeSrcFn:D});n&&T(e,n)}},P),$.type===Wv.Element&&"link"===$.tagName&&"string"==typeof $.attributes.rel&&("stylesheet"===$.attributes.rel||"preload"===$.attributes.rel&&"string"==typeof $.attributes.href&&"css"===Ki($.attributes.href))&&function(e,t,n){var r,i=!1;try{r=e.sheet}catch(e){return}if(!r){var o=setTimeout(function(){i||(t(),i=!0)},n);e.addEventListener("load",function(){clearTimeout(o),i=!0,t()})}}(e,function(){if(R){var t=Tb(e,{doc:o,mirror:s,blockClass:a,blockSelector:u,needsMask:V,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:p,maskInputOptions:g,maskTextFn:y,maskInputFn:m,maskAttributeFn:b,slimDOMOptions:w,dataURLOptions:S,inlineImages:x,recordCanvas:C,preserveWhiteSpace:K,onSerialize:I,onIframeLoad:T,iframeLoadTimeout:P,onStylesheetLoad:R,stylesheetLoadTimeout:N,keepIframeSrcFn:D});t&&R(e,t)}},N),$}function Ab(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return Ab(e,t,o||{},!0)}}function Pb(e,t){if(Di(e))return!1;var n=t.getId(e);if(!t.has(n))return!0;var r=Um.parentNode(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||Pb(r,t))}function Rb(e,t){e.delete(t),Um.childNodes(t).forEach(function(t){return Rb(e,t)})}function Mb(e,t){var n=Um.parentNode(t);return!!n&&(!!e.has(n)||Mb(e,n))}function Nb(e,t,n){if(_instanceof(e,Array))return e.map(function(e){return Nb(e,t,n)});if(null===e)return e;if(_instanceof(e,Float32Array)||_instanceof(e,Float64Array)||_instanceof(e,Int32Array)||_instanceof(e,Uint32Array)||_instanceof(e,Uint8Array)||_instanceof(e,Uint16Array)||_instanceof(e,Int16Array)||_instanceof(e,Int8Array)||_instanceof(e,Uint8ClampedArray))return{rr_type:e.constructor.name,args:[Object.values(e)]};if(_instanceof(e,ArrayBuffer))return{rr_type:e.constructor.name,base64:cb(e)};if(_instanceof(e,DataView))return{rr_type:e.constructor.name,args:[Nb(e.buffer,t,n),e.byteOffset,e.byteLength]};if(_instanceof(e,HTMLImageElement))return{rr_type:e.constructor.name,src:e.src};if(_instanceof(e,HTMLCanvasElement)){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return _instanceof(e,ImageData)?{rr_type:e.constructor.name,args:[Nb(e.data,t,n),e.width,e.height]}:pb(e,t)||"object"===(void 0===e?"undefined":_type_of(e))?{rr_type:e.constructor.name,index:fb(e,t,n)}:e}Wu(Ib,{record:function(){return Xs}});var Lb,Db,jb=qu({"../../../../node_modules/@amplitude/rrweb-record/dist/rrweb-record.js":function(){var e,t,n,r,i,o,s,a,u;for(Dv=Object.defineProperty,jv=function(e,t,n){return t in e?Dv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Uv=function(e,t,n){return jv(e,"symbol"!==(void 0===t?"undefined":_type_of(t))?t+"":t,n)},Bv=Object.defineProperty,qv=function(e,t,n){return t in e?Bv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},zv=function(e,t,n){return qv(e,"symbol"!==(void 0===t?"undefined":_type_of(t))?t+"":t,n)},(e=Wv||{})[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",Wv=e,Vv={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Hv={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Kv={},Gv={},Jv={},$v={childNodes:ki,parentNode:xi,parentElement:Ei,textContent:Ci,contains:Ii,getRootNode:Oi,host:Ti,styleSheets:Ai,shadowRoot:Pi,querySelector:Ri,querySelectorAll:Mi,mutationObserver:Ni},Qv=function(){function e(){_class_call_check(this,e),zv(this,"idNodeMap",new Map),zv(this,"nodeMetaMap",new WeakMap)}return _create_class(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null==(t=this.getMeta(e))?void 0:t.id;return null!=n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}(),Xv="__rrweb_original__",Yv=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Zv=/^(?:[a-z+]+:)?\/\//i,eg=/^www\..*/i,tg=/^(data:)([^,]*),(.*)/i,ng="lightgrey",rg=1,ig=new RegExp("[^a-z0-9-_:]"),og=-2,ug=/^[^ \t\n\r\u000c]+/,lg=/^[, \t\n\r\u000c]+/,cg=new WeakMap,dg={exports:{}},hg={},pg=Object.freeze(Object.defineProperty({__proto__:null,default:hg},Symbol.toStringTag,{value:"Module"})),vg=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){return _instanceof(this,e)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}(pg),mg={},my=Po(),(by=(t=my)&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t).stringify,by.fromJSON,by.plugin,by.parse,by.list,by.document,by.comment,by.atRule,by.rule,by.decl,by.root,by.CssSyntaxError,by.Declaration,by.Container,by.Processor,by.Document,by.Comment,by.Warning,by.AtRule,by.Result,by.Input,by.Rule,by.Root,by.Node,wy=Object.defineProperty,_y=function(e,t,n){return t in e?wy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Sy=function(e,t,n){return _y(e,"symbol"!==(void 0===t?"undefined":_type_of(t))?t+"":t,n)},ky={exports:{}},Ey={},Cy=Object.freeze(Object.defineProperty({__proto__:null,default:Ey},Symbol.toStringTag,{value:"Module"})),Iy=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){return _instanceof(this,e)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}(Cy),Ay={},Am=ts(),Pm=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(Am),Pm.stringify,Pm.fromJSON,Pm.plugin,Pm.parse,Pm.list,Pm.document,Pm.comment,Pm.atRule,Pm.rule,Pm.decl,Pm.root,Pm.CssSyntaxError,Pm.Declaration,Pm.Container,Pm.Processor,Pm.Document,Pm.Comment,Pm.Warning,Pm.AtRule,Pm.Result,Pm.Input,Pm.Rule,Pm.Root,Pm.Node,Rm=function(){function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];_class_call_check(this,e),Sy(this,"parentElement",null),Sy(this,"parentNode",null),Sy(this,"ownerDocument"),Sy(this,"firstChild",null),Sy(this,"lastChild",null),Sy(this,"previousSibling",null),Sy(this,"nextSibling",null),Sy(this,"ELEMENT_NODE",1),Sy(this,"TEXT_NODE",3),Sy(this,"nodeType"),Sy(this,"nodeName"),Sy(this,"RRNodeType")}return _create_class(e,[{key:"childNodes",get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}},{key:"contains",value:function(t){if(!_instanceof(t,e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}},{key:"appendChild",value:function(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"insertBefore",value:function(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}},{key:"removeChild",value:function(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"toString",value:function(){return"RRNode"}}]),e}(),Mm={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Nm={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Lm={},Dm={},jm={},Um={childNodes:os,parentNode:ss,parentElement:as,textContent:us,contains:ls,getRootNode:cs,host:ds,styleSheets:fs,shadowRoot:hs,querySelector:ps,querySelectorAll:vs,mutationObserver:gs},Fm="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",Bm={map:{},getId:function(){return console.error(Fm),-1},getNode:function(){return console.error(Fm),null},removeNodeFromMap:function(){console.error(Fm)},has:function(){return console.error(Fm),!1},reset:function(){console.error(Fm)}},"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Bm=new Proxy(Bm,{get:function(e,t,n){return"map"===t&&console.error(Fm),Reflect.get(e,t,n)}})),qm=Date.now,/[1-9][0-9]{12}/.test(Date.now().toString())||(qm=function(){return(new Date).getTime()}),zm=function(){function e(){_class_call_check(this,e),Uv(this,"id",1),Uv(this,"styleIDMap",new WeakMap),Uv(this,"idStyleMap",new Map)}return _create_class(e,[{key:"getId",value:function(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]),e}(),(n=Wm||{})[n.DomContentLoaded=0]="DomContentLoaded",n[n.Load=1]="Load",n[n.FullSnapshot=2]="FullSnapshot",n[n.IncrementalSnapshot=3]="IncrementalSnapshot",n[n.Meta=4]="Meta",n[n.Custom=5]="Custom",n[n.Plugin=6]="Plugin",Wm=n,(r=Vm||{})[r.Mutation=0]="Mutation",r[r.MouseMove=1]="MouseMove",r[r.MouseInteraction=2]="MouseInteraction",r[r.Scroll=3]="Scroll",r[r.ViewportResize=4]="ViewportResize",r[r.Input=5]="Input",r[r.TouchMove=6]="TouchMove",r[r.MediaInteraction=7]="MediaInteraction",r[r.StyleSheetRule=8]="StyleSheetRule",r[r.CanvasMutation=9]="CanvasMutation",r[r.Font=10]="Font",r[r.Log=11]="Log",r[r.Drag=12]="Drag",r[r.StyleDeclaration=13]="StyleDeclaration",r[r.Selection=14]="Selection",r[r.AdoptedStyleSheet=15]="AdoptedStyleSheet",r[r.CustomElement=16]="CustomElement",Vm=r,(i=Hm||{})[i.MouseUp=0]="MouseUp",i[i.MouseDown=1]="MouseDown",i[i.Click=2]="Click",i[i.ContextMenu=3]="ContextMenu",i[i.DblClick=4]="DblClick",i[i.Focus=5]="Focus",i[i.Blur=6]="Blur",i[i.TouchStart=7]="TouchStart",i[i.TouchMove_Departed=8]="TouchMove_Departed",i[i.TouchEnd=9]="TouchEnd",i[i.TouchCancel=10]="TouchCancel",Hm=i,(o=Km||{})[o.Mouse=0]="Mouse",o[o.Pen=1]="Pen",o[o.Touch=2]="Touch",Km=o,(s=Gm||{})[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",Gm=s,(a=Jm||{})[a.Play=0]="Play",a[a.Pause=1]="Pause",a[a.Seeked=2]="Seeked",a[a.VolumeChange=3]="VolumeChange",a[a.RateChange=4]="RateChange",Jm=a,$m=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}($m||{}),Qm=function(){function e(){_class_call_check(this,e),Uv(this,"length",0),Uv(this,"head",null),Uv(this,"tail",null)}return _create_class(e,[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}},{key:"addNode",value:function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Ms(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&Ms(e.nextSibling)&&e.nextSibling.__ln.previous){var r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}},{key:"removeNode",value:function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}]),e}(),Xm=function(e,t){return"".concat(e,"@").concat(t)},Ym=function(){function e(){var t=this;_class_call_check(this,e),Uv(this,"frozen",!1),Uv(this,"locked",!1),Uv(this,"texts",[]),Uv(this,"attributes",[]),Uv(this,"attributeMap",new WeakMap),Uv(this,"removes",[]),Uv(this,"mapRemoves",[]),Uv(this,"movedMap",{}),Uv(this,"addedSet",new Set),Uv(this,"movedSet",new Set),Uv(this,"droppedSet",new Set),Uv(this,"removesSubTreeCache",new Set),Uv(this,"mutationCb"),Uv(this,"blockClass"),Uv(this,"blockSelector"),Uv(this,"maskTextClass"),Uv(this,"maskTextSelector"),Uv(this,"inlineStylesheet"),Uv(this,"maskInputOptions"),Uv(this,"maskTextFn"),Uv(this,"maskInputFn"),Uv(this,"maskAttributeFn"),Uv(this,"keepIframeSrcFn"),Uv(this,"recordCanvas"),Uv(this,"inlineImages"),Uv(this,"slimDOMOptions"),Uv(this,"dataURLOptions"),Uv(this,"doc"),Uv(this,"mirror"),Uv(this,"iframeManager"),Uv(this,"stylesheetManager"),Uv(this,"shadowDomManager"),Uv(this,"canvasManager"),Uv(this,"processedNodeManager"),Uv(this,"unattachedDoc"),Uv(this,"processMutations",function(e){e.forEach(t.processMutation),t.emit()}),Uv(this,"emit",function(){if(!t.frozen&&!t.locked){for(var e=[],n=new Set,r=new Qm,i=function(e){for(var n=e,r=og;r===og;)r=(n=n&&n.nextSibling)&&t.mirror.getId(n);return r},o=function(o){var s=Um.parentNode(o);if(s&&Rs(o)){var a=!1;if(o.nodeType===Node.TEXT_NODE){var u=s.tagName;if("TEXTAREA"===u)return;"STYLE"===u&&t.addedSet.has(s)&&(a=!0)}var l=Di(s)?t.mirror.getId(As(o)):t.mirror.getId(s),c=i(o);if(-1===l||-1===c)return r.addNode(o);var d=Tb(o,{doc:t.doc,mirror:t.mirror,blockClass:t.blockClass,blockSelector:t.blockSelector,maskTextClass:t.maskTextClass,maskTextSelector:t.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:t.inlineStylesheet,maskInputOptions:t.maskInputOptions,maskTextFn:t.maskTextFn,maskInputFn:t.maskInputFn,slimDOMOptions:t.slimDOMOptions,dataURLOptions:t.dataURLOptions,recordCanvas:t.recordCanvas,inlineImages:t.inlineImages,onSerialize:function(e){Is(e,t.mirror)&&t.iframeManager.addIframe(e),Os(e,t.mirror)&&t.stylesheetManager.trackLinkElement(e),Ts(o)&&t.shadowDomManager.addShadowRoot(Um.shadowRoot(o),t.doc)},onIframeLoad:function(e,n){t.iframeManager.attachIframe(e,n),t.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:function(e,n){t.stylesheetManager.attachLinkElement(e,n)},cssCaptured:a});d&&(e.push({parentId:l,nextId:c,node:d}),n.add(d.id))}};t.mapRemoves.length;)t.mirror.removeNodeFromMap(t.mapRemoves.shift());var s=!0,a=!1,u=void 0;try{for(var l,c=t.movedSet[Symbol.iterator]();!(s=(l=c.next()).done);s=!0){var d=l.value;Ns(t.removesSubTreeCache,d,t.mirror)&&!t.movedSet.has(Um.parentNode(d))||o(d)}}catch(e){a=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(a)throw u}}var f=!0,h=!1,p=void 0;try{for(var v,g=t.addedSet[Symbol.iterator]();!(f=(v=g.next()).done);f=!0){var y=v.value;Ds(t.droppedSet,y)||Ns(t.removesSubTreeCache,y,t.mirror)?Ds(t.movedSet,y)?o(y):t.droppedSet.add(y):o(y)}}catch(e){h=!0,p=e}finally{try{f||null==g.return||g.return()}finally{if(h)throw p}}for(var m=null;r.length;){var b=null;if(m){var w=t.mirror.getId(Um.parentNode(m.value)),_=i(m.value);-1!==w&&-1!==_&&(b=m)}if(!b)for(var S=r.tail;S;){var k=S;if(S=S.previous,k){var x=t.mirror.getId(Um.parentNode(k.value));if(-1===i(k.value))continue;if(-1!==x){b=k;break}var E=k.value,C=Um.parentNode(E);if(C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var I=Um.host(C);if(-1!==t.mirror.getId(I)){b=k;break}}}}if(!b){for(;r.head;)r.removeNode(r.head.value);break}m=b.previous,r.removeNode(b.value),o(b.value)}var O={texts:t.texts.map(function(e){var n=e.node,r=Um.parentNode(n);return r&&"TEXTAREA"===r.tagName&&t.genTextAreaValueMutation(r),{id:t.mirror.getId(n),value:e.value}}).filter(function(e){return!n.has(e.id)}).filter(function(e){return t.mirror.has(e.id)}),attributes:t.attributes.map(function(e){var n=e.attributes;if("string"==typeof n.style){var r=JSON.stringify(e.styleDiff),i=JSON.stringify(e._unchangedStyles);r.length<n.style.length&&(r+i).split("var(").length===n.style.split("var(").length&&(n.style=e.styleDiff)}return{id:t.mirror.getId(e.node),attributes:n}}).filter(function(e){return!n.has(e.id)}).filter(function(e){return t.mirror.has(e.id)}),removes:t.removes,adds:e};(O.texts.length||O.attributes.length||O.removes.length||O.adds.length)&&(t.texts=[],t.attributes=[],t.attributeMap=new WeakMap,t.removes=[],t.addedSet=new Set,t.movedSet=new Set,t.droppedSet=new Set,t.removesSubTreeCache=new Set,t.movedMap={},t.mutationCb(O))}}),Uv(this,"genTextAreaValueMutation",function(e){var n=t.attributeMap.get(e);n||(n={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},t.attributes.push(n),t.attributeMap.set(e,n));var r=Array.from(Um.childNodes(e),function(e){return Um.textContent(e)||""}).join("");n.attributes.value=Wi({element:e,maskInputOptions:t.maskInputOptions,tagName:e.tagName,type:Hi(e),value:r,maskInputFn:t.maskInputFn})}),Uv(this,"processMutation",function(e){if(!Es(e.target,t.mirror,t.slimDOMOptions))switch(e.type){case"characterData":var n=Um.textContent(e.target);xs(e.target,t.blockClass,t.blockSelector,!1)||n===e.oldValue||t.texts.push({value:to(e.target,t.maskTextClass,t.maskTextSelector,!0)&&n?t.maskTextFn?t.maskTextFn(n,ks(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break;case"attributes":var r=e.target,i=e.attributeName,o=e.target.getAttribute(i);if("value"===i){var s=Hi(r);o=Wi({element:r,maskInputOptions:t.maskInputOptions,tagName:r.tagName,type:s,value:o,maskInputFn:t.maskInputFn})}if(xs(e.target,t.blockClass,t.blockSelector,!1)||o===e.oldValue)return;var a=t.attributeMap.get(e.target);if("IFRAME"===r.tagName&&"src"===i&&!t.keepIframeSrcFn(o)){if(r.contentDocument)return;i="rr_src"}if(a||(a={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},t.attributes.push(a),t.attributeMap.set(e.target,a)),"type"===i&&"INPUT"===r.tagName&&"password"===(e.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!eo(r.tagName,i)){if(a.attributes[i]=Zi(t.doc,Vi(r.tagName),Vi(i),o),t.maskAttributeFn&&"string"==typeof a.attributes[i]){var u=t.maskAttributeFn(i,a.attributes[i],r);null!==u?a.attributes[i]=u:delete a.attributes[i]}if("style"===i){if(!t.unattachedDoc)try{t.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){t.unattachedDoc=t.doc}var l=t.unattachedDoc.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue);var c=!0,d=!1,f=void 0;try{for(var h,p=Array.from(r.style)[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value,g=r.style.getPropertyValue(v),y=r.style.getPropertyPriority(v);g!==l.style.getPropertyValue(v)||y!==l.style.getPropertyPriority(v)?a.styleDiff[v]=""===y?g:[g,y]:a._unchangedStyles[v]=[g,y]}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}var m=!0,b=!1,w=void 0;try{for(var _,S=Array.from(l.style)[Symbol.iterator]();!(m=(_=S.next()).done);m=!0){var k=_.value;""===r.style.getPropertyValue(k)&&(a.styleDiff[k]=!1)}}catch(e){b=!0,w=e}finally{try{m||null==S.return||S.return()}finally{if(b)throw w}}}else"open"===i&&"DIALOG"===r.tagName&&(r.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal")}break;case"childList":if(xs(e.target,t.blockClass,t.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void t.genTextAreaValueMutation(e.target);e.addedNodes.forEach(function(n){return t.genAdds(n,e.target)}),e.removedNodes.forEach(function(n){var r=t.mirror.getId(n),i=Di(e.target)?t.mirror.getId(Um.host(e.target)):t.mirror.getId(e.target);xs(e.target,t.blockClass,t.blockSelector,!1)||Es(n,t.mirror,t.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(n,t.mirror)||(t.addedSet.has(n)?(Rb(t.addedSet,n),t.droppedSet.add(n)):t.addedSet.has(e.target)&&-1===r||Pb(e.target,t.mirror)||(t.movedSet.has(n)&&t.movedMap[Xm(r,i)]?Rb(t.movedSet,n):(t.removes.push({parentId:i,id:r,isShadow:!(!Di(e.target)||!ji(e.target))||void 0}),function(e,t){for(var n=[e];n.length;){var r=n.pop();t.has(r)||(t.add(r),Um.childNodes(r).forEach(function(e){return n.push(e)}))}}(n,t.removesSubTreeCache))),t.mapRemoves.push(n))})}}),Uv(this,"genAdds",function(e,n){if(!t.processedNodeManager.inOtherBuffer(e,t)&&!t.addedSet.has(e)&&!t.movedSet.has(e)){if(t.mirror.hasNode(e)){if(Es(e,t.mirror,t.slimDOMOptions))return;t.movedSet.add(e);var r=null;n&&t.mirror.hasNode(n)&&(r=t.mirror.getId(n)),r&&-1!==r&&(t.movedMap[Xm(t.mirror.getId(e),r)]=!0)}else t.addedSet.add(e),t.droppedSet.delete(e);xs(e,t.blockClass,t.blockSelector,!1)||(Um.childNodes(e).forEach(function(e){return t.genAdds(e)}),Ts(e)&&Um.childNodes(Um.shadowRoot(e)).forEach(function(n){t.processedNodeManager.add(n,t),t.genAdds(n,e)}))}})}return _create_class(e,[{key:"init",value:function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","maskAttributeFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(function(n){t[n]=e[n]})}},{key:"freeze",value:function(){this.frozen=!0,this.canvasManager.freeze()}},{key:"unfreeze",value:function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}},{key:"isFrozen",value:function(){return this.frozen}},{key:"lock",value:function(){this.locked=!0,this.canvasManager.lock()}},{key:"unlock",value:function(){this.locked=!1,this.canvasManager.unlock(),this.emit()}},{key:"reset",value:function(){this.shadowDomManager.reset(),this.canvasManager.reset()}}]),e}(),eb=function(e){if(!Zm)return e;return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];try{return e.apply(void 0,_to_consumable_array(n))}catch(e){if(Zm&&!0===Zm(e))return;throw e}}},tb=[],nb=["INPUT","TEXTAREA","SELECT"],rb=new WeakMap,ib=function(){function e(t){_class_call_check(this,e),Uv(this,"iframeIdToRemoteIdMap",new WeakMap),Uv(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}return _create_class(e,[{key:"getId",value:function(e,t,n,r){var i=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e),s=i.get(t);return s||(s=this.generateIdFn(),i.set(t,s),o.set(s,t)),s}},{key:"getIds",value:function(e,t){var n=this,r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(function(t){return n.getId(e,t,r,i)})}},{key:"getRemoteId",value:function(e,t,n){var r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;var i=r.get(t);return i||-1}},{key:"getRemoteIds",value:function(e,t){var n=this,r=this.getRemoteIdToIdMap(e);return t.map(function(t){return n.getRemoteId(e,t,r)})}},{key:"reset",value:function(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}},{key:"getIdToRemoteIdMap",value:function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}},{key:"getRemoteIdToIdMap",value:function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}]),e}(),ob=function(){function e(t){_class_call_check(this,e),Uv(this,"iframes",new WeakMap),Uv(this,"crossOriginIframeMap",new WeakMap),Uv(this,"crossOriginIframeMirror",new ib(Qi)),Uv(this,"crossOriginIframeStyleMirror"),Uv(this,"crossOriginIframeRootIdMap",new WeakMap),Uv(this,"mirror"),Uv(this,"mutationCb"),Uv(this,"wrappedEmit"),Uv(this,"loadListener"),Uv(this,"stylesheetManager"),Uv(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ib(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}return _create_class(e,[{key:"addIframe",value:function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}},{key:"addLoadListener",value:function(e){this.loadListener=e}},{key:"attachIframe",value:function(e,t){var n,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(n=e.contentWindow)||n.addEventListener("message",this.handleMessage.bind(this))),null==(r=this.loadListener)||r.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var n=this.crossOriginIframeMap.get(e.source);if(n){var r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}}}},{key:"transformCrossOriginEvent",value:function(e,t){var n,r=this;switch(t.type){case Wm.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:Wm.IncrementalSnapshot,data:{source:Vm.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Wm.Meta:case Wm.Load:case Wm.DomContentLoaded:return!1;case Wm.Plugin:return t;case Wm.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Wm.IncrementalSnapshot:switch(t.data.source){case Vm.Mutation:return t.data.adds.forEach(function(t){r.replaceIds(t,e,["parentId","nextId","previousId"]),r.replaceIdOnNode(t.node,e);var n=r.crossOriginIframeRootIdMap.get(e);n&&r.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(function(t){r.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(function(t){r.replaceIds(t,e,["id"])}),t.data.texts.forEach(function(t){r.replaceIds(t,e,["id"])}),t;case Vm.Drag:case Vm.TouchMove:case Vm.MouseMove:return t.data.positions.forEach(function(t){r.replaceIds(t,e,["id"])}),t;case Vm.ViewportResize:return!1;case Vm.MediaInteraction:case Vm.MouseInteraction:case Vm.Scroll:case Vm.CanvasMutation:case Vm.Input:return this.replaceIds(t.data,e,["id"]),t;case Vm.StyleSheetRule:case Vm.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Vm.Font:return t;case Vm.Selection:return t.data.ranges.forEach(function(t){r.replaceIds(t,e,["start","end"])}),t;case Vm.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(n=t.data.styles)||n.forEach(function(t){r.replaceStyleIds(t,e,["styleId"])}),t}}return!1}},{key:"replace",value:function(e,t,n,r){var i=!0,o=!1,s=void 0;try{for(var a,u=r[Symbol.iterator]();!(i=(a=u.next()).done);i=!0){var l=a.value;(Array.isArray(t[l])||"number"==typeof t[l])&&(Array.isArray(t[l])?t[l]=e.getIds(n,t[l]):t[l]=e.getId(n,t[l]))}}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(function(e){n.replaceIdOnNode(e,t)})}},{key:"patchRootIdOnNode",value:function(e,t){var n=this;e.type===$m.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(function(e){n.patchRootIdOnNode(e,t)})}}]),e}(),sb=function(){function e(t){_class_call_check(this,e),Uv(this,"shadowDoms",new WeakSet),Uv(this,"mutationCb"),Uv(this,"scrollCb"),Uv(this,"bypassOptions"),Uv(this,"mirror"),Uv(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}return _create_class(e,[{key:"init",value:function(){this.reset(),this.patchAttachShadow(Element,document)}},{key:"addShadowRoot",value:function(e,t){var n=this;if(ji(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=Fs(_object_spread_props(_object_spread({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(function(){return r.disconnect()}),this.restoreHandlers.push(qs(_object_spread_props(_object_spread({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(Um.host(e))),n.restoreHandlers.push(Vs({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e))},0)}}},{key:"observeAttachShadow",value:function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}},{key:"patchAttachShadow",value:function(e,t){var n=this;this.restoreHandlers.push(bs(e.prototype,"attachShadow",function(e){return function(r){var i=e.call(this,r),o=Um.shadowRoot(this);return o&&Rs(this)&&n.addShadowRoot(o,t),i}}))}},{key:"reset",value:function(){this.restoreHandlers.forEach(function(e){try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}]),e}(),ab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ub="undefined"==typeof Uint8Array?[]:new Uint8Array(256),lb=0;lb<64;lb++)ub[ab.charCodeAt(lb)]=lb;cb=function(e){var t,n=new Uint8Array(e),r=n.length,i="";for(t=0;t<r;t+=3)i+=ab[n[t]>>2],i+=ab[(3&n[t])<<4|n[t+1]>>4],i+=ab[(15&n[t+1])<<2|n[t+2]>>6],i+=ab[63&n[t+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i},db=new Map,fb=function(e,t,n){if(e&&(pb(e,t)||"object"===(void 0===e?"undefined":_type_of(e)))){var r=function(e,t){var n=db.get(e);return n||(n=new Map,db.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),i=r.indexOf(e);return-1===i&&(i=r.length,r.push(e)),i}},hb=function(e,t,n){return e.map(function(e){return Nb(e,t,n)})},pb=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(function(e){return"function"==typeof t[e]});return Boolean(n.find(function(n){return _instanceof(e,t[n])}))},vb='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastBlobMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext("2d");\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n if (!lastBlobMap.has(id) && await transparentBase64 === base64) {\n lastBlobMap.set(id, base64);\n return worker.postMessage({ id });\n }\n if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });\n worker.postMessage({\n id,\n type,\n base64,\n width,\n height\n });\n lastBlobMap.set(id, base64);\n } else {\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map\n',gb="undefined"!=typeof self&&self.Blob&&new Blob([vb],{type:"text/javascript;charset=utf-8"}),yb=function(){function e(t){var n=this;_class_call_check(this,e),Uv(this,"pendingCanvasMutations",new Map),Uv(this,"rafStamps",{latestId:0,invokeId:null}),Uv(this,"mirror"),Uv(this,"mutationCb"),Uv(this,"resetObservers"),Uv(this,"frozen",!1),Uv(this,"locked",!1),Uv(this,"processMutation",function(e,t){!(n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId)&&n.rafStamps.invokeId||(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(e)||n.pendingCanvasMutations.set(e,[]),n.pendingCanvasMutations.get(e).push(t)});var r=t.sampling,i=void 0===r?"all":r,o=t.win,s=t.blockClass,a=t.blockSelector,u=t.recordCanvas,l=t.dataURLOptions;this.mutationCb=t.mutationCb,this.mirror=t.mirror,u&&"all"===i&&this.initCanvasMutationObserver(o,s,a),u&&"number"==typeof i&&this.initCanvasFPSObserver(i,o,s,a,{dataURLOptions:l})}return _create_class(e,[{key:"reset",value:function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}},{key:"freeze",value:function(){this.frozen=!0}},{key:"unfreeze",value:function(){this.frozen=!1}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"initCanvasFPSObserver",value:function(e,t,n,r,i){var o=this,s=Js(t,n,r,!0),a=new Map,u=new Qs;u.onmessage=function(e){var t=e.data.id;if(a.set(t,!1),"base64"in e.data){var n=e.data,r=n.base64,i=n.type,s=n.width,u=n.height;o.mutationCb({id:t,type:Gm["2D"],commands:[{property:"clearRect",args:[0,0,s,u]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}]})}};var l,c=1e3/e,d=0,f=function(e){var s;d&&e-d<c?l=requestAnimationFrame(f):(d=e,(s=[],t.document.querySelectorAll("canvas").forEach(function(e){xs(e,n,r,!0)||s.push(e)}),s).forEach(function(e){return _async_to_generator(function(){var t,n,r,o;return _ts_generator(this,function(s){switch(s.label){case 0:return n=this.mirror.getId(e),a.get(n)?[2]:0===e.width||0===e.height?[2]:(a.set(n,!0),["webgl","webgl2"].includes(e.__context)&&(r=e.getContext(e.__context),!1===(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&r.clear(r.COLOR_BUFFER_BIT)),[4,createImageBitmap(e)]);case 1:return o=s.sent(),u.postMessage({id:n,bitmap:o,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[o]),[2]}})}).call(o)}),l=requestAnimationFrame(f))};l=requestAnimationFrame(f),this.resetObservers=function(){s(),cancelAnimationFrame(l)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r=Js(e,t,n,!1),i=function(e,t,n,r){var i=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),s=!0,a=!1,u=void 0;try{for(var l,c=function(){var o=l.value;try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])return"continue";var s=bs(t.CanvasRenderingContext2D.prototype,o,function(i){return function(){for(var s=this,a=arguments.length,u=new Array(a),l=0;l<a;l++)u[l]=arguments[l];return xs(this.canvas,n,r,!0)||setTimeout(function(){var n=hb(u,t,s);e(s.canvas,{type:Gm["2D"],property:o,args:n})},0),i.apply(this,u)}});i.push(s)}catch(n){var a=Ab(t.CanvasRenderingContext2D.prototype,o,{set:function(t){e(this.canvas,{type:Gm["2D"],property:o,args:[t],setter:!0})}});i.push(a)}},d=o[Symbol.iterator]();!(s=(l=d.next()).done);s=!0)c()}catch(e){a=!0,u=e}finally{try{s||null==d.return||d.return()}finally{if(a)throw u}}return function(){i.forEach(function(e){return e()})}}(this.processMutation.bind(this),e,t,n),o=function(e,t,n,r){var i,o,s=[];return(i=s).push.apply(i,_to_consumable_array($s(t.WebGLRenderingContext.prototype,Gm.WebGL,e,n,r,t))),void 0!==t.WebGL2RenderingContext&&(o=s).push.apply(o,_to_consumable_array($s(t.WebGL2RenderingContext.prototype,Gm.WebGL2,e,n,r,t))),function(){s.forEach(function(e){return e()})}}(this.processMutation.bind(this),e,t,n);this.resetObservers=function(){r(),i(),o()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame(function(){return e.flushPendingCanvasMutations()})}},{key:"startRAFTimestamping",value:function(){var e=this,t=function(n){e.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)}},{key:"flushPendingCanvasMutations",value:function(){var e=this;this.pendingCanvasMutations.forEach(function(t,n){var r=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(function(){return e.flushPendingCanvasMutations()})}},{key:"flushPendingCanvasMutationFor",value:function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var r=n.map(function(e){e.type;return _object_without_properties(e,["type"])}),i=n[0].type;this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}}}}]),e}(),mb=function(){function e(t){_class_call_check(this,e),Uv(this,"trackedLinkElements",new WeakSet),Uv(this,"mutationCb"),Uv(this,"adoptedStyleSheetCb"),Uv(this,"styleMirror",new zm),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}return _create_class(e,[{key:"attachLinkElement",value:function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}},{key:"trackLinkElement",value:function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}},{key:"adoptStyleSheets",value:function(e,t){if(0!==e.length){var n={id:t,styleIds:[]},r=[],i=!0,o=!1,s=void 0;try{for(var a,u,l=function(){var e=u.value,t=void 0;if(a.styleMirror.has(e))t=a.styleMirror.getId(e);else{t=a.styleMirror.add(e);var i=[];try{i=Array.from(e.cssRules,function(t,n){return{rule:Fi(t,e.href),index:n}})}catch(e){if(!_instanceof(e,DOMException)||"SecurityError"!==e.name)throw e}r.push({styleId:t,rules:i})}n.styleIds.push(t)},c=e[Symbol.iterator]();!(i=(u=c.next()).done);i=!0)a=this,l()}catch(e){o=!0,s=e}finally{try{i||null==c.return||c.return()}finally{if(o)throw s}}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),e}(),bb=function(){function e(){_class_call_check(this,e),Uv(this,"nodeMap",new WeakMap),Uv(this,"active",!1)}return _create_class(e,[{key:"inOtherBuffer",value:function(e,t){var n=this.nodeMap.get(e);return n&&Array.from(n).some(function(e){return e!==t})}},{key:"add",value:function(e,t){var n=this;this.active||(this.active=!0,requestAnimationFrame(function(){n.nodeMap=new WeakMap,n.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}},{key:"destroy",value:function(){}}]),e}(),kb=!1;try{if(2!==Array.from([1],function(e){return 2*e})[0]){var l=document.createElement("iframe");document.body.appendChild(l),Array.from=(null==(Fv=l.contentWindow)?void 0:Fv.Array.from)||Array.from,document.body.removeChild(l)}}catch(e){console.debug("Unable to override Array.from",e)}xb=new Qv,Xs.addCustomEvent=function(e,t){if(!kb)throw new Error("please add custom event after start recording");wb({type:Wm.Custom,data:{tag:e,payload:t}})},Xs.freezePage=function(){tb.forEach(function(e){return e.freeze()})},Xs.takeFullSnapshot=function(e){if(!kb)throw new Error("please take full snapshot after start recording");_b(e)},Xs.mirror=xb,(u=Eb||(Eb={}))[u.NotStarted=0]="NotStarted",u[u.Running=1]="Running",u[u.Stopped=2]="Stopped"}}),Ub={};Wu(Ub,{NetworkObservers:function(){return Db}});var Fb=qu({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/observers.js":function(){Gu(),uf(),Lb=["image/","audio/","video/","application/octet-stream","font/"],Db=function(){function e(){this.fetchObserver=null}return e.prototype.start=function(e,t){this.eventCallback=e,this.networkConfig=t,this.observeFetch()},e.prototype.stop=function(){var e;null===(e=this.fetchObserver)||void 0===e||e.call(this),this.fetchObserver=null,this.eventCallback=void 0,this.networkConfig=void 0},e.prototype.notifyEvent=function(e){var t;null===(t=this.eventCallback)||void 0===t||t.call(this,e)},e.prototype.observeFetch=function(){var e=this,t=K();if(t){var n=t.fetch;n&&(t.fetch=function(t,r){return Ft(e,void 0,void 0,function(){var e,i,o,s,a,u,l,c,d,f,h,p,v=this;return Bt(this,function(g){switch(g.label){case 0:e=Date.now(),i={timestamp:e,type:"fetch",method:(null==r?void 0:r.method)||"GET",url:t.toString(),requestHeaders:null==r?void 0:r.headers},(null==(o=null===(h=this.networkConfig)||void 0===h?void 0:h.body)?void 0:o.request)&&void 0!==(s=function(e){if(null!=e){if("string"==typeof e)return e;if(_instanceof(e,URLSearchParams))return e.toString();if(_instanceof(e,FormData)){var t=[];return e.forEach(function(e,n){t.push("".concat(n,"=").concat("string"==typeof e?e:"[File]"))}),t.join("&")}}}(null==r?void 0:r.body))&&(a=null!==(p=o.maxBodySizeBytes)&&void 0!==p?p:10240,i.requestBody=Ys(s,a).value),g.label=1;case 1:return g.trys.push([1,3,,4]),[4,n(t,r)];case 2:return u=g.sent(),d=Date.now(),i.status=u.status,i.duration=d-e,l={},u.headers.forEach(function(e,t){l[t]=e}),i.responseHeaders=l,(null==o?void 0:o.response)?!function(e){return!!e&&Lb.some(function(t){return e.toLowerCase().startsWith(t)})}(l["content-type"]||null)?u.clone().text().then(function(e){var t,n=null!==(t=o.maxBodySizeBytes)&&void 0!==t?t:10240,r=Ys(e,n),s=r.value,a=r.truncated;i.responseBody=s,i.responseBodyStatus=a?"truncated":"captured",v.notifyEvent(i)},function(){i.responseBodyStatus="error",v.notifyEvent(i)}):(i.responseBodyStatus="skipped_binary",this.notifyEvent(i)):this.notifyEvent(i),[2,u];case 3:throw c=g.sent(),d=Date.now(),i.duration=d-e,f=c,i.error={name:f.name||"UnknownError",message:f.message||"An unknown error occurred"},this.notifyEvent(i),c;case 4:return[2]}})})},this.fetchObserver=function(){t.fetch=n})}},e}()}}),Bb=zu({"../../../../node_modules/@amplitude/ua-parser-js/src/ua-parser.js":function(e,t){!function(n,r){var i="function",o="undefined",s="object",a="string",u="model",l="name",c="type",d="vendor",f="version",h="architecture",p="console",v="mobile",g="tablet",y="smarttv",m="wearable",b="embedded",w="Amazon",_="Apple",S="ASUS",k="BlackBerry",x="Browser",E="Chrome",C="Firefox",I="Google",O="Huawei",T="LG",A="Microsoft",P="Motorola",R="Opera",M="Samsung",N="Sharp",L="Sony",D="Xiaomi",j="Zebra",U="Facebook",F=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},B=function(e,t){return(void 0===e?"undefined":_type_of(e))===a&&-1!==q(t).indexOf(q(e))},q=function(e){return e.toLowerCase()},z=function(e,t){if((void 0===e?"undefined":_type_of(e))===a)return e=e.replace(/^\s\s*/,""),(void 0===t?"undefined":_type_of(t))===o?e:e.substring(0,350)},W=function(e,t){for(var n,o,a,u,l,c,d=0;d<t.length&&!l;){var f=t[d],h=t[d+1];for(n=o=0;n<f.length&&!l;)if(l=f[n++].exec(e))for(a=0;a<h.length;a++)c=l[++o],(void 0===(u=h[a])?"undefined":_type_of(u))===s&&u.length>0?2===u.length?_type_of(u[1])==i?this[u[0]]=u[1].call(this,c):this[u[0]]=u[1]:3===u.length?_type_of(u[1])!==i||u[1].exec&&u[1].test?this[u[0]]=c?c.replace(u[1],u[2]):r:this[u[0]]=c?u[1].call(this,c,u[2]):r:4===u.length&&(this[u[0]]=c?u[3].call(this,c.replace(u[1],u[2])):r):this[u]=c||r;d+=2}},V=function(e,t){for(var n in t)if(_type_of(t[n])===s&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(B(t[n][i],e))return"?"===n?r:n}else if(B(t[n],e))return"?"===n?r:n;return e},H={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},K={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,f],[/opios[\/ ]+([\w\.]+)/i],[f,[l,R+" Mini"]],[/\bopr\/([\w\.]+)/i],[f,[l,R]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[l,f],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[l,"UC"+x]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[f,[l,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[f,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[l,"IE"]],[/yabrowser\/([\w\.]+)/i],[f,[l,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+x],f],[/\bfocus\/([\w\.]+)/i],[f,[l,C+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[l,R+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[l,R+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[l,"MIUI "+x]],[/fxios\/([-\w\.]+)/i],[f,[l,C]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360 "+x]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1 "+x],f],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[l,f],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,U],f],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[l,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[l,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[l,E+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,E+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[l,"Android "+x]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[f,V,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[l,C+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[l,f],[/(cobalt)\/([\w\.]+)/i],[l,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[h,"amd64"]],[/(ia32(?=;))/i],[[h,q]],[/((?:i[346]|x)86)[;\)]/i],[[h,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[h,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[h,"armhf"]],[/windows (ce|mobile); ppc;/i],[[h,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[h,/ower/,"",q]],[/(sun4\w)[;\)]/i],[[h,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[h,q]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[d,M],[c,g]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[d,M],[c,v]],[/((ipod|iphone)\d+,\d+)/i],[u,[d,_],[c,v]],[/(ipad\d+,\d+)/i],[u,[d,_],[c,g]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[d,_],[c,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[d,_],[c,g]],[/(macintosh);/i],[u,[d,_]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[d,O],[c,g]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[d,O],[c,v]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[d,D],[c,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[d,D],[c,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[d,"OPPO"],[c,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[d,"Vivo"],[c,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[d,"Realme"],[c,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[d,P],[c,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[d,P],[c,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[d,T],[c,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[d,T],[c,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[d,"Lenovo"],[c,g]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[d,"Nokia"],[c,v]],[/(pixel c)\b/i],[u,[d,I],[c,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[d,I],[c,v]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[d,L],[c,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[d,L],[c,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[d,"OnePlus"],[c,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[d,w],[c,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[d,w],[c,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,d,[c,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[d,k],[c,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[d,S],[c,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[d,S],[c,v]],[/(nexus 9)/i],[u,[d,"HTC"],[c,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[u,/_/g," "],[c,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[d,"Acer"],[c,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[d,"Meizu"],[c,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[d,N],[c,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d,u,[c,v]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d,u,[c,g]],[/(surface duo)/i],[u,[d,A],[c,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[d,"Fairphone"],[c,v]],[/(u304aa)/i],[u,[d,"AT&T"],[c,v]],[/\bsie-(\w*)/i],[u,[d,"Siemens"],[c,v]],[/\b(rct\w+) b/i],[u,[d,"RCA"],[c,g]],[/\b(venue[\d ]{2,7}) b/i],[u,[d,"Dell"],[c,g]],[/\b(q(?:mv|ta)\w+) b/i],[u,[d,"Verizon"],[c,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[d,"Barnes & Noble"],[c,g]],[/\b(tm\d{3}\w+) b/i],[u,[d,"NuVision"],[c,g]],[/\b(k88) b/i],[u,[d,"ZTE"],[c,g]],[/\b(nx\d{3}j) b/i],[u,[d,"ZTE"],[c,v]],[/\b(gen\d{3}) b.+49h/i],[u,[d,"Swiss"],[c,v]],[/\b(zur\d{3}) b/i],[u,[d,"Swiss"],[c,g]],[/\b((zeki)?tb.*\b) b/i],[u,[d,"Zeki"],[c,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],u,[c,g]],[/\b(ns-?\w{0,9}) b/i],[u,[d,"Insignia"],[c,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[d,"NextBook"],[c,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],u,[c,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],u,[c,v]],[/\b(ph-1) /i],[u,[d,"Essential"],[c,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[d,"Envizen"],[c,g]],[/\b(trio[-\w\. ]+) b/i],[u,[d,"MachSpeed"],[c,g]],[/\btu_(1491) b/i],[u,[d,"Rotor"],[c,g]],[/(shield[\w ]+) b/i],[u,[d,"Nvidia"],[c,g]],[/(sprint) (\w+)/i],[d,u,[c,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,A],[c,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[d,j],[c,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[d,j],[c,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,u,[c,p]],[/droid.+; (shield) bui/i],[u,[d,"Nvidia"],[c,p]],[/(playstation [345portablevi]+)/i],[u,[d,L],[c,p]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[d,A],[c,p]],[/smart-tv.+(samsung)/i],[d,[c,y]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,M],[c,y]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,T],[c,y]],[/(apple) ?tv/i],[d,[u,_+" TV"],[c,y]],[/crkey/i],[[u,E+"cast"],[d,I],[c,y]],[/droid.+aft(\w)( bui|\))/i],[u,[d,w],[c,y]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[d,N],[c,y]],[/(bravia[\w ]+)( bui|\))/i],[u,[d,L],[c,y]],[/(mitv-\w{5}) bui/i],[u,[d,D],[c,y]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[d,z],[u,z],[c,y]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[c,y]],[/((pebble))app/i],[d,u,[c,m]],[/droid.+; (glass) \d/i],[u,[d,I],[c,m]],[/droid.+; (wt63?0{2,3})\)/i],[u,[d,j],[c,m]],[/(quest( 2)?)/i],[u,[d,U],[c,m]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[c,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[c,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[c,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[c,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[c,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[l,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,f],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[l,[f,V,H]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[l,"Windows"],[f,V,H]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,"Mac OS"],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,f],[/\(bb(10);/i],[f,[l,k]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[l,C+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[l,"webOS"]],[/crkey\/([\d\.]+)/i],[f,[l,E+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[l,"Chromium OS"],f],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,f],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[l,f]]},G=function(e,t){if((void 0===e?"undefined":_type_of(e))===s&&(t=e,e=r),!_instanceof(this,G))return new G(e,t).getResult();var i=e||((void 0===n?"undefined":_type_of(n))!==o&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),p=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(K,t):K;return this.getBrowser=function(){var e,t={};return t[l]=r,t[f]=r,W.call(t,i,p.browser),t.major=(void 0===(e=t.version)?"undefined":_type_of(e))===a?e.replace(/[^\d\.]/g,"").split(".")[0]:r,t},this.getCPU=function(){var e={};return e[h]=r,W.call(e,i,p.cpu),e},this.getDevice=function(){var e={};return e[d]=r,e[u]=r,e[c]=r,W.call(e,i,p.device),e},this.getEngine=function(){var e={};return e[l]=r,e[f]=r,W.call(e,i,p.engine),e},this.getOS=function(){var e={};return e[l]=r,e[f]=r,W.call(e,i,p.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return i},this.setUA=function(e){return i=(void 0===e?"undefined":_type_of(e))===a&&e.length>350?z(e,350):e,this},this.setUA(i),this};G.VERSION="0.7.33",G.BROWSER=F([l,f,"major"]),G.CPU=F([h]),G.DEVICE=F([u,d,c,p,v,y,g,m,b]),G.ENGINE=G.OS=F([l,f]),(void 0===e?"undefined":_type_of(e))!==o?((void 0===t?"undefined":_type_of(t))!==o&&t.exports&&(e=t.exports=G),e.UAParser=G):("undefined"==typeof define?"undefined":_type_of(define))===i&&define.amd?define(function(){return G}):(void 0===n?"undefined":_type_of(n))!==o&&(n.UAParser=G);var J=(void 0===n?"undefined":_type_of(n))!==o&&(n.jQuery||n.Zepto);if(J&&!J.ua){var $=new G;J.ua=$.getResult(),J.ua.get=function(){return $.getUA()},J.ua.set=function(e){$.setUA(e);var t=$.getResult();for(var n in t)J.ua[n]=t[n]}}}("object"===("undefined"==typeof window?"undefined":_type_of(window))?window:e)}}),qb={};Wu(qb,{DestinationAmplitude:function(){return bO},default:function(){return kO},destinationAmplitude:function(){return SO}});var zb=Object.defineProperty,Wb=function(e,t){for(var n in t)zb(e,n,{get:t[n],enumerable:!0})};Wb({},{stepId:function(){return Zs}});Wb({},{getDestination:function(){return ea}});Wb({},{Level:function(){return Hb}});var Vb,Hb=((Vb=Hb||{})[Vb.ERROR=0]="ERROR",Vb[Vb.WARN=1]="WARN",Vb[Vb.INFO=2]="INFO",Vb[Vb.DEBUG=3]="DEBUG",Vb);Wb({},{getTransformer:function(){return ta}});Wb({},{getSource:function(){return na}});function Kb(e){for(var t=arguments.length>2?arguments[2]:void 0,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"").split("."),r=e,i=0;i<n.length;i++){var o=n[i];if("*"===o&&oa(r)){var s=n.slice(i+1).join("."),a=[],u=!0,l=!1,c=void 0;try{for(var d,f=r[Symbol.iterator]();!(u=(d=f.next()).done);u=!0){var h=Kb(d.value,s,t);a.push(h)}}catch(e){l=!0,c=e}finally{try{u||null==f.return||f.return()}finally{if(l)throw c}}return a}if(void 0===(r=ua(r)||oa(r)?r[o]:void 0))break}return sa(r)?r:t}function Gb(e){return function(e){return"boolean"==typeof e}(e)||la(e)||aa(e)||!sa(e)||oa(e)&&e.every(Gb)||ua(e)&&Object.values(e).every(Gb)}Wb({},{getStore:function(){return ra},getStoreValue:function(){return ia}});var Jb=function(){function e(t,n){var r;return _class_call_check(this,e),(r=_call_super(this,e,[t,n])).name="FatalError",Object.setPrototypeOf(r,e.prototype),r}return _inherits(e,_wrap_native_super(Error)),e}();function $b(e,t,n){return _async_to_generator(function(){return _ts_generator(this,function(r){return[2,(oa(t)?t:[t]).reduce(function(t,r){return _async_to_generator(function(){var i,o,s,a,u,l,c,d,f,h,p,v,g,y,m,b,w,_,S,k,x,E,C,I,O;return _ts_generator(this,function(T){switch(T.label){case 0:return[4,t];case 1:return(i=T.sent())?[2,i]:(o=la(r)?{key:r}:r,Object.keys(o).length?(s=o.condition,a=o.consent,u=o.fn,l=o.key,c=o.loop,d=o.map,f=o.set,h=o.validate,p=o.value,v=_object_spread_props(_object_spread({},n),{mapping:r}),(g=s)?[4,da(s,function(e){if(_instanceof(e,Jb))throw e;return v.logger.error("mapping condition failed",{event:v.event,error:e}),!1})(e,v)]:[3,3]):[2]);case 2:g=!T.sent(),T.label=3;case 3:return g?[2]:a&&!function(e){var t=_object_spread({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),n={},r=!e||0===Object.keys(e).length;return Object.keys(t).forEach(function(i){t[i]&&(n[i]=!0,e&&e[i]&&(r=!0))}),!!r&&n}(a,v.consent)?[2,p]:(y=sa(p)?p:e,c?(m=_sliced_to_array(c,2),b=m[0],w=m[1],"this"!==b?[3,4]:(S=[e],[3,6])):[3,10]);case 4:return[4,fa(e,b,v)];case 5:S=T.sent(),T.label=6;case 6:return oa(_=S)?[4,Promise.all(_.map(function(e){return sa(e)?fa(e,w,v):void 0}))]:[3,8];case 7:return k=T.sent().filter(sa),[3,9];case 8:k=void 0,T.label=9;case 9:return y=k,[3,21];case 10:return d?[4,Object.entries(d).reduce(function(t,n){var r=_sliced_to_array(n,2),i=r[0],o=r[1];return _async_to_generator(function(){var n,r;return _ts_generator(this,function(s){switch(s.label){case 0:return[4,t];case 1:return n=s.sent(),[4,fa(e,o,v)];case 2:return r=s.sent(),[2,(sa(r)&&(n[i]=r),n)]}})})()},Promise.resolve({}))]:[3,12];case 11:return y=T.sent(),[3,20];case 12:return f?[4,Promise.all(f.map(function(t){return $b(e,t,v)}))]:[3,14];case 13:return x=y=T.sent(),[3,19];case 14:return l?(E=y=Kb(e,l,p),[3,18]):[3,15];case 15:return(C=u)?[4,da(u,function(e){if(_instanceof(e,Jb))throw e;v.logger.error("mapping fn failed",{event:v.event,error:e})})(e,v)]:[3,17];case 16:C=y=T.sent(),T.label=17;case 17:E=C,T.label=18;case 18:x=E,T.label=19;case 19:T.label=20;case 20:T.label=21;case 21:return(I=h)?[4,da(h,function(e){if(_instanceof(e,Jb))throw e;return v.logger.error("mapping validate failed",{event:v.event,error:e}),!1})(y,v)]:[3,23];case 22:I=!T.sent(),T.label=23;case 23:return I&&(y=void 0),O=ca(y),[2,sa(O)?O:ca(p)]}})})()},Promise.resolve(void 0))]})})()}var Qb={};Wu(Qb,{Identify:function(){return N},Revenue:function(){return ie},Types:function(){return Fw},_setDiagnosticsSampleRate:function(){return GI},add:function(){return XI},createInstance:function(){return HI},experiment:function(){return $I},extendSession:function(){return YI},flush:function(){return ZI},getDeviceId:function(){return eO},getIdentity:function(){return tO},getOptOut:function(){return nO},getSessionId:function(){return rO},getUserId:function(){return iO},groupIdentify:function(){return oO},identify:function(){return sO},initAll:function(){return JI},logEvent:function(){return aO},remove:function(){return uO},reset:function(){return lO},revenue:function(){return cO},sessionReplay:function(){return QI},setDeviceId:function(){return dO},setGroup:function(){return fO},setIdentity:function(){return hO},setOptOut:function(){return pO},setSessionId:function(){return vO},setTransport:function(){return gO},setUserId:function(){return yO},track:function(){return mO}}),Gu(),uf(),Gu(),uf(),Gu(),uf();var Xb=function(e,t){return"boolean"==typeof e?e:!1!==(null==e?void 0:e[t])&&(i=K(),"string"!=typeof(null===(r=null===(n=null==i?void 0:i.chrome)||void 0===n?void 0:n.runtime)||void 0===r?void 0:r.id)||!!(null==e?void 0:e[t]));var n,r,i},Yb=function(e){return Xb(e,"attribution")},Zb=function(e){return Xb(e,"formInteractions")},ew=function(e){return Xb(e,"pageViews")},tw=function(e){return Xb(e,"sessions")},nw=function(e){return"boolean"==typeof e?e:"object"===(void 0===e?"undefined":_type_of(e))&&(!0===e.networkTracking||"object"===_type_of(e.networkTracking))},rw=function(e){return"boolean"==typeof e?e:"object"===(void 0===e?"undefined":_type_of(e))&&(!0===e.elementInteractions||"object"===_type_of(e.elementInteractions))},iw=function(e){return"boolean"==typeof e?e:"object"===(void 0===e?"undefined":_type_of(e))&&(!0===e.frustrationInteractions||"object"===_type_of(e.frustrationInteractions))},ow=function(e){if("object"===_type_of(e.autocapture)){var t=e.autocapture.performanceTracking;return!0===t?{mainThreadBlock:!0}:"object"===(void 0===t?"undefined":_type_of(t))&&null!==t?t:void 0}},sw=function(e){if(rw(e.autocapture)&&"object"===_type_of(e.autocapture)&&"object"===_type_of(e.autocapture.elementInteractions))return e.autocapture.elementInteractions},aw=function(e){if(iw(e.autocapture)&&"object"===_type_of(e.autocapture)&&"object"===_type_of(e.autocapture.frustrationInteractions))return e.autocapture.frustrationInteractions},uw=function(e){var n;if(nw(e.autocapture)){var r=void 0;return"object"===_type_of(e.autocapture)&&"object"===_type_of(e.autocapture.networkTracking)?r=e.autocapture.networkTracking:e.networkTrackingOptions&&(r=e.networkTrackingOptions),t(t({},r),{captureRules:null===(n=null==r?void 0:r.captureRules)||void 0===n?void 0:n.map(function(n){var r,i,o;if((null===(r=n.urls)||void 0===r?void 0:r.length)&&(null===(i=n.hosts)||void 0===i?void 0:i.length)){var s=JSON.stringify(n.hosts),a=JSON.stringify(n.urls);return null===(o=e.loggerProvider)||void 0===o||o.warn("Found network capture rule with both urls='".concat(a,"' and hosts='").concat(s,"' set. ")+"Definition of urls takes precedence over hosts, so ignoring hosts."),t(t({},n),{hosts:void 0})}return n})})}},lw=function(e){var t,n=function(){return!1},r=void 0,i=e.pageCounter;return ew(e.defaultTracking)&&(n=void 0,t=void 0,e.defaultTracking&&"object"===_type_of(e.defaultTracking)&&e.defaultTracking.pageViews&&"object"===_type_of(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}},cw=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,s=r.resolve,a=e&&e[i];if("function"==typeof a){var u=a.apply(e,o);"function"==typeof s&&s(null==u?void 0:u.promise)}}return e},dw=function(e){return e&&void 0!==e._q};Gu(),uf();var fw="2.42.5",hw="amplitude-ts",pw=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat(hw,"/").concat(fw),"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 n,r;return Ft(this,void 0,void 0,function(){var i,o,s;return Bt(this,function(a){return i=(new Date).getTime(),o=null!==(n=this.config.lastEventId)&&void 0!==n?n:-1,s=null!==(r=e.event_id)&&void 0!==r?r:o+1,this.config.lastEventId=s,e.time||(this.config.lastEventTime=i),[2,t(t(t(t(t(t(t(t({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:i},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.language&&{language:Ue()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:$(),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:s,library:this.library,user_agent:this.userAgent})]})})},e}();Gu(),uf(),Gu(),uf();var vw=1e3,gw=function(e){function t(t){var n,r,i,o=this;try{i=null===(n=K())||void 0===n?void 0:n.localStorage}catch(e){null===(r=null==t?void 0:t.loggerProvider)||void 0===r||r.debug("Failed to access localStorage. error=".concat(JSON.stringify(e))),i=void 0}return(o=e.call(this,i)||this).loggerProvider=null==t?void 0:t.loggerProvider,o}return jt(t,e),t.prototype.set=function(t,n){var r;return Ft(this,void 0,void 0,function(){var i;return Bt(this,function(o){switch(o.label){case 0:return Array.isArray(n)&&n.length>vw?(i=n.length-vw,[4,e.prototype.set.call(this,t,n.slice(0,vw))]):[3,2];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(vw,".")),[3,4];case 2:return[4,e.prototype.set.call(this,t,n)];case 3:o.sent(),o.label=4;case 4:return[2]}})})},t}(et);Gu(),uf();var yw=function(e){function t(){var t;return e.call(this,null===(t=K())||void 0===t?void 0:t.sessionStorage)||this}return jt(t,e),t}(et);Gu(),uf();var mw=function(e){function n(t){void 0===t&&(t={});var n=e.call(this)||this;return n.state={done:4},n.customHeaders=t,n}return jt(n,e),n.prototype.send=function(e,n,r){return void 0===r&&(r=!1),Ft(this,void 0,void 0,function(){var i=this;return Bt(this,function(o){return[2,new Promise(function(o,s){"undefined"==typeof XMLHttpRequest&&s(new Error("XHRTransport is not supported."));var a=new XMLHttpRequest;a.open("POST",e,!0),a.onreadystatechange=function(){if(a.readyState===i.state.done){var e=a.responseText;try{o(i.buildResponse(JSON.parse(e)))}catch(e){o(i.buildResponse({code:a.status}))}}};var u={"Content-Type":"application/json",Accept:"*/*"},l=JSON.stringify(n),c=r&&l.length>=pt&&Jt(),d=function(e){var n,r;u=t(t({},i.customHeaders),u);try{for(var o=qt(Object.entries(u)),s=o.next();!s.done;s=o.next()){var l=zt(s.value,2),c=l[0],d=l[1];a.setRequestHeader(c,d)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}a.send(e)};Ft(i,void 0,void 0,function(){var e;return Bt(this,function(t){switch(t.label){case 0:return c?[4,$t(l)]:[3,2];case 1:return(e=t.sent())?(u["Content-Encoding"]="gzip",d(e)):d(l),[3,3];case 2:d(l),t.label=3;case 3:return[2]}})}).catch(s)})]})})},n}(ft);Gu(),uf();var bw=function(e){function n(t){void 0===t&&(t={});var n=e.call(this)||this;return n.customHeaders=t,n}return jt(n,e),n.prototype.send=function(e,n,r){return void 0===r&&(r=!1),Ft(this,void 0,void 0,function(){var i,o,s,a,u,l,c;return Bt(this,function(d){switch(d.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return i=JSON.stringify(n),o=r&&i.length>=pt&&Jt(),s=i,a={"Content-Type":"application/json",Accept:"*/*"},o?[4,$t(i)]:[3,2];case 1:(u=d.sent())&&(a["Content-Encoding"]="gzip",s=u),d.label=2;case 2:return a=t(t({},this.customHeaders),a),[4,fetch(e,{headers:a,body:s,method:"POST"})];case 3:return[4,(l=d.sent()).text()];case 4:c=d.sent();try{return[2,this.buildResponse(JSON.parse(c))]}catch(e){return[2,this.buildResponse({code:l.status})]}return[2]}})})},n}(ft);Gu(),uf();var ww=function(e){function t(){return e.call(this)||this}return jt(t,e),t.prototype.send=function(e,t,n){return void 0===n&&(n=!1),Ft(this,void 0,void 0,function(){var n=this;return Bt(this,function(r){return[2,new Promise(function(r,i){var o=K();if(!(null==o?void 0:o.navigator.sendBeacon))throw new Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(t);return r(o.navigator.sendBeacon(e,s)?n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}):n.buildResponse({code:500}))}catch(e){i(e)}})]})})},t}(ft);Gu(),uf();var _w=function(e,t,n){return void 0===n&&(n=!0),Ft(void 0,void 0,void 0,function(){var r,i,o,s,a,u,l,c,d;return Bt(this,function(f){switch(f.label){case 0:return r=je(e),[4,t.getRaw(r)];case 1:return(i=f.sent())?n?[4,t.remove(r)]:[3,3]:[2,{optOut:!1}];case 2:f.sent(),f.label=3;case 3:return o=zt(i.split("."),6),s=o[0],a=o[1],u=o[2],l=o[3],c=o[4],d=o[5],[2,{deviceId:s,userId:kw(a),sessionId:Sw(l),lastEventId:Sw(d),lastEventTime:Sw(c),optOut:Boolean(u)}]}})})},Sw=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},kw=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},xw="[Amplitude]",Ew=("".concat(xw," Page Viewed"),"".concat(xw," Form Started")),Cw="".concat(xw," Form Submitted"),Iw="".concat(xw," File Downloaded"),Ow="session_start",Tw="session_end",Aw="".concat(xw," File Extension"),Pw="".concat(xw," File Name"),Rw="".concat(xw," Link ID"),Mw="".concat(xw," Link Text"),Nw="".concat(xw," Link URL"),Lw="".concat(xw," Form ID"),Dw="".concat(xw," Form Name"),jw="".concat(xw," Form Destination"),Uw="cookie";Gu(),uf();var Fw={};Wu(Fw,{DEFAULT_ACTION_CLICK_ALLOWLIST:function(){return Ot},DEFAULT_CSS_SELECTOR_ALLOWLIST:function(){return Ct},DEFAULT_DATA_ATTRIBUTE_PREFIX:function(){return It},EXCLUDE_INTERNAL_REFERRERS_CONDITIONS:function(){return _c},IdentifyOperation:function(){return n},LogLevel:function(){return ae},OfflineDisabled:function(){return Et},RevenueProperty:function(){return oe},ServerZone:function(){return xt},SpecialEventType:function(){return r}}),uf();var Bw=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},qw=function(e,n,r,i,o,s){void 0===o&&(o=!0);e.referrer;var a,u=e.referring_domain,l=Ut(e,["referrer","referring_domain"]),c=n||{},d=(c.referrer,c.referring_domain),f=Ut(c,["referrer","referring_domain"]),h=r.excludeInternalReferrers;if(h){var p=Ww(h,i);if(!_instanceof(p,TypeError)&&e.referring_domain&&Kw(e.referring_domain,s)){if("always"===p)return pa(p,e.referring_domain,i),!1;if("ifEmptyCampaign"===p&&(a=t(t({},e),{referring_domain:void 0,referrer:void 0}),Object.values(a).every(function(e){return!e})))return pa(p,e.referring_domain,i),!1}}if(zw(r.excludeReferrers,e.referring_domain))return i.debug("This is not a new campaign because ".concat(e.referring_domain," is in the exclude referrer list.")),!1;if(!o&&function(e){return Object.values(e).every(function(e){return!e})}(e)&&n)return i.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var v=JSON.stringify(l)!==JSON.stringify(f),g=Bw(u||"")!==Bw(d||""),y=!n||v||g;return y?i.debug("This is a new campaign. An $identify event will be sent."):i.debug("This is not a new campaign because it's the same as the previous one."),y},zw=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=""),e.some(function(e){return _instanceof(e,RegExp)?e.test(t):e===t})},Ww=function(e,t){if(!0===e)return _c.always;if("object"===(void 0===e?"undefined":_type_of(e))){var n=e.condition;if("string"==typeof n&&Object.keys(_c).includes(n))return n;if(void 0===n)return _c.always}var r="Invalid configuration provided for attribution.excludeInternalReferrers: ".concat(JSON.stringify(e));return t.error(r),new TypeError(r)},Vw=["ac.in","ac.jp","ac.kr","ac.th","ac.uk","ac.za","appspot.com","asn.au","azurewebsites.net","cloudfront.net","myshopify.com","blogspot.com","co.ca","co.in","co.jp","co.kr","co.nz","co.th","co.uk","co.za","com.ar","com.au","com.br","com.cn","com.hk","com.in","com.jp","com.kr","com.mx","com.pl","com.sg","com.tr","com.tw","ed.jp","edu.au","edu.br","edu.cn","edu.hk","edu.sg","edu.th","edu.tr","edu.tw","firebaseapp.com","fly.dev","gc.ca","geek.nz","github.io","gitlab.io","go.jp","go.kr","go.th","gob.ar","gob.mx","gov.au","gov.br","gov.cn","gov.hk","gov.in","gov.pl","gov.sg","gov.tr","gov.tw","gov.uk","gov.za","govt.nz","gr.jp","herokuapp.com","id.au","idv.hk","iwi.nz","lg.jp","ltd.uk","maori.nz","me.uk","mil.kr","ne.jp","ne.kr","net.au","net.br","net.cn","net.hk","net.in","net.nz","net.pl","net.sg","net.tr","net.tw","net.za","onrender.com","or.jp","or.kr","or.th","org.ar","org.au","org.br","org.cn","org.hk","org.in","org.mx","org.nz","org.pl","org.sg","org.tw","org.uk","org.za","pages.dev","pe.kr","plc.uk","re.kr","res.in","sch.uk","vercel.app","netlify.app","workers.dev"],Hw=function(e){var t,n,r=e||(null===(n=null===(t=K())||void 0===t?void 0:t.location)||void 0===n?void 0:n.hostname);if(!r)return"";var i=r.split("."),o=i[i.length-1],s=i[i.length-2];return Vw.find(function(e){return r.endsWith(".".concat(e))})&&(o=i[i.length-2]+"."+i[i.length-1],s=i[i.length-3]),s?"".concat(s,".").concat(o):o},Kw=function(e,t){var n=K();if(!n)return!1;var r,i,o,s=(t||"").trim()||Hw(n.location.hostname);return r=e,o=(i=s).startsWith(".")?i:".".concat(i),!!(r.startsWith(".")?r:".".concat(r)).endsWith(o)},Gw=function(e){function t(t,n,r,i,o,s,a,u,l,c,d,f,h,p,v,g,y,m,b,w,_,S,k,x,E,C,I,O,T,A,P,R,M,N,L,D,j,U,F,B,q,z,W,V){void 0===r&&(r=new Ke),void 0===i&&(i={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===u&&(u=1e3),void 0===l&&(l=5),void 0===c&&(c=30),void 0===d&&(d=Uw),void 0===g&&(g=new le),void 0===y&&(y=ae.Warn),void 0===b&&(b=!1),void 0===w&&(w=!1),void 0===k&&(k=""),void 0===x&&(x="US"),void 0===I&&(I=18e5),void 0===O&&(O=new gw({loggerProvider:g})),void 0===T&&(T={ipAddress:!0,language:!0,platform:!0}),void 0===A&&(A="fetch"),void 0===P&&(P=!1),void 0===R&&(R=!0),void 0===U&&(U=!0),void 0===F&&(F=0),void 0===W&&(W=!1);var H,K=this;(K=e.call(this,{apiKey:t,storageProvider:O,transportProvider:Qw(A)})||this).apiKey=t,K.appVersion=n,K.cookieOptions=i,K.defaultTracking=o,K.autocapture=s,K.flushIntervalMillis=u,K.flushMaxRetries=l,K.flushQueueSize=c,K.identityStorage=d,K.ingestionMetadata=f,K.instanceName=h,K.loggerProvider=g,K.logLevel=y,K.minIdLength=m,K.offline=b,K.partnerId=_,K.plan=S,K.serverUrl=k,K.serverZone=x,K.sessionTimeout=I,K.storageProvider=O,K.trackingOptions=T,K.transport=A,K.useBatch=P,K.fetchRemoteConfig=R,K.networkTrackingOptions=D,K.identify=j,K.enableDiagnostics=U,K.diagnosticsSampleRate=F,K.diagnosticsClient=B,K.remoteConfig=q,K.topLevelDomain=z,K.enableRequestBodyCompression=W,K.customEnrichment=V,K.version=fw,K._optOut=!1,K._cookieStorage=r,K.deviceId=a,K.lastEventId=p,K.lastEventTime=v,K.optOut=w,K.deferredSessionId=C,K.sessionId=E,K.pageCounter=N,K.userId=M,K.debugLogsEnabled=L,K.loggerProvider.enable(L?ae.Debug:K.logLevel),K.networkTrackingOptions=D,K.identify=j,K.enableDiagnostics=U,K.diagnosticsSampleRate=F,K.diagnosticsClient=B;var G=null!==(H=null==q?void 0:q.fetchRemoteConfig)&&void 0!==H?H:R;return K.remoteConfig=K.remoteConfig||{},K.remoteConfig.fetchRemoteConfig=G,K.fetchRemoteConfig=G,K.topLevelDomain=z||Hw(),K}return jt(t,e),Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(e){this._deviceId!==e&&(this._deviceId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(e){this._userId!==e&&(this._userId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(e){this._sessionId!==e&&(this._sessionId=e,void 0!==e&&void 0!==this._deferredSessionId&&(this._deferredSessionId=void 0),this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deferredSessionId",{get:function(){return this._deferredSessionId},set:function(e){this._deferredSessionId!==e&&e!==this.sessionId&&(this._deferredSessionId=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,deferredSessionId:this._deferredSessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled,cookieDomain:void 0};_instanceof(this.cookieStorage,Je)&&(e.cookieDomain=this.cookieStorage.options.domain),this.cookieStorage.set(De(this.apiKey),e)},t}(de),Jw=function(e,n,r,i,o){return void 0===n&&(n={}),Ft(void 0,void 0,void 0,function(){var s,a,u,l,c,d,f,h,p,v,g,y,m,b,w,_,S,k,x,E,C,I,O,T,A,P,R,M,N,L,D,j,U,F,B,q,z,W,V,H,K,G,J,Q,X,Y,Z,ee,te,ne,re;return Bt(this,function(ie){switch(ie.label){case 0:return s=n.identityStorage||Uw,a="",s!==Uw||(null===(I=n.cookieOptions)||void 0===I?void 0:I.domain)||""===(null===(O=n.cookieOptions)||void 0===O?void 0:O.domain)?[3,2]:[4,Xw(void 0,i)];case 1:a=ie.sent(),ie.label=2;case 2:return u=t({domain:null!==(A=null===(T=n.cookieOptions)||void 0===T?void 0:T.domain)&&void 0!==A?A:a,expiration:365,sameSite:"Lax",secure:!1,upgrade:!0},n.cookieOptions),l={duplicateResolverFn:function(e){var t=Xe(e);if(!t)return!1;var n=JSON.parse(t);return Ye(n.cookieDomain,u.domain)},diagnosticsClient:i},c=$w(n.identityStorage,u,l),[4,_w(e,c,null===(R=null===(P=n.cookieOptions)||void 0===P?void 0:P.upgrade)||void 0===R||R)];case 3:return d=ie.sent(),[4,c.get(De(e))];case 4:return f=ie.sent(),h=Fe(),p=h.ampTimestamp?Number(h.ampTimestamp):void 0,v=!p||Date.now()<p,g=null!==(j=null!==(D=null!==(L=null!==(M=n.deviceId)&&void 0!==M?M:v?null!==(N=h.ampDeviceId)&&void 0!==N?N:h.deviceId:void 0)&&void 0!==L?L:null==f?void 0:f.deviceId)&&void 0!==D?D:d.deviceId)&&void 0!==j?j:$(),y=null!==(U=null==f?void 0:f.lastEventId)&&void 0!==U?U:d.lastEventId,m=null!==(F=null==f?void 0:f.lastEventTime)&&void 0!==F?F:d.lastEventTime,b=null!==(q=null!==(B=n.optOut)&&void 0!==B?B:null==f?void 0:f.optOut)&&void 0!==q?q:d.optOut,w=null!==(z=null==f?void 0:f.sessionId)&&void 0!==z?z:d.sessionId,_=null==f?void 0:f.deferredSessionId,S=null!==(V=null!==(W=n.userId)&&void 0!==W?W:null==f?void 0:f.userId)&&void 0!==V?V:d.userId,r.previousSessionDeviceId=null!==(H=null==f?void 0:f.deviceId)&&void 0!==H?H:d.deviceId,r.previousSessionUserId=null!==(K=null==f?void 0:f.userId)&&void 0!==K?K:d.userId,k={ipAddress:null===(J=null===(G=n.trackingOptions)||void 0===G?void 0:G.ipAddress)||void 0===J||J,language:null===(X=null===(Q=n.trackingOptions)||void 0===Q?void 0:Q.language)||void 0===X||X,platform:null===(Z=null===(Y=n.trackingOptions)||void 0===Y?void 0:Y.platform)||void 0===Z||Z},x=null==f?void 0:f.pageCounter,E=null==f?void 0:f.debugLogsEnabled,void 0!==n.autocapture&&(n.defaultTracking=n.autocapture),[4,(C=new Gw(e,n.appVersion,c,u,n.defaultTracking,n.autocapture,g,n.flushIntervalMillis,n.flushMaxRetries,n.flushQueueSize,s,n.ingestionMetadata,n.instanceName,y,m,null!==(ee=null==o?void 0:o.loggerProvider)&&void 0!==ee?ee:n.loggerProvider,n.logLevel,n.minIdLength,n.offline,b,n.partnerId,n.plan,n.serverUrl,null!==(te=null==o?void 0:o.serverZone)&&void 0!==te?te:n.serverZone,w,_,n.sessionTimeout,n.storageProvider,k,n.transport,n.useBatch,n.fetchRemoteConfig,S,x,E,n.networkTrackingOptions,n.identify,null!==(ne=null==o?void 0:o.enableDiagnostics)&&void 0!==ne?ne:n.enableDiagnostics,null!==(re=null==o?void 0:o.diagnosticsSampleRate)&&void 0!==re?re:r._diagnosticsSampleRate,i,n.remoteConfig,a,n.enableRequestBodyCompression,n.customEnrichment)).storageProvider.isEnabled()];case 5:return ie.sent()||(C.loggerProvider.warn("Storage provider ".concat(C.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),C.storageProvider=new Ke),[2,C]}})})},$w=function(e,n,r){switch(void 0===e&&(e=Uw),void 0===n&&(n={}),e){case"localStorage":return new gw;case"sessionStorage":return new yw;case"none":return new Ke;default:return new Je(t(t({},n),{expirationDays:n.expiration}),r)}},Qw=function(e){var t="object"===(void 0===e?"undefined":_type_of(e))?e.type:e,n="object"===(void 0===e?"undefined":_type_of(e))?e.headers:void 0;return"xhr"===t?new mw(n):"beacon"===t?new ww:new bw(n)},Xw=function(e,t){return Ft(void 0,void 0,void 0,function(){var n,r,i,o,s,a,u;return Bt(this,function(l){switch(l.label){case 0:return[4,new Je(void 0,{diagnosticsClient:t}).isEnabled()];case 1:if(!l.sent()||!e&&("undefined"==typeof location||!location.hostname))return[2,""];if(n=null!=e?e:location.hostname,1===(r=n.split(".")).length)return[2,""];for(i=[],o=1,Vw.find(function(e){return n.endsWith(".".concat(e))})&&(o=2),s=r.length-o-1;s>=0;--s)i.push(r.slice(s).join("."));s=0,l.label=2;case 2:if(!(s<i.length))return[3,7];a=i[s],l.label=3;case 3:return l.trys.push([3,5,,6]),[4,Je.isDomainWritable(a)];case 4:return l.sent()?[2,"."+a]:[3,6];case 5:return u=l.sent(),t&&t.recordEvent("cookies.tld.failure",{reason:"Unexpected exception checking domain is writable: ".concat(a),error:_instanceof(u,Error)?u.message:String(u)}),[3,6];case 6:return s++,[3,2];case 7:return t&&t.recordEvent("cookies.tld.failure",{reason:"Could not determine TLD for host ".concat(n)}),[2,""]}})})};Gu(),uf();var Yw="AMP_PAGE_VIEW",Zw=function(e){var n;void 0===e&&(e={});var r,i,o=K(),s=void 0,a=!1,u=e.trackOn,l=e.trackHistoryChanges,c=e.eventType,d=void 0===c?"[Amplitude] Page Viewed":c,f=function(e){var t=e;try{t=decodeURI(e)}catch(e){null==s||s.error("Malformed URI sequence: ",e)}return t},h=function(e){return Ft(void 0,void 0,void 0,function(){var n,r,i;return Bt(this,function(o){switch(o.label){case 0:return n=f("undefined"!=typeof location&&location.href||""),i={event_type:d},r=[{}],[4,e_()];case 1:return[2,(i.event_properties=t.apply(void 0,[t.apply(void 0,r.concat([o.sent()])),{"[Amplitude] Page Domain":"undefined"!=typeof location&&location.hostname||"","[Amplitude] Page Location":n,"[Amplitude] Page Path":"undefined"!=typeof location&&f(location.pathname)||"","[Amplitude] Page Title":uc(ac),"[Amplitude] Page URL":n.split("?")[0],"[Amplitude] Page View ID":e}]),i)]}})})},p=function(){return void 0===u||"function"==typeof u&&u()},v="undefined"!=typeof location?location.href:null,g=function(){Ft(void 0,void 0,void 0,function(){var e,t,r,o,a;return Bt(this,function(u){switch(u.label){case 0:return e=location.href,t=n_(l,e,v||"")&&p(),v=e,t?(r=void 0,i&&(r=$(),i.set(Yw,{pageViewId:r})),null==s||s.log("Tracking page view event"),null!=n?[3,1]:[3,3]):[3,4];case 1:return a=(o=n).track,[4,h(r)];case 2:a.apply(o,[u.sent()]),u.label=3;case 3:u.label=4;case 4:return[2]}})})};return{name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(e,t){return Ft(void 0,void 0,void 0,function(){var u,l,c;return Bt(this,function(d){switch(d.label){case 0:if(n=t,r=e,(s=e.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),a=!0,o){try{i=new et(o.sessionStorage)}catch(e){null==s||s.debug("sessionStorage is not available in this environment.")}o.addEventListener("popstate",g),o.history.pushState=new Proxy(o.history.pushState,{apply:function(e,t,n){var r=zt(n,3),i=r[0],o=r[1],s=r[2];e.apply(t,[i,o,s]),a&&g()}})}return p()?(s.log("Tracking page view event"),u=void 0,i&&(u=$(),i.set(Yw,{pageViewId:u})),c=(l=n).track,[4,h(u)]):[3,2];case 1:c.apply(l,[d.sent()]),d.label=2;case 2:return[2]}})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){var n,o,a;return Bt(this,function(l){switch(l.label){case 0:return"attribution"===u&&t_(e)?(null==s||s.log("Enriching campaign event to page view event with campaign parameters"),n=void 0,i?[4,i.get(Yw)]:[3,2]):[3,4];case 1:o=l.sent(),n=null==o?void 0:o.pageViewId,l.label=2;case 2:return[4,h(n)];case 3:a=l.sent(),e.event_type=a.event_type,e.event_properties=t(t({},e.event_properties),a.event_properties),l.label=4;case 4:return r&&e.event_type===d&&(r.pageCounter=r.pageCounter?r.pageCounter+1:1,e.event_properties=t(t({},e.event_properties),{"[Amplitude] Page Counter":r.pageCounter})),[2,e]}})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(e){return o&&(o.removeEventListener("popstate",g),a=!1),[2]})})}}},e_=function(){return Ft(void 0,void 0,void 0,function(){var e;return Bt(this,function(t){switch(t.label){case 0:return e=He,[4,(new tc).parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},t_=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,r=t[n.SET]||{},i=t[n.UNSET]||{},o=Wt(Wt([],zt(Object.keys(r)),!1),zt(Object.keys(i)),!1);return Object.keys(T).every(function(e){return o.includes(e)})}return!1},n_=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};Gu(),uf();var r_=function(){var e,t,n=[],r=function(e,t,r){e.addEventListener(t,r),n.push({element:e,type:t,handler:r})};return{name:"@amplitude/plugin-form-interaction-tracking-browser",type:"enrichment",setup:function(n,i){return Ft(void 0,void 0,void 0,function(){var o,s;return Bt(this,function(a){return t=function(e){if(Zb(e.defaultTracking)&&e.defaultTracking&&"object"===_type_of(e.defaultTracking)&&"object"===_type_of(e.defaultTracking.formInteractions))return e.defaultTracking.formInteractions}(n),o=function(){if(i){if("undefined"!=typeof document){var o=new WeakSet,s=function(e){if(!o.has(e)){o.add(e);var s=!1;r(e,"change",function(){var t,n=o_(e);s||i.track(Ew,((t={})[Lw]=i_(e.id),t[Dw]=i_(e.name),t[jw]=n,t)),s=!0}),r(e,"submit",function(r){var o,a,u=o_(e);if(s||i.track(Ew,((o={})[Lw]=i_(e.id),o[Dw]=i_(e.name),o[jw]=u,o)),s=!0,void 0!==(null==t?void 0:t.shouldTrackSubmit))if("function"==typeof t.shouldTrackSubmit&&"undefined"!=typeof SubmitEvent&&_instanceof(r,SubmitEvent))try{if(!t.shouldTrackSubmit(r))return}catch(e){n.loggerProvider.warn("shouldTrackSubmit callback threw an error, proceeding with tracking.")}else n.loggerProvider.warn("shouldTrackSubmit is ignored because it is not a function or event is not a SubmitEvent.");i.track(Cw,((a={})[Lw]=i_(e.id),a[Dw]=i_(e.name),a[jw]=u,a)),s=!1})}};Array.from(document.getElementsByTagName("form")).forEach(s),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"FORM"===e.nodeName&&s(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("form")).map(s)})})})).observe(document.body,{subtree:!0,childList:!0})}}else n.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.")},"complete"===document.readyState?o():(s=K())?s.addEventListener("load",o):n.loggerProvider.debug("Form interaction tracking is not installed because global is undefined."),[2]})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){return[2,e]})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){return null==e||e.disconnect(),n.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),n=[],[2]})})}}},i_=function(e){if("string"==typeof e)return e},o_=function(e){var t=e.getAttribute("action");try{t=new URL(encodeURI(null!=t?t:""),window.location.href).href}catch(e){}return t};Gu(),uf();var s_=function(){var e,t=[];return{name:"@amplitude/plugin-file-download-tracking-browser",type:"enrichment",setup:function(n,r){return Ft(void 0,void 0,void 0,function(){var i,o;return Bt(this,function(s){return i=function(){if(r){if("undefined"!=typeof document){var i=function(e){var n;try{n=new URL(e.href,window.location.href)}catch(e){return}var i,s,a,u=o.exec(n.href),l=null==u?void 0:u[1];l&&(s="click",a=function(){var t;l&&r.track(Iw,((t={})[Aw]=l,t[Pw]=n.pathname,t[Rw]=e.id,t[Mw]=e.text,t[Nw]=e.href,t))},(i=e).addEventListener(s,a),t.push({element:i,type:s,handler:a}))},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.forEach(function(e){"A"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("a")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}}else n.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.")},"complete"===document.readyState?i():(o=K())?o.addEventListener("load",i):n.loggerProvider.debug("File download tracking is not installed because global is undefined."),[2]})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){return[2,e]})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(n){return null==e||e.disconnect(),t.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),t=[],[2]})})}}},a_=!1;Gu(),uf();var u_=function(){var e=K(),t=[],n=function(n,r){(null==e?void 0:e.addEventListener)&&(null==e||e.addEventListener(n,r),t.push({type:n,handler:r}))};return{name:"@amplitude/plugin-network-checker-browser",type:"before",setup:function(e,t){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(r){return"undefined"==typeof navigator?(e.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),e.offline=!1,[2]):(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 Ft(void 0,void 0,void 0,function(){return Bt(this,function(n){return t.forEach(function(t){var n=t.type,r=t.handler;null==e||e.removeEventListener(n,r)}),t=[],[2]})})}}};function l_(e){var t,n,r,i,o,s,a,u,l,c,d,f;if("object"===(void 0===e?"undefined":_type_of(e))&&null!==e&&!Array.isArray(e)){var h=Object.keys(e);try{for(var p=qt(h),v=p.next();!v.done;v=p.next()){var g=v.value;try{var y=e[g];"boolean"==typeof(null==y?void 0:y.enabled)&&(y.enabled?(delete y.enabled,0===Object.keys(y).length&&(e[g]=!0)):e[g]=!1),l_(y)}catch(e){}}}catch(e){t={error:e}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}try{if(null===(l=null===(u=null===(a=e.autocapture)||void 0===a?void 0:a.networkTracking)||void 0===u?void 0:u.captureRules)||void 0===l?void 0:l.length)try{for(var m=qt(e.autocapture.networkTracking.captureRules),b=m.next();!b.done;b=m.next()){var w=b.value;try{for(var _=(o=void 0,qt(["responseHeaders","requestHeaders"])),S=_.next();!S.done;S=_.next()){var k=S.value,x=null!==(c=w[k])&&void 0!==c?c:{},E=x.captureSafeHeaders,C=x.allowlist;(E||C)&&(void 0===C||Array.isArray(C)?w[k]=Wt(Wt([],zt(E?A:[]),!1),zt(null!=C?C:[]),!1):delete w[k])}}catch(e){o={error:e}}finally{try{S&&!S.done&&(s=_.return)&&s.call(_)}finally{if(o)throw o.error}}}}catch(e){r={error:e}}finally{try{b&&!b.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}}catch(e){}var I=null===(d=e.autocapture)||void 0===d?void 0:d.frustrationInteractions;I&&(I.rageClick&&(I.rageClicks=I.rageClick,delete I.rageClick),I.deadClick&&(I.deadClicks=I.deadClick,delete I.deadClick));try{var O=null===(f=e.autocapture)||void 0===f?void 0:f.elementInteractions;if(O&&"object"===(void 0===O?"undefined":_type_of(O))&&(!0===O.viewportContentUpdated&&(O.viewportContentUpdated={}),!1===O.viewportContentUpdated&&(O.viewportContentUpdated={enabled:!1}),void 0!==O.exposureDuration)){var T=O.viewportContentUpdated;void 0===T?O.viewportContentUpdated={exposureDuration:O.exposureDuration}:"object"===(void 0===T?"undefined":_type_of(T))&&void 0===T.exposureDuration&&!1!==T.enabled&&(T.exposureDuration=O.exposureDuration),delete O.exposureDuration}}catch(e){}}}Gu(),uf(),Gu(),uf();var c_="1.27.2";uf();var d_="[Amplitude] Element Clicked",f_="[Amplitude] Dead Click",h_="[Amplitude] Rage Click",p_="[Amplitude] Error Click",v_="[Amplitude] Element Changed",g_="[Amplitude] Main Thread Block",y_="[Amplitude] Element Tag",m_="[Amplitude] Element Text",b_="[Amplitude] Page URL",w_="[Amplitude] Viewport Height",__="[Amplitude] Viewport Width",S_="[Amplitude] Max Page X",k_="[Amplitude] Max Page Y",x_="[Amplitude] Page View ID",E_="https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz",C_="amp-visual-tagging-selector-highlight",I_="data-amp-mask-attributes",O_=128,T_=18e3;Gu(),uf();var A_,P_,R_=["input","select","textarea"],M_=function(e,t){var n,r=null===(n=null===window||void 0===window?void 0:window.getComputedStyle)||void 0===n?void 0:n.call(window,e);return"pointer"===(null==r?void 0:r.getPropertyValue("cursor"))&&"click"===t},N_=function(e){var t=e.pageUrlAllowlist,n=e.pageUrlExcludelist;return!(n&&n.length>0&&qe(window.location.href,n))&&!!qe(window.location.href,t)},L_=function(e,t,n){return void 0===n&&(n=!1),function(r,i){var o,s,a=e.shouldTrackEventResolver,u=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(!u)return!1;if(a)return a(r,i);if(!N_(e))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 c=M_(i,r);if(n&&c)return!0;if(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(u){case"input":case"select":case"textarea":return"change"===r||"click"===r;default:return!!c||"click"===r}}},D_=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=!!_instanceof(e,HTMLElement)&&"true"===(null===(r=e.getAttribute("contenteditable"))||void 0===r?void 0:r.toLowerCase());return!R_.includes(i)&&!o},j_=function(e){return e?e.split(",").map(function(e){return e.trim()}).filter(function(e){return e.length>0&&"id"!==e&&"class"!==e}):[]},U_=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return function(e){return null==e||"object"===(void 0===e?"undefined":_type_of(e))&&0===Object.keys(e).length||"string"==typeof e&&0===e.trim().length}(r)||(t[n]=r),t},{})},F_=function(){var e;try{var t=K(),n=null===(e=null==t?void 0:t.sessionStorage)||void 0===e?void 0:e.getItem("AMP_PAGE_VIEW");if(!n)return;var r=JSON.parse(n);if("string"==typeof r.pageViewId)return r.pageViewId}catch(e){}},B_=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:B_(null==e?void 0:e.parentElement,t):null},q_=function(e){return!(null===e.event.target||!e.closestTrackedAncestor)};(P_=A_||(A_={}))[P_.LEFT_OR_TOUCH_CONTACT=0]="LEFT_OR_TOUCH_CONTACT",P_[P_.MIDDLE=1]="MIDDLE",P_[P_.RIGHT=2]="RIGHT";var z_="__AMPLITUDE_VISUAL_TAGGING__";uf(),uf(),Gu(),uf();var W_=K(),V_=function(){return new lc.default(function(e){var t=new MutationObserver(function(t){e.next(t)});return document.body&&t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}})},H_=function(e){return void 0===e&&(e="click"),new lc.default(function(t){var n,r=function(e){t.next(e)};return null===(n=K())||void 0===n||n.document.addEventListener(e,r,{capture:!0}),function(){var t;null===(t=K())||void 0===t||t.document.removeEventListener(e,r,{capture:!0})}})},K_=function(){var e=un(new lc.default(function(e){var n=function(n){if(_instanceof(n,ErrorEvent)){var r={kind:"error"};_instanceof(n.error,Error)||_instanceof(n.error,DOMException)?r=t(t({},r),{message:n.error.message,stack:n.error.stack,filename:n.filename,lineNumber:n.lineno,columnNumber:n.colno}):"string"==typeof n.error&&(r.message=n.error),e.next(r)}};return W_.addEventListener("error",n),function(){W_.removeEventListener("error",n)}}),new lc.default(function(e){var t=function(t){var n={kind:"unhandledrejection"};_instanceof(t.reason,Error)||_instanceof(t.reason,DOMException)?(n.message=t.reason.message,n.stack=t.reason.stack):"string"==typeof t.reason&&(n.message=t.reason),e.next(n)};return W_.addEventListener("unhandledrejection",t),function(){W_.removeEventListener("unhandledrejection",t)}}));return un(e,new lc.default(function(e){var t=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=void 0;Array.isArray(n[0])&&"string"==typeof n[0][0]&&(i=n[0][0]),e.next({kind:"console",message:i})};return kt.addListener("error",t),function(){kt.removeListener(t)}}))};Gu();var G_=function(e,t,n){e.forEach(function(e){if("string"!=typeof e&&"ATTACH_EVENT_PROPERTY"===e.actionType){var r=n.extractDataFromDataSource(e.dataSource,t.closestTrackedAncestor);t.targetElementProperties[e.destinationKey]=r}})},J_={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},$_=function(e){var t,n,r,i,o=Object.values(J_).reduce(function(e,t){return e[t]=new Set,e},{});if(!e)return o;try{for(var s=qt(e),a=s.next();!a.done;a=s.next()){var u=a.value;try{try{for(var l=(r=void 0,qt(u.definition)),c=l.next();!c.done;c=l.next()){var d=c.value,f=J_[d.event_type];f&&o[f].add(u.id)}}catch(e){r={error:e}}finally{try{c&&!c.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==u?void 0:u.id,e)}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return o},Q_=function(e){var t,n,r,i,o=new Map;try{for(var s=qt(e),a=s.next();!a.done;a=s.next()){var u=a.value;try{for(var l=(r=void 0,qt(u.conditions)),c=l.next();!c.done;c=l.next()){var d=c.value;if("LABELED_EVENT"===d.type){var f=d.match.eventId,h=o.get(f);h||(h=[],o.set(f,h)),h.push(u)}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return o},X_=function(e,t){return t.filter(function(t){return t.definition.some(function(t){return J_[t.event_type]===e.type&&t.filters.every(function(t){return function(e,t){try{if("[Amplitude] Element Text"===t.subprop_key)return"is"===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){return console.error("Error matching event to filter",e),!1}return!1}(e,t)})})})},Y_=function(){function e(e,t,n,r){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.dataExtractor=n,this.options=r}return e.prototype.evaluate=function(e){var t,n,r=this.options.pageActions;if(!r)return e;var i=function(e,t){var n,r,i,o,s=new Set;try{for(var a=qt(e),u=a.next();!u.done;u=a.next()){var l=u.value,c=t.get(l.id);if(c)try{for(var d=(i=void 0,qt(c)),f=d.next();!f.done;f=d.next()){var h=f.value;s.add(h)}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return Array.from(s)}(X_(e,Array.from(this.groupedLabeledEvents[e.type]).map(function(e){return r.labeledEvents[e]})),this.labeledEventToTriggerMap);try{for(var o=qt(i),s=o.next();!s.done;s=o.next()){var a=s.value;G_(a.actions,e,this.dataExtractor)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return e},e.prototype.update=function(e,t,n){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.options=n},e}();Gu(),uf(),Gu(),uf();var Z_=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",I_,nc]),eS=["type"],tS=["svg","path","g"],nS=["password","hidden"];Gu();var rS,iS,oS=function(){function e(e,t){this.value=e,this.optimized=t}return e.prototype.toString=function(){return this.value},e}(),sS=function(e,t,n){var r,i;if(e.nodeType!==Node.ELEMENT_NODE)return null;var o=e.getAttribute("id");if(t){if(o)return new oS(c(o),!0);var s=e.tagName.toLowerCase();if("body"===s||"head"===s||"html"===s)return new oS(s,!0)}var a=e.tagName.toLowerCase();if(o)return new oS(a+c(o),!0);var u=e.parentNode;if(!u||u.nodeType===Node.DOCUMENT_NODE)return new oS(a,!0);function l(e){var t=e.getAttribute("class");return t?t.split(/\s+/g).filter(Boolean).map(function(e){return"$"+e}):[]}function c(e){return"#"+CSS.escape(e)}for(var d=l(e),f=!1,h=!1,p=-1,v=-1,g=u.children,y=0;g&&(-1===p||!h)&&y<g.length;++y){var m=g[y];if(m.nodeType===Node.ELEMENT_NODE)if(v+=1,m!==e){if(!h&&m.tagName.toLowerCase()===a){f=!0;var b=new Set(d);if(b.size)for(var w=l(m),_=0;_<w.length;++_){var S=w[_];if(b.has(S)&&(b.delete(S),!b.size)){h=!0;break}}else h=!0}}else p=v}var k=a;if(n&&"input"===a.toLowerCase()&&e.getAttribute("type")&&!e.getAttribute("id")&&!e.getAttribute("class")&&(k+="[type="+CSS.escape(e.getAttribute("type")||"")+"]"),h)k+=":nth-child("+String(p+1)+")";else if(f)try{for(var x=qt(d),E=x.next();!E.done;E=x.next()){var C=E.value;k+="."+CSS.escape(C.slice(1))}}catch(e){r={error:e}}finally{try{E&&!E.done&&(i=x.return)&&i.call(x)}finally{if(r)throw r.error}}return new oS(k,!1)},aS=function(e,t){var n,r,i,o=this;this.replaceSensitiveString=function(e){return ac(e,o.additionalMaskTextPatterns)},this.getHierarchy=function(e){var t,n,r,i,s,a=performance.now();if(!e)return[];for(var u=function(e){var t=[];if(!e)return t;t.push(e);for(var n=e.parentElement;n&&"HTML"!==n.tagName;)t.push(n),n=n.parentElement;return t}(e),l=new Map,c=u.length-1;c>=0;c--){var d=u[c];if(d){var f=j_(d.getAttribute(I_)),h=c===u.length-1?[]:null!==(r=l.get(u[c+1]))&&void 0!==r?r:new Set,p=new Set(Wt(Wt([],zt(h),!1),zt(f),!1));l.set(d,p)}}s=u.map(function(e){var t;return function(e,t){var n,r,i,o,s,a;if(null===e)return null;var u=String(e.tagName).toLowerCase(),l={tag:u},c=Array.from(null!==(o=null===(i=e.parentElement)||void 0===i?void 0:i.children)&&void 0!==o?o:[]);c.length&&(l.index=c.indexOf(e),l.indexOfType=c.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var d=null===(a=null===(s=e.previousElementSibling)||void 0===s?void 0:s.tagName)||void 0===a?void 0:a.toLowerCase();d&&(l.prevSib=String(d));var f=e.getAttribute("id");f&&(l.id=String(f));var h=Array.from(e.classList);h.length&&(l.classes=h);var p={},v=Array.from(e.attributes).filter(function(e){return!Z_.has(e.name)}),g=!D_(e);if(!nS.includes(String(e.getAttribute("type")))&&!tS.includes(u))try{for(var y=qt(v),m=y.next();!m.done;m=y.next()){var b=m.value;g&&!eS.includes(b.name)||(t.has(b.name)?p[b.name]=rc:p[b.name]=String(b.value).substring(0,O_))}}catch(e){n={error:e}}finally{try{m&&!m.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}return Object.keys(p).length&&(l.attrs=p),l}(e,null!==(t=l.get(e))&&void 0!==t?t:new Set)});var v=function(e){(null==e?void 0:e.attrs)&&Object.entries(e.attrs).forEach(function(t){var n=zt(t,2),r=n[0],i=n[1];e.attrs&&(e.attrs[r]=o.replaceSensitiveString(i))})};try{for(var g=qt(s),y=g.next();!y.done;y=g.next())v(y.value)}catch(e){t={error:e}}finally{try{y&&!y.done&&(n=g.return)&&n.call(g)}finally{if(t)throw t.error}}var m=performance.now();return null===(i=o.diagnosticsClient)||void 0===i||i.recordHistogram("autocapturePlugin.getHierarchy",m-a),s},this.getNearestLabel=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}return t?o.getText(t):o.getNearestLabel(n)},this.getElementPath=function(e){var t;if(!e)return"";var n=performance.now(),r=function(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return"";for(var n=[],r=e;r;){var i=sS(r,Boolean(t),r===e);if(!i)break;if(n.push(i),i.optimized)break;r=r.parentElement}return n.reverse(),n.join(" > ")}(e),i=performance.now();return null===(t=o.diagnosticsClient)||void 0===t||t.recordHistogram("autocapturePlugin.getElementPath",i-n),r},this.getEventProperties=function(e,t,n){var r,i,s,a,u,l,c=null===(s=null===(i=null==t?void 0:t.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===s?void 0:s.call(i),d="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},f=o.getHierarchy(t),h=null===(a=f[0])||void 0===a?void 0:a.attrs,p=o.getNearestLabel(t),v=(u=null!=h?h:{},l=n,Object.entries(u).reduce(function(e,t){var n=zt(t,2),r=n[0],i=n[1];if(r.startsWith(l)){var o=r.replace(l,"");o&&(e[o]=i||"")}return e},{})),g=((r={})["[Amplitude] Element Hierarchy"]=f,r[y_]=c,r[m_]=o.getText(t),r["[Amplitude] Element Position Left"]=null==d.left?null:Math.round(d.left),r["[Amplitude] Element Position Top"]=null==d.top?null:Math.round(d.top),r["[Amplitude] Element Attributes"]=v,r["[Amplitude] Element Path"]=o.getElementPath(t),r["[Amplitude] Element Parent Label"]=p,r[b_]=ze(window.location.href.split("?")[0]),r["[Amplitude] Page Title"]=uc(o.replaceSensitiveString),r[w_]=window.innerHeight,r[__]=window.innerWidth,r),y=F_();if(y&&(g[x_]=y),g["[Amplitude] Element ID"]=t.getAttribute("id")||"",g["[Amplitude] Element Class"]=t.getAttribute("class"),g["[Amplitude] Element Aria Label"]=null==h?void 0:h["aria-label"],"a"===c&&"click"===e&&_instanceof(t,HTMLAnchorElement)){var m=t.href.substring(0,O_);g["[Amplitude] Element Href"]=o.replaceSensitiveString(m)}return U_(g)},this.addTypeAndTimestamp=function(e,t){return{event:e,timestamp:Date.now(),type:t}},this.addAdditionalEventProperties=function(e,t,n,r,i){void 0===i&&(i=!1);var s=o.addTypeAndTimestamp(e,t);if(function(e){return"click"===e.type||"change"===e.type}(s)&&null!==s.event.target){if(i&&M_(s.event.target,s.type))return s.closestTrackedAncestor=s.event.target,s.targetElementProperties=o.getEventProperties(s.type,s.closestTrackedAncestor,r),s;var a=B_(s.event.target,n);return a&&(s.closestTrackedAncestor=a,s.targetElementProperties=o.getEventProperties(s.type,a,r)),s}return s},this.extractDataFromDataSource=function(e,t){if("DOM_ELEMENT"===e.sourceType){var n=function(e,t){try{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}}catch(e){return}}(e,t);if(!n)return;return"TEXT"===e.elementExtractType?o.getText(n):"ATTRIBUTE"===e.elementExtractType&&e.attribute?n.getAttribute(e.attribute):void 0}},this.getTextWithMaskedDescendants=function(e){var t,n,r="[".concat(nc,"], [contenteditable]");if(!e.querySelector(r))return e.innerText;var i="",s=Array.from(e.childNodes);try{for(var a=qt(s),u=a.next();!u.done;u=a.next()){var l=u.value;l.nodeType!==Node.TEXT_NODE?_instanceof(l,Element)&&(l.hasAttribute(nc)||l.hasAttribute("contenteditable")?i+=rc:i+=o.getTextWithMaskedDescendants(l)):i+=l.textContent||""}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return i},this.getText=function(e){if(null!==e.closest("[".concat(nc,"]")))return rc;var t="";return t=e.querySelector("[".concat(nc,"], [contenteditable]"))?o.getTextWithMaskedDescendants(e):e.innerText||"",o.replaceSensitiveString(t.substring(0,255)).replace(/\s+/g," ").trim()},this.getEventTagProps=function(e){var t,n,r;if(!e)return{};var 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),s=((t={})[y_]=i,t[m_]=o.getText(e),t[b_]=window.location.href.split("?")[0],t);return U_(s)},this.diagnosticsClient=null==t?void 0:t.diagnosticsClient;var s=null!==(i=e.maskTextRegex)&&void 0!==i?i:[],a=[];try{for(var u=qt(s),l=u.next();!l.done;l=u.next()){var c=l.value;if(a.length>=25)break;if(_instanceof(c,RegExp))a.push(c);else if("pattern"in c&&"string"==typeof c.pattern)try{a.push(new RegExp(c.pattern,"i"))}catch(e){}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}this.additionalMaskTextPatterns=a};uf(),uf(),uf(),(iS=rS||(rS={})).ClickObservable="clickObservable",iS.ChangeObservable="changeObservable",iS.NavigateObservable="navigateObservable",iS.MutationObservable="mutationObservable",iS.ScrollObservable="scrollObservable",iS.ExposureObservable="exposureObservable",iS.BrowserErrorObservable="browserErrorObservable",iS.SelectionObservable="selectionObservable",iS.MouseMoveObservable="mouseMoveObservable";var uS=function(e,n){var r,i,o,s,a,u,l,c,d,f,h,p;void 0===e&&(e={}),null==n||n.diagnosticsClient.setTag("plugin.autocapture.version",c_);var v=e.dataAttributePrefix,g=void 0===v?It:v,y=e.visualTaggingOptions,m=void 0===y?{enabled:!0}:y;e.cssSelectorAllowlist=null!==(r=e.cssSelectorAllowlist)&&void 0!==r?r:Ct,e.actionClickAllowlist=null!==(i=e.actionClickAllowlist)&&void 0!==i?i:Ot,e.debounceTime=null!==(o=e.debounceTime)&&void 0!==o?o:0;var b=!1!==(null===(s=e.viewportContentUpdated)||void 0===s?void 0:s.enabled),w=null!==(l=null!==(u=null===(a=e.viewportContentUpdated)||void 0===a?void 0:a.exposureDuration)&&void 0!==u?u:e.exposureDuration)&&void 0!==l?l:Tt;e.viewportContentUpdated=t(t({},e.viewportContentUpdated),{exposureDuration:w}),e.pageUrlExcludelist=null===(c=e.pageUrlExcludelist)||void 0===c?void 0:c.reduce(function(e,t){if("string"==typeof t&&e.push(t),_instanceof(t,RegExp)&&e.push(t),"object"===(void 0===t?"undefined":_type_of(t))&&null!==t&&"pattern"in t)try{e.push(new RegExp(t.pattern))}catch(n){return console.warn("Invalid regex pattern: ".concat(t.pattern),n),e}return e},[]);var _,S="@amplitude/plugin-autocapture-browser",k=[],x=new aS(e,n),E=new Set,C=new Set,I=function(){var t,n,r=ln(H_().map(function(t){return x.addAdditionalEventProperties(t,"click",e.cssSelectorAllowlist,g)})),i=ln(new lc.default(function(t){var n,r=function(n){var r=x.addAdditionalEventProperties(n,"change",e.cssSelectorAllowlist,g);t.next(r)};return null===(n=K())||void 0===n||n.document.addEventListener("change",r,{capture:!0}),function(){var e;return null===(e=K())||void 0===e?void 0:e.document.removeEventListener("change",r)}}));window.navigation&&(n=ln(new lc.default(function(t){var n=function(n){var r=x.addAdditionalEventProperties(n,"navigate",e.cssSelectorAllowlist,g);t.next(r)};return window.navigation.addEventListener("navigate",n),function(){window.navigation.removeEventListener("navigate",n)}})));var o=ln(V_().map(function(t){return x.addAdditionalEventProperties(t,"mutation",e.cssSelectorAllowlist,g)})),s=new lc.default(function(e){var t,n=function(t){e.next(t)};return null===(t=K())||void 0===t||t.addEventListener("scroll",n),function(){var e;null===(e=K())||void 0===e||e.removeEventListener("scroll",n)}}),a=function(e,t){return new lc.default(function(n){var r,i=K();if(!(null==i?void 0:i.IntersectionObserver))return function(){};var o=new IntersectionObserver(function(e){e.forEach(function(e){n.next(e)})},{root:null,rootMargin:"0px",threshold:1}),s=t.join(",");(null!==(r=null==i?void 0:i.document.querySelectorAll(s))&&void 0!==r?r:[]).forEach(function(e){o.observe(e)});var a=e.subscribe(function(e){return e.event.forEach(function(e){return e.addedNodes.forEach(function(e){_instanceof(e,Element)&&(e.matches(s)&&o.observe(e),e.querySelectorAll(s).forEach(function(e){o.observe(e)}))})})});return function(){a.unsubscribe(),o.disconnect()}})}(o,e.cssSelectorAllowlist);return(t={})[rS.ChangeObservable]=i,t[rS.ClickObservable]=r,t[rS.MutationObservable]=o,t[rS.NavigateObservable]=n,t[rS.ScrollObservable]=s,t[rS.ExposureObservable]=a,t},O=$_(Object.values(null!==(f=null===(d=e.pageActions)||void 0===d?void 0:d.labeledEvents)&&void 0!==f?f:{})),T=Q_(null!==(p=null===(h=e.pageActions)||void 0===h?void 0:h.triggers)&&void 0!==p?p:[]),A=function(e,t,n,r){return new Y_(e,t,n,r)}(O,T,x,e);return{name:S,type:"enrichment",setup:function(n,r){return Ft(void 0,void 0,void 0,function(){var i,o,s,a,u,l,c,d,f,h,p,v,y,P,R,M,N,L,D,j,U;return Bt(this,function(F){return"undefined"==typeof document||(i=!1,o={maxX:void 0,maxY:void 0},n.fetchRemoteConfig&&(n.remoteConfigClient?n.remoteConfigClient.subscribe("configs.analyticsSDK.pageActions","all",function(n){!function(n){var r,i;n&&(e.pageActions=t(t({},e.pageActions),n),O=$_(Object.values(null!==(r=e.pageActions.labeledEvents)&&void 0!==r?r:{})),T=Q_(null!==(i=e.pageActions.triggers)&&void 0!==i?i:[]),A.update(O,T,e))}(n)}):n.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),s=L_(e,e.cssSelectorAllowlist),a=L_(e,e.actionClickAllowlist),u=I(),l=function(e){var t=e.amplitude,n=e.allObservables,r=e.shouldTrackEvent,i=e.evaluateTriggers;return n.clickObservable.filter(q_).filter(function(e){return r("click",e.closestTrackedAncestor)}).map(function(e){return i(e)}).subscribe(function(e){null==t||t.track(d_,e.targetElementProperties)})}({allObservables:u,amplitude:r,shouldTrackEvent:s,evaluateTriggers:A.evaluate.bind(A)}),k.push(l),c=function(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackEvent,o=e.evaluateTriggers;return n.changeObservable.filter(q_).filter(function(e){return i("change",e.closestTrackedAncestor)}).map(function(e){return o(e)}).subscribe(function(e){null==t||t.track(v_,r("change",e.closestTrackedAncestor))})}({allObservables:u,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return x.getEventProperties.apply(x,Wt(Wt([],zt(e),!1),[g],!1))},amplitude:r,shouldTrackEvent:s,evaluateTriggers:A.evaluate.bind(A)}),k.push(c),d=function(e){var t=e.amplitude,n=e.allObservables,r=e.options,i=e.getEventProperties,o=e.shouldTrackEvent,s=e.shouldTrackActionClick,a=n.clickObservable,u=n.mutationObservable,l=n.navigateObservable,c=a.filter(function(e){return!o("click",e.closestTrackedAncestor)}).map(function(e){var t=B_(e.event.target,r.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=i(e.type,e.closestTrackedAncestor)),e}).filter(q_).filter(function(e){return s("click",e.closestTrackedAncestor)}),d=l?un(u,l):u,f=un(c,d),h=null,p=null;return an(f,function(e){if(h&&(clearTimeout(h),h=null),"click"===e.type)return p=e,h=setTimeout(function(){h=null,p=null},500),Promise.resolve(null);if(p){var t=p;return p=null,Promise.resolve(t)}return Promise.resolve(null)}).subscribe(function(e){e&&(null==t||t.track(d_,i("click",e.closestTrackedAncestor)))})}({allObservables:u,options:e,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return x.getEventProperties.apply(x,Wt(Wt([],zt(e),!1),[g],!1))},amplitude:r,shouldTrackEvent:s,shouldTrackActionClick:a}),d&&k.push(d),f=function(e){e.amplitude;var t=e.allObservables.scrollObservable,n={maxX:0,maxY:0},r=t.subscribe(function(){var e,t,r,i,o=K(),s=Math.floor(null!==(t=null!==(e=null==o?void 0:o.scrollX)&&void 0!==e?e:null==o?void 0:o.pageXOffset)&&void 0!==t?t:0),a=Math.floor(null!==(i=null!==(r=null==o?void 0:o.scrollY)&&void 0!==r?r:null==o?void 0:o.pageYOffset)&&void 0!==i?i:0);n.maxX=Math.max(n.maxX,s),n.maxY=Math.max(n.maxY,a)});return{unsubscribe:function(){r.unsubscribe()},getState:function(){return n},reset:function(){n.maxX=0,n.maxY=0}}}({allObservables:u,amplitude:r}),k.push(f),h={},p=K(),v=function(e){e&&i||(setTimeout(function(){i=!1},100),i=!0,function(e){var t,n,r,i,o,s,a=e.amplitude,u=e.scrollTracker,l=e.currentElementExposed,c=e.elementExposedForPage,d=e.exposureTracker,f=e.isPageEnd,h=e.lastScroll,p=u.getState(),v=K(),g=null!==(n=null==v?void 0:v.innerWidth)&&void 0!==n?n:0,y=null!==(r=null==v?void 0:v.innerHeight)&&void 0!==r?r:0,m=((t={})[b_]=ze(null!==(s=null===(o=null===(i=null==v?void 0:v.location)||void 0===i?void 0:i.href)||void 0===o?void 0:o.split("?")[0])&&void 0!==s?s:""),t[S_]=p.maxX+g,t[k_]=p.maxY+y,t[w_]=y,t[__]=g,t["[Amplitude] Element Exposed"]=Array.from(l),t),b=F_();b&&(m[x_]=b),0!==l.size||p.maxX!==h.maxX||p.maxY!==h.maxY?(null==a||a.track("[Amplitude] Viewport Content Updated",m),h.maxX=p.maxX,h.maxY=p.maxY,l.clear(),f&&(u.reset(),c.clear(),null==d||d.reset())):f&&(u.reset(),c.clear(),null==d||d.reset())}({amplitude:r,scrollTracker:f,currentElementExposed:C,elementExposedForPage:E,exposureTracker:h.exposure,isPageEnd:e,lastScroll:o}))},y=function(e){!function(e,t,n,r){if(!t.has(e)){t.add(e),n.add(e);var i=Array.from(n);JSON.stringify(i).length>=T_&&r(!1)}}(e,E,C,v)},b&&(h.exposure=function(e){var t=e.allObservables,n=e.onExposure,r=e.dataExtractor,i=e.exposureDuration,o=void 0===i?Tt:i,s=new Map,a=new Map,u=t.exposureObservable.subscribe(function(e){var t=e,i=t.target;if(t.isIntersecting){if(!s.get(i)){var u=setTimeout(function(){s.set(i,!0);var e=r.getElementPath(i);n(e),a.set(i,null)},o);a.set(i,u)}}else!t.isIntersecting&&t.intersectionRatio<1&&(u=a.get(i))&&(clearTimeout(u),a.set(i,null))});return{unsubscribe:function(){u.unsubscribe()},reset:function(){a.forEach(function(e){e&&clearTimeout(e)}),a.clear(),s.clear()}}}({allObservables:u,onExposure:y,dataExtractor:x,exposureDuration:w}),h.exposure&&k.push(h.exposure),P=function(){v(!0)},null==p||p.addEventListener("beforeunload",P),_=function(){null==p||p.removeEventListener("beforeunload",P)},k.push({unsubscribe:function(){return _()}}),(R=u[rS.NavigateObservable])?k.push(R.subscribe(function(){v(!0)})):p&&(M=function(){v(!0)},p.addEventListener("popstate",M),N=p.history.pushState,p.history&&N&&(p.history.pushState=new Proxy(N,{apply:function(e,t,n){var r=zt(n,3),i=r[0],o=r[1],s=r[2];e.apply(t,[i,o,s]),v(!0)}})),k.push({unsubscribe:function(){p.removeEventListener("popstate",M),p.history&&N&&(p.history.pushState=N)}}))),null===(U=null==n?void 0:n.loggerProvider)||void 0===U||U.log("".concat(S," has been successfully added.")),window.opener&&m.enabled&&(L=e.cssSelectorAllowlist,D=e.actionClickAllowlist,function(e,t){var n=e;if(!0!==n[z_]){n[z_]=!0;var r=t.dataExtractor,i=t.isElementSelectable,o=t.cssSelectorAllowlist,s=t.actionClickAllowlist,a=null,u=function(t){e.notify({action:"element-selected",data:t})},l=function(t,n){"selector-mode-changed"===t?e.notify({action:"track-selector-mode-changed",data:n}):"selector-moved"===t&&e.notify({action:"track-selector-moved",data:n})};e.registerActionHandler("initialize-visual-tagging-selector",function(t){e.loadScriptOnce(E_).then(function(){var n;a=null===(n=null===window||void 0===window?void 0:window.amplitudeVisualTaggingSelector)||void 0===n?void 0:n.call(window,{getEventTagProps:r.getEventTagProps,isElementSelectable:function(e){return!i||i((null==t?void 0:t.actionType)||"click",e)},onTrack:l,onSelect:u,visualHighlightClass:C_,messenger:e,cssSelectorAllowlist:o,actionClickAllowlist:s,extractDataFromDataSource:r.extractDataFromDataSource,dataExtractor:r,diagnostics:{autocapture:{version:c_}}}),e.notify({action:"selector-loaded"})}).catch(function(){var t;null===(t=e.logger)||void 0===t||t.warn("Failed to initialize visual tagging selector")})}),e.registerActionHandler("close-visual-tagging-selector",function(){var e;null===(e=null==a?void 0:a.close)||void 0===e||e.call(a)})}}(j=cn(),{dataExtractor:x,isElementSelectable:L_(e,Wt(Wt([],zt(L),!1),zt(D),!1)),cssSelectorAllowlist:L,actionClickAllowlist:D}),dn(j),j.setup(t({logger:null==n?void 0:n.loggerProvider},(null==n?void 0:n.serverZone)&&{endpoint:hc[n.serverZone]})))),[2]})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){return[2,e]})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){var e,t,n,r;return Bt(this,function(i){try{for(e=qt(k),t=e.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]})})}}};Gu(),uf(),Gu(),uf();var lS=3e3,cS=["mutation","navigate"];Gu(),uf();var dS=Lt,fS=Nt,hS=Dt;Gu(),uf();var pS,vS,gS,yS,mS=2e3;uf(),(vS=pS||(pS={})).INCREASING="increasing",vS.DECREASING="decreasing",(yS=gS||(gS={})).X="x",yS.Y="y";var bS=function(e){var t=e.mouseDirectionChangeObservable,n=e.directionChanges,r=void 0===n?20:n,i=e.thresholdMs,o=void 0===i?2e3:i;return new lc.default(function(e){var n={changes:[],changesThreshold:r,thresholdMs:o},i={changes:[],changesThreshold:r,thresholdMs:o},s=void 0,a=null;function u(){void 0!==s&&(e.next(s),s=void 0,null!==a&&clearTimeout(a),_a(n),_a(i))}return t.subscribe(function(e){null!==a&&clearTimeout(a),function(e){var t=+Date.now();e.startTime=e.startTime||t;var n=e.changes,r=e.changesThreshold;n.push(t),n.length>r&&n.shift()}(e===gS.X?n:i);var t=function(e,t){var n=void 0;if(wa(e)&&(n=e.startTime),wa(t)){var r=t.startTime;r&&(!n||r<n)&&(n=r)}return n}(n,i);return t?(s=s||t,a=setTimeout(function(){u(),a=null},o)):u(),Sa(n),Sa(i),function(){null!==a&&(clearTimeout(a),a=null)}})})},wS=function(e){var t=e.amplitude,n=e.options,r=e.allObservables,i=e.directionChanges,o=void 0===i?20:i,s=e.thresholdMs,a=void 0===s?2e3:s,u=function(e){var t=e.allWindowObservables.mouseMoveObservable;return new lc.default(function(e){var n=null,r=null,i=null;return t.subscribe(function(t){var o={x:t.clientX,y:t.clientY};null!==n?(o.x>n.x?(r===pS.DECREASING&&e.next(gS.X),r=pS.INCREASING):o.x<n.x&&(r===pS.INCREASING&&e.next(gS.X),r=pS.DECREASING),o.y>n.y?(i===pS.DECREASING&&e.next(gS.Y),i=pS.INCREASING):o.y<n.y&&(i===pS.INCREASING&&e.next(gS.Y),i=pS.DECREASING),n=o):n=o})})}({allWindowObservables:r});return bS({mouseDirectionChangeObservable:u,directionChanges:o,thresholdMs:a}).subscribe(function(e){N_(n)&&t.track("[Amplitude] Thrashed Cursor",void 0,{time:e})})},_S=4e3,SS=function(e){var n;void 0===e&&(e={});var r="@amplitude/plugin-frustration-browser",i=[],o=!1!==e.errorClicks;e.errorClicks||(o=!1);var s=!1!==e.deadClicks&&null!==e.deadClicks,a=!1!==e.rageClicks&&null!==e.rageClicks,u=!1!==e.thrashedCursor&&null!==e.thrashedCursor;e.thrashedCursor||(u=!1);var l=ka(e,"rageClicks",Mt,a),c=ka(e,"deadClicks",Pt,s),d=ka(e,"errorClicks",Rt,o),f=null!==(n=e.dataAttributePrefix)&&void 0!==n?n:It,h=new aS(e),p=Wt([],zt(new Set(Wt(Wt(Wt([],zt(l),!1),zt(c),!1),zt(d),!1))),!1),v=function(){var e,n,r=ln(H_("pointerdown").map(function(e){return h.addAdditionalEventProperties(e,"click",p,f,!0)})),i=ln(K_().map(function(e){return h.addTypeAndTimestamp(e,"error")})),o=ln(V_().map(function(e){return h.addAdditionalEventProperties(e,"mutation",p,f)}));if(window.navigation){var s=new lc.default(function(e){var n=function(n){e.next(t(t({},n),{type:"navigate"}))};return window.navigation.addEventListener("navigate",n),function(){window.navigation.removeEventListener("navigate",n)}});n=ln(s.map(function(e){return h.addAdditionalEventProperties(e,"navigate",p,f)}))}var a=ln(new lc.default(function(e){var t=function(){var t=document.activeElement;if(t&&("TEXTAREA"===t.tagName||"INPUT"===t.tagName)){try{if(t.selectionStart===t.selectionEnd)return}catch(e){return}return e.next()}var n=window.getSelection();if(n&&!n.isCollapsed)return e.next()};return window.document.addEventListener("selectionchange",t),function(){window.document.removeEventListener("selectionchange",t)}})),u=ln(new lc.default(function(e){var t=function(t){e.next(t)},n={capture:!0};return W_.document.addEventListener("mousemove",t,n),function(){W_.document.removeEventListener("mousemove",t,n)}}));return(e={})[rS.ClickObservable]=r,e[rS.MutationObservable]=o,e[rS.NavigateObservable]=n,e[rS.BrowserErrorObservable]=i,e[rS.SelectionObservable]=a,e[rS.MouseMoveObservable]=u,e};return{name:r,type:"enrichment",setup:function(n,p){return Ft(void 0,void 0,void 0,function(){var g,y,m,b,w,_,S,k,x,E,C;return Bt(this,function(I){return"undefined"==typeof document||(g=v(),a&&(y=L_(e,l),m=ba({allObservables:g,amplitude:p,shouldTrackRageClick:y}),i.push(m)),s&&(b=L_(e,c),w=function(e){var n=e.amplitude,r=e.allObservables,i=e.getEventProperties,o=e.shouldTrackDeadClick,s=r.clickObservable,a=r.mutationObservable,u=r.navigateObservable,l=s.filter(function(e){return q_(e)&&o("click",e.closestTrackedAncestor)&&_instanceof(e.event.target,Element)&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===A_.LEFT_OR_TOUCH_CONTACT}),c=u?un(a,u):a,d=un(l,c),f=null;return an(d,function(e){return f&&cS.includes(e.type)?(clearTimeout(f),f=null,Promise.resolve(null)):"click"===e.type?f?Promise.resolve(null):new Promise(function(t){f=setTimeout(function(){t(e),f=null},lS)}):Promise.resolve(null)}).subscribe(function(e){if(e){var r={"[Amplitude] X":e.event.clientX,"[Amplitude] Y":e.event.clientY};n.track(f_,t(t({},i("click",e.closestTrackedAncestor)),r),{time:e.timestamp})}})}({amplitude:p,allObservables:g,getEventProperties:function(e,t){return h.getEventProperties(e,t,f)},shouldTrackDeadClick:b}),i.push(w)),o&&(_=L_(e,d),S=function(e){var n=e.amplitude,r=e.allObservables,i=e.shouldTrackErrorClick,o=r.clickObservable,s=r.browserErrorObservable,a=o.filter(function(e){return q_(e)&&i("click",e.closestTrackedAncestor)&&_instanceof(e.event.target,Element)&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===A_.LEFT_OR_TOUCH_CONTACT}),u=null,l=null,c=function(){null!==u&&(clearTimeout(u),u=null),l=null};return un(a,s).subscribe(function(e){var r;if("click"===e.type)return c(),l=e,void(u=setTimeout(c,mS));"error"===e.type&&l&&(n.track(p_,t(((r={})["[Amplitude] Kind"]=e.event.kind,r["[Amplitude] Message"]=e.event.message,r["[Amplitude] Stack"]=e.event.stack,r["[Amplitude] Filename"]=e.event.filename,r["[Amplitude] Line Number"]=e.event.lineNumber,r["[Amplitude] Column Number"]=e.event.columnNumber,r),l.targetElementProperties)),c())})}({amplitude:p,allObservables:g,shouldTrackErrorClick:_}),i.push(S)),u&&(k=void 0,x=void 0,"object"===_type_of(e.thrashedCursor)&&(k=e.thrashedCursor.directionChanges,x=e.thrashedCursor.threshold,k&&k<5&&(n.loggerProvider.warn("'thrashedCursor.directionChanges' of ".concat(k," is below the minimum of ").concat(5,", setting to ").concat(5)),k=5),x&&x>_S&&(n.loggerProvider.warn("'thrashedCursor.threshold' of ".concat(x," is above the maximum of ").concat(_S,", setting to ").concat(_S)),x=_S)),E=wS({amplitude:p,options:e,allObservables:g,directionChanges:k,thresholdMs:x}),i.push(E)),null===(C=null==n?void 0:n.loggerProvider)||void 0===C||C.log("".concat(r," has been successfully added."))),[2]})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){return[2,e]})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){var e,t,n,r;return Bt(this,function(o){try{for(e=qt(i),t=e.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]})})}}};Gu(),Gu();var kS=100,xS=1e4,ES=function(e){void 0===e&&(e={});var t="@amplitude/plugin-performance-browser",n=[],r=!0===e.mainThreadBlock||"object"===_type_of(e.mainThreadBlock)&&null!==e.mainThreadBlock;return{name:t,type:"enrichment",setup:function(i,o){return Ft(void 0,void 0,void 0,function(){var s,a,u;return Bt(this,function(l){return"undefined"==typeof document||(r&&(s=100,"object"===_type_of(e.mainThreadBlock)&&void 0!==e.mainThreadBlock.durationThreshold&&(s=e.mainThreadBlock.durationThreshold),a=Ia({amplitude:o,options:e,durationThreshold:s}),n.push(a)),null===(u=null==i?void 0:i.loggerProvider)||void 0===u||u.log("".concat(t," performance tracking has been successfully added."))),[2]})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){return[2,e]})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){var e,t,r,i;return Bt(this,function(o){try{for(e=qt(n),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}return[2]})})}}};Gu(),uf();var CS="[Amplitude] Network Request",IS=!0;uf(),Gu(),uf();var OS,TS,AS="500-599";!function(e){e.NetworkObservable="networkObservable"}(OS||(OS={}));var PS=function(e){void 0===e&&(e={});var t,n="@amplitude/plugin-network-capture-browser",r=function(){var e,n=new lc.default(function(e){var n=new Yl(function(t){var n=function(e,t){return{event:e,timestamp:Date.now(),type:t}}(t,"network");e.next(n)});return ec.subscribe(n,t),function(){ec.unsubscribe(n)}});return(e={})[OS.NetworkObservable]=n,e};return{name:n,type:"enrichment",setup:function(i,o){return Ft(void 0,void 0,void 0,function(){var s;return Bt(this,function(a){return"undefined"==typeof document||(s=r(),t=null==i?void 0:i.loggerProvider,TS=Na({allObservables:s,networkTrackingOptions:e,amplitude:o,loggerProvider:t}),null==t||t.log("".concat(n," has been successfully added."))),[2]})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){return[2,e]})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(e){return TS.unsubscribe(),[2]})})}}};Gu(),uf();var RS,MS=-1,NS=function(e){addEventListener("pageshow",function(t){t.persisted&&(MS=t.timeStamp,e(t))},!0)},LS=function(e,t,n,r){var i,o;return function(s){var a,u;t.value>=0&&(s||r)&&(((o=t.value-(null!=i?i:0))||void 0===i)&&(i=t.value,t.delta=o,t.rating=(a=t.value)>(u=n)[1]?"poor":a>u[0]?"needs-improvement":"good",e(t)))}},DS=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},jS=function(){var e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},US=function(){var e,t=jS();return null!==(e=null==t?void 0:t.activationStart)&&void 0!==e?e:0},FS=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=jS(),r="navigate";return MS>=0?r="back-forward-cache":n&&(document.prerendering||US()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:"v5-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},BS=new WeakMap,qS=function(){function e(){_class_call_check(this,e),Ku(this,"t"),Ku(this,"i",0),Ku(this,"o",[])}return _create_class(e,[{key:"h",value:function(e){var t;if(!e.hadRecentInput){var n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&e.startTime-r.startTime<1e3&&e.startTime-n.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),null===(t=this.t)||void 0===t||t.call(this,e)}}}]),e}(),zS=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver(function(e){Promise.resolve().then(function(){t(e.getEntries())})});return r.observe(_object_spread({type:e,buffered:!0},n)),r}}catch(e){}},WS=function(e){var t=!1;return function(){t||(e(),t=!0)}},VS=-1,HS=new Set,KS=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},GS=function(e){if("hidden"===document.visibilityState){var t=!0,n=!1,r=void 0;if("visibilitychange"===e.type)try{for(var i,o=HS[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){(0,i.value)()}}catch(e){n=!0,r=e}finally{try{t||null==o.return||o.return()}finally{if(n)throw r}}isFinite(VS)||(VS="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",GS,!0))}},JS=function(){if(VS<0){var e,t=US(),n=document.prerendering||null===(e=globalThis.performance.getEntriesByType("visibility-state").filter(function(e){return"hidden"===e.name&&e.startTime>t})[0])||void 0===e?void 0:e.startTime;VS=null!=n?n:KS(),addEventListener("visibilitychange",GS,!0),addEventListener("prerenderingchange",GS,!0),NS(function(){setTimeout(function(){VS=KS()})})}return{get firstHiddenTime(){return VS},onHidden:function(e){HS.add(e)}}},$S=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},QS=[1800,3e3],XS=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};$S(function(){var n,r=JS(),i=FS("FCP"),o=zS("paint",function(e){var t=!0,s=!1,a=void 0;try{for(var u,l=e[Symbol.iterator]();!(t=(u=l.next()).done);t=!0){var c=u.value;"first-contentful-paint"===c.name&&(o.disconnect(),c.startTime<r.firstHiddenTime&&(i.value=Math.max(c.startTime-US(),0),i.entries.push(c),n(!0)))}}catch(e){s=!0,a=e}finally{try{t||null==l.return||l.return()}finally{if(s)throw a}}});o&&(n=LS(e,i,QS,t.reportAllChanges),NS(function(r){i=FS("FCP"),n=LS(e,i,QS,t.reportAllChanges),DS(function(){i.value=performance.now()-r.timeStamp,n(!0)})}))})},YS=[.1,.25],ZS=0,ek=1/0,tk=0,nk=function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=e[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var s=i.value;s.interactionId&&(ek=Math.min(ek,s.interactionId),tk=Math.max(tk,s.interactionId),ZS=tk?(tk-ek)/7+1:0)}}catch(e){n=!0,r=e}finally{try{t||null==o.return||o.return()}finally{if(n)throw r}}},rk=function(){var e;return RS?ZS:null!==(e=performance.interactionCount)&&void 0!==e?e:0},ik=0,ok=function(){function e(){_class_call_check(this,e),Ku(this,"u",[]),Ku(this,"l",new Map),Ku(this,"m"),Ku(this,"p")}return _create_class(e,[{key:"v",value:function(){ik=rk(),this.u.length=0,this.l.clear()}},{key:"L",value:function(){var e=Math.min(this.u.length-1,Math.floor((rk()-ik)/50));return this.u[e]}},{key:"h",value:function(e){var t;if(null===(t=this.m)||void 0===t||t.call(this,e),e.interactionId||"first-input"===e.entryType){var n=this.u.at(-1),r=this.l.get(e.interactionId);if(r||this.u.length<10||e.duration>n.P){var i;if(r?e.duration>r.P?(r.entries=[e],r.P=e.duration):e.duration===r.P&&e.startTime===r.entries[0].startTime&&r.entries.push(e):(r={id:e.interactionId,entries:[e],P:e.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort(function(e,t){return t.P-e.P}),this.u.length>10){var o=this.u.splice(10),s=!0,a=!1,u=void 0;try{for(var l,c=o[Symbol.iterator]();!(s=(l=c.next()).done);s=!0){var d=l.value;this.l.delete(d.id)}}catch(e){a=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(a)throw u}}}null===(i=this.p)||void 0===i||i.call(this,r)}}}}]),e}(),sk=function(e){var t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=WS(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t(function(){e(),removeEventListener("visibilitychange",e,{capture:!0})}))},ak=[200,500],uk=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype){var n=JS();$S(function(){var r;"interactionCount"in performance||RS||(RS=zS("event",nk,{type:"event",buffered:!0,durationThreshold:0}));var i,o=FS("INP"),s=La(t,ok),a=function(e){sk(function(){var t=!0,n=!1,r=void 0;try{for(var a,u=e[Symbol.iterator]();!(t=(a=u.next()).done);t=!0){var l=a.value;s.h(l)}}catch(e){n=!0,r=e}finally{try{t||null==u.return||u.return()}finally{if(n)throw r}}var c=s.L();c&&c.P!==o.value&&(o.value=c.P,o.entries=c.entries,i())})},u=zS("event",a,{durationThreshold:null!==(r=t.durationThreshold)&&void 0!==r?r:40});i=LS(e,o,ak,t.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),n.onHidden(function(){a(u.takeRecords()),i(!0)}),NS(function(){s.v(),o=FS("INP"),i=LS(e,o,ak,t.reportAllChanges)}))})}},lk=function(){function e(){_class_call_check(this,e),Ku(this,"m")}return _create_class(e,[{key:"h",value:function(e){var t;null===(t=this.m)||void 0===t||t.call(this,e)}}]),e}(),ck=[2500,4e3],dk=[800,1800],fk=function(e){document.prerendering?$S(function(){return fk(e)}):"complete"!==document.readyState?addEventListener("load",function(){return fk(e)},!0):setTimeout(e)},hk=function(){var e=null,t=K(),n=null==t?void 0:t.document,r=null==t?void 0:t.location;return{name:"web-vitals-browser",type:"enrichment",setup:function(t,i){return Ft(void 0,void 0,void 0,function(){var o,s;return Bt(this,function(a){return void 0===n||(o=ze((null==r?void 0:r.href)||"",t.loggerProvider),s={"[Amplitude] Page Domain":(null==r?void 0:r.hostname)||"","[Amplitude] Page Location":o,"[Amplitude] Page Path":ze((null==r?void 0:r.pathname)||"",t.loggerProvider),"[Amplitude] Page Title":"undefined"!=typeof document&&document.title||"","[Amplitude] Page URL":ze(o.split("?")[0],t.loggerProvider)},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};$S(function(){var n,r=JS(),i=FS("LCP"),o=La(t,lk),s=function(e){t.reportAllChanges||(e=e.slice(-1));var s=!0,a=!1,u=void 0;try{for(var l,c=e[Symbol.iterator]();!(s=(l=c.next()).done);s=!0){var d=l.value;o.h(d),d.startTime<r.firstHiddenTime&&(i.value=Math.max(d.startTime-US(),0),i.entries=[d],n())}}catch(e){a=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(a)throw u}}},a=zS("largest-contentful-paint",s);if(a){n=LS(e,i,ck,t.reportAllChanges);for(var u=WS(function(){s(a.takeRecords()),a.disconnect(),n(!0)}),l=function(e){e.isTrusted&&(sk(u),removeEventListener(e.type,l,{capture:!0}))},c=0,d=["keydown","click","visibilitychange"];c<d.length;c++)addEventListener(d[c],l,{capture:!0});NS(function(r){i=FS("LCP"),n=LS(e,i,ck,t.reportAllChanges),DS(function(){i.value=performance.now()-r.timeStamp,n(!0)})})}})}(function(e){s["[Amplitude] LCP"]=ja(e)}),XS(function(e){s["[Amplitude] FCP"]=ja(e)}),uk(function(e){s["[Amplitude] INP"]=ja(e)}),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=JS();XS(WS(function(){var r,i=FS("CLS",0),o=La(t,qS),s=function(e){var t=!0,n=!1,s=void 0;try{for(var a,u=e[Symbol.iterator]();!(t=(a=u.next()).done);t=!0){var l=a.value;o.h(l)}}catch(e){n=!0,s=e}finally{try{t||null==u.return||u.return()}finally{if(n)throw s}}o.i>i.value&&(i.value=o.i,i.entries=o.o,r())},a=zS("layout-shift",s);a&&(r=LS(e,i,YS,t.reportAllChanges),n.onHidden(function(){s(a.takeRecords()),r(!0)}),NS(function(){o.i=0,i=FS("CLS",0),r=LS(e,i,YS,t.reportAllChanges),DS(function(){return r()})}),setTimeout(r))}))}(function(e){s["[Amplitude] CLS"]=ja(e)}),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=FS("TTFB"),r=LS(e,n,dk,t.reportAllChanges);fk(function(){var i=jS();i&&(n.value=Math.max(i.responseStart-US(),0),n.entries=[i],r(!0),NS(function(){n=FS("TTFB",0),(r=LS(e,n,dk,t.reportAllChanges))(!0)}))})}(function(e){s["[Amplitude] TTFB"]=ja(e)}),e=function(){"hidden"===n.visibilityState&&e&&(i.track("[Amplitude] Web Vitals",s),n.removeEventListener("visibilitychange",e),e=null)},n.addEventListener("visibilitychange",e)),[2]})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){return[2,e]})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){return e&&(null==n||n.removeEventListener("visibilitychange",e)),[2]})})}}};Gu(),uf();var pk=function(){function e(e,n){var r,i,o;this.shouldTrackNewCampaign=!1,this.options=t({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:(i=(null===(r=n.cookieOptions)||void 0===r?void 0:r.domain)||n.topLevelDomain,o=i,o?(o.startsWith(".")&&(o=o.substring(1)),[new RegExp("".concat(o.replace(".","\\."),"$"))]):[]),optOut:n.optOut},e),this.storage=n.cookieStorage,this.storageKey=Ze(n.apiKey,"MKTG"),this.webExpStorageKey=Ze(n.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=T,this.sessionTimeout=n.sessionTimeout,this.lastEventTime=n.lastEventTime,this.logger=n.loggerProvider,this.topLevelDomain=n.topLevelDomain,n.loggerProvider.log("Installing web attribution tracking.")}return e.prototype.init=function(){return Ft(this,void 0,void 0,function(){var e,t;return Bt(this,function(n){switch(n.label){case 0:return this.options.optOut?[2]:[4,this.fetchCampaign()];case 1:return t=zt.apply(void 0,[n.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||Le(this.sessionTimeout,this.lastEventTime),qw(this.currentCampaign,this.previousCampaign,this.options,this.logger,e,this.topLevelDomain)?(this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)]):[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return Ft(this,void 0,void 0,function(){var e;return Bt(this,function(t){switch(t.label){case 0:return[4,this.storage.get(this.webExpStorageKey)];case 1:return(e=t.sent())?[4,this.storage.remove(this.webExpStorageKey)]:[3,3];case 2:t.sent(),t.label=3;case 3:return[4,Promise.all([e||(new tc).parse(),this.storage.get(this.storageKey)])];case 4:return[2,t.sent()]}})})},e.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var n,r,i,o,s=(n=this.currentCampaign,r=this.options,i=t(t({},T),n),o=Object.entries(i).reduce(function(e,t){var n,i=zt(t,2),o=i[0],s=i[1];return e.setOnce("initial_".concat(o),null!==(n=null!=s?s:r.initialEmptyValue)&&void 0!==n?n:"EMPTY"),s?e.set(o,s):e.unset(o)},new N),Y(o));return e&&(s.event_id=e),s},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}();Gu(),uf();var vk=new Set([r.IDENTIFY,r.GROUP_IDENTIFY]),gk=function(e){var n;void 0===e&&(e={});var r,i,o,s,a,u,l=null!==(n=e.fallbackAttributionEvent)&&void 0!==n&&n,c=K(),d={},f=!1,h=!1,p=function(){return Ft(void 0,void 0,void 0,function(){var e;return Bt(this,function(t){switch(t.label){case 0:return[4,(new tc).parse()];case 1:return e=t.sent(),d=He(e),l&&(null==i||i.log("Tracking attribution fallback event."),null==r||r.track("[Amplitude] Attribution",d)),[2]}})})},v=function(){p()},g=function(e){return new Proxy(e,{apply:function(e,t,n){Reflect.apply(e,t,n),f&&v()}})};return{name:"@amplitude/plugin-event-property-attribution-browser",type:"enrichment",setup:function(e,t){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(n){switch(n.label){case 0:return r=t,i=e.loggerProvider,f=!0,i.log("Installing event property attribution tracking."),[4,p()];case 1:if(n.sent(),!c)return[2];if(c.addEventListener("popstate",v),!h){if(o=Reflect.get(c.history,"pushState"),s=Reflect.get(c.history,"replaceState"),!o||!s)return[2];a=g(o),c.history.pushState=a,u=g(s),c.history.replaceState=u,h=!0}return[2]}})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(n){return vk.has(e.event_type)||(e.event_properties=t(t({},d),e.event_properties)),[2,e]})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){var e,t;return Bt(this,function(n){return c&&(c.removeEventListener("popstate",v),e=Reflect.get(c.history,"pushState"),t=Reflect.get(c.history,"replaceState"),h&&e===a&&o&&(c.history.pushState=o),h&&t===u&&s&&(c.history.replaceState=s)),f=!1,h=!1,o=void 0,s=void 0,a=void 0,u=void 0,d={},[2]})})}}};Gu(),uf();var yk,mk,bk="AMP_CURRENT_PAGE",wk="AMP_PREVIOUS_PAGE",_k="AMP_URL_INFO";(mk=yk||(yk={})).Direct="direct",mk.Internal="internal",mk.External="external";var Sk=new Set([r.IDENTIFY,r.GROUP_IDENTIFY,r.REVENUE]),kk=function(e){var n=(void 0===e?{}:e).internalDomains,r=void 0===n?[]:n,i=K(),o=void 0,s=!1,a=void 0,u=!1,l=!1,c=function(e){var t;try{var n=ze(e,a);t=new URL(n).hostname}catch(e){null==a||a.error("Could not parse URL: ",e)}return t},d=function(e){var t="undefined"!=typeof location&&location.hostname||"",n=e?c(e):void 0;if(!n)return yk.Direct;var i=r.some(function(e){return-1!==t.indexOf(e)}),o=r.some(function(e){return-1!==n.indexOf(e)});return t===n||o&&i?yk.Internal:yk.External},f=function(){return Ft(void 0,void 0,void 0,function(){var e,t,n,r,i;return Bt(this,function(a){switch(a.label){case 0:return o&&s?[4,o.get(_k)]:[3,3];case 1:return e=a.sent(),t=ze("undefined"!=typeof location&&location.href||""),n=(null==e?void 0:e[bk])||"",r=void 0,r=t===n?(null==e?void 0:e[wk])||"":n||(document.referrer||""),[4,o.set(_k,(i={},i[bk]=t,i[wk]=r,i))];case 2:a.sent(),a.label=3;case 3:return[2]}})})},h=function(){f()};return{name:"@amplitude/plugin-page-url-enrichment-browser",type:"enrichment",setup:function(e,t){return Ft(void 0,void 0,void 0,function(){var t,n,r,d,p,v,g,y;return Bt(this,function(m){switch(m.label){case 0:if((a=e.loggerProvider).log("Installing @amplitude/plugin-page-url-enrichment-browser"),l=!0,!i)return[3,7];try{o=new et(i.sessionStorage)}catch(e){null==a||a.debug("sessionStorage is not available in this environment.")}return[4,null==o?void 0:o.isEnabled()];case 1:return s=null!==(y=m.sent())&&void 0!==y&&y,o&&s?(t="undefined"!=typeof document&&document.referrer||"",n=t?c(t):void 0,r="undefined"!=typeof location&&location.hostname||"",d=ze("undefined"!=typeof location&&location.href||""),[4,o.get(_k)]):[3,6];case 2:return p=m.sent(),v=(null==p?void 0:p[bk])||"",!!n&&n!==r&&v!==d?[4,o.set(_k,(g={},g[bk]=d,g[wk]=t,g))]:[3,4];case 3:return m.sent(),[3,6];case 4:return[4,f()];case 5:m.sent(),m.label=6;case 6:i.addEventListener("popstate",h),u||(i.history.pushState=new Proxy(i.history.pushState,{apply:function(e,t,n){var r=zt(n,3),i=r[0],o=r[1],s=r[2];e.apply(t,[i,o,s]),l&&h()}}),i.history.replaceState=new Proxy(i.history.replaceState,{apply:function(e,t,n){var r=zt(n,3),i=r[0],o=r[1],s=r[2];e.apply(t,[i,o,s]),l&&h()}}),u=!0),m.label=7;case 7:return[2]}})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){var n,r,i;return Bt(this,function(a){switch(a.label){case 0:return n=ze("undefined"!=typeof location&&location.href||""),o&&s?[4,o.get(_k)]:[3,2];case 1:if(r=a.sent(),i=(null==r?void 0:r[wk])||"",Sk.has(e.event_type))return[2,e];e.event_properties=t(t({},e.event_properties||{}),{"[Amplitude] Page Domain":Ua(e,"[Amplitude] Page Domain","undefined"!=typeof location&&location.hostname||""),"[Amplitude] Page Location":Ua(e,"[Amplitude] Page Location",n),"[Amplitude] Page Path":Ua(e,"[Amplitude] Page Path","undefined"!=typeof location&&ze(location.pathname)||""),"[Amplitude] Page Title":Ua(e,"[Amplitude] Page Title",uc(ac)),"[Amplitude] Page URL":Ua(e,"[Amplitude] Page URL",n.split("?")[0]),"[Amplitude] Previous Page Location":i,"[Amplitude] Previous Page Type":d(i)}),a.label=2;case 2:return[2,e]}})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(e){switch(e.label){case 0:return i&&(i.removeEventListener("popstate",h),l=!1),o&&s?[4,o.set(_k,{})]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})}}};Gu();var xk=function(){var e,t,n;function r(t){if(t)try{var n=new Function("return "+t)();if("function"==typeof n)return n;null==e||e.error("Custom enrichment body did not evaluate to a function")}catch(t){null==e||e.error("Could not create custom enrichment function",t)}return function(e){return e}}return{name:"@amplitude/plugin-custom-enrichment-browser",type:"enrichment",setup:function(i,o){return Ft(void 0,void 0,void 0,function(){var o,s;return Bt(this,function(a){return null==(e=i.loggerProvider)||e.log("Installing @amplitude/plugin-custom-enrichment-browser"),(null===(s=i.remoteConfig)||void 0===s?void 0:s.fetchRemoteConfig)&&(i.remoteConfigClient?(o=i.remoteConfigClient.subscribe("configs.analyticsSDK.browserSDK.customEnrichment","all",function(e){n=e&&function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&null!==e&&"body"in e&&"string"==typeof e.body}(e)?r(e.body||""):r("")}),t=function(){var e;return null===(e=i.remoteConfigClient)||void 0===e?void 0:e.unsubscribe(o)}):null==e||e.debug("Remote config client is not provided, skipping remote config fetch")),[2]})})},execute:function(t){return Ft(void 0,void 0,void 0,function(){var r;return Bt(this,function(i){if(n)try{return[2,null!==(r=n(t))&&void 0!==r?r:null]}catch(n){return null==e||e.error("Could not execute custom enrichment function",n),[2,t]}return[2,t]})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(e){return t&&t(),[2]})})}}};Gu();var Ek,Ck="userProperty",Ik="eventProperty",Ok=function(e){return e===Ck||e===Ik},Tk=function(e,t){return function(e){var t=Wt([],zt(new Set((Array.isArray(e)?e:[e]).filter(Ok))),!1);return t.length>0?t:[Ck]}(e.trackingMethod).includes(t)},Ak=function(e){return Tk(e,Ck)},Pk=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._diagnosticsSampleRate=0,t}return jt(n,e),n.prototype.init=function(e,n,r){var i,o;return void 0===e&&(e=""),arguments.length>2?(i=n,o=r):"string"==typeof n?(i=n,o=void 0):(i=null==n?void 0:n.userId,o=n),ne(this._init(t(t({},o),{userId:i,apiKey:e})))},n.prototype._init=function(n){var r,i,o,s,a,u,l,c;return Ft(this,void 0,void 0,function(){var d,f,h,p,v,g,y,m,b,w,_,S,k,x,E,C=this;return Bt(this,function(I){switch(I.label){case 0:return this.initializing?[2]:(this.initializing=!0,d=function(e){var t,n;return void 0===e&&(e={}),!0===(null===(t=e.remoteConfig)||void 0===t?void 0:t.fetchRemoteConfig)||!1!==(null===(n=e.remoteConfig)||void 0===n?void 0:n.fetchRemoteConfig)&&!1!==e.fetchRemoteConfig}(n),f=null!==(r=n.loggerProvider)&&void 0!==r?r:new le,n.loggerProvider||f.enable(null!==(i=n.logLevel)&&void 0!==i?i:ae.Warn),h=null!==(o=n.serverZone)&&void 0!==o?o:"US",v=this._diagnosticsSampleRate,g=null===(s=n.enableDiagnostics)||void 0===s||s,d?(p=new yt(n.apiKey,f,h,null===(a=n.remoteConfig)||void 0===a?void 0:a.serverUrl),[4,new Promise(function(e){null==p||p.subscribe("configs.diagnostics.browserSDK","all",function(t,n,r){if(f.debug("Diagnostics remote configuration received:",JSON.stringify({remoteConfig:t,source:n,lastFetch:r},null,2)),t){var i=t.sampleRate;"number"!=typeof i||isNaN(i)||(v=i);var o=t.enabled;"boolean"==typeof o&&(g=o)}e()})})]):[3,2]);case 1:I.sent(),I.label=2;case 2:return(y=new dt(n.apiKey,f,h,{enabled:g,sampleRate:v})).setTag("library","".concat(hw,"/").concat(fw)),"undefined"!=typeof navigator&&y.setTag("user_agent",navigator.userAgent),[4,Jw(n.apiKey,n,this,y,{loggerProvider:f,serverZone:h,enableDiagnostics:g,diagnosticsSampleRate:v})];case 3:return m=I.sent(),d&&p?[4,new Promise(function(e){null==p||p.subscribe("configs.analyticsSDK.browserSDK","all",function(t,n,r){m.loggerProvider.debug("Remote configuration received:",JSON.stringify({remoteConfig:t,source:n,lastFetch:r},null,2)),t&&ga(t,m),e()})})]:[3,5];case 4:I.sent(),I.label=5;case 5:return[4,e.prototype._init.call(this,m)];case 6:return I.sent(),this.logBrowserOptions(m),this.config.remoteConfigClient=p,A=this.config,b=Yb(A.defaultTracking)&&A.defaultTracking&&"object"===_type_of(A.defaultTracking)&&A.defaultTracking.attribution&&"object"===_type_of(A.defaultTracking.attribution)?t({},A.defaultTracking.attribution):{},Yb(this.config.defaultTracking)&&Ak(b)?(this.config.optOut&&this.timeline.addOptOutListener(function(e){return Ft(C,void 0,void 0,function(){return Bt(this,function(t){switch(t.label){case 0:return e?[3,2]:(this.webAttribution=new pk(b,this.config),[4,this.webAttribution.init()]);case 1:t.sent(),t.label=2;case 2:return[2]}})})}),this.webAttribution=new pk(b,this.config),[4,this.webAttribution.init()]):[3,8];case 7:I.sent(),I.label=8;case 8:return w=Fe(),_=w.ampTimestamp?Number(w.ampTimestamp):void 0,S=!_||Date.now()<_,k=S&&!Number.isNaN(Number(w.ampSessionId))?Number(w.ampSessionId):void 0,-1!==(x=this.config.deferredSessionId)||this.config.optOut||(x=Date.now()),this.setSessionId(null!==(c=null!==(l=null!==(u=n.sessionId)&&void 0!==u?u:k)&&void 0!==l?l:x)&&void 0!==c?c:this.config.sessionId),this.config.optOut&&this.timeline.addOptOutListener(function(e){return Ft(C,void 0,void 0,function(){return Bt(this,function(t){return!e&&this.config.deferredSessionId&&(-1===this.config.deferredSessionId?this.setSessionId(void 0):this.setSessionId(this.config.deferredSessionId)),[2]})})}),(E=Pe(n.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),this.config.offline===Et?[3,10]:[4,this.add(u_()).promise];case 9:I.sent(),I.label=10;case 10:return[4,this.add(new Se({diagnosticsClient:y})).promise];case 11:return I.sent(),[4,this.add(new pw).promise];case 12:return I.sent(),[4,this.add(new Ne).promise];case 13:return I.sent(),function(e){a_||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."),a_=!0)}(this.config),T=this.config.defaultTracking,Xb(T,"fileDownloads")?(this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(s_()).promise]):[3,15];case 14:I.sent(),I.label=15;case 15:return Zb(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(r_()).promise]):[3,17];case 16:I.sent(),I.label=17;case 17:return ew(this.config.defaultTracking)?this.config.optOut?[3,19]:(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(Zw(lw(this.config))).promise]):[3,20];case 18:return I.sent(),[3,20];case 19:this.timeline.addOptOutListener(function(e){return Ft(C,void 0,void 0,function(){return Bt(this,function(t){switch(t.label){case 0:return e?[2]:(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(Zw(lw(this.config))).promise]);case 1:return t.sent(),[2]}})})}),I.label=20;case 20:return Yb(this.config.defaultTracking)&&function(e){return Tk(e,Ik)}(b)?(this.config.loggerProvider.debug("Adding event property attribution plugin"),[4,this.add(gk(b)).promise]):[3,22];case 21:I.sent(),I.label=22;case 22:return rw(this.config.autocapture)?(this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(uS(sw(this.config),{diagnosticsClient:y})).promise]):[3,24];case 23:I.sent(),I.label=24;case 24:return iw(this.config.autocapture)?(this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(SS(aw(this.config))).promise]):[3,26];case 25:I.sent(),I.label=26;case 26:return nw(this.config.autocapture)?(this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(PS(uw(this.config))).promise]):[3,28];case 27:I.sent(),I.label=28;case 28:return function(e){return"boolean"==typeof e?e:"object"===(void 0===e?"undefined":_type_of(e))&&!0===e.webVitals}(this.config.autocapture)?(this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(hk()).promise]):[3,30];case 29:I.sent(),I.label=30;case 30:return function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&(!0===e.performanceTracking||"object"===_type_of(e.performanceTracking))}(this.config.autocapture)?(this.config.loggerProvider.debug("Adding performance tracking plugin"),[4,this.add(ES(ow(this.config))).promise]):[3,32];case 31:I.sent(),I.label=32;case 32:return function(e){return Xb(e,"pageUrlEnrichment")}(this.config.autocapture)?(this.config.loggerProvider.debug("Adding referrer page url plugin"),[4,this.add(kk()).promise]):[3,34];case 33:I.sent(),I.label=34;case 34:return("boolean"==typeof(O=this.config.customEnrichment)?O:"object"===(void 0===O?"undefined":_type_of(O))&&null!==O&&!1!==O.enabled)?(this.config.loggerProvider.debug("Adding custom enrichment plugin"),[4,this.add(xk()).promise]):[3,36];case 35:I.sent(),I.label=36;case 36:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 37:return I.sent(),E.eventBridge.setEventReceiver(function(e){var t=e.eventProperties||{},n=t.time,r=Ut(t,["time"]),i="number"==typeof n?{time:n}:void 0;C.track(e.eventType,r,i)}),[2]}var O,T,A})})},n.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},n.prototype.setUserId=function(e){this.config?(this.config.loggerProvider.debug("function setUserId: ",e),e===this.config.userId&&void 0!==e||(this.config.userId=e,this.timeline.onIdentityChanged({userId:e}),Re(e,this.config.instanceName))):this.q.push(this.setUserId.bind(this,e))},n.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},n.prototype.setDeviceId=function(e){this.config?(this.config.loggerProvider.debug("function setDeviceId: ",e),e!==this.config.deviceId&&(this.config.deviceId=e,this.timeline.onIdentityChanged({deviceId:e}),Me(e,this.config.instanceName))):this.q.push(this.setDeviceId.bind(this,e))},n.prototype.reset=function(){this.setDeviceId($()),this.setUserId(void 0),this.timeline.onReset()},n.prototype.getIdentity=function(){var e,t;return{deviceId:null===(e=this.config)||void 0===e?void 0:e.deviceId,userId:null===(t=this.config)||void 0===t?void 0:t.userId,userProperties:this.userProperties}},n.prototype.setIdentity=function(e){var t,n,r;if("userId"in e&&this.setUserId(e.userId),"deviceId"in e&&e.deviceId&&this.setDeviceId(e.deviceId),"userProperties"in e){this.userProperties=e.userProperties;var i=new N,o=null!==(r=e.userProperties)&&void 0!==r?r:{};try{for(var s=qt(Object.entries(o)),a=s.next();!a.done;a=s.next()){var u=zt(a.value,2),l=u[0],c=u[1];i.set(l,c)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}this.identify(i)}},n.prototype.getOptOut=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.optOut},n.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},n.prototype.setSessionId=function(e){var t,n=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),ne(Promise.resolve());if(this.config.optOut)return this.config.deferredSessionId=null!=e?e:-1,ne(Promise.resolve());if(void 0===e&&(e=Date.now()),e===this.config.sessionId)return ne(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var r=this.getSessionId();r!==e&&this.timeline.onSessionIdChanged(e);var 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,tw(this.config.defaultTracking)&&(r&&i&&n.push(this.track(Tw,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 this.config.identify&&n.push(this.track(Y(this.config.identify)).promise),tw(this.config.defaultTracking)&&n.push(this.track(Ow,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,ne(Promise.all(n))},n.prototype.extendSession=function(){this.config?this.config.lastEventTime=Date.now():this.q.push(this.extendSession.bind(this))},n.prototype.setTransport=function(e){this.config?this.config.transportProvider=Qw(e):this.q.push(this.setTransport.bind(this,e))},n.prototype.identify=function(t,n){if(dw(t)){var r=t._q;t._q=[],t=cw(new N,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)},n.prototype.groupIdentify=function(t,n,r,i){if(dw(r)){var o=r._q;r._q=[],r=cw(new N,o)}return e.prototype.groupIdentify.call(this,t,n,r,i)},n.prototype.revenue=function(t,n){if(dw(t)){var r=t._q;t._q=[],t=cw(new ie,r)}return e.prototype.revenue.call(this,t,n)},n.prototype.trackCampaignEventIfNeeded=function(e,t){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign||!Ak(this.webAttribution.options))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},n.prototype.process=function(t){return Ft(this,void 0,void 0,function(){var n,r,i;return Bt(this,function(o){return n=Date.now(),r=Le(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type===Ow||t.event_type===Tw||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)]})})},n.prototype.logBrowserOptions=function(e){try{var n=t(t({},e),{apiKey:e.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",dc(n))}catch(e){this.config.loggerProvider.error("Error logging browser config",e)}},n.prototype._setDiagnosticsSampleRate=function(e){e>1||e<0||this.config||(this._diagnosticsSampleRate=e)},n}(re);Ek=new Pk,be(Ek.init.bind(Ek),"init",ge(Ek),me(Ek,["config"])),be(Ek.add.bind(Ek),"add",ge(Ek),me(Ek,["config.apiKey","timeline.plugins"])),be(Ek.remove.bind(Ek),"remove",ge(Ek),me(Ek,["config.apiKey","timeline.plugins"])),be(Ek.track.bind(Ek),"track",ge(Ek),me(Ek,["config.apiKey","timeline.queue.length"])),be(Ek.logEvent.bind(Ek),"logEvent",ge(Ek),me(Ek,["config.apiKey","timeline.queue.length"])),be(Ek.identify.bind(Ek),"identify",ge(Ek),me(Ek,["config.apiKey","timeline.queue.length"])),be(Ek.groupIdentify.bind(Ek),"groupIdentify",ge(Ek),me(Ek,["config.apiKey","timeline.queue.length"])),be(Ek.setGroup.bind(Ek),"setGroup",ge(Ek),me(Ek,["config.apiKey","timeline.queue.length"])),be(Ek.revenue.bind(Ek),"revenue",ge(Ek),me(Ek,["config.apiKey","timeline.queue.length"])),be(Ek.flush.bind(Ek),"flush",ge(Ek),me(Ek,["config.apiKey","timeline.queue.length"])),be(Ek.getUserId.bind(Ek),"getUserId",ge(Ek),me(Ek,["config","config.userId"])),be(Ek.setUserId.bind(Ek),"setUserId",ge(Ek),me(Ek,["config","config.userId"])),be(Ek.getDeviceId.bind(Ek),"getDeviceId",ge(Ek),me(Ek,["config","config.deviceId"])),be(Ek.setDeviceId.bind(Ek),"setDeviceId",ge(Ek),me(Ek,["config","config.deviceId"])),be(Ek.reset.bind(Ek),"reset",ge(Ek),me(Ek,["config","config.userId","config.deviceId"])),be(Ek.getSessionId.bind(Ek),"getSessionId",ge(Ek),me(Ek,["config"])),be(Ek.setSessionId.bind(Ek),"setSessionId",ge(Ek),me(Ek,["config"])),be(Ek.extendSession.bind(Ek),"extendSession",ge(Ek),me(Ek,["config"])),be(Ek.setOptOut.bind(Ek),"setOptOut",ge(Ek),me(Ek,["config"])),be(Ek.setTransport.bind(Ek),"setTransport",ge(Ek),me(Ek,["config"])),be(Ek.getIdentity.bind(Ek),"getIdentity",ge(Ek),me(Ek,["config"])),be(Ek.setIdentity.bind(Ek),"setIdentity",ge(Ek),me(Ek,["config","config.userId","config.deviceId"])),be(Ek.getOptOut.bind(Ek),"getOptOut",ge(Ek),me(Ek,["config"])),be(Ek._setDiagnosticsSampleRate.bind(Ek),"_setDiagnosticsSampleRate",ge(Ek),me(Ek,["config"]));uf();Gu(),uf(),uf(),Gu(),uf(),uf();var Rk,Mk,Nk="[Amplitude]",Lk="".concat(Nk," Session Replay ID"),Dk=xt.US,jk={enabled:!0},Uk=1e3,Fk="".concat(Nk," Session Replay Debug"),Bk="amp-mask",qk="amp-unmask",zk="https://api-sr.amplitude.com/sessions/v2/track",Wk="https://api-sr.eu.amplitude.com/sessions/v2/track",Vk="https://api-sr.stag2.amplitude.com/sessions/v2/track",Hk=("".concat(o,"_replay_unsent"),7e5),Kk=9e6,Gk=/payload.*exceed/i,Jk=500,$k=1e4,Qk=1024,Xk="amplitude-sr-iframe";(Mk=Rk||(Rk={})).GET_SR_PROPS="get-sr-props",Mk.DEBUG_INFO="debug-info",Mk.FETCH_REQUEST="fetch-request",Mk.METADATA="metadata",Mk.TARGETING_DECISION="targeting-decision",Mk.REPLAY_GATE_DECISION="replay-gate-decision";var Yk=function(){function e(e){this.logger=e,this.log=this.getSafeMethod("log"),this.warn=this.getSafeMethod("warn"),this.error=this.getSafeMethod("error"),this.debug=this.getSafeMethod("debug")}return e.prototype.getSafeMethod=function(e){var t;if(!this.logger)return function(){};var n=this.logger[e];return"function"==typeof n?(null!==(t=n.__rrweb_original__)&&void 0!==t?t:n).bind(this.logger):function(){}},e.prototype.enable=function(e){this.logger.enable(e)},e.prototype.disable=function(){this.logger.disable()},e}();Gu(),uf();var Zk="medium",ex=function(e,t,n){switch(t){case"light":if("input"!==e)return!1;var r=n?function(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?t.toLowerCase():null}(n):"";return!!r&&(!!["password","hidden","email","tel"].includes(r)||!!n.autocomplete.startsWith("cc-"));case"medium":return"input"===e;case"conservative":return!0;default:return ex(e,Zk,n)}},tx=function(e,t){var n,r,i;if(e&&t.urlMaskLevels)try{for(var o=qt(t.urlMaskLevels),s=o.next();!s.done;s=o.next()){var a=s.value;if(ax(a.match).test(e))return a.maskLevel}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return null!==(i=t.defaultMaskLevel)&&void 0!==i?i:Zk},nx=function(e,t,n,r){var i,o;if(void 0===t&&(t={defaultMaskLevel:Zk}),n){if(n.closest("."+Bk))return!0;if((null!==(i=t.maskSelector)&&void 0!==i?i:[]).some(function(e){return n.closest(e)}))return!0;if(n.closest("."+qk))return!1;if((null!==(o=t.unmaskSelector)&&void 0!==o?o:[]).some(function(e){return n.closest(e)}))return!1}return ex(e,tx(r,t),n)},rx=function(e,t,n){return function(r,i){return nx(e,t,i,null==n?void 0:n())?r.replace(/[^\s]/g,"*"):r}},ix=function(e,t){return function(n,r,i){var o;if("style"===n)return r;if(!(null!==(o=null==e?void 0:e.maskAttributes)&&void 0!==o?o:[]).includes(n))return r;var s=["INPUT","SELECT","TEXTAREA"].includes(i.tagName)?"input":"text";return nx(s,e,i,null==t?void 0:t())?r.replace(/[^\s]/g,"*"):r}},ox=function(){var e=K();return(null==e?void 0:e.location)?e.location.href:""},sx=new Map,ax=function(e){var t=sx.get(e);if(t)return t;var n="\0TRAIL\0",r="\0MID\0",i="\0DS\0",o="\0ST\0",s="\0QU\0",a=e;a=(a=(a=(a=(a=(a=(a=(a=(a=(a=(a=a.replace(/\/\*\*$/,n)).replace(/\/\*\*\//g,r)).replace(/\*\*/g,i)).replace(/\*/g,o)).replace(/\?/g,s)).replace(/[.+^${}()|[\]\\]/g,"\\$&")).split(n).join("(/.*)?")).split(r).join("/(.*\\/)?")).split(i).join(".*")).split(o).join(".*")).split(s).join(".");var u=new RegExp("^".concat(a,"$"));return sx.set(e,u),u},ux=function(e,t){var n,r;try{for(var i=qt(t),o=i.next();!o.done;o=i.next()){var s=o.value,a=ax(s.selector);if(a.test(e))return e.replace(a,s.replacement)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},lx=function(){return Ft(void 0,void 0,void 0,function(){var e,t,n,r,i,o,s;return Bt(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),(e=K())?[4,e.navigator.storage.estimate()]:[3,2];case 1:return t=a.sent(),n=t.usage,r=t.quota,i=t.usageDetails,o=n?Math.round(n/Qk):0,s=n&&r?Math.round(1e3*(n/r+Number.EPSILON))/1e3:0,[2,{totalStorageSize:o,percentOfQuota:s,usageDetails:JSON.stringify(i)}];case 2:return[3,4];case 3:return a.sent(),[3,4];case 4:return[2,{totalStorageSize:0,percentOfQuota:0,usageDetails:""}]}})})},cx=function(e){var n=t({},e),r=n.apiKey;return n.apiKey="****".concat(r.substring(r.length-4)),n},dx=function(){return{flushMaxRetries:2,logLevel:ae.Warn,loggerProvider:new le,transportProvider:new ht}},fx=function(e){function n(n,r){var i,o,s,a,u,l,c,d,f,h,p=this,v=dx();if((p=e.call(this,t(t({transportProvider:v.transportProvider,loggerProvider:new Yk(r.loggerProvider||v.loggerProvider)},r),{apiKey:n}))||this).flushMaxRetries=void 0!==r.flushMaxRetries&&r.flushMaxRetries<=v.flushMaxRetries?r.flushMaxRetries:v.flushMaxRetries,p.apiKey=n,p.sampleRate=r.sampleRate||0,p.serverZone=r.serverZone||Dk,p.configServerUrl=r.configServerUrl,p.trackServerUrl=r.trackServerUrl,p.shouldInlineStylesheet=r.shouldInlineStylesheet,p.version=r.version,p.performanceConfig=r.performanceConfig||jk,p.storeType=null!==(i=r.storeType)&&void 0!==i?i:"memory",p.applyBackgroundColorToBlockedElements=null!==(o=r.applyBackgroundColorToBlockedElements)&&void 0!==o&&o,p.enableUrlChangePolling=null!==(s=r.enableUrlChangePolling)&&void 0!==s&&s,p.urlChangePollingInterval=null!==(a=r.urlChangePollingInterval)&&void 0!==a?a:Uk,p.captureDocumentTitle=null!==(u=r.captureDocumentTitle)&&void 0!==u&&u,void 0!==r.fullSnapshotIntervalMs&&(p.fullSnapshotIntervalMs=r.fullSnapshotIntervalMs),p.privacyConfig=t(t({},null!==(l=r.privacyConfig)&&void 0!==l?l:{}),{unmaskSelector:Array.from(new Set(Wt([".".concat(qk)],zt(null!==(d=null===(c=r.privacyConfig)||void 0===c?void 0:c.unmaskSelector)&&void 0!==d?d:[]),!1)))}),r.interactionConfig&&(p.interactionConfig=r.interactionConfig,p.interactionConfig.ugcFilterRules&&function(e){if(!e.every(function(e){return"string"==typeof e.selector&&"string"==typeof e.replacement}))throw new Error("ugcFilterRules must be an array of objects with selector and replacement properties");if(!e.every(function(e){return"string"==typeof(t=e.selector)&&""!==t.trim()&&!!/^\/|^https?:\/\/[^\s]+$/.test(t);var t}))throw new Error("ugcFilterRules must be an array of objects with valid globs")}(p.interactionConfig.ugcFilterRules)),r.debugMode&&(p.debugMode=r.debugMode),void 0!==r.useWebWorker)p.useWebWorker=r.useWebWorker;else{var g=r;void 0!==(null===(f=g.experimental)||void 0===f?void 0:f.useWebWorker)&&(p.useWebWorker=g.experimental.useWebWorker)}return p.captureAdoptedStyleSheets=null===(h=r.captureAdoptedStyleSheets)||void 0===h||h,r.crossOriginIframes&&(p.crossOriginIframes=r.crossOriginIframes),r.flushIntervalConfig&&(p.flushIntervalConfig=function(e,t){var n,r,i={};if(void 0!==e.minIntervalMs&&(!Number.isFinite(e.minIntervalMs)||e.minIntervalMs<hx?(t.warn("flushIntervalConfig.minIntervalMs ".concat(e.minIntervalMs," is below floor ").concat(hx,"ms; clamping.")),i.minIntervalMs=hx):i.minIntervalMs=e.minIntervalMs),void 0!==e.maxIntervalMs&&(Number.isNaN(e.maxIntervalMs)||e.maxIntervalMs<hx?(t.warn("flushIntervalConfig.maxIntervalMs ".concat(e.maxIntervalMs," is below floor ").concat(hx,"ms; clamping.")),i.maxIntervalMs=hx):i.maxIntervalMs=e.maxIntervalMs),void 0!==i.minIntervalMs||void 0!==i.maxIntervalMs){var o=null!==(n=i.minIntervalMs)&&void 0!==n?n:Jk,s=null!==(r=i.maxIntervalMs)&&void 0!==r?r:$k;s<o&&(void 0===i.maxIntervalMs?(t.warn("flushIntervalConfig.minIntervalMs (".concat(o,") exceeds the default maxIntervalMs (").concat($k,"); raising max to match min.")),i.maxIntervalMs=o):void 0===i.minIntervalMs?(t.warn("flushIntervalConfig.maxIntervalMs (".concat(s,") is below the default minIntervalMs (").concat(Jk,"); lowering min to match max.")),i.minIntervalMs=s):(t.warn("flushIntervalConfig.maxIntervalMs (".concat(i.maxIntervalMs,") is less than minIntervalMs (").concat(i.minIntervalMs,"); raising max to match min.")),i.maxIntervalMs=i.minIntervalMs))}return i}(r.flushIntervalConfig,p.loggerProvider)),p}return jt(n,e),n}(de),hx=100;Gu(),uf();var px,vx,gx,yx=((px=yx||{})[px.DomContentLoaded=0]="DomContentLoaded",px[px.Load=1]="Load",px[px.FullSnapshot=2]="FullSnapshot",px[px.IncrementalSnapshot=3]="IncrementalSnapshot",px[px.Meta=4]="Meta",px[px.Custom=5]="Custom",px[px.Plugin=6]="Plugin",px),mx=((vx=mx||{})[vx.Mutation=0]="Mutation",vx[vx.MouseMove=1]="MouseMove",vx[vx.MouseInteraction=2]="MouseInteraction",vx[vx.Scroll=3]="Scroll",vx[vx.ViewportResize=4]="ViewportResize",vx[vx.Input=5]="Input",vx[vx.TouchMove=6]="TouchMove",vx[vx.MediaInteraction=7]="MediaInteraction",vx[vx.StyleSheetRule=8]="StyleSheetRule",vx[vx.CanvasMutation=9]="CanvasMutation",vx[vx.Font=10]="Font",vx[vx.Log=11]="Log",vx[vx.Drag=12]="Drag",vx[vx.StyleDeclaration=13]="StyleDeclaration",vx[vx.Selection=14]="Selection",vx[vx.AdoptedStyleSheet=15]="AdoptedStyleSheet",vx[vx.CustomElement=16]="CustomElement",vx),bx=((gx=bx||{})[gx.MouseUp=0]="MouseUp",gx[gx.MouseDown=1]="MouseDown",gx[gx.Click=2]="Click",gx[gx.ContextMenu=3]="ContextMenu",gx[gx.DblClick=4]="DblClick",gx[gx.Focus=5]="Focus",gx[gx.Blur=6]="Blur",gx[gx.TouchStart=7]="TouchStart",gx[gx.TouchMove_Departed=8]="TouchMove_Departed",gx[gx.TouchEnd=9]="TouchEnd",gx[gx.TouchCancel=10]="TouchCancel",gx);Gu(),uf();var wx=function(){function e(e,t){this.localConfig=t,this.remoteConfigClient=e}return e.prototype.generateJoinedConfig=function(){var e,n,r,i,o,s,a;return Ft(this,void 0,void 0,function(){var u,l,c,d,f,h,p,v,g,y,m,b,w,_,S,k,x,E=this;return Bt(this,function(C){switch(C.label){case 0:(u=t({},this.localConfig)).optOut=this.localConfig.optOut,u.captureEnabled=!0,C.label=1;case 1:return C.trys.push([1,3,,4]),[4,new Promise(function(e,t){E.remoteConfigClient.subscribe("configs.sessionReplay",{timeout:1500},function(n,r){var i;if(E.localConfig.loggerProvider.debug("Session Replay remote configuration received from ".concat(r,":"),JSON.stringify(n,null,2)),n){var o=n,s=o.sr_sampling_config,a=o.sr_privacy_config,c=o.sr_targeting_config,d=null===(i=u.interactionConfig)||void 0===i?void 0:i.ugcFilterRules;u.interactionConfig=o.sr_interaction_config,u.interactionConfig&&d&&(u.interactionConfig.ugcFilterRules=d),u.loggingConfig=o.sr_logging_config,(s||a||c)&&(l={},s&&(l.sr_sampling_config=s),a&&(l.sr_privacy_config=a),c&&(l.sr_targeting_config=c)),e()}else t(new Error("No remote config received"))})})];case 2:return C.sent(),[3,4];case 3:return c=C.sent(),this.localConfig.loggerProvider.error("Failed to generate joined config: ",c),u.captureEnabled=!1,[2,{localConfig:this.localConfig,joinedConfig:u,remoteConfig:void 0}];case 4:if(!l)return[2,{localConfig:this.localConfig,joinedConfig:u,remoteConfig:l}];if(d=l.sr_sampling_config,f=l.sr_privacy_config,h=l.sr_targeting_config,d&&Object.keys(d).length>0?(Object.prototype.hasOwnProperty.call(d,"capture_enabled")?u.captureEnabled=d.capture_enabled:u.captureEnabled=!1,Object.prototype.hasOwnProperty.call(d,"sample_rate")&&(u.sampleRate=d.sample_rate),Object.prototype.hasOwnProperty.call(d,"min_session_duration_ms")&&(u.minSessionDurationMs=this.sanitizeMinSessionDurationMs(d.min_session_duration_ms))):(u.captureEnabled=!0,this.localConfig.loggerProvider.debug("Remote config successfully fetched, but no values set for project, Session Replay capture enabled.")),f){p=null!==(e=u.privacyConfig)&&void 0!==e?e:{},v={defaultMaskLevel:null!==(r=null!==(n=f.defaultMaskLevel)&&void 0!==n?n:p.defaultMaskLevel)&&void 0!==r?r:"medium",blockSelector:[],maskSelector:[],unmaskSelector:[],maskAttributes:Wt([],zt(new Set(Wt(Wt([],zt(null!==(i=p.maskAttributes)&&void 0!==i?i:[]),!1),zt(null!==(o=f.maskAttributes)&&void 0!==o?o:[]),!1))),!1),urlMaskLevels:Wt(Wt([],zt(null!==(s=f.urlMaskLevels)&&void 0!==s?s:[]),!1),zt(null!==(a=p.urlMaskLevels)&&void 0!==a?a:[]),!1)},g=function(e){var t,n,r,i,o,s,a,u,l,c={};"string"==typeof e.blockSelector&&(e.blockSelector=[e.blockSelector]);try{for(var d=qt(null!==(a=e.blockSelector)&&void 0!==a?a:[]),f=d.next();!f.done;f=d.next()){c[f.value]="block"}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}try{for(var h=qt(null!==(u=e.maskSelector)&&void 0!==u?u:[]),p=h.next();!p.done;p=h.next()){c[p.value]="mask"}}catch(e){r={error:e}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}try{for(var v=qt(null!==(l=e.unmaskSelector)&&void 0!==l?l:[]),g=v.next();!g.done;g=v.next()){c[g.value]="unmask"}}catch(e){o={error:e}}finally{try{g&&!g.done&&(s=v.return)&&s.call(v)}finally{if(o)throw o.error}}return c},y=t(t({},g(p)),g(f));try{for(m=qt(Object.entries(y)),b=m.next();!b.done;b=m.next())w=zt(b.value,2),_=w[0],"mask"===(S=w[1])?v.maskSelector.push(_):"block"===S?v.blockSelector.push(_):"unmask"===S&&v.unmaskSelector.push(_)}catch(e){k={error:e}}finally{try{b&&!b.done&&(x=m.return)&&x.call(m)}finally{if(k)throw k.error}}u.privacyConfig=(I=v,O=this.localConfig.loggerProvider,T=document.createDocumentFragment(),A=function(e){if(void 0===e&&(e=[]),"string"==typeof e&&(e=[e]),0!==(e=e.filter(function(e){try{T.querySelector(e)}catch(t){return O.warn('[session-replay-browser] omitting selector "'.concat(e,'" because it is invalid')),!1}return!0})).length)return e},I.blockSelector=A(I.blockSelector),I.maskSelector=A(I.maskSelector),I.unmaskSelector=A(I.unmaskSelector),I)}return h&&Object.keys(h).length>0&&(u.targetingConfig=h),this.localConfig.loggerProvider.debug(JSON.stringify({name:"session replay joined config",config:cx(u)},null,2)),[2,{localConfig:this.localConfig,joinedConfig:u,remoteConfig:l}]}var I,O,T,A})})},e.prototype.sanitizeMinSessionDurationMs=function(e){if("number"==typeof e&&Number.isFinite(e)){if(!(e<0))return e>_x?(this.localConfig.loggerProvider.warn("min_session_duration_ms remote value ".concat(e," exceeds ").concat(_x,"ms ceiling; clamping.")),_x):e;this.localConfig.loggerProvider.warn("min_session_duration_ms remote value is negative (".concat(e,"); ignoring."))}else this.localConfig.loggerProvider.warn("min_session_duration_ms remote value is not a finite number (got ".concat(String(e),"); ignoring."))},e}(),_x=6e4,Sx=function(e,t){return Ft(void 0,void 0,void 0,function(){var n,r;return Bt(this,function(i){return n=new fx(e,t),r=new yt(e,n.loggerProvider,n.serverZone,t.configServerUrl),[2,new wx(r,n)]})})};Gu(),uf(),Gu();var kx=function(){function e(e,t,n,r,i){var o,s=this;this.taskQueue=[],this.pendingQueue=[],this.isProcessing=!1,this.compressEvent=function(e){var t=e,n=t.type,r=t.timestamp,i=t.delay,o=t.data;return null!=i?JSON.stringify({type:n,timestamp:r,delay:i,data:o}):JSON.stringify({type:n,timestamp:r,data:o})},this.addCompressedEventToManager=function(e,t){var n=new Blob([e]).size;n>Kk?s.config.loggerProvider.warn("Session replay event dropped: serialized size ".concat(Math.round(n/1024)," KB exceeds maximum allowed event size. If this recurs, please open a GitHub issue at https://github.com/amplitude/Amplitude-TypeScript/issues or contact Amplitude support.")):s.eventsManager&&s.deviceId&&s.eventsManager.addEvent({event:{type:"replay",data:e},sessionId:t,deviceId:s.deviceId})},this.addCompressedEvent=function(e,t){if(s.worker)try{s.worker.postMessage({event:e,sessionId:t})}catch(n){"DataCloneError"===n.name?s.worker.postMessage(JSON.stringify({event:e,sessionId:t})):s.config.loggerProvider.warn("Unexpected error while posting message to worker:",n)}else{var n=s.compressEvent(e);s.addCompressedEventToManager(n,t)}},this.flushQueue=function(){var e;for(s.pendingQueue.length>0&&(e=s.taskQueue).push.apply(e,Wt([],zt(s.mergeMutationTasks(s.pendingQueue.splice(0))),!1));s.taskQueue.length>0;){var t=s.taskQueue.shift();if(t){var n=t.event,r=t.sessionId,i=s.compressEvent(n);s.addCompressedEventToManager(i,r)}}s.isProcessing=!1},this.terminate=function(){var e;null===(e=s.worker)||void 0===e||e.terminate()};var a=K();if(this.canUseIdleCallback=a&&"requestIdleCallback"in a,this.eventsManager=e,this.config=t,this.deviceId=n,this.timeout=(null===(o=t.performanceConfig)||void 0===o?void 0:o.timeout)||2e3,this.onFullSnapshotProcessed=i,r){t.loggerProvider.log("Enabling web worker for compression");try{var u=new Blob([r],{type:"application/javascript"}),l=URL.createObjectURL(u),c=new Worker(l);c.onerror=function(e){e.preventDefault(),t.loggerProvider.error("Worker failed, falling back to non-worker compression: ".concat(e.message," (").concat(e.filename,":").concat(e.lineno,")")),c.terminate(),s.worker=void 0},c.onmessage=function(e){var t=e.data,n=t.compressedEvent,r=t.sessionId;s.addCompressedEventToManager(n,r)},this.worker=c}catch(e){t.loggerProvider.error("Failed to create worker, falling back to non-worker compression:",e)}}}return e.prototype.scheduleIdleProcessing=function(){var e=this;this.isProcessing||(this.isProcessing=!0,requestIdleCallback(function(t){e.processQueue(t)},{timeout:this.timeout}))},e.prototype.enqueueEvent=function(e,t){var n,r,i,o;if(e.type===yx.FullSnapshot){if(this.config.loggerProvider.debug("Processing full snapshot immediately."),this.taskQueue.length>0||this.pendingQueue.length>0){var s=Wt(Wt([],zt(this.taskQueue.splice(0)),!1),zt(this.mergeMutationTasks(this.pendingQueue.splice(0))),!1);try{for(var a=qt(s),u=a.next();!u.done;u=a.next()){var l=u.value,c=this.compressEvent(l.event);this.addCompressedEventToManager(c,l.sessionId)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}this.isProcessing=!1}var d=this.compressEvent(e);return this.addCompressedEventToManager(d,t),void(null===(i=this.onFullSnapshotProcessed)||void 0===i||i.call(this))}this.canUseIdleCallback&&(null===(o=this.config.performanceConfig)||void 0===o?void 0:o.enabled)?(this.config.loggerProvider.debug("Enqueuing event for processing during idle time."),this.pendingQueue.push({event:e,sessionId:t}),this.scheduleIdleProcessing()):(this.config.loggerProvider.debug("Processing event without idle callback."),this.addCompressedEvent(e,t))},e.prototype.processQueue=function(e){var t,n=this;for(this.pendingQueue.length>0&&(t=this.taskQueue).push.apply(t,Wt([],zt(this.mergeMutationTasks(this.pendingQueue.splice(0))),!1));this.taskQueue.length>0&&(e.timeRemaining()>0||e.didTimeout);){var r=this.taskQueue.shift();if(r){var i=r.event,o=r.sessionId;this.addCompressedEvent(i,o)}}this.taskQueue.length>0||this.pendingQueue.length>0?requestIdleCallback(function(e){n.processQueue(e)},{timeout:this.timeout}):this.isProcessing=!1},e.prototype.mergeMutationTasks=function(e){var t,n,r;if(!(null===(r=this.config.performanceConfig)||void 0===r?void 0:r.mergeMutations))return e;if(e.length<=1)return e;for(var i=[],o=0;o<e.length;){for(var s=e[o].sessionId,a=o+1;a<e.length&&e[a].sessionId===s;)a++;var u=za(e.slice(o,a).map(function(e){return e.event}));try{for(var l=(t=void 0,qt(u)),c=l.next();!c.done;c=l.next()){var d=c.value;i.push({event:d,sessionId:s})}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}o=a}return i},e}();Gu(),Gu(),uf();var xx="Session replay event batch rejected due to exceeded retry count",Ex="Failed to store session replay events in IndexedDB",Cx="Session replay event batch dropped: server signalled capture disabled or session out of valid range for this session",Ix="1.44.0";Gu();var Ox=function(){function e(e){var t=e.trackServerUrl,n=e.loggerProvider,r=e.payloadBatcher,i=e.workerScript,o=this;if(this.storageKey="",this.retryTimeout=1e3,this.scheduled=null,this.queue=[],this.sendIdCounter=0,this.pendingWorkerRequests=new Map,this.flushPauseUntilMs=0,this.mergeOnNextFlush=!1,this.mergeLogFiredThisPause=!1,this.killedSessions=new Set,this.loggerProvider=n,this.payloadBatcher=r||function(e){return e},this.trackServerUrl=t,i)try{var s=new Blob([i],{type:"application/javascript"}),a=URL.createObjectURL(s),u=new Worker(a);u.onerror=function(e){var t,r;e.preventDefault(),n.error("Track destination worker failed, falling back to main-thread sending: ".concat(e.message," (").concat(e.filename,":").concat(e.lineno,")")),u.terminate(),o.worker=void 0;try{for(var i=qt(o.pendingWorkerRequests),s=i.next();!s.done;s=i.next()){var a=zt(s.value,2)[1];n.warn("Session replay event send failed due to worker crash: ".concat(e.message)),a.resolve()}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}o.pendingWorkerRequests.clear()},u.onmessage=function(e){var t=e.data;if("log"===t.type)n.log(t.message);else if("warn"===t.type)n.warn(t.message);else if("payload_too_large"===t.type){var r=o.pendingWorkerRequests.get(t.id);r&&(o.handlePayloadTooLargeResponse(r.context,t.isWaf),r.resolve(),o.pendingWorkerRequests.delete(t.id))}else if("complete"===t.type){var i=o.pendingWorkerRequests.get(t.id);i&&(void 0!==t.skipCode&&o.applyServerDirective(i.context.sessionId,t.skipCode),o.completeRequest({context:i.context}),i.resolve(),o.pendingWorkerRequests.delete(t.id))}},this.worker=u}catch(e){n.error("Failed to create track destination worker, falling back to main-thread sending:",e)}}return e.prototype.sendEventsList=function(e){this.addToQueue(t(t({},e),{attempts:0,timeout:0}))},e.prototype.sendBeacon=function(e){var t,n,r=e.events,i=e.sessionId,o=e.deviceId,s=e.apiKey,a=e.serverZone,u=function(e){return new Blob([e]).size},l=r,c=JSON.stringify({version:2,events:l});if(u(c)>65536){for(var d=0,f=l.length;d<f;){var h=Math.floor((d+f+1)/2);u(JSON.stringify({version:2,events:l.slice(0,h)}))<=65536?d=h:f=h-1}l=l.slice(0,d),c=JSON.stringify({version:2,events:l}),this.loggerProvider.warn("sendBeacon payload exceeded 64 KB limit, trimmed from ".concat(r.length," to ").concat(l.length," events"))}if(0!==l.length){var p=new URLSearchParams({device_id:o,session_id:String(i),type:"replay",api_key:s}),v="".concat(Fa(a,this.trackServerUrl),"?").concat(p.toString()),g=K();try{var y=new Blob([c],{type:"application/json"});!1===(null===(n=null===(t=null==g?void 0:g.navigator)||void 0===t?void 0:t.sendBeacon)||void 0===n?void 0:n.call(t,v,y))&&this.loggerProvider.warn("sendBeacon failed to queue session replay payload")}catch(e){}}},e.prototype.addToQueue=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];t.filter(function(t){return e.killedSessions.has(t.sessionId)?(e.completeRequest({context:t,err:Cx}),!1):t.attempts<(t.flushMaxRetries||0)?(t.attempts+=1,!0):(e.completeRequest({context:t,err:xx}),!1)}).forEach(function(t){e.queue=e.queue.concat(t),e.schedule(0)})},e.prototype.schedule=function(e){var t=this;if(!this.scheduled){var n=this.flushPauseUntilMs-Date.now(),r=n>e?n:e;n>0&&(this.mergeOnNextFlush=!0),this.scheduled=setTimeout(function(){t.flush(!0).then(function(){t.queue.length>0&&t.schedule(e)})},r)}},e.prototype.flush=function(e){return void 0===e&&(e=!1),Ft(this,void 0,void 0,function(){var t,n,r,i,o,s,a;return Bt(this,function(u){switch(u.label){case 0:t=this.queue,this.queue=[],this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),this.mergeOnNextFlush&&(this.mergeOnNextFlush=!1,t=this.mergeQueueAfterThrottle(t)),u.label=1;case 1:u.trys.push([1,6,7,8]),n=qt(t),r=n.next(),u.label=2;case 2:return r.done?[3,5]:(i=r.value,[4,this.send(i,e)]);case 3:u.sent(),u.label=4;case 4:return r=n.next(),[3,2];case 5:return[3,8];case 6:return o=u.sent(),s={error:o},[3,8];case 7:try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(s)throw s.error}return[7];case 8:return[2]}})})},e.prototype.mergeQueueAfterThrottle=function(e){var n,r,i,o,s,a,u,l,c,d,f,h=this;if(e.length<=1)return e;var p=new Map;try{for(var v=qt(e),g=v.next();!g.done;g=v.next()){var y=g.value,m=[y.sessionId,null!==(s=y.deviceId)&&void 0!==s?s:"",null!==(a=y.apiKey)&&void 0!==a?a:"",y.type,null!==(u=y.serverZone)&&void 0!==u?u:"",y.sampleRate,null!==(c=null===(l=y.version)||void 0===l?void 0:l.type)&&void 0!==c?c:"",null!==(f=null===(d=y.version)||void 0===d?void 0:d.version)&&void 0!==f?f:""].join("|"),b=p.get(m);b?b.push(y):p.set(m,[y])}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var w=[],_=function(e){var n,r;if(1===e.length)return w.push(e[0]),"continue";var i=null,o=0,s=function(){i&&w.push(i),i=null,o=0},a=function(e){var n=e.events.reduce(function(e,t){return e+new Blob([t]).size},0);if(null===i)return i=t(t({},e),{events:Wt([],zt(e.events),!1),attempts:0}),o=n,"continue";if(o+n>14e5)return s(),i=t(t({},e),{events:Wt([],zt(e.events),!1),attempts:0}),o=n,"continue";var r=i.onComplete,a=e.onComplete;i.events=i.events.concat(e.events),o+=n,i.onComplete=function(){return Ft(h,void 0,void 0,function(){return Bt(this,function(e){switch(e.label){case 0:return[4,Promise.allSettled([r(),a()])];case 1:return e.sent(),[2]}})})}};try{for(var u=(n=void 0,qt(e)),l=u.next();!l.done;l=u.next()){a(l.value)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}s()};try{for(var S=qt(p.values()),k=S.next();!k.done;k=S.next()){_(k.value)}}catch(e){i={error:e}}finally{try{k&&!k.done&&(o=S.return)&&o.call(S)}finally{if(i)throw i.error}}return w.length<e.length&&!this.mergeLogFiredThisPause&&(this.mergeLogFiredThisPause=!0,this.loggerProvider.log("Session replay throttle pause ended; merged ".concat(e.length," queued batches into ").concat(w.length," request(s)"))),w},e.prototype.send=function(e,t){return void 0===t&&(t=!0),Ft(this,void 0,void 0,function(){var n,r,i,o;return Bt(this,function(s){return this.killedSessions.has(e.sessionId)?[2,this.completeRequest({context:e,err:Cx})]:(n=e.apiKey)?(r=e.deviceId)?0===(i=this.payloadBatcher({version:1,events:e.events})).events.length?(this.completeRequest({context:e}),[2]):(o=this.worker)?[2,this.sendViaWorker(o,e,i,t)]:[2,this.sendOnMainThread(n,r,e,i,t)]:[2,this.completeRequest({context:e,err:"Session replay event batch not sent due to missing device ID"})]:[2,this.completeRequest({context:e,err:"Session replay event batch not sent due to missing api key"})]})})},e.prototype.sendViaWorker=function(e,t,n,r){return Ft(this,void 0,void 0,function(){var i,o=this;return Bt(this,function(s){return i="".concat(++this.sendIdCounter),[2,new Promise(function(s){var a;o.pendingWorkerRequests.set(i,{context:t,resolve:s}),e.postMessage({type:"send",id:i,payload:n,useRetry:r,context:{apiKey:t.apiKey,deviceId:t.deviceId,sessionId:t.sessionId,events:t.events,eventType:t.type,flushMaxRetries:null!==(a=t.flushMaxRetries)&&void 0!==a?a:0,sampleRate:t.sampleRate,serverZone:t.serverZone,trackServerUrl:o.trackServerUrl,version:t.version,currentUrl:ox(),sdkVersion:Ix}})})]})})},e.prototype.sendOnMainThread=function(e,n,r,i,o){var s,a,u,l,c,d,f;return Ft(this,void 0,void 0,function(){var h,p,v,g,y,m,b,w,_,S,k,x,E,C,I,O;return Bt(this,function(T){switch(T.label){case 0:h=ox(),p=Ix,v=r.sampleRate,g=new URLSearchParams({device_id:n,session_id:"".concat(r.sessionId),type:"".concat(r.type)}),y="".concat(null!==(a=null===(s=r.version)||void 0===s?void 0:s.type)&&void 0!==a?a:"standalone","/").concat(null!==(l=null===(u=r.version)||void 0===u?void 0:u.version)&&void 0!==l?l:p),T.label=1;case 1:return T.trys.push([1,13,,14]),m=JSON.stringify(i),(b=K())&&"CompressionStream"in b?[4,Wa(m,b)]:[3,3];case 2:return _=T.sent(),[3,4];case 3:_=null,T.label=4;case 4:return S=(w=_)?w.byteLength:new Blob([m]).size,k={headers:t({"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(e),"X-Client-Version":p,"X-Client-Library":y,"X-Client-Url":h.substring(0,1e3),"X-Client-Sample-Rate":"".concat(v),"X-Sampling-Hash-Alg":"xxhash32"},w?{"Content-Encoding":"gzip"}:{}),body:null!=w?w:m,method:"POST",keepalive:S<=65536},x="".concat(Fa(r.serverZone,this.trackServerUrl),"?").concat(g.toString()),0===i.events.length?(this.completeRequest({context:r}),[2]):[4,fetch(x,k)];case 5:if(null===(E=T.sent()))return this.completeRequest({context:r,err:"Unexpected error occurred"}),[2];if(E.status>=200&&E.status<300&&(C=null!==(f=null===(d=null===(c=E.headers)||void 0===c?void 0:c.get)||void 0===d?void 0:d.call(c,"X-Session-Replay-Event-Skipped"))&&void 0!==f?f:null,this.applyServerDirective(r.sessionId,C)),o)return[3,6];I="";try{I=JSON.stringify(E.body,null,2)}catch(e){}return this.completeRequest({context:r,success:"".concat(E.status,": ").concat(I)}),[3,12];case 6:if(I="",413!==E.status)return[3,10];T.label=7;case 7:return T.trys.push([7,9,,10]),[4,E.text()];case 8:return I=T.sent(),[3,10];case 9:return T.sent(),[3,10];case 10:return[4,this.handleReponse(E.status,r,I)];case 11:T.sent(),T.label=12;case 12:return[3,14];case 13:return O=T.sent(),this.completeRequest({context:r,err:O}),[3,14];case 14:return[2]}})})},e.prototype.handleReponse=function(e,t,n){return void 0===n&&(n=""),Ft(this,void 0,void 0,function(){var r;return Bt(this,function(i){switch(i.label){case 0:switch(r=(new ft).buildStatus(e),r){case V.Success:return[3,1];case V.Failed:case V.Timeout:case V.RateLimit:return[3,2];case V.PayloadTooLarge:return[3,4]}return[3,5];case 1:return this.handleSuccessResponse(t),[3,8];case 2:return[4,this.handleOtherResponse(t)];case 3:return i.sent(),[3,8];case 4:return this.handlePayloadTooLargeResponse(t,Gk.test(n)),[3,8];case 5:return 499!==e?[3,7]:[4,this.handleOtherResponse(t)];case 6:return i.sent(),[3,8];case 7:this.completeRequest({context:t,err:"Network error occurred, event batch rejected"}),i.label=8;case 8:return[2]}})})},e.prototype.handlePayloadTooLargeResponse=function(e,n){var r=n?"WAF (compressed payload too large)":"server (event too large)",i=Math.round(e.events.reduce(function(e,t){return e+t.length},0)/Qk);if(n)if(1!==e.events.length){this.loggerProvider.warn("Session replay event batch rejected by ".concat(r," (").concat(e.events.length," events, ").concat(i," KB total) — splitting and retrying")),e.onComplete();var o=function(){return Promise.resolve()},s=Math.floor(e.events.length/2);this.sendEventsList(t(t({},e),{events:e.events.slice(0,s),onComplete:o})),this.sendEventsList(t(t({},e),{events:e.events.slice(s),onComplete:o}))}else this.completeRequest({context:e,err:"Session replay event dropped: single event (".concat(i," KB, 1 event) rejected by ").concat(r," — cannot split further")});else this.completeRequest({context:e,err:"Session replay event batch dropped: ".concat(r," rejected payload (").concat(e.events.length," events, ").concat(i," KB) — not retrying non-WAF 413")})},e.prototype.handleSuccessResponse=function(e){var t=Math.round(new Blob(e.events).size/Qk);this.completeRequest({context:e,success:"Session replay event batch tracked successfully for session id ".concat(e.sessionId,", size of events: ").concat(t," KB")})},e.prototype.handleOtherResponse=function(e){return Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){switch(n.label){case 0:return t=Math.random()*e.attempts*this.retryTimeout,e.attempts++,e.attempts>(e.flushMaxRetries||0)?(this.completeRequest({context:e,err:xx}),[2]):[4,new Promise(function(e){return setTimeout(e,t)})];case 1:return n.sent(),[4,this.send(e,!0)];case 2:return n.sent(),[2]}})})},e.prototype.completeRequest=function(e){var t=e.context,n=e.err,r=e.success;t.onComplete(),n?this.loggerProvider.warn(n):r&&this.loggerProvider.log(r)},e.prototype.applyServerDirective=function(e,t){if(null===t)return this.flushPauseUntilMs=0,void(this.mergeLogFiredThisPause=!1);if("429"===t){var n=this.flushPauseUntilMs>Date.now();return this.flushPauseUntilMs=Date.now()+6e4,void(n||this.loggerProvider.log("Session replay throttled by server; pausing flush schedule for ".concat(60,"s")))}"4005"!==t&&"4004"!==t||this.killSession(e,t)},e.prototype.killSession=function(e,t){var n,r,i,o;if(!this.killedSessions.has(e)){if(this.killedSessions.add(e),this.killedSessions.size>256)try{for(var s=qt(this.killedSessions),a=s.next();!a.done;a=s.next()){var u=a.value;this.killedSessions.delete(u);break}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}this.loggerProvider.log("Session replay capture stopped for session ".concat(e," by server directive ").concat(t,"; remaining events will be dropped"));var l=[];try{for(var c=qt(this.queue),d=c.next();!d.done;d=c.next()){var f=d.value;f.sessionId===e?this.completeRequest({context:f,err:Cx}):l.push(f)}}catch(e){i={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}this.queue=l}},e}();Gu(),lf(),Gu();var Tx=function(){function e(e){var t,n,r,i=this;this.minInterval=Jk,this.maxInterval=$k,this.maxPersistedEventsSize=Hk,this._timeAtLastSplit=Date.now(),this.shouldSplitEventsList=function(e,t){var n=i.getStringSize(t);return i.getEventsArraySize(e)+n>=i.maxPersistedEventsSize||!!(Date.now()-i.timeAtLastSplit>i.interval&&e.length)&&(i.interval=Math.min(i.maxInterval,i.interval+i.minInterval),i._timeAtLastSplit=Date.now(),!0)},this.loggerProvider=e.loggerProvider,this.minInterval=null!==(t=e.minInterval)&&void 0!==t?t:this.minInterval,this.maxInterval=null!==(n=e.maxInterval)&&void 0!==n?n:this.maxInterval,this.maxPersistedEventsSize=null!==(r=e.maxPersistedEventsSize)&&void 0!==r?r:this.maxPersistedEventsSize,this.interval=this.minInterval}return Object.defineProperty(e.prototype,"timeAtLastSplit",{get:function(){return this._timeAtLastSplit},enumerable:!1,configurable:!0}),e.prototype.getStringSize=function(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<=127)t++;else if(r<=2047)t+=2;else if(r>=55296&&r<=56319){var i=n+1<e.length?e.charCodeAt(n+1):NaN;i>=56320&&i<=57343?(t+=4,n++):t+=3}else t+=3}return t},e.prototype.getEventsArraySize=function(e){var t,n,r=0;try{for(var i=qt(e),o=i.next();!o.done;o=i.next()){var s=o.value;r+=this.getStringSize(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r+(2+Math.max(0,e.length-1)+2*e.length)},e}(),Ax=function(e,t,n){!function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&null!==e&&"AbortError"===e.name}(n)?e.warn(t):e.debug(t)},Px="sessionCurrentSequence",Rx="sequencesToSend",Mx=5e3,Nx=function(e){var t,n;return e.objectStoreNames.contains(Px)||(n=e.createObjectStore(Px,{keyPath:"sessionId"})),e.objectStoreNames.contains(Rx)||(t=e.createObjectStore(Rx,{keyPath:"sequenceId",autoIncrement:!0})).createIndex("sessionId","sessionId"),{sequencesStore:t,currentSequenceStore:n}},Lx=function(e){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){switch(t.label){case 0:return[4,(n=yn(e,1,{upgrade:Nx}),r=2e3,i="IDB openDB timed out",void 0===i&&(i="IDB operation timed out"),new Promise(function(e,t){var o=setTimeout(function(){return t(new Error("".concat(i," after ").concat(r,"ms")))},r);n.then(function(t){clearTimeout(o),e(t)},function(e){clearTimeout(o),t(e)})}))];case 1:return[2,t.sent()]}var n,r,i})})},Dx=function(e){function n(n){var r,i=this;return(i=e.call(this,n)||this).consecutiveFailures=0,i.hasTriggeredFallback=!1,i.emptyFilteredCount=0,i.getSequencesToSend=function(){return Ft(i,void 0,void 0,function(){var e,t,n,r,i,o,s,a,u,l,c=this;return Bt(this,function(d){switch(d.label){case 0:e=!1,t=!1,d.label=1;case 1:return d.trys.push([1,9,,10]),n=[],(r=this.db.transaction("sequencesToSend","readwrite")).done.catch(function(n){e||t||(Ax(c.loggerProvider,"".concat(Ex,": ").concat(n),n),c.recordFailure())}),i=Va(r.done,Mx,function(){e||t||(t=!0,Ax(c.loggerProvider,"".concat(Ex,": transaction timed out")),c.recordFailure())}),[4,r.store.openCursor()];case 2:o=d.sent(),d.label=3;case 3:return o?(s=o.value,a=s.sessionId,0!==(u=s.events).length?[3,5]:(this.maybeLogEmptyFiltered("getSequencesToSend"),[4,o.delete()])):[3,8];case 4:return d.sent(),[3,6];case 5:n.push({events:u,sequenceId:o.key,sessionId:a}),d.label=6;case 6:return[4,o.continue()];case 7:return o=d.sent(),[3,3];case 8:return this.recordSuccess(),i(),[2,n];case 9:return l=d.sent(),t||(e=!0,Ax(this.loggerProvider,"".concat(Ex,": ").concat(l),l),this.recordFailure()),[3,10];case 10:return[2,void 0]}})})},i.storeCurrentSequence=function(e){return Ft(i,void 0,void 0,function(){var n,r,i,o,s,a,u,l,c=this;return Bt(this,function(d){switch(d.label){case 0:n=!1,r=!1,d.label=1;case 1:return d.trys.push([1,5,,6]),(i=this.db.transaction([Px,Rx],"readwrite")).done.catch(function(e){n||r||(Ax(c.loggerProvider,"".concat(Ex,": ").concat(e),e),c.recordFailure())}),o=Va(i.done,Mx,function(){n||r||(r=!0,Ax(c.loggerProvider,"".concat(Ex,": transaction timed out")),c.recordFailure())}),[4,i.objectStore(Px).get(e)];case 2:return!(s=d.sent())||s.tabId&&s.tabId!==this.tabId?(o(),[2,void 0]):0===s.events.length?(this.maybeLogEmptyFiltered("storeCurrentSequence"),o(),[2,void 0]):[4,i.objectStore(Rx).put({sessionId:e,events:s.events,tabId:this.tabId})];case 3:return a=d.sent(),[4,i.objectStore(Px).put({sessionId:e,events:[],tabId:this.tabId})];case 4:return d.sent(),this.recordSuccess(),o(),s.tabId,u=Ut(s,["tabId"]),[2,t(t({},u),{sessionId:e,sequenceId:a})];case 5:return l=d.sent(),r||(n=!0,Ax(this.loggerProvider,"".concat(Ex,": ").concat(l),l),this.recordFailure()),[3,6];case 6:return[2,void 0]}})})},i.addEventToCurrentSequence=function(e,t){return Ft(i,void 0,void 0,function(){var n,r,i,o,s,a,u,l,c,d=this;return Bt(this,function(f){switch(f.label){case 0:n=!1,r=!1,f.label=1;case 1:return f.trys.push([1,15,,16]),(i=this.db.transaction([Px,Rx],"readwrite")).done.catch(function(e){n||r||(Ax(d.loggerProvider,"".concat(Ex,": ").concat(e),e),d.recordFailure())}),o=Va(i.done,Mx,function(){n||r||(r=!0,Ax(d.loggerProvider,"".concat(Ex,": transaction timed out")),d.recordFailure())}),[4,i.objectStore(Px).get(e)];case 2:return(null==(s=f.sent())?void 0:s.tabId)&&s.tabId!==this.tabId?s.events.length>0?[4,i.objectStore(Rx).put({sessionId:e,events:s.events,tabId:s.tabId})]:[3,4]:[3,6];case 3:f.sent(),f.label=4;case 4:return[4,i.objectStore(Px).put({sessionId:e,events:[t],tabId:this.tabId})];case 5:return f.sent(),this.recordSuccess(),o(),[2,void 0];case 6:return(a=s)?[3,8]:[4,i.objectStore(Px).put({sessionId:e,events:[t],tabId:this.tabId})];case 7:return f.sent(),this.recordSuccess(),o(),[2,void 0];case 8:return this.shouldSplitEventsList(a.events,t)?[3,10]:[4,i.objectStore(Px).put({sessionId:e,events:a.events.concat(t),tabId:this.tabId})];case 9:return f.sent(),this.recordSuccess(),o(),[2,void 0];case 10:return 0!==(u=a.events).length?[3,12]:(this.maybeLogEmptyFiltered("addEventToCurrentSequence"),[4,i.objectStore(Px).put({sessionId:e,events:[t],tabId:this.tabId})]);case 11:return f.sent(),this.recordSuccess(),o(),[2,void 0];case 12:return[4,i.objectStore(Px).put({sessionId:e,events:[t],tabId:this.tabId})];case 13:return f.sent(),[4,i.objectStore(Rx).put({sessionId:e,events:u,tabId:this.tabId})];case 14:return l=f.sent(),this.recordSuccess(),o(),[2,{events:u,sessionId:e,sequenceId:l}];case 15:return c=f.sent(),r||(n=!0,Ax(this.loggerProvider,"".concat(Ex,": ").concat(c),c),this.recordFailure()),[3,16];case 16:return[2,void 0]}})})},i.storeSendingEvents=function(e,t){return Ft(i,void 0,void 0,function(){var n,r;return Bt(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.db.put(Rx,{sessionId:e,events:t,tabId:this.tabId})];case 1:return n=i.sent(),this.recordSuccess(),[2,n];case 2:return r=i.sent(),Ax(this.loggerProvider,"".concat(Ex,": ").concat(r),r),this.recordFailure(),[3,3];case 3:return[2,void 0]}})})},i.cleanUpSessionEventsStore=function(e,t){return Ft(i,void 0,void 0,function(){var e;return Bt(this,function(n){switch(n.label){case 0:if(!t)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.db.delete(Rx,t)];case 2:return n.sent(),this.recordSuccess(),[3,4];case 3:return e=n.sent(),Ax(this.loggerProvider,"".concat(Ex,": ").concat(e),e),this.recordFailure(),[3,4];case 4:return[2]}})})},i.db=n.db,i.tabId=n.tabId,i.onPersistentFailure=n.onPersistentFailure,i.consecutiveFailureThreshold=null!==(r=n.consecutiveFailureThreshold)&&void 0!==r?r:1,i}return jt(n,e),n.prototype.maybeLogEmptyFiltered=function(e){this.emptyFilteredCount++%100==0&&this.loggerProvider.debug("Filtered empty session replay sequence at ".concat(e," (idb store)"))},n.prototype.recordFailure=function(){var e;this.consecutiveFailures++,!this.hasTriggeredFallback&&this.consecutiveFailures>=this.consecutiveFailureThreshold&&(this.hasTriggeredFallback=!0,null===(e=this.onPersistentFailure)||void 0===e||e.call(this))},n.prototype.recordSuccess=function(){this.consecutiveFailures=0},n.new=function(e,r){var i;return Ft(this,void 0,void 0,function(){var o,s,a,u,l;return Bt(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),o="replay"===e?"":"_".concat(e),s="".concat(r.apiKey.substring(0,10),"_amp_session_replay_events").concat(o),[4,Lx(s)];case 1:return a=c.sent(),u=null!==(i=r.tabId)&&void 0!==i?i:function(){try{return crypto.randomUUID()}catch(e){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}}(),[2,new n(t(t({},r),{db:a,tabId:u}))];case 2:return l=c.sent(),Ax(r.loggerProvider,"".concat(Ex,": ").concat(l),l),[3,3];case 3:return[2]}})})},n.prototype.getCurrentSequenceEvents=function(e){return Ft(this,void 0,void 0,function(){var t,n,r,i,o,s,a,u;return Bt(this,function(l){switch(l.label){case 0:return e?[4,this.db.get("sessionCurrentSequence",e)]:[3,2];case 1:return(i=l.sent())?i.tabId&&i.tabId!==this.tabId?[2,void 0]:(i.tabId,[2,[o=Ut(i,["tabId"])]]):[2,void 0];case 2:t=[],l.label=3;case 3:return l.trys.push([3,8,9,10]),[4,this.db.getAll("sessionCurrentSequence")];case 4:n=qt.apply(void 0,[l.sent()]),r=n.next(),l.label=5;case 5:if(r.done)return[3,7];if((i=r.value).tabId&&i.tabId!==this.tabId)return[3,6];i.tabId,o=Ut(i,["tabId"]),t.push(o),l.label=6;case 6:return r=n.next(),[3,5];case 7:return[3,10];case 8:return s=l.sent(),a={error:s},[3,10];case 9:try{r&&!r.done&&(u=n.return)&&u.call(n)}finally{if(a)throw a.error}return[7];case 10:return[2,t]}})})},n}(Tx);Gu();var jx=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.finalizedSequences={},t.sequences={},t.sequenceId=0,t.emptyFilteredCount=0,t}return jt(t,e),t.prototype.resetCurrentSequence=function(e){this.sequences[e]=[]},t.prototype.addSequence=function(e){var t=this.sequenceId++,n=Wt([],zt(this.sequences[e]),!1);return this.finalizedSequences[t]={sessionId:e,events:n},this.resetCurrentSequence(e),{sequenceId:t,events:n,sessionId:e}},t.prototype.maybeLogEmptyFiltered=function(e){this.emptyFilteredCount++%100==0&&this.loggerProvider.debug("Filtered empty session replay sequence at ".concat(e," (in-memory store)"))},t.prototype.getSequencesToSend=function(){return Ft(this,void 0,void 0,function(){var e,t,n,r,i,o,s,a,u,l;return Bt(this,function(c){e=[];try{for(t=qt(Object.entries(this.finalizedSequences)),n=t.next();!n.done;n=t.next())r=zt(n.value,2),i=r[0],o=r[1],s=o.sessionId,0!==(a=o.events).length?e.push({sequenceId:Number(i),sessionId:s,events:a}):(this.maybeLogEmptyFiltered("getSequencesToSend"),delete this.finalizedSequences[Number(i)])}catch(e){u={error:e}}finally{try{n&&!n.done&&(l=t.return)&&l.call(t)}finally{if(u)throw u.error}}return[2,e]})})},t.prototype.storeCurrentSequence=function(e){return Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){return(t=this.sequences[e])?0===t.length?(this.maybeLogEmptyFiltered("storeCurrentSequence"),[2,void 0]):[2,this.addSequence(e)]:[2,void 0]})})},t.prototype.addEventToCurrentSequence=function(e,t){return Ft(this,void 0,void 0,function(){var n;return Bt(this,function(r){return this.sequences[e]||this.resetCurrentSequence(e),this.shouldSplitEventsList(this.sequences[e],t)&&(0===this.sequences[e].length?this.maybeLogEmptyFiltered("addEventToCurrentSequence"):n=this.addSequence(e)),this.sequences[e].push(t),[2,n]})})},t.prototype.storeSendingEvents=function(e,t){return Ft(this,void 0,void 0,function(){return Bt(this,function(n){return this.finalizedSequences[this.sequenceId]={sessionId:e,events:t},[2,this.sequenceId++]})})},t.prototype.cleanUpSessionEventsStore=function(e,t){return Ft(this,void 0,void 0,function(){return Bt(this,function(e){return void 0!==t&&delete this.finalizedSequences[t],[2]})})},t}(Tx),Ux=function(e){var n=e.config,r=e.minInterval,i=e.maxInterval,o=e.type,s=e.payloadBatcher,a=e.storeType,u=e.trackDestinationWorkerScript,l=e.shouldSend;return Ft(void 0,void 0,void 0,function(){function e(e){return void 0===e&&(e=!1),Ft(this,void 0,void 0,function(){return Bt(this,function(t){return[2,c.flush(e)]})})}var c,d,f,h,p,v,g,y,m,b,w,_,S,k;return Bt(this,function(x){switch(x.label){case 0:return c=new Ox(t(t({},n),{loggerProvider:n.loggerProvider,payloadBatcher:s,workerScript:u})),d=function(){return new jx({loggerProvider:n.loggerProvider,maxInterval:i,minInterval:r})},h=!1,v=function(){return Ft(void 0,void 0,void 0,function(){var e,t,r;return Bt(this,function(i){switch(i.label){case 0:return h?(h=!1,n.loggerProvider.warn("IDB store is experiencing repeated failures; falling back to in-memory event store."),f?[4,p.getSequencesToSend()]:[3,2]):[2];case 1:return t=i.sent(),[3,3];case 2:t=void 0,i.label=3;case 3:return e=t,p=d(),e&&f&&(r=f,e.forEach(function(e){_({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:r})})),[2]}})})},g=function(){return Ft(void 0,void 0,void 0,function(){var e;return Bt(this,function(t){switch(t.label){case 0:return[4,Dx.new(o,{loggerProvider:n.loggerProvider,minInterval:r,maxInterval:i,apiKey:n.apiKey,onPersistentFailure:function(){v()}})];case 1:return(e=t.sent())?(h=!0,[2,e]):(n.loggerProvider.log("Failed to initialize idb store, falling back to memory store."),[2,d()])}})})},"idb"!==a?[3,2]:[4,g()];case 1:return y=x.sent(),[3,3];case 2:y=d(),x.label=3;case 3:return p=y,m=[],b=0,w=function(e){if(!(e<=b)){var t=Math.min(e-b,m.length);t>0&&(m.splice(0,t),b=e)}},_=function(e){var t=e.events,r=e.sessionId,i=e.deviceId,s=e.sequenceId,a=t.map(function(e){return{event:e,bytes:new Blob([e]).size}}),u=a.filter(function(e){return e.bytes>Kk});u.length>0&&n.loggerProvider.warn("Dropping ".concat(u.length," oversized event(s) from session replay sequence before send. Sizes: ").concat(u.map(function(e){return"".concat(Math.round(e.bytes/1024)," KB")}).join(", "),". If this recurs, please open a GitHub issue at https://github.com/amplitude/Amplitude-TypeScript/issues or contact Amplitude support."));var l=u.length>0?a.filter(function(e){return e.bytes<=Kk}).map(function(e){return e.event}):t;0!==l.length?(n.debugMode&&lx().then(function(e){var t=e.totalStorageSize,r=e.percentOfQuota,i=e.usageDetails;n.loggerProvider.debug("Total storage size: ".concat(t," KB, percentage of quota: ").concat(r,"%, usage details: ").concat(i))}).catch(function(){}),c.sendEventsList({events:l,sessionId:r,flushMaxRetries:n.flushMaxRetries,apiKey:n.apiKey,deviceId:i,sampleRate:n.sampleRate,serverZone:n.serverZone,version:n.version,type:o,onComplete:function(){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(e){switch(e.label){case 0:return[4,p.cleanUpSessionEventsStore(r,s)];case 1:return e.sent(),[2]}})})}})):p.cleanUpSessionEventsStore(r,s).catch(function(e){n.loggerProvider.warn("Failed to clean up session replay events store:",e)})},S=function(e){var t=e.sessionId,r=e.deviceId;if(f=r,!l||l()){var i=b+m.length;p.storeCurrentSequence(t).then(function(e){e&&(w(i),_({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:r}))}).catch(function(e){n.loggerProvider.warn("Failed to get current sequence of session replay events for session:",e)})}},k=function(e){var t=e.event,r=e.sessionId,i=e.deviceId;f=i;var o=!l||l(),s=b+m.length;m.push(t.data),p.addEventToCurrentSequence(r,t.data).then(function(e){if(e){if(!o)return p.cleanUpSessionEventsStore(e.sessionId,e.sequenceId).catch(function(e){n.loggerProvider.warn("Failed to clean up dropped session replay sequence:",e)}),void w(s);w(s),_({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:i})}}).catch(function(e){n.loggerProvider.warn("Failed to add event to session replay capture:",e)})},[2,{sendCurrentSequenceEvents:S,addEvent:k,sendStoredEvents:function(e){var t=e.deviceId;return Ft(void 0,void 0,void 0,function(){var e;return Bt(this,function(r){switch(r.label){case 0:return f=t,[4,p.getSequencesToSend()];case 1:return(null==(e=r.sent())?void 0:e.length)?(n.loggerProvider.log("Draining ".concat(e.length," stored sequence(s) from previous session.")),e.forEach(function(e){_({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:t})}),[2]):[2]}})})},flush:e,getBeaconEvents:function(){return Wt([],zt(m),!1)},dropPendingBeaconEvents:function(){w(b+m.length)},trackDestination:c}]}})})};Gu();var Fx,Bx,qx,zx=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=new Map;e.forEach(function(e){n.set(e.name,e.manager)}),this.managers=n}return e.prototype.sendStoredEvents=function(e){return Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){switch(n.label){case 0:return t=[],this.managers.forEach(function(n){t.push(n.sendStoredEvents(e))}),[4,Promise.all(t)];case 1:return n.sent(),[2]}})})},e.prototype.addEvent=function(e){var t,n=e.sessionId,r=e.event,i=e.deviceId;null===(t=this.managers.get(r.type))||void 0===t||t.addEvent({sessionId:n,event:r,deviceId:i})},e.prototype.sendCurrentSequenceEvents=function(e){var t=e.sessionId,n=e.deviceId;this.managers.forEach(function(e){e.sendCurrentSequenceEvents({sessionId:t,deviceId:n})})},e.prototype.flush=function(e){return Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){switch(n.label){case 0:return t=[],this.managers.forEach(function(n){t.push(n.flush(e))}),[4,Promise.all(t)];case 1:return n.sent(),[2]}})})},e}();function Wx(e,t){var n,r,i,o,s,a;return void 0===t&&(t=[]),Bt(this,function(u){switch(u.label){case 0:if(!(e.length>0))return[3,9];u.label=1;case 1:u.trys.push([1,6,7,8]),n=qt(e[0]),r=n.next(),u.label=2;case 2:return r.done?[3,5]:(i=r.value,[5,qt(Wx(e.slice(1,e.length),t.concat(i)))]);case 3:u.sent(),u.label=4;case 4:return r=n.next(),[3,2];case 5:return[3,8];case 6:return o=u.sent(),s={error:o},[3,8];case 7:try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(s)throw s.error}return[7];case 8:return[3,11];case 9:return[4,t];case 10:u.sent(),u.label=11;case 11:return[2]}})}function Vx(e,t,n){var r,i,o;return void 0===n&&(n={counter:0,visited:new Map}),Bt(this,function(s){switch(s.label){case 0:if(!(e.length>2&&e.length>Fx.optimizedMinLength))return[3,5];r=1,s.label=1;case 1:return r<e.length-1?n.counter>Fx.maxNumberOfTries?[2]:(n.counter+=1,(i=Wt([],zt(e),!1)).splice(r,1),o=$a(i),n.visited.has(o)?[2]:Xa(i)&&lu(i,t)?[4,i]:[3,4]):[3,5];case 2:return s.sent(),n.visited.set(o,!0),[5,qt(Vx(i,t,n))];case 3:s.sent(),s.label=4;case 4:return r++,[3,1];case 5:return[2]}})}Gu(),Gu(),uf();var Hx=function(e){var t=e.version,n=e.events,r=[];return n.forEach(function(e){var t=JSON.parse(e);t.count=1,"click"===t.type&&r.push(t)}),{version:t,events:r}},Kx=function(e){var n=e.version,r=e.events,i=[];r.forEach(function(e){var t=JSON.parse(e);"click"===t.type&&i.push(t)});var o=i.reduce(function(e,n){var r=n.x,i=n.y,o=n.selector,s=n.timestamp,a=s-s%36e5,u="".concat(r,":").concat(i,":").concat(null!=o?o:"",":").concat(a);return e[u]?e[u].count+=1:e[u]=t(t({},n),{timestamp:a,count:1}),e},{});return{version:n,events:Object.values(o)}},Gx=function(e,t){var n=this;this.createHook=function(e){var t=e.eventsManager,r=e.sessionId,i=e.deviceIdFn,o=e.mirror,s=e.ugcFilterRules,a=e.performanceOptions;return function(e){if(e.type===bx.Click){var u=K();if(u){var l=u.location,c=u.innerHeight,d=u.innerWidth;if(l){var f=e.x,h=e.y;if(void 0!==f&&void 0!==h){var p,v=o.getNode(e.id);if(v)try{p=Ha(v,a)}catch(e){n.logger.debug("error resolving selector from finder")}var g=ux(l.href,s),y={x:f+n.scrollWatcher.currentScrollX,y:h+n.scrollWatcher.currentScrollY,selector:p,viewportHeight:c,viewportWidth:d,pageUrl:g,timestamp:Date.now(),type:"click"},m=i();m&&t.addEvent({sessionId:r,event:{type:"interaction",data:JSON.stringify(y)},deviceId:m})}}}}}},this.logger=e,this.scrollWatcher=t};uf(),uf();var Jx=function(){function e(e,t){var n=K();n&&n.navigator&&"function"==typeof n.navigator.sendBeacon?this.sendBeacon=function(e,t){try{if(n.navigator.sendBeacon(e,JSON.stringify(t)))return!0}catch(e){}return!1}:this.sendBeacon=function(){return!1},this.sendXhr=function(e,t){var n=new XMLHttpRequest;return n.open("POST",e,!0),n.setRequestHeader("Accept","*/*"),n.send(JSON.stringify(t)),!0},this.basePageUrl=Fa(t.serverZone,t.trackServerUrl),this.apiKey=t.apiKey,this.context=e}return e.prototype.send=function(e,t){var n=this.context,r=n.sessionId,i=n.type,o=new URLSearchParams({device_id:e,session_id:String(r),type:String(i),api_key:this.apiKey}),s="".concat(this.basePageUrl,"?").concat(o.toString());this.sendBeacon(s,t)||this.sendXhr(s,t)},e}();uf();var $x=function(){function e(e,t){var n=this;this.timestamp=Date.now(),this.hook=function(e){n.update(e)},this.send=function(e){return function(t){var r,i,o,s,a=e(),u=K();if(u&&a){var l=null!==(r=u.scrollX)&&void 0!==r?r:0,c=null!==(i=u.scrollY)&&void 0!==i?i:0;(l>0||c>0)&&n.update({id:1,x:l,y:c}),n.transport.send(a,{version:1,events:[{maxScrollX:n._maxScrollX,maxScrollY:n._maxScrollY,maxScrollWidth:n._maxScrollWidth,maxScrollHeight:n._maxScrollHeight,viewportHeight:cu(),viewportWidth:du(),pageUrl:ux(u.location.href,null!==(s=null===(o=n.config.interactionConfig)||void 0===o?void 0:o.ugcFilterRules)&&void 0!==s?s:[]),timestamp:n.timestamp,type:"scroll"}]})}}},this._maxScrollX=0,this._maxScrollY=0,this._currentScrollX=0,this._currentScrollY=0,this._maxScrollWidth=du(),this._maxScrollHeight=cu(),this.config=t,this.transport=e}return e.default=function(t,n){return new e(new Jx(t,n),n)},Object.defineProperty(e.prototype,"maxScrollX",{get:function(){return this._maxScrollX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollY",{get:function(){return this._maxScrollY},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollWidth",{get:function(){return this._maxScrollWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollHeight",{get:function(){return this._maxScrollHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentScrollX",{get:function(){return this._currentScrollX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentScrollY",{get:function(){return this._currentScrollY},enumerable:!1,configurable:!0}),e.prototype.update=function(e){var t=Date.now();if(this._currentScrollX=e.x,this._currentScrollY=e.y,e.x>this._maxScrollX){var n=du();this._maxScrollX=e.x;var r=e.x+n;r>this._maxScrollWidth&&(this._maxScrollWidth=r),this.timestamp=t}if(e.y>this._maxScrollY){var i=cu();this._maxScrollY=e.y;var o=e.y+i;o>this._maxScrollHeight&&(this._maxScrollHeight=o),this.timestamp=t}},e}(),Qx=function(e){var t=e.sessionId,n=e.deviceId;this.deviceId=n,this.sessionId=t,t&&n&&(this.sessionReplayId=function(e,t){return"".concat(t,"/").concat(e)}(t,n))};Gu(),uf();var Xx=864e5,Yx=function(e){return"".concat("AMP_SR_START_").concat(e.substring(0,10),"_")},Zx=function(e,t){return"".concat(Yx(e)).concat(t)},eE=function(){try{var e=K();return null==e?void 0:e.localStorage}catch(e){return}};Gu(),Gu(),lf();var tE=new function(){var e=this;this.dbs={},this.createStore=function(t){return Ft(e,void 0,void 0,function(){return Bt(this,function(e){switch(e.label){case 0:return[4,yn(t,1,{upgrade:function(e){e.objectStoreNames.contains("sessionTargetingMatch")||e.createObjectStore("sessionTargetingMatch",{keyPath:"sessionId"})}})];case 1:return[2,e.sent()]}})})},this.openOrCreateDB=function(t){return Ft(e,void 0,void 0,function(){var e,n;return Bt(this,function(r){switch(r.label){case 0:return this.dbs&&this.dbs[t]?[2,this.dbs[t]]:(e="".concat(t.substring(0,10),"_amp_session_replay_targeting"),[4,this.createStore(e)]);case 1:return n=r.sent(),this.dbs[t]=n,[2,n]}})})},this.getTargetingMatchForSession=function(t){var n=t.loggerProvider,r=t.apiKey,i=t.sessionId;return Ft(e,void 0,void 0,function(){var e,t,o,s;return Bt(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,this.openOrCreateDB(r)];case 1:return e=a.sent(),t=String(i),[4,e.get("sessionTargetingMatch",t)];case 2:return[2,null==(o=a.sent())?void 0:o.targetingMatch];case 3:return s=a.sent(),Ax(n,"Failed to get targeting match for session id ".concat(i,": ").concat(s),s),[3,4];case 4:return[2,void 0]}})})},this.storeTargetingMatchForSession=function(t){var n=t.loggerProvider,r=t.apiKey,i=t.sessionId,o=t.targetingMatch;return Ft(e,void 0,void 0,function(){var e,t,s;return Bt(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,this.openOrCreateDB(r)];case 1:return e=a.sent(),t=String(i),[4,e.put("sessionTargetingMatch",{targetingMatch:o,sessionId:t,lastUpdated:Date.now()})];case 2:return[2,a.sent()];case 3:return s=a.sent(),Ax(n,"Failed to store targeting match for session id ".concat(i,": ").concat(s),s),[3,4];case 4:return[2,void 0]}})})},this.clearStoreOfOldSessions=function(t){var n=t.loggerProvider,r=t.apiKey,i=t.currentSessionId;return Ft(e,void 0,void 0,function(){var e,t,o,s,a,u,l,c;return Bt(this,function(d){switch(d.label){case 0:return d.trys.push([0,8,,9]),[4,this.openOrCreateDB(r)];case 1:return e=d.sent(),t=String(i),[4,(o=e.transaction("sessionTargetingMatch","readwrite")).store.getAll()];case 2:s=d.sent(),a=0,d.label=3;case 3:return a<s.length?(u=s[a],l=Date.now()-u.lastUpdated,u.sessionId!==t&&l>1728e5?[4,o.store.delete(u.sessionId)]:[3,5]):[3,6];case 4:d.sent(),d.label=5;case 5:return a++,[3,3];case 6:return[4,o.done];case 7:return d.sent(),[3,9];case 8:return c=d.sent(),Ax(n,"Failed to clear old targeting matches for sessions: ".concat(c),c),[3,9];case 9:return[2]}})})}},nE=function(e){var n=e.sessionId,r=e.targetingConfig,i=e.loggerProvider,o=e.apiKey,s=e.targetingParams,a=e.urlChange,u=void 0!==a&&a;return Ft(void 0,void 0,void 0,function(){var e,a,l,c,d,f;return Bt(this,function(h){switch(h.label){case 0:return[4,tE.clearStoreOfOldSessions({loggerProvider:i,apiKey:o,currentSessionId:n})];case 1:return h.sent(),[4,tE.getTargetingMatchForSession({loggerProvider:i,apiKey:o,sessionId:n})];case 2:if(!0===h.sent()&&!u)return[2,!0];e=!0,h.label=3;case 3:return h.trys.push([3,6,,7]),[4,Promise.resolve().then(function(){return yf(),pf})];case 4:return a=h.sent().evaluateTargeting,l=t(t({},s),{flag:r,sessionId:"string"==typeof n?parseInt(n,10):n,apiKey:o,loggerProvider:i}),[4,a(l)];case 5:return(c=h.sent())&&c.sr_targeting_config&&(e="on"===c.sr_targeting_config.key),tE.storeTargetingMatchForSession({loggerProvider:i,apiKey:o,sessionId:n,targetingMatch:e}),[3,7];case 6:return d=h.sent(),f=d,i.warn(f.message),[3,7];case 7:return[2,e]}})})},rE=2654435761,iE=2246822519,oE=3266489917,sE=668265263,aE=374761393;Gu();var uE="__amplitude_url_tracking_patched__",lE=new WeakMap;yu();Gu(),uf();var cE,dE=function(){function e(){this.pendingLoadListeners=new Map}return e.prototype.start=function(){var e,t=this;null===(e=this.mutationObserver)||void 0===e||e.disconnect(),K()&&(this.sendToAllIframes({type:Xk,action:"start"}),this.mutationObserver=new MutationObserver(function(e){var n,r,i,o,s,a;try{for(var u=qt(e),l=u.next();!l.done;l=u.next()){var c=l.value;try{for(var d=(i=void 0,qt(Array.from(c.addedNodes))),f=d.next();!f.done;f=d.next()){_instanceof(v=f.value,HTMLIFrameElement)?t.sendToIframeAfterLoad(v):_instanceof(v,Element)&&v.querySelectorAll("iframe").forEach(function(e){t.sendToIframeAfterLoad(e)})}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}try{for(var h=(s=void 0,qt(Array.from(c.removedNodes))),p=h.next();!p.done;p=h.next()){var v;if(_instanceof(v=p.value,HTMLIFrameElement)){var g=t.pendingLoadListeners.get(v);g&&(v.removeEventListener("load",g),t.pendingLoadListeners.delete(v))}}}catch(e){s={error:e}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(s)throw s.error}}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}),this.mutationObserver.observe(document.documentElement,{childList:!0,subtree:!0}))},e.prototype.stop=function(){var e;null===(e=this.mutationObserver)||void 0===e||e.disconnect(),this.mutationObserver=void 0,this.pendingLoadListeners.forEach(function(e,t){t.removeEventListener("load",e)}),this.pendingLoadListeners.clear(),this.sendToAllIframes({type:Xk,action:"stop"})},e.prototype.sendToIframeAfterLoad=function(e){var t=this,n=function(){t.pendingLoadListeners.delete(e),t.sendToIframe(e,{type:Xk,action:"start"})};this.pendingLoadListeners.set(e,n),e.addEventListener("load",n,{once:!0})},e.prototype.sendToAllIframes=function(e){var t=this;document.querySelectorAll("iframe").forEach(function(n){return t.sendToIframe(n,e)})},e.prototype.sendToIframe=function(e,t){var n;try{null===(n=e.contentWindow)||void 0===n||n.postMessage(t,"*")}catch(e){}},e}(),fE=function(){function e(){var e=this;this.name="@amplitude/session-replay-browser",this.recordCancelCallback=null,this.eventCount=0,this.sessionTargetingMatch=!1,this.pageLeaveFns=[],this.suppressedSendCount=0,this.hasEmittedGateDecision=!1,this.recordFunction=null,this.recordEventsInFlight=!1,this.pendingEmitEvents=[],this.currentPageUrl="",this.recordEventsPendingShouldLogMetadata=null,this.urlChangeCleanup=null,this.crossOriginIframeCoordinator=null,this.crossOriginParentSignalCleanup=null,this.latestUrlChangeTargetingEvaluationId=0,this.teardownEventListeners=function(t){var n=K();n&&(n.removeEventListener("blur",e.blurListener),n.removeEventListener("focus",e.focusListener),!t&&n.addEventListener("blur",e.blurListener),!t&&n.addEventListener("focus",e.focusListener),n.self&&"onpagehide"in n.self?(n.removeEventListener("pagehide",e.pageLeaveListener),!t&&n.addEventListener("pagehide",e.pageLeaveListener)):(n.removeEventListener("beforeunload",e.pageLeaveListener),!t&&n.addEventListener("beforeunload",e.pageLeaveListener)))},this.blurListener=function(){e.sendEvents()},this.focusListener=function(){if(e.recordCancelCallback&&e.recordFunction)try{e.recordFunction.takeFullSnapshot(!0)}catch(t){e.loggerProvider.warn("Failed to take full snapshot on focus:",t)}else e.recordEventsInFlight||e.recordEvents(!1)},this.pageLeaveListener=function(t){var n;null===(n=e.eventCompressor)||void 0===n||n.flushQueue(),e.sendEvents(),e.pageLeaveFns.forEach(function(e){e(t)})},this.evaluateTargetingAndCapture=function(t,n,i,o){return void 0===n&&(n=!1),void 0===i&&(i=!1),void 0===o&&(o=!1),Ft(e,void 0,void 0,function(){var e,s,a,u,l,c,d,f,h,p,v,g;return Bt(this,function(y){switch(y.label){case 0:if(!this.identifiers||!this.identifiers.sessionId||!this.config)return this.identifiers&&!this.identifiers.sessionId?this.loggerProvider.log("Session ID has not been set yet, cannot evaluate targeting for Session Replay."):this.loggerProvider.warn("Session replay init has not been called, cannot evaluate targeting."),[2];if(!this.config.targetingConfig){if(!n)return this.loggerProvider.log("No targeting config set, skipping initialization/recording for event."),[2];this.loggerProvider.log("Targeting config has not been set yet, cannot evaluate targeting.")}return this.lastTargetingParams=t,e=this.config.targetingConfig,e&&!this.sessionTargetingMatch?(s=o?this.latestUrlChangeTargetingEvaluationId:void 0,(a=t.event)&&Object.values(r).includes(a.event_type)&&(a=void 0),u=null!==(v=null!==(f=null===(d=t.page)||void 0===d?void 0:d.url)&&void 0!==f?f:null===(p=null===(h=K())||void 0===h?void 0:h.location)||void 0===p?void 0:p.href)&&void 0!==v?v:"",l=null!==(g=t.page)&&void 0!==g?g:""!==u?{url:u}:void 0,[4,nE({sessionId:this.identifiers.sessionId,targetingConfig:e,loggerProvider:this.loggerProvider,apiKey:this.config.apiKey,targetingParams:{userProperties:t.userProperties,event:a,page:l},urlChange:o})]):[3,2];case 1:if(c=y.sent(),o&&void 0!==s&&s!==this.latestUrlChangeTargetingEvaluationId)return this.loggerProvider.debug("Ignoring stale URL-change targeting result #".concat(s,"; latest is #").concat(this.latestUrlChangeTargetingEvaluationId,".")),[2];this.sessionTargetingMatch=this.sessionTargetingMatch||c,this.loggerProvider.debug(JSON.stringify({name:"targeted replay capture config",sessionTargetingMatch:this.sessionTargetingMatch,event:a,targetingParams:t},null,2)),y.label=2;case 2:return n?(this.initialize(!0),[3,5]):[3,3];case 3:return!i&&this.recordCancelCallback?[3,5]:(this.loggerProvider.log("Recording events for session due to forceRestart or no ongoing recording."),[4,this.recordEvents()]);case 4:y.sent(),y.label=5;case 5:return[2]}})})},this.addCustomRRWebEvent=function(n,r,i){return void 0===r&&(r={}),void 0===i&&(i=!0),Ft(e,void 0,void 0,function(){var e,o,s,a;return Bt(this,function(u){switch(u.label){case 0:return u.trys.push([0,3,,4]),e=void 0,(o=this.config)&&n!==Rk.METADATA?(e={config:cx(o),version:Ix},i?[4,lx()]:[3,2]):[3,2];case 1:s=u.sent(),e=t(t({},s),e),u.label=2;case 2:return this.recordCancelCallback&&this.recordFunction?this.recordFunction.addCustomEvent(n,t(t({},r),e)):this.loggerProvider.debug("Not able to add custom replay capture event ".concat(n," due to no ongoing recording.")),[3,4];case 3:return a=u.sent(),this.loggerProvider.debug("Error while adding custom replay capture event: ",a),[3,4];case 4:return[2]}})})},this.stopRecordingEvents=function(){var t,n,r;try{e.loggerProvider.log("Session Replay capture stopping."),e.recordCancelCallback&&e.recordCancelCallback(),e.recordCancelCallback=null,null===(t=e.networkObservers)||void 0===t||t.stop(),null===(n=e.crossOriginIframeCoordinator)||void 0===n||n.stop(),e.crossOriginIframeCoordinator=null,null===(r=e.crossOriginParentSignalCleanup)||void 0===r||r.call(e),e.crossOriginParentSignalCleanup=null}catch(t){var i=t;e.loggerProvider.warn("Error occurred while stopping replay capture: ".concat(i.toString()))}},this.loggerProvider=new Yk(new le)}return e.prototype.init=function(e,t){return ne(this._init(e,t))},e.prototype.setupUrlChangeListener=function(){var e,t,n=this;null===(e=this.urlChangeCleanup)||void 0===e||e.call(this);var r=K();if(null==r?void 0:r.location){var i=!!(null===(t=this.config)||void 0===t?void 0:t.targetingConfig),o=gu(r,function(e){if(n.currentPageUrl=e,i){var t=++n.latestUrlChangeTargetingEvaluationId;n.evaluateTargetingAndCapture({userProperties:{},event:void 0,page:{url:e}},!1,!1,!0),n.loggerProvider.debug("Queued URL-change targeting re-evaluation #".concat(t," for ").concat(e,"."))}});this.urlChangeCleanup=function(){o(),n.urlChangeCleanup=null}}},e.prototype.isBelowMinSessionDuration=function(){var e,t=null===(e=this.config)||void 0===e?void 0:e.minSessionDurationMs;return void 0!==t&&void 0!==this.sessionStartTime&&Date.now()-this.sessionStartTime<t},e.prototype.getCurrentPageForTargeting=function(){var e,t,n=null===(t=null===(e=K())||void 0===e?void 0:e.location)||void 0===t?void 0:t.href;return null!=n?{url:n}:void 0},e.prototype._init=function(e,n){var r,i,o,s,a,u,l,c,d,f,h,p,v,g;return Ft(this,void 0,void 0,function(){var y,m,b,w,_,S,k,x,E,C,I,O,T,A,P,R,M,N,L,D,j,U,F,B,q,z,W,V,H,G,J=this;return Bt(this,function($){switch($.label){case 0:return null===(r=this.urlChangeCleanup)||void 0===r||r.call(this),this.loggerProvider=new Yk(n.loggerProvider||new le),Object.prototype.hasOwnProperty.call(n,"logLevel")&&this.loggerProvider.enable(n.logLevel),this.currentPageUrl=ox(),this.identifiers=new Qx({sessionId:n.sessionId,deviceId:n.deviceId}),y=Date.now(),function(e,t,n){var r,i,o=eE();if(o){var s=Yx(e);try{for(var a=[],u=0;u<o.length;u++)if((h=o.key(u))&&h.startsWith(s)){var l=o.getItem(h);if(null!==l){var c=Number(l);(!Number.isFinite(c)||c<=0||t-c>=Xx)&&a.push(h)}}try{for(var d=qt(a),f=d.next();!f.done;f=d.next()){var h=f.value;o.removeItem(h)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}catch(e){null==n||n.debug("Failed to prune stale replay start times: ".concat(String(e)))}}}(e,y,this.loggerProvider),this.sessionStartTime=void 0!==n.sessionId&&null!==(i=function(e,t,n,r){var i=eE();if(i){var o=Zx(e,t);try{var s=i.getItem(o);if(null!==s){var a=Number(s);if(Number.isFinite(a)&&a>0&&a<=n&&n-a<Xx)return a}return i.setItem(o,String(n)),n}catch(e){return void(null==r||r.debug("Failed to read/write replay start time from storage: ".concat(String(e))))}}}(e,n.sessionId,y,this.loggerProvider))&&void 0!==i?i:y,m=this,[4,Sx(e,n)];case 1:return m.joinedConfigGenerator=$.sent(),[4,this.joinedConfigGenerator.generateJoinedConfig()];case 2:return b=$.sent(),w=b.joinedConfig,_=b.localConfig,S=b.remoteConfig,this.config=w,this.setMetadata(n.sessionId,w,_,S,null===(o=n.version)||void 0===o?void 0:o.version,Ix,null===(s=n.version)||void 0===s?void 0:s.type),this.pageLeaveFns=[],n.sessionId&&(null===(a=this.config.interactionConfig)||void 0===a?void 0:a.enabled)&&(k=$x.default({sessionId:n.sessionId,type:"interaction"},this.config),this.pageLeaveFns=[k.send(this.getDeviceId.bind(this)).bind(k)],this.scrollHook=k.hook.bind(k),this.clickHandler=new Gx(this.loggerProvider,k)),x=[],"idb"!==(E=this.config.storeType)||(null===(u=K())||void 0===u?void 0:u.indexedDB)||(E="memory",this.loggerProvider.warn("Could not use preferred indexedDB storage, reverting to in memory option.")),this.loggerProvider.log("Using ".concat(E," for event storage.")),O=K(),this.config.useWebWorker&&O&&O.Worker?[4,Promise.resolve().then(function(){return Iv(),mf})]:[3,4];case 3:T=$.sent(),A=T.compressionScript,P=T.trackDestinationScript,C=A,I=P,$.label=4;case 4:return $.trys.push([4,6,,7]),[4,Ux({config:this.config,type:"replay",minInterval:null===(l=this.config.flushIntervalConfig)||void 0===l?void 0:l.minIntervalMs,maxInterval:null===(c=this.config.flushIntervalConfig)||void 0===c?void 0:c.maxIntervalMs,storeType:E,trackDestinationWorkerScript:I,shouldSend:function(){return!J.isBelowMinSessionDuration()}})];case 5:return R=$.sent(),this.rrwebEventManager=R,x.push({name:"replay",manager:R}),[3,7];case 6:return M=$.sent(),j=M,this.loggerProvider.warn("Error occurred while creating replay events manager: ".concat(j.toString())),[3,7];case 7:if(!(null===(d=this.config.interactionConfig)||void 0===d?void 0:d.enabled))return[3,11];N=this.config.interactionConfig.batch?Kx:Hx,$.label=8;case 8:return $.trys.push([8,10,,11]),[4,Ux({config:this.config,type:"interaction",minInterval:null!==(f=this.config.interactionConfig.trackEveryNms)&&void 0!==f?f:3e4,maxInterval:6e4,payloadBatcher:N,storeType:E,trackDestinationWorkerScript:I})];case 9:return L=$.sent(),x.push({name:"interaction",manager:L}),[3,11];case 10:return D=$.sent(),j=D,this.loggerProvider.warn("Error occurred while creating interaction events manager: ".concat(j.toString())),[3,11];case 11:if(this.eventsManager=new(zx.bind.apply(zx,Wt([void 0],zt(x),!1))),this.eventCompressor&&this.eventCompressor.terminate(),this.eventCompressor=new kx(this.eventsManager,this.config,this.getDeviceId(),C,function(){return J.sendEvents()}),this.pendingEmitEvents.length>0){U=this.pendingEmitEvents.splice(0);try{for(F=qt(U),B=F.next();!B.done;B=F.next())q=B.value,z=q.event,W=q.sessionId,this.eventCompressor.enqueueEvent(z,W)}catch(e){H={error:e}}finally{try{B&&!B.done&&(G=F.return)&&G.call(F)}finally{if(H)throw H.error}}}return this.pageLeaveFns=Wt(Wt([],zt(this.pageLeaveFns),!1),[function(){var e;if(J.config&&(null===(e=J.identifiers)||void 0===e?void 0:e.sessionId)&&R){var t=R.getBeaconEvents();if(t.length){var n=J.getDeviceId();n&&(J.isBelowMinSessionDuration()||R.trackDestination.sendBeacon({events:t,sessionId:J.identifiers.sessionId,deviceId:n,apiKey:J.config.apiKey,serverZone:J.config.serverZone}))}}}],!1),[4,this.initializeNetworkObservers()];case 12:return $.sent(),(null===(h=K())||void 0===h?void 0:h.opener)&&(V=cn(),dn(V),V.setup(t({logger:this.loggerProvider},this.config.serverZone&&{endpoint:hc[this.config.serverZone]}))),this.loggerProvider.log("Installing @amplitude/session-replay-browser."),this.teardownEventListeners(!1),[4,this.evaluateTargetingAndCapture({userProperties:n.userProperties,page:this.getCurrentPageForTargeting()},!0)];case 13:return $.sent(),(this.config.targetingConfig||(null!==(g=null===(v=null===(p=this.config.privacyConfig)||void 0===p?void 0:p.urlMaskLevels)||void 0===v?void 0:v.length)&&void 0!==g?g:0)>0)&&this.setupUrlChangeListener(),[2]}})})},e.prototype.setSessionId=function(e,t){return ne(this.asyncSetSessionId(e,t))},e.prototype.asyncSetSessionId=function(e,t,n){var r,i,o;return Ft(this,void 0,void 0,function(){var s,a,u,l;return Bt(this,function(c){switch(c.label){case 0:return this.latestUrlChangeTargetingEvaluationId++,this.sessionTargetingMatch=!1,this.lastShouldRecordDecision=void 0,(s=this.identifiers&&this.identifiers.sessionId)&&this.sendEvents(s),(a=s!==e)&&(null===(r=this.rrwebEventManager)||void 0===r||r.dropPendingBeaconEvents()),u=t||this.getDeviceId(),this.identifiers=new Qx({sessionId:e,deviceId:u}),a&&(this.sessionStartTime=Date.now(),this.suppressedSendCount=0,this.hasEmittedGateDecision=!1,(null===(i=this.config)||void 0===i?void 0:i.apiKey)&&(function(e,t,n,r){var i=eE();if(i)try{i.setItem(Zx(e,t),String(n))}catch(e){null==r||r.debug("Failed to write replay start time to storage: ".concat(String(e)))}}(this.config.apiKey,e,this.sessionStartTime,this.loggerProvider),void 0!==s&&function(e,t,n){var r=eE();if(r)try{r.removeItem(Zx(e,t))}catch(e){null==n||n.debug("Failed to remove replay start time from storage: ".concat(String(e)))}}(this.config.apiKey,s,this.loggerProvider))),this.joinedConfigGenerator&&s?[4,this.joinedConfigGenerator.generateJoinedConfig()]:[3,2];case 1:l=c.sent().joinedConfig,this.config=l,c.label=2;case 2:return(null===(o=this.config)||void 0===o?void 0:o.targetingConfig)?[4,this.evaluateTargetingAndCapture({userProperties:null==n?void 0:n.userProperties,page:this.getCurrentPageForTargeting()},!1,!0)]:[3,4];case 3:return c.sent(),[3,6];case 4:return[4,this.recordEvents()];case 5:c.sent(),c.label=6;case 6:return[2]}})})},e.prototype.getSessionReplayProperties=function(){var e,t=this.config,n=this.identifiers;if(!t||!n)return this.loggerProvider.warn("Session replay init has not been called, cannot get session replay properties."),{};var r=this.getShouldRecord(),i={};return r&&((e={})[Lk]=n.sessionReplayId?n.sessionReplayId:null,i=e,t.debugMode&&(i[Fk]=JSON.stringify({appHash:We(t.apiKey).toString()}))),this.addCustomRRWebEvent(Rk.GET_SR_PROPS,{shouldRecord:r,eventProperties:i},10===this.eventCount),10===this.eventCount&&(this.eventCount=0),this.eventCount++,i},e.prototype.sendEvents=function(e){var t,n,r=e||(null===(t=this.identifiers)||void 0===t?void 0:t.sessionId),i=this.getDeviceId();if(this.eventsManager&&r&&i){if(this.isBelowMinSessionDuration()){var o=this.sessionStartTime,s=this.config.minSessionDurationMs;return this.loggerProvider.log("Session ".concat(r," not sent: duration ").concat(Date.now()-o,"ms is below minimum ").concat(s,"ms.")),void this.suppressedSendCount++}if(!this.hasEmittedGateDecision&&void 0!==(null===(n=this.config)||void 0===n?void 0:n.minSessionDurationMs)&&this.recordCancelCallback&&this.recordFunction){this.hasEmittedGateDecision=!0;var a=void 0!==this.sessionStartTime?Date.now()-this.sessionStartTime:void 0;this.addCustomRRWebEvent(Rk.REPLAY_GATE_DECISION,{sessionId:r,suppressedSendCount:this.suppressedSendCount,elapsedMs:a,minSessionDurationMs:this.config.minSessionDurationMs},!1)}this.eventsManager.sendCurrentSequenceEvents({sessionId:r,deviceId:i})}},e.prototype.initialize=function(e){var t;return void 0===e&&(e=!1),Ft(this,void 0,void 0,function(){var n;return Bt(this,function(r){return(null===(t=this.identifiers)||void 0===t?void 0:t.sessionId)?(n=this.getDeviceId())?(this.eventsManager&&e&&this.eventsManager.sendStoredEvents({deviceId:n}),[2,this.recordEvents()]):(this.loggerProvider.log("Session is not being recorded due to lack of device id."),[2,Promise.resolve()]):(this.loggerProvider.log("Session is not being recorded due to lack of session id."),[2,Promise.resolve()])})})},e.prototype.shouldOptOut=function(){var e,t,n;(null===(e=this.config)||void 0===e?void 0:e.instanceName)&&(n=Pe(this.config.instanceName).identityStore.getIdentity().optOut);return void 0!==n?n:null===(t=this.config)||void 0===t?void 0:t.optOut},e.prototype.getShouldRecord=function(){if(!this.identifiers||!this.config||!this.identifiers.sessionId)return this.loggerProvider.warn("Session is not being recorded due to lack of config, please call sessionReplay.init."),!1;if(!this.config.captureEnabled)return this.loggerProvider.log("Session ".concat(this.identifiers.sessionId," not being captured due to capture being disabled for project or because the remote config could not be fetched.")),!1;if(this.shouldOptOut())return this.loggerProvider.log("Opting session ".concat(this.identifiers.sessionId," out of recording due to optOut config.")),!1;var e,t,n=!1,r="",i=!1;this.config.targetingConfig?this.sessionTargetingMatch?(r="Capturing replays for session ".concat(this.identifiers.sessionId," due to matching targeting conditions."),this.loggerProvider.log(r),n=!0,i=!0):(r="Not capturing replays for session ".concat(this.identifiers.sessionId," due to not matching targeting conditions."),this.loggerProvider.log(r),n=!1,i=!1):(e=this.identifiers.sessionId,t=this.config.sampleRate,vu(e.toString())%1e6/1e6<t)?(n=!0,i=!0):(r="Opting session ".concat(this.identifiers.sessionId," out of recording due to sample rate."),this.loggerProvider.log(r),n=!1,i=!1);return this.lastShouldRecordDecision!==n&&this.config.targetingConfig&&(this.addCustomRRWebEvent(Rk.TARGETING_DECISION,{message:r,sessionId:this.identifiers.sessionId,matched:i,targetingParams:this.lastTargetingParams}),this.lastShouldRecordDecision=n),n},e.prototype.getBlockSelectors=function(){var e,t,n,r=null!==(n=null===(t=null===(e=this.config)||void 0===e?void 0:e.privacyConfig)||void 0===t?void 0:t.blockSelector)&&void 0!==n?n:[];if(0!==r.length)return r},e.prototype.getMaskTextSelectors=function(){var e,t,n=null===(e=this.config)||void 0===e?void 0:e.privacyConfig;if("conservative"===(n?tx(this.currentPageUrl,n):void 0))return"*";if(null===(t=null==n?void 0:n.urlMaskLevels)||void 0===t?void 0:t.some(function(e){return"conservative"===e.maskLevel}))return"*";var r=null==n?void 0:n.urlMaskLevels;if("conservative"===(null==n?void 0:n.defaultMaskLevel)&&r&&r.length>0)return"*";var i=null==n?void 0:n.maskSelector;return i||void 0},e.prototype.getRecordingPlugins=function(e){var t,n,r,i,o,s;return Ft(this,void 0,void 0,function(){var a,u,l,c;return Bt(this,function(d){switch(d.label){case 0:a=[];try{u=yu({ugcFilterRules:(null===(n=null===(t=this.config)||void 0===t?void 0:t.interactionConfig)||void 0===n?void 0:n.ugcFilterRules)||[],enablePolling:(null===(r=this.config)||void 0===r?void 0:r.enableUrlChangePolling)||!1,pollingInterval:null===(i=this.config)||void 0===i?void 0:i.urlChangePollingInterval,captureDocumentTitle:null===(o=this.config)||void 0===o?void 0:o.captureDocumentTitle}),a.push(u)}catch(e){this.loggerProvider.warn("Failed to create URL tracking plugin:",e)}if(!(null===(s=null==e?void 0:e.console)||void 0===s?void 0:s.enabled))return[3,4];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,Promise.resolve().then(function(){return Cb(),Ov})];case 2:return l=d.sent().getRecordConsolePlugin,a.push(l({level:e.console.levels})),[3,4];case 3:return c=d.sent(),this.loggerProvider.warn("Failed to load console plugin:",c),[3,4];case 4:return[2,a.length>0?a:void 0]}})})},e.prototype.getRecordFunction=function(){return Ft(this,void 0,void 0,function(){var e,t;return Bt(this,function(n){switch(n.label){case 0:if(this.recordFunction)return[2,this.recordFunction];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,Promise.resolve().then(function(){return jb(),Ib})];case 2:return e=n.sent().record,this.recordFunction=e,[2,e];case 3:return t=n.sent(),this.loggerProvider.warn("Failed to load rrweb-record module:",t),[2,null];case 4:return[2]}})})},e.prototype.recordEvents=function(e){return void 0===e&&(e=!0),Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){switch(n.label){case 0:if(this.recordEventsInFlight)return this.recordEventsPendingShouldLogMetadata=e,[2];this.recordEventsInFlight=!0,n.label=1;case 1:return n.trys.push([1,,6,7]),[4,this._recordEvents(e)];case 2:n.sent(),n.label=3;case 3:return null===this.recordEventsPendingShouldLogMetadata?[3,5]:(t=this.recordEventsPendingShouldLogMetadata,this.recordEventsPendingShouldLogMetadata=null,[4,this._recordEvents(t)]);case 4:return n.sent(),[3,3];case 5:return[3,7];case 6:return this.recordEventsInFlight=!1,this.recordEventsPendingShouldLogMetadata=null,[7];case 7:return[2]}})})},e.prototype._recordEvents=function(e){var n,r,i,o,s,a,u,l;return void 0===e&&(e=!0),Ft(this,void 0,void 0,function(){var c,d,f,h,p,v,g,y,m,b,w,_,S,k,x,E,C,I,O,T=this;return Bt(this,function(A){switch(A.label){case 0:return c=this.config,d=this.getShouldRecord(),f=null===(n=this.identifiers)||void 0===n?void 0:n.sessionId,d&&f&&c?(this.stopRecordingEvents(),[4,this.getRecordFunction()]):[2];case 1:return(h=A.sent())?[4,this.initializeNetworkObservers()]:[2];case 2:A.sent(),p=null===(r=c.loggingConfig)||void 0===r?void 0:r.network,v=Fa(c.serverZone,c.trackServerUrl),g=[zk,Wk,Vk,v],null===(i=this.networkObservers)||void 0===i||i.start(function(e){g.some(function(t){return e.url.startsWith(t)})||T.addCustomRRWebEvent(Rk.FETCH_REQUEST,e)},p),y=c.interactionConfig,m=c.loggingConfig,b=(null==y?void 0:y.enabled)?{mouseInteraction:this.eventsManager&&(null===(o=this.clickHandler)||void 0===o?void 0:o.createHook({eventsManager:this.eventsManager,sessionId:f,deviceIdFn:this.getDeviceId.bind(this),mirror:h.mirror,ugcFilterRules:null!==(s=y.ugcFilterRules)&&void 0!==s?s:[],performanceOptions:null===(a=c.performanceConfig)||void 0===a?void 0:a.interaction})),scroll:this.scrollHook}:{},w=(null==y?void 0:y.enabled)&&y.ugcFilterRules?y.ugcFilterRules:[],this.loggerProvider.log("Session Replay capture beginning for ".concat(f,".")),A.label=3;case 3:return A.trys.push([3,5,,6]),_=!!(null===(u=c.crossOriginIframes)||void 0===u?void 0:u.enabled),S=!1!==(null===(l=c.crossOriginIframes)||void 0===l?void 0:l.coordinateChildren),(k=_&&function(){try{var e=K();return!!e&&e.parent!==e}catch(e){return!0}}())&&S?(this.crossOriginParentSignalCleanup=function(e){var t=K();if(!t)return function(){};var n=t.parent;function r(t){if(t.source===n){var r=t.data;(null==r?void 0:r.type)===Xk&&("start"===r.action?e.onStart():"stop"===r.action&&e.onStop())}}return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}({onStart:function(){return T._recordEventsInChildMode(h,f,c,b)},onStop:function(){try{T.recordCancelCallback&&T.recordCancelCallback(),T.recordCancelCallback=null}catch(t){var e=t;T.loggerProvider.warn("Error occurred while stopping child iframe replay capture: ".concat(e.toString()))}}}),[2]):(x=this,E=h,C=[t({},this.buildRRWebRecordOptions(c,b,function(e){if(T.shouldOptOut())return T.loggerProvider.log("Opting session ".concat(f," out of recording due to optOut config.")),T.stopRecordingEvents(),void T.sendEvents();e.type===yx.Meta&&(e.data.href=ux(e.data.href,w)),T.eventCompressor?T.eventCompressor.enqueueEvent(e,f):T.pendingEmitEvents.push({event:e,sessionId:f})},"Error while capturing replay: "))],O={},[4,this.getRecordingPlugins(m)]);case 4:return x.recordCancelCallback=E.apply(void 0,[t.apply(void 0,C.concat([(O.plugins=A.sent(),O.recordCrossOriginIframes=_,O)]))]),_&&!k&&S&&(this.crossOriginIframeCoordinator||(this.crossOriginIframeCoordinator=new dE),this.crossOriginIframeCoordinator.start()),this.addCustomRRWebEvent(Rk.DEBUG_INFO),e&&this.addCustomRRWebEvent(Rk.METADATA,this.metadata),[3,6];case 5:return I=A.sent(),this.loggerProvider.warn("Failed to initialize session replay:",I),[3,6];case 6:return[2]}})})},e.prototype.buildRRWebRecordOptions=function(e,n,r,i){var o=this,s=e.privacyConfig;return t(t({emit:r,inlineStylesheet:e.shouldInlineStylesheet,hooks:n,maskAllInputs:!0,maskTextClass:Bk,blockClass:"amp-block",blockSelector:this.getBlockSelectors(),applyBackgroundColorToBlockedElements:e.applyBackgroundColorToBlockedElements,maskInputFn:rx("input",s,function(){return o.currentPageUrl}),maskTextFn:rx("text",s,function(){return o.currentPageUrl}),maskAttributeFn:ix(s,function(){return o.currentPageUrl}),maskTextSelector:this.getMaskTextSelectors()},void 0!==e.fullSnapshotIntervalMs&&{checkoutEveryNms:e.fullSnapshotIntervalMs}),{recordCanvas:!1,captureAdoptedStyleSheets:e.captureAdoptedStyleSheets,slimDOMOptions:{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0},errorHandler:function(e){var t=e;if(t.message.includes("insertRule")&&t.message.includes("CSSStyleSheet"))throw t;if(t._external_)throw t;return o.loggerProvider.warn(i,t.toString()),!0}})},e.prototype._recordEventsInChildMode=function(e,n,r,i){try{this.recordCancelCallback&&this.recordCancelCallback(),this.recordCancelCallback=null,this.recordCancelCallback=e(t(t({},this.buildRRWebRecordOptions(r,i,function(){},"Error while capturing replay (child iframe): ")),{recordCrossOriginIframes:!0})),this.loggerProvider.log("Session Replay child iframe capture beginning for session ".concat(n,"."))}catch(e){this.loggerProvider.warn("Failed to initialize session replay in child iframe mode:",e)}},e.prototype.getDeviceId=function(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.deviceId},e.prototype.getSessionId=function(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.sessionId},e.prototype.flush=function(e){var t;return void 0===e&&(e=!1),Ft(this,void 0,void 0,function(){return Bt(this,function(n){return[2,null===(t=this.eventsManager)||void 0===t?void 0:t.flush(e)]})})},e.prototype.shutdown=function(){var e,t;null===(e=this.urlChangeCleanup)||void 0===e||e.call(this),null===(t=this.crossOriginParentSignalCleanup)||void 0===t||t.call(this),this.crossOriginParentSignalCleanup=null,this.teardownEventListeners(!0),this.stopRecordingEvents(),this.sendEvents()},e.prototype.mapSDKType=function(e){return"plugin"===e?"@amplitude/plugin-session-replay-browser":"segment"===e?"@amplitude/segment-session-replay-plugin":null},e.prototype.setMetadata=function(e,t,n,r,i,o,s){var a=(null==e?void 0:e.toString())?We(e.toString()):void 0;this.metadata={joinedConfig:t,localConfig:n,remoteConfig:r,sessionId:e,hashValue:a,sampleRate:t.sampleRate,replaySDKType:this.mapSDKType(s),replaySDKVersion:i,standaloneSDKType:"@amplitude/session-replay-browser",standaloneSDKVersion:o}},e.prototype.initializeNetworkObservers=function(){var e,t,n;return Ft(this,void 0,void 0,function(){var r,i;return Bt(this,function(o){switch(o.label){case 0:if(!(null===(n=null===(t=null===(e=this.config)||void 0===e?void 0:e.loggingConfig)||void 0===t?void 0:t.network)||void 0===n?void 0:n.enabled)||this.networkObservers)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,Promise.resolve().then(function(){return Fb(),Ub})];case 2:return r=o.sent().NetworkObservers,this.networkObservers=new r,[3,4];case 3:return i=o.sent(),this.loggerProvider.warn("Failed to import or instantiate NetworkObservers:",i),[3,4];case 4:return[2]}})})},e}(),hE=function(e){return function(){var t=e.config||dx();return{logger:t.loggerProvider,logLevel:t.logLevel}}},pE=(cE=new fE,{init:be(cE.init.bind(cE),"init",hE(cE)),evaluateTargetingAndCapture:be(cE.evaluateTargetingAndCapture.bind(cE),"evaluateTargetingAndRecord",hE(cE)),setSessionId:be(cE.setSessionId.bind(cE),"setSessionId",hE(cE)),getSessionId:be(cE.getSessionId.bind(cE),"getSessionId",hE(cE)),getSessionReplayProperties:be(cE.getSessionReplayProperties.bind(cE),"getSessionReplayProperties",hE(cE)),flush:be(cE.flush.bind(cE),"flush",hE(cE)),shutdown:be(cE.shutdown.bind(cE),"shutdown",hE(cE))}),vE=pE.init,gE=pE.setSessionId,yE=pE.getSessionId,mE=pE.getSessionReplayProperties,bE=pE.flush,wE=pE.shutdown,_E=pE.evaluateTargetingAndCapture;vl();var SE,kE,xE,EE,CE,IE;Gu(),(kE=SE||(SE={})).SET="$set",kE.SET_ONCE="$setOnce",kE.ADD="$add",kE.APPEND="$append",kE.PREPEND="$prepend",kE.REMOVE="$remove",kE.PREINSERT="$preInsert",kE.POSTINSERT="$postInsert",kE.UNSET="$unset",kE.CLEAR_ALL="$clearAll",(EE=xE||(xE={})).REVENUE_PRODUCT_ID="$productId",EE.REVENUE_QUANTITY="$quantity",EE.REVENUE_PRICE="$price",EE.REVENUE_TYPE="$revenueType",EE.REVENUE_CURRENCY="$currency",EE.REVENUE="$revenue",(IE=CE||(CE={})).IDENTIFY="$identify",IE.GROUP_IDENTIFY="$groupidentify",IE.REVENUE="revenue_amount";var OE=[SE.SET,SE.SET_ONCE,SE.ADD,SE.APPEND,SE.PREPEND,SE.POSTINSERT],TE="1.31.0",AE="".concat("[Amplitude]"," Session Replay ID"),PE=function(){function e(n){this.name=e.pluginName,this.type="enrichment",this.config=null,this.sessionReplay={flush:bE,getSessionId:yE,getSessionReplayProperties:mE,init:vE,setSessionId:gE,shutdown:wE,evaluateTargetingAndCapture:_E},this.options=t({forceSessionTracking:!1},n),this.srInitOptions=this.options}return e.prototype.setup=function(e,n){var r,i,o,s,a,u,l,c;return Ft(this,void 0,void 0,function(){var n,d,f;return Bt(this,function(h){switch(h.label){case 0:return h.trys.push([0,2,,3]),null==e||e.loggerProvider.log("Installing @amplitude/plugin-session-replay, version ".concat(TE,".")),this.config=e,this.options.forceSessionTracking&&("boolean"==typeof e.defaultTracking?!1===e.defaultTracking&&(e.defaultTracking={pageViews:!1,formInteractions:!1,fileDownloads:!1,sessions:!0}):e.defaultTracking=t(t({},e.defaultTracking),{sessions:!0})),n=(p=this.config.instanceName,void 0===p&&(p="$default_instance"),Ae.getInstance(p)).identityStore,d=n.getIdentity().userProperties,this.srInitOptions={instanceName:this.config.instanceName,deviceId:null!==(r=this.options.deviceId)&&void 0!==r?r:this.config.deviceId,optOut:this.config.optOut,sessionId:this.options.customSessionId?void 0:this.config.sessionId,loggerProvider:this.config.loggerProvider,logLevel:this.config.logLevel,flushMaxRetries:this.config.flushMaxRetries,serverZone:this.config.serverZone,configServerUrl:this.options.configServerUrl||(null===(i=this.config.remoteConfig)||void 0===i?void 0:i.serverUrl),trackServerUrl:this.options.trackServerUrl,sampleRate:this.options.sampleRate,privacyConfig:{blockSelector:null===(o=this.options.privacyConfig)||void 0===o?void 0:o.blockSelector,maskSelector:null===(s=this.options.privacyConfig)||void 0===s?void 0:s.maskSelector,unmaskSelector:null===(a=this.options.privacyConfig)||void 0===a?void 0:a.unmaskSelector,defaultMaskLevel:null===(u=this.options.privacyConfig)||void 0===u?void 0:u.defaultMaskLevel},debugMode:this.options.debugMode,shouldInlineStylesheet:this.options.shouldInlineStylesheet,version:{type:"plugin",version:TE},performanceConfig:this.options.performanceConfig,storeType:this.options.storeType,useWebWorker:null!==(l=this.options.useWebWorker)&&void 0!==l?l:null===(c=this.options.experimental)||void 0===c?void 0:c.useWebWorker,userProperties:d,applyBackgroundColorToBlockedElements:this.options.applyBackgroundColorToBlockedElements,interactionConfig:this.options.interactionConfig,captureDocumentTitle:this.options.captureDocumentTitle,enableUrlChangePolling:this.options.enableUrlChangePolling,urlChangePollingInterval:this.options.urlChangePollingInterval,captureAdoptedStyleSheets:this.options.captureAdoptedStyleSheets,crossOriginIframes:this.options.crossOriginIframes,flushIntervalConfig:this.options.flushIntervalConfig},[4,this.sessionReplay.init(e.apiKey,this.srInitOptions).promise];case 1:return h.sent(),[3,3];case 2:return f=h.sent(),null==e||e.loggerProvider.error("Session Replay: Failed to initialize due to ".concat(f.message)),[3,3];case 3:return[2]}var p})})},e.prototype.onSessionIdChanged=function(e){var t;return Ft(this,void 0,void 0,function(){return Bt(this,function(n){switch(n.label){case 0:return null===(t=this.config)||void 0===t||t.loggerProvider.debug("Analytics session id is changed to ".concat(e,", SR session id is ").concat(String(this.sessionReplay.getSessionId()),".")),[4,this.sessionReplay.setSessionId(e).promise];case 1:return n.sent(),[2]}})})},e.prototype.onOptOutChanged=function(e){var t;return Ft(this,void 0,void 0,function(){return Bt(this,function(n){switch(n.label){case 0:return null===(t=this.config)||void 0===t||t.loggerProvider.debug("optOut is changed to ".concat(String(e),", calling ").concat(e?"sessionReplay.shutdown()":"sessionReplay.init()",".")),e?(this.sessionReplay.shutdown(),[3,4]):[3,1];case 1:return null!=this.config?[4,this.sessionReplay.init(this.config.apiKey,this.srInitOptions).promise]:[3,3];case 2:n.sent(),n.label=3;case 3:n.label=4;case 4:return[2]}})})},e.prototype.execute=function(e){var n,i,o;return Ft(this,void 0,void 0,function(){var s,a,u,l,c;return Bt(this,function(d){switch(d.label){case 0:return d.trys.push([0,9,,10]),this.options.customSessionId?(s=this.options.customSessionId(e))?s===this.sessionReplay.getSessionId()?[3,2]:[4,this.sessionReplay.setSessionId(s).promise]:[3,3]:[3,4];case 1:d.sent(),d.label=2;case 2:l=this.sessionReplay.getSessionReplayProperties(),e.event_properties=t(t({},e.event_properties),l),d.label=3;case 3:return[3,8];case 4:return(s=null===(n=this.config)||void 0===n?void 0:n.sessionId)&&s!==this.sessionReplay.getSessionId()?[4,this.sessionReplay.setSessionId(s).promise]:[3,6];case 5:d.sent(),d.label=6;case 6:return s&&s===e.session_id?(a=void 0,e.event_type===r.IDENTIFY&&(a=function(e){if(e.user_properties){var n={};return Object.keys(e.user_properties).forEach(function(r){if(OE.includes(r)){var i=e.user_properties&&e.user_properties[r];n=t(t({},n),i)}}),n}}(e)),u=K(),[4,this.sessionReplay.evaluateTargetingAndCapture({event:e,userProperties:a,page:null!=(null===(i=null==u?void 0:u.location)||void 0===i?void 0:i.href)?{url:u.location.href}:void 0})]):[3,8];case 7:d.sent(),l=this.sessionReplay.getSessionReplayProperties(),e.event_properties=t(t({},e.event_properties),l),d.label=8;case 8:return e.event_type===r.IDENTIFY&&e.event_properties&&delete e.event_properties[AE],[2,Promise.resolve(e)];case 9:return c=d.sent(),null===(o=this.config)||void 0===o||o.loggerProvider.error("Session Replay: Failed to enrich event due to ".concat(c.message)),[2,Promise.resolve(e)];case 10:return[2]}})})},e.prototype.teardown=function(){var e;return Ft(this,void 0,void 0,function(){return Bt(this,function(t){try{this.sessionReplay.shutdown(),this.config=null}catch(t){null===(e=this.config)||void 0===e||e.loggerProvider.error("Session Replay: teardown failed due to ".concat(t.message))}return[2]})})},e.prototype.getSessionReplayProperties=function(){return this.sessionReplay.getSessionReplayProperties()},e.pluginName="@amplitude/plugin-session-replay-browser",e}();Gu();var RE,ME=function(e,t){return(ME=Object.setPrototypeOf||_instanceof({__proto__:[]},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)},NE=function(){return NE=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},NE.apply(this,arguments)},LE="is",DE="is not",jE="contains",UE="does not contain",FE="less",BE="less or equal",qE="greater",zE="greater or equal",WE="version less",VE="version less or equal",HE="version greater",KE="version greater or equal",GE="set is",JE="set is not",$E="set contains",QE="set does not contain",XE="set contains any",YE="set does not contain any",ZE="regex match",eC="regex does not match",tC=-862048943,nC=461845907,rC=function(e,t){void 0===t&&(t=0);for(var n=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296==(64512&i)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return Uint8Array.from(t)}(e),r=n.length,i=r>>2,o=t,s=0;s<i;s++){var a=aC(n,s<<2);o=iC(a,o)}var u=i<<2,l=0;switch(r-u){case 3:l^=n[u+2]<<16,l^=n[u+1]<<8,l^=n[u],l=Math.imul(l,tC),l=sC(l,15),o^=l=Math.imul(l,nC);break;case 2:l^=n[u+1]<<8,l^=n[u],l=Math.imul(l,tC),l=sC(l,15),o^=l=Math.imul(l,nC);break;case 1:l^=n[u],l=Math.imul(l,tC),l=sC(l,15),o^=l=Math.imul(l,nC)}return oC(o^=r)>>>0},iC=function(e,t){var n=e,r=t;return n=Math.imul(n,tC),n=sC(n,15),n=Math.imul(n,nC),r=sC(r^=n,13),(r=Math.imul(r,5))+-430675100|0},oC=function(e){var t=e;return t^=t>>>16,t=Math.imul(t,-2048144789),t^=t>>>13,t=Math.imul(t,-1028477387),t^=t>>>16},sC=function(e,t,n){return void 0===n&&(n=32),t>n&&(t%=n),(e<<t|(e&4294967295<<n-t>>>0)>>>0>>>n-t>>>0)>>>0},aC=function(e,t){void 0===t&&(t=0);var n=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return uC(n)},uC=function(e){return(-16777216&e)>>>24|(16711680&e)>>>8|(65280&e)<<8|(255&e)<<24},lC=function(e,t){var n,r;if(t&&0!==t.length){try{for(var i=_u(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!s||!e||"object"!==(void 0===e?"undefined":_type_of(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 null==e?void 0:e}},cC="^".concat("(\\d+)\\.(\\d+)","(\\.").concat("(\\d+)").concat("(-(([-\\w]+\\.?)*))?",")?$"),dC=function(){function e(e,t,n,r){void 0===r&&(r=void 0),this.major=e,this.minor=t,this.patch=n,this.preRelease=r}return e.parse=function(t){if(t){var n=new RegExp(cC).exec(t);if(n){var r=Number(n[1]),i=Number(n[2]);if(!isNaN(r)&&!isNaN(i))return new e(r,i,Number(n[4])||0,n[5]||void 0)}}},e.prototype.compareTo=function(e){return this.major>e.major?1:this.major<e.major?-1:this.minor>e.minor?1:this.minor<e.minor?-1:this.patch>e.patch?1:this.patch<e.patch||this.preRelease&&!e.preRelease?-1:!this.preRelease&&e.preRelease?1:this.preRelease&&e.preRelease?this.preRelease>e.preRelease?1:this.preRelease<e.preRelease?-1:0:0},e}(),fC=function(){function e(){}return e.prototype.evaluate=function(e,t){var n,r,i={},o={context:e,result:i};try{for(var s=_u(t),a=s.next();!a.done;a=s.next()){var u=a.value,l=this.evaluateFlag(o,u);l&&(i[u.key]=l)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i},e.prototype.evaluateWithTraces=function(e,t){var n,r,i={},o={},s={context:e,result:i};try{for(var a=_u(t),u=a.next();!u.done;u=a.next()){var l=u.value,c=this.evaluateFlagWithTrace(s,l),d=c.variant,f=c.trace;d&&(i[l.key]=d),o[l.key]=f}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return{results:i,traces:o}},e.prototype.evaluateFlag=function(e,t){var n,r,i;try{for(var o=_u(t.segments),s=o.next();!s.done;s=o.next()){var a=s.value;if(i=this.evaluateSegment(e,t,a)){var u=NE(NE(NE({},t.metadata),a.metadata),i.metadata);i=NE(NE({},i),{metadata:u});break}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},e.prototype.evaluateFlagWithTrace=function(e,t){var n,r,i,o,s,a,u,l,c,d,f,h=[];try{for(var p=_u(t.segments),v=p.next();!v.done;v=p.next()){var g=v.value;if(g.conditions){var y=[],m=!1;try{for(var b=(i=void 0,_u(g.conditions)),w=b.next();!w.done;w=b.next()){var _=w.value,S=!0,k=[];try{for(var x=(s=void 0,_u(_)),E=x.next();!E.done;E=x.next()){var C=E.value,I=lC(e,C.selector),O=this.matchCondition(e,C);if(k.push({propValue:I,condition:C,matched:O}),!O){S=!1;break}}}catch(e){s={error:e}}finally{try{E&&!E.done&&(a=x.return)&&a.call(x)}finally{if(s)throw s.error}}if(y.push(k),S){m=!0;break}}}catch(e){i={error:e}}finally{try{w&&!w.done&&(o=b.return)&&o.call(b)}finally{if(i)throw i.error}}var T=!1,A=void 0;m&&(T=void 0!==(A=this.bucket(e,g))),h.push({segmentMetadata:g.metadata,conditionsPassed:m,bucketed:T,bucketVariant:A,conditionResult:y,matched:m&&T}),m&&void 0!==A&&!c&&(c=t.variants[A],d=g,f=null===(l=g.metadata)||void 0===l?void 0:l.segmentName)}else{var P=this.bucket(e,g),R=void 0!==P;h.push({segmentMetadata:g.metadata,conditionsPassed:!0,bucketed:R,bucketVariant:P,conditionResult:void 0,matched:R}),c||void 0===P||(c=t.variants[P],d=g,f=null===(u=g.metadata)||void 0===u?void 0:u.segmentName)}}}catch(e){n={error:e}}finally{try{v&&!v.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}if(c&&d){var M=NE(NE(NE({},t.metadata),d.metadata),c.metadata);c=NE(NE({},c),{metadata:M})}return{variant:c,trace:{flagKey:t.key,matched:void 0!==c,matchedSegment:f,steps:h}}},e.prototype.evaluateSegment=function(e,t,n){var r;return n.conditions?this.evaluateConditions(e,n.conditions)&&void 0!==(r=this.bucket(e,n))?t.variants[r]:void 0:void 0!==(r=this.bucket(e,n))?t.variants[r]:void 0},e.prototype.evaluateConditions=function(e,t){var n,r,i,o;try{for(var s=_u(t),a=s.next();!a.done;a=s.next()){var u=a.value,l=!0;try{for(var c=(i=void 0,_u(u)),d=c.next();!d.done;d=c.next()){var f=d.value;if(!(l=this.matchCondition(e,f)))break}}catch(e){i={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}if(l)return!0}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return!1},e.prototype.matchCondition=function(e,t){var n=lC(e,t.selector);if(null==n)return this.matchNull(t.op,t.values);var r=this.coerceStringArray(n);if(this.isSetOperator(t.op))return!!r&&this.matchSet(r,t.op,t.values);if(r)return this.matchStringsNonSet(r,t.op,t.values);var i=this.coerceString(n);return void 0!==i&&this.matchString(i,t.op,t.values)},e.prototype.getHash=function(e){return rC(e)},e.prototype.bucket=function(e,t){var n,r,i,o;if(!t.bucket)return t.variant;var s=this.coerceString(lC(e,t.bucket.selector));if(!s||0===s.length)return t.variant;var a="".concat(t.bucket.salt,"/").concat(s),u=this.getHash(a),l=u%100,c=Math.floor(u/100);try{for(var d=_u(t.bucket.allocations),f=d.next();!f.done;f=d.next()){var h=f.value,p=h.range[0],v=h.range[1];if(l>=p&&l<v)try{for(var g=(i=void 0,_u(h.distributions)),y=g.next();!y.done;y=g.next()){var m=y.value,b=m.range[0],w=m.range[1];if(c>=b&&c<w)return m.variant}}catch(e){i={error:e}}finally{try{y&&!y.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}return t.variant},e.prototype.matchNull=function(e,t){var n=this.containsNone(t);switch(e){case LE:case jE:case FE:case BE:case qE:case zE:case WE:case VE:case HE:case KE:case GE:case $E:case XE:return n;case DE:case UE:case QE:case YE:return!n;default:return!1}},e.prototype.matchSet=function(e,t,n){switch(t){case GE:return this.setEquals(e,n);case JE:return!this.setEquals(e,n);case $E:return this.matchesSetContainsAll(e,n);case QE:return!this.matchesSetContainsAll(e,n);case XE:return this.matchesSetContainsAny(e,n);case YE:return!this.matchesSetContainsAny(e,n);default:return!1}},e.prototype.matchString=function(e,t,n){var r=this;switch(t){case LE:return this.matchesIs(e,n);case DE:return!this.matchesIs(e,n);case jE:return this.matchesContains(e,n);case UE:return!this.matchesContains(e,n);case FE:case BE:case qE:case zE:return this.matchesComparable(e,t,n,function(e){return r.parseNumber(e)},this.comparator);case WE:case VE:case HE:case KE:return this.matchesComparable(e,t,n,function(e){return dC.parse(e)},this.versionComparator);case ZE:return this.matchesRegex(e,n);case eC:return!this.matchesRegex(e,n);default:return!1}},e.prototype.matchStringsNonSet=function(e,t,n){var r=this;return e.some(function(e){return r.matchString(e,t,n)})},e.prototype.matchesIs=function(e,t){if(this.containsBooleans(t)){var n=e.toLowerCase();if("true"===n||"false"===n)return t.some(function(e){return e.toLowerCase()===n})}return t.some(function(t){return e===t})},e.prototype.matchesContains=function(e,t){var n,r;try{for(var i=_u(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(e.toLowerCase().includes(s.toLowerCase()))return!0}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1},e.prototype.matchesComparable=function(e,t,n,r,i){var o=this,s=r(e),a=n.map(function(e){return r(e)}).filter(function(e){return void 0!==e});return void 0===s||0===a.length?n.some(function(n){return o.comparator(e,t,n)}):a.some(function(e){return i(s,t,e)})},e.prototype.comparator=function(e,t,n){switch(t){case FE:case WE:return e<n;case BE:case VE:return e<=n;case qE:case HE:return e>n;case zE:case KE:return e>=n;default:return!1}},e.prototype.versionComparator=function(e,t,n){var r=e.compareTo(n);switch(t){case FE:case WE:return r<0;case BE:case VE:return r<=0;case qE:case HE:return r>0;case zE:case KE:return r>=0;default:return!1}},e.prototype.matchesRegex=function(e,t){return t.some(function(t){return Boolean(new RegExp(t).exec(e))})},e.prototype.containsNone=function(e){return e.some(function(e){return"(none)"===e})},e.prototype.containsBooleans=function(e){return e.some(function(e){switch(e.toLowerCase()){case"true":case"false":return!0;default:return!1}})},e.prototype.parseNumber=function(e){var t;return null!==(t=Number(e))&&void 0!==t?t:void 0},e.prototype.coerceString=function(e){if(null!=e)return"object"===(void 0===e?"undefined":_type_of(e))?JSON.stringify(e):String(e)},e.prototype.coerceStringArray=function(e){var t=this;if(Array.isArray(e))return e.map(function(e){return t.coerceString(e)}).filter(Boolean);var n=String(e);if(n.startsWith("["))try{var r=JSON.parse(n);return Array.isArray(r)?r.map(function(e){return t.coerceString(e)}).filter(Boolean):void 0}catch(e){return}},e.prototype.isSetOperator=function(e){switch(e){case GE:case JE:case $E:case QE:case XE:case YE:return!0;default:return!1}},e.prototype.setEquals=function(e,t){var n=new Set(e),r=new Set(t);return n.size===r.size&&ku([],Su(r),!1).every(function(e){return n.has(e)})},e.prototype.matchesSetContainsAll=function(e,t){var n,r;if(e.length<t.length)return!1;try{for(var i=_u(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!this.matchesIs(s,e))return!1}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0},e.prototype.matchesSetContainsAny=function(e,t){var n,r;try{for(var i=_u(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(this.matchesIs(s,e))return!0}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1},e}(),hC=function(e,t){var n,r,i=NE({},e),o=[],s=t||Object.keys(i);try{for(var a=_u(s),u=a.next();!u.done;u=a.next()){var l=u.value,c=pC(l,i);c&&o.push.apply(o,ku([],Su(c),!1))}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},pC=function(e,t,n){var r,i;void 0===n&&(n=[]);var o=t[e];if(o){if(!o.dependencies||0===o.dependencies.length)return delete t[o.key],[o];n.push(o.key);var s=[],a=function(e){if(n.some(function(t){return t===e}))throw Error("Detected a cycle between flags ".concat(n));var r=pC(e,t,n);r&&s.push.apply(s,ku([],Su(r),!1))};try{for(var u=_u(o.dependencies),l=u.next();!l.done;l=u.next()){a(l.value)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return s.push(o),n.pop(),delete t[o.key],s}},vC="function"==typeof Buffer,gC=("function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder?new TextEncoder:void 0),yC=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),mC=(RE={},yC.forEach(function(e,t){return RE[e]=t}),RE),bC=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,wC=String.fromCharCode.bind(String),_C=("function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array),function(e){return e.replace(/=/g,"").replace(/[+\/]/g,function(e){return"+"==e?"-":"_"})}),SC=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},kC=function(e){for(var t,n,r,i,o="",s=e.length%3,a=0;a<e.length;){if((n=e.charCodeAt(a++))>255||(r=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");o+=yC[(t=n<<16|r<<8|i)>>18&63]+yC[t>>12&63]+yC[t>>6&63]+yC[63&t]}return s?o.slice(0,s-3)+"===".substring(s):o},xC="function"==typeof btoa?function(e){return btoa(e)}:vC?function(e){return Buffer.from(e,"binary").toString("base64")}:kC,EC=vC?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],n=0,r=e.length;n<r;n+=4096)t.push(wC.apply(null,e.subarray(n,n+4096)));return xC(t.join(""))},CC=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?wC(192|t>>>6)+wC(128|63&t):wC(224|t>>>12&15)+wC(128|t>>>6&63)+wC(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return wC(240|t>>>18&7)+wC(128|t>>>12&63)+wC(128|t>>>6&63)+wC(128|63&t)},IC=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,OC=function(e){return e.replace(IC,CC)},TC=vC?function(e){return Buffer.from(e,"utf8").toString("base64")}:gC?function(e){return EC(gC.encode(e))}:function(e){return xC(OC(e))},AC=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?_C(TC(e)):TC(e)},PC=function(e){return AC(e,!0)},RC=function(e){if(e=e.replace(/\s+/g,""),!bC.test(e))throw new TypeError("malformed base64.");var t,n,r;e+="==".slice(2-(3&e.length));for(var i=[],o=0;o<e.length;)t=mC[e.charAt(o++)]<<18|mC[e.charAt(o++)]<<12|(n=mC[e.charAt(o++)])<<6|(r=mC[e.charAt(o++)]),64===n?i.push(wC(t>>16&255)):64===r?i.push(wC(t>>16&255,t>>8&255)):i.push(wC(t>>16&255,t>>8&255,255&t));return i.join("")},MC=PC,NC=function(e){function t(n,r){var i=e.call(this,r)||this;return i.statusCode=n,Object.setPrototypeOf(i,t.prototype),i}return mu(t,e),t}(Error),LC=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return mu(t,e),t}(Error),DC=function(){function e(e,t,n){this.deploymentKey=e,this.serverUrl=t,this.httpClient=n}return e.prototype.getVariants=function(e,t){return bu(this,void 0,void 0,function(){var n,r,i,o;return wu(this,function(s){switch(s.label){case 0:return n=MC(JSON.stringify(e)),r={Authorization:"Api-Key ".concat(this.deploymentKey),"X-Amp-Exp-User":n},(null==t?void 0:t.flagKeys)&&(r["X-Amp-Exp-Flag-Keys"]=MC(JSON.stringify(t.flagKeys))),(null==t?void 0:t.trackingOption)&&(r["X-Amp-Exp-Track"]=t.trackingOption),(null==t?void 0:t.exposureTrackingOption)&&(r["X-Amp-Exp-Exposure-Track"]=t.exposureTrackingOption),i=new URL("".concat(this.serverUrl,"/sdk/v2/vardata?v=0")),(null==t?void 0:t.evaluationMode)&&i.searchParams.append("eval_mode",null==t?void 0:t.evaluationMode),(null==t?void 0:t.deliveryMethod)&&i.searchParams.append("delivery_method",null==t?void 0:t.deliveryMethod),[4,this.httpClient.request({requestUrl:i.toString(),method:"GET",headers:r,timeoutMillis:null==t?void 0:t.timeoutMillis})];case 1:if(200!=(o=s.sent()).status)throw new NC(o.status,"Fetch error response: status=".concat(o.status));return[2,JSON.parse(o.body)]}})})},e}(),jC=function(){function e(e,t,n){this.deploymentKey=e,this.serverUrl=t,this.httpClient=n}return e.prototype.getFlags=function(e){return bu(this,void 0,void 0,function(){var t,n;return wu(this,function(r){switch(r.label){case 0:return t={Authorization:"Api-Key ".concat(this.deploymentKey)},(null==e?void 0:e.libraryName)&&(null==e?void 0:e.libraryVersion)&&(t["X-Amp-Exp-Library"]="".concat(e.libraryName,"/").concat(e.libraryVersion)),(null==e?void 0:e.user)&&(t["X-Amp-Exp-User"]=MC(JSON.stringify(e.user))),[4,this.httpClient.request({requestUrl:"".concat(this.serverUrl,"/sdk/v2/flags")+((null==e?void 0:e.deliveryMethod)?"?delivery_method=".concat(e.deliveryMethod):""),method:"GET",headers:t,timeoutMillis:null==e?void 0:e.timeoutMillis})];case 1:if(200!=(n=r.sent()).status)throw Error("Flags error response: status=".concat(n.status));return[2,JSON.parse(n.body).reduce(function(e,t){return e[t.key]=t,e},{})]}})})},e}(),UC="undefined"!=typeof globalThis?globalThis:global||self,FC=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},BC=function(){function e(e,t){this.poller=void 0,this.action=e,this.ms=t}return e.prototype.start=function(){this.poller||(this.poller=UC.setInterval(this.action,this.ms),this.action())},e.prototype.stop=function(){this.poller&&(UC.clearInterval(this.poller),this.poller=void 0)},e}();vl();var qC,zC,WC,VC,HC,KC,GC=Hu(Bb()),JC=(function(){function e(e){this.amplitudeInstance=e}e.prototype.getUser=function(){var e,t,n,r,i,o,s,a,u,l;return{device_id:null===(t=null===(e=this.amplitudeInstance)||void 0===e?void 0:e.options)||void 0===t?void 0:t.deviceId,user_id:null===(r=null===(n=this.amplitudeInstance)||void 0===n?void 0:n.options)||void 0===r?void 0:r.userId,version:null===(o=null===(i=this.amplitudeInstance)||void 0===i?void 0:i.options)||void 0===o?void 0:o.versionName,language:null===(a=null===(s=this.amplitudeInstance)||void 0===s?void 0:s.options)||void 0===a?void 0:a.language,platform:null===(l=null===(u=this.amplitudeInstance)||void 0===u?void 0:u.options)||void 0===l?void 0:l.platform,os:this.getOs(),device_model:this.getDeviceModel()}},e.prototype.getOs=function(){var e,t,n,r,i,o;return[null===(n=null===(t=null===(e=this.amplitudeInstance)||void 0===e?void 0:e._ua)||void 0===t?void 0:t.browser)||void 0===n?void 0:n.name,null===(o=null===(i=null===(r=this.amplitudeInstance)||void 0===r?void 0:r._ua)||void 0===i?void 0:i.browser)||void 0===o?void 0:o.major].filter(function(e){return null!=e}).join(" ")},e.prototype.getDeviceModel=function(){var e,t,n;return null===(n=null===(t=null===(e=this.amplitudeInstance)||void 0===e?void 0:e._ua)||void 0===t?void 0:t.os)||void 0===n?void 0:n.name}}(),function(){function e(e){this.amplitudeInstance=e}e.prototype.track=function(e){this.amplitudeInstance.logEvent(e.name,e.properties)},e.prototype.setUserProperty=function(e){var t,n;this.amplitudeInstance.setUserProperties(((t={})[e.userProperty]=null===(n=e.variant)||void 0===n?void 0:n.value,t))},e.prototype.unsetUserProperty=function(e){var t;this.amplitudeInstance._logEvent("$identify",null,null,{$unset:(t={},t[e.userProperty]="-",t)})}}(),function(){return JC=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},JC.apply(this,arguments)}),$C=function(e,t){var n,r;void 0===t&&(t=!1);var i=QC(e,t),o=void 0,s=UC.document.cookie.split("; ");try{for(var a=Cu(s),u=a.next();!u.done;u=a.next()){var l=u.value,c=Iu(l.split("=",2),2),d=c[0],f=c[1];d===i&&(o=decodeURIComponent(f))}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}if(o)try{if(t){var h=atob(o);return JSON.parse(decodeURIComponent(h))}var p=o.split("."),v=void 0;return p.length>=2&&p[1]&&(v=atob(p[1])),{deviceId:p[0],userId:v}}catch(e){return}},QC=function(e,t){if(t){if((null==e?void 0:e.length)<10)return;return"AMP_".concat(e.substring(0,10))}if(!((null==e?void 0:e.length)<6))return"amp_".concat(e.substring(0,6))},XC=function(){function e(e,t,n){this.type="integration",this.apiKey=e,this.identityStore=t.identityStore,this.eventBridge=t.eventBridge,this.contextProvider=t.applicationContextProvider,this.timeoutMillis=n,this.loadPersistedState(),n<=0&&(this.setup=void 0)}return e.prototype.setup=function(e,t){return xu(this,void 0,void 0,function(){return Eu(this,function(n){return(null==e?void 0:e.automaticFetchOnAmplitudeIdentityChange)&&this.identityStore.addIdentityListener(function(){null==t||t.fetch()}),[2,this.waitForConnectorIdentity(this.timeoutMillis)]})})},e.prototype.getUser=function(){var e=this.identityStore.getIdentity();return{user_id:e.userId,device_id:e.deviceId,user_properties:e.userProperties,version:this.contextProvider.versionName}},e.prototype.track=function(e){return!!this.eventBridge.receiver&&(this.eventBridge.logEvent({eventType:e.eventType,eventProperties:e.eventProperties}),!0)},e.prototype.loadPersistedState=function(){if(!this.apiKey||this.apiKey.startsWith("client-"))return!1;var e=$C(this.apiKey,!0);return(e||(e=$C(this.apiKey,!1))||(e=function(e){var t=QC(e,!0);try{var n=UC.localStorage.getItem(t);if(!n)return;var r=JSON.parse(n);if("object"!==(void 0===r?"undefined":_type_of(r)))return;return r}catch(e){return}}(this.apiKey))||!!(e=function(e){var t=QC(e,!0);try{var n=UC.sessionStorage.getItem(t);if(!n)return;var r=JSON.parse(n);if("object"!==(void 0===r?"undefined":_type_of(r)))return;return r}catch(e){return}}(this.apiKey)))&&(this.commitIdentityToConnector(e),!0)},e.prototype.commitIdentityToConnector=function(e){var t=this.identityStore.editIdentity();t.setDeviceId(e.deviceId),e.userId&&t.setUserId(e.userId),t.commit()},e.prototype.waitForConnectorIdentity=function(e){return xu(this,void 0,void 0,function(){var t,n=this;return Eu(this,function(r){return(t=this.identityStore.getIdentity()).userId||t.deviceId?[2]:[2,Promise.race([new Promise(function(e){var t=function(){e(),n.identityStore.removeIdentityListener(t)};n.identityStore.addIdentityListener(t)}),new Promise(function(t,n){UC.setTimeout(n,e,"Timed out waiting for Amplitude Analytics SDK to initialize.")})])]})})},e}(),YC=UC.fetch||function(e,t){return t=t||{},new Promise(function(n,r){var i=new XMLHttpRequest,o=[],s=[],a={},u=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(JSON.parse(i.responseText))},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return s},get:function(e){return a[e.toLowerCase()]},has:function(e){return e.toLowerCase()in a}}}};for(var l in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(e,t,n){o.push(t=t.toLowerCase()),s.push([t,n]),a[t]=a[t]?a[t]+","+n:n}),n(u())},i.onerror=r,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(l,t.headers[l]);i.send(t.body||null)})},ZC=function(){function e(e){this.client=e}return e.prototype.request=function(e){return xu(this,void 0,void 0,function(){return Eu(this,function(t){switch(t.label){case 0:return[4,this.client.request(e.requestUrl,e.method,e.headers,null,e.timeoutMillis)];case 1:return[2,t.sent()]}})})},e}(),eI={request:function(e,t,n,r,i){return function(e,t){return null==t||t<=0?e:new Promise(function(n,r){UC.setTimeout(function(){r(new LC("Request timeout after "+t+" milliseconds"))},t),e.then(n,r)})}(xu(void 0,void 0,void 0,function(){var i,o;return Eu(this,function(s){switch(s.label){case 0:return[4,YC(e,{method:t,headers:n,body:r})];case 1:return i=s.sent(),o={status:i.status},[4,i.text()];case 2:return o.body=s.sent(),[2,o]}})}),i)}};(zC=qC||(qC={}))[zC.Disable=0]="Disable",zC[zC.Error=1]="Error",zC[zC.Warn=2]="Warn",zC[zC.Info=3]="Info",zC[zC.Debug=4]="Debug",zC[zC.Verbose=5]="Verbose",(VC=WC||(WC={})).LocalStorage="localStorage",VC.InitialVariants="initialVariants",(KC=HC||(HC={})).LocalStorage="storage",KC.InitialVariants="initial",KC.SecondaryLocalStorage="secondary-storage",KC.SecondaryInitialVariants="secondary-initial",KC.FallbackInline="fallback-inline",KC.FallbackConfig="fallback-config",KC.LocalEvaluation="local-evaluation";var tI=function(e){return!e||e===HC.FallbackInline||e===HC.FallbackConfig||e===HC.SecondaryInitialVariants},nI={debug:!1,logLevel:qC.Error,loggerProvider:null,instanceName:"$default_instance",fallbackVariant:{},initialVariants:{},initialFlags:void 0,source:WC.LocalStorage,serverUrl:"https://api.lab.amplitude.com",flagsServerUrl:"https://flag.lab.amplitude.com",serverZone:"US",fetchTimeoutMillis:1e4,retryFetchOnFailure:!0,throwOnError:!1,automaticExposureTracking:!0,pollOnStart:!0,flagConfigPollingIntervalMillis:3e5,fetchOnStart:!0,automaticFetchOnAmplitudeIdentityChange:!1,userProvider:null,analyticsProvider:null,exposureTrackingProvider:null,httpClient:eI},rI="1.21.1",iI=function(){function e(e,t){var n,r=this;this.isReady=new Promise(function(e){r.resolve=e}),this.config=e,this.client=t;var i=null!==(n=e.instanceName)&&void 0!==n?n:nI.instanceName;this.queue=new sI(i),this.cache=new oI(i)}return e.prototype.ready=function(){return this.integration?this.isReady:Promise.resolve()},e.prototype.setIntegration=function(e){var t=this;this.integration&&this.integration.teardown&&this.integration.teardown(),this.integration=e,e.setup?this.integration.setup(this.config,this.client).then(function(){t.queue.setTracker(t.integration.track.bind(e)),t.resolve()},function(){t.queue.setTracker(t.integration.track.bind(e)),t.resolve()}):(this.queue.setTracker(this.integration.track.bind(e)),this.resolve())},e.prototype.getUser=function(){return this.integration?this.integration.getUser():{}},e.prototype.track=function(e,t){if(this.cache.shouldTrack(e,t)){var n=this.getExposureEvent(e);this.queue.push(n)}},e.prototype.getExposureEvent=function(e){var t,n,r,i={eventType:"$exposure",eventProperties:e};return(null===(t=e.metadata)||void 0===t?void 0:t.exposureEvent)?i={eventType:null===(n=e.metadata)||void 0===n?void 0:n.exposureEvent,eventProperties:e}:"web"===(null===(r=e.metadata)||void 0===r?void 0:r.deliveryMethod)&&(i={eventType:"$impression",eventProperties:e}),i},e}(),oI=function(){function e(e){this.isSessionStorageAvailable=aI(),this.inMemoryCache={},this.identity={},this.storageKey="EXP_sent_v3_".concat(e),this.isSessionStorageAvailable&&(UC.sessionStorage.removeItem("EXP_sent_".concat(e)),UC.sessionStorage.removeItem("EXP_sent_v2_".concat(e)))}return e.prototype.shouldTrack=function(e,t){var n,r;if("web"===(null===(n=e.metadata)||void 0===n?void 0:n.deliveryMethod))return!0;var i={userId:null==t?void 0:t.user_id,deviceId:null==t?void 0:t.device_id};this.identityEquals(this.identity,i)||this.clearCache(),this.identity=i,this.loadCache();var o=e.flag_key in this.inMemoryCache,s=this.inMemoryCache[e.flag_key],a=null!==(r=e.variant)&&void 0!==r?r:null,u=!1;return o&&(null!=s?s:null)===a||(u=!0,this.inMemoryCache[e.flag_key]=a),this.storeCache(),u},e.prototype.clearCache=function(){this.inMemoryCache={},this.isSessionStorageAvailable&&UC.sessionStorage.removeItem(this.storageKey)},e.prototype.identityEquals=function(e,t){return e.userId&&t.userId?e.userId===t.userId:!e.userId&&!t.userId&&e.deviceId===t.deviceId},e.prototype.loadCache=function(){if(this.isSessionStorageAvailable){var e=UC.sessionStorage.getItem(this.storageKey);this.inMemoryCache=e?JSON.parse(e):{}}},e.prototype.storeCache=function(){if(this.isSessionStorageAvailable)try{UC.sessionStorage.setItem(this.storageKey,JSON.stringify(this.inMemoryCache))}catch(e){}},e}(),sI=function(){function e(e,t){void 0===t&&(t=512),this.isLocalStorageAvailable=function(){var e=FC();if(e)try{var t="EXP_test";return e.localStorage.setItem(t,t),e.localStorage.removeItem(t),!0}catch(e){return!1}return!1}(),this.inMemoryQueue=[],this.storageKey="EXP_unsent_".concat(e),this.maxQueueSize=t}return e.prototype.push=function(e){this.loadQueue(),this.inMemoryQueue.push(e),this.flush(),this.storeQueue()},e.prototype.setTracker=function(e){var t=this;this.tracker=e,this.poller=UC.setInterval(function(){t.loadFlushStore()},1e3),this.loadFlushStore()},e.prototype.flush=function(){if(this.tracker&&0!==this.inMemoryQueue.length){for(var e=0;e<this.inMemoryQueue.length;e++)try{if(!this.tracker(this.inMemoryQueue[e]))break}catch(e){break}this.inMemoryQueue=this.inMemoryQueue.slice(e),0===this.inMemoryQueue.length&&this.poller&&(UC.clearInterval(this.poller),this.poller=void 0)}},e.prototype.loadQueue=function(){if(this.isLocalStorageAvailable){var e=UC.localStorage.getItem(this.storageKey);this.inMemoryQueue=e?JSON.parse(e):[]}},e.prototype.storeQueue=function(){this.isLocalStorageAvailable&&(this.inMemoryQueue.length>this.maxQueueSize&&(this.inMemoryQueue=this.inMemoryQueue.slice(this.inMemoryQueue.length-this.maxQueueSize)),UC.localStorage.setItem(this.storageKey,JSON.stringify(this.inMemoryQueue)))},e.prototype.loadFlushStore=function(){this.loadQueue(),this.flush(),this.storeQueue()},e}(),aI=function(){var e=FC();if(e)try{var t="EXP_test";return e.sessionStorage.setItem(t,t),e.sessionStorage.removeItem(t),!0}catch(e){return!1}return!1},uI=function(){function e(e,t){void 0===t&&(t=qC.Error),this.logger=e,this.logLevel=t}return e.prototype.error=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.logLevel>=qC.Error&&(t=this.logger).error.apply(t,Ou([e],Iu(n),!1))},e.prototype.warn=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.logLevel>=qC.Warn&&(t=this.logger).warn.apply(t,Ou([e],Iu(n),!1))},e.prototype.info=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.logLevel>=qC.Info&&(t=this.logger).info.apply(t,Ou([e],Iu(n),!1))},e.prototype.debug=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.logLevel>=qC.Debug&&(t=this.logger).debug.apply(t,Ou([e],Iu(n),!1))},e.prototype.verbose=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.logLevel>=qC.Verbose&&(t=this.logger).verbose.apply(t,Ou([e],Iu(n),!1))},e}(),lI=function(){function e(){}return e.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];console.error.apply(console,Ou([e],Iu(t),!1))},e.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];console.warn.apply(console,Ou([e],Iu(t),!1))},e.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];console.info.apply(console,Ou([e],Iu(t),!1))},e.prototype.debug=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];console.debug.apply(console,Ou([e],Iu(t),!1))},e.prototype.verbose=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];console.debug.apply(console,Ou([e],Iu(t),!1))},e}(),cI=function(){function e(){this.globalScope=FC()}return e.prototype.get=function(e){var t;return null===(t=this.globalScope)||void 0===t?void 0:t.localStorage.getItem(e)},e.prototype.put=function(e,t){var n;null===(n=this.globalScope)||void 0===n||n.localStorage.setItem(e,t)},e.prototype.delete=function(e){var t;null===(t=this.globalScope)||void 0===t||t.localStorage.removeItem(e)},e}(),dI=function(){function e(e,t){this.namespace=e,this.storage=t}return e.prototype.get=function(){return this.value},e.prototype.put=function(e){this.value=e},e.prototype.load=function(){var e=this.storage.get(this.namespace);e&&(this.value=JSON.parse(e))},e.prototype.store=function(){void 0===this.value?this.storage.delete(this.namespace):this.storage.put(this.namespace,JSON.stringify(this.value))},e}(),fI=function(){function e(e,t,n){this.cache={},this.namespace=e,this.storage=t,this.transformer=n}return e.prototype.get=function(e){return this.cache[e]},e.prototype.getAll=function(){return JC({},this.cache)},e.prototype.put=function(e,t){this.cache[e]=t},e.prototype.putAll=function(e){var t,n;try{for(var r=Cu(Object.keys(e)),i=r.next();!i.done;i=r.next()){var o=i.value;this.cache[o]=e[o]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.remove=function(e){delete this.cache[e]},e.prototype.clear=function(){this.cache={}},e.prototype.load=function(){var e,t,n,r=this.storage.get(this.namespace);try{n=JSON.parse(r)||{}}catch(e){return}var i={};try{for(var o=Cu(Object.keys(n)),s=o.next();!s.done;s=o.next()){var a=s.value;try{var u=void 0;(u=this.transformer?this.transformer(n[a]):n[a])&&(i[a]=u)}catch(e){}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}this.clear(),this.putAll(i)},e.prototype.store=function(e){void 0===e&&(e=this.cache),this.storage.put(this.namespace,JSON.stringify(e))},e}(),hI=function(e){if("string"==typeof e)return{key:e,value:e};if("object"===(void 0===e?"undefined":_type_of(e))){var t=e.key,n=e.value,r=e.payload,i=e.metadata,o=e.expKey;i&&i.experimentKey?o=i.experimentKey:o&&((i=i||{}).experimentKey=o);var s={};return t?s.key=t:n&&(s.key=n),n&&(s.value=n),i&&(s.metadata=i),r&&(s.payload=r),o&&(s.expKey=o),s}},pI=function(){function e(){this.globalScope=FC()}return e.prototype.get=function(e){var t;return null===(t=this.globalScope)||void 0===t?void 0:t.sessionStorage.getItem(e)},e.prototype.put=function(e,t){var n;null===(n=this.globalScope)||void 0===n||n.sessionStorage.setItem(e,t)},e.prototype.delete=function(e){var t;null===(t=this.globalScope)||void 0===t||t.sessionStorage.removeItem(e)},e}(),vI=function(e){return null==e},gI=function(e){return!!vI(e)||e&&0===Object.keys(e).length},yI=function(e){var t;return"local"===(null===(t=null==e?void 0:e.metadata)||void 0===t?void 0:t.evaluationMode)},mI=function(){function e(e,t,n,r){this.started=!1,this.done=!1,this.attempts=e,this.min=t,this.max=n,this.scalar=r}return e.prototype.start=function(e){return xu(this,void 0,void 0,function(){return Eu(this,function(t){switch(t.label){case 0:if(this.started)throw Error("Backoff already started");return this.started=!0,[4,this.backoff(e,0,this.min)];case 1:return t.sent(),[2]}})})},e.prototype.cancel=function(){this.done=!0,clearTimeout(this.timeoutHandle)},e.prototype.backoff=function(e,t,n){return xu(this,void 0,void 0,function(){var r=this;return Eu(this,function(i){return this.done||(this.timeoutHandle=UC.setTimeout(function(){return xu(r,void 0,void 0,function(){var r,i;return Eu(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,e()];case 1:return o.sent(),[3,3];case 2:return o.sent(),(r=t+1)<this.attempts&&(i=Math.min(n*this.scalar,this.max),this.backoff(e,r,i)),[3,3];case 3:return[2]}})})},n)),[2]})})},e}(),bI=function(e){var t,n,r,i;if(!e)return{};var o={user:e},s=FC();s&&(o.page={url:s.location.href});var a={};if(!e.groups)return o;try{for(var u=Cu(Object.keys(e.groups)),l=u.next();!l.done;l=u.next()){var c=l.value,d=e.groups[c];if(d.length>0&&d[0]){var f=d[0],h={group_name:f},p=null===(i=null===(r=e.group_properties)||void 0===r?void 0:r[c])||void 0===i?void 0:i[f];p&&Object.keys(p).length>0&&(h.group_properties=p),a[c]=h}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return Object.keys(a).length>0&&(o.groups=a),delete o.user.groups,delete o.user.group_properties,o},wI=function(e){return null==e?{}:"string"==typeof e?{key:e,value:e}:e},_I=function(e){if(!e)return{};var t=void 0;e.metadata&&(t=e.metadata.experimentKey);var n={};return e.key&&(n.key=e.key),e.value&&(n.value=e.value),e.payload&&(n.payload=e.payload),t&&(n.expKey=t),e.metadata&&(n.metadata=e.metadata),n},SI=function(){function e(e){this.setProperties={},this.unsetProperties={},this.analyticsProvider=e}return e.prototype.track=function(e){this.setProperties[e.key]!=e.variant.value&&(this.setProperties[e.key]=e.variant.value,delete this.unsetProperties[e.key],this.analyticsProvider.track(e))},e.prototype.setUserProperty=function(e){this.setProperties[e.key]!=e.variant.value&&this.analyticsProvider.setUserProperty(e)},e.prototype.unsetUserProperty=function(e){this.unsetProperties[e.key]||(this.unsetProperties[e.key]="unset",delete this.setProperties[e.key],this.analyticsProvider.unsetUserProperty(e))},e}(),kI=function(){function e(e){this.tracked={},this.identity={},this.exposureTrackingProvider=e}return e.prototype.track=function(e,t){var n={userId:null==t?void 0:t.user_id,deviceId:null==t?void 0:t.device_id};this.identityEquals(this.identity,n)||(this.tracked={}),this.identity=n;var r=e.flag_key in this.tracked,i=this.tracked[e.flag_key];r&&i===e.variant||(this.tracked[e.flag_key]=e.variant,this.exposureTrackingProvider.track(e))},e.prototype.identityEquals=function(e,t){return e.userId===t.userId&&e.deviceId===t.deviceId},e}(),xI=function(){function e(t,n){var r,i,o,s,a=this;this.engine=new fC,this.isRunning=!1,this.apiKey=t,n=function(e){var t,n;if(!e||"object"!==(void 0===e?"undefined":_type_of(e)))return{};var r={};try{for(var i=Cu(Object.entries(e)),o=i.next();!o.done;o=i.next()){var s=Iu(o.value,2),a=s[0],u=s[1];vI(u)||(r[a]=u)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(n),this.config=JC(JC(JC({},nI),n),{serverUrl:(null==n?void 0:n.serverUrl)||("eu"===(null===(r=null==n?void 0:n.serverZone)||void 0===r?void 0:r.toLowerCase())?"https://api.lab.eu.amplitude.com":nI.serverUrl),flagsServerUrl:(null==n?void 0:n.flagsServerUrl)||("eu"===(null===(i=null==n?void 0:n.serverZone)||void 0===i?void 0:i.toLowerCase())?"https://flag.lab.eu.amplitude.com":nI.flagsServerUrl),flagConfigPollingIntervalMillis:n.flagConfigPollingIntervalMillis<6e4?6e4:null!==(o=n.flagConfigPollingIntervalMillis)&&void 0!==o?o:nI.flagConfigPollingIntervalMillis}),this.logger=new uI(this.config.loggerProvider||new lI,e.getLogLevel(n));var u=null===(s=this.config)||void 0===s?void 0:s.internalInstanceNameSuffix;if(this.isWebExperiment="web"===u,this.poller=new BC(function(){return xu(a,void 0,void 0,function(){var e;return Eu(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.doFlags()];case 1:return t.sent(),[3,3];case 2:return e=t.sent(),this.logger.info(e),[3,3];case 3:return[2]}})})},this.config.flagConfigPollingIntervalMillis),this.config.initialVariants)for(var l in this.config.initialVariants)this.config.initialVariants[l]=hI(this.config.initialVariants[l]);this.config.userProvider&&(this.userProvider=this.config.userProvider),this.config.analyticsProvider&&(this.analyticsProvider=new SI(this.config.analyticsProvider)),this.config.exposureTrackingProvider&&(this.userSessionExposureTracker=new kI(this.config.exposureTrackingProvider)),this.integrationManager=new iI(this.config,this);var c,d=new ZC(this.config.httpClient||eI);this.flagApi=new jC(this.apiKey,this.config.flagsServerUrl,d),this.evaluationApi=new DC(this.apiKey,this.config.serverUrl,d);var f=u?"".concat(this.config.instanceName,"-").concat(u):this.config.instanceName;c=this.isWebExperiment?new pI:new cI,this.variants=function(e,t,n){var r=e.substring(e.length-6),i="amp-exp-".concat(t,"-").concat(r);return new fI(i,n,hI)}(this.apiKey,f,c),this.flags=function(e,t,n){void 0===n&&(n=new cI);var r=e.substring(e.length-6),i="amp-exp-".concat(t,"-").concat(r,"-flags");return new fI(i,n)}(this.apiKey,f,c),this.fetchVariantsOptions=function(e,t,n){void 0===n&&(n=new cI);var r=e.substring(e.length-6),i="amp-exp-".concat(t,"-").concat(r,"-variants-options");return new dI(i,n)}(this.apiKey,f,c);try{this.flags.load(),this.variants.load(),this.fetchVariantsOptions.load()}catch(e){}this.mergeInitialFlagsWithStorage()}return e.prototype.start=function(e){return xu(this,void 0,void 0,function(){var t,n,r;return Eu(this,function(i){switch(i.label){case 0:if(this.isRunning)return[2];this.isRunning=!0,this.setUser(e),i.label=1;case 1:return i.trys.push([1,6,,7]),t=this.doFlags(),null===(r=this.config.fetchOnStart)||void 0===r||r?[4,Promise.all([this.fetch(e),t])]:[3,3];case 2:return i.sent(),[3,5];case 3:return[4,t];case 4:i.sent(),i.label=5;case 5:return[3,7];case 6:if(n=i.sent(),this.config.throwOnError)throw n;return[3,7];case 7:return this.config.pollOnStart&&this.poller.start(),[2]}})})},e.prototype.stop=function(){this.isRunning&&(this.poller.stop(),this.isRunning=!1)},e.prototype.fetch=function(){return xu(this,arguments,void 0,function(e,t){var n;return void 0===e&&(e=this.user),Eu(this,function(r){switch(r.label){case 0:this.setUser(e||{}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.fetchInternal(e,this.config.fetchTimeoutMillis,this.config.retryFetchOnFailure,t)];case 2:return r.sent(),[3,4];case 3:if(n=r.sent(),this.config.throwOnError)throw n;return _instanceof(n,LC)?this.logger.debug(n):this.logger.error(n),[3,4];case 4:return[2,this]}})})},e.prototype.variant=function(e,t){var n,r;if(!this.apiKey)return{value:void 0};var i=this.variantAndSource(e,t);return this.config.automaticExposureTracking&&this.exposureInternal(e,i),this.logger.debug("[Experiment] variant for ".concat(e," is ").concat((null===(n=i.variant)||void 0===n?void 0:n.key)||(null===(r=i.variant)||void 0===r?void 0:r.value))),i.variant||{}},e.prototype.exposure=function(e){var t=this.variantAndSource(e);this.exposureInternal(e,t)},e.prototype.all=function(){if(!this.apiKey)return{};var e=this.evaluate();for(var t in e){var n=this.flags.get(t);yI(n)||delete e[t]}return JC(JC(JC({},this.secondaryVariants()),this.sourceVariants()),e)},e.prototype.clear=function(){this.variants.clear();try{this.variants.store()}catch(e){}},e.prototype.getUser=function(){var e;if(!this.user)return this.user;if(null===(e=this.user)||void 0===e?void 0:e.user_properties){var t=JC({},this.user.user_properties);return JC(JC({},this.user),{user_properties:t})}return JC({},this.user)},e.prototype.setUser=function(e){var t;if(e)if(null===(t=this.user)||void 0===t?void 0:t.user_properties){var n=JC({},e.user_properties);this.user=JC(JC({},e),{user_properties:n})}else this.user=JC({},e);else this.user=null},e.prototype.getUserProvider=function(){return this.userProvider},e.prototype.setUserProvider=function(e){return this.userProvider=e,this},e.prototype.mergeInitialFlagsWithStorage=function(){var e=this;this.config.initialFlags&&JSON.parse(this.config.initialFlags).forEach(function(t){e.flags.get(t.key)||e.flags.put(t.key,t)})},e.prototype.evaluate=function(e){var t,n,r=this.addContext(this.user),i=hC(this.flags.getAll(),e),o=bI(r),s=this.engine.evaluate(o,i),a={};try{for(var u=Cu(Object.keys(s)),l=u.next();!l.done;l=u.next()){var c=l.value;a[c]=_I(s[c])}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return a},e.prototype.getEvaluationTraces=function(e){var t=this.addContext(this.user),n=hC(this.flags.getAll(),e),r=bI(t);return this.engine.evaluateWithTraces(r,n).traces},e.prototype.variantAndSource=function(e,t){var n={};this.config.source===WC.LocalStorage?n=this.localStorageVariantAndSource(e,t):this.config.source===WC.InitialVariants&&(n=this.initialVariantsVariantAndSource(e,t));var r=this.flags.get(e);return(yI(r)||!n.variant&&r)&&(n=this.localEvaluationVariantAndSource(e,r,t)),n},e.prototype.localEvaluationVariantAndSource=function(e,t,n){var r,i={},o=this.evaluate([t.key])[e],s=HC.LocalEvaluation,a=null===(r=null==o?void 0:o.metadata)||void 0===r?void 0:r.default;if(!vI(o)&&!a)return{variant:wI(o),source:s,hasDefaultVariant:!1};if(a&&(i={variant:wI(o),source:s,hasDefaultVariant:!0}),!vI(n))return{variant:wI(n),source:HC.FallbackInline,hasDefaultVariant:i.hasDefaultVariant};var u=this.config.initialVariants[e];if(!vI(u))return{variant:wI(u),source:HC.SecondaryInitialVariants,hasDefaultVariant:i.hasDefaultVariant};var l=wI(this.config.fallbackVariant),c={variant:l,source:HC.FallbackConfig,hasDefaultVariant:i.hasDefaultVariant};return gI(l)?i:c},e.prototype.localStorageVariantAndSource=function(e,t){var n,r={},i=this.variants.get(e),o=null===(n=null==i?void 0:i.metadata)||void 0===n?void 0:n.default;if(!vI(i)&&!o)return{variant:wI(i),source:HC.LocalStorage,hasDefaultVariant:!1};if(o&&(r={variant:wI(i),source:HC.LocalStorage,hasDefaultVariant:!0}),!vI(t))return{variant:wI(t),source:HC.FallbackInline,hasDefaultVariant:r.hasDefaultVariant};var s=this.config.initialVariants[e];if(!vI(s))return{variant:wI(s),source:HC.SecondaryInitialVariants,hasDefaultVariant:r.hasDefaultVariant};var a=wI(this.config.fallbackVariant),u={variant:a,source:HC.FallbackConfig,hasDefaultVariant:r.hasDefaultVariant};return gI(a)?r:u},e.prototype.initialVariantsVariantAndSource=function(e,t){var n,r={},i=this.config.initialVariants[e];if(!vI(i))return{variant:wI(i),source:HC.InitialVariants,hasDefaultVariant:!1};var o=this.variants.get(e),s=null===(n=null==o?void 0:o.metadata)||void 0===n?void 0:n.default;if(!vI(o)&&!s)return{variant:wI(o),source:HC.LocalStorage,hasDefaultVariant:!1};if(s&&(r={variant:wI(o),source:HC.LocalStorage,hasDefaultVariant:!0}),!vI(t))return{variant:wI(t),source:HC.FallbackInline,hasDefaultVariant:r.hasDefaultVariant};var a=wI(this.config.fallbackVariant),u={variant:a,source:HC.FallbackConfig,hasDefaultVariant:r.hasDefaultVariant};return gI(a)?r:u},e.prototype.fetchInternal=function(e,t,n,r){return xu(this,void 0,void 0,function(){var i,o,s;return Eu(this,function(a){switch(a.label){case 0:if(!this.apiKey)throw Error("Experiment API key is empty");this.logger.debug("[Experiment] Fetch all: retry=".concat(n)),n&&this.stopRetries(),a.label=1;case 1:return a.trys.push([1,4,,5]),[4,this.doFetch(e,t,JC({trackingOption:null===(s=this.fetchVariantsOptions.get())||void 0===s?void 0:s.trackingOption},r))];case 2:return i=a.sent(),[4,this.storeVariants(i,r)];case 3:return a.sent(),[2,i];case 4:throw o=a.sent(),n&&this.shouldRetryFetch(o)&&this.startRetries(e,r),o;case 5:return[2]}})})},e.prototype.setTracksAssignment=function(e){return xu(this,void 0,void 0,function(){return Eu(this,function(t){return this.fetchVariantsOptions.put(JC(JC({},this.fetchVariantsOptions.get()||{}),{trackingOption:e?"track":"no-track"})),this.fetchVariantsOptions.store(),[2]})})},e.prototype.cleanUserPropsForFetch=function(e){var t=JC({},e);return delete t.cookie,t},e.prototype.doFetch=function(e,t,n){return xu(this,void 0,void 0,function(){var r,i,o,s,a,u,l;return Eu(this,function(c){switch(c.label){case 0:return[4,this.addContextOrWait(e)];case 1:return e=c.sent(),e=this.cleanUserPropsForFetch(e),this.logger.debug("[Experiment] Fetch variants for user: ",e),[4,this.evaluationApi.getVariants(e,JC({timeoutMillis:t},n))];case 2:r=c.sent(),i={};try{for(o=Cu(Object.keys(r)),s=o.next();!s.done;s=o.next())a=s.value,i[a]=_I(r[a])}catch(e){u={error:e}}finally{try{s&&!s.done&&(l=o.return)&&l.call(o)}finally{if(u)throw u.error}}return this.logger.debug("[Experiment] Received variants: ",i),[2,i]}})})},e.prototype.doFlags=function(){return xu(this,void 0,void 0,function(){var e,t,n;return Eu(this,function(r){switch(r.label){case 0:return r.trys.push([0,4,,5]),e=void 0,this.isWebExperiment?[4,this.addContextOrWait(this.getUser())]:[3,2];case 1:e=r.sent(),r.label=2;case 2:return[4,this.flagApi.getFlags({libraryName:"experiment-js-client",libraryVersion:rI,timeoutMillis:this.config.fetchTimeoutMillis,deliveryMethod:this.isWebExperiment?"web":void 0,user:(null==e?void 0:e.user_id)||(null==e?void 0:e.device_id)?{user_id:null==e?void 0:e.user_id,device_id:null==e?void 0:e.device_id}:void 0})];case 3:return t=r.sent(),this.flags.clear(),this.flags.putAll(t),[3,5];case 4:if(!_instanceof(n=r.sent(),LC))throw n;if(this.logger.debug(n),this.config.throwOnError)throw n;return[3,5];case 5:try{this.flags.store()}catch(e){}return this.mergeInitialFlagsWithStorage(),[2]}})})},e.prototype.storeVariants=function(e,t){return xu(this,void 0,void 0,function(){var n,r,i,o;return Eu(this,function(s){for(o in 0===(n=t&&t.flagKeys?t.flagKeys:[]).length&&this.variants.clear(),r=function(t){n=n.filter(function(e){return e!==t}),i.variants.put(t,e[t])},i=this,e)r(o);for(o in n)this.variants.remove(o);try{this.variants.store()}catch(e){}return this.logger.debug("[Experiment] Stored variants: ",e),[2]})})},e.prototype.startRetries=function(e,t){return xu(this,void 0,void 0,function(){var n=this;return Eu(this,function(r){return this.logger.debug("[Experiment] Retry fetch"),this.retriesBackoff=new mI(8,500,1e4,1.5),this.retriesBackoff.start(function(){return xu(n,void 0,void 0,function(){return Eu(this,function(n){switch(n.label){case 0:return[4,this.fetchInternal(e,1e4,!1,t)];case 1:return n.sent(),[2]}})})}),[2]})})},e.prototype.stopRetries=function(){this.retriesBackoff&&this.retriesBackoff.cancel()},e.prototype.addContext=function(e){var t,n=null===(t=this.userProvider)||void 0===t?void 0:t.getUser(),r=this.integrationManager.getUser(),i=JC(JC(JC({},null==n?void 0:n.user_properties),r.user_properties),null==e?void 0:e.user_properties);return JC(JC(JC(JC({library:"experiment-js-client/".concat(rI)},n),r),e),{user_properties:i})},e.prototype.addContextOrWait=function(e){return xu(this,void 0,void 0,function(){return Eu(this,function(t){switch(t.label){case 0:return[4,this.integrationManager.ready()];case 1:return t.sent(),[2,this.addContext(e)]}})})},e.prototype.sourceVariants=function(){return this.config.source==WC.LocalStorage?this.variants.getAll():this.config.source==WC.InitialVariants?this.config.initialVariants:void 0},e.prototype.secondaryVariants=function(){return this.config.source==WC.LocalStorage?this.config.initialVariants:this.config.source==WC.InitialVariants?this.variants.getAll():void 0},e.prototype.exposureInternal=function(e,t){var n,r,i,o,s,a,u,l,c;if(null===(i=null===(r=null===(n=t.variant)||void 0===n?void 0:n.metadata)||void 0===r?void 0:r.trackExposure)||void 0===i||i){this.legacyExposureInternal(e,t.variant,t.source);var d={flag_key:e},f=tI(t.source);if(!f||t.hasDefaultVariant){(null===(o=t.variant)||void 0===o?void 0:o.expKey)&&(d.experiment_key=null===(s=t.variant)||void 0===s?void 0:s.expKey);var h=null===(a=t.variant)||void 0===a?void 0:a.metadata;if(f||(null==h?void 0:h.default)||((null===(u=t.variant)||void 0===u?void 0:u.key)?d.variant=t.variant.key:(null===(l=t.variant)||void 0===l?void 0:l.value)&&(d.variant=t.variant.value)),h&&(d.metadata=h),this.isWebExperiment&&(d.time=Date.now()),this.isWebExperiment){var p=FC();if(null==p?void 0:p.location)try{var v=p.location.href;d.metadata.url=v.split("?")[0]||""}catch(e){}}var g=this.addContext(this.getUser());null===(c=this.userSessionExposureTracker)||void 0===c||c.track(d,g),this.integrationManager.track(d,g)}}},e.prototype.legacyExposureInternal=function(e,t,n){var r,i,o,s,a;if(this.analyticsProvider){var u=function(e,t,n,r){var i,o=null==n?void 0:n.value,s="[Experiment] ".concat(t);return{name:"[Experiment] Exposure",user:e,key:t,variant:n,userProperty:s,properties:{key:t,variant:o,source:r},userProperties:(i={},i[s]=o,i)}}(this.addContext(this.getUser()),e,t,n);tI(n)||!(null==t?void 0:t.value)?null===(i=null===(r=this.analyticsProvider)||void 0===r?void 0:r.unsetUserProperty)||void 0===i||i.call(r,u):(null==t?void 0:t.value)&&(null===(s=null===(o=this.analyticsProvider)||void 0===o?void 0:o.setUserProperty)||void 0===s||s.call(o,u),null===(a=this.analyticsProvider)||void 0===a||a.track(u))}},e.getLogLevel=function(e){var t;return!0===e.debug?qC.Debug:null!==(t=e.logLevel)&&void 0!==t?t:qC.Error},e.prototype.shouldRetryFetch=function(e){return!_instanceof(e,NC)||(e.statusCode<400||e.statusCode>=500||429===e.statusCode)},e.prototype.addPlugin=function(e){"integration"===e.type&&this.integrationManager.setIntegration(e)},e}(),EI=function(){function e(e,t){var n,r,i;this.globalScope=FC(),this.userAgent=void 0!==(null===(n=this.globalScope)||void 0===n?void 0:n.navigator)?null===(r=this.globalScope)||void 0===r?void 0:r.navigator.userAgent:void 0,this.ua=new GC.UAParser(this.userAgent).getResult(),this.localStorage=new cI,this.sessionStorage=new pI,this.userProvider=e,this.apiKey=t,this.storageKey="EXP_".concat(null===(i=this.apiKey)||void 0===i?void 0:i.slice(0,10),"_DEFAULT_USER_PROVIDER")}return e.prototype.getUser=function(){var e,t,n,r,i,o=(null===(e=this.userProvider)||void 0===e?void 0:e.getUser())||{};return JC({language:this.getLanguage(),platform:"Web",os:this.getOs(this.ua),device_model:this.getDeviceModel(this.ua),device_category:null!==(n=null===(t=this.ua.device)||void 0===t?void 0:t.type)&&void 0!==n?n:"desktop",referring_url:null===(i=null===(r=this.globalScope)||void 0===r?void 0:r.document)||void 0===i?void 0:i.referrer.replace(/\/$/,""),cookie:this.getCookie(),browser:this.getBrowser(this.ua),landing_url:this.getLandingUrl(),first_seen:this.getFirstSeen(),url_param:this.getUrlParam(),user_agent:this.userAgent},o)},e.prototype.getLanguage=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},e.prototype.getOs=function(e){var t,n;return[null===(t=e.browser)||void 0===t?void 0:t.name,null===(n=e.browser)||void 0===n?void 0:n.major].filter(function(e){return null!=e}).join(" ")},e.prototype.getDeviceModel=function(e){var t;return null===(t=e.os)||void 0===t?void 0:t.name},e.prototype.getBrowser=function(e){var t,n=null===(t=e.browser)||void 0===t?void 0:t.name;return(null==n?void 0:n.includes("Chrom"))&&(n="Chrome"),(null==n?void 0:n.includes("Firefox"))&&(n="Firefox"),(null==n?void 0:n.includes("Safari"))&&(n="Safari"),(null==n?void 0:n.includes("Edge"))&&(n="Edge"),(null==n?void 0:n.includes("Opera"))&&(n="Opera"),n},e.prototype.getCookie=function(){var e,t,n,r,i;if(null===(t=null===(e=this.globalScope)||void 0===e?void 0:e.document)||void 0===t?void 0:t.cookie)return Object.fromEntries(null===(i=null===(r=null===(n=this.globalScope)||void 0===n?void 0:n.document)||void 0===r?void 0:r.cookie)||void 0===i?void 0:i.split("; ").map(function(e){return e.split("=")}))},e.prototype.getLandingUrl=function(){var e,t;try{var n=JSON.parse(this.sessionStorage.get(this.storageKey)||"{}");return n.landing_url||(n.landing_url=null===(t=null===(e=this.globalScope)||void 0===e?void 0:e.location)||void 0===t?void 0:t.href.replace(/\/$/,""),this.sessionStorage.put(this.storageKey,JSON.stringify(n))),n.landing_url}catch(e){return}},e.prototype.getFirstSeen=function(){try{var e=JSON.parse(this.localStorage.get(this.storageKey)||"{}");return e.first_seen||(e.first_seen=(Date.now()/1e3).toString(),this.localStorage.put(this.storageKey,JSON.stringify(e))),e.first_seen}catch(e){return}},e.prototype.getUrlParam=function(){var e,t,n;if(this.globalScope){var r={};try{var i=new URL(this.globalScope.location.href);try{for(var o=Cu(i.searchParams),s=o.next();!s.done;s=o.next()){var a=Iu(s.value,2),u=a[0],l=a[1];r[u]=Ou(Ou([],Iu(null!==(n=r[u])&&void 0!==n?n:[]),!1),Iu(l.split(",")),!1)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}}catch(e){return}return Object.entries(r).reduce(function(e,t){var n=Iu(t,2),r=n[0],i=n[1];return e[r]=1==i.length?i[0]:i,e},{})}},e}();UC.experimentInstances={};var CI=UC.experimentInstances,II=function(e){return(null==e?void 0:e.instanceName)||nI.instanceName},OI=function(e,t,n){var r=function(e,t){var n=II(t),r=null==t?void 0:t.internalInstanceNameSuffix;return r?"".concat(n,".").concat(e,".").concat(r):"".concat(n,".").concat(e)}(e,t),i=CI[r];return i||(i=function(e,t){return new xI(e,JC(JC({},t),{userProvider:new EI(null==t?void 0:t.userProvider,e)}))}(e,t),n&&i.addPlugin(n()),CI[r]=i,i)},TI=(function(){function e(){}e.prototype.getUser=function(){return{}},e.prototype.start=function(e){return xu(this,void 0,void 0,function(){return Eu(this,function(e){return[2]})})},e.prototype.stop=function(){},e.prototype.setUser=function(e){},e.prototype.fetch=function(e,t){return xu(this,void 0,void 0,function(){return Eu(this,function(e){return[2,this]})})},e.prototype.getUserProvider=function(){return null},e.prototype.setUserProvider=function(e){return this},e.prototype.variant=function(e,t){return nI.fallbackVariant},e.prototype.all=function(){return{}},e.prototype.clear=function(){},e.prototype.exposure=function(e){}}(),function(){function e(t){this.name=e.pluginName,this.config=t}return e.prototype.setup=function(e,t){var n;return Ft(this,void 0,void 0,function(){return Bt(this,function(t){return this.experiment=function(e,t){return OI(e,t,function(){return new XC(e,Ae.getInstance(II(t)),1e4)})}((null===(n=this.config)||void 0===n?void 0:n.deploymentKey)||e.apiKey,this.config),[2]})})},e.pluginName="@amplitude/experiment-analytics-plugin",e}()),AI=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:PI(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),PI=function(){return("undefined"==typeof navigator?"undefined":_type_of(navigator))<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},RI=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}(),MI=function(){return MI=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},MI.apply(this,arguments)},NI=function(e,t){var n,r,i=void 0===e?"undefined":_type_of(e);if(i!==(void 0===t?"undefined":_type_of(t)))return!1;try{for(var o=Tu(["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 a=Array.isArray(e),u=Array.isArray(t);if(a!==u)return!1;if(!a||!u){var l=Object.keys(e).sort(),c=Object.keys(t).sort();if(!NI(l,c))return!1;var d=!0;return Object.keys(e).forEach(function(n){NI(e[n],t[n])||(d=!1)}),d}for(var f=0;f<e.length;f++)if(!NI(e[f],t[f]))return!1;return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var LI=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=MI({},this.identity.userProperties),n=MI(MI({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},setOptOut:function(e){return n.optOut=e,this},updateUserProperties:function(e){var t,r,i,o,s,a,u=n.userProperties||{};try{for(var l=Tu(Object.entries(e)),c=l.next();!c.done;c=l.next()){var d=Au(c.value,2),f=d[0],h=d[1];switch(f){case"$set":try{for(var p=(i=void 0,Tu(Object.entries(h))),v=p.next();!v.done;v=p.next()){var g=Au(v.value,2),y=g[0],m=g[1];u[y]=m}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}break;case"$unset":try{for(var b=(s=void 0,Tu(Object.keys(h))),w=b.next();!w.done;w=b.next()){delete u[y=w.value]}}catch(e){s={error:e}}finally{try{w&&!w.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}break;case"$clearAll":u={}}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}return n.userProperties=u,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return MI({},this.identity)},e.prototype.setIdentity=function(e){var t=MI({},this.identity);this.identity=MI({},e),NI(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}(),DI=("undefined"==typeof globalThis?"undefined":_type_of(globalThis))<"u"?globalThis:("undefined"==typeof window?"undefined":_type_of(window))<"u"?window:self,jI=function(){function e(){this.identityStore=new LI,this.eventBridge=new RI,this.applicationContextProvider=new AI}return e.getInstance=function(t){return DI.analyticsConnectorInstances||(DI.analyticsConnectorInstances={}),DI.analyticsConnectorInstances[t]||(DI.analyticsConnectorInstances[t]=new e),DI.analyticsConnectorInstances[t]},e}(),UI=["boot"],FI="$default_instance",BI=Symbol.for("amplitude-engagement-plugin-caller"),qI=function(e){return e.Local="https://local.amplitude.com:3010/",e.Staging="https://apps.stag2.amplitude.com/",e.Production="https://app.amplitude.com/",e.ProductionEU="https://app.eu.amplitude.com/",e}(qI||{}),zI=(function(e){var t=!0,n=!1,r=void 0;if(("undefined"==typeof window?"undefined":_type_of(window))<"u"&&window.opener)try{for(var i,o=Object.values(qI)[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var s=i.value;window.opener.postMessage({message:e},s)}}catch(e){n=!0,r=e}finally{try{t||null==o.return||o.return()}finally{if(n)throw r}}}("ENGAGEMENT_SNIPPET"),function(e){var t,n,r,i,o,s,a,u,l,c,d=("undefined"==typeof window?"undefined":_type_of(window))<"u"?window.engagement:void 0,f=!1,h={_q:null!=(t=null==d?void 0:d._q)?t:[],_configuration:{apiKey:null!=(r=null==(n=null==d?void 0:d._configuration)?void 0:n.apiKey)?r:"",serverUrl:null==(i=null==d?void 0:d._configuration)?void 0:i.serverUrl,chatUrl:null==(o=null==d?void 0:d._configuration)?void 0:o.chatUrl,mediaUrl:null==(s=null==d?void 0:d._configuration)?void 0:s.mediaUrl,serverZone:null!=(u=null==(a=null==d?void 0:d._configuration)?void 0:a.serverZone)?u:"US",autoRefreshIntervalSeconds:null==(l=null==d?void 0:d._configuration)?void 0:l.autoRefreshIntervalSeconds,options:_object_spread({},null==(c=null==d?void 0:d._configuration)?void 0:c.options)},init:function(t,n){var r,i,o,s;if(h._configuration.apiKey)console.log("Engagement SDK has already been initialized. Ignoring additional init call.");else{if(!0===(null==n?void 0:n.skip))return console.log("Engagement SDK init skipped via `skip: true`. The SDK bundle will not be loaded."),void(f=!0);if(f&&(h._q.length=0),f=!1,null!=n&&n.useEngagementDomain){var a="EU"===(null!=(r=n.serverZone)?r:h._configuration.serverZone),u="amplitudeengagement.com";n.serverUrl||(n.serverUrl=a?"https://gs.eu.".concat(u):"https://gs.".concat(u)),n.chatUrl||(n.chatUrl=a?"https://houston-chat.eu.".concat(u):"https://houston-chat.".concat(u)),n.mediaUrl||(n.mediaUrl=a?"https://engagement-static.eu.".concat(u):"https://engagement-static.".concat(u)),n.cdnUrl||(n.cdnUrl=a?"https://cdn.eu.".concat(u):"https://cdn.".concat(u))}var l;if(h._configuration=_object_spread_props(_object_spread({},h._configuration,n),{apiKey:t,options:_object_spread({splitting:!0},h._configuration.options,null==n?void 0:n.options)}),null!=(o=null==(i=h._configuration)?void 0:i.options)&&o.logger&&h._configuration.options.logger.enable(null!=(s=h._configuration.options.logLevel)?s:2),null!=n&&n.cdnUrl)l=h._configuration.options.splitting?"".concat(n.cdnUrl,"/engagement-browser/prod/split/index.js"):n.cdnUrl+"/engagement-browser/prod/index.min.js.gz";else{var c="EU"===h._configuration.serverZone?"https://cdn.eu.amplitude.com":"https://cdn.amplitude.com";l=h._configuration.options.splitting?"".concat(c,"/engagement-browser/prod/split/index.js"):"".concat(c,"/engagement-browser/prod/index.min.js.gz")}var d=null,p=function(){if(f=!0,d&&(clearTimeout(d),d=null),h._q&&h._q.length>0)for(console.warn("Engagement SDK failed to load within ".concat(v,"ms. Resolving pending calls gracefully."));h._q.length>0;){var e=h._q.shift();if(e){var t=e[0],n=UI.includes(t);if(console.warn("Engagement SDK method '".concat(t,"' still in queue (isAsyncMethod=").concat(n,"); attempting to resolve as no-op.")),n&&_instanceof(e[1],Function)&&_instanceof(e[2],Function)){var r=e[1];console.warn("Engagement SDK method '".concat(t,"' resolved as no-op due to script loading failure")),r(void 0)}}}};e(l,h._configuration.options.splitting?"module":void 0,null==n?void 0:n.nonce,p);var v=1e4;d=setTimeout(function(){p()},v)}},plugin:function(e){var t=h.init,n=null==e?void 0:e.token,r=!0===(null==e?void 0:e.skip),i=function(e,t){var r=t.getIdentity(),i="function"==typeof n?n():n;return _object_spread({user_id:e.getUserId(),device_id:e.getDeviceId(),user_properties:r.userProperties,getSessionId:e.getSessionId},i?{token:i}:{})};return{name:"@amplitude/engagement-browser",type:"enrichment",setup:function(n,o){return _async_to_generator(function(){var s,a,u,l;return _ts_generator(this,function(c){switch(c.label){case 0:return r?(t(n.apiKey,{skip:!0}),[2]):(a=null!=(s=n.instanceName)?s:FI,u=jI.getInstance(a).identityStore,h._configuration._installedViaPlugin=!0,t(n.apiKey,_object_spread_props(_object_spread({serverZone:n.serverZone},e),{options:_object_spread({logLevel:n.logLevel,logger:n.loggerProvider},null==e?void 0:e.options)})),l=[{track:function(e){o.track(e)}}],[4,window.engagement.boot({user:function(){return i(o,u)},integrations:l},BI)]);case 1:return c.sent(),u.addIdentityListener(function(e){var t,n,r,s;null!=(t=window.engagement)&&t._.user&&null!=(n=window.engagement)&&n._analytics.hasBooted?(null==(s=null==(r=window.engagement)?void 0:r._.user)?void 0:s.user_id)!==e.userId?(window.engagement.shutdown(BI),window.engagement.boot({user:function(){return i(o,u)},integrations:l},BI)):window.engagement._setUserProperties(e.userProperties):console.warn("Engagement SDK not booted. Ignoring identity change.")}),[2]}})})()},execute:function(e){return _async_to_generator(function(){return _ts_generator(this,function(t){return[2,(r||window.engagement.forwardEvent(e),e)]})})()}}}},p=h;return new Proxy(h,{get:function(e,t){return t in p?p[t]:"then"!==t?"gs"===t||"rc"===t||"assistant"===t?new Proxy({},{get:function(e,n){return function(){var e=Array.from(arguments),r="".concat(t,".").concat(n);e.unshift(r),h._q.push(e)}}}):UI.includes(t)?function(){var e=Array.prototype.slice.call(arguments);return new Promise(function(n,r){e.unshift(t,n,r),h._q.push(e),f&&n(void 0)})}:function(){var e=Array.prototype.slice.call(arguments);e.unshift(t),h._q.push(e)}:void 0}})}(function(e,t,n,r){return function(e,t,n,r){var i=!0,o=!1,s=void 0;try{for(var a,u=e[Symbol.iterator]();!(i=(a=u.next()).done);i=!0){var l=a.value,c=document.createElement("script");c.src=l,c.id="engagement-sdk-bundle",n&&c.setAttribute("nonce",n),t&&c.setAttribute("type",t),r&&(c.onerror=r);var d=document.getElementsByTagName("head")[0];d&&d.appendChild(c)}}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}}([e||"https://cdn.amplitude.com/engagement-browser/prod/index.min.js.gz"],t,n,r)}));Gu();var WI=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return jt(n,e),n.prototype.sessionReplay=function(){return this._sessionReplay},n.prototype.experiment=function(){if(void 0!==this.config){var e=this.plugins(TI);return 0===e.length?void this.config.loggerProvider.debug("".concat(TI.pluginName," plugin is not found.")):1===e.length?e[0].experiment:void this.config.loggerProvider.debug("Multiple instances of ".concat(TI.pluginName," are found."))}},n.prototype.initAll=function(n,r){return Ft(this,void 0,void 0,function(){var i=this;return Bt(this,function(o){return this._initAllPromise||(this._initAllPromise=Ft(i,void 0,void 0,function(){var i,o;return Bt(this,function(s){switch(s.label){case 0:return i={serverZone:null==r?void 0:r.serverZone,instanceName:null==r?void 0:r.instanceName},e.prototype.add.call(this,{type:"enrichment",name:"@amplitude/unified-library-plugin",execute:function(e){var t;return Ft(this,void 0,void 0,function(){return Bt(this,function(n){return e.library="".concat("amplitude-ts-unified","/").concat("1.1.10","-").concat(null!==(t=e.library)&&void 0!==t?t:""),[2,e]})})}}),[4,e.prototype.init.call(this,n,t(t({},null==r?void 0:r.analytics),i)).promise];case 1:return s.sent(),[4,e.prototype.add.call(this,(l=t(t({},null==r?void 0:r.sessionReplay),i),new PE(l))).promise];case 2:return s.sent(),[4,e.prototype.add.call(this,(u=t(t({},null==r?void 0:r.experiment),i),new TI(u))).promise];case 3:return s.sent(),void 0===(o=this.plugin(PE.pluginName))?this.config.loggerProvider.debug("".concat(PE.pluginName," plugin is not found.")):this._sessionReplay=o.sessionReplay,[4,e.prototype.add.call(this,(a=t(t({},null==r?void 0:r.engagement),i),("undefined"==typeof window?"undefined":_type_of(window))<"u"&&!window.engagement&&(window.engagement=zI),zI.plugin(a))).promise];case 4:return s.sent(),[2]}var a,u,l})}).finally(function(){i._initAllPromise=void 0})),[2,this._initAllPromise]})})},n.prototype.init=function(t,n,r){return void 0===t&&(t=""),e.prototype.init.call(this,t,n,r)},n}(Pk);uf();var VI,HI=function(){var e=new WI;return{_setDiagnosticsSampleRate:be(e._setDiagnosticsSampleRate.bind(e),"_setDiagnosticsSampleRate",ge(e),me(e,["config"])),experiment:be(e.experiment.bind(e),"experiment",ge(e),me(e,["config"])),sessionReplay:be(e.sessionReplay.bind(e),"sessionReplay",ge(e),me(e,["config"])),initAll:be(e.initAll.bind(e),"initAll",ge(e),me(e,["config"])),init:be(e.init.bind(e),"init",ge(e),me(e,["config"])),add:be(e.add.bind(e),"add",ge(e),me(e,["config.apiKey","timeline.plugins"])),remove:be(e.remove.bind(e),"remove",ge(e),me(e,["config.apiKey","timeline.plugins"])),track:be(e.track.bind(e),"track",ge(e),me(e,["config.apiKey","timeline.queue.length"])),logEvent:be(e.logEvent.bind(e),"logEvent",ge(e),me(e,["config.apiKey","timeline.queue.length"])),identify:be(e.identify.bind(e),"identify",ge(e),me(e,["config.apiKey","timeline.queue.length"])),groupIdentify:be(e.groupIdentify.bind(e),"groupIdentify",ge(e),me(e,["config.apiKey","timeline.queue.length"])),setGroup:be(e.setGroup.bind(e),"setGroup",ge(e),me(e,["config.apiKey","timeline.queue.length"])),revenue:be(e.revenue.bind(e),"revenue",ge(e),me(e,["config.apiKey","timeline.queue.length"])),flush:be(e.flush.bind(e),"flush",ge(e),me(e,["config.apiKey","timeline.queue.length"])),getUserId:be(e.getUserId.bind(e),"getUserId",ge(e),me(e,["config","config.userId"])),setUserId:be(e.setUserId.bind(e),"setUserId",ge(e),me(e,["config","config.userId"])),getDeviceId:be(e.getDeviceId.bind(e),"getDeviceId",ge(e),me(e,["config","config.deviceId"])),setDeviceId:be(e.setDeviceId.bind(e),"setDeviceId",ge(e),me(e,["config","config.deviceId"])),reset:be(e.reset.bind(e),"reset",ge(e),me(e,["config","config.userId","config.deviceId"])),getSessionId:be(e.getSessionId.bind(e),"getSessionId",ge(e),me(e,["config"])),setSessionId:be(e.setSessionId.bind(e),"setSessionId",ge(e),me(e,["config"])),extendSession:be(e.extendSession.bind(e),"extendSession",ge(e),me(e,["config"])),setOptOut:be(e.setOptOut.bind(e),"setOptOut",ge(e),me(e,["config"])),getOptOut:be(e.getOptOut.bind(e),"getOptOut",ge(e),me(e,["config"])),setTransport:be(e.setTransport.bind(e),"setTransport",ge(e),me(e,["config"])),getIdentity:be(e.getIdentity.bind(e),"getIdentity",ge(e),me(e,["config"])),setIdentity:be(e.setIdentity.bind(e),"setIdentity",ge(e),me(e,["config","config.userId","config.deviceId"]))}},KI=HI(),GI=KI._setDiagnosticsSampleRate,JI=KI.initAll,$I=KI.experiment,QI=KI.sessionReplay,XI=KI.add,YI=KI.extendSession,ZI=KI.flush,eO=KI.getDeviceId,tO=KI.getIdentity,nO=KI.getOptOut,rO=KI.getSessionId,iO=KI.getUserId,oO=KI.groupIdentify,sO=KI.identify,aO=KI.logEvent,uO=KI.remove,lO=KI.reset,cO=KI.revenue,dO=KI.setDeviceId,fO=KI.setGroup,hO=KI.setIdentity,pO=KI.setOptOut,vO=KI.setSessionId,gO=KI.setTransport,yO=KI.setUserId,mO=KI.track,bO={},wO=["set","setOnce","add","append","prepend","preInsert","postInsert","remove"],_O={productId:"setProductId",price:"setPrice",quantity:"setQuantity",revenueType:"setRevenueType",currency:"setCurrency",revenue:"setRevenue",receipt:"setReceipt",receiptSig:"setReceiptSig"},SO={type:"amplitude",config:{},init:function(e){return _async_to_generator(function(e){var t,n,r,i,o,s,a,u,l,c,d;return _ts_generator(this,function(f){switch(f.label){case 0:return t=e.config,n=e.env,(null==(r=t.settings)?void 0:r.apiKey)?(i=Pu(n),o=r.apiKey,r.identify,s=r.sessionReplay,a=r.experiment,u=r.engagement,r._state,l=_object_without_properties(r,["apiKey","identify","sessionReplay","experiment","engagement","_state"]),c=_object_spread({autocapture:!1,identityStorage:"none"},l),[4,i.initAll(o,_object_spread({serverZone:c.serverZone,analytics:c},s?{sessionReplay:s}:{},(null==a?void 0:a.deploymentKey)?{experiment:a}:{},u?{engagement:!0===u?void 0:u}:{}))]):[2,!1];case 1:return f.sent(),d={lastIdentity:{}},[2,_object_spread_props(_object_spread({},t),{settings:_object_spread_props(_object_spread({},r),{_state:d})})]}})}).apply(this,arguments)},push:function(e,t){return _async_to_generator(function(e,t){var n,r,i,o,s,a,u,l,c,d,f,h,p,v,g,y,m,b,w,_,S,k,x,E,C,I,O,T,A,P,R,M;return _ts_generator(this,function(N){switch(N.label){case 0:return n=t.config,r=t.rule,i=t.env,o=t.data,s=t.collector,u=Pu(i),l=n.settings||{},c=(null==r?void 0:r.settings)||{},d=l._state||{},void 0===c.reset?[3,4]:"boolean"!=typeof c.reset?[3,1]:(f=c.reset,[3,3]);case 1:return[4,ha(e,c.reset,{collector:s})];case 2:f=N.sent(),N.label=3;case 3:f&&(u.reset(),d.lastIdentity={}),N.label=4;case 4:return void 0===(h=null!==(a=c.identify)&&void 0!==a?a:l.identify)?[3,6]:[4,ha(e,h,{collector:s})];case 5:v=N.sent(),ua(v)&&(p=v,d.lastIdentity=Ru(u,p,d.lastIdentity)),N.label=6;case 6:return p&&(g=Mu(u,p))&&u.identify(g),void 0===c.group?[3,8]:[4,ha(e,c.group,{collector:s})];case 7:y=N.sent(),ua(y)&&(m=y.type,b=y.name,la(m)&&(la(b)||oa(b))&&u.setGroup(m,b)),N.label=8;case 8:return void 0===c.groupIdentify?[3,10]:[4,ha(e,c.groupIdentify,{collector:s})];case 9:w=N.sent(),ua(w)&&(_=w.type,S=w.name,la(_)&&la(S)&&(k=Mu(u,w))&&u.groupIdentify(_,S,k)),N.label=10;case 10:return void 0===c.revenue?[3,12]:[4,ha(e,c.revenue,{collector:s})];case 11:x=N.sent(),E=oa(x)?x:ua(x)?[x]:[],C=!0,I=!1,O=void 0;try{for(T=E[Symbol.iterator]();!(C=(A=T.next()).done);C=!0)P=A.value,ua(P)&&u.revenue(Nu(u,P))}catch(e){I=!0,O=e}finally{try{C||null==T.return||T.return()}finally{if(I)throw O}}N.label=12;case 12:return!0!==(null==r?void 0:r.silent)&&(R=la(null==r?void 0:r.name)?r.name:e.name,M=ua(o)?o:{},u.track(R,M)),l._state=d,[2]}})}).apply(this,arguments)},on:function(e,t){var n;if("consent"===e&&t.data){var r=Pu(t.env),i=t.data,o=null===(n=t.config)||void 0===n?void 0:n.consent;if(o&&0!==Object.keys(o).length){var s=Object.keys(o).every(function(e){return!0===i[e]});r.setOptOut(!s)}}}},kO=SO;return VI=qb,Vu(Du({},"__esModule",{value:!0}),VI)}();
1
+ "use strict";function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _assert_this_initialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _async_generator(e){var t,n;function r(t,n){try{var o=e[t](n),s=o.value,a=s instanceof _overload_yield;Promise.resolve(a?s.v:s).then(function(n){if(a){var u="return"===t?"return":"next";if(!s.k||n.done)return r(u,n);n=e[u](n).value}i(o.done?"return":"normal",n)},function(e){r("throw",e)})}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(o,s){var a={key:e,arg:i,resolve:o,reject:s,next:null};n?n=n.next=a:(t=n=a,r(e,i))})},"function"!=typeof e.return&&(this.return=void 0)}function asyncGeneratorStep(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,i)}function _async_to_generator(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(e){asyncGeneratorStep(o,r,i,s,a,"next",e)}function a(e){asyncGeneratorStep(o,r,i,s,a,"throw",e)}s(void 0)})}}function _await_async_generator(e){return new _overload_yield(e,0)}function _call_super(e,t,n){return t=_get_prototype_of(t),_possible_constructor_return(e,_is_native_reflect_construct()?Reflect.construct(t,n||[],_get_prototype_of(e).constructor):t.apply(e,n))}function _class_call_check(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _construct(e,t,n){return _construct=_is_native_reflect_construct()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&_set_prototype_of(i,n.prototype),i},_construct.apply(null,arguments)}function _defineProperties(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)}}function _create_class(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _define_property(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _get(e,t,n){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=_super_prop_base(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n||e):i.value}},_get(e,t,n||e)}function _get_prototype_of(e){return _get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_get_prototype_of(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_set_prototype_of(e,t)}function _instanceof(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _is_native_function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){_define_property(e,t,n[t])})}return e}function ownKeys(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 _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function _object_without_properties(e,t){if(null==e)return{};var n,r,i,o={};if("undefined"!=typeof Reflect&&Reflect.ownKeys){for(n=Reflect.ownKeys(Object(e)),i=0;i<n.length;i++)r=n[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}if(o=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(e),i=0;i<n.length;i++)r=n[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _object_without_properties_loose(e,t){if(null==e)return{};var n,r,i={},o=Object.getOwnPropertyNames(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}function _overload_yield(e,t){this.v=e,this.k=t}function _possible_constructor_return(e,t){return!t||"object"!==_type_of(t)&&"function"!=typeof t?_assert_this_initialized(e):t}function _set_prototype_of(e,t){return _set_prototype_of=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_set_prototype_of(e,t)}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _super_prop_base(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_get_prototype_of(e)););return e}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(e,t):void 0}}function _wrap_async_generator(e){return function(){return new _async_generator(e.apply(this,arguments))}}function _wrap_native_super(e){var t="function"==typeof Map?new Map:void 0;return _wrap_native_super=function(e){if(null===e||!_is_native_function(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return _construct(e,arguments,_get_prototype_of(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),_set_prototype_of(n,e)},_wrap_native_super(e)}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_is_native_reflect_construct=function(){return!!e})()}function _ts_generator(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),a=Object.defineProperty;return a(s,"next",{value:u(0)}),a(s,"throw",{value:u(1)}),a(s,"return",{value:u(2)}),"function"==typeof Symbol&&a(s,Symbol.iterator,{value:function(){return this}}),s;function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function _ts_values(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 new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}_async_generator.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},_async_generator.prototype.next=function(e){return this._invoke("next",e)},_async_generator.prototype.throw=function(e){return this._invoke("throw",e)},_async_generator.prototype.return=function(e){return this._invoke("return",e)};var Destination=function(){var e,t,n,r,i,o,s,a,u,l,c,d,f,h,p,v,g,y,m,b,w,_,S,k,x,E,C,I,O,T,A,R,P,M,N,L,j,D,U,F,B,q,z,V,W,H,G,K,J,$,Q,Y,X,Z,ee,te,ne,re,ie,oe,se,ae,ue,le,ce,de,fe,he,pe,ve,ge,ye,me,be,we,_e,Se,ke,xe,Ee,Ce,Ie,Oe,Te,Ae,Re,Pe,Me,Ne,Le,je,De,Ue,Fe,Be,qe,ze,Ve,We,He,Ge,Ke,Je,$e,Qe,Ye,Xe,Ze,et,tt,nt,rt,it,ot,st,at,ut,lt,ct,dt,ft,ht,pt,vt,gt,yt,mt,bt,wt,_t,St,kt,xt,Et,Ct,It,Ot,Tt,At,Rt,Pt,Mt,Nt,Lt,jt,Dt=function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)},Ut=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Ft=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,_instanceof(t,n)?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},Bt=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},qt=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},zt=function(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},Vt=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},Wt=function(e){return e>=200&&e<300},Ht=function(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t},Gt=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Kt=function(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},Jt=function(){return"undefined"!=typeof CompressionStream},$t=function(e){return Ft(this,void 0,void 0,function(){var t,n;return Bt(this,function(r){switch(r.label){case 0:if(void 0===(t=CompressionStream))return[2,void 0];r.label=1;case 1:return r.trys.push([1,3,,4]),n=new Blob([e]).stream().pipeThrough(new t("gzip")),[4,new Response(n).arrayBuffer()];case 2:return[2,r.sent()];case 3:return r.sent(),[2,void 0];case 4:return[2]}})})},Qt=function(e,t){var n,r=(n=e,!!bt&&"function"==typeof bt[n]&&(_t[n]||(_t[n]=bt[n],bt[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{if(wt[n]&&!St){St=!0;var r=wt[n];r&&r.forEach(function(t){try{t(n,e)}catch(e){}})}}catch(e){}return St=!1,_t[n].apply(bt,e)}),!0));if(!r)return new Error("Console override failed");wt[e]?wt[e].push(t):wt[e]=[t]},Yt=function(e){var t,n;try{for(var r=qt(Object.values(wt)),i=r.next();!i.done;i=r.next())for(var o=i.value,s=o.length-1;s>=0;s--)if(o[s]===e){o.splice(s,1);break}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},Xt=function(){var e,t;try{for(var n=qt(Object.entries(_t)),r=n.next();!r.done;r=n.next()){var i=zt(r.value,2),o=i[0],s=i[1];s&&(bt[o]=s)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}_t={},wt={}},Zt=function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e},en=function(e,t,n){e&&nc({json:e,allowlist:t.map(tn),excludelist:n.map(tn),ancestors:[]})},tn=function(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(e){return e.replace(/~0/g,"~").replace(/~1/g,"/")})},nn=function(e,t){return t.some(function(t){return rc(e,t)})},rn=function(e,t){var n,r,i,o=G(),s=null==o?void 0:o.TextEncoder;if(s){var a;if("string"==typeof e)a=e,i=(new s).encode(a).length;else if(_instanceof(e,Blob))i=(a=e).size;else if(_instanceof(e,URLSearchParams))a=e,i=(new s).encode(a.toString()).length;else if(ArrayBuffer.isView(e))i=(a=e).byteLength;else if(_instanceof(e,ArrayBuffer))i=(a=e).byteLength;else if(_instanceof(e,FormData)){var u=e,l=0,c=0;try{for(var d=qt(u.entries()),f=d.next();!f.done;f=d.next()){var h=zt(f.value,2),p=h[0],v=h[1];if(l+=p.length,"string"==typeof v)l+=(new s).encode(v).length;else{if(!_instanceof(v,Blob))return;l+=v.size}if(++c>=t)return}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}i=l}else if(_instanceof(e,ReadableStream))return void(a=e);return i}},on=function(e,t,n){if(!e)return null;try{var r=JSON.parse(e);return en(r,t,n),r}catch(e){return null}},sn=function(e){try{e()}catch(e){}},an=function(e,t){return new kc.default(function(n){e.subscribe({next:function(e){t(e).then(function(e){return n.next(e)}).catch(function(e){return n.error(e)})},error:function(e){n.error(e)},complete:function(){n.complete()}})})},un=function(e,t){return new kc.default(function(n){var r=!1,i=new Set,o=function(){var e,t;r=!0;try{for(var n=qt(i),o=n.next();!o.done;o=n.next()){var s=o.value;try{s.unsubscribe()}catch(e){}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}i.clear()},s=function(e){var t=e.subscribe({next:function(e){r||n.next(e)},error:function(e){r||(r=!0,n.error(e),o())},complete:function(){i.delete(t),r||0!==i.size||(n.complete(),o(),r=!0)}});i.add(t)};return s(e),s(t),o})},ln=function(e){var t=new Set,n=null;function r(){null==n||n.unsubscribe(),n=null,t.clear()}return new kc.default(function(i){return t.add(i),null===n&&(n=e.subscribe({next:function(e){var n,r,i;try{for(var o=qt(t),s=o.next();!s.done;s=o.next()){var a=s.value;null===(i=a.next)||void 0===i||i.call(a,e)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},error:function(e){var n,i,o;try{for(var s=qt(t),a=s.next();!a.done;a=s.next()){var u=a.value;null===(o=u.error)||void 0===o||o.call(u,e)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}r()},complete:function(){var e,n,i;try{for(var o=qt(t),s=o.next();!s.done;s=o.next()){var a=s.value;null===(i=a.complete)||void 0===i||i.call(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}r()}})),function(){t.delete(i),0===t.size&&n&&(n.unsubscribe(),n=null)}})},cn=function(e){var t,n=G(),r=null==n?void 0:n[Pc];if("object"===(void 0===(t=r)?"undefined":_type_of(t))&&null!==t&&Rc in t&&!0===t[Rc])return r;var i=new Mc(e);return n&&(n[Pc]=i),i},dn=function(e,t){var n,r=e;if(!0!==r[Nc]){r[Nc]=!0;var i=null!==(n=null==t?void 0:t.scriptUrl)&&void 0!==n?n:Oc,o=null,s=function(t,n){var r,i;"background-capture-complete"===t&&(null===(i=null===(r=e.logger)||void 0===r?void 0:r.debug)||void 0===i||i.call(r,"Background capture complete"),e.notify({action:"background-capture-complete",data:n}))};e.registerActionHandler("initialize-background-capture",function(){var t,n;null===(n=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Initializing background capture (external script)");var r=new URL(i,e.endpoint).toString();e.loadScriptOnce(r).then(function(){var t,n,r;null===(n=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Background capture script loaded (external)"),o=null===(r=null===window||void 0===window?void 0:window.amplitudeBackgroundCapture)||void 0===r?void 0:r.call(window,{messenger:e,onBackgroundCapture:s}),e.notify({action:"background-capture-loaded"})}).catch(function(){var t;null===(t=e.logger)||void 0===t||t.warn("Failed to initialize background capture")})}),e.registerActionHandler("close-background-capture",function(){var e;null===(e=null==o?void 0:o.close)||void 0===e||e.call(o),o=null})}},fn=function(e,t){return t||("STAGING"===e?Jc:"EU"===e?Kc:Gc)},hn=function(e){if(e.type!==Pd.IncrementalSnapshot)return!1;var t=e.data;return t.source===Md.Mutation&&!t.isAttachIframe},pn=function(e){var n,r,i,o,s=e[0],a=new Map,u=new Map,l=new Map,c=new Map,d=new Map;e.forEach(function(e,t){var n,r,i,o,s=e.data;try{for(var f=qt(s.adds),h=f.next();!h.done;h=f.next()){var p=h.value;a.has(p.node.id)||a.set(p.node.id,t),u.set(p.node.id,t),d.set(p.node.id,p.parentId)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}try{for(var v=qt(s.removes),g=v.next();!g.done;g=v.next()){var y=g.value;l.has(y.id)||l.set(y.id,t),c.set(y.id,t)}}catch(e){i={error:e}}finally{try{g&&!g.done&&(o=v.return)&&o.call(v)}finally{if(i)throw i.error}}});var f=new Set,h=new Set;try{for(var p=qt(a),v=p.next();!v.done;v=p.next()){var g=zt(v.value,2),y=g[0],m=g[1],b=l.get(y);if(void 0!==b)u.get(y)>=c.get(y)||(m<b?f.add(y):b<m&&h.add(y))}}catch(e){n={error:e}}finally{try{v&&!v.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}var w=new Set;if(f.size>0||h.size>0)for(var _=!0;_;){_=!1;try{for(var S=(i=void 0,qt(d)),k=S.next();!k.done;k=S.next()){var x=zt(k.value,2),E=x[0],C=x[1];if(!f.has(E)&&!h.has(E)&&!w.has(E)&&(f.has(C)||h.has(C)||w.has(C))){var I=l.get(E),O=a.get(E);void 0!==I&&void 0!==O&&I<O?h.add(E):void 0!==I&&void 0!==O&&I===O?w.add(E):f.add(E),_=!0}}}catch(e){i={error:e}}finally{try{k&&!k.done&&(o=S.return)&&o.call(S)}finally{if(i)throw i.error}}}var T=f.size>0||h.size>0||w.size>0,A=[];e.forEach(function(e,t){var n,r;try{for(var i=qt(e.data.removes),o=i.next();!o.done;o=i.next()){var s=o.value;f.has(s.id)||(h.has(s.id)&&t>=a.get(s.id)||w.has(s.id)&&(f.has(s.parentId)||h.has(s.parentId)||w.has(s.parentId))||A.push(s))}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}});var R=e.flatMap(function(e){return e.data.adds}),P=e.flatMap(function(e){return e.data.texts}),M=e.flatMap(function(e){return e.data.attributes}),N={source:Md.Mutation,removes:A,adds:T?R.filter(function(e){return!f.has(e.node.id)&&!h.has(e.node.id)&&!w.has(e.node.id)}):R,texts:T?P.filter(function(e){return!f.has(e.id)&&!h.has(e.id)&&!w.has(e.id)}):P,attributes:T?M.filter(function(e){return!f.has(e.id)&&!h.has(e.id)&&!w.has(e.id)}):M};return t(t({},s),{data:N})},vn=function(e){if(e.length<=1)return e;for(var t=[],n=0;n<e.length;)if(hn(e[n])){for(var r=n+1;r<e.length&&hn(e[r]);)r++;t.push(r>n+1?pn(e.slice(n,r)):e[n]),n=r}else t.push(e[n]),n++;return t},gn=function(e,t){return Ft(this,void 0,void 0,function(){var n,r,i,o,s,a,u,l,c,d,f,h,p,v,g=this;return Bt(this,function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),n=t.CompressionStream,r=new n("gzip"),i=r.writable.getWriter(),o=r.readable.getReader(),s=[],a=Ft(g,void 0,void 0,function(){var e,t,n;return Bt(this,function(r){switch(r.label){case 0:return[4,o.read()];case 1:if(e=r.sent(),t=e.done,n=e.value,t)return[3,3];s.push(n),r.label=2;case 2:return[3,0];case 3:return[2]}})}),[4,i.write((new TextEncoder).encode(e))];case 1:return y.sent(),[4,i.close()];case 2:return y.sent(),[4,a];case 3:y.sent(),u=s.reduce(function(e,t){return e+t.length},0),l=new Uint8Array(u),c=0;try{for(d=qt(s),f=d.next();!f.done;f=d.next())h=f.value,l.set(h,c),c+=h.length}catch(e){p={error:e}}finally{try{f&&!f.done&&(v=d.return)&&v.call(d)}finally{if(p)throw p.error}}return[2,l];case 4:return y.sent(),[2,null];case 5:return[2]}})})},yn=function(e){var t=new Promise(function(t,n){var r=function(){e.removeEventListener("success",i),e.removeEventListener("error",o)},i=function(){t(_n(e.result)),r()},o=function(){n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",o)});return ef.set(t,e),t},mn=function(e){tf=e(tf)},bn=function(e){return(Yd||(Yd=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(nf(this),n),_n(this.request)}:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _n(e.apply(nf(this),n))}},wn=function(e){return"function"==typeof e?bn(e):(_instanceof(e,IDBTransaction)&&function(e){if(!Xd.has(e)){var t=new Promise(function(t,n){var r=function(){e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=function(){t(),r()},o=function(){n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)});Xd.set(e,t)}}(e),$d(e,Qd||(Qd=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,tf):e)},_n=function(e){if(_instanceof(e,IDBRequest))return yn(e);if(Zd.has(e))return Zd.get(e);var t=wn(e);return t!==e&&(Zd.set(e,t),ef.set(t,e)),t},Sn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.blocked,i=n.upgrade,o=n.blocking,s=n.terminated,a=indexedDB.open(e,t),u=_n(a);return i&&a.addEventListener("upgradeneeded",function(e){i(_n(a.result),e.oldVersion,e.newVersion,_n(a.transaction),e)}),r&&a.addEventListener("blocked",function(e){return r(e.oldVersion,e.newVersion,e)}),u.then(function(e){s&&e.addEventListener("close",function(){return s()}),o&&e.addEventListener("versionchange",function(e){return o(e.oldVersion,e.newVersion,e)})}).catch(function(){}),u},kn=function(e,t){if(_instanceof(e,IDBDatabase)&&!(t in e)&&"string"==typeof t){if(sf.get(t))return sf.get(t);var n=t.replace(/FromIndex$/,""),r=t!==n,i=of.includes(n);if(n in(r?IDBIndex:IDBObjectStore).prototype&&(i||rf.includes(n))){var o=function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];return _async_to_generator(function(){var t,s,a;return _ts_generator(this,function(u){switch(u.label){case 0:return s=this.transaction(e,i?"readwrite":"readonly"),a=s.store,r&&(a=a.index(o.shift())),[4,Promise.all([(t=a)[n].apply(t,_to_consumable_array(o)),i&&s.done])];case 1:return[2,u.sent()[0]]}})}).call(this)};return sf.set(t,o),o}}},xn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _wrap_async_generator(function(){var e,n,r;return _ts_generator(this,function(i){switch(i.label){case 0:return _instanceof(e=this,IDBCursor)?[3,2]:[4,_await_async_generator((n=e).openCursor.apply(n,_to_consumable_array(t)))];case 1:e=i.sent(),i.label=2;case 2:if(!e)return[2];r=new Proxy(e,df),cf.set(r,e),ef.set(r,nf(e)),i.label=3;case 3:return e?[4,r]:[3,6];case 4:return i.sent(),[4,_await_async_generator(lf.get(r)||e.continue())];case 5:return e=i.sent(),lf.delete(r),[3,3];case 6:return[2]}})}).call(this)},En=function(e,t){return t===Symbol.asyncIterator&&$d(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&$d(e,[IDBIndex,IDBObjectStore])},Cn=function(e,t,n){var r=setTimeout(n,t);return e.then(function(){return clearTimeout(r)},function(){return clearTimeout(r)}),function(){return clearTimeout(r)}},In=function(e,n){if(Cf=new Date,e.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if("html"===e.tagName.toLowerCase())return"html";var r={root:document.body,idName:function(e){return!0},className:function(e){return!0},tagName:function(e){return!0},attr:function(e,t){return!1},seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};xf=t(t({},r),n),Ef=On(xf.root,r);var i=Tn(e,"all",function(){return Tn(e,"two",function(){return Tn(e,"one",function(){return Tn(e,"none")})})});if(i){var o=Wn(hh(i,e));return o.length>0&&(i=o[0]),Rn(i)}throw new Error("Selector was not found.")},On=function(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e},Tn=function(e,t,n){for(var r=null,i=[],o=e,s=0,a=function(){var e,a,u=(new Date).getTime()-Cf.getTime();if(void 0!==xf.timeoutMs&&u>xf.timeoutMs)throw new Error("Timeout: Can't find a unique selector after ".concat(u,"ms"));var l=zn(Nn(o))||zn.apply(void 0,Vt([],zt(Ln(o)),!1))||zn.apply(void 0,Vt([],zt(jn(o)),!1))||zn(Dn(o))||[Un()],c=Fn(o);if("all"==t)c&&(l=l.concat(l.filter(qn).map(function(e){return Bn(e,c)})));else if("two"==t)l=l.slice(0,1),c&&(l=l.concat(l.filter(qn).map(function(e){return Bn(e,c)})));else if("one"==t){var d=zt(l=l.slice(0,1),1)[0];c&&qn(d)&&(l=[Bn(d,c)])}else"none"==t&&(l=[Un()],c&&(l=[Bn(l[0],c)]));try{for(var f=(e=void 0,qt(l)),h=f.next();!h.done;h=f.next()){(d=h.value).level=s}}catch(t){e={error:t}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(e)throw e.error}}if(i.push(l),i.length>=xf.seedMinLength&&(r=An(i,n)))return"break";o=o.parentElement,s++};o;){if("break"===a())break}return r||(r=An(i,n)),!r&&n?n():r},An=function(e,t){var n,r,i=Wn(fh(e));if(i.length>xf.threshold)return t?t():null;try{for(var o=qt(i),s=o.next();!s.done;s=o.next()){var a=s.value;if(Mn(a))return a}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return null},Rn=function(e){for(var t=e[0],n=t.name,r=1;r<e.length;r++){var i=e[r].level||0;n=t.level===i-1?"".concat(e[r].name," > ").concat(n):"".concat(e[r].name," ").concat(n),t=e[r]}return n},Pn=function(e){return e.map(function(e){return e.penalty}).reduce(function(e,t){return e+t},0)},Mn=function(e){var t=Rn(e);switch(Ef.querySelectorAll(t).length){case 0:throw new Error("Can't select any node with this selector: ".concat(t));case 1:return!0;default:return!1}},Nn=function(e){var t=e.getAttribute("id");return t&&xf.idName(t)?{name:"#"+CSS.escape(t),penalty:0}:null},Ln=function(e){return Array.from(e.attributes).filter(function(e){return xf.attr(e.name,e.value)}).map(function(e){return{name:"[".concat(CSS.escape(e.name),'="').concat(CSS.escape(e.value),'"]'),penalty:.5}})},jn=function(e){return Array.from(e.classList).filter(xf.className).map(function(e){return{name:"."+CSS.escape(e),penalty:1}})},Dn=function(e){var t=e.tagName.toLowerCase();return xf.tagName(t)?{name:t,penalty:2}:null},Un=function(){return{name:"*",penalty:3}},Fn=function(e){var t=e.parentNode;if(!t)return null;var n=t.firstChild;if(!n)return null;for(var r=0;n&&(n.nodeType===Node.ELEMENT_NODE&&r++,n!==e);)n=n.nextSibling;return r},Bn=function(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}},qn=function(e){return"html"!==e.name&&!e.name.startsWith("#")},zn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.filter(Vn);return n.length>0?n:null},Vn=function(e){return null!=e},Wn=function(e){return Vt([],zt(e),!1).sort(function(e,t){return Pn(e)-Pn(t)})},Hn=function(e,t){return Ef.querySelector(Rn(e))===t},Gn=function(){var e=G();return(null==e?void 0:e.innerHeight)||document.documentElement&&document.documentElement.clientHeight||0},Kn=function(){var e=G();return(null==e?void 0:e.innerWidth)||document.documentElement&&document.documentElement.clientWidth||0},Jn=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,_instanceof(t,n)?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},$n=function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Qn=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Yn=function(e,t){return(e<<t|e>>>32-t)>>>0},Xn=function(e,t){return e=e+Math.imul(t,Yp)>>>0,e=Yn(e,13),e=Math.imul(e,Qp)>>>0},Zn=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},er=function(e,t){void 0===t&&(t=0);var n,r=function(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r>=55296&&r<=56319&&n+1<e.length){var i=e.charCodeAt(n+1);i>=56320&&i<=57343&&(r=i-56320+(r-55296<<10)+65536,n++)}r<128?t.push(r):r<2048?t.push(192|r>>6,128|63&r):r<65536?t.push(224|r>>12,128|r>>6&63,128|63&r):t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r)}return new Uint8Array(t)}(e),i=r.length,o=0;if(i>=16){for(var s=t+Qp+Yp>>>0,a=t+Yp>>>0,u=t>>>0,l=t-Qp>>>0;o<=i-16;)s=Xn(s,Zn(r,o)),a=Xn(a,Zn(r,o+=4)),u=Xn(u,Zn(r,o+=4)),l=Xn(l,Zn(r,o+=4)),o+=4;n=Yn(s,1)+Yn(a,7)+Yn(u,12)+Yn(l,18)>>>0}else n=t+ev>>>0;for(n=n+i>>>0;o<=i-4;)n=n+Math.imul(Zn(r,o),Xp)>>>0,n=Math.imul(Yn(n,17),Zp)>>>0,o+=4;for(;o<i;)n=n+Math.imul(r[o],ev)>>>0,n=Math.imul(Yn(n,11),Qp)>>>0,o++;return n^=n>>>15,n=Math.imul(n,Yp)>>>0,n^=n>>>13,n=Math.imul(n,Xp)>>>0,(n^=n>>>16)>>>0},tr=function(e,t,n){if(void 0===n&&(n={}),!(null==e?void 0:e.location))return function(){};var r=n.enablePolling,i=void 0!==r&&r,o=n.pollingInterval,s=void 0===o?qc:o;if(i){var a=function(){var t;return null!==(t=e.location.href)&&void 0!==t?t:""},u=a(),l=e.setInterval(function(){var e=a();e!==u&&(u=e,t(e))},s);return function(){null!=l&&e.clearInterval(l)}}var c=nv.get(e);if(!c){var d=void 0,f=new Set,h=function(){var t,n=null!==(t=e.location.href)&&void 0!==t?t:"";void 0!==d&&n===d||(d=n,f.forEach(function(e){return e(n)}))},p=function(e){var t=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=e.apply(this,t);return h(),r};return t[tv]=!0,t},v=e.history;if(null==v?void 0:v.pushState){var g=Reflect.get(v,"pushState");g[tv]||(v.pushState=p(g))}if(null==v?void 0:v.replaceState){var y=Reflect.get(v,"replaceState");y[tv]||(v.replaceState=p(y))}c={callbacks:f,notify:h,onPopStateOrHashChange:function(){return h()},listenersAttached:!1},nv.set(e,c)}var m=c;return m.listenersAttached||(e.addEventListener("popstate",m.onPopStateOrHashChange),e.addEventListener("hashchange",m.onPopStateOrHashChange),m.listenersAttached=!0),m.callbacks.add(t),function(){m.callbacks.delete(t),0===m.callbacks.size&&m.listenersAttached&&(e.removeEventListener("popstate",m.onPopStateOrHashChange),e.removeEventListener("hashchange",m.onPopStateOrHashChange),m.listenersAttached=!1)}},nr=function(e){return void 0===e&&(e={}),{name:"amplitude/url-tracking@1",observer:function(n,r,i){var o,s,a,u=t(t({},e),i),l=u.ugcFilterRules||[],c=null!==(o=u.enablePolling)&&void 0!==o&&o,d=null!==(s=u.pollingInterval)&&void 0!==s?s:qc,f=null!==(a=u.captureDocumentTitle)&&void 0!==a&&a;if(!r)return function(){};var h=void 0,p=function(){return r.location&&r.location.href||""},v=function(){var e=p();if(void 0===h||e!==h){h=e;var t=function(){var e=r.innerHeight,t=r.innerWidth,n=r.document,i=p(),o="";return f&&(o=(null==n?void 0:n.title)||""),{href:l.length>0?Cd(i,l):i,title:o,viewportHeight:e,viewportWidth:t,type:"url-change-event"}}();n(t)}},g=tr(r,function(){return v()},c?{enablePolling:!0,pollingInterval:d}:{});return v(),function(){return g()}},options:e}},rr=function(e){if(xv[e])return xv[e];var t=function(e){var t,n,r=null==(n=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:n.call(t,e);return r&&globalThis[r]?globalThis[r]:void 0}(e)||globalThis[e],n=t.prototype,r=e in Sv?Sv[e]:void 0,i=Boolean(r&&r.every(function(e){var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),o=e in kv?kv[e]:void 0,s=Boolean(o&&o.every(function(e){var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))}));if(i&&s)return xv[e]=t.prototype,t.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var u=a.contentWindow;if(!u)return t.prototype;var l=u[e].prototype;return document.body.removeChild(a),l?xv[e]=l:n}catch(e){return n}},ir=function(e,t,n){var r,i="".concat(e,".").concat(String(n));if(Ev[i])return Ev[i].call(t);var o=rr(e),s=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return s?(Ev[i]=s,s.call(t)):t[n]},or=function(e,t,n){var r="".concat(e,".").concat(String(n));if(Cv[r])return Cv[r].bind(t);var i=rr(e)[n];return"function"!=typeof i?t[n]:(Cv[r]=i,i.bind(t))},sr=function(e){return ir("Node",e,"childNodes")},ar=function(e){return ir("Node",e,"parentNode")},ur=function(e){return ir("Node",e,"parentElement")},lr=function(e){return ir("Node",e,"textContent")},cr=function(e,t){return or("Node",e,"contains")(t)},dr=function(e){return or("Node",e,"getRootNode")()},fr=function(e){return e&&"host"in e?ir("ShadowRoot",e,"host"):null},hr=function(e){return e.styleSheets},pr=function(e){return e&&"shadowRoot"in e?ir("Element",e,"shadowRoot"):null},vr=function(e,t){return ir("Element",e,"querySelector")(t)},gr=function(e,t){return ir("Element",e,"querySelectorAll")(t)},yr=function(){return rr("MutationObserver").constructor},mr=function(){if(jv)return Lv;jv=1;var e=function(){if(Rv)return Av.exports;Rv=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return Av.exports=t(),Av.exports.createColors=t,Av.exports}(),t=Nv,n=function(){function n(e,t,r,i,o,s){var a;return _class_call_check(this,n),(a=_call_super(this,n,[e])).name="CssSyntaxError",a.reason=e,o&&(a.file=o),i&&(a.source=i),s&&(a.plugin=s),void 0!==t&&void 0!==r&&("number"==typeof t?(a.line=t,a.column=r):(a.line=t.line,a.column=t.column,a.endLine=r.line,a.endColumn=r.column)),a.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(a,n),a}return _inherits(n,_wrap_native_super(Error)),_create_class(n,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(n){var r=this;if(!this.source)return"";var i=this.source;null==n&&(n=e.isColorSupported),t&&n&&(i=t(i));var o,s,a=i.split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),c=String(l).length;if(n){var d=e.createColors(!0),f=d.bold,h=d.gray,p=d.red;o=function(e){return f(p(e))},s=function(e){return h(e)}}else o=s=function(e){return e};return a.slice(u,l).map(function(e,t){var n=u+1+t,i=" "+(" "+n).slice(-c)+" | ";if(n===r.line){var a=s(i.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," ");return o(">")+s(i)+e+"\n "+a+o("^")}return" "+s(i)+e}).join("\n")}},{key:"toString",value:function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}]),n}();return Lv=n,n.default=n,Lv},br=function(){return Uv||(Uv=1,Dv.isClean=Symbol("isClean"),Dv.my=Symbol("my")),Dv},wr=function(){if(Bv)return Fv;Bv=1;var e={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var t=function(){function t(e){_class_call_check(this,t),this.builder=e}return _create_class(t,[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{var i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}}},{key:"beforeAfter",value:function(e,t){var n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var s=0;s<i;s++)n+=o}return n}},{key:"block",value:function(e,t){var n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}},{key:"body",value:function(e){for(var t=e.nodes.length-1;t>0&&"comment"===e.nodes[t].type;)t-=1;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}},{key:"comment",value:function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}},{key:"decl",value:function(e,t){var n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}},{key:"document",value:function(e){this.body(e)}},{key:"raw",value:function(t,n,r){var i;if(r||(r=n),n&&void 0!==(i=t.raws[n]))return i;var o=t.parent;if("before"===r){if(!o||"root"===o.type&&o.first===t)return"";if(o&&"document"===o.type)return""}if(!o)return e[r];var s=t.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[r])return s.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var a,u="raw"+((a=r)[0].toUpperCase()+a.slice(1));return this[u]?i=this[u](s,t):s.walk(function(e){if(void 0!==(i=e.raws[n]))return!1}),void 0===i&&(i=e[r]),s.rawCache[r]=i,i}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}},{key:"rawBeforeComment",value:function(e,t){var n;return e.walkComments(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}},{key:"rawBeforeDecl",value:function(e,t){var n;return e.walkDecls(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}},{key:"rawBeforeOpen",value:function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}},{key:"rawBeforeRule",value:function(e){var t;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return(t=n.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}},{key:"rawColon",value:function(e){var t;return e.walkDecls(function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}},{key:"rawEmptyBody",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}},{key:"rawIndent",value:function(e){return e.raws.indent?e.raws.indent:(e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){var i=n.raws.before.split("\n");return t=(t=i[i.length-1]).replace(/\S/g,""),!1}}),t);var t}},{key:"rawSemicolon",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}},{key:"rawValue",value:function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}},{key:"root",value:function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}},{key:"rule",value:function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}},{key:"stringify",value:function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}]),t}();return Fv=t,t.default=t,Fv},_r=function(){if(zv)return qv;zv=1;var e=wr();function t(t,n){new e(n).stringify(t)}return qv=t,t.default=t,qv},Sr=function(){if(Wv)return Vv;Wv=1;var e=br(),t=e.isClean,n=e.my,r=mr(),i=wr(),o=_r();function s(e,t){var n=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){var i=e[r],o=void 0===i?"undefined":_type_of(i);"parent"===r&&"object"===o?t&&(n[r]=t):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map(function(e){return s(e,n)}):("object"===o&&null!==i&&(i=s(i)),n[r]=i)}return n}var a=function(){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var i in _class_call_check(this,e),this.raws={},this[t]=!1,this[n]=!0,r)if("nodes"===i){this.nodes=[];var o=!0,s=!1,a=void 0;try{for(var u,l=r[i][Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;"function"==typeof c.clone?this.append(c.clone()):this.append(c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}}else this[i]=r[i]}return _create_class(e,[{key:"addToError",value:function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))}return e}},{key:"after",value:function(e){return this.parent.insertAfter(this,e),this}},{key:"assign",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e)this[t]=e[t];return this}},{key:"before",value:function(e){return this.parent.insertBefore(this,e),this}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=s(this);for(var n in e)t[n]=e[n];return t}},{key:"cloneAfter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertAfter(this,t),t}},{key:"cloneBefore",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertBefore(this,t),t}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.source){var n=this.rangeBy(t),i=n.end,o=n.start;return this.source.input.error(e,{column:o.column,line:o.line},{column:i.column,line:i.line},t)}return new r(e)}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0}}}},{key:"markDirty",value:function(){if(this[t]){this[t]=!1;for(var e=this;e=e.parent;)e[t]=!1}}},{key:"next",value:function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}}},{key:"positionBy",value:function(e,t){var n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){var r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n}},{key:"positionInside",value:function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?(r=1,i+=1):r+=1;return{column:r,line:i}}},{key:"prev",value:function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}}},{key:"rangeBy",value:function(e){var t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var r=this.toString(),i=r.indexOf(e.word);-1!==i&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}},{key:"raw",value:function(e,t){return(new i).raw(this,e,t)}},{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"replaceWith",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this.parent){var r=this,i=!1,o=!0,s=!1,a=void 0;try{for(var u,l=t[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;c===this?i=!0:i?(this.parent.insertAfter(r,c),r=c):this.parent.insertBefore(r,c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}i||this.remove()}return this}},{key:"root",value:function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}},{key:"toJSON",value:function(e,t){var n={},r=null==t;t=t||new Map;var i=0;for(var o in this)if(Object.prototype.hasOwnProperty.call(this,o)&&"parent"!==o&&"proxyCache"!==o){var s=this[o];if(Array.isArray(s))n[o]=s.map(function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&e.toJSON?e.toJSON(null,t):e});else if("object"===(void 0===s?"undefined":_type_of(s))&&s.toJSON)n[o]=s.toJSON(null,t);else if("source"===o){var a=t.get(s.input);null==a&&(a=i,t.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=_to_consumable_array(t.keys()).map(function(e){return e.toJSON()})),n}},{key:"toProxy",value:function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;e.stringify&&(e=e.stringify);var t="";return e(this,function(e){t+=e}),t}},{key:"warn",value:function(e,t,n){var r={node:this};for(var i in n)r[i]=n[i];return e.warn(t,r)}},{key:"proxyOf",get:function(){return this}}]),e}();return Vv=a,a.default=a,Vv},kr=function(){if(Gv)return Hv;Gv=1;var e=function(e){function t(e){var n;return _class_call_check(this,t),e&&void 0!==e.value&&"string"!=typeof e.value&&(e=_object_spread_props(_object_spread({},e),{value:String(e.value)})),(n=_call_super(this,t,[e])).type="decl",n}return _inherits(t,e),_create_class(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),t}(Sr());return Hv=e,e.default=e,Hv},xr=function(){if(Qv)return $v;Qv=1;var e=Nv.SourceMapConsumer,t=Nv.SourceMapGenerator,n=Nv.existsSync,r=Nv.readFileSync,i=Nv.dirname,o=Nv.join;var s=function(){function s(e,t){if(_class_call_check(this,s),!1!==t.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),r&&(this.text=r)}}return _create_class(s,[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}},{key:"decodeInline",value:function(e){var t;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}},{key:"getAnnotationURL",value:function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}},{key:"loadAnnotation",value:function(e){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(t){var n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}}},{key:"loadFile",value:function(e){if(this.root=i(e),n(e))return this.mapFile=e,r(e,"utf-8").toString().trim()}},{key:"loadMap",value:function(n,r){if(!1===r)return!1;if(r){if("string"==typeof r)return r;if("function"!=typeof r){if(_instanceof(r,e))return t.fromSourceMap(r).toString();if(_instanceof(r,t))return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}var s=r(n);if(s){var a=this.loadFile(s);if(!a)throw new Error("Unable to load previous source map: "+s.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var u=this.annotation;return n&&(u=o(i(n),u)),this.loadFile(u)}}}},{key:"startWith",value:function(e,t){return!!e&&e.substr(0,t.length)===t}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}]),s}();return $v=s,s.default=s,$v},Er=function(){if(Xv)return Yv;Xv=1;var e=Nv.SourceMapConsumer,t=Nv.SourceMapGenerator,n=Nv.fileURLToPath,r=Nv.pathToFileURL,i=Nv.isAbsolute,o=Nv.resolve,s=(Jv||(Jv=1,Kv={nanoid:function(){for(var e="",t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21;return function(){for(var n="",r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t;r--;)n+=e[Math.random()*e.length|0];return n}}}),Kv).nanoid,a=Nv,u=mr(),l=xr(),c=Symbol("fromOffsetCache"),d=Boolean(e&&t),f=Boolean(o&&i),h=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_class_call_check(this,e),null==t||"object"===(void 0===t?"undefined":_type_of(t))&&!t.toString)throw new Error("PostCSS received ".concat(t," instead of CSS string"));if(this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!f||/^\w+:\/\//.test(n.from)||i(n.from)?this.file=n.from:this.file=o(n.from)),f&&d){var r=new l(this.css,n);if(r.text){this.map=r;var a=r.consumer().file;!this.file&&a&&(this.file=this.mapResolve(a))}}this.file||(this.id="<input css "+s(6)+">"),this.map&&(this.map.file=this.from)}return _create_class(e,[{key:"error",value:function(e,t,n){var i,o,s,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(t&&"object"===(void 0===t?"undefined":_type_of(t))){var l=t,c=n;if("number"==typeof l.offset){var d=this.fromOffset(l.offset);t=d.line,n=d.col}else t=l.line,n=l.column;if("number"==typeof c.offset){var f=this.fromOffset(c.offset);o=f.line,s=f.col}else o=c.line,s=c.column}else if(!n){var h=this.fromOffset(t);t=h.line,n=h.col}var p=this.origin(t,n,o,s);return(i=p?new u(e,void 0===p.endLine?p.line:{column:p.column,line:p.line},void 0===p.endLine?p.column:{column:p.endColumn,line:p.endLine},p.source,p.file,a.plugin):new u(e,void 0===o?t:{column:n,line:t},void 0===o?n:{column:s,line:o},this.css,this.file,a.plugin)).input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(r&&(i.input.url=r(this.file).toString()),i.input.file=this.file),i}},{key:"fromOffset",value:function(e){var t;if(this[c])t=this[c];else{var n=this.css.split("\n");t=new Array(n.length);for(var r=0,i=0,o=n.length;i<o;i++)t[i]=r,r+=n[i].length+1;this[c]=t}var s=0;if(e>=t[t.length-1])s=t.length-1;else for(var a,u=t.length-2;s<u;)if(e<t[a=s+(u-s>>1)])u=a-1;else{if(!(e>=t[a+1])){s=a;break}s=a+1}return{col:e-t[s]+1,line:s+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}},{key:"origin",value:function(e,t,o,s){if(!this.map)return!1;var a,u,l=this.map.consumer(),c=l.originalPositionFor({column:t,line:e});if(!c.source)return!1;"number"==typeof o&&(a=l.originalPositionFor({column:s,line:o})),u=i(c.source)?r(c.source):new URL(c.source,this.map.consumer().sourceRoot||r(this.map.mapFile));var d={column:c.column,endColumn:a&&a.column,endLine:a&&a.line,line:c.line,url:u.toString()};if("file:"===u.protocol){if(!n)throw new Error("file: protocol is not available in this PostCSS build");d.file=n(u)}var f=l.sourceContentFor(c.source);return f&&(d.source=f),d}},{key:"toJSON",value:function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=_object_spread({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}},{key:"from",get:function(){return this.file||this.id}}]),e}();return Yv=h,h.default=h,a&&a.registerInput&&a.registerInput(h),Yv},Cr=function(){if(eg)return Zv;eg=1;var e=Nv.SourceMapConsumer,t=Nv.SourceMapGenerator,n=Nv.dirname,r=Nv.relative,i=Nv.resolve,o=Nv.sep,s=Nv.pathToFileURL,a=Er(),u=Boolean(e&&t),l=Boolean(n&&i&&r&&o);return Zv=function(){function c(e,t,n,r){_class_call_check(this,c),this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}return _create_class(c,[{key:"addAnnotation",value:function(){var e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}},{key:"applyPrevMaps",value:function(){var t=!0,r=!1,i=void 0;try{for(var o,s=this.previous()[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){var a=o.value,u=this.toUrl(this.path(a.file)),l=a.root||n(a.file),c=void 0;!1===this.mapOpts.sourcesContent?(c=new e(a.text)).sourcesContent&&(c.sourcesContent=null):c=a.consumer(),this.map.applySourceMap(c,u,this.toUrl(this.path(l)))}}catch(e){r=!0,i=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}},{key:"generate",value:function(){if(this.clearAnnotation(),l&&u&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]}},{key:"generateMap",value:function(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var e=this;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});var n,r,i=1,o=1,s="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(t,u,l){if(e.css+=t,u&&"end"!==l&&(a.generated.line=i,a.generated.column=o-1,u.source&&u.source.start?(a.source=e.sourcePath(u),a.original.line=u.source.start.line,a.original.column=u.source.start.column-1,e.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,e.map.addMapping(a))),(n=t.match(/\n/g))?(i+=n.length,r=t.lastIndexOf("\n"),o=t.length-r):o+=t.length,u&&"start"!==l){var c=u.parent||{raws:{}};("decl"===u.type||"atrule"===u.type&&!u.nodes)&&u===c.last&&!c.raws.semicolon||(u.source&&u.source.end?(a.source=e.sourcePath(u),a.original.line=u.source.end.line,a.original.column=u.source.end.column-1,a.generated.line=i,a.generated.column=o-2,e.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,a.generated.line=i,a.generated.column=o-1,e.map.addMapping(a)))}})}},{key:"isAnnotation",value:function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))}},{key:"isMap",value:function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}},{key:"isSourcesContent",value:function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var o=this.opts.to?n(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=n(i(o,this.mapOpts.annotation)));var s=r(o,e);return this.memoizedPaths.set(e,s),s}},{key:"previous",value:function(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;e.previousMaps.includes(n)||e.previousMaps.push(n)}});else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}},{key:"setSourcesContent",value:function(){var e=this,t={};if(this.root)this.root.walk(function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.usesFileUrls?e.toFileUrl(r):e.toUrl(e.path(r));e.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){var n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}},{key:"sourcePath",value:function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}},{key:"toBase64",value:function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}},{key:"toFileUrl",value:function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(s){var n=s(e).toString();return this.memoizedFileURLs.set(e,n),n}throw new Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));var n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}]),c}()},Ir=function(){if(ng)return tg;ng=1;var e=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t,[e])).type="comment",n}return _inherits(t,e),t}(Sr());return tg=e,e.default=e,tg},Or=function(){if(ig)return rg;ig=1;var e,t,n,r,i=br(),o=i.isClean,s=i.my,a=kr(),u=Ir();function l(e){return e.map(function(e){return e.nodes&&(e.nodes=l(e.nodes)),delete e.source,e})}function c(e){if(e[o]=!1,e.proxyOf.nodes){var t=!0,n=!1,r=void 0;try{for(var i,s=e.proxyOf.nodes[Symbol.iterator]();!(t=(i=s.next()).done);t=!0){c(i.value)}}catch(e){n=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(n)throw r}}}}var d=function(r){function i(){return _class_call_check(this,i),_call_super(this,i,arguments)}return _inherits(i,r),_create_class(i,[{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value,l=this.normalize(u,this.last),c=!0,d=!1,f=void 0;try{for(var h,p=l[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;this.proxyOf.nodes.push(v)}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if(_get(_get_prototype_of(i.prototype),"cleanRaws",this).call(this,e),this.nodes){var t=!0,n=!1,r=void 0;try{for(var o,s=this.nodes[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){o.value.cleanRaws(e)}}catch(e){n=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(n)throw r}}}}},{key:"each",value:function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"getIterator",value:function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o;return(o=e)[t].apply(o,_to_consumable_array(r.map(function(e){return"function"==typeof e?function(t,n){return e(t.toProxy(),n)}:e})))}:"every"===t||"some"===t?function(n){return e[t](function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return n.apply(void 0,[e.toProxy()].concat(_to_consumable_array(r)))})}:"root"===t?function(){return e.root().toProxy()}:"nodes"===t?e.nodes.map(function(e){return e.toProxy()}):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0}}}},{key:"index",value:function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}},{key:"insertAfter",value:function(e,t){var n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);var i,o=!0,s=!1,a=void 0;try{for(var u,l=r[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;this.proxyOf.nodes.splice(n+1,0,c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}for(var d in this.indexes)n<(i=this.indexes[d])&&(this.indexes[d]=i+r.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n=this.index(e),r=0===n&&"prepend",i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);var o,s=!0,a=!1,u=void 0;try{for(var l,c=i[Symbol.iterator]();!(s=(l=c.next()).done);s=!0){var d=l.value;this.proxyOf.nodes.splice(n,0,d)}}catch(e){a=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(a)throw u}}for(var f in this.indexes)n<=(o=this.indexes[f])&&(this.indexes[f]=o+i.length);return this.markDirty(),this}},{key:"normalize",value:function(r,d){var f=this;if("string"==typeof r)r=l(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r)){r=r.slice(0);var h=!0,p=!1,v=void 0;try{for(var g,y=r[Symbol.iterator]();!(h=(g=y.next()).done);h=!0){var m=g.value;m.parent&&m.parent.removeChild(m,"ignore")}}catch(e){p=!0,v=e}finally{try{h||null==y.return||y.return()}finally{if(p)throw v}}}else if("root"===r.type&&"document"!==this.type){r=r.nodes.slice(0);var b=!0,w=!1,_=void 0;try{for(var S,k=r[Symbol.iterator]();!(b=(S=k.next()).done);b=!0){var x=S.value;x.parent&&x.parent.removeChild(x,"ignore")}}catch(e){w=!0,_=e}finally{try{b||null==k.return||k.return()}finally{if(w)throw _}}}else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new a(r)]}else if(r.selector)r=[new t(r)];else if(r.name)r=[new n(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new u(r)]}var E=r.map(function(e){return e[s]||i.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[o]&&c(e),void 0===e.raws.before&&d&&void 0!==d.raws.before&&(e.raws.before=d.raws.before.replace(/\S/g,"")),e.parent=f.proxyOf,e});return E}},{key:"prepend",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.reverse();var r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value,l=this.normalize(u,this.first,"prepend").reverse(),c=!0,d=!1,f=void 0;try{for(var h,p=l[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;this.proxyOf.nodes.unshift(v)}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}for(var g in this.indexes)this.indexes[g]=this.indexes[g]+l.length}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return this.markDirty(),this}},{key:"push",value:function(e){return e.parent=this,this.proxyOf.nodes.push(e),this}},{key:"removeAll",value:function(){var e=!0,t=!1,n=void 0;try{for(var r,i=this.proxyOf.nodes[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){r.value.parent=void 0}}catch(e){t=!0,n=e}finally{try{e||null==i.return||i.return()}finally{if(t)throw n}}return this.proxyOf.nodes=[],this.markDirty(),this}},{key:"removeChild",value:function(e){var t;for(var n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}},{key:"replaceValues",value:function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"walk",value:function(e){return this.each(function(t,n){var r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}},{key:"walkAtRules",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("atrule"===e.type)return t(e,n)}))}},{key:"walkComments",value:function(e){return this.walk(function(t,n){if("comment"===t.type)return e(t,n)})}},{key:"walkDecls",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("decl"===e.type)return t(e,n)}))}},{key:"walkRules",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("rule"===e.type)return t(e,n)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),i}(Sr());return d.registerParse=function(t){e=t},d.registerRule=function(e){t=e},d.registerAtRule=function(e){n=e},d.registerRoot=function(e){r=e},rg=d,d.default=d,d.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,n.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,a.prototype):"comment"===e.type?Object.setPrototypeOf(e,u.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[s]=!0,e.nodes&&e.nodes.forEach(function(e){d.rebuild(e)})},rg},Tr=function(){if(sg)return og;sg=1;var e,t,n=function(n){function r(e){var t;return _class_call_check(this,r),(t=_call_super(this,r,[_object_spread({type:"document"},e)])).nodes||(t.nodes=[]),t}return _inherits(r,n),_create_class(r,[{key:"toResult",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(new t,this,n).stringify()}}]),r}(Or());return n.registerLazyResult=function(t){e=t},n.registerProcessor=function(e){t=e},og=n,n.default=n,og},Ar=function(){if(ug)return ag;ug=1;var e={};return ag=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}},Rr=function(){if(cg)return lg;cg=1;var e=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_class_call_check(this,e),this.type="warning",this.text=t,n.node&&n.node.source){var r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in n)this[i]=n[i]}return _create_class(e,[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),e}();return lg=e,e.default=e,lg},Pr=function(){if(fg)return dg;fg=1;var e=Rr(),t=function(){function t(e,n,r){_class_call_check(this,t),this.processor=e,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}return _create_class(t,[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);var r=new e(t,n);return this.messages.push(r),r}},{key:"warnings",value:function(){return this.messages.filter(function(e){return"warning"===e.type})}},{key:"content",get:function(){return this.css}}]),t}();return dg=t,t.default=t,dg},Mr=function(){if(gg)return vg;gg=1;var e=Or(),t=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t,[e])).type="atrule",n}return _inherits(t,e),_create_class(t,[{key:"append",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=_get(_get_prototype_of(t.prototype),"append",this)).call.apply(i,[this].concat(_to_consumable_array(n)))}},{key:"prepend",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=_get(_get_prototype_of(t.prototype),"prepend",this)).call.apply(i,[this].concat(_to_consumable_array(n)))}}]),t}(e);return vg=t,t.default=t,e.registerAtRule(t),vg},Nr=function(){if(mg)return yg;mg=1;var e,t,n=Or(),r=function(n){function r(e){var t;return _class_call_check(this,r),(t=_call_super(this,r,[e])).type="root",t.nodes||(t.nodes=[]),t}return _inherits(r,n),_create_class(r,[{key:"normalize",value:function(e,t,n){var i=_get(_get_prototype_of(r.prototype),"normalize",this).call(this,e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t){var o=!0,s=!1,a=void 0;try{for(var u,l=i[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){u.value.raws.before=t.raws.before}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}}return i}},{key:"removeChild",value:function(e,t){var n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),_get(_get_prototype_of(r.prototype),"removeChild",this).call(this,e)}},{key:"toResult",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(new t,this,n).stringify()}}]),r}(n);return r.registerLazyResult=function(t){e=t},r.registerProcessor=function(e){t=e},yg=r,r.default=r,n.registerRoot(r),yg},Lr=function(){if(wg)return bg;wg=1;var e={comma:function(t){return e.split(t,[","],!0)},space:function(t){return e.split(t,[" ","\n","\t"])},split:function(e,t,n){var r=[],i="",o=!1,s=0,a=!1,u="",l=!1,c=!0,d=!1,f=void 0;try{for(var h,p=e[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;l?l=!1:"\\"===v?l=!0:a?v===u&&(a=!1):'"'===v||"'"===v?(a=!0,u=v):"("===v?s+=1:")"===v?s>0&&(s-=1):0===s&&t.includes(v)&&(o=!0),o?(""!==i&&r.push(i.trim()),i="",o=!1):i+=v}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}return(n||""!==i)&&r.push(i.trim()),r}};return bg=e,e.default=e,bg},jr=function(){if(Sg)return _g;Sg=1;var e=Or(),t=Lr(),n=function(e){function n(e){var t;return _class_call_check(this,n),(t=_call_super(this,n,[e])).type="rule",t.nodes||(t.nodes=[]),t}return _inherits(n,e),_create_class(n,[{key:"selectors",get:function(){return t.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}]),n}(e);return _g=n,n.default=n,e.registerRule(n),_g},Dr=function(){if(xg)return kg;xg=1;var e=kr(),t=function(){if(pg)return hg;pg=1;var e="'".charCodeAt(0),t='"'.charCodeAt(0),n="\\".charCodeAt(0),r="/".charCodeAt(0),i="\n".charCodeAt(0),o=" ".charCodeAt(0),s="\f".charCodeAt(0),a="\t".charCodeAt(0),u="\r".charCodeAt(0),l="[".charCodeAt(0),c="]".charCodeAt(0),d="(".charCodeAt(0),f=")".charCodeAt(0),h="{".charCodeAt(0),p="}".charCodeAt(0),v=";".charCodeAt(0),g="*".charCodeAt(0),y=":".charCodeAt(0),m="@".charCodeAt(0),b=/[\t\n\f\r "#'()/;[\\\]{}]/g,w=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return hg=function(k){var x,E,C,I,O,T,A,R,P,M,N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},L=k.css.valueOf(),j=N.ignoreErrors,D=L.length,U=0,F=[],B=[];function q(e){throw k.error("Unclosed "+e,U)}return{back:function(e){B.push(e)},endOfFile:function(){return 0===B.length&&U>=D},nextToken:function(k){if(B.length)return B.pop();if(!(U>=D)){var N=!!k&&k.ignoreUnclosed;switch(x=L.charCodeAt(U)){case i:case o:case a:case u:case s:E=U;do{E+=1,x=L.charCodeAt(E)}while(x===o||x===i||x===a||x===u||x===s);M=["space",L.slice(U,E)],U=E-1;break;case l:case c:case h:case p:case y:case v:case f:var z=String.fromCharCode(x);M=[z,z,U];break;case d:if(R=F.length?F.pop()[1]:"",P=L.charCodeAt(U+1),"url"===R&&P!==e&&P!==t&&P!==o&&P!==i&&P!==a&&P!==s&&P!==u){E=U;do{if(T=!1,-1===(E=L.indexOf(")",E+1))){if(j||N){E=U;break}q("bracket")}for(A=E;L.charCodeAt(A-1)===n;)A-=1,T=!T}while(T);M=["brackets",L.slice(U,E+1),U,E],U=E}else E=L.indexOf(")",U+1),I=L.slice(U,E+1),-1===E||_.test(I)?M=["(","(",U]:(M=["brackets",I,U,E],U=E);break;case e:case t:C=x===e?"'":'"',E=U;do{if(T=!1,-1===(E=L.indexOf(C,E+1))){if(j||N){E=U+1;break}q("string")}for(A=E;L.charCodeAt(A-1)===n;)A-=1,T=!T}while(T);M=["string",L.slice(U,E+1),U,E],U=E;break;case m:b.lastIndex=U+1,b.test(L),E=0===b.lastIndex?L.length-1:b.lastIndex-2,M=["at-word",L.slice(U,E+1),U,E],U=E;break;case n:for(E=U,O=!0;L.charCodeAt(E+1)===n;)E+=1,O=!O;if(x=L.charCodeAt(E+1),O&&x!==r&&x!==o&&x!==i&&x!==a&&x!==u&&x!==s&&(E+=1,S.test(L.charAt(E)))){for(;S.test(L.charAt(E+1));)E+=1;L.charCodeAt(E+1)===o&&(E+=1)}M=["word",L.slice(U,E+1),U,E],U=E;break;default:x===r&&L.charCodeAt(U+1)===g?(0===(E=L.indexOf("*/",U+2)+1)&&(j||N?E=L.length:q("comment")),M=["comment",L.slice(U,E+1),U,E],U=E):(w.lastIndex=U+1,w.test(L),E=0===w.lastIndex?L.length-1:w.lastIndex-2,M=["word",L.slice(U,E+1),U,E],F.push(M),U=E)}return U++,M}},position:function(){return U}}},hg}(),n=Ir(),r=Mr(),i=Nr(),o=jr(),s={empty:!0,space:!0};return kg=function(){function a(e){_class_call_check(this,a),this.input=e,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}return _create_class(a,[{key:"atrule",value:function(e){var t,n,i,o=new r;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);for(var s=!1,a=!1,u=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(u.length>0){for(n=u[i=u.length-1];n&&"space"===n[0];)n=u[--i];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(e);break}u.push(e)}else u.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(o.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(o,"params",u),s&&(e=u[u.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}},{key:"checkMissedSemicolon",value:function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;i>=0&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},{key:"colon",value:function(e){var t,n,r,i=0,o=!0,s=!1,a=void 0;try{for(var u,l=e.entries()[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=_sliced_to_array(u.value,2),d=c[0];if("("===(n=(t=c[1])[0])&&(i+=1),")"===n&&(i-=1),0===i&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return d}this.doubleColon(t)}r=t}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}return!1}},{key:"comment",value:function(e){var t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{var i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}},{key:"createTokenizer",value:function(){this.tokenizer=t(this.input)}},{key:"decl",value:function(t,n){var r=new e;this.init(r,t[0][2]);var i,o=t[t.length-1];for(";"===o[0]&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(o[3]||o[2]||function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=n[3]||n[2];if(r)return r}}(t)),r.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){var s=t[0][0];if(":"===s||"space"===s||"comment"===s)break;r.prop+=t.shift()[1]}for(r.raws.between="";t.length;){if(":"===(i=t.shift())[0]){r.raws.between+=i[1];break}"word"===i[0]&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));for(var a,u=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)u.push(t.shift());this.precheckMissedSemicolon(t);for(var l=t.length-1;l>=0;l--){if("!important"===(i=t[l])[1].toLowerCase()){r.important=!0;var c=this.stringFrom(t,l);" !important"!==(c=this.spacesFromEnd(t)+c)&&(r.raws.important=c);break}if("important"===i[1].toLowerCase()){for(var d=t.slice(0),f="",h=l;h>0;h--){var p=d[h][0];if(0===f.trim().indexOf("!")&&"space"!==p)break;f=d.pop()[1]+f}0===f.trim().indexOf("!")&&(r.important=!0,r.raws.important=f,t=d)}if("space"!==i[0]&&"comment"!==i[0])break}var v=t.some(function(e){return"space"!==e[0]&&"comment"!==e[0]});v&&(r.raws.between+=u.map(function(e){return e[1]}).join(""),u=[]),this.raw(r,"value",u.concat(t),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}},{key:"doubleColon",value:function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}},{key:"emptyRule",value:function(e){var t=new o;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}},{key:"end",value:function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}},{key:"getPosition",value:function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}},{key:"init",value:function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}},{key:"other",value:function(e){for(var t=!1,n=null,r=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],u=e;u;){if(n=u[0],a.push(u),"("===n||"["===n)i||(i=u),o.push("("===n?")":"]");else if(s&&r&&"{"===n)i||(i=u),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(a,s);break}if("{"===n)return void this.rule(a);if("}"===n){this.tokenizer.back(a.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!s)for(;a.length&&("space"===(u=a[a.length-1][0])||"comment"===u);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}},{key:"parse",value:function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(e,t,n,r){for(var i,o,a,u,l=n.length,c="",d=!0,f=0;f<l;f+=1)"space"!==(o=(i=n[f])[0])||f!==l-1||r?"comment"===o?(u=n[f-1]?n[f-1][0]:"empty",a=n[f+1]?n[f+1][0]:"empty",s[u]||s[a]||","===c.slice(-1)?d=!1:c+=i[1]):c+=i[1]:d=!1;if(!d){var h=n.reduce(function(e,t){return e+t[1]},"");e.raws[t]={raw:h,value:c}}e[t]=c}},{key:"rule",value:function(e){e.pop();var t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}},{key:"spacesAndCommentsFromEnd",value:function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}},{key:"spacesAndCommentsFromStart",value:function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}},{key:"spacesFromEnd",value:function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}},{key:"stringFrom",value:function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}},{key:"unclosedBlock",value:function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}},{key:"unclosedBracket",value:function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}},{key:"unexpectedClose",value:function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}},{key:"unknownWord",value:function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}},{key:"unnamedAtrule",value:function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}]),a}()},Ur=function(){if(Cg)return Eg;Cg=1;var e=Or(),t=Dr(),n=Er();function r(e,r){var i=new n(e,r),o=new t(i);try{o.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&r&&r.from&&(/\.scss$/i.test(r.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(r.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(r.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return o.root}return Eg=r,r.default=r,e.registerParse(r),Eg},Fr=function(){if(Og)return Ig;Og=1;var e=br(),t=e.isClean,n=e.my,r=Cr(),i=_r(),o=Or(),s=Tr(),a=Ar(),u=Pr(),l=Ur(),c=Nr(),d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0};function p(e){return"object"===(void 0===e?"undefined":_type_of(e))&&"function"==typeof e.then}function v(e){var t=!1,n=d[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function g(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:v(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function y(e){return e[t]=!1,e.nodes&&e.nodes.forEach(function(e){return y(e)}),e}var m={},b=function(){function e(t,r,i){var s,a=this;if(_class_call_check(this,e),this.stringified=!1,this.processed=!1,"object"!==(void 0===r?"undefined":_type_of(r))||null===r||"root"!==r.type&&"document"!==r.type)if(_instanceof(r,e)||_instanceof(r,u))s=y(r.root),r.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=r.map);else{var c=l;i.syntax&&(c=i.syntax.parse),i.parser&&(c=i.parser),c.parse&&(c=c.parse);try{s=c(r,i)}catch(e){this.processed=!0,this.error=e}s&&!s[n]&&o.rebuild(s)}else s=y(r);this.result=new u(t,s,i),this.helpers=_object_spread_props(_object_spread({},m),{postcss:m,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&e.prepare?_object_spread({},e,e.prepare(a.result)):e})}return _create_class(e,[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(e){return this.async().catch(e)}},{key:"finally",value:function(e){return this.async().then(e,e)}},{key:"getAsyncError",value:function(){throw new Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(e,t){var n=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(n.postcssVersion&&"production"!==process.env.NODE_ENV){var r=n.postcssPlugin,i=n.postcssVersion,o=this.result.processor.version,s=i.split("."),a=o.split(".");(s[0]!==a[0]||parseInt(s[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+r+" uses "+i+". Perhaps this is the source of the error below.")}}else e.plugin=n.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}},{key:"prepareVisitors",value:function(){var e=this;this.listeners={};var t=function(t,n,r){e.listeners[n]||(e.listeners[n]=[]),e.listeners[n].push([t,r])},n=!0,r=!1,i=void 0;try{for(var o,s=this.plugins[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;if("object"===(void 0===a?"undefined":_type_of(a)))for(var u in a){if(!f[u]&&/^[A-Z]/.test(u))throw new Error("Unknown event ".concat(u," in ").concat(a.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!h[u])if("object"===_type_of(a[u]))for(var l in a[u])t(a,"*"===l?u:u+"-"+l.toLowerCase(),a[u][l]);else"function"==typeof a[u]&&t(a,u,a[u])}}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}this.hasListener=Object.keys(this.listeners).length>0}},{key:"runAsync",value:function(){return _async_to_generator(function(){var e,n,r,i,o,s,a,u,l,c,d,f,h,v,y,m,b,w;return _ts_generator(this,function(_){switch(_.label){case 0:e=this,this.plugin=0,n=0,_.label=1;case 1:if(!(n<this.plugins.length))return[3,6];if(r=this.plugins[n],!p(i=this.runOnRoot(r)))return[3,5];_.label=2;case 2:return _.trys.push([2,4,,5]),[4,i];case 3:return _.sent(),[3,5];case 4:throw o=_.sent(),this.handleError(o);case 5:return n++,[3,1];case 6:if(this.prepareVisitors(),!this.hasListener)return[3,22];s=this.result.root,_.label=7;case 7:if(s[t])return[3,14];s[t]=!0,a=[g(s)],_.label=8;case 8:if(!(a.length>0))return[3,13];if(!p(u=this.visitTick(a)))return[3,12];_.label=9;case 9:return _.trys.push([9,11,,12]),[4,u];case 10:return _.sent(),[3,12];case 11:throw l=_.sent(),c=a[a.length-1].node,this.handleError(l,c);case 12:return[3,8];case 13:return[3,7];case 14:if(!this.listeners.OnceExit)return[3,22];d=!0,f=!1,h=void 0,_.label=15;case 15:_.trys.push([15,20,21,22]),y=function(){var t,n,r,i,o;return _ts_generator(this,function(a){switch(a.label){case 0:t=_sliced_to_array(b.value,2),n=t[0],r=t[1],v.result.lastPlugin=n,a.label=1;case 1:return a.trys.push([1,6,,7]),"document"!==s.type?[3,3]:(i=s.nodes.map(function(t){return r(t,e.helpers)}),[4,Promise.all(i)]);case 2:return a.sent(),[3,5];case 3:return[4,r(s,v.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw o=a.sent(),v.handleError(o);case 7:return[2]}})},m=this.listeners.OnceExit[Symbol.iterator](),_.label=16;case 16:return(d=(b=m.next()).done)?[3,19]:(v=this,[5,_ts_values(y())]);case 17:_.sent(),_.label=18;case 18:return d=!0,[3,16];case 19:return[3,22];case 20:return w=_.sent(),f=!0,h=w,[3,22];case 21:try{d||null==m.return||m.return()}finally{if(f)throw h}return[7];case 22:return this.processed=!0,[2,this.stringify()]}})}).call(this)}},{key:"runOnRoot",value:function(e){var t=this;this.result.lastPlugin=e;try{if("object"===(void 0===e?"undefined":_type_of(e))&&e.Once){if("document"===this.result.root.type){var n=this.result.root.nodes.map(function(n){return e.Once(n,t.helpers)});return p(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}},{key:"stringify",value:function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=i;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new r(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();var e=!0,n=!1,r=void 0;try{for(var i,o=this.plugins[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var s=i.value;if(p(this.runOnRoot(s)))throw this.getAsyncError()}}catch(e){n=!0,r=e}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}if(this.prepareVisitors(),this.hasListener){for(var a=this.result.root;!a[t];)a[t]=!0,this.walkSync(a);if(this.listeners.OnceExit)if("document"===a.type){var u=!0,l=!1,c=void 0;try{for(var d,f=a.nodes[Symbol.iterator]();!(u=(d=f.next()).done);u=!0){var h=d.value;this.visitSync(this.listeners.OnceExit,h)}}catch(e){l=!0,c=e}finally{try{u||null==f.return||f.return()}finally{if(l)throw c}}}else this.visitSync(this.listeners.OnceExit,a)}return this.result}},{key:"then",value:function(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||a("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=_sliced_to_array(o.value,2),u=a[0],l=a[1];this.result.lastPlugin=u;var c=void 0;try{c=l(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(p(c))throw this.getAsyncError()}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"visitTick",value:function(e){var n=e[e.length-1],r=n.node,i=n.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&n.visitorIndex<i.length){var o=_sliced_to_array(i[n.visitorIndex],2),s=o[0],a=o[1];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==n.iterator){for(var u,l=n.iterator;u=r.nodes[r.indexes[l]];)if(r.indexes[l]+=1,!u[t])return u[t]=!0,void e.push(g(u));n.iterator=0,delete r.indexes[l]}for(var c=n.events;n.eventIndex<c.length;){var d=c[n.eventIndex];if(n.eventIndex+=1,0===d)return void(r.nodes&&r.nodes.length&&(r[t]=!0,n.iterator=r.getIterator()));if(this.listeners[d])return void(n.visitors=this.listeners[d])}e.pop()}else e.pop()}},{key:"walkSync",value:function(e){var n=this;e[t]=!0;var r=v(e),i=!0,o=!1,s=void 0;try{for(var a,u=r[Symbol.iterator]();!(i=(a=u.next()).done);i=!0){var l=a.value;if(0===l)e.nodes&&e.each(function(e){e[t]||n.walkSync(e)});else{var c=this.listeners[l];if(c&&this.visitSync(c,e.toProxy()))return}}}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}}},{key:"warnings",value:function(){return this.sync().warnings()}},{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e}();return b.registerPostcss=function(e){m=e},Ig=b,b.default=b,c.registerLazyResult(b),s.registerLazyResult(b),Ig},Br=function(){if(Pg)return Rg;Pg=1;var e=function(){if(Ag)return Tg;Ag=1;var e=Cr(),t=_r(),n=Ar(),r=Ur(),i=Pr(),o=function(){function o(n,r,s){var a;_class_call_check(this,o),r=r.toString(),this.stringified=!1,this._processor=n,this._css=r,this._opts=s,this._map=void 0;var u=t;this.result=new i(this._processor,a,this._opts),this.result.css=r;var l=this;Object.defineProperty(this.result,"root",{get:function(){return l.root}});var c=new e(u,a,this._opts,r);if(c.isMap()){var d=_sliced_to_array(c.generate(),2),f=d[0],h=d[1];f&&(this.result.css=f),h&&(this.result.map=h)}else c.clearAnnotation(),this.result.css=c.css}return _create_class(o,[{key:"async",value:function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}},{key:"catch",value:function(e){return this.async().catch(e)}},{key:"finally",value:function(e){return this.async().then(e,e)}},{key:"sync",value:function(){if(this.error)throw this.error;return this.result}},{key:"then",value:function(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}},{key:"toString",value:function(){return this._css}},{key:"warnings",value:function(){return[]}},{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),o}();return Tg=o,o.default=o,Tg}(),t=Fr(),n=Tr(),r=Nr(),i=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];_class_call_check(this,n),this.version="8.4.38",this.plugins=this.normalize(e)}return _create_class(n,[{key:"normalize",value:function(e){var t=[],n=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;if(!0===a.postcss?a=a():a.postcss&&(a=a.postcss),"object"===(void 0===a?"undefined":_type_of(a))&&Array.isArray(a.plugins))t=t.concat(a.plugins);else if("object"===(void 0===a?"undefined":_type_of(a))&&a.postcssPlugin)t.push(a);else if("function"==typeof a)t.push(a);else{if("object"!==(void 0===a?"undefined":_type_of(a))||!a.parse&&!a.stringify)throw new Error(a+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}return t}},{key:"process",value:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.plugins.length||r.parser||r.stringifier||r.syntax?new t(this,n,r):new e(this,n,r)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),n}();return Rg=i,i.default=i,r.registerProcessor(i),n.registerProcessor(i),Rg},qr=function(){if(jg)return Lg;jg=1;var e=mr(),t=kr(),n=Fr(),r=Or(),i=Br(),o=_r(),s=function(){if(Ng)return Mg;Ng=1;var e=kr(),t=xr(),n=Ir(),r=Mr(),i=Er(),o=Nr(),s=jr();function a(u,l){if(Array.isArray(u))return u.map(function(e){return a(e)});var c=u.inputs,d=_object_without_properties(u,["inputs"]);if(c){l=[];var f=!0,h=!1,p=void 0;try{for(var v,g=c[Symbol.iterator]();!(f=(v=g.next()).done);f=!0){var y=_object_spread_props(_object_spread({},v.value),{__proto__:i.prototype});y.map&&(y.map=_object_spread_props(_object_spread({},y.map),{__proto__:t.prototype})),l.push(y)}}catch(e){h=!0,p=e}finally{try{f||null==g.return||g.return()}finally{if(h)throw p}}}if(d.nodes&&(d.nodes=u.nodes.map(function(e){return a(e,l)})),d.source){var m=d.source,b=m.inputId,w=_object_without_properties(m,["inputId"]);d.source=w,null!=b&&(d.source.input=l[b])}if("root"===d.type)return new o(d);if("decl"===d.type)return new e(d);if("rule"===d.type)return new s(d);if("comment"===d.type)return new n(d);if("atrule"===d.type)return new r(d);throw new Error("Unknown node type: "+u.type)}return Mg=a,a.default=a,Mg}(),a=Tr(),u=Rr(),l=Ir(),c=Mr(),d=Pr(),f=Er(),h=Ur(),p=Lr(),v=jr(),g=Nr(),y=Sr();function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new i(t)}return m.plugin=function(e,t){var n,r=!1;function o(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var a=t.apply(void 0,_to_consumable_array(o));return a.postcssPlugin=e,a.postcssVersion=(new i).version,a}return Object.defineProperty(o,"postcss",{get:function(){return n||(n=o()),n}}),o.process=function(e,t,n){return m([o(n)]).process(e,t)},o},m.stringify=o,m.parse=h,m.fromJSON=s,m.list=p,m.comment=function(e){return new l(e)},m.atRule=function(e){return new c(e)},m.decl=function(e){return new t(e)},m.rule=function(e){return new v(e)},m.root=function(e){return new g(e)},m.document=function(e){return new a(e)},m.CssSyntaxError=e,m.Declaration=t,m.Container=r,m.Processor=i,m.Document=a,m.Comment=l,m.Warning=u,m.AtRule=c,m.Result=d,m.Input=f,m.Rule=v,m.Root=g,m.Node=y,n.registerPostcss(m),Lg=m,m.default=m,Lg},zr=function(){if(Jg)return Kg;Jg=1;var e=function(){if(Vg)return zg.exports;Vg=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return zg.exports=t(),zg.exports.createColors=t,zg.exports}(),t=Gg,n=function(){function n(e,t,r,i,o,s){var a;return _class_call_check(this,n),(a=_call_super(this,n,[e])).name="CssSyntaxError",a.reason=e,o&&(a.file=o),i&&(a.source=i),s&&(a.plugin=s),void 0!==t&&void 0!==r&&("number"==typeof t?(a.line=t,a.column=r):(a.line=t.line,a.column=t.column,a.endLine=r.line,a.endColumn=r.column)),a.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(a,n),a}return _inherits(n,_wrap_native_super(Error)),_create_class(n,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(n){var r=this;if(!this.source)return"";var i=this.source;null==n&&(n=e.isColorSupported),t&&n&&(i=t(i));var o,s,a=i.split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),c=String(l).length;if(n){var d=e.createColors(!0),f=d.bold,h=d.gray,p=d.red;o=function(e){return f(p(e))},s=function(e){return h(e)}}else o=s=function(e){return e};return a.slice(u,l).map(function(e,t){var n=u+1+t,i=" "+(" "+n).slice(-c)+" | ";if(n===r.line){var a=s(i.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," ");return o(">")+s(i)+e+"\n "+a+o("^")}return" "+s(i)+e}).join("\n")}},{key:"toString",value:function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}]),n}();return Kg=n,n.default=n,Kg},Vr=function(){return Qg||(Qg=1,$g.isClean=Symbol("isClean"),$g.my=Symbol("my")),$g},Wr=function(){if(Xg)return Yg;Xg=1;var e={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var t=function(){function t(e){_class_call_check(this,t),this.builder=e}return _create_class(t,[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{var i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}}},{key:"beforeAfter",value:function(e,t){var n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var s=0;s<i;s++)n+=o}return n}},{key:"block",value:function(e,t){var n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}},{key:"body",value:function(e){for(var t=e.nodes.length-1;t>0&&"comment"===e.nodes[t].type;)t-=1;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}},{key:"comment",value:function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}},{key:"decl",value:function(e,t){var n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}},{key:"document",value:function(e){this.body(e)}},{key:"raw",value:function(t,n,r){var i;if(r||(r=n),n&&void 0!==(i=t.raws[n]))return i;var o=t.parent;if("before"===r){if(!o||"root"===o.type&&o.first===t)return"";if(o&&"document"===o.type)return""}if(!o)return e[r];var s=t.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[r])return s.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var a,u="raw"+((a=r)[0].toUpperCase()+a.slice(1));return this[u]?i=this[u](s,t):s.walk(function(e){if(void 0!==(i=e.raws[n]))return!1}),void 0===i&&(i=e[r]),s.rawCache[r]=i,i}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}},{key:"rawBeforeComment",value:function(e,t){var n;return e.walkComments(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}},{key:"rawBeforeDecl",value:function(e,t){var n;return e.walkDecls(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}},{key:"rawBeforeOpen",value:function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}},{key:"rawBeforeRule",value:function(e){var t;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return(t=n.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}},{key:"rawColon",value:function(e){var t;return e.walkDecls(function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}},{key:"rawEmptyBody",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}},{key:"rawIndent",value:function(e){return e.raws.indent?e.raws.indent:(e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){var i=n.raws.before.split("\n");return t=(t=i[i.length-1]).replace(/\S/g,""),!1}}),t);var t}},{key:"rawSemicolon",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}},{key:"rawValue",value:function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}},{key:"root",value:function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}},{key:"rule",value:function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}},{key:"stringify",value:function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}]),t}();return Yg=t,t.default=t,Yg},Hr=function(){if(ey)return Zg;ey=1;var e=Wr();function t(t,n){new e(n).stringify(t)}return Zg=t,t.default=t,Zg},Gr=function(){if(ny)return ty;ny=1;var e=Vr(),t=e.isClean,n=e.my,r=zr(),i=Wr(),o=Hr();function s(e,t){var n=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){var i=e[r],o=void 0===i?"undefined":_type_of(i);"parent"===r&&"object"===o?t&&(n[r]=t):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map(function(e){return s(e,n)}):("object"===o&&null!==i&&(i=s(i)),n[r]=i)}return n}var a=function(){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var i in _class_call_check(this,e),this.raws={},this[t]=!1,this[n]=!0,r)if("nodes"===i){this.nodes=[];var o=!0,s=!1,a=void 0;try{for(var u,l=r[i][Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;"function"==typeof c.clone?this.append(c.clone()):this.append(c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}}else this[i]=r[i]}return _create_class(e,[{key:"addToError",value:function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))}return e}},{key:"after",value:function(e){return this.parent.insertAfter(this,e),this}},{key:"assign",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e)this[t]=e[t];return this}},{key:"before",value:function(e){return this.parent.insertBefore(this,e),this}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=s(this);for(var n in e)t[n]=e[n];return t}},{key:"cloneAfter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertAfter(this,t),t}},{key:"cloneBefore",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertBefore(this,t),t}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.source){var n=this.rangeBy(t),i=n.end,o=n.start;return this.source.input.error(e,{column:o.column,line:o.line},{column:i.column,line:i.line},t)}return new r(e)}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0}}}},{key:"markDirty",value:function(){if(this[t]){this[t]=!1;for(var e=this;e=e.parent;)e[t]=!1}}},{key:"next",value:function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}}},{key:"positionBy",value:function(e,t){var n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){var r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n}},{key:"positionInside",value:function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?(r=1,i+=1):r+=1;return{column:r,line:i}}},{key:"prev",value:function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}}},{key:"rangeBy",value:function(e){var t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var r=this.toString(),i=r.indexOf(e.word);-1!==i&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}},{key:"raw",value:function(e,t){return(new i).raw(this,e,t)}},{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"replaceWith",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this.parent){var r=this,i=!1,o=!0,s=!1,a=void 0;try{for(var u,l=t[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;c===this?i=!0:i?(this.parent.insertAfter(r,c),r=c):this.parent.insertBefore(r,c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}i||this.remove()}return this}},{key:"root",value:function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}},{key:"toJSON",value:function(e,t){var n={},r=null==t;t=t||new Map;var i=0;for(var o in this)if(Object.prototype.hasOwnProperty.call(this,o)&&"parent"!==o&&"proxyCache"!==o){var s=this[o];if(Array.isArray(s))n[o]=s.map(function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&e.toJSON?e.toJSON(null,t):e});else if("object"===(void 0===s?"undefined":_type_of(s))&&s.toJSON)n[o]=s.toJSON(null,t);else if("source"===o){var a=t.get(s.input);null==a&&(a=i,t.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=_to_consumable_array(t.keys()).map(function(e){return e.toJSON()})),n}},{key:"toProxy",value:function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;e.stringify&&(e=e.stringify);var t="";return e(this,function(e){t+=e}),t}},{key:"warn",value:function(e,t,n){var r={node:this};for(var i in n)r[i]=n[i];return e.warn(t,r)}},{key:"proxyOf",get:function(){return this}}]),e}();return ty=a,a.default=a,ty},Kr=function(){if(iy)return ry;iy=1;var e=function(e){function t(e){var n;return _class_call_check(this,t),e&&void 0!==e.value&&"string"!=typeof e.value&&(e=_object_spread_props(_object_spread({},e),{value:String(e.value)})),(n=_call_super(this,t,[e])).type="decl",n}return _inherits(t,e),_create_class(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),t}(Gr());return ry=e,e.default=e,ry},Jr=function(){if(uy)return ay;uy=1;var e=Gg.SourceMapConsumer,t=Gg.SourceMapGenerator,n=Gg.existsSync,r=Gg.readFileSync,i=Gg.dirname,o=Gg.join;var s=function(){function s(e,t){if(_class_call_check(this,s),!1!==t.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),r&&(this.text=r)}}return _create_class(s,[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}},{key:"decodeInline",value:function(e){var t;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}},{key:"getAnnotationURL",value:function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}},{key:"loadAnnotation",value:function(e){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(t){var n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}}},{key:"loadFile",value:function(e){if(this.root=i(e),n(e))return this.mapFile=e,r(e,"utf-8").toString().trim()}},{key:"loadMap",value:function(n,r){if(!1===r)return!1;if(r){if("string"==typeof r)return r;if("function"!=typeof r){if(_instanceof(r,e))return t.fromSourceMap(r).toString();if(_instanceof(r,t))return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}var s=r(n);if(s){var a=this.loadFile(s);if(!a)throw new Error("Unable to load previous source map: "+s.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var u=this.annotation;return n&&(u=o(i(n),u)),this.loadFile(u)}}}},{key:"startWith",value:function(e,t){return!!e&&e.substr(0,t.length)===t}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}]),s}();return ay=s,s.default=s,ay},$r=function(){if(cy)return ly;cy=1;var e=Gg.SourceMapConsumer,t=Gg.SourceMapGenerator,n=Gg.fileURLToPath,r=Gg.pathToFileURL,i=Gg.isAbsolute,o=Gg.resolve,s=(sy||(sy=1,oy={nanoid:function(){for(var e="",t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21;return function(){for(var n="",r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t;r--;)n+=e[Math.random()*e.length|0];return n}}}),oy).nanoid,a=Gg,u=zr(),l=Jr(),c=Symbol("fromOffsetCache"),d=Boolean(e&&t),f=Boolean(o&&i),h=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_class_call_check(this,e),null==t||"object"===(void 0===t?"undefined":_type_of(t))&&!t.toString)throw new Error("PostCSS received ".concat(t," instead of CSS string"));if(this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!f||/^\w+:\/\//.test(n.from)||i(n.from)?this.file=n.from:this.file=o(n.from)),f&&d){var r=new l(this.css,n);if(r.text){this.map=r;var a=r.consumer().file;!this.file&&a&&(this.file=this.mapResolve(a))}}this.file||(this.id="<input css "+s(6)+">"),this.map&&(this.map.file=this.from)}return _create_class(e,[{key:"error",value:function(e,t,n){var i,o,s,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(t&&"object"===(void 0===t?"undefined":_type_of(t))){var l=t,c=n;if("number"==typeof l.offset){var d=this.fromOffset(l.offset);t=d.line,n=d.col}else t=l.line,n=l.column;if("number"==typeof c.offset){var f=this.fromOffset(c.offset);o=f.line,s=f.col}else o=c.line,s=c.column}else if(!n){var h=this.fromOffset(t);t=h.line,n=h.col}var p=this.origin(t,n,o,s);return(i=p?new u(e,void 0===p.endLine?p.line:{column:p.column,line:p.line},void 0===p.endLine?p.column:{column:p.endColumn,line:p.endLine},p.source,p.file,a.plugin):new u(e,void 0===o?t:{column:n,line:t},void 0===o?n:{column:s,line:o},this.css,this.file,a.plugin)).input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(r&&(i.input.url=r(this.file).toString()),i.input.file=this.file),i}},{key:"fromOffset",value:function(e){var t;if(this[c])t=this[c];else{var n=this.css.split("\n");t=new Array(n.length);for(var r=0,i=0,o=n.length;i<o;i++)t[i]=r,r+=n[i].length+1;this[c]=t}var s=0;if(e>=t[t.length-1])s=t.length-1;else for(var a,u=t.length-2;s<u;)if(e<t[a=s+(u-s>>1)])u=a-1;else{if(!(e>=t[a+1])){s=a;break}s=a+1}return{col:e-t[s]+1,line:s+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}},{key:"origin",value:function(e,t,o,s){if(!this.map)return!1;var a,u,l=this.map.consumer(),c=l.originalPositionFor({column:t,line:e});if(!c.source)return!1;"number"==typeof o&&(a=l.originalPositionFor({column:s,line:o})),u=i(c.source)?r(c.source):new URL(c.source,this.map.consumer().sourceRoot||r(this.map.mapFile));var d={column:c.column,endColumn:a&&a.column,endLine:a&&a.line,line:c.line,url:u.toString()};if("file:"===u.protocol){if(!n)throw new Error("file: protocol is not available in this PostCSS build");d.file=n(u)}var f=l.sourceContentFor(c.source);return f&&(d.source=f),d}},{key:"toJSON",value:function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=_object_spread({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}},{key:"from",get:function(){return this.file||this.id}}]),e}();return ly=h,h.default=h,a&&a.registerInput&&a.registerInput(h),ly},Qr=function(){if(fy)return dy;fy=1;var e=Gg.SourceMapConsumer,t=Gg.SourceMapGenerator,n=Gg.dirname,r=Gg.relative,i=Gg.resolve,o=Gg.sep,s=Gg.pathToFileURL,a=$r(),u=Boolean(e&&t),l=Boolean(n&&i&&r&&o);return dy=function(){function c(e,t,n,r){_class_call_check(this,c),this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}return _create_class(c,[{key:"addAnnotation",value:function(){var e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}},{key:"applyPrevMaps",value:function(){var t=!0,r=!1,i=void 0;try{for(var o,s=this.previous()[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){var a=o.value,u=this.toUrl(this.path(a.file)),l=a.root||n(a.file),c=void 0;!1===this.mapOpts.sourcesContent?(c=new e(a.text)).sourcesContent&&(c.sourcesContent=null):c=a.consumer(),this.map.applySourceMap(c,u,this.toUrl(this.path(l)))}}catch(e){r=!0,i=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}},{key:"generate",value:function(){if(this.clearAnnotation(),l&&u&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]}},{key:"generateMap",value:function(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var e=this;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});var n,r,i=1,o=1,s="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(t,u,l){if(e.css+=t,u&&"end"!==l&&(a.generated.line=i,a.generated.column=o-1,u.source&&u.source.start?(a.source=e.sourcePath(u),a.original.line=u.source.start.line,a.original.column=u.source.start.column-1,e.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,e.map.addMapping(a))),(n=t.match(/\n/g))?(i+=n.length,r=t.lastIndexOf("\n"),o=t.length-r):o+=t.length,u&&"start"!==l){var c=u.parent||{raws:{}};("decl"===u.type||"atrule"===u.type&&!u.nodes)&&u===c.last&&!c.raws.semicolon||(u.source&&u.source.end?(a.source=e.sourcePath(u),a.original.line=u.source.end.line,a.original.column=u.source.end.column-1,a.generated.line=i,a.generated.column=o-2,e.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,a.generated.line=i,a.generated.column=o-1,e.map.addMapping(a)))}})}},{key:"isAnnotation",value:function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))}},{key:"isMap",value:function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}},{key:"isSourcesContent",value:function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var o=this.opts.to?n(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=n(i(o,this.mapOpts.annotation)));var s=r(o,e);return this.memoizedPaths.set(e,s),s}},{key:"previous",value:function(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;e.previousMaps.includes(n)||e.previousMaps.push(n)}});else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}},{key:"setSourcesContent",value:function(){var e=this,t={};if(this.root)this.root.walk(function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.usesFileUrls?e.toFileUrl(r):e.toUrl(e.path(r));e.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){var n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}},{key:"sourcePath",value:function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}},{key:"toBase64",value:function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}},{key:"toFileUrl",value:function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(s){var n=s(e).toString();return this.memoizedFileURLs.set(e,n),n}throw new Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));var n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}]),c}()},Yr=function(){if(py)return hy;py=1;var e=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t,[e])).type="comment",n}return _inherits(t,e),t}(Gr());return hy=e,e.default=e,hy},Xr=function(){if(gy)return vy;gy=1;var e,t,n,r,i=Vr(),o=i.isClean,s=i.my,a=Kr(),u=Yr();function l(e){return e.map(function(e){return e.nodes&&(e.nodes=l(e.nodes)),delete e.source,e})}function c(e){if(e[o]=!1,e.proxyOf.nodes){var t=!0,n=!1,r=void 0;try{for(var i,s=e.proxyOf.nodes[Symbol.iterator]();!(t=(i=s.next()).done);t=!0){c(i.value)}}catch(e){n=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(n)throw r}}}}var d=function(r){function i(){return _class_call_check(this,i),_call_super(this,i,arguments)}return _inherits(i,r),_create_class(i,[{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value,l=this.normalize(u,this.last),c=!0,d=!1,f=void 0;try{for(var h,p=l[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;this.proxyOf.nodes.push(v)}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if(_get(_get_prototype_of(i.prototype),"cleanRaws",this).call(this,e),this.nodes){var t=!0,n=!1,r=void 0;try{for(var o,s=this.nodes[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){o.value.cleanRaws(e)}}catch(e){n=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(n)throw r}}}}},{key:"each",value:function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"getIterator",value:function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o;return(o=e)[t].apply(o,_to_consumable_array(r.map(function(e){return"function"==typeof e?function(t,n){return e(t.toProxy(),n)}:e})))}:"every"===t||"some"===t?function(n){return e[t](function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return n.apply(void 0,[e.toProxy()].concat(_to_consumable_array(r)))})}:"root"===t?function(){return e.root().toProxy()}:"nodes"===t?e.nodes.map(function(e){return e.toProxy()}):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0}}}},{key:"index",value:function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}},{key:"insertAfter",value:function(e,t){var n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);var i,o=!0,s=!1,a=void 0;try{for(var u,l=r[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;this.proxyOf.nodes.splice(n+1,0,c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}for(var d in this.indexes)n<(i=this.indexes[d])&&(this.indexes[d]=i+r.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n=this.index(e),r=0===n&&"prepend",i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);var o,s=!0,a=!1,u=void 0;try{for(var l,c=i[Symbol.iterator]();!(s=(l=c.next()).done);s=!0){var d=l.value;this.proxyOf.nodes.splice(n,0,d)}}catch(e){a=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(a)throw u}}for(var f in this.indexes)n<=(o=this.indexes[f])&&(this.indexes[f]=o+i.length);return this.markDirty(),this}},{key:"normalize",value:function(r,d){var f=this;if("string"==typeof r)r=l(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r)){r=r.slice(0);var h=!0,p=!1,v=void 0;try{for(var g,y=r[Symbol.iterator]();!(h=(g=y.next()).done);h=!0){var m=g.value;m.parent&&m.parent.removeChild(m,"ignore")}}catch(e){p=!0,v=e}finally{try{h||null==y.return||y.return()}finally{if(p)throw v}}}else if("root"===r.type&&"document"!==this.type){r=r.nodes.slice(0);var b=!0,w=!1,_=void 0;try{for(var S,k=r[Symbol.iterator]();!(b=(S=k.next()).done);b=!0){var x=S.value;x.parent&&x.parent.removeChild(x,"ignore")}}catch(e){w=!0,_=e}finally{try{b||null==k.return||k.return()}finally{if(w)throw _}}}else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new a(r)]}else if(r.selector)r=[new t(r)];else if(r.name)r=[new n(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new u(r)]}var E=r.map(function(e){return e[s]||i.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[o]&&c(e),void 0===e.raws.before&&d&&void 0!==d.raws.before&&(e.raws.before=d.raws.before.replace(/\S/g,"")),e.parent=f.proxyOf,e});return E}},{key:"prepend",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.reverse();var r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value,l=this.normalize(u,this.first,"prepend").reverse(),c=!0,d=!1,f=void 0;try{for(var h,p=l[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;this.proxyOf.nodes.unshift(v)}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}for(var g in this.indexes)this.indexes[g]=this.indexes[g]+l.length}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return this.markDirty(),this}},{key:"push",value:function(e){return e.parent=this,this.proxyOf.nodes.push(e),this}},{key:"removeAll",value:function(){var e=!0,t=!1,n=void 0;try{for(var r,i=this.proxyOf.nodes[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){r.value.parent=void 0}}catch(e){t=!0,n=e}finally{try{e||null==i.return||i.return()}finally{if(t)throw n}}return this.proxyOf.nodes=[],this.markDirty(),this}},{key:"removeChild",value:function(e){var t;for(var n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}},{key:"replaceValues",value:function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"walk",value:function(e){return this.each(function(t,n){var r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}},{key:"walkAtRules",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("atrule"===e.type)return t(e,n)}))}},{key:"walkComments",value:function(e){return this.walk(function(t,n){if("comment"===t.type)return e(t,n)})}},{key:"walkDecls",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("decl"===e.type)return t(e,n)}))}},{key:"walkRules",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("rule"===e.type)return t(e,n)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),i}(Gr());return d.registerParse=function(t){e=t},d.registerRule=function(e){t=e},d.registerAtRule=function(e){n=e},d.registerRoot=function(e){r=e},vy=d,d.default=d,d.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,n.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,a.prototype):"comment"===e.type?Object.setPrototypeOf(e,u.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[s]=!0,e.nodes&&e.nodes.forEach(function(e){d.rebuild(e)})},vy},Zr=function(){if(my)return yy;my=1;var e,t,n=function(n){function r(e){var t;return _class_call_check(this,r),(t=_call_super(this,r,[_object_spread({type:"document"},e)])).nodes||(t.nodes=[]),t}return _inherits(r,n),_create_class(r,[{key:"toResult",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(new t,this,n).stringify()}}]),r}(Xr());return n.registerLazyResult=function(t){e=t},n.registerProcessor=function(e){t=e},yy=n,n.default=n,yy},ei=function(){if(wy)return by;wy=1;var e={};return by=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}},ti=function(){if(Sy)return _y;Sy=1;var e=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_class_call_check(this,e),this.type="warning",this.text=t,n.node&&n.node.source){var r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in n)this[i]=n[i]}return _create_class(e,[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),e}();return _y=e,e.default=e,_y},ni=function(){if(xy)return ky;xy=1;var e=ti(),t=function(){function t(e,n,r){_class_call_check(this,t),this.processor=e,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}return _create_class(t,[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);var r=new e(t,n);return this.messages.push(r),r}},{key:"warnings",value:function(){return this.messages.filter(function(e){return"warning"===e.type})}},{key:"content",get:function(){return this.css}}]),t}();return ky=t,t.default=t,ky},ri=function(){if(Oy)return Iy;Oy=1;var e=Xr(),t=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t,[e])).type="atrule",n}return _inherits(t,e),_create_class(t,[{key:"append",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=_get(_get_prototype_of(t.prototype),"append",this)).call.apply(i,[this].concat(_to_consumable_array(n)))}},{key:"prepend",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=_get(_get_prototype_of(t.prototype),"prepend",this)).call.apply(i,[this].concat(_to_consumable_array(n)))}}]),t}(e);return Iy=t,t.default=t,e.registerAtRule(t),Iy},ii=function(){if(Ay)return Ty;Ay=1;var e,t,n=Xr(),r=function(n){function r(e){var t;return _class_call_check(this,r),(t=_call_super(this,r,[e])).type="root",t.nodes||(t.nodes=[]),t}return _inherits(r,n),_create_class(r,[{key:"normalize",value:function(e,t,n){var i=_get(_get_prototype_of(r.prototype),"normalize",this).call(this,e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t){var o=!0,s=!1,a=void 0;try{for(var u,l=i[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){u.value.raws.before=t.raws.before}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}}return i}},{key:"removeChild",value:function(e,t){var n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),_get(_get_prototype_of(r.prototype),"removeChild",this).call(this,e)}},{key:"toResult",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(new t,this,n).stringify()}}]),r}(n);return r.registerLazyResult=function(t){e=t},r.registerProcessor=function(e){t=e},Ty=r,r.default=r,n.registerRoot(r),Ty},oi=function(){if(Py)return Ry;Py=1;var e={comma:function(t){return e.split(t,[","],!0)},space:function(t){return e.split(t,[" ","\n","\t"])},split:function(e,t,n){var r=[],i="",o=!1,s=0,a=!1,u="",l=!1,c=!0,d=!1,f=void 0;try{for(var h,p=e[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;l?l=!1:"\\"===v?l=!0:a?v===u&&(a=!1):'"'===v||"'"===v?(a=!0,u=v):"("===v?s+=1:")"===v?s>0&&(s-=1):0===s&&t.includes(v)&&(o=!0),o?(""!==i&&r.push(i.trim()),i="",o=!1):i+=v}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}return(n||""!==i)&&r.push(i.trim()),r}};return Ry=e,e.default=e,Ry},si=function(){if(Ny)return My;Ny=1;var e=Xr(),t=oi(),n=function(e){function n(e){var t;return _class_call_check(this,n),(t=_call_super(this,n,[e])).type="rule",t.nodes||(t.nodes=[]),t}return _inherits(n,e),_create_class(n,[{key:"selectors",get:function(){return t.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}]),n}(e);return My=n,n.default=n,e.registerRule(n),My},ai=function(){if(jy)return Ly;jy=1;var e=Kr(),t=function(){if(Cy)return Ey;Cy=1;var e="'".charCodeAt(0),t='"'.charCodeAt(0),n="\\".charCodeAt(0),r="/".charCodeAt(0),i="\n".charCodeAt(0),o=" ".charCodeAt(0),s="\f".charCodeAt(0),a="\t".charCodeAt(0),u="\r".charCodeAt(0),l="[".charCodeAt(0),c="]".charCodeAt(0),d="(".charCodeAt(0),f=")".charCodeAt(0),h="{".charCodeAt(0),p="}".charCodeAt(0),v=";".charCodeAt(0),g="*".charCodeAt(0),y=":".charCodeAt(0),m="@".charCodeAt(0),b=/[\t\n\f\r "#'()/;[\\\]{}]/g,w=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return Ey=function(k){var x,E,C,I,O,T,A,R,P,M,N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},L=k.css.valueOf(),j=N.ignoreErrors,D=L.length,U=0,F=[],B=[];function q(e){throw k.error("Unclosed "+e,U)}return{back:function(e){B.push(e)},endOfFile:function(){return 0===B.length&&U>=D},nextToken:function(k){if(B.length)return B.pop();if(!(U>=D)){var N=!!k&&k.ignoreUnclosed;switch(x=L.charCodeAt(U)){case i:case o:case a:case u:case s:E=U;do{E+=1,x=L.charCodeAt(E)}while(x===o||x===i||x===a||x===u||x===s);M=["space",L.slice(U,E)],U=E-1;break;case l:case c:case h:case p:case y:case v:case f:var z=String.fromCharCode(x);M=[z,z,U];break;case d:if(R=F.length?F.pop()[1]:"",P=L.charCodeAt(U+1),"url"===R&&P!==e&&P!==t&&P!==o&&P!==i&&P!==a&&P!==s&&P!==u){E=U;do{if(T=!1,-1===(E=L.indexOf(")",E+1))){if(j||N){E=U;break}q("bracket")}for(A=E;L.charCodeAt(A-1)===n;)A-=1,T=!T}while(T);M=["brackets",L.slice(U,E+1),U,E],U=E}else E=L.indexOf(")",U+1),I=L.slice(U,E+1),-1===E||_.test(I)?M=["(","(",U]:(M=["brackets",I,U,E],U=E);break;case e:case t:C=x===e?"'":'"',E=U;do{if(T=!1,-1===(E=L.indexOf(C,E+1))){if(j||N){E=U+1;break}q("string")}for(A=E;L.charCodeAt(A-1)===n;)A-=1,T=!T}while(T);M=["string",L.slice(U,E+1),U,E],U=E;break;case m:b.lastIndex=U+1,b.test(L),E=0===b.lastIndex?L.length-1:b.lastIndex-2,M=["at-word",L.slice(U,E+1),U,E],U=E;break;case n:for(E=U,O=!0;L.charCodeAt(E+1)===n;)E+=1,O=!O;if(x=L.charCodeAt(E+1),O&&x!==r&&x!==o&&x!==i&&x!==a&&x!==u&&x!==s&&(E+=1,S.test(L.charAt(E)))){for(;S.test(L.charAt(E+1));)E+=1;L.charCodeAt(E+1)===o&&(E+=1)}M=["word",L.slice(U,E+1),U,E],U=E;break;default:x===r&&L.charCodeAt(U+1)===g?(0===(E=L.indexOf("*/",U+2)+1)&&(j||N?E=L.length:q("comment")),M=["comment",L.slice(U,E+1),U,E],U=E):(w.lastIndex=U+1,w.test(L),E=0===w.lastIndex?L.length-1:w.lastIndex-2,M=["word",L.slice(U,E+1),U,E],F.push(M),U=E)}return U++,M}},position:function(){return U}}},Ey}(),n=Yr(),r=ri(),i=ii(),o=si(),s={empty:!0,space:!0};return Ly=function(){function a(e){_class_call_check(this,a),this.input=e,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}return _create_class(a,[{key:"atrule",value:function(e){var t,n,i,o=new r;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);for(var s=!1,a=!1,u=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(u.length>0){for(n=u[i=u.length-1];n&&"space"===n[0];)n=u[--i];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(e);break}u.push(e)}else u.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(o.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(o,"params",u),s&&(e=u[u.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}},{key:"checkMissedSemicolon",value:function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;i>=0&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},{key:"colon",value:function(e){var t,n,r,i=0,o=!0,s=!1,a=void 0;try{for(var u,l=e.entries()[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=_sliced_to_array(u.value,2),d=c[0];if("("===(n=(t=c[1])[0])&&(i+=1),")"===n&&(i-=1),0===i&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return d}this.doubleColon(t)}r=t}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}return!1}},{key:"comment",value:function(e){var t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{var i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}},{key:"createTokenizer",value:function(){this.tokenizer=t(this.input)}},{key:"decl",value:function(t,n){var r=new e;this.init(r,t[0][2]);var i,o=t[t.length-1];for(";"===o[0]&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(o[3]||o[2]||function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=n[3]||n[2];if(r)return r}}(t)),r.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){var s=t[0][0];if(":"===s||"space"===s||"comment"===s)break;r.prop+=t.shift()[1]}for(r.raws.between="";t.length;){if(":"===(i=t.shift())[0]){r.raws.between+=i[1];break}"word"===i[0]&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));for(var a,u=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)u.push(t.shift());this.precheckMissedSemicolon(t);for(var l=t.length-1;l>=0;l--){if("!important"===(i=t[l])[1].toLowerCase()){r.important=!0;var c=this.stringFrom(t,l);" !important"!==(c=this.spacesFromEnd(t)+c)&&(r.raws.important=c);break}if("important"===i[1].toLowerCase()){for(var d=t.slice(0),f="",h=l;h>0;h--){var p=d[h][0];if(0===f.trim().indexOf("!")&&"space"!==p)break;f=d.pop()[1]+f}0===f.trim().indexOf("!")&&(r.important=!0,r.raws.important=f,t=d)}if("space"!==i[0]&&"comment"!==i[0])break}var v=t.some(function(e){return"space"!==e[0]&&"comment"!==e[0]});v&&(r.raws.between+=u.map(function(e){return e[1]}).join(""),u=[]),this.raw(r,"value",u.concat(t),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}},{key:"doubleColon",value:function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}},{key:"emptyRule",value:function(e){var t=new o;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}},{key:"end",value:function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}},{key:"getPosition",value:function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}},{key:"init",value:function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}},{key:"other",value:function(e){for(var t=!1,n=null,r=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],u=e;u;){if(n=u[0],a.push(u),"("===n||"["===n)i||(i=u),o.push("("===n?")":"]");else if(s&&r&&"{"===n)i||(i=u),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(a,s);break}if("{"===n)return void this.rule(a);if("}"===n){this.tokenizer.back(a.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!s)for(;a.length&&("space"===(u=a[a.length-1][0])||"comment"===u);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}},{key:"parse",value:function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(e,t,n,r){for(var i,o,a,u,l=n.length,c="",d=!0,f=0;f<l;f+=1)"space"!==(o=(i=n[f])[0])||f!==l-1||r?"comment"===o?(u=n[f-1]?n[f-1][0]:"empty",a=n[f+1]?n[f+1][0]:"empty",s[u]||s[a]||","===c.slice(-1)?d=!1:c+=i[1]):c+=i[1]:d=!1;if(!d){var h=n.reduce(function(e,t){return e+t[1]},"");e.raws[t]={raw:h,value:c}}e[t]=c}},{key:"rule",value:function(e){e.pop();var t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}},{key:"spacesAndCommentsFromEnd",value:function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}},{key:"spacesAndCommentsFromStart",value:function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}},{key:"spacesFromEnd",value:function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}},{key:"stringFrom",value:function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}},{key:"unclosedBlock",value:function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}},{key:"unclosedBracket",value:function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}},{key:"unexpectedClose",value:function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}},{key:"unknownWord",value:function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}},{key:"unnamedAtrule",value:function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}]),a}()},ui=function(){if(Uy)return Dy;Uy=1;var e=Xr(),t=ai(),n=$r();function r(e,r){var i=new n(e,r),o=new t(i);try{o.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&r&&r.from&&(/\.scss$/i.test(r.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(r.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(r.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return o.root}return Dy=r,r.default=r,e.registerParse(r),Dy},li=function(){if(By)return Fy;By=1;var e=Vr(),t=e.isClean,n=e.my,r=Qr(),i=Hr(),o=Xr(),s=Zr(),a=ei(),u=ni(),l=ui(),c=ii(),d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0};function p(e){return"object"===(void 0===e?"undefined":_type_of(e))&&"function"==typeof e.then}function v(e){var t=!1,n=d[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function g(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:v(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function y(e){return e[t]=!1,e.nodes&&e.nodes.forEach(function(e){return y(e)}),e}var m={},b=function(){function e(t,r,i){var s,a=this;if(_class_call_check(this,e),this.stringified=!1,this.processed=!1,"object"!==(void 0===r?"undefined":_type_of(r))||null===r||"root"!==r.type&&"document"!==r.type)if(_instanceof(r,e)||_instanceof(r,u))s=y(r.root),r.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=r.map);else{var c=l;i.syntax&&(c=i.syntax.parse),i.parser&&(c=i.parser),c.parse&&(c=c.parse);try{s=c(r,i)}catch(e){this.processed=!0,this.error=e}s&&!s[n]&&o.rebuild(s)}else s=y(r);this.result=new u(t,s,i),this.helpers=_object_spread_props(_object_spread({},m),{postcss:m,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&e.prepare?_object_spread({},e,e.prepare(a.result)):e})}return _create_class(e,[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(e){return this.async().catch(e)}},{key:"finally",value:function(e){return this.async().then(e,e)}},{key:"getAsyncError",value:function(){throw new Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(e,t){var n=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(n.postcssVersion&&"production"!==process.env.NODE_ENV){var r=n.postcssPlugin,i=n.postcssVersion,o=this.result.processor.version,s=i.split("."),a=o.split(".");(s[0]!==a[0]||parseInt(s[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+r+" uses "+i+". Perhaps this is the source of the error below.")}}else e.plugin=n.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}},{key:"prepareVisitors",value:function(){var e=this;this.listeners={};var t=function(t,n,r){e.listeners[n]||(e.listeners[n]=[]),e.listeners[n].push([t,r])},n=!0,r=!1,i=void 0;try{for(var o,s=this.plugins[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;if("object"===(void 0===a?"undefined":_type_of(a)))for(var u in a){if(!f[u]&&/^[A-Z]/.test(u))throw new Error("Unknown event ".concat(u," in ").concat(a.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!h[u])if("object"===_type_of(a[u]))for(var l in a[u])t(a,"*"===l?u:u+"-"+l.toLowerCase(),a[u][l]);else"function"==typeof a[u]&&t(a,u,a[u])}}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}this.hasListener=Object.keys(this.listeners).length>0}},{key:"runAsync",value:function(){return _async_to_generator(function(){var e,n,r,i,o,s,a,u,l,c,d,f,h,v,y,m,b,w;return _ts_generator(this,function(_){switch(_.label){case 0:e=this,this.plugin=0,n=0,_.label=1;case 1:if(!(n<this.plugins.length))return[3,6];if(r=this.plugins[n],!p(i=this.runOnRoot(r)))return[3,5];_.label=2;case 2:return _.trys.push([2,4,,5]),[4,i];case 3:return _.sent(),[3,5];case 4:throw o=_.sent(),this.handleError(o);case 5:return n++,[3,1];case 6:if(this.prepareVisitors(),!this.hasListener)return[3,22];s=this.result.root,_.label=7;case 7:if(s[t])return[3,14];s[t]=!0,a=[g(s)],_.label=8;case 8:if(!(a.length>0))return[3,13];if(!p(u=this.visitTick(a)))return[3,12];_.label=9;case 9:return _.trys.push([9,11,,12]),[4,u];case 10:return _.sent(),[3,12];case 11:throw l=_.sent(),c=a[a.length-1].node,this.handleError(l,c);case 12:return[3,8];case 13:return[3,7];case 14:if(!this.listeners.OnceExit)return[3,22];d=!0,f=!1,h=void 0,_.label=15;case 15:_.trys.push([15,20,21,22]),y=function(){var t,n,r,i,o;return _ts_generator(this,function(a){switch(a.label){case 0:t=_sliced_to_array(b.value,2),n=t[0],r=t[1],v.result.lastPlugin=n,a.label=1;case 1:return a.trys.push([1,6,,7]),"document"!==s.type?[3,3]:(i=s.nodes.map(function(t){return r(t,e.helpers)}),[4,Promise.all(i)]);case 2:return a.sent(),[3,5];case 3:return[4,r(s,v.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw o=a.sent(),v.handleError(o);case 7:return[2]}})},m=this.listeners.OnceExit[Symbol.iterator](),_.label=16;case 16:return(d=(b=m.next()).done)?[3,19]:(v=this,[5,_ts_values(y())]);case 17:_.sent(),_.label=18;case 18:return d=!0,[3,16];case 19:return[3,22];case 20:return w=_.sent(),f=!0,h=w,[3,22];case 21:try{d||null==m.return||m.return()}finally{if(f)throw h}return[7];case 22:return this.processed=!0,[2,this.stringify()]}})}).call(this)}},{key:"runOnRoot",value:function(e){var t=this;this.result.lastPlugin=e;try{if("object"===(void 0===e?"undefined":_type_of(e))&&e.Once){if("document"===this.result.root.type){var n=this.result.root.nodes.map(function(n){return e.Once(n,t.helpers)});return p(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}},{key:"stringify",value:function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=i;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new r(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();var e=!0,n=!1,r=void 0;try{for(var i,o=this.plugins[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var s=i.value;if(p(this.runOnRoot(s)))throw this.getAsyncError()}}catch(e){n=!0,r=e}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}if(this.prepareVisitors(),this.hasListener){for(var a=this.result.root;!a[t];)a[t]=!0,this.walkSync(a);if(this.listeners.OnceExit)if("document"===a.type){var u=!0,l=!1,c=void 0;try{for(var d,f=a.nodes[Symbol.iterator]();!(u=(d=f.next()).done);u=!0){var h=d.value;this.visitSync(this.listeners.OnceExit,h)}}catch(e){l=!0,c=e}finally{try{u||null==f.return||f.return()}finally{if(l)throw c}}}else this.visitSync(this.listeners.OnceExit,a)}return this.result}},{key:"then",value:function(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||a("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=_sliced_to_array(o.value,2),u=a[0],l=a[1];this.result.lastPlugin=u;var c=void 0;try{c=l(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(p(c))throw this.getAsyncError()}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"visitTick",value:function(e){var n=e[e.length-1],r=n.node,i=n.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&n.visitorIndex<i.length){var o=_sliced_to_array(i[n.visitorIndex],2),s=o[0],a=o[1];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==n.iterator){for(var u,l=n.iterator;u=r.nodes[r.indexes[l]];)if(r.indexes[l]+=1,!u[t])return u[t]=!0,void e.push(g(u));n.iterator=0,delete r.indexes[l]}for(var c=n.events;n.eventIndex<c.length;){var d=c[n.eventIndex];if(n.eventIndex+=1,0===d)return void(r.nodes&&r.nodes.length&&(r[t]=!0,n.iterator=r.getIterator()));if(this.listeners[d])return void(n.visitors=this.listeners[d])}e.pop()}else e.pop()}},{key:"walkSync",value:function(e){var n=this;e[t]=!0;var r=v(e),i=!0,o=!1,s=void 0;try{for(var a,u=r[Symbol.iterator]();!(i=(a=u.next()).done);i=!0){var l=a.value;if(0===l)e.nodes&&e.each(function(e){e[t]||n.walkSync(e)});else{var c=this.listeners[l];if(c&&this.visitSync(c,e.toProxy()))return}}}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}}},{key:"warnings",value:function(){return this.sync().warnings()}},{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e}();return b.registerPostcss=function(e){m=e},Fy=b,b.default=b,c.registerLazyResult(b),s.registerLazyResult(b),Fy},ci=function(){if(Wy)return Vy;Wy=1;var e=function(){if(zy)return qy;zy=1;var e=Qr(),t=Hr(),n=ei(),r=ui(),i=ni(),o=function(){function o(n,r,s){var a;_class_call_check(this,o),r=r.toString(),this.stringified=!1,this._processor=n,this._css=r,this._opts=s,this._map=void 0;var u=t;this.result=new i(this._processor,a,this._opts),this.result.css=r;var l=this;Object.defineProperty(this.result,"root",{get:function(){return l.root}});var c=new e(u,a,this._opts,r);if(c.isMap()){var d=_sliced_to_array(c.generate(),2),f=d[0],h=d[1];f&&(this.result.css=f),h&&(this.result.map=h)}else c.clearAnnotation(),this.result.css=c.css}return _create_class(o,[{key:"async",value:function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}},{key:"catch",value:function(e){return this.async().catch(e)}},{key:"finally",value:function(e){return this.async().then(e,e)}},{key:"sync",value:function(){if(this.error)throw this.error;return this.result}},{key:"then",value:function(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}},{key:"toString",value:function(){return this._css}},{key:"warnings",value:function(){return[]}},{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),o}();return qy=o,o.default=o,qy}(),t=li(),n=Zr(),r=ii(),i=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];_class_call_check(this,n),this.version="8.4.38",this.plugins=this.normalize(e)}return _create_class(n,[{key:"normalize",value:function(e){var t=[],n=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;if(!0===a.postcss?a=a():a.postcss&&(a=a.postcss),"object"===(void 0===a?"undefined":_type_of(a))&&Array.isArray(a.plugins))t=t.concat(a.plugins);else if("object"===(void 0===a?"undefined":_type_of(a))&&a.postcssPlugin)t.push(a);else if("function"==typeof a)t.push(a);else{if("object"!==(void 0===a?"undefined":_type_of(a))||!a.parse&&!a.stringify)throw new Error(a+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}return t}},{key:"process",value:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.plugins.length||r.parser||r.stringifier||r.syntax?new t(this,n,r):new e(this,n,r)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),n}();return Vy=i,i.default=i,r.registerProcessor(i),n.registerProcessor(i),Vy},di=function(){if(Jy)return Ky;Jy=1;var e=zr(),t=Kr(),n=li(),r=Xr(),i=ci(),o=Hr(),s=function(){if(Gy)return Hy;Gy=1;var e=Kr(),t=Jr(),n=Yr(),r=ri(),i=$r(),o=ii(),s=si();function a(u,l){if(Array.isArray(u))return u.map(function(e){return a(e)});var c=u.inputs,d=_object_without_properties(u,["inputs"]);if(c){l=[];var f=!0,h=!1,p=void 0;try{for(var v,g=c[Symbol.iterator]();!(f=(v=g.next()).done);f=!0){var y=_object_spread_props(_object_spread({},v.value),{__proto__:i.prototype});y.map&&(y.map=_object_spread_props(_object_spread({},y.map),{__proto__:t.prototype})),l.push(y)}}catch(e){h=!0,p=e}finally{try{f||null==g.return||g.return()}finally{if(h)throw p}}}if(d.nodes&&(d.nodes=u.nodes.map(function(e){return a(e,l)})),d.source){var m=d.source,b=m.inputId,w=_object_without_properties(m,["inputId"]);d.source=w,null!=b&&(d.source.input=l[b])}if("root"===d.type)return new o(d);if("decl"===d.type)return new e(d);if("rule"===d.type)return new s(d);if("comment"===d.type)return new n(d);if("atrule"===d.type)return new r(d);throw new Error("Unknown node type: "+u.type)}return Hy=a,a.default=a,Hy}(),a=Zr(),u=ti(),l=Yr(),c=ri(),d=ni(),f=$r(),h=ui(),p=oi(),v=si(),g=ii(),y=Gr();function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new i(t)}return m.plugin=function(e,t){var n,r=!1;function o(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var a=t.apply(void 0,_to_consumable_array(o));return a.postcssPlugin=e,a.postcssVersion=(new i).version,a}return Object.defineProperty(o,"postcss",{get:function(){return n||(n=o()),n}}),o.process=function(e,t,n){return m([o(n)]).process(e,t)},o},m.stringify=o,m.parse=h,m.fromJSON=s,m.list=p,m.comment=function(e){return new l(e)},m.atRule=function(e){return new c(e)},m.decl=function(e){return new t(e)},m.rule=function(e){return new v(e)},m.root=function(e){return new g(e)},m.document=function(e){return new a(e)},m.CssSyntaxError=e,m.Declaration=t,m.Container=r,m.Processor=i,m.Document=a,m.Comment=l,m.Warning=u,m.AtRule=c,m.Result=d,m.Input=f,m.Rule=v,m.Root=g,m.Node=y,n.registerPostcss(m),Ky=m,m.default=m,Ky},fi=function(e){if(em[e])return em[e];var t=function(e){var t,n,r=null==(n=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:n.call(t,e);return r&&globalThis[r]?globalThis[r]:void 0}(e)||globalThis[e],n=t.prototype,r=e in Xy?Xy[e]:void 0,i=Boolean(r&&r.every(function(e){var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),o=e in Zy?Zy[e]:void 0,s=Boolean(o&&o.every(function(e){var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))}));if(i&&s)return em[e]=t.prototype,t.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var u=a.contentWindow;if(!u)return t.prototype;var l=u[e].prototype;return document.body.removeChild(a),l?em[e]=l:n}catch(e){return n}},hi=function(e,t,n){var r,i="".concat(e,".").concat(String(n));if(tm[i])return tm[i].call(t);var o=fi(e),s=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return s?(tm[i]=s,s.call(t)):t[n]},pi=function(e,t,n){var r="".concat(e,".").concat(String(n));if(nm[r])return nm[r].bind(t);var i=fi(e)[n];return"function"!=typeof i?t[n]:(nm[r]=i,i.bind(t))},vi=function(e){return hi("Node",e,"childNodes")},gi=function(e){return hi("Node",e,"parentNode")},yi=function(e){return hi("Node",e,"parentElement")},mi=function(e){return hi("Node",e,"textContent")},bi=function(e,t){return pi("Node",e,"contains")(t)},wi=function(e){return pi("Node",e,"getRootNode")()},_i=function(e){return e&&"host"in e?hi("ShadowRoot",e,"host"):null},Si=function(e){return e.styleSheets},ki=function(e){return e&&"shadowRoot"in e?hi("Element",e,"shadowRoot"):null},xi=function(e,t){return hi("Element",e,"querySelector")(t)},Ei=function(e,t){return hi("Element",e,"querySelectorAll")(t)},Ci=function(){return fi("MutationObserver").constructor},Ii=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}},Oi=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=0;return function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];var u=Date.now();i||!1!==n.leading||(i=u);var l=t-(u-i),c=this;l<=0||l>t?(r&&(clearTimeout(r),r=null),i=u,e.apply(c,s)):r||!1===n.trailing||(r=setTimeout(function(){i=!1===n.leading?0:Date.now(),r=null,e.apply(c,s)},l))}},Ti=function(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch(e){return function(){}}},Ai=function(e){var t,n,r,i,o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=rm.parentElement(o.body))?void 0:t.scrollLeft)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(r=rm.parentElement(o.body))?void 0:r.scrollTop)||(null==(i=null==o?void 0:o.body)?void 0:i.scrollTop)||0}},Ri=function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},Pi=function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},Mi=function(e){return e?e.nodeType===e.ELEMENT_NODE?e:rm.parentElement(e):null},Ni=function(e,t,n,r){if(!e)return!1;var i=Mi(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t))return!0;if(r&&null!==i.closest("."+t))return!0}else if(Sm(i,t,r))return!0}catch(e){}if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1},Li=function(e,t){return-1!==t.getId(e)},ji=function(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||t.getId(e)===Tv},Di=function(e){return Boolean(e.changedTouches)},Ui=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)},Fi=function(e){var t={},n=function(e,n){var r={value:e,parent:n,children:[]};return t[e.node.id]=r,r},r=[],i=!0,o=!1,s=void 0;try{for(var a,u=e[Symbol.iterator]();!(i=(a=u.next()).done);i=!0){var l=a.value,c=l.nextId,d=l.parentId;if(c&&c in t){var f=t[c];if(f.parent){var h=f.parent.children.indexOf(f);f.parent.children.splice(h,0,n(l,f.parent))}else{var p=r.indexOf(f);r.splice(p,0,n(l,null))}}else if(d in t){var v=t[d];v.children.push(n(l,v))}else r.push(n(l,null))}}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}return r},Bi=function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},qi=function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},zi=function(e){return!!e&&(_instanceof(e,Yy)&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(rm.shadowRoot(e)))},Vi=function(e){var t=_to_consumable_array(e),n=t.pop();return{positions:t,index:n}},Wi=function(e){for(var t=new Set,n=[],r=e.length;r--;){var i=e[r];t.has(i.id)||(n.push(i),t.add(i.id))}return n},Hi=function(e){var t,n=null;return"getRootNode"in e&&(null==(t=rm.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&rm.host(rm.getRootNode(e))&&(n=rm.host(rm.getRootNode(e))),n},Gi=function(e){for(var t,n=e;t=Hi(n);)n=t;return n},Ki=function(e){var t=e.ownerDocument;if(!t)return!1;var n=Gi(e);return rm.contains(t,n)},Ji=function(e){var t=e.ownerDocument;return!!t&&(rm.contains(t,e)||Ki(e))},$i=function(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var n=e.localName;if(!n)break;n=n.toLowerCase();var r=e.parentElement,i=[];if(r.children&&r.children.length>0)for(var o=0;o<r.children.length;o++){var s=r.children[o];s.localName&&s.localName.toLowerCase&&s.localName.toLowerCase()===n&&i.push(s)}i.length>1&&(n+=":eq(".concat(i.indexOf(e),")")),t=n+(t?">"+t:""),e=r}return t},Qi=function(e){return"[object Object]"===Object.prototype.toString.call(e)},Yi=function(e,t){var n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);var r=[],i=[];return JSON.stringify(e,function(e,t){if(r.length>0){var o=r.indexOf(this);~o?r.splice(o+1):r.push(this),~o?i.splice(o,1/0,e):i.push(e),~r.indexOf(t)&&(t=r[0]===t?"[Circular ~]":"[Circular ~."+i.slice(0,r.indexOf(t)).join(".")+"]")}else r.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Qi(e)&&Object.keys(e).length>n.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Qi(e)&&Om(e,n.depthOfLimit))return!0;return!1}(t))return function(e){var t=e.toString();n.stringLengthLimit&&t.length>n.stringLengthLimit&&(t="".concat(t.slice(0,n.stringLengthLimit),"..."));return t}(t);if("bigint"===(void 0===t?"undefined":_type_of(t)))return t.toString()+"n";if(_instanceof(t,Event)){var s={};for(var a in t){var u=t[a];Array.isArray(u)?s[a]=$i(u.length?u[0]:null):s[a]=u}return s}return _instanceof(t,Node)?_instanceof(t,HTMLElement)?t?t.outerHTML:"":t.nodeName:_instanceof(t,Error)?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t})},Xi=function(e,t,n){var r,i=n?Object.assign({},ym,n):ym,o=i.logger;if(!o)return function(){};r="string"==typeof o?t[o]:o;var s=0,a=!1,u=[];if(i.level.includes("error")){var l=function(t){var n=t.message,r=t.error,o=gm.parse(r).map(function(e){return e.toString()}),s=[Yi(n,i.stringifyOptions)];e({level:"error",trace:o,payload:s})};t.addEventListener("error",l),u.push(function(){t.removeEventListener("error",l)});var c=function(t){var n,r;_instanceof(t.reason,Error)?(n=t.reason,r=[Yi("Uncaught (in promise) ".concat(n.name,": ").concat(n.message),i.stringifyOptions)]):(n=new Error,r=[Yi("Uncaught (in promise)",i.stringifyOptions),Yi(t.reason,i.stringifyOptions)]);var o=gm.parse(n).map(function(e){return e.toString()});e({level:"error",trace:o,payload:r})};t.addEventListener("unhandledrejection",c),u.push(function(){t.removeEventListener("unhandledrejection",c)})}var d=!0,f=!1,h=void 0;try{for(var p,v=i.level[Symbol.iterator]();!(d=(p=v.next()).done);d=!0){var g=p.value;u.push(y(r,g))}}catch(e){f=!0,h=e}finally{try{d||null==v.return||v.return()}finally{if(f)throw h}}return function(){u.forEach(function(e){return e()})};function y(t,n){var r=this;return t[n]?um.patch(t,n,function(t){var o=r;return function(){for(var r=arguments.length,u=new Array(r),l=0;l<r;l++)u[l]=arguments[l];if(t.apply(o,u),!("assert"===n&&u[0]||a)){a=!0;try{var c=gm.parse(new Error).map(function(e){return e.toString()}).splice(1),d=("assert"===n?u.slice(1):u).map(function(e){return Yi(e,i.stringifyOptions)});++s<i.lengthThreshold?e({level:n,trace:c,payload:d}):s===i.lengthThreshold&&e({level:"warn",trace:[],payload:[Yi("The number of log records reached the threshold.")]})}catch(e){t.apply(void 0,["rrweb logger error:",e].concat(_to_consumable_array(u)))}finally{a=!1}}}}):function(){}}},Zi=function(e){if(Fm[e])return Fm[e];var t=function(e){var t,n,r=null==(n=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:n.call(t,e);return r&&globalThis[r]?globalThis[r]:void 0}(e)||globalThis[e],n=t.prototype,r=e in Dm?Dm[e]:void 0,i=Boolean(r&&r.every(function(e){var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),o=e in Um?Um[e]:void 0,s=Boolean(o&&o.every(function(e){var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))}));if(i&&s)return Fm[e]=t.prototype,t.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var u=a.contentWindow;if(!u)return t.prototype;var l=u[e].prototype;return document.body.removeChild(a),l?Fm[e]=l:n}catch(e){return n}},eo=function(e,t,n){var r,i="".concat(e,".").concat(String(n));if(Bm[i])return Bm[i].call(t);var o=Zi(e),s=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return s?(Bm[i]=s,s.call(t)):t[n]},to=function(e,t,n){var r="".concat(e,".").concat(String(n));if(qm[r])return qm[r].bind(t);var i=Zi(e)[n];return"function"!=typeof i?t[n]:(qm[r]=i,i.bind(t))},no=function(e){return eo("Node",e,"childNodes")},ro=function(e){return eo("Node",e,"parentNode")},io=function(e){return eo("Node",e,"parentElement")},oo=function(e){return eo("Node",e,"textContent")},so=function(e,t){return to("Node",e,"contains")(t)},ao=function(e){return to("Node",e,"getRootNode")()},uo=function(e){return e&&"host"in e?eo("ShadowRoot",e,"host"):null},lo=function(e){return e.styleSheets},co=function(e){return e&&"shadowRoot"in e?eo("Element",e,"shadowRoot"):null},fo=function(e,t){return eo("Element",e,"querySelector")(t)},ho=function(e,t){return eo("Element",e,"querySelectorAll")(t)},po=function(){return Zi("MutationObserver").constructor},vo=function(e){return e.nodeType===e.ELEMENT_NODE},go=function(e){var t=e&&"host"in e&&"mode"in e&&zm.host(e)||null;return Boolean(t&&"shadowRoot"in t&&zm.shadowRoot(t)===e)},yo=function(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)},mo=function(e){try{var t=e.rules||e.cssRules;if(!t)return null;var n=e.href;!n&&e.ownerNode&&e.ownerNode.ownerDocument&&(n=e.ownerNode.ownerDocument.location.href);var r=Array.from(t,function(e){return bo(e,n)}).join("");return(i=r).includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")&&(i=i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),i}catch(e){return null}var i},bo=function(e,t){if(_o(e)){var n;try{n=mo(e.styleSheet)||function(e){var t=e.cssText;if(t.split('"').length<3)return t;var n=["@import","url(".concat(JSON.stringify(e.href),")")];return""===e.layerName?n.push("layer"):e.layerName&&n.push("layer(".concat(e.layerName,")")),e.supportsText&&n.push("supports(".concat(e.supportsText,")")),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(t){n=e.cssText}return e.styleSheet.href?Io(n,e.styleSheet.href):n}var r=e.cssText;return So(e)&&e.selectorText.includes(":")&&(r=wo(r)),t?Io(r,t):r},wo=function(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")},_o=function(e){return"styleSheet"in e},So=function(e){return"selectorText"in e},ko=function(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,i=e.type,o=e.value,s=e.maskInputFn,a=o||"",u=i&&xo(i);return(n[r.toLowerCase()]||u&&n[u])&&(a=s?s(a,t):"*".repeat(a.length)),a},xo=function(e){return e.toLowerCase()},Eo=function(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?xo(t):null},Co=function(e,t){var n,r;try{r=new URL(e,null!=t?t:window.location.href)}catch(e){return null}var i=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(n=null==i?void 0:i[1])&&void 0!==n?n:null},Io=function(e,t){return(e||"").replace(Hm,function(e,n,r,i,o,s){var a,u=r||o||s,l=n||i||"";if(!u)return e;if(Gm.test(u)||Km.test(u))return"url(".concat(l).concat(u).concat(l,")");if(Jm.test(u))return"url(".concat(l).concat(u).concat(l,")");if("/"===u[0])return"url(".concat(l).concat((a=t,(a.indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+u)).concat(l,")");var c=t.split("/"),d=u.split("/");c.pop();var f=!0,h=!1,p=void 0;try{for(var v,g=d[Symbol.iterator]();!(f=(v=g.next()).done);f=!0){var y=v.value;"."!==y&&(".."===y?c.pop():c.push(y))}}catch(e){h=!0,p=e}finally{try{f||null==g.return||g.return()}finally{if(h)throw p}}return"url(".concat(l).concat(c.join("/")).concat(l,")")})},Oo=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")},To=function(e,t){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=Array.from(t.childNodes),i=[],o=0;if(r.length>1&&e&&"string"==typeof e)for(var s=Oo(e,n),a=s.length/e.length,u=1;u<r.length;u++)if(r[u].textContent&&"string"==typeof r[u].textContent){for(var l=Oo(r[u].textContent,n),c=3;c<l.length&&(l[c].match(/[a-zA-Z0-9]/)||-1!==l.indexOf(l.substring(0,c),1));c++);for(;c<l.length;c++){var d=l.substring(0,c),f=s.split(d),h=-1;if(2===f.length)h=f[0].length;else if(f.length>2&&""===f[0]&&""!==r[u-1].textContent)h=s.indexOf(d,1);else if(1===f.length){if(d=d.substring(0,d.length-1),(f=s.split(d)).length<=1)return i.push(e),i;c=101}else c===l.length-1&&(h=s.indexOf(d));if(f.length>=2&&c>100){var p=r[u-1].textContent;if(p&&"string"==typeof p){var v=Oo(p).length;h=s.indexOf(d,v)}-1===h&&(h=f[0].length)}if(-1!==h){for(var g=Math.floor(h/a);g>0&&g<e.length;){if((o+=1)>50*r.length)return i.push(e),i;var y=Oo(e.substring(0,g),n);if(y.length===h){i.push(e.substring(0,g)),e=e.substring(g),s=s.substring(h);break}y.length<h?g+=Math.max(1,Math.floor((h-y.length)/a)):g-=Math.max(1,Math.floor((y.length-h)*a))}break}}}return i.push(e),i}(e,t).join("/* rr_split */")},Ao=function(){return Qm++},Ro=function(e,t){return t&&""!==t.trim()?Po(e,t):t},Po=function(e,t){var n=rb.get(e);if(n||(n=e.createElement("a"),rb.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href},Mo=function(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?Ro(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}for(var i=[];r(nb),!(n>=t.length);){var o=r(tb);if(","===o.slice(-1))o=Ro(e,o.substring(0,o.length-1)),i.push(o);else{var s="";o=Ro(e,o);for(var a=!1;;){var u=t.charAt(n);if(""===u){i.push((o+s).trim());break}if(a)")"===u&&(a=!1);else{if(","===u){n+=1,i.push((o+s).trim());break}"("===u&&(a=!0)}s+=u,n+=1}}}return i.join(", ")}(e,r):"style"===n?Io(r,Po(e)):"object"===t&&"data"===n?Ro(e,r):r:Ro(e,r):r},No=function(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t},Lo=function(e,t,n,r){var i;if(vo(e)){if(i=e,!zm.childNodes(i).length)return!1}else{if(null===zm.parentElement(e))return!1;i=zm.parentElement(e)}try{if("string"==typeof t){if(r){if(i.closest(".".concat(t)))return!0}else if(i.classList.contains(t))return!0}else if(_S(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(e){}return!1},jo=function(e,t){if(t.hasNode(e)){var n=t.getId(e);return 1===n?void 0:n}},Do=function(e,t){var n=t.needsMask,r=t.maskTextFn,i=t.rootId,o=t.cssCaptured,s=zm.parentNode(e),a=s&&s.tagName,u="",l="STYLE"===a||void 0,c="SCRIPT"===a||void 0;return c?u="SCRIPT_PLACEHOLDER":o||(u=zm.textContent(e),l&&u&&(u=Io(u,Po(t.doc)))),!l&&!c&&u&&n&&(u=r?r(u,zm.parentElement(e)):u.replace(/[\S]/g,"*")),{type:jm.Text,textContent:u||"",rootId:i}},Uo=function(e,t){for(var n,r,i=t.doc,o=t.blockClass,s=t.blockSelector,a=t.inlineStylesheet,u=t.maskInputOptions,l=void 0===u?{}:u,c=t.maskInputFn,d=t.maskAttributeFn,f=t.dataURLOptions,h=void 0===f?{}:f,p=t.inlineImages,v=t.recordCanvas,g=t.keepIframeSrcFn,y=t.newlyAddedElement,m=void 0!==y&&y,b=t.rootId,w=t.applyBackgroundColorToBlockedElements,_=void 0!==w&&w,S=function(e,t,n){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,o,s),k=function(e){if(_instanceof(e,HTMLFormElement))return"form";var t=xo(e.tagName);return Ym.test(t)?"div":t}(e),x={},E=e.attributes.length,C=0;C<E;C++){var I=e.attributes[C];if(!No(k,I.name,I.value)){var O=Mo(i,k,xo(I.name),I.value);if(d&&null!==O){var T=d(I.name,O,e);null!==T&&(x[I.name]=T)}else x[I.name]=O}}if("link"===k&&a){var A=Array.from(i.styleSheets).find(function(t){return t.href===e.href}),R=null;A&&(R=mo(A)),R&&(delete x.rel,delete x.href,x._cssText=R)}if("style"===k&&e.sheet){var P=mo(e.sheet);P&&(e.childNodes.length>1&&(P=To(P,e)),x._cssText=P)}if("input"===k||"textarea"===k||"select"===k){var M=e.value,N=e.checked;"radio"!==x.type&&"checkbox"!==x.type&&"submit"!==x.type&&"button"!==x.type&&M?x.value=ko({element:e,type:Eo(e),tagName:k,value:M,maskInputOptions:l,maskInputFn:c}):N&&(x.checked=N)}if("option"===k&&(e.selected&&!l.select?x.selected=!0:delete x.selected),"dialog"===k&&e.open&&(x.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),"canvas"===k&&v)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var i=t.getImageData,o=Wm in i?i[Wm]:i;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(function(e){return 0!==e}))return!1}return!0})(e)||(x.rr_dataURL=e.toDataURL(h.type,h.quality));else if(!("__context"in e)){var L=e.toDataURL(h.type,h.quality),j=i.createElement("canvas");j.width=e.width,j.height=e.height,L!==j.toDataURL(h.type,h.quality)&&(x.rr_dataURL=L)}if("img"===k&&p){Zm||(Zm=i.createElement("canvas"),eb=Zm.getContext("2d"));var D=e,U=D.currentSrc||D.getAttribute("src")||"<unknown-src>",F=D.crossOrigin,B=function(){D.removeEventListener("load",B);try{Zm.width=D.naturalWidth,Zm.height=D.naturalHeight,eb.drawImage(D,0,0),x.rr_dataURL=Zm.toDataURL(h.type,h.quality)}catch(e){if("anonymous"!==D.crossOrigin)return D.crossOrigin="anonymous",void(D.complete&&0!==D.naturalWidth?B():D.addEventListener("load",B));console.warn("Cannot inline img src=".concat(U,"! Error: ").concat(e))}"anonymous"===D.crossOrigin&&(F?x.crossOrigin=F:D.removeAttribute("crossorigin"))};D.complete&&0!==D.naturalWidth?B():D.addEventListener("load",B)}if("audio"===k||"video"===k){var q=x;q.rr_mediaState=e.paused?"paused":"played",q.rr_mediaCurrentTime=e.currentTime,q.rr_mediaPlaybackRate=e.playbackRate,q.rr_mediaMuted=e.muted,q.rr_mediaLoop=e.loop,q.rr_mediaVolume=e.volume}if(m||(e.scrollLeft&&(x.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(x.rr_scrollTop=e.scrollTop)),S){var z=e.getBoundingClientRect(),V=z.width,W=z.height;x=_object_spread({class:x.class,rr_width:"".concat(V,"px"),rr_height:"".concat(W,"px")},_?{rr_background_color:$m}:{})}"iframe"!==k||g(x.src)||(e.contentDocument||(x.rr_src=x.src),delete x.src);try{customElements.get(k)&&(n=!0)}catch(e){}return{type:jm.Element,tagName:k,attributes:x,childNodes:[],isSVG:(r=e,Boolean("svg"===r.tagName||r.ownerSVGElement)||void 0),needBlock:S,rootId:b,isCustom:n}},Fo=function(e){return null==e?"":e.toLowerCase()},Bo=function(e,t,n){return Array.from(e).map(function(e){var r=t(e),i=[];if(!n.has(r)){n.add(r);try{i=Array.from(e.cssRules,function(t,n){return{rule:bo(t,e.href),index:n}})}catch(e){if(!_instanceof(e,DOMException)||"SecurityError"!==e.name)throw e}}return{styleId:r,rules:i}})},qo=function(){if(cb)return lb;cb=1;var e=function(){if(ob)return ib.exports;ob=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return ib.exports=t(),ib.exports.createColors=t,ib.exports}(),t=ub,n=function(){function n(e,t,r,i,o,s){var a;return _class_call_check(this,n),(a=_call_super(this,n,[e])).name="CssSyntaxError",a.reason=e,o&&(a.file=o),i&&(a.source=i),s&&(a.plugin=s),void 0!==t&&void 0!==r&&("number"==typeof t?(a.line=t,a.column=r):(a.line=t.line,a.column=t.column,a.endLine=r.line,a.endColumn=r.column)),a.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(a,n),a}return _inherits(n,_wrap_native_super(Error)),_create_class(n,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(n){var r=this;if(!this.source)return"";var i=this.source;null==n&&(n=e.isColorSupported),t&&n&&(i=t(i));var o,s,a=i.split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),c=String(l).length;if(n){var d=e.createColors(!0),f=d.bold,h=d.gray,p=d.red;o=function(e){return f(p(e))},s=function(e){return h(e)}}else o=s=function(e){return e};return a.slice(u,l).map(function(e,t){var n=u+1+t,i=" "+(" "+n).slice(-c)+" | ";if(n===r.line){var a=s(i.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," ");return o(">")+s(i)+e+"\n "+a+o("^")}return" "+s(i)+e}).join("\n")}},{key:"toString",value:function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}]),n}();return lb=n,n.default=n,lb},zo=function(){return fb||(fb=1,db.isClean=Symbol("isClean"),db.my=Symbol("my")),db},Vo=function(){if(pb)return hb;pb=1;var e={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var t=function(){function t(e){_class_call_check(this,t),this.builder=e}return _create_class(t,[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{var i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}}},{key:"beforeAfter",value:function(e,t){var n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var s=0;s<i;s++)n+=o}return n}},{key:"block",value:function(e,t){var n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}},{key:"body",value:function(e){for(var t=e.nodes.length-1;t>0&&"comment"===e.nodes[t].type;)t-=1;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}},{key:"comment",value:function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}},{key:"decl",value:function(e,t){var n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}},{key:"document",value:function(e){this.body(e)}},{key:"raw",value:function(t,n,r){var i;if(r||(r=n),n&&void 0!==(i=t.raws[n]))return i;var o=t.parent;if("before"===r){if(!o||"root"===o.type&&o.first===t)return"";if(o&&"document"===o.type)return""}if(!o)return e[r];var s=t.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[r])return s.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var a,u="raw"+((a=r)[0].toUpperCase()+a.slice(1));return this[u]?i=this[u](s,t):s.walk(function(e){if(void 0!==(i=e.raws[n]))return!1}),void 0===i&&(i=e[r]),s.rawCache[r]=i,i}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}},{key:"rawBeforeComment",value:function(e,t){var n;return e.walkComments(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}},{key:"rawBeforeDecl",value:function(e,t){var n;return e.walkDecls(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}},{key:"rawBeforeOpen",value:function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}},{key:"rawBeforeRule",value:function(e){var t;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return(t=n.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}},{key:"rawColon",value:function(e){var t;return e.walkDecls(function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}},{key:"rawEmptyBody",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}},{key:"rawIndent",value:function(e){return e.raws.indent?e.raws.indent:(e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){var i=n.raws.before.split("\n");return t=(t=i[i.length-1]).replace(/\S/g,""),!1}}),t);var t}},{key:"rawSemicolon",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}},{key:"rawValue",value:function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}},{key:"root",value:function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}},{key:"rule",value:function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}},{key:"stringify",value:function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}]),t}();return hb=t,t.default=t,hb},Wo=function(){if(gb)return vb;gb=1;var e=Vo();function t(t,n){new e(n).stringify(t)}return vb=t,t.default=t,vb},Ho=function(){if(mb)return yb;mb=1;var e=zo(),t=e.isClean,n=e.my,r=qo(),i=Vo(),o=Wo();function s(e,t){var n=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){var i=e[r],o=void 0===i?"undefined":_type_of(i);"parent"===r&&"object"===o?t&&(n[r]=t):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map(function(e){return s(e,n)}):("object"===o&&null!==i&&(i=s(i)),n[r]=i)}return n}var a=function(){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var i in _class_call_check(this,e),this.raws={},this[t]=!1,this[n]=!0,r)if("nodes"===i){this.nodes=[];var o=!0,s=!1,a=void 0;try{for(var u,l=r[i][Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;"function"==typeof c.clone?this.append(c.clone()):this.append(c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}}else this[i]=r[i]}return _create_class(e,[{key:"addToError",value:function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))}return e}},{key:"after",value:function(e){return this.parent.insertAfter(this,e),this}},{key:"assign",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e)this[t]=e[t];return this}},{key:"before",value:function(e){return this.parent.insertBefore(this,e),this}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=s(this);for(var n in e)t[n]=e[n];return t}},{key:"cloneAfter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertAfter(this,t),t}},{key:"cloneBefore",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertBefore(this,t),t}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.source){var n=this.rangeBy(t),i=n.end,o=n.start;return this.source.input.error(e,{column:o.column,line:o.line},{column:i.column,line:i.line},t)}return new r(e)}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0}}}},{key:"markDirty",value:function(){if(this[t]){this[t]=!1;for(var e=this;e=e.parent;)e[t]=!1}}},{key:"next",value:function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}}},{key:"positionBy",value:function(e,t){var n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){var r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n}},{key:"positionInside",value:function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?(r=1,i+=1):r+=1;return{column:r,line:i}}},{key:"prev",value:function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}}},{key:"rangeBy",value:function(e){var t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var r=this.toString(),i=r.indexOf(e.word);-1!==i&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}},{key:"raw",value:function(e,t){return(new i).raw(this,e,t)}},{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"replaceWith",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this.parent){var r=this,i=!1,o=!0,s=!1,a=void 0;try{for(var u,l=t[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;c===this?i=!0:i?(this.parent.insertAfter(r,c),r=c):this.parent.insertBefore(r,c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}i||this.remove()}return this}},{key:"root",value:function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}},{key:"toJSON",value:function(e,t){var n={},r=null==t;t=t||new Map;var i=0;for(var o in this)if(Object.prototype.hasOwnProperty.call(this,o)&&"parent"!==o&&"proxyCache"!==o){var s=this[o];if(Array.isArray(s))n[o]=s.map(function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&e.toJSON?e.toJSON(null,t):e});else if("object"===(void 0===s?"undefined":_type_of(s))&&s.toJSON)n[o]=s.toJSON(null,t);else if("source"===o){var a=t.get(s.input);null==a&&(a=i,t.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=_to_consumable_array(t.keys()).map(function(e){return e.toJSON()})),n}},{key:"toProxy",value:function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;e.stringify&&(e=e.stringify);var t="";return e(this,function(e){t+=e}),t}},{key:"warn",value:function(e,t,n){var r={node:this};for(var i in n)r[i]=n[i];return e.warn(t,r)}},{key:"proxyOf",get:function(){return this}}]),e}();return yb=a,a.default=a,yb},Go=function(){if(wb)return bb;wb=1;var e=function(e){function t(e){var n;return _class_call_check(this,t),e&&void 0!==e.value&&"string"!=typeof e.value&&(e=_object_spread_props(_object_spread({},e),{value:String(e.value)})),(n=_call_super(this,t,[e])).type="decl",n}return _inherits(t,e),_create_class(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),t}(Ho());return bb=e,e.default=e,bb},Ko=function(){if(xb)return kb;xb=1;var e=ub.SourceMapConsumer,t=ub.SourceMapGenerator,n=ub.existsSync,r=ub.readFileSync,i=ub.dirname,o=ub.join;var s=function(){function s(e,t){if(_class_call_check(this,s),!1!==t.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),r&&(this.text=r)}}return _create_class(s,[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}},{key:"decodeInline",value:function(e){var t;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}},{key:"getAnnotationURL",value:function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}},{key:"loadAnnotation",value:function(e){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(t){var n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}}},{key:"loadFile",value:function(e){if(this.root=i(e),n(e))return this.mapFile=e,r(e,"utf-8").toString().trim()}},{key:"loadMap",value:function(n,r){if(!1===r)return!1;if(r){if("string"==typeof r)return r;if("function"!=typeof r){if(_instanceof(r,e))return t.fromSourceMap(r).toString();if(_instanceof(r,t))return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}var s=r(n);if(s){var a=this.loadFile(s);if(!a)throw new Error("Unable to load previous source map: "+s.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var u=this.annotation;return n&&(u=o(i(n),u)),this.loadFile(u)}}}},{key:"startWith",value:function(e,t){return!!e&&e.substr(0,t.length)===t}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}]),s}();return kb=s,s.default=s,kb},Jo=function(){if(Cb)return Eb;Cb=1;var e=ub.SourceMapConsumer,t=ub.SourceMapGenerator,n=ub.fileURLToPath,r=ub.pathToFileURL,i=ub.isAbsolute,o=ub.resolve,s=(Sb||(Sb=1,_b={nanoid:function(){for(var e="",t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21;return function(){for(var n="",r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t;r--;)n+=e[Math.random()*e.length|0];return n}}}),_b).nanoid,a=ub,u=qo(),l=Ko(),c=Symbol("fromOffsetCache"),d=Boolean(e&&t),f=Boolean(o&&i),h=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_class_call_check(this,e),null==t||"object"===(void 0===t?"undefined":_type_of(t))&&!t.toString)throw new Error("PostCSS received ".concat(t," instead of CSS string"));if(this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!f||/^\w+:\/\//.test(n.from)||i(n.from)?this.file=n.from:this.file=o(n.from)),f&&d){var r=new l(this.css,n);if(r.text){this.map=r;var a=r.consumer().file;!this.file&&a&&(this.file=this.mapResolve(a))}}this.file||(this.id="<input css "+s(6)+">"),this.map&&(this.map.file=this.from)}return _create_class(e,[{key:"error",value:function(e,t,n){var i,o,s,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(t&&"object"===(void 0===t?"undefined":_type_of(t))){var l=t,c=n;if("number"==typeof l.offset){var d=this.fromOffset(l.offset);t=d.line,n=d.col}else t=l.line,n=l.column;if("number"==typeof c.offset){var f=this.fromOffset(c.offset);o=f.line,s=f.col}else o=c.line,s=c.column}else if(!n){var h=this.fromOffset(t);t=h.line,n=h.col}var p=this.origin(t,n,o,s);return(i=p?new u(e,void 0===p.endLine?p.line:{column:p.column,line:p.line},void 0===p.endLine?p.column:{column:p.endColumn,line:p.endLine},p.source,p.file,a.plugin):new u(e,void 0===o?t:{column:n,line:t},void 0===o?n:{column:s,line:o},this.css,this.file,a.plugin)).input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(r&&(i.input.url=r(this.file).toString()),i.input.file=this.file),i}},{key:"fromOffset",value:function(e){var t;if(this[c])t=this[c];else{var n=this.css.split("\n");t=new Array(n.length);for(var r=0,i=0,o=n.length;i<o;i++)t[i]=r,r+=n[i].length+1;this[c]=t}var s=0;if(e>=t[t.length-1])s=t.length-1;else for(var a,u=t.length-2;s<u;)if(e<t[a=s+(u-s>>1)])u=a-1;else{if(!(e>=t[a+1])){s=a;break}s=a+1}return{col:e-t[s]+1,line:s+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}},{key:"origin",value:function(e,t,o,s){if(!this.map)return!1;var a,u,l=this.map.consumer(),c=l.originalPositionFor({column:t,line:e});if(!c.source)return!1;"number"==typeof o&&(a=l.originalPositionFor({column:s,line:o})),u=i(c.source)?r(c.source):new URL(c.source,this.map.consumer().sourceRoot||r(this.map.mapFile));var d={column:c.column,endColumn:a&&a.column,endLine:a&&a.line,line:c.line,url:u.toString()};if("file:"===u.protocol){if(!n)throw new Error("file: protocol is not available in this PostCSS build");d.file=n(u)}var f=l.sourceContentFor(c.source);return f&&(d.source=f),d}},{key:"toJSON",value:function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=_object_spread({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}},{key:"from",get:function(){return this.file||this.id}}]),e}();return Eb=h,h.default=h,a&&a.registerInput&&a.registerInput(h),Eb},$o=function(){if(Ob)return Ib;Ob=1;var e=ub.SourceMapConsumer,t=ub.SourceMapGenerator,n=ub.dirname,r=ub.relative,i=ub.resolve,o=ub.sep,s=ub.pathToFileURL,a=Jo(),u=Boolean(e&&t),l=Boolean(n&&i&&r&&o);return Ib=function(){function c(e,t,n,r){_class_call_check(this,c),this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}return _create_class(c,[{key:"addAnnotation",value:function(){var e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}},{key:"applyPrevMaps",value:function(){var t=!0,r=!1,i=void 0;try{for(var o,s=this.previous()[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){var a=o.value,u=this.toUrl(this.path(a.file)),l=a.root||n(a.file),c=void 0;!1===this.mapOpts.sourcesContent?(c=new e(a.text)).sourcesContent&&(c.sourcesContent=null):c=a.consumer(),this.map.applySourceMap(c,u,this.toUrl(this.path(l)))}}catch(e){r=!0,i=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}},{key:"generate",value:function(){if(this.clearAnnotation(),l&&u&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]}},{key:"generateMap",value:function(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var e=this;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});var n,r,i=1,o=1,s="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(t,u,l){if(e.css+=t,u&&"end"!==l&&(a.generated.line=i,a.generated.column=o-1,u.source&&u.source.start?(a.source=e.sourcePath(u),a.original.line=u.source.start.line,a.original.column=u.source.start.column-1,e.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,e.map.addMapping(a))),(n=t.match(/\n/g))?(i+=n.length,r=t.lastIndexOf("\n"),o=t.length-r):o+=t.length,u&&"start"!==l){var c=u.parent||{raws:{}};("decl"===u.type||"atrule"===u.type&&!u.nodes)&&u===c.last&&!c.raws.semicolon||(u.source&&u.source.end?(a.source=e.sourcePath(u),a.original.line=u.source.end.line,a.original.column=u.source.end.column-1,a.generated.line=i,a.generated.column=o-2,e.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,a.generated.line=i,a.generated.column=o-1,e.map.addMapping(a)))}})}},{key:"isAnnotation",value:function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))}},{key:"isMap",value:function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}},{key:"isSourcesContent",value:function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var o=this.opts.to?n(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=n(i(o,this.mapOpts.annotation)));var s=r(o,e);return this.memoizedPaths.set(e,s),s}},{key:"previous",value:function(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;e.previousMaps.includes(n)||e.previousMaps.push(n)}});else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}},{key:"setSourcesContent",value:function(){var e=this,t={};if(this.root)this.root.walk(function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.usesFileUrls?e.toFileUrl(r):e.toUrl(e.path(r));e.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){var n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}},{key:"sourcePath",value:function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}},{key:"toBase64",value:function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}},{key:"toFileUrl",value:function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(s){var n=s(e).toString();return this.memoizedFileURLs.set(e,n),n}throw new Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));var n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}]),c}()},Qo=function(){if(Ab)return Tb;Ab=1;var e=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t,[e])).type="comment",n}return _inherits(t,e),t}(Ho());return Tb=e,e.default=e,Tb},Yo=function(){if(Pb)return Rb;Pb=1;var e,t,n,r,i=zo(),o=i.isClean,s=i.my,a=Go(),u=Qo();function l(e){return e.map(function(e){return e.nodes&&(e.nodes=l(e.nodes)),delete e.source,e})}function c(e){if(e[o]=!1,e.proxyOf.nodes){var t=!0,n=!1,r=void 0;try{for(var i,s=e.proxyOf.nodes[Symbol.iterator]();!(t=(i=s.next()).done);t=!0){c(i.value)}}catch(e){n=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(n)throw r}}}}var d=function(r){function i(){return _class_call_check(this,i),_call_super(this,i,arguments)}return _inherits(i,r),_create_class(i,[{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value,l=this.normalize(u,this.last),c=!0,d=!1,f=void 0;try{for(var h,p=l[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;this.proxyOf.nodes.push(v)}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if(_get(_get_prototype_of(i.prototype),"cleanRaws",this).call(this,e),this.nodes){var t=!0,n=!1,r=void 0;try{for(var o,s=this.nodes[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){o.value.cleanRaws(e)}}catch(e){n=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(n)throw r}}}}},{key:"each",value:function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"getIterator",value:function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o;return(o=e)[t].apply(o,_to_consumable_array(r.map(function(e){return"function"==typeof e?function(t,n){return e(t.toProxy(),n)}:e})))}:"every"===t||"some"===t?function(n){return e[t](function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return n.apply(void 0,[e.toProxy()].concat(_to_consumable_array(r)))})}:"root"===t?function(){return e.root().toProxy()}:"nodes"===t?e.nodes.map(function(e){return e.toProxy()}):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0}}}},{key:"index",value:function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}},{key:"insertAfter",value:function(e,t){var n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);var i,o=!0,s=!1,a=void 0;try{for(var u,l=r[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;this.proxyOf.nodes.splice(n+1,0,c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}for(var d in this.indexes)n<(i=this.indexes[d])&&(this.indexes[d]=i+r.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n=this.index(e),r=0===n&&"prepend",i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);var o,s=!0,a=!1,u=void 0;try{for(var l,c=i[Symbol.iterator]();!(s=(l=c.next()).done);s=!0){var d=l.value;this.proxyOf.nodes.splice(n,0,d)}}catch(e){a=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(a)throw u}}for(var f in this.indexes)n<=(o=this.indexes[f])&&(this.indexes[f]=o+i.length);return this.markDirty(),this}},{key:"normalize",value:function(r,d){var f=this;if("string"==typeof r)r=l(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r)){r=r.slice(0);var h=!0,p=!1,v=void 0;try{for(var g,y=r[Symbol.iterator]();!(h=(g=y.next()).done);h=!0){var m=g.value;m.parent&&m.parent.removeChild(m,"ignore")}}catch(e){p=!0,v=e}finally{try{h||null==y.return||y.return()}finally{if(p)throw v}}}else if("root"===r.type&&"document"!==this.type){r=r.nodes.slice(0);var b=!0,w=!1,_=void 0;try{for(var S,k=r[Symbol.iterator]();!(b=(S=k.next()).done);b=!0){var x=S.value;x.parent&&x.parent.removeChild(x,"ignore")}}catch(e){w=!0,_=e}finally{try{b||null==k.return||k.return()}finally{if(w)throw _}}}else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new a(r)]}else if(r.selector)r=[new t(r)];else if(r.name)r=[new n(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new u(r)]}var E=r.map(function(e){return e[s]||i.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[o]&&c(e),void 0===e.raws.before&&d&&void 0!==d.raws.before&&(e.raws.before=d.raws.before.replace(/\S/g,"")),e.parent=f.proxyOf,e});return E}},{key:"prepend",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.reverse();var r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value,l=this.normalize(u,this.first,"prepend").reverse(),c=!0,d=!1,f=void 0;try{for(var h,p=l[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;this.proxyOf.nodes.unshift(v)}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}for(var g in this.indexes)this.indexes[g]=this.indexes[g]+l.length}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return this.markDirty(),this}},{key:"push",value:function(e){return e.parent=this,this.proxyOf.nodes.push(e),this}},{key:"removeAll",value:function(){var e=!0,t=!1,n=void 0;try{for(var r,i=this.proxyOf.nodes[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){r.value.parent=void 0}}catch(e){t=!0,n=e}finally{try{e||null==i.return||i.return()}finally{if(t)throw n}}return this.proxyOf.nodes=[],this.markDirty(),this}},{key:"removeChild",value:function(e){var t;for(var n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}},{key:"replaceValues",value:function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"walk",value:function(e){return this.each(function(t,n){var r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}},{key:"walkAtRules",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("atrule"===e.type)return t(e,n)}))}},{key:"walkComments",value:function(e){return this.walk(function(t,n){if("comment"===t.type)return e(t,n)})}},{key:"walkDecls",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("decl"===e.type)return t(e,n)}))}},{key:"walkRules",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("rule"===e.type)return t(e,n)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),i}(Ho());return d.registerParse=function(t){e=t},d.registerRule=function(e){t=e},d.registerAtRule=function(e){n=e},d.registerRoot=function(e){r=e},Rb=d,d.default=d,d.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,n.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,a.prototype):"comment"===e.type?Object.setPrototypeOf(e,u.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[s]=!0,e.nodes&&e.nodes.forEach(function(e){d.rebuild(e)})},Rb},Xo=function(){if(Nb)return Mb;Nb=1;var e,t,n=function(n){function r(e){var t;return _class_call_check(this,r),(t=_call_super(this,r,[_object_spread({type:"document"},e)])).nodes||(t.nodes=[]),t}return _inherits(r,n),_create_class(r,[{key:"toResult",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(new t,this,n).stringify()}}]),r}(Yo());return n.registerLazyResult=function(t){e=t},n.registerProcessor=function(e){t=e},Mb=n,n.default=n,Mb},Zo=function(){if(jb)return Lb;jb=1;var e={};return Lb=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}},es=function(){if(Ub)return Db;Ub=1;var e=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_class_call_check(this,e),this.type="warning",this.text=t,n.node&&n.node.source){var r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in n)this[i]=n[i]}return _create_class(e,[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),e}();return Db=e,e.default=e,Db},ts=function(){if(Bb)return Fb;Bb=1;var e=es(),t=function(){function t(e,n,r){_class_call_check(this,t),this.processor=e,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}return _create_class(t,[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);var r=new e(t,n);return this.messages.push(r),r}},{key:"warnings",value:function(){return this.messages.filter(function(e){return"warning"===e.type})}},{key:"content",get:function(){return this.css}}]),t}();return Fb=t,t.default=t,Fb},ns=function(){if(Wb)return Vb;Wb=1;var e=Yo(),t=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t,[e])).type="atrule",n}return _inherits(t,e),_create_class(t,[{key:"append",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=_get(_get_prototype_of(t.prototype),"append",this)).call.apply(i,[this].concat(_to_consumable_array(n)))}},{key:"prepend",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=_get(_get_prototype_of(t.prototype),"prepend",this)).call.apply(i,[this].concat(_to_consumable_array(n)))}}]),t}(e);return Vb=t,t.default=t,e.registerAtRule(t),Vb},rs=function(){if(Gb)return Hb;Gb=1;var e,t,n=Yo(),r=function(n){function r(e){var t;return _class_call_check(this,r),(t=_call_super(this,r,[e])).type="root",t.nodes||(t.nodes=[]),t}return _inherits(r,n),_create_class(r,[{key:"normalize",value:function(e,t,n){var i=_get(_get_prototype_of(r.prototype),"normalize",this).call(this,e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t){var o=!0,s=!1,a=void 0;try{for(var u,l=i[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){u.value.raws.before=t.raws.before}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}}return i}},{key:"removeChild",value:function(e,t){var n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),_get(_get_prototype_of(r.prototype),"removeChild",this).call(this,e)}},{key:"toResult",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(new t,this,n).stringify()}}]),r}(n);return r.registerLazyResult=function(t){e=t},r.registerProcessor=function(e){t=e},Hb=r,r.default=r,n.registerRoot(r),Hb},is=function(){if(Jb)return Kb;Jb=1;var e={comma:function(t){return e.split(t,[","],!0)},space:function(t){return e.split(t,[" ","\n","\t"])},split:function(e,t,n){var r=[],i="",o=!1,s=0,a=!1,u="",l=!1,c=!0,d=!1,f=void 0;try{for(var h,p=e[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;l?l=!1:"\\"===v?l=!0:a?v===u&&(a=!1):'"'===v||"'"===v?(a=!0,u=v):"("===v?s+=1:")"===v?s>0&&(s-=1):0===s&&t.includes(v)&&(o=!0),o?(""!==i&&r.push(i.trim()),i="",o=!1):i+=v}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}return(n||""!==i)&&r.push(i.trim()),r}};return Kb=e,e.default=e,Kb},os=function(){if(Qb)return $b;Qb=1;var e=Yo(),t=is(),n=function(e){function n(e){var t;return _class_call_check(this,n),(t=_call_super(this,n,[e])).type="rule",t.nodes||(t.nodes=[]),t}return _inherits(n,e),_create_class(n,[{key:"selectors",get:function(){return t.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}]),n}(e);return $b=n,n.default=n,e.registerRule(n),$b},ss=function(){if(Xb)return Yb;Xb=1;var e=Go(),t=function(){if(zb)return qb;zb=1;var e="'".charCodeAt(0),t='"'.charCodeAt(0),n="\\".charCodeAt(0),r="/".charCodeAt(0),i="\n".charCodeAt(0),o=" ".charCodeAt(0),s="\f".charCodeAt(0),a="\t".charCodeAt(0),u="\r".charCodeAt(0),l="[".charCodeAt(0),c="]".charCodeAt(0),d="(".charCodeAt(0),f=")".charCodeAt(0),h="{".charCodeAt(0),p="}".charCodeAt(0),v=";".charCodeAt(0),g="*".charCodeAt(0),y=":".charCodeAt(0),m="@".charCodeAt(0),b=/[\t\n\f\r "#'()/;[\\\]{}]/g,w=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return qb=function(k){var x,E,C,I,O,T,A,R,P,M,N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},L=k.css.valueOf(),j=N.ignoreErrors,D=L.length,U=0,F=[],B=[];function q(e){throw k.error("Unclosed "+e,U)}return{back:function(e){B.push(e)},endOfFile:function(){return 0===B.length&&U>=D},nextToken:function(k){if(B.length)return B.pop();if(!(U>=D)){var N=!!k&&k.ignoreUnclosed;switch(x=L.charCodeAt(U)){case i:case o:case a:case u:case s:E=U;do{E+=1,x=L.charCodeAt(E)}while(x===o||x===i||x===a||x===u||x===s);M=["space",L.slice(U,E)],U=E-1;break;case l:case c:case h:case p:case y:case v:case f:var z=String.fromCharCode(x);M=[z,z,U];break;case d:if(R=F.length?F.pop()[1]:"",P=L.charCodeAt(U+1),"url"===R&&P!==e&&P!==t&&P!==o&&P!==i&&P!==a&&P!==s&&P!==u){E=U;do{if(T=!1,-1===(E=L.indexOf(")",E+1))){if(j||N){E=U;break}q("bracket")}for(A=E;L.charCodeAt(A-1)===n;)A-=1,T=!T}while(T);M=["brackets",L.slice(U,E+1),U,E],U=E}else E=L.indexOf(")",U+1),I=L.slice(U,E+1),-1===E||_.test(I)?M=["(","(",U]:(M=["brackets",I,U,E],U=E);break;case e:case t:C=x===e?"'":'"',E=U;do{if(T=!1,-1===(E=L.indexOf(C,E+1))){if(j||N){E=U+1;break}q("string")}for(A=E;L.charCodeAt(A-1)===n;)A-=1,T=!T}while(T);M=["string",L.slice(U,E+1),U,E],U=E;break;case m:b.lastIndex=U+1,b.test(L),E=0===b.lastIndex?L.length-1:b.lastIndex-2,M=["at-word",L.slice(U,E+1),U,E],U=E;break;case n:for(E=U,O=!0;L.charCodeAt(E+1)===n;)E+=1,O=!O;if(x=L.charCodeAt(E+1),O&&x!==r&&x!==o&&x!==i&&x!==a&&x!==u&&x!==s&&(E+=1,S.test(L.charAt(E)))){for(;S.test(L.charAt(E+1));)E+=1;L.charCodeAt(E+1)===o&&(E+=1)}M=["word",L.slice(U,E+1),U,E],U=E;break;default:x===r&&L.charCodeAt(U+1)===g?(0===(E=L.indexOf("*/",U+2)+1)&&(j||N?E=L.length:q("comment")),M=["comment",L.slice(U,E+1),U,E],U=E):(w.lastIndex=U+1,w.test(L),E=0===w.lastIndex?L.length-1:w.lastIndex-2,M=["word",L.slice(U,E+1),U,E],F.push(M),U=E)}return U++,M}},position:function(){return U}}},qb}(),n=Qo(),r=ns(),i=rs(),o=os(),s={empty:!0,space:!0};return Yb=function(){function a(e){_class_call_check(this,a),this.input=e,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}return _create_class(a,[{key:"atrule",value:function(e){var t,n,i,o=new r;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);for(var s=!1,a=!1,u=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(u.length>0){for(n=u[i=u.length-1];n&&"space"===n[0];)n=u[--i];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(e);break}u.push(e)}else u.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(o.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(o,"params",u),s&&(e=u[u.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}},{key:"checkMissedSemicolon",value:function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;i>=0&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},{key:"colon",value:function(e){var t,n,r,i=0,o=!0,s=!1,a=void 0;try{for(var u,l=e.entries()[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=_sliced_to_array(u.value,2),d=c[0];if("("===(n=(t=c[1])[0])&&(i+=1),")"===n&&(i-=1),0===i&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return d}this.doubleColon(t)}r=t}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}return!1}},{key:"comment",value:function(e){var t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{var i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}},{key:"createTokenizer",value:function(){this.tokenizer=t(this.input)}},{key:"decl",value:function(t,n){var r=new e;this.init(r,t[0][2]);var i,o=t[t.length-1];for(";"===o[0]&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(o[3]||o[2]||function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=n[3]||n[2];if(r)return r}}(t)),r.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){var s=t[0][0];if(":"===s||"space"===s||"comment"===s)break;r.prop+=t.shift()[1]}for(r.raws.between="";t.length;){if(":"===(i=t.shift())[0]){r.raws.between+=i[1];break}"word"===i[0]&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));for(var a,u=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)u.push(t.shift());this.precheckMissedSemicolon(t);for(var l=t.length-1;l>=0;l--){if("!important"===(i=t[l])[1].toLowerCase()){r.important=!0;var c=this.stringFrom(t,l);" !important"!==(c=this.spacesFromEnd(t)+c)&&(r.raws.important=c);break}if("important"===i[1].toLowerCase()){for(var d=t.slice(0),f="",h=l;h>0;h--){var p=d[h][0];if(0===f.trim().indexOf("!")&&"space"!==p)break;f=d.pop()[1]+f}0===f.trim().indexOf("!")&&(r.important=!0,r.raws.important=f,t=d)}if("space"!==i[0]&&"comment"!==i[0])break}var v=t.some(function(e){return"space"!==e[0]&&"comment"!==e[0]});v&&(r.raws.between+=u.map(function(e){return e[1]}).join(""),u=[]),this.raw(r,"value",u.concat(t),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}},{key:"doubleColon",value:function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}},{key:"emptyRule",value:function(e){var t=new o;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}},{key:"end",value:function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}},{key:"getPosition",value:function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}},{key:"init",value:function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}},{key:"other",value:function(e){for(var t=!1,n=null,r=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],u=e;u;){if(n=u[0],a.push(u),"("===n||"["===n)i||(i=u),o.push("("===n?")":"]");else if(s&&r&&"{"===n)i||(i=u),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(a,s);break}if("{"===n)return void this.rule(a);if("}"===n){this.tokenizer.back(a.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!s)for(;a.length&&("space"===(u=a[a.length-1][0])||"comment"===u);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}},{key:"parse",value:function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(e,t,n,r){for(var i,o,a,u,l=n.length,c="",d=!0,f=0;f<l;f+=1)"space"!==(o=(i=n[f])[0])||f!==l-1||r?"comment"===o?(u=n[f-1]?n[f-1][0]:"empty",a=n[f+1]?n[f+1][0]:"empty",s[u]||s[a]||","===c.slice(-1)?d=!1:c+=i[1]):c+=i[1]:d=!1;if(!d){var h=n.reduce(function(e,t){return e+t[1]},"");e.raws[t]={raw:h,value:c}}e[t]=c}},{key:"rule",value:function(e){e.pop();var t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}},{key:"spacesAndCommentsFromEnd",value:function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}},{key:"spacesAndCommentsFromStart",value:function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}},{key:"spacesFromEnd",value:function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}},{key:"stringFrom",value:function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}},{key:"unclosedBlock",value:function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}},{key:"unclosedBracket",value:function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}},{key:"unexpectedClose",value:function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}},{key:"unknownWord",value:function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}},{key:"unnamedAtrule",value:function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}]),a}()},as=function(){if(ew)return Zb;ew=1;var e=Yo(),t=ss(),n=Jo();function r(e,r){var i=new n(e,r),o=new t(i);try{o.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&r&&r.from&&(/\.scss$/i.test(r.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(r.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(r.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return o.root}return Zb=r,r.default=r,e.registerParse(r),Zb},us=function(){if(nw)return tw;nw=1;var e=zo(),t=e.isClean,n=e.my,r=$o(),i=Wo(),o=Yo(),s=Xo(),a=Zo(),u=ts(),l=as(),c=rs(),d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0};function p(e){return"object"===(void 0===e?"undefined":_type_of(e))&&"function"==typeof e.then}function v(e){var t=!1,n=d[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function g(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:v(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function y(e){return e[t]=!1,e.nodes&&e.nodes.forEach(function(e){return y(e)}),e}var m={},b=function(){function e(t,r,i){var s,a=this;if(_class_call_check(this,e),this.stringified=!1,this.processed=!1,"object"!==(void 0===r?"undefined":_type_of(r))||null===r||"root"!==r.type&&"document"!==r.type)if(_instanceof(r,e)||_instanceof(r,u))s=y(r.root),r.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=r.map);else{var c=l;i.syntax&&(c=i.syntax.parse),i.parser&&(c=i.parser),c.parse&&(c=c.parse);try{s=c(r,i)}catch(e){this.processed=!0,this.error=e}s&&!s[n]&&o.rebuild(s)}else s=y(r);this.result=new u(t,s,i),this.helpers=_object_spread_props(_object_spread({},m),{postcss:m,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&e.prepare?_object_spread({},e,e.prepare(a.result)):e})}return _create_class(e,[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(e){return this.async().catch(e)}},{key:"finally",value:function(e){return this.async().then(e,e)}},{key:"getAsyncError",value:function(){throw new Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(e,t){var n=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(n.postcssVersion&&"production"!==process.env.NODE_ENV){var r=n.postcssPlugin,i=n.postcssVersion,o=this.result.processor.version,s=i.split("."),a=o.split(".");(s[0]!==a[0]||parseInt(s[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+r+" uses "+i+". Perhaps this is the source of the error below.")}}else e.plugin=n.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}},{key:"prepareVisitors",value:function(){var e=this;this.listeners={};var t=function(t,n,r){e.listeners[n]||(e.listeners[n]=[]),e.listeners[n].push([t,r])},n=!0,r=!1,i=void 0;try{for(var o,s=this.plugins[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;if("object"===(void 0===a?"undefined":_type_of(a)))for(var u in a){if(!f[u]&&/^[A-Z]/.test(u))throw new Error("Unknown event ".concat(u," in ").concat(a.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!h[u])if("object"===_type_of(a[u]))for(var l in a[u])t(a,"*"===l?u:u+"-"+l.toLowerCase(),a[u][l]);else"function"==typeof a[u]&&t(a,u,a[u])}}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}this.hasListener=Object.keys(this.listeners).length>0}},{key:"runAsync",value:function(){return _async_to_generator(function(){var e,n,r,i,o,s,a,u,l,c,d,f,h,v,y,m,b,w;return _ts_generator(this,function(_){switch(_.label){case 0:e=this,this.plugin=0,n=0,_.label=1;case 1:if(!(n<this.plugins.length))return[3,6];if(r=this.plugins[n],!p(i=this.runOnRoot(r)))return[3,5];_.label=2;case 2:return _.trys.push([2,4,,5]),[4,i];case 3:return _.sent(),[3,5];case 4:throw o=_.sent(),this.handleError(o);case 5:return n++,[3,1];case 6:if(this.prepareVisitors(),!this.hasListener)return[3,22];s=this.result.root,_.label=7;case 7:if(s[t])return[3,14];s[t]=!0,a=[g(s)],_.label=8;case 8:if(!(a.length>0))return[3,13];if(!p(u=this.visitTick(a)))return[3,12];_.label=9;case 9:return _.trys.push([9,11,,12]),[4,u];case 10:return _.sent(),[3,12];case 11:throw l=_.sent(),c=a[a.length-1].node,this.handleError(l,c);case 12:return[3,8];case 13:return[3,7];case 14:if(!this.listeners.OnceExit)return[3,22];d=!0,f=!1,h=void 0,_.label=15;case 15:_.trys.push([15,20,21,22]),y=function(){var t,n,r,i,o;return _ts_generator(this,function(a){switch(a.label){case 0:t=_sliced_to_array(b.value,2),n=t[0],r=t[1],v.result.lastPlugin=n,a.label=1;case 1:return a.trys.push([1,6,,7]),"document"!==s.type?[3,3]:(i=s.nodes.map(function(t){return r(t,e.helpers)}),[4,Promise.all(i)]);case 2:return a.sent(),[3,5];case 3:return[4,r(s,v.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw o=a.sent(),v.handleError(o);case 7:return[2]}})},m=this.listeners.OnceExit[Symbol.iterator](),_.label=16;case 16:return(d=(b=m.next()).done)?[3,19]:(v=this,[5,_ts_values(y())]);case 17:_.sent(),_.label=18;case 18:return d=!0,[3,16];case 19:return[3,22];case 20:return w=_.sent(),f=!0,h=w,[3,22];case 21:try{d||null==m.return||m.return()}finally{if(f)throw h}return[7];case 22:return this.processed=!0,[2,this.stringify()]}})}).call(this)}},{key:"runOnRoot",value:function(e){var t=this;this.result.lastPlugin=e;try{if("object"===(void 0===e?"undefined":_type_of(e))&&e.Once){if("document"===this.result.root.type){var n=this.result.root.nodes.map(function(n){return e.Once(n,t.helpers)});return p(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}},{key:"stringify",value:function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=i;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new r(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();var e=!0,n=!1,r=void 0;try{for(var i,o=this.plugins[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var s=i.value;if(p(this.runOnRoot(s)))throw this.getAsyncError()}}catch(e){n=!0,r=e}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}if(this.prepareVisitors(),this.hasListener){for(var a=this.result.root;!a[t];)a[t]=!0,this.walkSync(a);if(this.listeners.OnceExit)if("document"===a.type){var u=!0,l=!1,c=void 0;try{for(var d,f=a.nodes[Symbol.iterator]();!(u=(d=f.next()).done);u=!0){var h=d.value;this.visitSync(this.listeners.OnceExit,h)}}catch(e){l=!0,c=e}finally{try{u||null==f.return||f.return()}finally{if(l)throw c}}}else this.visitSync(this.listeners.OnceExit,a)}return this.result}},{key:"then",value:function(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||a("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=_sliced_to_array(o.value,2),u=a[0],l=a[1];this.result.lastPlugin=u;var c=void 0;try{c=l(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(p(c))throw this.getAsyncError()}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"visitTick",value:function(e){var n=e[e.length-1],r=n.node,i=n.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&n.visitorIndex<i.length){var o=_sliced_to_array(i[n.visitorIndex],2),s=o[0],a=o[1];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==n.iterator){for(var u,l=n.iterator;u=r.nodes[r.indexes[l]];)if(r.indexes[l]+=1,!u[t])return u[t]=!0,void e.push(g(u));n.iterator=0,delete r.indexes[l]}for(var c=n.events;n.eventIndex<c.length;){var d=c[n.eventIndex];if(n.eventIndex+=1,0===d)return void(r.nodes&&r.nodes.length&&(r[t]=!0,n.iterator=r.getIterator()));if(this.listeners[d])return void(n.visitors=this.listeners[d])}e.pop()}else e.pop()}},{key:"walkSync",value:function(e){var n=this;e[t]=!0;var r=v(e),i=!0,o=!1,s=void 0;try{for(var a,u=r[Symbol.iterator]();!(i=(a=u.next()).done);i=!0){var l=a.value;if(0===l)e.nodes&&e.each(function(e){e[t]||n.walkSync(e)});else{var c=this.listeners[l];if(c&&this.visitSync(c,e.toProxy()))return}}}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}}},{key:"warnings",value:function(){return this.sync().warnings()}},{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e}();return b.registerPostcss=function(e){m=e},tw=b,b.default=b,c.registerLazyResult(b),s.registerLazyResult(b),tw},ls=function(){if(sw)return ow;sw=1;var e=function(){if(iw)return rw;iw=1;var e=$o(),t=Wo(),n=Zo(),r=as(),i=ts(),o=function(){function o(n,r,s){var a;_class_call_check(this,o),r=r.toString(),this.stringified=!1,this._processor=n,this._css=r,this._opts=s,this._map=void 0;var u=t;this.result=new i(this._processor,a,this._opts),this.result.css=r;var l=this;Object.defineProperty(this.result,"root",{get:function(){return l.root}});var c=new e(u,a,this._opts,r);if(c.isMap()){var d=_sliced_to_array(c.generate(),2),f=d[0],h=d[1];f&&(this.result.css=f),h&&(this.result.map=h)}else c.clearAnnotation(),this.result.css=c.css}return _create_class(o,[{key:"async",value:function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}},{key:"catch",value:function(e){return this.async().catch(e)}},{key:"finally",value:function(e){return this.async().then(e,e)}},{key:"sync",value:function(){if(this.error)throw this.error;return this.result}},{key:"then",value:function(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}},{key:"toString",value:function(){return this._css}},{key:"warnings",value:function(){return[]}},{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),o}();return rw=o,o.default=o,rw}(),t=us(),n=Xo(),r=rs(),i=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];_class_call_check(this,n),this.version="8.4.38",this.plugins=this.normalize(e)}return _create_class(n,[{key:"normalize",value:function(e){var t=[],n=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;if(!0===a.postcss?a=a():a.postcss&&(a=a.postcss),"object"===(void 0===a?"undefined":_type_of(a))&&Array.isArray(a.plugins))t=t.concat(a.plugins);else if("object"===(void 0===a?"undefined":_type_of(a))&&a.postcssPlugin)t.push(a);else if("function"==typeof a)t.push(a);else{if("object"!==(void 0===a?"undefined":_type_of(a))||!a.parse&&!a.stringify)throw new Error(a+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}return t}},{key:"process",value:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.plugins.length||r.parser||r.stringifier||r.syntax?new t(this,n,r):new e(this,n,r)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),n}();return ow=i,i.default=i,r.registerProcessor(i),n.registerProcessor(i),ow},cs=function(){if(cw)return lw;cw=1;var e=qo(),t=Go(),n=us(),r=Yo(),i=ls(),o=Wo(),s=function(){if(uw)return aw;uw=1;var e=Go(),t=Ko(),n=Qo(),r=ns(),i=Jo(),o=rs(),s=os();function a(u,l){if(Array.isArray(u))return u.map(function(e){return a(e)});var c=u.inputs,d=_object_without_properties(u,["inputs"]);if(c){l=[];var f=!0,h=!1,p=void 0;try{for(var v,g=c[Symbol.iterator]();!(f=(v=g.next()).done);f=!0){var y=_object_spread_props(_object_spread({},v.value),{__proto__:i.prototype});y.map&&(y.map=_object_spread_props(_object_spread({},y.map),{__proto__:t.prototype})),l.push(y)}}catch(e){h=!0,p=e}finally{try{f||null==g.return||g.return()}finally{if(h)throw p}}}if(d.nodes&&(d.nodes=u.nodes.map(function(e){return a(e,l)})),d.source){var m=d.source,b=m.inputId,w=_object_without_properties(m,["inputId"]);d.source=w,null!=b&&(d.source.input=l[b])}if("root"===d.type)return new o(d);if("decl"===d.type)return new e(d);if("rule"===d.type)return new s(d);if("comment"===d.type)return new n(d);if("atrule"===d.type)return new r(d);throw new Error("Unknown node type: "+u.type)}return aw=a,a.default=a,aw}(),a=Xo(),u=es(),l=Qo(),c=ns(),d=ts(),f=Jo(),h=as(),p=is(),v=os(),g=rs(),y=Ho();function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new i(t)}return m.plugin=function(e,t){var n,r=!1;function o(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var a=t.apply(void 0,_to_consumable_array(o));return a.postcssPlugin=e,a.postcssVersion=(new i).version,a}return Object.defineProperty(o,"postcss",{get:function(){return n||(n=o()),n}}),o.process=function(e,t,n){return m([o(n)]).process(e,t)},o},m.stringify=o,m.parse=h,m.fromJSON=s,m.list=p,m.comment=function(e){return new l(e)},m.atRule=function(e){return new c(e)},m.decl=function(e){return new t(e)},m.rule=function(e){return new v(e)},m.root=function(e){return new g(e)},m.document=function(e){return new a(e)},m.CssSyntaxError=e,m.Declaration=t,m.Container=r,m.Processor=i,m.Document=a,m.Comment=l,m.Warning=u,m.AtRule=c,m.Result=d,m.Input=f,m.Rule=v,m.Root=g,m.Node=y,n.registerPostcss(m),lw=m,m.default=m,lw},ds=function(){if(Sw)return _w;Sw=1;var e=function(){if(yw)return gw.exports;yw=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return gw.exports=t(),gw.exports.createColors=t,gw.exports}(),t=ww,n=function(){function n(e,t,r,i,o,s){var a;return _class_call_check(this,n),(a=_call_super(this,n,[e])).name="CssSyntaxError",a.reason=e,o&&(a.file=o),i&&(a.source=i),s&&(a.plugin=s),void 0!==t&&void 0!==r&&("number"==typeof t?(a.line=t,a.column=r):(a.line=t.line,a.column=t.column,a.endLine=r.line,a.endColumn=r.column)),a.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(a,n),a}return _inherits(n,_wrap_native_super(Error)),_create_class(n,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(n){var r=this;if(!this.source)return"";var i=this.source;null==n&&(n=e.isColorSupported),t&&n&&(i=t(i));var o,s,a=i.split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),c=String(l).length;if(n){var d=e.createColors(!0),f=d.bold,h=d.gray,p=d.red;o=function(e){return f(p(e))},s=function(e){return h(e)}}else o=s=function(e){return e};return a.slice(u,l).map(function(e,t){var n=u+1+t,i=" "+(" "+n).slice(-c)+" | ";if(n===r.line){var a=s(i.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," ");return o(">")+s(i)+e+"\n "+a+o("^")}return" "+s(i)+e}).join("\n")}},{key:"toString",value:function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}]),n}();return _w=n,n.default=n,_w},fs=function(){return xw||(xw=1,kw.isClean=Symbol("isClean"),kw.my=Symbol("my")),kw},hs=function(){if(Cw)return Ew;Cw=1;var e={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var t=function(){function t(e){_class_call_check(this,t),this.builder=e}return _create_class(t,[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{var i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}}},{key:"beforeAfter",value:function(e,t){var n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var s=0;s<i;s++)n+=o}return n}},{key:"block",value:function(e,t){var n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}},{key:"body",value:function(e){for(var t=e.nodes.length-1;t>0&&"comment"===e.nodes[t].type;)t-=1;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}},{key:"comment",value:function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}},{key:"decl",value:function(e,t){var n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}},{key:"document",value:function(e){this.body(e)}},{key:"raw",value:function(t,n,r){var i;if(r||(r=n),n&&void 0!==(i=t.raws[n]))return i;var o=t.parent;if("before"===r){if(!o||"root"===o.type&&o.first===t)return"";if(o&&"document"===o.type)return""}if(!o)return e[r];var s=t.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[r])return s.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var a,u="raw"+((a=r)[0].toUpperCase()+a.slice(1));return this[u]?i=this[u](s,t):s.walk(function(e){if(void 0!==(i=e.raws[n]))return!1}),void 0===i&&(i=e[r]),s.rawCache[r]=i,i}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}},{key:"rawBeforeComment",value:function(e,t){var n;return e.walkComments(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}},{key:"rawBeforeDecl",value:function(e,t){var n;return e.walkDecls(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}},{key:"rawBeforeOpen",value:function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}},{key:"rawBeforeRule",value:function(e){var t;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return(t=n.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}},{key:"rawColon",value:function(e){var t;return e.walkDecls(function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}},{key:"rawEmptyBody",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}},{key:"rawIndent",value:function(e){return e.raws.indent?e.raws.indent:(e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){var i=n.raws.before.split("\n");return t=(t=i[i.length-1]).replace(/\S/g,""),!1}}),t);var t}},{key:"rawSemicolon",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}},{key:"rawValue",value:function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}},{key:"root",value:function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}},{key:"rule",value:function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}},{key:"stringify",value:function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}]),t}();return Ew=t,t.default=t,Ew},ps=function(){if(Ow)return Iw;Ow=1;var e=hs();function t(t,n){new e(n).stringify(t)}return Iw=t,t.default=t,Iw},vs=function(){if(Aw)return Tw;Aw=1;var e=fs(),t=e.isClean,n=e.my,r=ds(),i=hs(),o=ps();function s(e,t){var n=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){var i=e[r],o=void 0===i?"undefined":_type_of(i);"parent"===r&&"object"===o?t&&(n[r]=t):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map(function(e){return s(e,n)}):("object"===o&&null!==i&&(i=s(i)),n[r]=i)}return n}var a=function(){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var i in _class_call_check(this,e),this.raws={},this[t]=!1,this[n]=!0,r)if("nodes"===i){this.nodes=[];var o=!0,s=!1,a=void 0;try{for(var u,l=r[i][Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;"function"==typeof c.clone?this.append(c.clone()):this.append(c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}}else this[i]=r[i]}return _create_class(e,[{key:"addToError",value:function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))}return e}},{key:"after",value:function(e){return this.parent.insertAfter(this,e),this}},{key:"assign",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e)this[t]=e[t];return this}},{key:"before",value:function(e){return this.parent.insertBefore(this,e),this}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=s(this);for(var n in e)t[n]=e[n];return t}},{key:"cloneAfter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertAfter(this,t),t}},{key:"cloneBefore",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertBefore(this,t),t}},{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.source){var n=this.rangeBy(t),i=n.end,o=n.start;return this.source.input.error(e,{column:o.column,line:o.line},{column:i.column,line:i.line},t)}return new r(e)}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0}}}},{key:"markDirty",value:function(){if(this[t]){this[t]=!1;for(var e=this;e=e.parent;)e[t]=!1}}},{key:"next",value:function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}}},{key:"positionBy",value:function(e,t){var n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){var r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n}},{key:"positionInside",value:function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?(r=1,i+=1):r+=1;return{column:r,line:i}}},{key:"prev",value:function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}}},{key:"rangeBy",value:function(e){var t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var r=this.toString(),i=r.indexOf(e.word);-1!==i&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}},{key:"raw",value:function(e,t){return(new i).raw(this,e,t)}},{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"replaceWith",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this.parent){var r=this,i=!1,o=!0,s=!1,a=void 0;try{for(var u,l=t[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;c===this?i=!0:i?(this.parent.insertAfter(r,c),r=c):this.parent.insertBefore(r,c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}i||this.remove()}return this}},{key:"root",value:function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}},{key:"toJSON",value:function(e,t){var n={},r=null==t;t=t||new Map;var i=0;for(var o in this)if(Object.prototype.hasOwnProperty.call(this,o)&&"parent"!==o&&"proxyCache"!==o){var s=this[o];if(Array.isArray(s))n[o]=s.map(function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&e.toJSON?e.toJSON(null,t):e});else if("object"===(void 0===s?"undefined":_type_of(s))&&s.toJSON)n[o]=s.toJSON(null,t);else if("source"===o){var a=t.get(s.input);null==a&&(a=i,t.set(s.input,i),i++),n[o]={end:s.end,inputId:a,start:s.start}}else n[o]=s}return r&&(n.inputs=_to_consumable_array(t.keys()).map(function(e){return e.toJSON()})),n}},{key:"toProxy",value:function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;e.stringify&&(e=e.stringify);var t="";return e(this,function(e){t+=e}),t}},{key:"warn",value:function(e,t,n){var r={node:this};for(var i in n)r[i]=n[i];return e.warn(t,r)}},{key:"proxyOf",get:function(){return this}}]),e}();return Tw=a,a.default=a,Tw},gs=function(){if(Pw)return Rw;Pw=1;var e=function(e){function t(e){var n;return _class_call_check(this,t),e&&void 0!==e.value&&"string"!=typeof e.value&&(e=_object_spread_props(_object_spread({},e),{value:String(e.value)})),(n=_call_super(this,t,[e])).type="decl",n}return _inherits(t,e),_create_class(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),t}(vs());return Rw=e,e.default=e,Rw},ys=function(){if(jw)return Lw;jw=1;var e=ww.SourceMapConsumer,t=ww.SourceMapGenerator,n=ww.existsSync,r=ww.readFileSync,i=ww.dirname,o=ww.join;var s=function(){function s(e,t){if(_class_call_check(this,s),!1!==t.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),r&&(this.text=r)}}return _create_class(s,[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}},{key:"decodeInline",value:function(e){var t;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}},{key:"getAnnotationURL",value:function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}},{key:"loadAnnotation",value:function(e){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(t){var n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}}},{key:"loadFile",value:function(e){if(this.root=i(e),n(e))return this.mapFile=e,r(e,"utf-8").toString().trim()}},{key:"loadMap",value:function(n,r){if(!1===r)return!1;if(r){if("string"==typeof r)return r;if("function"!=typeof r){if(_instanceof(r,e))return t.fromSourceMap(r).toString();if(_instanceof(r,t))return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}var s=r(n);if(s){var a=this.loadFile(s);if(!a)throw new Error("Unable to load previous source map: "+s.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var u=this.annotation;return n&&(u=o(i(n),u)),this.loadFile(u)}}}},{key:"startWith",value:function(e,t){return!!e&&e.substr(0,t.length)===t}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}]),s}();return Lw=s,s.default=s,Lw},ms=function(){if(Uw)return Dw;Uw=1;var e=ww.SourceMapConsumer,t=ww.SourceMapGenerator,n=ww.fileURLToPath,r=ww.pathToFileURL,i=ww.isAbsolute,o=ww.resolve,s=(Nw||(Nw=1,Mw={nanoid:function(){for(var e="",t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21;return function(){for(var n="",r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t;r--;)n+=e[Math.random()*e.length|0];return n}}}),Mw).nanoid,a=ww,u=ds(),l=ys(),c=Symbol("fromOffsetCache"),d=Boolean(e&&t),f=Boolean(o&&i),h=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_class_call_check(this,e),null==t||"object"===(void 0===t?"undefined":_type_of(t))&&!t.toString)throw new Error("PostCSS received ".concat(t," instead of CSS string"));if(this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!f||/^\w+:\/\//.test(n.from)||i(n.from)?this.file=n.from:this.file=o(n.from)),f&&d){var r=new l(this.css,n);if(r.text){this.map=r;var a=r.consumer().file;!this.file&&a&&(this.file=this.mapResolve(a))}}this.file||(this.id="<input css "+s(6)+">"),this.map&&(this.map.file=this.from)}return _create_class(e,[{key:"error",value:function(e,t,n){var i,o,s,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(t&&"object"===(void 0===t?"undefined":_type_of(t))){var l=t,c=n;if("number"==typeof l.offset){var d=this.fromOffset(l.offset);t=d.line,n=d.col}else t=l.line,n=l.column;if("number"==typeof c.offset){var f=this.fromOffset(c.offset);o=f.line,s=f.col}else o=c.line,s=c.column}else if(!n){var h=this.fromOffset(t);t=h.line,n=h.col}var p=this.origin(t,n,o,s);return(i=p?new u(e,void 0===p.endLine?p.line:{column:p.column,line:p.line},void 0===p.endLine?p.column:{column:p.endColumn,line:p.endLine},p.source,p.file,a.plugin):new u(e,void 0===o?t:{column:n,line:t},void 0===o?n:{column:s,line:o},this.css,this.file,a.plugin)).input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(r&&(i.input.url=r(this.file).toString()),i.input.file=this.file),i}},{key:"fromOffset",value:function(e){var t;if(this[c])t=this[c];else{var n=this.css.split("\n");t=new Array(n.length);for(var r=0,i=0,o=n.length;i<o;i++)t[i]=r,r+=n[i].length+1;this[c]=t}var s=0;if(e>=t[t.length-1])s=t.length-1;else for(var a,u=t.length-2;s<u;)if(e<t[a=s+(u-s>>1)])u=a-1;else{if(!(e>=t[a+1])){s=a;break}s=a+1}return{col:e-t[s]+1,line:s+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}},{key:"origin",value:function(e,t,o,s){if(!this.map)return!1;var a,u,l=this.map.consumer(),c=l.originalPositionFor({column:t,line:e});if(!c.source)return!1;"number"==typeof o&&(a=l.originalPositionFor({column:s,line:o})),u=i(c.source)?r(c.source):new URL(c.source,this.map.consumer().sourceRoot||r(this.map.mapFile));var d={column:c.column,endColumn:a&&a.column,endLine:a&&a.line,line:c.line,url:u.toString()};if("file:"===u.protocol){if(!n)throw new Error("file: protocol is not available in this PostCSS build");d.file=n(u)}var f=l.sourceContentFor(c.source);return f&&(d.source=f),d}},{key:"toJSON",value:function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=_object_spread({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}},{key:"from",get:function(){return this.file||this.id}}]),e}();return Dw=h,h.default=h,a&&a.registerInput&&a.registerInput(h),Dw},bs=function(){if(Bw)return Fw;Bw=1;var e=ww.SourceMapConsumer,t=ww.SourceMapGenerator,n=ww.dirname,r=ww.relative,i=ww.resolve,o=ww.sep,s=ww.pathToFileURL,a=ms(),u=Boolean(e&&t),l=Boolean(n&&i&&r&&o);return Fw=function(){function c(e,t,n,r){_class_call_check(this,c),this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}return _create_class(c,[{key:"addAnnotation",value:function(){var e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}},{key:"applyPrevMaps",value:function(){var t=!0,r=!1,i=void 0;try{for(var o,s=this.previous()[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){var a=o.value,u=this.toUrl(this.path(a.file)),l=a.root||n(a.file),c=void 0;!1===this.mapOpts.sourcesContent?(c=new e(a.text)).sourcesContent&&(c.sourcesContent=null):c=a.consumer(),this.map.applySourceMap(c,u,this.toUrl(this.path(l)))}}catch(e){r=!0,i=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}},{key:"generate",value:function(){if(this.clearAnnotation(),l&&u&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]}},{key:"generateMap",value:function(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var e=this;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});var n,r,i=1,o=1,s="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(t,u,l){if(e.css+=t,u&&"end"!==l&&(a.generated.line=i,a.generated.column=o-1,u.source&&u.source.start?(a.source=e.sourcePath(u),a.original.line=u.source.start.line,a.original.column=u.source.start.column-1,e.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,e.map.addMapping(a))),(n=t.match(/\n/g))?(i+=n.length,r=t.lastIndexOf("\n"),o=t.length-r):o+=t.length,u&&"start"!==l){var c=u.parent||{raws:{}};("decl"===u.type||"atrule"===u.type&&!u.nodes)&&u===c.last&&!c.raws.semicolon||(u.source&&u.source.end?(a.source=e.sourcePath(u),a.original.line=u.source.end.line,a.original.column=u.source.end.column-1,a.generated.line=i,a.generated.column=o-2,e.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,a.generated.line=i,a.generated.column=o-1,e.map.addMapping(a)))}})}},{key:"isAnnotation",value:function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))}},{key:"isMap",value:function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}},{key:"isSourcesContent",value:function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var o=this.opts.to?n(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=n(i(o,this.mapOpts.annotation)));var s=r(o,e);return this.memoizedPaths.set(e,s),s}},{key:"previous",value:function(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;e.previousMaps.includes(n)||e.previousMaps.push(n)}});else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}},{key:"setSourcesContent",value:function(){var e=this,t={};if(this.root)this.root.walk(function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.usesFileUrls?e.toFileUrl(r):e.toUrl(e.path(r));e.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){var n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}},{key:"sourcePath",value:function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}},{key:"toBase64",value:function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}},{key:"toFileUrl",value:function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(s){var n=s(e).toString();return this.memoizedFileURLs.set(e,n),n}throw new Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));var n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}}]),c}()},ws=function(){if(zw)return qw;zw=1;var e=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t,[e])).type="comment",n}return _inherits(t,e),t}(vs());return qw=e,e.default=e,qw},_s=function(){if(Ww)return Vw;Ww=1;var e,t,n,r,i=fs(),o=i.isClean,s=i.my,a=gs(),u=ws();function l(e){return e.map(function(e){return e.nodes&&(e.nodes=l(e.nodes)),delete e.source,e})}function c(e){if(e[o]=!1,e.proxyOf.nodes){var t=!0,n=!1,r=void 0;try{for(var i,s=e.proxyOf.nodes[Symbol.iterator]();!(t=(i=s.next()).done);t=!0){c(i.value)}}catch(e){n=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(n)throw r}}}}var d=function(r){function i(){return _class_call_check(this,i),_call_super(this,i,arguments)}return _inherits(i,r),_create_class(i,[{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value,l=this.normalize(u,this.last),c=!0,d=!1,f=void 0;try{for(var h,p=l[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;this.proxyOf.nodes.push(v)}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if(_get(_get_prototype_of(i.prototype),"cleanRaws",this).call(this,e),this.nodes){var t=!0,n=!1,r=void 0;try{for(var o,s=this.nodes[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){o.value.cleanRaws(e)}}catch(e){n=!0,r=e}finally{try{t||null==s.return||s.return()}finally{if(n)throw r}}}}},{key:"each",value:function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"getIterator",value:function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o;return(o=e)[t].apply(o,_to_consumable_array(r.map(function(e){return"function"==typeof e?function(t,n){return e(t.toProxy(),n)}:e})))}:"every"===t||"some"===t?function(n){return e[t](function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return n.apply(void 0,[e.toProxy()].concat(_to_consumable_array(r)))})}:"root"===t?function(){return e.root().toProxy()}:"nodes"===t?e.nodes.map(function(e){return e.toProxy()}):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0}}}},{key:"index",value:function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}},{key:"insertAfter",value:function(e,t){var n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);var i,o=!0,s=!1,a=void 0;try{for(var u,l=r[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=u.value;this.proxyOf.nodes.splice(n+1,0,c)}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}for(var d in this.indexes)n<(i=this.indexes[d])&&(this.indexes[d]=i+r.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n=this.index(e),r=0===n&&"prepend",i=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);var o,s=!0,a=!1,u=void 0;try{for(var l,c=i[Symbol.iterator]();!(s=(l=c.next()).done);s=!0){var d=l.value;this.proxyOf.nodes.splice(n,0,d)}}catch(e){a=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(a)throw u}}for(var f in this.indexes)n<=(o=this.indexes[f])&&(this.indexes[f]=o+i.length);return this.markDirty(),this}},{key:"normalize",value:function(r,d){var f=this;if("string"==typeof r)r=l(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r)){r=r.slice(0);var h=!0,p=!1,v=void 0;try{for(var g,y=r[Symbol.iterator]();!(h=(g=y.next()).done);h=!0){var m=g.value;m.parent&&m.parent.removeChild(m,"ignore")}}catch(e){p=!0,v=e}finally{try{h||null==y.return||y.return()}finally{if(p)throw v}}}else if("root"===r.type&&"document"!==this.type){r=r.nodes.slice(0);var b=!0,w=!1,_=void 0;try{for(var S,k=r[Symbol.iterator]();!(b=(S=k.next()).done);b=!0){var x=S.value;x.parent&&x.parent.removeChild(x,"ignore")}}catch(e){w=!0,_=e}finally{try{b||null==k.return||k.return()}finally{if(w)throw _}}}else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new a(r)]}else if(r.selector)r=[new t(r)];else if(r.name)r=[new n(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new u(r)]}var E=r.map(function(e){return e[s]||i.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[o]&&c(e),void 0===e.raws.before&&d&&void 0!==d.raws.before&&(e.raws.before=d.raws.before.replace(/\S/g,"")),e.parent=f.proxyOf,e});return E}},{key:"prepend",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.reverse();var r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value,l=this.normalize(u,this.first,"prepend").reverse(),c=!0,d=!1,f=void 0;try{for(var h,p=l[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;this.proxyOf.nodes.unshift(v)}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}for(var g in this.indexes)this.indexes[g]=this.indexes[g]+l.length}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return this.markDirty(),this}},{key:"push",value:function(e){return e.parent=this,this.proxyOf.nodes.push(e),this}},{key:"removeAll",value:function(){var e=!0,t=!1,n=void 0;try{for(var r,i=this.proxyOf.nodes[Symbol.iterator]();!(e=(r=i.next()).done);e=!0){r.value.parent=void 0}}catch(e){t=!0,n=e}finally{try{e||null==i.return||i.return()}finally{if(t)throw n}}return this.proxyOf.nodes=[],this.markDirty(),this}},{key:"removeChild",value:function(e){var t;for(var n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}},{key:"replaceValues",value:function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"walk",value:function(e){return this.each(function(t,n){var r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}},{key:"walkAtRules",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("atrule"===e.type)return t(e,n)}))}},{key:"walkComments",value:function(e){return this.walk(function(t,n){if("comment"===t.type)return e(t,n)})}},{key:"walkDecls",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("decl"===e.type)return t(e,n)}))}},{key:"walkRules",value:function(e,t){return t?_instanceof(e,RegExp)?this.walk(function(n,r){if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("rule"===e.type)return t(e,n)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),i}(vs());return d.registerParse=function(t){e=t},d.registerRule=function(e){t=e},d.registerAtRule=function(e){n=e},d.registerRoot=function(e){r=e},Vw=d,d.default=d,d.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,n.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,a.prototype):"comment"===e.type?Object.setPrototypeOf(e,u.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[s]=!0,e.nodes&&e.nodes.forEach(function(e){d.rebuild(e)})},Vw},Ss=function(){if(Gw)return Hw;Gw=1;var e,t,n=function(n){function r(e){var t;return _class_call_check(this,r),(t=_call_super(this,r,[_object_spread({type:"document"},e)])).nodes||(t.nodes=[]),t}return _inherits(r,n),_create_class(r,[{key:"toResult",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(new t,this,n).stringify()}}]),r}(_s());return n.registerLazyResult=function(t){e=t},n.registerProcessor=function(e){t=e},Hw=n,n.default=n,Hw},ks=function(){if(Jw)return Kw;Jw=1;var e={};return Kw=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}},xs=function(){if(Qw)return $w;Qw=1;var e=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_class_call_check(this,e),this.type="warning",this.text=t,n.node&&n.node.source){var r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in n)this[i]=n[i]}return _create_class(e,[{key:"toString",value:function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),e}();return $w=e,e.default=e,$w},Es=function(){if(Xw)return Yw;Xw=1;var e=xs(),t=function(){function t(e,n,r){_class_call_check(this,t),this.processor=e,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}return _create_class(t,[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);var r=new e(t,n);return this.messages.push(r),r}},{key:"warnings",value:function(){return this.messages.filter(function(e){return"warning"===e.type})}},{key:"content",get:function(){return this.css}}]),t}();return Yw=t,t.default=t,Yw},Cs=function(){if(n_)return t_;n_=1;var e=_s(),t=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t,[e])).type="atrule",n}return _inherits(t,e),_create_class(t,[{key:"append",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=_get(_get_prototype_of(t.prototype),"append",this)).call.apply(i,[this].concat(_to_consumable_array(n)))}},{key:"prepend",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=_get(_get_prototype_of(t.prototype),"prepend",this)).call.apply(i,[this].concat(_to_consumable_array(n)))}}]),t}(e);return t_=t,t.default=t,e.registerAtRule(t),t_},Is=function(){if(i_)return r_;i_=1;var e,t,n=_s(),r=function(n){function r(e){var t;return _class_call_check(this,r),(t=_call_super(this,r,[e])).type="root",t.nodes||(t.nodes=[]),t}return _inherits(r,n),_create_class(r,[{key:"normalize",value:function(e,t,n){var i=_get(_get_prototype_of(r.prototype),"normalize",this).call(this,e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t){var o=!0,s=!1,a=void 0;try{for(var u,l=i[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){u.value.raws.before=t.raws.before}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}}return i}},{key:"removeChild",value:function(e,t){var n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),_get(_get_prototype_of(r.prototype),"removeChild",this).call(this,e)}},{key:"toResult",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new e(new t,this,n).stringify()}}]),r}(n);return r.registerLazyResult=function(t){e=t},r.registerProcessor=function(e){t=e},r_=r,r.default=r,n.registerRoot(r),r_},Os=function(){if(s_)return o_;s_=1;var e={comma:function(t){return e.split(t,[","],!0)},space:function(t){return e.split(t,[" ","\n","\t"])},split:function(e,t,n){var r=[],i="",o=!1,s=0,a=!1,u="",l=!1,c=!0,d=!1,f=void 0;try{for(var h,p=e[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value;l?l=!1:"\\"===v?l=!0:a?v===u&&(a=!1):'"'===v||"'"===v?(a=!0,u=v):"("===v?s+=1:")"===v?s>0&&(s-=1):0===s&&t.includes(v)&&(o=!0),o?(""!==i&&r.push(i.trim()),i="",o=!1):i+=v}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}return(n||""!==i)&&r.push(i.trim()),r}};return o_=e,e.default=e,o_},Ts=function(){if(u_)return a_;u_=1;var e=_s(),t=Os(),n=function(e){function n(e){var t;return _class_call_check(this,n),(t=_call_super(this,n,[e])).type="rule",t.nodes||(t.nodes=[]),t}return _inherits(n,e),_create_class(n,[{key:"selectors",get:function(){return t.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}]),n}(e);return a_=n,n.default=n,e.registerRule(n),a_},As=function(){if(c_)return l_;c_=1;var e=gs(),t=function(){if(e_)return Zw;e_=1;var e="'".charCodeAt(0),t='"'.charCodeAt(0),n="\\".charCodeAt(0),r="/".charCodeAt(0),i="\n".charCodeAt(0),o=" ".charCodeAt(0),s="\f".charCodeAt(0),a="\t".charCodeAt(0),u="\r".charCodeAt(0),l="[".charCodeAt(0),c="]".charCodeAt(0),d="(".charCodeAt(0),f=")".charCodeAt(0),h="{".charCodeAt(0),p="}".charCodeAt(0),v=";".charCodeAt(0),g="*".charCodeAt(0),y=":".charCodeAt(0),m="@".charCodeAt(0),b=/[\t\n\f\r "#'()/;[\\\]{}]/g,w=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return Zw=function(k){var x,E,C,I,O,T,A,R,P,M,N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},L=k.css.valueOf(),j=N.ignoreErrors,D=L.length,U=0,F=[],B=[];function q(e){throw k.error("Unclosed "+e,U)}return{back:function(e){B.push(e)},endOfFile:function(){return 0===B.length&&U>=D},nextToken:function(k){if(B.length)return B.pop();if(!(U>=D)){var N=!!k&&k.ignoreUnclosed;switch(x=L.charCodeAt(U)){case i:case o:case a:case u:case s:E=U;do{E+=1,x=L.charCodeAt(E)}while(x===o||x===i||x===a||x===u||x===s);M=["space",L.slice(U,E)],U=E-1;break;case l:case c:case h:case p:case y:case v:case f:var z=String.fromCharCode(x);M=[z,z,U];break;case d:if(R=F.length?F.pop()[1]:"",P=L.charCodeAt(U+1),"url"===R&&P!==e&&P!==t&&P!==o&&P!==i&&P!==a&&P!==s&&P!==u){E=U;do{if(T=!1,-1===(E=L.indexOf(")",E+1))){if(j||N){E=U;break}q("bracket")}for(A=E;L.charCodeAt(A-1)===n;)A-=1,T=!T}while(T);M=["brackets",L.slice(U,E+1),U,E],U=E}else E=L.indexOf(")",U+1),I=L.slice(U,E+1),-1===E||_.test(I)?M=["(","(",U]:(M=["brackets",I,U,E],U=E);break;case e:case t:C=x===e?"'":'"',E=U;do{if(T=!1,-1===(E=L.indexOf(C,E+1))){if(j||N){E=U+1;break}q("string")}for(A=E;L.charCodeAt(A-1)===n;)A-=1,T=!T}while(T);M=["string",L.slice(U,E+1),U,E],U=E;break;case m:b.lastIndex=U+1,b.test(L),E=0===b.lastIndex?L.length-1:b.lastIndex-2,M=["at-word",L.slice(U,E+1),U,E],U=E;break;case n:for(E=U,O=!0;L.charCodeAt(E+1)===n;)E+=1,O=!O;if(x=L.charCodeAt(E+1),O&&x!==r&&x!==o&&x!==i&&x!==a&&x!==u&&x!==s&&(E+=1,S.test(L.charAt(E)))){for(;S.test(L.charAt(E+1));)E+=1;L.charCodeAt(E+1)===o&&(E+=1)}M=["word",L.slice(U,E+1),U,E],U=E;break;default:x===r&&L.charCodeAt(U+1)===g?(0===(E=L.indexOf("*/",U+2)+1)&&(j||N?E=L.length:q("comment")),M=["comment",L.slice(U,E+1),U,E],U=E):(w.lastIndex=U+1,w.test(L),E=0===w.lastIndex?L.length-1:w.lastIndex-2,M=["word",L.slice(U,E+1),U,E],F.push(M),U=E)}return U++,M}},position:function(){return U}}},Zw}(),n=ws(),r=Cs(),i=Is(),o=Ts(),s={empty:!0,space:!0};return l_=function(){function a(e){_class_call_check(this,a),this.input=e,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}return _create_class(a,[{key:"atrule",value:function(e){var t,n,i,o=new r;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);for(var s=!1,a=!1,u=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(u.length>0){for(n=u[i=u.length-1];n&&"space"===n[0];)n=u[--i];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(e);break}u.push(e)}else u.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(o.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(o,"params",u),s&&(e=u[u.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}},{key:"checkMissedSemicolon",value:function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;i>=0&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},{key:"colon",value:function(e){var t,n,r,i=0,o=!0,s=!1,a=void 0;try{for(var u,l=e.entries()[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var c=_sliced_to_array(u.value,2),d=c[0];if("("===(n=(t=c[1])[0])&&(i+=1),")"===n&&(i-=1),0===i&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return d}this.doubleColon(t)}r=t}}catch(e){s=!0,a=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw a}}return!1}},{key:"comment",value:function(e){var t=new n;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{var i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}},{key:"createTokenizer",value:function(){this.tokenizer=t(this.input)}},{key:"decl",value:function(t,n){var r=new e;this.init(r,t[0][2]);var i,o=t[t.length-1];for(";"===o[0]&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(o[3]||o[2]||function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=n[3]||n[2];if(r)return r}}(t)),r.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){var s=t[0][0];if(":"===s||"space"===s||"comment"===s)break;r.prop+=t.shift()[1]}for(r.raws.between="";t.length;){if(":"===(i=t.shift())[0]){r.raws.between+=i[1];break}"word"===i[0]&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));for(var a,u=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)u.push(t.shift());this.precheckMissedSemicolon(t);for(var l=t.length-1;l>=0;l--){if("!important"===(i=t[l])[1].toLowerCase()){r.important=!0;var c=this.stringFrom(t,l);" !important"!==(c=this.spacesFromEnd(t)+c)&&(r.raws.important=c);break}if("important"===i[1].toLowerCase()){for(var d=t.slice(0),f="",h=l;h>0;h--){var p=d[h][0];if(0===f.trim().indexOf("!")&&"space"!==p)break;f=d.pop()[1]+f}0===f.trim().indexOf("!")&&(r.important=!0,r.raws.important=f,t=d)}if("space"!==i[0]&&"comment"!==i[0])break}var v=t.some(function(e){return"space"!==e[0]&&"comment"!==e[0]});v&&(r.raws.between+=u.map(function(e){return e[1]}).join(""),u=[]),this.raw(r,"value",u.concat(t),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}},{key:"doubleColon",value:function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}},{key:"emptyRule",value:function(e){var t=new o;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}},{key:"end",value:function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}},{key:"endFile",value:function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}},{key:"freeSemicolon",value:function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}},{key:"getPosition",value:function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}},{key:"init",value:function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}},{key:"other",value:function(e){for(var t=!1,n=null,r=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],u=e;u;){if(n=u[0],a.push(u),"("===n||"["===n)i||(i=u),o.push("("===n?")":"]");else if(s&&r&&"{"===n)i||(i=u),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(a,s);break}if("{"===n)return void this.rule(a);if("}"===n){this.tokenizer.back(a.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!s)for(;a.length&&("space"===(u=a[a.length-1][0])||"comment"===u);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}},{key:"parse",value:function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(e,t,n,r){for(var i,o,a,u,l=n.length,c="",d=!0,f=0;f<l;f+=1)"space"!==(o=(i=n[f])[0])||f!==l-1||r?"comment"===o?(u=n[f-1]?n[f-1][0]:"empty",a=n[f+1]?n[f+1][0]:"empty",s[u]||s[a]||","===c.slice(-1)?d=!1:c+=i[1]):c+=i[1]:d=!1;if(!d){var h=n.reduce(function(e,t){return e+t[1]},"");e.raws[t]={raw:h,value:c}}e[t]=c}},{key:"rule",value:function(e){e.pop();var t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}},{key:"spacesAndCommentsFromEnd",value:function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}},{key:"spacesAndCommentsFromStart",value:function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}},{key:"spacesFromEnd",value:function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}},{key:"stringFrom",value:function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}},{key:"unclosedBlock",value:function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}},{key:"unclosedBracket",value:function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}},{key:"unexpectedClose",value:function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}},{key:"unknownWord",value:function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}},{key:"unnamedAtrule",value:function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}]),a}()},Rs=function(){if(f_)return d_;f_=1;var e=_s(),t=As(),n=ms();function r(e,r){var i=new n(e,r),o=new t(i);try{o.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&r&&r.from&&(/\.scss$/i.test(r.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(r.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(r.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return o.root}return d_=r,r.default=r,e.registerParse(r),d_},Ps=function(){if(p_)return h_;p_=1;var e=fs(),t=e.isClean,n=e.my,r=bs(),i=ps(),o=_s(),s=Ss(),a=ks(),u=Es(),l=Rs(),c=Is(),d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},h={Once:!0,postcssPlugin:!0,prepare:!0};function p(e){return"object"===(void 0===e?"undefined":_type_of(e))&&"function"==typeof e.then}function v(e){var t=!1,n=d[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function g(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:v(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function y(e){return e[t]=!1,e.nodes&&e.nodes.forEach(function(e){return y(e)}),e}var m={},b=function(){function e(t,r,i){var s,a=this;if(_class_call_check(this,e),this.stringified=!1,this.processed=!1,"object"!==(void 0===r?"undefined":_type_of(r))||null===r||"root"!==r.type&&"document"!==r.type)if(_instanceof(r,e)||_instanceof(r,u))s=y(r.root),r.map&&(void 0===i.map&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=r.map);else{var c=l;i.syntax&&(c=i.syntax.parse),i.parser&&(c=i.parser),c.parse&&(c=c.parse);try{s=c(r,i)}catch(e){this.processed=!0,this.error=e}s&&!s[n]&&o.rebuild(s)}else s=y(r);this.result=new u(t,s,i),this.helpers=_object_spread_props(_object_spread({},m),{postcss:m,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&e.prepare?_object_spread({},e,e.prepare(a.result)):e})}return _create_class(e,[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(e){return this.async().catch(e)}},{key:"finally",value:function(e){return this.async().then(e,e)}},{key:"getAsyncError",value:function(){throw new Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(e,t){var n=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(n.postcssVersion&&"production"!==process.env.NODE_ENV){var r=n.postcssPlugin,i=n.postcssVersion,o=this.result.processor.version,s=i.split("."),a=o.split(".");(s[0]!==a[0]||parseInt(s[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+r+" uses "+i+". Perhaps this is the source of the error below.")}}else e.plugin=n.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}},{key:"prepareVisitors",value:function(){var e=this;this.listeners={};var t=function(t,n,r){e.listeners[n]||(e.listeners[n]=[]),e.listeners[n].push([t,r])},n=!0,r=!1,i=void 0;try{for(var o,s=this.plugins[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;if("object"===(void 0===a?"undefined":_type_of(a)))for(var u in a){if(!f[u]&&/^[A-Z]/.test(u))throw new Error("Unknown event ".concat(u," in ").concat(a.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!h[u])if("object"===_type_of(a[u]))for(var l in a[u])t(a,"*"===l?u:u+"-"+l.toLowerCase(),a[u][l]);else"function"==typeof a[u]&&t(a,u,a[u])}}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}this.hasListener=Object.keys(this.listeners).length>0}},{key:"runAsync",value:function(){return _async_to_generator(function(){var e,n,r,i,o,s,a,u,l,c,d,f,h,v,y,m,b,w;return _ts_generator(this,function(_){switch(_.label){case 0:e=this,this.plugin=0,n=0,_.label=1;case 1:if(!(n<this.plugins.length))return[3,6];if(r=this.plugins[n],!p(i=this.runOnRoot(r)))return[3,5];_.label=2;case 2:return _.trys.push([2,4,,5]),[4,i];case 3:return _.sent(),[3,5];case 4:throw o=_.sent(),this.handleError(o);case 5:return n++,[3,1];case 6:if(this.prepareVisitors(),!this.hasListener)return[3,22];s=this.result.root,_.label=7;case 7:if(s[t])return[3,14];s[t]=!0,a=[g(s)],_.label=8;case 8:if(!(a.length>0))return[3,13];if(!p(u=this.visitTick(a)))return[3,12];_.label=9;case 9:return _.trys.push([9,11,,12]),[4,u];case 10:return _.sent(),[3,12];case 11:throw l=_.sent(),c=a[a.length-1].node,this.handleError(l,c);case 12:return[3,8];case 13:return[3,7];case 14:if(!this.listeners.OnceExit)return[3,22];d=!0,f=!1,h=void 0,_.label=15;case 15:_.trys.push([15,20,21,22]),y=function(){var t,n,r,i,o;return _ts_generator(this,function(a){switch(a.label){case 0:t=_sliced_to_array(b.value,2),n=t[0],r=t[1],v.result.lastPlugin=n,a.label=1;case 1:return a.trys.push([1,6,,7]),"document"!==s.type?[3,3]:(i=s.nodes.map(function(t){return r(t,e.helpers)}),[4,Promise.all(i)]);case 2:return a.sent(),[3,5];case 3:return[4,r(s,v.helpers)];case 4:a.sent(),a.label=5;case 5:return[3,7];case 6:throw o=a.sent(),v.handleError(o);case 7:return[2]}})},m=this.listeners.OnceExit[Symbol.iterator](),_.label=16;case 16:return(d=(b=m.next()).done)?[3,19]:(v=this,[5,_ts_values(y())]);case 17:_.sent(),_.label=18;case 18:return d=!0,[3,16];case 19:return[3,22];case 20:return w=_.sent(),f=!0,h=w,[3,22];case 21:try{d||null==m.return||m.return()}finally{if(f)throw h}return[7];case 22:return this.processed=!0,[2,this.stringify()]}})}).call(this)}},{key:"runOnRoot",value:function(e){var t=this;this.result.lastPlugin=e;try{if("object"===(void 0===e?"undefined":_type_of(e))&&e.Once){if("document"===this.result.root.type){var n=this.result.root.nodes.map(function(n){return e.Once(n,t.helpers)});return p(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}},{key:"stringify",value:function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=i;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new r(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();var e=!0,n=!1,r=void 0;try{for(var i,o=this.plugins[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var s=i.value;if(p(this.runOnRoot(s)))throw this.getAsyncError()}}catch(e){n=!0,r=e}finally{try{e||null==o.return||o.return()}finally{if(n)throw r}}if(this.prepareVisitors(),this.hasListener){for(var a=this.result.root;!a[t];)a[t]=!0,this.walkSync(a);if(this.listeners.OnceExit)if("document"===a.type){var u=!0,l=!1,c=void 0;try{for(var d,f=a.nodes[Symbol.iterator]();!(u=(d=f.next()).done);u=!0){var h=d.value;this.visitSync(this.listeners.OnceExit,h)}}catch(e){l=!0,c=e}finally{try{u||null==f.return||f.return()}finally{if(l)throw c}}}else this.visitSync(this.listeners.OnceExit,a)}return this.result}},{key:"then",value:function(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||a("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(e,t){var n=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=_sliced_to_array(o.value,2),u=a[0],l=a[1];this.result.lastPlugin=u;var c=void 0;try{c=l(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(p(c))throw this.getAsyncError()}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}}},{key:"visitTick",value:function(e){var n=e[e.length-1],r=n.node,i=n.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&n.visitorIndex<i.length){var o=_sliced_to_array(i[n.visitorIndex],2),s=o[0],a=o[1];n.visitorIndex+=1,n.visitorIndex===i.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=s;try{return a(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==n.iterator){for(var u,l=n.iterator;u=r.nodes[r.indexes[l]];)if(r.indexes[l]+=1,!u[t])return u[t]=!0,void e.push(g(u));n.iterator=0,delete r.indexes[l]}for(var c=n.events;n.eventIndex<c.length;){var d=c[n.eventIndex];if(n.eventIndex+=1,0===d)return void(r.nodes&&r.nodes.length&&(r[t]=!0,n.iterator=r.getIterator()));if(this.listeners[d])return void(n.visitors=this.listeners[d])}e.pop()}else e.pop()}},{key:"walkSync",value:function(e){var n=this;e[t]=!0;var r=v(e),i=!0,o=!1,s=void 0;try{for(var a,u=r[Symbol.iterator]();!(i=(a=u.next()).done);i=!0){var l=a.value;if(0===l)e.nodes&&e.each(function(e){e[t]||n.walkSync(e)});else{var c=this.listeners[l];if(c&&this.visitSync(c,e.toProxy()))return}}}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}}},{key:"warnings",value:function(){return this.sync().warnings()}},{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e}();return b.registerPostcss=function(e){m=e},h_=b,b.default=b,c.registerLazyResult(b),s.registerLazyResult(b),h_},Ms=function(){if(m_)return y_;m_=1;var e=function(){if(g_)return v_;g_=1;var e=bs(),t=ps(),n=ks(),r=Rs(),i=Es(),o=function(){function o(n,r,s){var a;_class_call_check(this,o),r=r.toString(),this.stringified=!1,this._processor=n,this._css=r,this._opts=s,this._map=void 0;var u=t;this.result=new i(this._processor,a,this._opts),this.result.css=r;var l=this;Object.defineProperty(this.result,"root",{get:function(){return l.root}});var c=new e(u,a,this._opts,r);if(c.isMap()){var d=_sliced_to_array(c.generate(),2),f=d[0],h=d[1];f&&(this.result.css=f),h&&(this.result.map=h)}else c.clearAnnotation(),this.result.css=c.css}return _create_class(o,[{key:"async",value:function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}},{key:"catch",value:function(e){return this.async().catch(e)}},{key:"finally",value:function(e){return this.async().then(e,e)}},{key:"sync",value:function(){if(this.error)throw this.error;return this.result}},{key:"then",value:function(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}},{key:"toString",value:function(){return this._css}},{key:"warnings",value:function(){return[]}},{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),o}();return v_=o,o.default=o,v_}(),t=Ps(),n=Ss(),r=Is(),i=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];_class_call_check(this,n),this.version="8.4.38",this.plugins=this.normalize(e)}return _create_class(n,[{key:"normalize",value:function(e){var t=[],n=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;if(!0===a.postcss?a=a():a.postcss&&(a=a.postcss),"object"===(void 0===a?"undefined":_type_of(a))&&Array.isArray(a.plugins))t=t.concat(a.plugins);else if("object"===(void 0===a?"undefined":_type_of(a))&&a.postcssPlugin)t.push(a);else if("function"==typeof a)t.push(a);else{if("object"!==(void 0===a?"undefined":_type_of(a))||!a.parse&&!a.stringify)throw new Error(a+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}return t}},{key:"process",value:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.plugins.length||r.parser||r.stringifier||r.syntax?new t(this,n,r):new e(this,n,r)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),n}();return y_=i,i.default=i,r.registerProcessor(i),n.registerProcessor(i),y_},Ns=function(){if(S_)return __;S_=1;var e=ds(),t=gs(),n=Ps(),r=_s(),i=Ms(),o=ps(),s=function(){if(w_)return b_;w_=1;var e=gs(),t=ys(),n=ws(),r=Cs(),i=ms(),o=Is(),s=Ts();function a(u,l){if(Array.isArray(u))return u.map(function(e){return a(e)});var c=u.inputs,d=_object_without_properties(u,["inputs"]);if(c){l=[];var f=!0,h=!1,p=void 0;try{for(var v,g=c[Symbol.iterator]();!(f=(v=g.next()).done);f=!0){var y=_object_spread_props(_object_spread({},v.value),{__proto__:i.prototype});y.map&&(y.map=_object_spread_props(_object_spread({},y.map),{__proto__:t.prototype})),l.push(y)}}catch(e){h=!0,p=e}finally{try{f||null==g.return||g.return()}finally{if(h)throw p}}}if(d.nodes&&(d.nodes=u.nodes.map(function(e){return a(e,l)})),d.source){var m=d.source,b=m.inputId,w=_object_without_properties(m,["inputId"]);d.source=w,null!=b&&(d.source.input=l[b])}if("root"===d.type)return new o(d);if("decl"===d.type)return new e(d);if("rule"===d.type)return new s(d);if("comment"===d.type)return new n(d);if("atrule"===d.type)return new r(d);throw new Error("Unknown node type: "+u.type)}return b_=a,a.default=a,b_}(),a=Ss(),u=xs(),l=ws(),c=Cs(),d=Es(),f=ms(),h=Rs(),p=Os(),v=Ts(),g=Is(),y=vs();function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new i(t)}return m.plugin=function(e,t){var n,r=!1;function o(){for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var a=t.apply(void 0,_to_consumable_array(o));return a.postcssPlugin=e,a.postcssVersion=(new i).version,a}return Object.defineProperty(o,"postcss",{get:function(){return n||(n=o()),n}}),o.process=function(e,t,n){return m([o(n)]).process(e,t)},o},m.stringify=o,m.parse=h,m.fromJSON=s,m.list=p,m.comment=function(e){return new l(e)},m.atRule=function(e){return new c(e)},m.decl=function(e){return new t(e)},m.rule=function(e){return new v(e)},m.root=function(e){return new g(e)},m.document=function(e){return new a(e)},m.CssSyntaxError=e,m.Declaration=t,m.Container=r,m.Processor=i,m.Document=a,m.Comment=l,m.Warning=u,m.AtRule=c,m.Result=d,m.Input=f,m.Rule=v,m.Root=g,m.Node=y,n.registerPostcss(m),__=m,m.default=m,__},Ls=function(e){if(O_[e])return O_[e];var t=function(e){var t,n,r=null==(n=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:n.call(t,e);return r&&globalThis[r]?globalThis[r]:void 0}(e)||globalThis[e],n=t.prototype,r=e in C_?C_[e]:void 0,i=Boolean(r&&r.every(function(e){var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),o=e in I_?I_[e]:void 0,s=Boolean(o&&o.every(function(e){var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))}));if(i&&s)return O_[e]=t.prototype,t.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var u=a.contentWindow;if(!u)return t.prototype;var l=u[e].prototype;return document.body.removeChild(a),l?O_[e]=l:n}catch(e){return n}},js=function(e,t,n){var r,i="".concat(e,".").concat(String(n));if(T_[i])return T_[i].call(t);var o=Ls(e),s=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return s?(T_[i]=s,s.call(t)):t[n]},Ds=function(e,t,n){var r="".concat(e,".").concat(String(n));if(A_[r])return A_[r].bind(t);var i=Ls(e)[n];return"function"!=typeof i?t[n]:(A_[r]=i,i.bind(t))},Us=function(e){return js("Node",e,"childNodes")},Fs=function(e){return js("Node",e,"parentNode")},Bs=function(e){return js("Node",e,"parentElement")},qs=function(e){return js("Node",e,"textContent")},zs=function(e,t){return Ds("Node",e,"contains")(t)},Vs=function(e){return Ds("Node",e,"getRootNode")()},Ws=function(e){return e&&"host"in e?js("ShadowRoot",e,"host"):null},Hs=function(e){return e.styleSheets},Gs=function(e){return e&&"shadowRoot"in e?js("Element",e,"shadowRoot"):null},Ks=function(e,t){return js("Element",e,"querySelector")(t)},Js=function(e,t){return js("Element",e,"querySelectorAll")(t)},$s=function(){return Ls("MutationObserver").constructor},Qs=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}},Ys=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=0;return function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];var u=Date.now();i||!1!==n.leading||(i=u);var l=t-(u-i),c=this;l<=0||l>t?(r&&(clearTimeout(r),r=null),i=u,e.apply(c,s)):r||!1===n.trailing||(r=setTimeout(function(){i=!1===n.leading?0:Date.now(),r=null,e.apply(c,s)},l))}},Xs=function(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch(e){return function(){}}},Zs=function(e){var t,n,r,i,o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=R_.parentElement(o.body))?void 0:t.scrollLeft)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(r=R_.parentElement(o.body))?void 0:r.scrollTop)||(null==(i=null==o?void 0:o.body)?void 0:i.scrollTop)||0}},ea=function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},ta=function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},na=function(e){return e?e.nodeType===e.ELEMENT_NODE?e:R_.parentElement(e):null},ra=function(e,t,n,r){if(!e)return!1;var i=na(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t))return!0;if(r&&null!==i.closest("."+t))return!0}else if(_S(i,t,r))return!0}catch(e){}if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1},ia=function(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||t.getId(e)===Xm},oa=function(e){return Boolean(e.changedTouches)},sa=function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},aa=function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},ua=function(e){return!!e&&(_instanceof(e,E_)&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(R_.shadowRoot(e)))},la=function(e){var t,n=null;return"getRootNode"in e&&(null==(t=R_.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&R_.host(R_.getRootNode(e))&&(n=R_.host(R_.getRootNode(e))),n},ca=function(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=la(n);)n=t;return n}(e);return R_.contains(t,n)},da=function(e){var t=e.ownerDocument;return!!t&&(R_.contains(t,e)||ca(e))},fa=function(e){return"__ln"in e},ha=function(e,t,n){return 0!==e.size&&pa(e,t)},pa=function(e,t,n){var r=R_.parentNode(t);return!!r&&e.has(r)},va=function(e,t){return 0!==e.size&&CS(e,t)},ga=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];try{return e.apply(void 0,_to_consumable_array(n))}catch(e){try{e._external_=!0}catch(e){}throw e}}},ya=function(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target},ma=function(e,t){var n=new H_;J_.push(n),n.init(e);var r=new($s())(K_(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r},ba=function(e){var t=e.mouseInteractionCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,s=e.sampling;if(!1===s.mouseInteraction)return function(){};var a=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,u=[],l=null;return Object.keys(U_).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]}).forEach(function(e){var s=xo(e),a=function(e){return function(n){var s=ya(n);if(!ra(s,i,o,!0)){var a=null,u=e;if("pointerType"in n){switch(n.pointerType){case"mouse":a=F_.Mouse;break;case"touch":a=F_.Touch;break;case"pen":a=F_.Pen}a===F_.Touch?U_[e]===U_.MouseDown?u="TouchStart":U_[e]===U_.MouseUp&&(u="TouchEnd"):F_.Pen}else oa(n)&&(a=F_.Touch);null!==a?(l=a,(u.startsWith("Touch")&&a===F_.Touch||u.startsWith("Mouse")&&a===F_.Mouse)&&(a=null)):U_[e]===U_.Click&&(a=l,l=null);var c=oa(n)?n.changedTouches[0]:n;if(c){var d=r.getId(s),f=c.clientX,h=c.clientY;K_(t)(_object_spread({type:U_[u],id:d,x:f,y:h},null!==a&&{pointerType:a}))}}}}(e);if(window.PointerEvent)switch(U_[e]){case U_.MouseDown:case U_.MouseUp:s=s.replace("mouse","pointer");break;case U_.TouchStart:case U_.TouchEnd:return}u.push(Qs(s,a,n))}),K_(function(){u.forEach(function(e){return e()})})},wa=function(e){var t=e.scrollCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,s=e.sampling,a=K_(Ys(K_(function(e){var s=ya(e);if(s&&!ra(s,i,o,!0)){var a=r.getId(s);if(s===n&&n.defaultView){var u=Zs(n.defaultView);t({id:a,x:u.left,y:u.top})}else t({id:a,x:s.scrollLeft,y:s.scrollTop})}}),s.scroll||100));return Qs("scroll",a,n)},_a=function(e){return function(e,t){if(Ea("CSSGroupingRule")&&_instanceof(e.parentRule,CSSGroupingRule)||Ea("CSSMediaRule")&&_instanceof(e.parentRule,CSSMediaRule)||Ea("CSSSupportsRule")&&_instanceof(e.parentRule,CSSSupportsRule)||Ea("CSSConditionRule")&&_instanceof(e.parentRule,CSSConditionRule)){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){var r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])},Sa=function(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}},ka=function(e,t){var n,r,i,o=e.mirror,s=e.stylesheetManager,a=null;a="#document"===t.nodeName?o.getId(t):o.getId(R_.host(t));var u="#document"===t.nodeName?null==(n=t.defaultView)?void 0:n.Document:null==(i=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:i.ShadowRoot,l=(null==u?void 0:u.prototype)?Object.getOwnPropertyDescriptor(null==u?void 0:u.prototype,"adoptedStyleSheets"):void 0;return null!==a&&-1!==a&&u&&l?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:function(){var e;return null==(e=l.get)?void 0:e.call(this)},set:function(e){var t,n=null==(t=l.set)?void 0:t.call(this,e);if(null!==a&&-1!==a)try{s.adoptStyleSheets(e,a)}catch(e){}return n}}),K_(function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):function(){}},xa=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.doc.defaultView;if(!r)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,i=e.mouseInteractionCb,o=e.scrollCb,s=e.viewportResizeCb,a=e.inputCb,u=e.mediaInteractionCb,l=e.styleSheetRuleCb,c=e.styleDeclarationCb,d=e.canvasMutationCb,f=e.fontCb,h=e.selectionCb,p=e.customElementCb;e.mutationCb=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var o;t.mutation&&(o=t).mutation.apply(o,_to_consumable_array(r)),n.apply(void 0,_to_consumable_array(r))},e.mousemoveCb=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];var o;t.mousemove&&(o=t).mousemove.apply(o,_to_consumable_array(n)),r.apply(void 0,_to_consumable_array(n))},e.mouseInteractionCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o;t.mouseInteraction&&(o=t).mouseInteraction.apply(o,_to_consumable_array(n)),i.apply(void 0,_to_consumable_array(n))},e.scrollCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.scroll&&(i=t).scroll.apply(i,_to_consumable_array(n)),o.apply(void 0,_to_consumable_array(n))},e.viewportResizeCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.viewportResize&&(i=t).viewportResize.apply(i,_to_consumable_array(n)),s.apply(void 0,_to_consumable_array(n))},e.inputCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.input&&(i=t).input.apply(i,_to_consumable_array(n)),a.apply(void 0,_to_consumable_array(n))},e.mediaInteractionCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.mediaInteaction&&(i=t).mediaInteaction.apply(i,_to_consumable_array(n)),u.apply(void 0,_to_consumable_array(n))},e.styleSheetRuleCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.styleSheetRule&&(i=t).styleSheetRule.apply(i,_to_consumable_array(n)),l.apply(void 0,_to_consumable_array(n))},e.styleDeclarationCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.styleDeclaration&&(i=t).styleDeclaration.apply(i,_to_consumable_array(n)),c.apply(void 0,_to_consumable_array(n))},e.canvasMutationCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.canvasMutation&&(i=t).canvasMutation.apply(i,_to_consumable_array(n)),d.apply(void 0,_to_consumable_array(n))},e.fontCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.font&&(i=t).font.apply(i,_to_consumable_array(n)),f.apply(void 0,_to_consumable_array(n))},e.selectionCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.selection&&(i=t).selection.apply(i,_to_consumable_array(n)),h.apply(void 0,_to_consumable_array(n))},e.customElementCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.customElement&&(i=t).customElement.apply(i,_to_consumable_array(n)),p.apply(void 0,_to_consumable_array(n))}}(e,n),e.recordDOM&&(t=ma(e,e.doc));var i,o,s,a,u,l,c=function(e){var t=e.mousemoveCb,n=e.sampling,r=e.doc,i=e.mirror;if(!1===n.mousemove)return function(){};var o,s="number"==typeof n.mousemove?n.mousemove:50,a="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,u=[],l=Ys(K_(function(e){var n=Date.now()-o;t(u.map(function(e){return e.timeOffset-=n,e}),e),u=[],o=null}),a),c=K_(Ys(K_(function(e){var t=ya(e),n=oa(e)?e.changedTouches[0]:e,r=n.clientX,s=n.clientY;o||(o=N_()),u.push({x:r,y:s,id:i.getId(t),timeOffset:N_()-o}),l("undefined"!=typeof DragEvent&&_instanceof(e,DragEvent)?D_.Drag:_instanceof(e,MouseEvent)?D_.MouseMove:D_.TouchMove)}),s,{trailing:!1})),d=[Qs("mousemove",c,r),Qs("touchmove",c,r),Qs("drag",c,r)];return K_(function(){d.forEach(function(e){return e()})})}(e),d=ba(e),f=wa(e),h=(i={win:r},o=e.viewportResizeCb,s=i.win,a=-1,u=-1,l=K_(Ys(K_(function(){var e=ea(),t=ta();a===e&&u===t||(o({width:Number(t),height:Number(e)}),a=e,u=t)}),200)),Qs("resize",l,s)),p=function(e){var t=e.inputCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,s=e.ignoreClass,a=e.ignoreSelector,u=e.maskInputOptions,l=e.maskInputFn,c=e.sampling,d=e.userTriggeredOnInput;function f(e){var t=ya(e),r=e.isTrusted,c=t&&t.tagName;if(t&&"OPTION"===c&&(t=R_.parentElement(t)),t&&c&&!($_.indexOf(c)<0)&&!ra(t,i,o,!0)&&!(t.classList.contains(s)||a&&t.matches(a))){var f=t.value,p=!1,v=Eo(t)||"";"radio"===v||"checkbox"===v?p=t.checked:(u[c.toLowerCase()]||u[v])&&(f=ko({element:t,maskInputOptions:u,tagName:c,type:v,value:f,maskInputFn:l})),h(t,d?{text:f,isChecked:p,userTriggered:r}:{text:f,isChecked:p});var g=t.name;"radio"===v&&g&&p&&n.querySelectorAll('input[type="radio"][name="'.concat(g,'"]')).forEach(function(e){if(e!==t){var n=e.value;h(e,d?{text:n,isChecked:!p,userTriggered:!1}:{text:n,isChecked:!p})}})}}function h(e,n){var i=Q_.get(e);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){Q_.set(e,n);var o=r.getId(e);K_(t)(_object_spread_props(_object_spread({},n),{id:o}))}}var p=("last"===c.input?["change"]:["input","change"]).map(function(e){return Qs(e,K_(f),n)}),v=n.defaultView;if(!v)return function(){p.forEach(function(e){return e()})};var g,y=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),m=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return y&&y.set&&(g=p).push.apply(g,_to_consumable_array(m.map(function(e){return kS(e[0],e[1],{set:function(){K_(f)({target:this,isTrusted:!1})}},!1,v)}))),K_(function(){p.forEach(function(e){return e()})})}(e),v=function(e){var t=e.mediaInteractionCb,n=e.blockClass,r=e.blockSelector,i=e.mirror,o=e.sampling,s=e.doc,a=K_(function(e){return Ys(K_(function(o){var s=ya(o);if(s&&!ra(s,n,r,!0)){var a=s.currentTime,u=s.volume,l=s.muted,c=s.playbackRate,d=s.loop;t({type:e,id:i.getId(s),currentTime:a,volume:u,muted:l,playbackRate:c,loop:d})}}),o.media||500)}),u=[Qs("play",a(q_.Play),s),Qs("pause",a(q_.Pause),s),Qs("seeked",a(q_.Seeked),s),Qs("volumechange",a(q_.VolumeChange),s),Qs("ratechange",a(q_.RateChange),s)];return K_(function(){u.forEach(function(e){return e()})})}(e),g=function(){},y=function(){},m=function(){},b=function(){};e.recordDOM&&(g=function(e,t){var n=e.styleSheetRuleCb,r=e.mirror,i=e.stylesheetManager,o=t.win;if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return function(){};var s=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:K_(function(e,t,o){var s=_sliced_to_array(o,2),a=s[0],u=s[1],l=Sa(t,r,i.styleMirror),c=l.id,d=l.styleId;return(c&&-1!==c||d&&-1!==d)&&n({id:c,styleId:d,adds:[{rule:a,index:u}]}),ga(function(){return e.apply(t,o)})()})}),o.CSSStyleSheet.prototype.addRule=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.cssRules.length,r="".concat(e," { ").concat(t," }");return o.CSSStyleSheet.prototype.insertRule.apply(this,[r,n])};var a,u,l=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:K_(function(e,t,o){var s=_sliced_to_array(o,1)[0],a=Sa(t,r,i.styleMirror),u=a.id,l=a.styleId;return(u&&-1!==u||l&&-1!==l)&&n({id:u,styleId:l,removes:[{index:s}]}),ga(function(){return e.apply(t,o)})()})}),o.CSSStyleSheet.prototype.removeRule=function(e){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},o.CSSStyleSheet.prototype.replace&&(a=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:K_(function(e,t,o){var s=_sliced_to_array(o,1)[0],a=Sa(t,r,i.styleMirror),u=a.id,l=a.styleId;return(u&&-1!==u||l&&-1!==l)&&n({id:u,styleId:l,replace:s}),e.apply(t,o)})})),o.CSSStyleSheet.prototype.replaceSync&&(u=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:K_(function(e,t,o){var s=_sliced_to_array(o,1)[0],a=Sa(t,r,i.styleMirror),u=a.id,l=a.styleId;return(u&&-1!==u||l&&-1!==l)&&n({id:u,styleId:l,replaceSync:s}),e.apply(t,o)})}));var c={};Ca("CSSGroupingRule")?c.CSSGroupingRule=o.CSSGroupingRule:(Ca("CSSMediaRule")&&(c.CSSMediaRule=o.CSSMediaRule),Ca("CSSConditionRule")&&(c.CSSConditionRule=o.CSSConditionRule),Ca("CSSSupportsRule")&&(c.CSSSupportsRule=o.CSSSupportsRule));var d={};return Object.entries(c).forEach(function(e){var t=_sliced_to_array(e,2),o=t[0],s=t[1];d[o]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(d[o].insertRule,{apply:K_(function(e,t,o){var s=_sliced_to_array(o,2),a=s[0],u=s[1],l=Sa(t.parentStyleSheet,r,i.styleMirror),c=l.id,d=l.styleId;return(c&&-1!==c||d&&-1!==d)&&n({id:c,styleId:d,adds:[{rule:a,index:_to_consumable_array(_a(t)).concat([u||0])}]}),e.apply(t,o)})}),s.prototype.deleteRule=new Proxy(d[o].deleteRule,{apply:K_(function(e,t,o){var s=_sliced_to_array(o,1)[0],a=Sa(t.parentStyleSheet,r,i.styleMirror),u=a.id,l=a.styleId;return(u&&-1!==u||l&&-1!==l)&&n({id:u,styleId:l,removes:[{index:_to_consumable_array(_a(t)).concat([s])}]}),e.apply(t,o)})})}),K_(function(){o.CSSStyleSheet.prototype.insertRule=s,o.CSSStyleSheet.prototype.deleteRule=l,a&&(o.CSSStyleSheet.prototype.replace=a),u&&(o.CSSStyleSheet.prototype.replaceSync=u),Object.entries(c).forEach(function(e){var t=_sliced_to_array(e,2),n=t[0],r=t[1];r.prototype.insertRule=d[n].insertRule,r.prototype.deleteRule=d[n].deleteRule})})}(e,{win:r}),y=ka(e,e.doc),m=function(e,t){var n=e.styleDeclarationCb,r=e.mirror,i=e.ignoreCSSAttributes,o=e.stylesheetManager,s=t.win,a=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:K_(function(e,t,s){var u,l=_sliced_to_array(s,3),c=l[0],d=l[1],f=l[2];if(i.has(c))return a.apply(t,[c,d,f]);var h=Sa(null==(u=t.parentRule)?void 0:u.parentStyleSheet,r,o.styleMirror),p=h.id,v=h.styleId;return(p&&-1!==p||v&&-1!==v)&&n({id:p,styleId:v,set:{property:c,value:d,priority:f},index:_a(t.parentRule)}),e.apply(t,s)})});var u=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:K_(function(e,t,s){var a,l=_sliced_to_array(s,1)[0];if(i.has(l))return u.apply(t,[l]);var c=Sa(null==(a=t.parentRule)?void 0:a.parentStyleSheet,r,o.styleMirror),d=c.id,f=c.styleId;return(d&&-1!==d||f&&-1!==f)&&n({id:d,styleId:f,remove:{property:l},index:_a(t.parentRule)}),e.apply(t,s)})}),K_(function(){s.CSSStyleDeclaration.prototype.setProperty=a,s.CSSStyleDeclaration.prototype.removeProperty=u})}(e,{win:r}),e.collectFonts&&(b=function(e){var t=e.fontCb,n=e.doc,r=n.defaultView;if(!r)return function(){};var i=[],o=new WeakMap,s=r.FontFace;r.FontFace=function(e,t,n){var r=new s(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var a=Xs(n.fonts,"add",function(e){return function(n){return setTimeout(K_(function(){var e=o.get(n);e&&(t(e),o.delete(n))}),0),e.apply(this,[n])}});return i.push(function(){r.FontFace=s}),i.push(a),K_(function(){i.forEach(function(e){return e()})})}(e)));var w=function(e){var t=e.doc,n=e.mirror,r=e.blockClass,i=e.blockSelector,o=e.selectionCb,s=!0,a=K_(function(){var e=t.getSelection();if(!(!e||s&&(null==e?void 0:e.isCollapsed))){s=e.isCollapsed||!1;for(var a=[],u=e.rangeCount||0,l=0;l<u;l++){var c=e.getRangeAt(l),d=c.startContainer,f=c.startOffset,h=c.endContainer,p=c.endOffset;ra(d,r,i,!0)||ra(h,r,i,!0)||a.push({start:n.getId(d),startOffset:f,end:n.getId(h),endOffset:p})}o({ranges:a})}});return a(),Qs("selectionchange",a)}(e),_=function(e){var t=e.doc,n=e.customElementCb,r=t.defaultView;return r&&r.customElements?Xs(r.customElements,"define",function(e){return function(t,r,i){try{n({define:{name:t}})}catch(e){console.warn("Custom element callback failed for ".concat(t))}return e.apply(this,[t,r,i])}}):function(){}}(e),S=[],k=!0,x=!1,E=void 0;try{for(var C,I=e.plugins[Symbol.iterator]();!(k=(C=I.next()).done);k=!0){var O=C.value;S.push(O.observer(O.callback,r,O.options))}}catch(e){x=!0,E=e}finally{try{k||null==I.return||I.return()}finally{if(x)throw E}}return K_(function(){J_.forEach(function(e){return e.reset()}),null==t||t.disconnect(),c(),d(),f(),h(),p(),v(),g(),y(),m(),b(),w(),_(),S.forEach(function(e){return e()})})},Ea=function(e){return void 0!==window[e]},Ca=function(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)},Ia=function(e,t,n,r){var i=[];try{var o=Xs(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(i){for(var o=arguments.length,s=new Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];if(!ra(this,t,n,!0)){var u=function(e){return"experimental-webgl"===e?"webgl":e}(i);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(s[0]&&"object"===_type_of(s[0])){var l=s[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else s.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[i].concat(_to_consumable_array(s)))}});i.push(o)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){i.forEach(function(e){return e()})}},Oa=function(e,t,n,r,i,o){var s=[],a=Object.getOwnPropertyNames(e),u=!0,l=!1,c=void 0;try{for(var d,f=function(){var a=d.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))return"continue";try{if("function"!=typeof e[a])return"continue";var u=Xs(e,a,function(e){return function(){for(var s=arguments.length,u=new Array(s),l=0;l<s;l++)u[l]=arguments[l];var c=e.apply(this,u);if(oS(c,o,this),"tagName"in this.canvas&&!ra(this.canvas,r,i,!0)){var d=sS(u,o,this),f={type:t,property:a,args:d};n(this.canvas,f)}return c}});s.push(u)}catch(r){var l=kS(e,a,{set:function(e){n(this.canvas,{type:t,property:a,args:[e],setter:!0})}});s.push(l)}},h=a[Symbol.iterator]();!(u=(d=h.next()).done);u=!0)f()}catch(e){l=!0,c=e}finally{try{u||null==h.return||h.return()}finally{if(l)throw c}}return s},Ta=function(e){var t;try{if(!(t=lS&&(self.URL||self.webkitURL).createObjectURL(lS)))throw"";var n=new Worker(t,{name:null==e?void 0:e.name});return n.addEventListener("error",function(){(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch(t){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(uS),{name:null==e?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}},Aa=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.emit,n=e.checkoutEveryNms,r=e.checkoutEveryNth,i=e.blockClass,o=void 0===i?"rr-block":i,s=e.blockSelector,a=void 0===s?null:s,u=e.ignoreClass,l=void 0===u?"rr-ignore":u,c=e.ignoreSelector,d=void 0===c?null:c,f=e.maskTextClass,h=void 0===f?"rr-mask":f,p=e.maskTextSelector,v=void 0===p?null:p,g=e.inlineStylesheet,y=void 0===g||g,m=e.maskAllInputs,b=e.maskInputOptions,w=e.slimDOMOptions,_=e.maskInputFn,S=e.maskTextFn,k=e.maskAttributeFn,x=e.hooks,E=e.packFn,C=e.sampling,I=void 0===C?{}:C,O=e.dataURLOptions,T=void 0===O?{}:O,A=e.mousemoveWait,R=e.recordDOM,P=void 0===R||R,M=e.recordCanvas,N=void 0!==M&&M,L=e.recordCrossOriginIframes,j=void 0!==L&&L,D=e.recordAfter,U=void 0===D?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":D,F=e.userTriggeredOnInput,B=void 0!==F&&F,q=e.collectFonts,z=void 0!==q&&q,V=e.inlineImages,W=void 0!==V&&V,H=e.captureAdoptedStyleSheets,G=void 0===H||H,K=e.plugins,J=e.keepIframeSrcFn,$=void 0===J?function(){return!1}:J,Q=e.ignoreCSSAttributes,Y=void 0===Q?new Set([]):Q,X=e.errorHandler,Z=e.applyBackgroundColorToBlockedElements,ee=void 0!==Z&&Z;G_=X;var te=!j||window.parent===window,ne=!1;if(!te)try{window.parent.document&&(ne=!1)}catch(e){ne=!0}if(te&&!t)throw new Error("emit function is required");if(!te&&!ne)return function(){};void 0!==A&&void 0===I.mousemove&&(I.mousemove=A),yS.reset();var re,ie=!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==b?b:{password:!0},oe=!0===w||"all"===w?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===w,headMetaDescKeywords:"all"===w,headTitleMutations:"all"===w}:w||{};!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();var se=0,ae=function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=(K||[])[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var s=i.value;s.eventProcessor&&(e=s.eventProcessor(e))}}catch(e){n=!0,r=e}finally{try{t||null==o.return||o.return()}finally{if(n)throw r}}return E&&!ne&&(e=E(e)),e};hS=function(e,i){var o,s=e;if(s.timestamp=N_(),!(null==(o=J_[0])?void 0:o.isFrozen())||s.type===j_.FullSnapshot||s.type===j_.IncrementalSnapshot&&s.data.source===D_.Mutation||J_.forEach(function(e){return e.unfreeze()}),te)null==t||t(ae(s),i);else if(ne){var a={type:"rrweb",event:ae(s),origin:window.location.origin,isCheckout:i};window.parent.postMessage(a,"*")}if(s.type===j_.FullSnapshot)re=s,se=0;else if(s.type===j_.IncrementalSnapshot){if(s.data.source===D_.Mutation&&s.data.isAttachIframe)return;se++;var u=r&&se>=r,l=n&&s.timestamp-re.timestamp>n;(u||l)&&pS(!0)}};var ue=function(e){hS({type:j_.IncrementalSnapshot,data:_object_spread({source:D_.Mutation},e)})},le=function(e){return hS({type:j_.IncrementalSnapshot,data:_object_spread({source:D_.Scroll},e)})},ce=function(e){return hS({type:j_.IncrementalSnapshot,data:_object_spread({source:D_.CanvasMutation},e)})},de=new dS({mutationCb:ue,adoptedStyleSheetCb:function(e){return hS({type:j_.IncrementalSnapshot,data:_object_spread({source:D_.AdoptedStyleSheet},e)})}}),fe=new X_({mirror:yS,mutationCb:ue,stylesheetManager:de,recordCrossOriginIframes:j,wrappedEmit:hS}),he=!0,pe=!1,ve=void 0;try{for(var ge,ye=(K||[])[Symbol.iterator]();!(he=(ge=ye.next()).done);he=!0){var me=ge.value;me.getMirror&&me.getMirror({nodeMirror:yS,crossOriginIframeMirror:fe.crossOriginIframeMirror,crossOriginIframeStyleMirror:fe.crossOriginIframeStyleMirror})}}catch(e){pe=!0,ve=e}finally{try{he||null==ye.return||ye.return()}finally{if(pe)throw ve}}var be=new fS;vS=new cS({recordCanvas:N,mutationCb:ce,win:window,blockClass:o,blockSelector:a,mirror:yS,sampling:I.canvas,dataURLOptions:T});var we=new Z_({mutationCb:ue,scrollCb:le,bypassOptions:{blockClass:o,blockSelector:a,maskTextClass:h,maskTextSelector:v,inlineStylesheet:y,maskInputOptions:ie,dataURLOptions:T,maskTextFn:S,maskInputFn:_,maskAttributeFn:k,recordCanvas:N,inlineImages:W,sampling:I,slimDOMOptions:oe,iframeManager:fe,stylesheetManager:de,canvasManager:vS,keepIframeSrcFn:$,processedNodeManager:be},mirror:yS});pS=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(P){hS({type:j_.Meta,data:{href:window.location.href,width:ta(),height:ea()}},e),de.reset(),we.init(),J_.forEach(function(e){return e.lock()});var t=function(e,t){var n=t||{},r=n.mirror,i=void 0===r?new Vm:r,o=n.blockClass,s=void 0===o?"rr-block":o,a=n.blockSelector,u=void 0===a?null:a,l=n.maskTextClass,c=void 0===l?"rr-mask":l,d=n.maskTextSelector,f=void 0===d?null:d,h=n.inlineStylesheet,p=void 0===h||h,v=n.inlineImages,g=void 0!==v&&v,y=n.recordCanvas,m=void 0!==y&&y,b=n.maskAllInputs,w=void 0!==b&&b,_=n.maskTextFn,S=n.maskInputFn,k=n.maskAttributeFn,x=n.slimDOM,E=void 0!==x&&x,C=n.dataURLOptions,I=n.preserveWhiteSpace,O=n.onSerialize,T=n.onAdoptedStyleSheet,A=n.onIframeLoad,R=n.iframeLoadTimeout,P=n.onStylesheetLoad,M=n.stylesheetLoadTimeout,N=n.keepIframeSrcFn,L=void 0===N?function(){return!1}:N,j=n.applyBackgroundColorToBlockedElements;return SS(e,{doc:e,mirror:i,blockClass:s,blockSelector:u,maskTextClass:c,maskTextSelector:f,skipChild:!1,inlineStylesheet:p,maskInputOptions:!0===w?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===w?{password:!0}:w,maskTextFn:_,maskInputFn:S,maskAttributeFn:k,slimDOMOptions:!0===E||"all"===E?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===E,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===E?{}:E,dataURLOptions:C,inlineImages:g,recordCanvas:m,preserveWhiteSpace:I,onSerialize:O,onAdoptedStyleSheet:T,onIframeLoad:A,iframeLoadTimeout:R,onStylesheetLoad:P,stylesheetLoadTimeout:M,keepIframeSrcFn:L,newlyAddedElement:!1,applyBackgroundColorToBlockedElements:void 0!==j&&j})}(document,{mirror:yS,blockClass:o,blockSelector:a,maskTextClass:h,maskTextSelector:v,inlineStylesheet:y,maskAllInputs:ie,maskTextFn:S,maskInputFn:_,maskAttributeFn:k,slimDOM:oe,dataURLOptions:T,recordCanvas:N,inlineImages:W,applyBackgroundColorToBlockedElements:ee,onSerialize:function(e){sa(e,yS)&&fe.addIframe(e),aa(e,yS)&&de.trackLinkElement(e),ua(e)&&we.addShadowRoot(R_.shadowRoot(e),document)},onAdoptedStyleSheet:G?function(e){return de.styleMirror.add(e)}:void 0,onIframeLoad:function(e,t){fe.attachIframe(e,t),we.observeAttachShadow(e)},onStylesheetLoad:function(e,t){de.attachLinkElement(e,t)},keepIframeSrcFn:$});if(!t)return console.warn("Failed to snapshot the document");hS({type:j_.FullSnapshot,data:{node:t,initialOffset:Zs(window)}},e),J_.forEach(function(e){return e.unlock()}),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&de.adoptStyleSheets(document.adoptedStyleSheets,yS.getId(document))}};try{var _e=[],Se=function(e){var t;return K_(xa)({mutationCb:ue,mousemoveCb:function(e,t){return hS({type:j_.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return hS({type:j_.IncrementalSnapshot,data:_object_spread({source:D_.MouseInteraction},e)})},scrollCb:le,viewportResizeCb:function(e){return hS({type:j_.IncrementalSnapshot,data:_object_spread({source:D_.ViewportResize},e)})},inputCb:function(e){return hS({type:j_.IncrementalSnapshot,data:_object_spread({source:D_.Input},e)})},mediaInteractionCb:function(e){return hS({type:j_.IncrementalSnapshot,data:_object_spread({source:D_.MediaInteraction},e)})},styleSheetRuleCb:function(e){return hS({type:j_.IncrementalSnapshot,data:_object_spread({source:D_.StyleSheetRule},e)})},styleDeclarationCb:function(e){return hS({type:j_.IncrementalSnapshot,data:_object_spread({source:D_.StyleDeclaration},e)})},canvasMutationCb:ce,fontCb:function(e){return hS({type:j_.IncrementalSnapshot,data:_object_spread({source:D_.Font},e)})},selectionCb:function(e){hS({type:j_.IncrementalSnapshot,data:_object_spread({source:D_.Selection},e)})},customElementCb:function(e){hS({type:j_.IncrementalSnapshot,data:_object_spread({source:D_.CustomElement},e)})},blockClass:o,ignoreClass:l,ignoreSelector:d,maskTextClass:h,maskTextSelector:v,maskInputOptions:ie,inlineStylesheet:y,sampling:I,recordDOM:P,recordCanvas:N,inlineImages:W,userTriggeredOnInput:B,collectFonts:z,doc:e,maskInputFn:_,maskTextFn:S,maskAttributeFn:k,keepIframeSrcFn:$,blockSelector:a,slimDOMOptions:oe,dataURLOptions:T,mirror:yS,iframeManager:fe,stylesheetManager:de,shadowDomManager:we,processedNodeManager:be,canvasManager:vS,ignoreCSSAttributes:Y,plugins:(null==(t=null==K?void 0:K.filter(function(e){return e.observer}))?void 0:t.map(function(e){return{observer:e.observer,options:e.options,callback:function(t){return hS({type:j_.Plugin,data:{plugin:e.name,payload:t}})}}}))||[]},x)};fe.addLoadListener(function(e){try{_e.push(Se(e.contentDocument))}catch(e){console.warn(e)}});var ke=function(){pS(),_e.push(Se(document)),gS=!0};return"interactive"===document.readyState||"complete"===document.readyState?ke():(_e.push(Qs("DOMContentLoaded",function(){hS({type:j_.DomContentLoaded,data:{}}),"DOMContentLoaded"===U&&ke()})),_e.push(Qs("load",function(){hS({type:j_.Load,data:{}}),"load"===U&&ke()},window))),function(){_e.forEach(function(e){return e()}),be.destroy(),gS=!1,G_=void 0}}catch(e){console.warn(e)}},Ra=function(e,t){if(new Blob([e]).size<=t)return{value:e,truncated:!1};for(var n=0,r=Math.min(e.length,t);n<r;){var i=Math.ceil((n+r)/2);new Blob([e.slice(0,i)]).size<=t?n=i:r=i-1}return n>0&&e.charCodeAt(n-1)>=55296&&e.charCodeAt(n-1)<=56319&&(n-=1),{value:e.slice(0,n),truncated:!0}},Pa=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}dk(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},Ma=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,_instanceof(t,n)?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},Na=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},La=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ja=function(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},Da=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},Ua=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,_instanceof(t,n)?t:new n(function(e){e(t)})).then(s,a)}u((r=r.apply(e,t||[])).next())})},Fa=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},Ba=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},qa=function(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},za=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},Va=function(e,t){return t=t||{},new Promise(function(n,r){var i=new XMLHttpRequest,o=[],s=[],a={},u=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(JSON.parse(i.responseText))},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return s},get:function(e){return a[e.toLowerCase()]},has:function(e){return e.toLowerCase()in a}}}};for(var l in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(e,t,n){o.push(t=t.toLowerCase()),s.push([t,n]),a[t]=a[t]?a[t]+","+n:n}),n(u())},i.onerror=r,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(l,t.headers[l]);i.send(t.body||null)})},Wa=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ha=function(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},Ga=function(e,t){if("collector"===e)return"collector";if(!t)throw new Error("stepId(".concat(e,") requires an id"));return"".concat(e,".").concat(t)},Ka=function(e,t){var n=e.destinations[t];if(!n)throw new Error("Destination not found: ".concat(t));return n},Ja=function(e,t){var n=e.transformers[t];if(!n)throw new Error("Transformer not found: ".concat(t));return n},$a=function(e,t){var n=e.sources[t];if(!n)throw new Error("Source not found: ".concat(t));return n},Qa=function(e,t){var n=e.stores[t];if(!n)throw new Error("Store not found: ".concat(t));return n},Ya=function(e,t){return _async_to_generator(function(){return _ts_generator(this,function(n){switch(n.label){case 0:return[4,e.get(t)];case 1:return[2,n.sent()]}})})()},Xa=function(e){return Array.isArray(e)},Za=function(e){return void 0!==e},eu=function(e){return"number"==typeof e&&!Number.isNaN(e)},tu=function(e){return"object"==(void 0===e?"undefined":_type_of(e))&&null!==e&&!Xa(e)&&"[object Object]"===Object.prototype.toString.call(e)},nu=function(e){return"string"==typeof e},ru=function(e){var t=_object_spread({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),n={},r=!e||0===Object.keys(e).length;return Object.keys(t).forEach(function(i){t[i]&&(n[i]=!0,e&&e[i]&&(r=!0))}),!!r&&n},iu=function(e){return XE(e)?e:void 0},ou=function(e,t,n){return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return _async_to_generator(function(){var r;return _ts_generator(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,4,6]),[4,e.apply(void 0,_to_consumable_array(i))];case 1:case 3:return[2,o.sent()];case 2:return r=o.sent(),t?[4,t(r)]:[2];case 4:return[4,null==n?void 0:n()];case 5:return o.sent(),[7];case 6:return[2]}})})()}},su=function(e,t){Object.defineProperty(e,"cause",{value:t,writable:!0,configurable:!0})},au=function(e,t,n){return _async_to_generator(function(){var r;return _ts_generator(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,e()];case 1:return[2,i.sent()];case 2:if(_instanceof(r=i.sent(),tC))throw r;throw new tC(n,{code:t,cause:r});case 3:return[2]}})})()},uu=function(e){return e.length>300?e.slice(0,300):e},lu=function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"error";if(null==e?void 0:e.causeLog)e.causeLog.report(n,r,i,o);else{var s=function(e,t){var n={step:e.step,code:e.code};void 0!==e.status&&(n.status=e.status);var r=!0,i=!1,o=void 0;try{for(var s,a=nC[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value;"string"==typeof t[u]&&(n[u]=t[u])}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}var l=!0,c=!1,d=void 0;try{for(var f,h=rC[Symbol.iterator]();!(l=(f=h.next()).done);l=!0){var p=f.value;"number"==typeof t[p]&&(n[p]=t[p])}}catch(e){c=!0,d=e}finally{try{l||null==h.return||h.return()}finally{if(c)throw d}}"boolean"==typeof t.retryable&&(n.retryable=t.retryable);var v,g="string"==typeof(v=t.event)?v:tu(v)&&"string"==typeof v.name?v.name:void 0;void 0!==g&&(n.event=g);var y=function(e){if(void 0!==e)return"string"==typeof e?uu(e):_instanceof(e,Error)||tu(e)&&"string"==typeof e.message?uu(e.message):uu(String(e))}(t.error);return void 0!==y&&(n.error=y),n}(n,i);"warn"===o?t.warn(r,s):t.error(r,s)}},cu=function(e,t,n,r){var i=e.event.name,o=(null==t?void 0:t.mappingKey)?"mapping.".concat(t.mappingKey):"mapping";lu(e.collector,e.logger,{step:o,code:"mapping"},n,_object_spread({},"string"==typeof i?{event:i}:{},(null==t?void 0:t.mappingKey)?{mappingKey:t.mappingKey}:{},void 0!==r?{error:r}:{}))},du=function(e,t,n){return _async_to_generator(function(e){var t,n,r,i,o,s,a,u,l,c,d,f,h,p,v,g=arguments;return _ts_generator(this,function(y){switch(y.label){case 0:if(t=g.length>1&&void 0!==g[1]?g[1]:{},r=g.length>3?g[3]:void 0,!(n=g.length>2?g[2]:void 0).collector)throw new Error("getMappingValue: context.collector is required");o=n.consent||n.collector.consent,s={event:null!==(i=n.event)&&void 0!==i?i:{},mapping:t,collector:n.collector,logger:n.collector.logger,consent:o},a=Xa(t)?t:[t],u=!0,l=!1,c=void 0,y.label=1;case 1:y.trys.push([1,6,7,8]),d=a[Symbol.iterator](),y.label=2;case 2:return(u=(f=d.next()).done)?[3,5]:(h=f.value,[4,ou(oC,function(e){if(_instanceof(e,ZE))throw e;cu(s,r,"mapping value failed",e)})(e,h,_object_spread_props(_object_spread({},s),{mapping:h}),r)]);case 3:if(p=y.sent(),Za(p))return[2,p];y.label=4;case 4:return u=!0,[3,2];case 5:return[3,8];case 6:return v=y.sent(),l=!0,c=v,[3,8];case 7:try{u||null==d.return||d.return()}finally{if(l)throw c}return[7];case 8:return[2]}})}).apply(this,arguments)},fu=function(e,t){return _async_to_generator(function(e){var t=arguments;return _ts_generator(this,function(n){return[2,hu(e,t.length>1&&void 0!==t[1]?t[1]:{},t.length>2?t[2]:void 0)]})}).apply(this,arguments)},hu=function(e,t,n,r){return _async_to_generator(function(){var i,o,s,a;return _ts_generator(this,function(u){return Za(e)?(s=tu(e)&&e.consent||(null==n?void 0:n.consent)||(null==n||null===(o=n.collector)||void 0===o?void 0:o.consent),a=null!==(i=null==n?void 0:n.event)&&void 0!==i?i:tu(e)?e:{},[2,du(e,t,_object_spread_props(_object_spread({},n),{consent:s,event:a}),r)]):[2]})})()},pu=function(e,t,n){var r="This is not a new campaign because referring_domain=".concat(t," is on the same domain as the current page and it is configured to exclude internal referrers");"always"===e?n.debug(r):"ifEmptyCampaign"===e&&n.debug("".concat(r," with empty campaign parameters"))},vu=function(e,t,n){var r,i,o=[];try{for(var s=qt(null!=t?t:[]),a=s.next();!a.done;a=s.next()){var u=a.value;try{o.push(new RegExp(u))}catch(e){n.loggerProvider.warn("Invalid regex pattern: ".concat(u),e)}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return e.concat(o)},gu=function(e,n){var r,i,o,s,a,u,l;if(e){yI(e);try{n.loggerProvider.debug("Update browser config with remote configuration:",JSON.stringify(e));var c=e;if(c&&"autocapture"in c){if("boolean"==typeof c.autocapture&&(n.autocapture=c.autocapture),"object"===_type_of(c.autocapture)&&null!==c.autocapture){var d=t({},c.autocapture);if(void 0===n.autocapture&&(n.autocapture=c.autocapture),"object"===_type_of(c.autocapture.elementInteractions)&&null!==c.autocapture.elementInteractions&&(null===(o=c.autocapture.elementInteractions.pageUrlAllowlistRegex)||void 0===o?void 0:o.length)){d.elementInteractions=t({},c.autocapture.elementInteractions);var f=d.elementInteractions,h=null!==(s=f.pageUrlAllowlist)&&void 0!==s?s:[],p=c.autocapture.elementInteractions.pageUrlAllowlistRegex;f.pageUrlAllowlist=vu(h,p,n),delete f.pageUrlAllowlistRegex}if("object"===_type_of(c.autocapture.networkTracking)&&null!==c.autocapture.networkTracking&&(null===(a=c.autocapture.networkTracking.captureRules)||void 0===a?void 0:a.length)){d.networkTracking=t({},c.autocapture.networkTracking);var v=null!==(u=d.networkTracking.captureRules)&&void 0!==u?u:[];try{for(var g=qt(v),y=g.next();!y.done;y=g.next()){var m=y.value;m.urls=vu(null!==(l=m.urls)&&void 0!==l?l:[],m.urlsRegex,n),delete m.urlsRegex}}catch(e){r={error:e}}finally{try{y&&!y.done&&(i=g.return)&&i.call(g)}finally{if(r)throw r.error}}}"boolean"==typeof n.autocapture&&(n.autocapture=t({attribution:n.autocapture,fileDownloads:n.autocapture,formInteractions:n.autocapture,pageViews:n.autocapture,sessions:n.autocapture,elementInteractions:n.autocapture,webVitals:n.autocapture,frustrationInteractions:n.autocapture},d)),"object"===_type_of(n.autocapture)&&(n.autocapture=t(t({},n.autocapture),d))}n.defaultTracking=n.autocapture}"customEnrichment"in c&&null!==c.customEnrichment&&!1!==n.customEnrichment&&(n.customEnrichment=c.customEnrichment),n.loggerProvider.debug("Browser config after remote config update:",JSON.stringify(n))}catch(e){n.loggerProvider.error("Failed to apply remote configuration because of error: ",e)}}},yu=function(e,t){var n,r,i,o,s=t.event,a=s.pageX,u=s.pageY;e.yMin=Math.min(null!==(n=e.yMin)&&void 0!==n?n:u,u),e.yMax=Math.max(null!==(r=e.yMax)&&void 0!==r?r:u,u),e.xMin=Math.min(null!==(i=e.xMin)&&void 0!==i?i:a,a),e.xMax=Math.max(null!==(o=e.xMax)&&void 0!==o?o:a,a),e.isOutOfBounds=e.yMax-e.yMin>_O||e.xMax-e.xMin>_O},mu=function(e){if(0===e.length)return null;var n=e[0],r=e[e.length-1];return{rageClickEvent:t({"[Amplitude] Begin Time":new Date(n.timestamp).toISOString(),"[Amplitude] End Time":new Date(r.timestamp).toISOString(),"[Amplitude] Duration":r.timestamp-n.timestamp,"[Amplitude] Clicks":e.map(function(e){return{X:e.event.pageX,Y:e.event.pageY,Time:e.timestamp}}),"[Amplitude] Click Count":e.length},n.targetElementProperties),time:n.timestamp}},bu=function(e){var t=this,n=e.amplitude,r=e.allObservables,i=e.shouldTrackRageClick,o=r.clickObservable,s=r.selectionObservable,a=[],u={},l=null;function c(e){a=[],u={},e&&(yu(u,e),a.push(e))}var d=an(o.filter(function(e){return i("click",e.closestTrackedAncestor)}),function(e){return Ft(t,void 0,void 0,function(){var t;return Bt(this,function(n){return yu(u,e),t=null,0===a.length||function(e,t){return e.length>0&&e[e.length-1].closestTrackedAncestor!==t.closestTrackedAncestor}(a,e)||function(e,t){var n=e[Math.max(0,e.length-bO+1)];return t.timestamp-n.timestamp>=wO}(a,e)||u.isOutOfBounds?(l&&(t=mu(a)),c(e)):a.push(e),l&&(clearTimeout(l.timerId),l.resolve(t),l=null),a.length>=bO?[2,new Promise(function(e){l={resolve:e,timerId:setTimeout(function(){e(mu(a))},wO)}})]:[2,null]})})}),f=null==s?void 0:s.subscribe(function(){c()}),h=d.subscribe(function(e){null!==e&&n.track(_I,e.rageClickEvent,{time:e.time})});return{unsubscribe:function(){h.unsubscribe(),null==f||f.unsubscribe()}}},wu=function(e){var t=e.changes,n=e.changesThreshold,r=e.thresholdMs;return!(t.length<n)&&t[t.length-1]-t[0]<r},_u=function(e){e.changes=[],e.startTime=void 0},Su=function(e){for(var t=e.changes,n=e.thresholdMs,r=0,i=t[t.length-1];r<t.length;r++){if(i-t[r]<n)break}0!==r&&(e.startTime=t[r],e.changes.splice(0,r))},ku=function(e,t,n,r){if(!r)return[];var i=e[t];return"object"===(void 0===i?"undefined":_type_of(i))&&null!==i&&"cssSelectorAllowlist"in i&&Array.isArray(i.cssSelectorAllowlist)?i.cssSelectorAllowlist:n},xu=function(e,t){var n=e.startTime+e.duration;return t.filter(function(t){return t.startTime<n&&t.startTime+t.duration>e.startTime}).map(function(e){return e.name})},Eu=function(e,n){var r,i=xu(e,n),o=null!==(r=e.scripts)&&void 0!==r?r:[],s=o.map(function(e){return e.sourceURL}).filter(Boolean),a=o.map(function(e){return e.sourceFunctionName}).filter(Boolean),u=o.map(function(e){return e.sourceCharPosition}).filter(function(e){return"number"==typeof e&&e>=0}),l=o.map(function(e){return e.invokerType}).filter(Boolean),c=o.map(function(e){return e.invoker}).filter(Boolean);return t(t(t(t(t(t(t({"[Amplitude] Main Thread Block Source":"long-animation-frame","[Amplitude] Main Thread Block Duration":e.duration,"[Amplitude] Main Thread Block Blocking Duration":e.blockingDuration,"[Amplitude] Main Thread Block Start Time":e.startTime},i.length>0&&{"[Amplitude] Main Thread Block Measures":i}),{"[Amplitude] Main Thread Block Render Start":e.renderStart,"[Amplitude] Main Thread Block Style And Layout Start":e.styleAndLayoutStart,"[Amplitude] Main Thread Block Script Count":o.length}),s.length>0&&{"[Amplitude] Main Thread Block Script URLs":s}),a.length>0&&{"[Amplitude] Main Thread Block Script Functions":a}),u.length>0&&{"[Amplitude] Main Thread Block Script Positions":u}),l.length>0&&{"[Amplitude] Main Thread Block Invoker Types":l}),c.length>0&&{"[Amplitude] Main Thread Block Invokers":c})},Cu=function(e,n){var r,i=xu(e,n),o=null!==(r=e.attribution)&&void 0!==r?r:[];return t(t({"[Amplitude] Main Thread Block Source":"long-task","[Amplitude] Main Thread Block Duration":e.duration,"[Amplitude] Main Thread Block Blocking Duration":e.duration,"[Amplitude] Main Thread Block Start Time":e.startTime},i.length>0&&{"[Amplitude] Main Thread Block Measures":i}),o.length>0&&{"[Amplitude] Main Thread Block Attribution":o.map(function(e){return e.name})})},Iu=function(e){var t=e.amplitude,n=e.options,r=e.durationThreshold,i=void 0===r?RO:r,o=function(){if("undefined"==typeof PerformanceObserver)return null;try{var e=PerformanceObserver.supportedEntryTypes;if(e.includes("long-animation-frame"))return"long-animation-frame";if(e.includes("longtask"))return"longtask"}catch(e){}return null}();if(!o)return{unsubscribe:function(){}};var s=[],a=new PerformanceObserver(function(e){var t,n,r=performance.now();try{for(var i=qt(e.getEntries()),o=i.next();!o.done;o=i.next()){var a=o.value;s.push(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}for(var u=r-PO;s.length>0&&s[0].startTime<u;)s.shift()});try{a.observe({entryTypes:["measure"]})}catch(e){}var u=new PerformanceObserver(function(e){var r,a;try{for(var u=qt(e.getEntries()),l=u.next();!l.done;l=u.next()){var c=l.value;if(!zI(n))return;if(!(c.duration<i)){var d="long-animation-frame"===o?Eu(c,s):Cu(c,s);t.track(xI,d)}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=u.return)&&a.call(u)}finally{if(r)throw r.error}}});try{u.observe({entryTypes:[o]})}catch(e){return a.disconnect(),{unsubscribe:function(){}}}return{unsubscribe:function(){u.disconnect(),a.disconnect()}}},Ou=function(e,t){var n="^"+t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$";return new RegExp(n).test(e)},Tu=function(e,t){var n,r,i=t.split(",");try{for(var o=qt(i),s=o.next();!s.done;s=o.next()){var a=s.value,u=zt(a.split("-").map(Number),2),l=u[0],c=u[1];if(e===l&&void 0===c)return!0;if(e>=l&&e<=c)return!0}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1},Au=function(e){var t;if(e)try{var n=null===(t=G())||void 0===t?void 0:t.location.href,r=new URL(e,n),i=r.searchParams.toString(),o=r.hash.replace("#",""),s=r.href,a=r.host;return r.hash="",r.search="",{query:i,fragment:o,href:s,hrefWithoutQueryOrHash:r.href,host:a}}catch(e){return}},Ru=function(e){return"object"!==(void 0===e?"undefined":_type_of(e))||null===e?e?Vt([],zt(A),!1):void 0===e?LO?void 0:Vt([],zt(A),!1):void 0:0!==e.length?e:void 0},Pu=function(e){var t,n,r;return!(null===(t=null==e?void 0:e.allowlist)||void 0===t?void 0:t.length)&&!(null===(n=null==e?void 0:e.blocklist)||void 0===n?void 0:n.length)&&!(null===(r=null==e?void 0:e.excludelist)||void 0===r?void 0:r.length)},Mu=function(e,t){var n;void 0===t&&(t={});var r=Au(e.url);if(!r)return!1;var i,o=r.host;if(!1!==t.ignoreAmplitudeRequests&&(Ou(o,"*.amplitude.com")||Ou(o,"amplitude.com")))return!1;if(null===(n=t.ignoreHosts)||void 0===n?void 0:n.find(function(e){return Ou(o,e)}))return!1;if(!t.captureRules&&void 0!==e.status&&!Tu(e.status,UO))return!1;if(t.captureRules&&(Vt([],zt(t.captureRules),!1).reverse().find(function(t){if(i=function(e,t,n,r,i){if((!e.hosts||e.hosts.find(function(e){return Ou(t,e)}))&&(!r||!e.urls||qe(r,e.urls))&&(!i||!e.methods||e.methods.find(function(e){return i.toLowerCase()===e.toLowerCase()||"*"===e}))){if(n||0===n){var o=e.statusCodeRange||UO;if(!Tu(n,o))return!1}return!0}}(t,o,e.status,e.url,e.method),i){var n=Ru(t.responseHeaders);if(e.responseWrapper&&n){var r=e.responseWrapper.headers(n);r&&(e.responseHeaders=r)}var s=Ru(t.requestHeaders);if(e.requestWrapper&&s){var a=e.requestWrapper.headers(s);a&&(e.requestHeaders=a)}if(e.responseWrapper&&t.responseBody&&!Pu(t.responseBody)){var u=t.responseBody.excludelist||t.responseBody.blocklist;e.responseBodyJson=e.responseWrapper.json(t.responseBody.allowlist,u)}if(e.requestWrapper&&t.requestBody&&!Pu(t.requestBody)){u=t.requestBody.excludelist||t.requestBody.blocklist;e.requestBodyJson=e.requestWrapper.json(t.requestBody.allowlist,u)}}return void 0!==i}),!i))return!1;return!e.requestWrapper||!function(e,t){if(e.includes("amplitude.com"))try{var n=t.body;if("string"!=typeof n)return!1;if(JSON.parse(n).events.find(function(e){return e.event_type===NO}))return!0}catch(e){}return!1}(o,e.requestWrapper)},Nu=function(e){var t=e.allObservables,n=e.networkTrackingOptions,r=e.amplitude,i=e.loggerProvider;return t.networkObservable.filter(function(e){return Mu(e.event,n)}).subscribe(function(e){var t,n,o,s=e.event,a=Au(s.url);if(a){var u=null===(n=s.responseWrapper)||void 0===n?void 0:n.bodySize,l=null===(o=s.requestWrapper)||void 0===o?void 0:o.bodySize;!function(e,t,n,r){Ft(this,void 0,void 0,function(){var i,o,s;return Bt(this,function(a){switch(a.label){case 0:return t.requestBodyJson||t.responseBodyJson?[4,Promise.all([t.requestBodyJson,t.responseBodyJson])]:[3,2];case 1:if(i=zt.apply(void 0,[a.sent(),2]),o=i[0],s=i[1],o)try{e["[Amplitude] Request Body"]=JSON.stringify(o)}catch(e){null==r||r.debug("Failed to stringify request body",e)}if(s)try{e["[Amplitude] Response Body"]=JSON.stringify(s)}catch(e){null==r||r.debug("Failed to stringify response body")}a.label=2;case 2:return null==n||n.track(NO,e),[2]}})})}(((t={})["[Amplitude] URL"]=a.hrefWithoutQueryOrHash,t["[Amplitude] URL Query"]=a.query,t["[Amplitude] URL Fragment"]=a.fragment,t["[Amplitude] Request Method"]=s.method,t["[Amplitude] Status Code"]=s.status,t["[Amplitude] Start Time"]=s.startTime,t["[Amplitude] Completion Time"]=s.endTime,t["[Amplitude] Duration"]=s.duration,t["[Amplitude] Request Body Size"]=l,t["[Amplitude] Response Body Size"]=u,t["[Amplitude] Request Type"]=s.type,t["[Amplitude] Request Headers"]=s.requestHeaders,t["[Amplitude] Response Headers"]=s.responseHeaders,t),s,r,i)}})},Lu=function(e,t){return JO.get(e)||JO.set(e,new t),JO.get(e)},ju=function(e){var t,n=(null===(t=e.entries[0])||void 0===t?void 0:t.startTime)||0;return performance.timeOrigin+n},Du=function(e){return{value:e.value,rating:e.rating,delta:e.delta,navigationType:e.navigationType,id:e.id,timestamp:Math.floor(ju(e)),navigationStart:Math.floor(performance.timeOrigin)}},Uu=function(e,t,n){return e.event_properties||(e.event_properties={}),void 0===e.event_properties[t]?n:e.event_properties[t]},Fu=function(){if(qT)return qT;var e=VT();return qT={init:function(t,n){return e.init(t,void 0,n)},add:function(t){return e.add(t)},track:function(t,n){return e.track(t,n)},identify:function(t){return e.identify(t)},revenue:function(t){return e.revenue(t)},reset:function(){return e.reset()},setOptOut:function(t){return e.setOptOut(t)},setUserId:function(t){return e.setUserId(t)},setDeviceId:function(t){return e.setDeviceId(t)},setSessionId:function(t){return e.setSessionId(t)},setGroup:function(t,n){return e.setGroup(t,n)},groupIdentify:function(t,n,r){return e.groupIdentify(t,n,r)},Identify:N,Revenue:ie}},Bu=function(e){var t=tu(e)?e.amplitude:void 0;if(void 0===t||qu(t))return t;throw new tC("env.amplitude is not an Amplitude SDK",{code:"config"})},qu=function(e){return tu(e)&&["init","add","track","identify","revenue","reset","setOptOut","setUserId","setDeviceId","setSessionId","setGroup","groupIdentify","Identify","Revenue"].every(function(t){return"function"==typeof e[t]})},zu=function(e,t,n,r){e.debug("Amplitude skipped ".concat(n,": ").concat(r," resolved to nothing"),{event:t.name})},Vu=function(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(n){switch(n.label){case 0:return[4,e()];case 1:return t=n.sent(),tu(t)&&_instanceof(t.promise,Promise)?[4,t.promise]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})})()},Wu=function(e,t,n){return _async_to_generator(function(e,t,n){var r,i,o,s,a,u,l=arguments;return _ts_generator(this,function(c){switch(c.label){case 0:return i=_object_spread({},r=l.length>3&&void 0!==l[3]?l[3]:{}),"user"in n?null!==(o=n.user)&&""!==o?[3,2]:[4,t(function(){return e.setUserId(void 0)})]:[3,4];case 1:return c.sent(),delete i.user,[3,4];case 2:return nu(o)&&o!==r.user?[4,t(function(){return e.setUserId(o)})]:[3,4];case 3:c.sent(),i.user=o,c.label=4;case 4:return"device"in n?(s=n.device,nu(s)&&s!==r.device?[4,t(function(){return e.setDeviceId(s)})]:[3,6]):[3,6];case 5:c.sent(),i.device=s,c.label=6;case 6:return"session"in n?(a=n.session,void 0===(u=eu(a)?a:nu(a)&&/^\d+$/.test(a)?Number(a):nu(a)?function(e){for(var t=5381,n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)|0;return Math.abs(t)}(a):void 0)||u===r.session?[3,8]:[4,t(function(){return e.setSessionId(u)})]):[3,8];case 7:c.sent(),i.session=u,c.label=8;case 8:return[2,i]}})}).apply(this,arguments)},Hu=function(e,t){var n,r=function(){return n||(n=new e.Identify),n},i=!0,o=!1,s=void 0;try{for(var a,u=KT[Symbol.iterator]();!(i=(a=u.next()).done);i=!0){var l=a.value,c=t[l];if(tu(c)){var d=!0,f=!1,h=void 0;try{for(var p,v=Object.entries(c)[Symbol.iterator]();!(d=(p=v.next()).done);d=!0){var g=_sliced_to_array(p.value,2),y=g[0],m=g[1];Za(m)&&("add"===l?eu(m)&&r().add(y,m):r()[l](y,m))}}catch(e){f=!0,h=e}finally{try{d||null==v.return||v.return()}finally{if(f)throw h}}}}}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}if(Xa(t.unset)){var b=!0,w=!1,_=void 0;try{for(var S,k=t.unset[Symbol.iterator]();!(b=(S=k.next()).done);b=!0){var x=S.value;nu(x)&&r().unset(x)}}catch(e){w=!0,_=e}finally{try{b||null==k.return||k.return()}finally{if(w)throw _}}}return!0===t.clearAll&&r().clearAll(),n},Gu=function(e,t){return _async_to_generator(function(){var n,r,i,o,s,a,u,l,c,d,f,h,p,v,g,y,m;return _ts_generator(this,function(b){switch(b.label){case 0:return n=t.apiKey,t.identify,r=t.sessionReplay,i=t.experiment,o=t.engagement,t._state,s=_object_without_properties(t,["apiKey","identify","sessionReplay","experiment","engagement","_state"]),a=_object_spread({autocapture:!1,identityStorage:"none"},s),[4,au(function(){return Vu(function(){return e.init(n,a)})},"vendor-not-ready","Amplitude init failed")];case 1:b.sent(),u=a.serverZone,l=a.instanceName,c=_object_spread({},u?{serverZone:u}:{},l?{instanceName:l}:{}),d=[],r&&d.push(["Session Replay",function(){return _async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:return[4,Promise.resolve().then(function(){return bE(),ck})];case 1:return e=t.sent(),[2,(0,e.sessionReplayPlugin)(_object_spread({},r,c))]}})})()}]),(null==i?void 0:i.deploymentKey)&&d.push(["Experiment",function(){return _async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:return[4,Promise.resolve().then(function(){return zE(),xE})];case 1:return e=t.sent(),[2,(0,e.experimentPlugin)(_object_spread({},i,c))]}})})()}]),o&&d.push(["Guides & Surveys",function(){return _async_to_generator(function(){return _ts_generator(this,function(e){switch(e.label){case 0:return[4,Promise.resolve().then(function(){return WE(),VE})];case 1:return[2,(0,e.sent().plugin)(_object_spread({},!0===o?{}:o,c))]}})})()}]),f=!0,h=!1,p=void 0,b.label=2;case 2:b.trys.push([2,7,8,9]),v=function(){var t,n,r;return _ts_generator(this,function(i){switch(i.label){case 0:return t=_sliced_to_array(y.value,2),n=t[0],r=t[1],[4,au(function(){return _async_to_generator(function(){var t;return _ts_generator(this,function(n){switch(n.label){case 0:return[4,r()];case 1:return t=n.sent(),[4,Vu(function(){return e.add(t)})];case 2:return n.sent(),[2]}})})()},"vendor-not-ready","Amplitude ".concat(n," failed to start"))];case 1:return i.sent(),[2]}})},g=d[Symbol.iterator](),b.label=3;case 3:return(f=(y=g.next()).done)?[3,6]:[5,_ts_values(v())];case 4:b.sent(),b.label=5;case 5:return f=!0,[3,3];case 6:return[3,9];case 7:return m=b.sent(),h=!0,p=m,[3,9];case 8:try{f||null==g.return||g.return()}finally{if(h)throw p}return[7];case 9:return[2]}})})()},Ku=function(e,t,n,r,i,o,s,a){return _async_to_generator(function(){var u,l,c,d,f,h,p,v,g,y,m,b,w,_,S,k,x,E,C,I,O,T,A,R,P,M,N;return _ts_generator(this,function(L){switch(L.label){case 0:return l=n._state||{},void 0===r.reset?[3,5]:"boolean"!=typeof r.reset?[3,1]:(c=r.reset,[3,3]);case 1:return[4,fu(t,r.reset,{collector:s})];case 2:c=L.sent(),L.label=3;case 3:return c?[4,GT(function(){return e.reset()})]:[3,5];case 4:L.sent(),l.lastIdentity={},L.label=5;case 5:return void 0===(d=null!==(u=r.identify)&&void 0!==u?u:n.identify)?[3,9]:[4,fu(t,d,{collector:s})];case 6:return h=L.sent(),tu(h)?(f=h,[4,Wu(e,GT,h,l.lastIdentity)]):[3,8];case 7:return l.lastIdentity=L.sent(),[3,9];case 8:zu(a,t,"identify","identify"),L.label=9;case 9:return f&&(p=Hu(e,f))?[4,GT(function(){return e.identify(p)})]:[3,11];case 10:L.sent(),L.label=11;case 11:return void 0===r.group?[3,15]:[4,fu(t,r.group,{collector:s})];case 12:return v=L.sent(),g=tu(v)?v:{},y=g.type,m=g.name,nu(y)&&(nu(m)||Ju(m))?[4,GT(function(){return e.setGroup(y,m)})]:[3,14];case 13:return L.sent(),[3,15];case 14:zu(a,t,"setGroup","group"),L.label=15;case 15:return void 0===r.groupIdentify?[3,19]:[4,fu(t,r.groupIdentify,{collector:s})];case 16:return b=L.sent(),w=tu(b)?b:{},_=w.type,S=w.name,(k=tu(b)&&nu(_)&&nu(S)?Hu(e,b):void 0)&&nu(_)&&nu(S)?[4,GT(function(){return e.groupIdentify(_,S,k)})]:[3,18];case 17:return L.sent(),[3,19];case 18:zu(a,t,"groupIdentify","groupIdentify"),L.label=19;case 19:return void 0===r.revenue?[3,29]:[4,fu(t,r.revenue,{collector:s})];case 20:x=L.sent(),E=0,C=!0,I=!1,O=void 0,L.label=21;case 21:L.trys.push([21,26,27,28]),T=function(){var t,n;return _ts_generator(this,function(r){switch(r.label){case 0:return t=R.value,tu(t)?(n=function(e,t){var n=new e.Revenue,r=t.productId,i=t.price,o=t.quantity,s=t.revenueType,a=t.currency,u=t.revenue,l=t.receipt,c=t.receiptSig,d=t.eventProperties;return nu(r)&&n.setProductId(r),eu(i)&&n.setPrice(i),eu(o)&&n.setQuantity(o),nu(s)&&n.setRevenueType(s),nu(a)&&n.setCurrency(a),eu(u)&&n.setRevenue(u),nu(l)&&n.setReceipt(l),nu(c)&&n.setReceiptSig(c),tu(d)&&n.setEventProperties(d),n}(e,t),[4,GT(function(){return e.revenue(n)})]):[2,"continue"];case 1:return r.sent(),E++,[2]}})},A=(Xa(x)?x:[x])[Symbol.iterator](),L.label=22;case 22:return(C=(R=A.next()).done)?[3,25]:[5,_ts_values(T())];case 23:L.sent(),L.label=24;case 24:return C=!0,[3,22];case 25:return[3,28];case 26:return P=L.sent(),I=!0,O=P,[3,28];case 27:try{C||null==A.return||A.return()}finally{if(I)throw O}return[7];case 28:E||zu(a,t,"revenue","revenue"),L.label=29;case 29:return!0===(null==i?void 0:i.silent)?[3,31]:(M=nu(null==i?void 0:i.name)?i.name:t.name,N=tu(o)?o:{},[4,GT(function(){return e.track(M,N)})]);case 30:L.sent(),L.label=31;case 31:return n._state=l,[2]}})})()},Ju=function(e){return Xa(e)&&e.every(nu)},$u=Object.create,Qu=Object.defineProperty,Yu=Object.getOwnPropertyDescriptor,Xu=Object.getOwnPropertyNames,Zu=Object.getPrototypeOf,el=Object.prototype.hasOwnProperty,tl=function(e,t){return function(){return e&&(t=(0,e[Xu(e)[0]])(e=0)),t}},nl=function(e,t){return function(){return t||(0,e[Xu(e)[0]])((t={exports:{}}).exports,t),t.exports}},rl=function(e,t){for(var n in t)Qu(e,n,{get:t[n],enumerable:!0})},il=function(e,t,n,r){if(t&&"object"===(void 0===t?"undefined":_type_of(t))||"function"==typeof t){var i=!0,o=!1,s=void 0;try{for(var a,u=function(){var i=a.value;el.call(e,i)||i===n||Qu(e,i,{get:function(){return t[i]},enumerable:!(r=Yu(t,i))||r.enumerable})},l=Xu(t)[Symbol.iterator]();!(i=(a=l.next()).done);i=!0)u()}catch(e){o=!0,s=e}finally{try{i||null==l.return||l.return()}finally{if(o)throw s}}}return e},ol=function(e,t,n){return n=null!=e?$u(Zu(e)):{},il(!t&&e&&e.__esModule?n:Qu(n,"default",{value:e,enumerable:!0}),e)},sl=function(e,t,n){return function(e,t,n){return t in e?Qu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==(void 0===t?"undefined":_type_of(t))?t+"":t,n)},al=tl({"../../../../node_modules/tslib/tslib.es6.mjs":function(){e=function(t,n){return(e=Object.setPrototypeOf||_instanceof({__proto__:[]},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])})(t,n)},t=function(){return t=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},t.apply(this,arguments)}}}),ul=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/event/event.js":function(){var e,t;(e=n||(n={})).SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll",(t=r||(r={})).IDENTIFY="$identify",t.GROUP_IDENTIFY="$groupidentify",t.REVENUE="revenue_amount"}}),ll=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/constants.js":function(){i="-",s="".concat(o="AMP","_unsent"),a="$default_instance",u="https://api2.amplitude.com/2/httpapi",l="https://api.eu.amplitude.com/2/httpapi",c="https://api2.amplitude.com/batch",d="https://api.eu.amplitude.com/batch",f="utm_campaign",h="utm_content",p="utm_id",v="utm_medium",g="utm_source",y="utm_term",m="dclid",b="fbclid",w="gbraid",_="gclid",S="ko_click_id",k="li_fat_id",x="msclkid",E="rdt_cid",C="ttclid",I="twclid",O="wbraid",T={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rdt_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},A=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],R=["authorization","cookie","set-cookie"]}}),cl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.js":function(){al(),P=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var n=e[t];if(!M(t,n))return!1}return!0},M=function(e,t){var n,r;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=qt(t),s=o.next();!s.done;s=o.next()){var a=s.value;if(Array.isArray(a))return!1;if("object"===(void 0===a?"undefined":_type_of(a)))i=i&&P(a);else if(!["number","string"].includes(void 0===a?"undefined":_type_of(a)))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;if("object"===(void 0===t?"undefined":_type_of(t)))return P(t);if(!["number","string","boolean"].includes(void 0===t?"undefined":_type_of(t)))return!1}return!0}}}),dl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/identify.js":function(){var e;al(),ll(),cl(),N=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return t({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(L.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(L.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(L.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(L.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(L.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(L.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(L.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(L.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(L.UNSET,e,i),this},e.prototype.clearAll=function(){return this._properties={},this._properties[L.CLEAR_ALL]=i,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[L.CLEAR_ALL]&&(!this._propertySet.has(t)&&(e===L.ADD?"number"==typeof n:e===L.UNSET||e===L.REMOVE||M(t,n)))},e}(),(e=L||(L={})).SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll",j=[L.CLEAR_ALL,L.UNSET,L.SET,L.SET_ONCE,L.ADD,L.APPEND,L.PREPEND,L.PREINSERT,L.POSTINSERT,L.REMOVE]}}),fl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/messages.js":function(){D="Event tracked successfully",U="Unexpected error occurred",F="Event rejected due to exceeded retry count",B="Event skipped due to optOut config",q="Event rejected due to missing API key",z="Invalid API key",V="Client not initialized"}}),hl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/status.js":function(){var e;(e=W||(W={})).Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}}),pl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/result-builder.js":function(){hl(),H=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=W.Unknown),{event:e,code:t,message:n}}}}),vl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/global-scope.js":function(){G=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:"undefined"!=typeof global?global:void 0}}}),gl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js":function(){al(),vl(),K=function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,$)},J=Vt([],zt(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),$=function(e){var t,n=G();if(!(null===(t=null==n?void 0:n.crypto)||void 0===t?void 0:t.getRandomValues))return K(e);var r=n.crypto.getRandomValues(new Uint8Array(16));return r[6]=15&r[6]|64,r[8]=63&r[8]|128,Vt([],zt(r.entries()),!1).map(function(e){var t=zt(e,2),n=t[0],r=t[1];return[4,6,8,10].includes(n)?"-".concat(J[r]):J[r]}).join("")}}}),yl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/timeline.js":function(){al(),pl(),gl(),Q=function(){function e(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[],this.pluginStatus=new Map,this._optOutListeners=[]}return e.prototype.register=function(e,t){var n,r;return Ft(this,void 0,void 0,function(){var i;return Bt(this,function(o){switch(o.label){case 0:return void 0===e.name&&(e.name=$(),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."))),i=e.name,this.pluginStatus.has(i)?(this.loggerProvider.warn("Plugin with name ".concat(i," already exists, skipping registration")),[2]):(e.type=null!==(n=e.type)&&void 0!==n?n:"enrichment",this.pluginStatus.set(i,"locked"),[4,null===(r=e.setup)||void 0===r?void 0:r.call(e,t,this.client)]);case 1:return o.sent(),"locked"!==this.pluginStatus.get(i)?[2]:(this.plugins.push(e),this.pluginStatus.set(i,"installed"),[2])}})})},e.prototype.deregister=function(e,t){var n;return Ft(this,void 0,void 0,function(){var r,i;return Bt(this,function(o){switch(o.label){case 0:return this.pluginStatus.delete(e),-1===(r=this.plugins.findIndex(function(t){return t.name===e}))?(t.loggerProvider.warn("Plugin with name ".concat(e," does not exist, skipping deregistration")),[2]):(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._clearOptOutListeners(),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.pluginStatus.clear(),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 Ft(this,void 0,void 0,function(){var n,r,i,o,s,a,u,l,c,d,f,h,p,v,g,y,m,b,w,_;return Bt(this,function(S){switch(S.label){case 0:if(!e)return[2];n=zt(e,1),r=n[0],i=zt(e,2),o=i[1],this.loggerProvider.log("Timeline.apply: Initial event",r),s=this.plugins.filter(function(e){return"before"===e.type}),S.label=1;case 1:S.trys.push([1,6,7,8]),a=qt(s),u=a.next(),S.label=2;case 2:return u.done?[3,5]:(h=u.value).execute?[4,h.execute(t({},r))]:[3,4];case 3:if(null===(p=S.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(h.name),"', event: ").concat(JSON.stringify(r))),o({event:r,code:0,message:""}),[2];r=p,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(h.name),"', event: ").concat(JSON.stringify(r))),S.label=4;case 4:return u=a.next(),[3,2];case 5:return[3,8];case 6:return l=S.sent(),m={error:l},[3,8];case 7:try{u&&!u.done&&(b=a.return)&&b.call(a)}finally{if(m)throw m.error}return[7];case 8:c=this.plugins.filter(function(e){return"enrichment"===e.type||void 0===e.type}),S.label=9;case 9:S.trys.push([9,14,15,16]),d=qt(c),f=d.next(),S.label=10;case 10:return f.done?[3,13]:(h=f.value).execute?[4,h.execute(t({},r))]:[3,12];case 11:if(null===(p=S.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(h.name),"', event: ").concat(JSON.stringify(r))),o({event:r,code:0,message:""}),[2];r=p,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(h.name),"', event: ").concat(JSON.stringify(r))),S.label=12;case 12:return f=d.next(),[3,10];case 13:return[3,16];case 14:return v=S.sent(),w={error:v},[3,16];case 15:try{f&&!f.done&&(_=d.return)&&_.call(d)}finally{if(w)throw w.error}return[7];case 16:return g=this.plugins.filter(function(e){return"destination"===e.type}),this.loggerProvider.log("Timeline.apply: Final event before destinations, event: ".concat(JSON.stringify(r))),y=g.map(function(e){var n=t({},r);return e.execute(n).catch(function(e){return H(n,0,String(e))})}),Promise.all(y).then(function(e){var t=zt(e,1)[0]||H(r,100,"Event not tracked, no destination plugins on the instance");o(t)}),[2]}})})},e.prototype.flush=function(){return Ft(this,void 0,void 0,function(){var e,t,n,r=this;return Bt(this,function(i){switch(i.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(e){return r.apply(e)}))];case 1:return i.sent(),t=this.plugins.filter(function(e){return"destination"===e.type}),n=t.map(function(e){return e.flush&&e.flush()}),[4,Promise.all(n)];case 2:return i.sent(),[2]}})})},e.prototype.addOptOutListener=function(e){this._optOutListeners.push(e)},e.prototype._clearOptOutListeners=function(){this._optOutListeners=[]},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)}),this._callOptOutListeners(e)},e.prototype._callOptOutListeners=function(e){return Ft(this,void 0,void 0,function(){var t,n,r,i,o,s,a;return Bt(this,function(u){switch(u.label){case 0:u.trys.push([0,7,8,9]),t=qt(this._optOutListeners),n=t.next(),u.label=1;case 1:if(n.done)return[3,6];r=n.value,u.label=2;case 2:return u.trys.push([2,4,,5]),[4,r(e)];case 3:return u.sent(),[3,5];case 4:return i=u.sent(),this.loggerProvider.error("Error calling optOut listener",i),[3,5];case 5:return n=t.next(),[3,1];case 6:return[3,9];case 7:return o=u.sent(),s={error:o},[3,9];case 8:try{n&&!n.done&&(a=t.return)&&a.call(t)}finally{if(s)throw s.error}return[7];case 9:return[2]}})})},e.prototype.onReset=function(){this.plugins.forEach(function(e){var t;null===(t=e.onReset)||void 0===t||t.call(e)})},e}()}}),ml=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js":function(){al(),dl(),ul(),Y=function(e,n,r){return t(t(t({},"string"==typeof e?{event_type:e}:e),r),n&&{event_properties:n})},X=function(e,n){return t(t({},n),{event_type:r.IDENTIFY,user_properties:e.getUserProperties()})},Z=function(e,n,i,o){var s;return t(t({},o),{event_type:r.GROUP_IDENTIFY,group_properties:i.getUserProperties(),groups:(s={},s[e]=n,s)})},ee=function(e,n,i){var o,s=new N;return s.set(e,n),t(t({},i),{event_type:r.IDENTIFY,user_properties:s.getUserProperties(),groups:(o={},o[e]=n,o)})},te=function(e,n){return t(t({},n),{event_type:r.REVENUE,event_properties:e.getEventProperties()})}}}),bl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js":function(){ne=function(e){return{promise:e||Promise.resolve()}}}}),wl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/core-client.js":function(){al(),ul(),dl(),fl(),yl(),ml(),pl(),bl(),re=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 Q(this),this.name=e}return e.prototype._init=function(e){return Ft(this,void 0,void 0,function(){return Bt(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 Ft(this,void 0,void 0,function(){var t,n,r,i,o,s,a,u;return Bt(this,function(l){switch(l.label){case 0:t=this[e],this[e]=[],l.label=1;case 1:l.trys.push([1,8,9,10]),n=qt(t),r=n.next(),l.label=2;case 2:return r.done?[3,7]:(i=r.value,(o=i())&&"promise"in o?[4,o.promise]:[3,4]);case 3:return l.sent(),[3,6];case 4:return[4,o];case 5:l.sent(),l.label=6;case 6:return r=n.next(),[3,2];case 7:return[3,10];case 8:return s=l.sent(),a={error:s},[3,10];case 9:try{r&&!r.done&&(u=n.return)&&u.call(n)}finally{if(a)throw a.error}return[7];case 10:return this[e].length?[4,this.runQueuedFunctions(e)]:[3,12];case 11:l.sent(),l.label=12;case 12:return[2]}})})},e.prototype.track=function(e,t,n){var r=Y(e,t,n);return this.userProperties=this.getOperationAppliedUserProperties(r.user_properties),ne(this.dispatch(r))},e.prototype.identify=function(e,t){var n=X(e,t);return this.userProperties=this.getOperationAppliedUserProperties(n.user_properties),ne(this.dispatch(n))},e.prototype.groupIdentify=function(e,t,n,r){var i=Z(e,t,n,r);return ne(this.dispatch(i))},e.prototype.setGroup=function(e,t,n){var r=ee(e,t,n);return this.userProperties=this.getOperationAppliedUserProperties(r.user_properties),ne(this.dispatch(r))},e.prototype.revenue=function(e,t){var n=te(e,t);return ne(this.dispatch(n))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),ne())},e.prototype._addPlugin=function(e){return ne(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)),ne())},e.prototype._removePlugin=function(e){return ne(this.timeline.deregister(e,this.config))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(H(e,0,V));this.process(e).then(t)},e.prototype.dispatch=function(e){return Ft(this,void 0,void 0,function(){var t=this;return Bt(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 r,i=null!==(r=this.userProperties)&&void 0!==r?r:{},o=t({},i);if(void 0===e)return o;var s={};return Object.keys(e).forEach(function(t){Object.values(n).includes(t)||(s[t]=e[t])}),j.forEach(function(t){if(Object.keys(e).includes(t)){var r=e[t];switch(t){case n.CLEAR_ALL:Object.keys(o).forEach(function(e){delete o[e]});break;case n.UNSET:Object.keys(r).forEach(function(e){delete o[e]});break;case n.SET:Object.assign(o,r)}}}),Object.assign(o,s),o},e.prototype.process=function(e){return Ft(this,void 0,void 0,function(){var t,n,i;return Bt(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),this.config.optOut?[2,H(e,0,B)]:(e.event_type===r.IDENTIFY&&this.timeline.onIdentityChanged({userProperties:this.userProperties}),[4,this.timeline.push(e)]);case 1:return 200===(i=o.sent()).code?this.config.loggerProvider.log(i.message):100===i.code?this.config.loggerProvider.warn(i.message):this.config.loggerProvider.error(i.message),[2,i];case 2:return t=o.sent(),n=String(t),this.config.loggerProvider.error(n),[2,i=H(e,0,n)];case 3:return[2]}})})},e.prototype.setOptOut=function(e){this.isReady?this._setOptOut(e):this.q.push(this._setOptOut.bind(this,Boolean(e)))},e.prototype._setOptOut=function(e){this.config.optOut!==e&&(this.config.optOut=Boolean(e),this.timeline.onOptOutChanged(e))},e.prototype.flush=function(){return ne(this.timeline.flush())},e.prototype.plugin=function(e){var t=this.timeline.plugins.find(function(t){return t.name===e});if(void 0!==t)return t;this.config.loggerProvider.debug("Cannot find plugin with name ".concat(e))},e.prototype.plugins=function(e){return this.timeline.plugins.filter(function(t){return _instanceof(t,e)})},e}()}}),_l=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/revenue.js":function(){var e;al(),cl(),ie=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){try{var t=JSON.parse(JSON.stringify(e));P(t)&&(this.properties=t)}catch(e){}return this},e.prototype.getEventProperties=function(){var e=this.properties?t({},this.properties):{};return e[oe.REVENUE_PRODUCT_ID]=this.productId,e[oe.REVENUE_QUANTITY]=this.quantity,e[oe.REVENUE_PRICE]=this.price,e[oe.REVENUE_TYPE]=this.revenueType,e[oe.REVENUE_CURRENCY]=this.currency,e[oe.REVENUE]=this.revenue,e[oe.RECEIPT]=this.receipt,e[oe.RECEIPT_SIG]=this.receiptSig,e},e}(),(e=oe||(oe={})).REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue",e.RECEIPT="$receipt",e.RECEIPT_SIG="$receiptSig"}}),Sl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/chunk.js":function(){se=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},[])}}}),kl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/loglevel.js":function(){var e;(e=ae||(ae={}))[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"}}),xl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/logger.js":function(){kl(),ue="Amplitude Logger ",le=function(){function e(){this.logLevel=ae.None}return e.prototype.disable=function(){this.logLevel=ae.None},e.prototype.enable=function(e){void 0===e&&(e=ae.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<ae.Verbose||console.log("".concat(ue,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<ae.Warn||console.warn("".concat(ue,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<ae.Error||console.error("".concat(ue,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<ae.Debug||console.log("".concat(ue,"[Debug]: ").concat(e.join(" ")))},e}()}}),El=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/config.js":function(){ll(),xl(),kl(),ce=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:a,logLevel:ae.Warn,loggerProvider:new le,offline:!1,optOut:!1,serverUrl:u,serverZone:"US",useBatch:!1}},de=function(){function e(e){var t,n,r,i;this._optOut=!1;var o=ce();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=he(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},enumerable:!1,configurable:!0}),e}(),fe=function(e,t){return"EU"===e?t?d:l:t?c:u},he=function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=ce().serverZone),void 0===n&&(n=ce().useBatch),e)return{serverUrl:e,serverZone:void 0};var r=["US","EU"].includes(t)?t:ce().serverZone;return{serverZone:r,serverUrl:fe(r,n)}},pe=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}()}}),Cl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/status-code.js":function(){}}),Il=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js":function(){al(),kl(),ve=function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map(function(e){return e.trim()})},ge=function(e){return function(){var n=t({},e.config);return{logger:n.loggerProvider,logLevel:n.logLevel}}},ye=function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=qt(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},me=function(e,t){return function(){var n,r,i={};try{for(var o=qt(t),s=o.next();!s.done;s=o.next()){var a=s.value;i[a]=ye(e,a)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}},be=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 a=n(),u=a.logger,l=a.logLevel;if(l&&l<ae.Debug||!l||!u)return e.apply(i,o);var c={type:"invoke public method",name:t,args:o,stacktrace:ve(1),time:{start:(new Date).toISOString()},states:{}};r&&c.states&&(c.states.before=r());var d=e.apply(i,o);return d&&d.promise?d.promise.then(function(){r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=(new Date).toISOString()),u.debug(JSON.stringify(c,null,2))}):(r&&c.states&&(c.states.after=r()),c.time&&(c.time.end=(new Date).toISOString()),u.debug(JSON.stringify(c,null,2))),d}}}}),Ol=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js":function(){al(),hl(),fl(),ll(),Sl(),pl(),El(),gl(),Cl(),Il(),we=new Set([u,l,c,d]),_e=function(e,t){return void 0===t&&(t=!1),!!we.has(e)||t},Se=function(){function e(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=[],this.diagnosticsClient=null==e?void 0:e.diagnosticsClient}return e.prototype.setup=function(e){var t;return Ft(this,void 0,void 0,function(){var n,r=this;return Bt(this,function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(s,"_").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=$()),new Promise(function(n){var r={event:e,attempts:0,callback:function(e){return n(e)},timeout:0};t.queue.push(r),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,F),!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)return null===this.scheduleId||this.scheduleId&&e>this.scheduledTimeout?(this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=e,void(this.scheduleId=setTimeout(function(){t.queue=t.queue.map(function(e){return e.timeout=0,e}),t.flush(!0)},e))):void 0},e.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},e.prototype.flush=function(e){return void 0===e&&(e=!1),Ft(this,void 0,void 0,function(){var t,n,r=this;return Bt(this,function(i){switch(i.label){case 0:return this.config.offline?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush while offline."),[2]):this.flushId?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush because previous flush has not resolved."),[2]):(this.flushId=this.scheduleId,this.resetSchedule(),t=[],n=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):n.push(e)}),[4,se(t,this.config.flushQueueSize).reduce(function(t,n){return Ft(r,void 0,void 0,function(){return Bt(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){var n;return void 0===t&&(t=!0),Ft(this,void 0,void 0,function(){var r,i,o,s,a,u;return Bt(this,function(l){switch(l.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,q)];r={api_key:this.config.apiKey,events:e.map(function(e){var t=e.event;t.extra;return Ut(t,["extra"])}),options:{min_id_length:this.config.minIdLength},client_upload_time:(new Date).toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new pe,l.label=1;case 1:return l.trys.push([1,3,,4]),i=he(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,o=_e(i,this.config.enableRequestBodyCompression),[4,this.config.transportProvider.send(i,r,o)];case 2:return null===(s=l.sent())?(this.fulfillRequest(e,0,U),[2]):t?(this.handleResponse(s,e),[3,4]):("body"in s?this.fulfillRequest(e,s.statusCode,"".concat(s.status,": ").concat(Ht(s))):this.fulfillRequest(e,s.statusCode,s.status),[2]);case 3:return a=l.sent(),u=_instanceof(c=a,Error)?c.message:String(c),this.config.loggerProvider.error(u),null===(n=this.diagnosticsClient)||void 0===n||n.recordEvent("analytics.events.unsuccessful.from.catch.error",{events:e.map(function(e){return e.event.event_type}),message:u,stack_trace:ve()}),this.handleResponse({status:W.Failed,statusCode:0},e),[3,4];case 4:return[2]}var c})})},e.prototype.handleResponse=function(e,t){var n;Wt(e.statusCode)||null===(n=this.diagnosticsClient)||void 0===n||n.recordEvent("analytics.events.unsuccessful",{events:t.map(function(e){return e.event.event_type}),code:e.statusCode,status:e.status,body:Ht(e),stack_trace:ve()});var r=e.status;switch(r){case W.Success:this.handleSuccessResponse(e,t);break;case W.Invalid:this.handleInvalidResponse(e,t);break;case W.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case W.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn("{code: 0, error: \"Status '".concat(r,"' provided for ").concat(t.length,' events"}')),this.handleOtherResponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,D)},e.prototype.handleInvalidResponse=function(e,t){var n=this;if(e.body.missingField||e.body.error.startsWith(z))this.fulfillRequest(t,e.statusCode,e.body.error);else{var r=Vt(Vt(Vt(Vt([],zt(Object.values(e.body.eventsWithInvalidFields)),!1),zt(Object.values(e.body.eventsWithMissingFields)),!1),zt(Object.values(e.body.eventsWithInvalidIdLengths)),!1),zt(e.body.silencedEvents),!1).flat(),i=new Set(r),o=t.filter(function(t,r){if(!i.has(r))return!0;n.fulfillRequest([t],e.statusCode,e.body.error)});o.length>0&&this.config.loggerProvider.warn(Ht(e));var s=this.removeEventsExceedFlushMaxRetries(o);this.scheduleEvents(s)}},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(1!==t.length){this.config.loggerProvider.warn(Ht(e)),this.config.flushQueueSize/=2;var n=this.removeEventsExceedFlushMaxRetries(t);this.scheduleEvents(n)}else this.fulfillRequest(t,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,r=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,s=new Set(r),a=new Set(i),u=new Set(o),l=t.filter(function(t,r){if(!(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&a.has(t.event.device_id)))return u.has(r)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)});l.length>0&&this.config.loggerProvider.warn(Ht(e));var c=this.removeEventsExceedFlushMaxRetries(l);this.scheduleEvents(c)},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){var r,i,o;Wt(t)?null===(o=this.diagnosticsClient)||void 0===o||o.increment("analytics.events.sent",e.length):(null===(r=this.diagnosticsClient)||void 0===r||r.increment("analytics.events.dropped",e.length),null===(i=this.diagnosticsClient)||void 0===i||i.recordEvent("analytics.events.dropped",{events:e.map(function(e){return e.event.event_type}),code:t,message:n,stack_trace:ve()})),this.removeEvents(e),e.forEach(function(e){return e.callback(H(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}()}}),Tl=tl({"../../../../node_modules/@amplitude/analytics-connector/dist/analytics-connector.esm.js":function(){ke=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:xe(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),xe=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},Ee=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}(),Ce=function(){return Ce=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},Ce.apply(this,arguments)},Ie=function(e,t){var n,r,i=void 0===e?"undefined":_type_of(e);if(i!==(void 0===t?"undefined":_type_of(t)))return!1;try{for(var o=Gt(["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)return!1;if(e.length!==t.length)return!1;var a=Array.isArray(e),u=Array.isArray(t);if(a!==u)return!1;if(!a||!u){var l=Object.keys(e).sort(),c=Object.keys(t).sort();if(!Ie(l,c))return!1;var d=!0;return Object.keys(e).forEach(function(n){Ie(e[n],t[n])||(d=!1)}),d}for(var f=0;f<e.length;f++)if(!Ie(e[f],t[f]))return!1;return!0},Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}),Oe=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=Ce({},this.identity.userProperties),n=Ce(Ce({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},setOptOut:function(e){return n.optOut=e,this},updateUserProperties:function(e){var t,r,i,o,s,a,u=n.userProperties||{};try{for(var l=Gt(Object.entries(e)),c=l.next();!c.done;c=l.next()){var d=Kt(c.value,2),f=d[0],h=d[1];switch(f){case"$set":try{for(var p=(i=void 0,Gt(Object.entries(h))),v=p.next();!v.done;v=p.next()){var g=Kt(v.value,2),y=g[0],m=g[1];u[y]=m}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}break;case"$unset":try{for(var b=(s=void 0,Gt(Object.keys(h))),w=b.next();!w.done;w=b.next()){delete u[y=w.value]}}catch(e){s={error:e}}finally{try{w&&!w.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}break;case"$clearAll":u={}}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}return n.userProperties=u,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return Ce({},this.identity)},e.prototype.setIdentity=function(e){var t=Ce({},this.identity);this.identity=Ce({},e),Ie(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}(),Te="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:self,Ae=function(){function e(){this.identityStore=new Oe,this.eventBridge=new Ee,this.applicationContextProvider=new ke}return e.getInstance=function(t){return Te.analyticsConnectorInstances||(Te.analyticsConnectorInstances={}),Te.analyticsConnectorInstances[t]||(Te.analyticsConnectorInstances[t]=new e),Te.analyticsConnectorInstances[t]},e}()}}),Al=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/analytics-connector.js":function(){Tl(),ll(),Re=function(e){return void 0===e&&(e=a),Ae.getInstance(e)},Pe=function(e,t){Re(t).identityStore.editIdentity().setUserId(e).commit()},Me=function(e,t){Re(t).identityStore.editIdentity().setDeviceId(e).commit()}}}),Rl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/plugins/identity.js":function(){al(),Al(),Ne=function(){function e(){this.name="identity",this.type="before",this.identityStore=Re().identityStore}return e.prototype.execute=function(e){return Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return Ft(this,void 0,void 0,function(){return Bt(this,function(t){return e.instanceName&&(this.identityStore=Re(e.instanceName).identityStore),[2]})})},e}()}}),Pl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/session.js":function(){Le=function(e,t){return void 0===t&&(t=Date.now()),Date.now()-t>e}}}),Ml=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/cookie-name.js":function(){ll(),je=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[o,t,e.substring(0,n)].filter(Boolean).join("_")},De=function(e){return"".concat(o.toLowerCase(),"_").concat(e.substring(0,6))}}}),Nl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/language.js":function(){Ue=function(){var e,t,n,r;if("undefined"==typeof navigator)return"";var 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:""}}}),Ll=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/query-params.js":function(){vl(),Fe=function(){var e,t=G();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=Be(n[0]),i=Be(n[1]);return i?(e[r]=i,e):e},{}):{}},Be=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}}}}),jl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/url-utils.js":function(){qe=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},ze=function(e,t){var n=e;try{n=decodeURI(e)}catch(e){null==t||t.error("Malformed URI sequence: ",e)}return n}}}),Dl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/sampling.js":function(){Ve=function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++){t=(t<<5)-t+e.charCodeAt(n),t|=0}return t},We=function(e,t){var n=Ve(e.toString());return 31*Math.abs(n)%1e5/1e5<t}}}),Ul=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/omit-undefined.js":function(){He=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t}}}),Fl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/storage/memory.js":function(){al(),Ge=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return Ft(this,void 0,void 0,function(){return Bt(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return Ft(this,void 0,void 0,function(){return Bt(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return Ft(this,void 0,void 0,function(){var t;return Bt(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 Ft(this,void 0,void 0,function(){return Bt(this,function(n){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return Ft(this,void 0,void 0,function(){return Bt(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return Ft(this,void 0,void 0,function(){return Bt(this,function(e){return this.memoryStorage.clear(),[2]})})},e}()}}),Bl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/storage/cookie.js":function(){al(),vl(),Ke=function(){var e,t=G();return null===(e=null==t?void 0:t.navigator)||void 0===e?void 0:e.locks},Je=function(){function e(e,n){void 0===n&&(n={}),this.options=t({},e),this.config=n}return e.prototype.isEnabled=function(){return Ft(this,void 0,void 0,function(){var n,r,i,o,s=this;return Bt(this,function(a){switch(a.label){case 0:return n="AMP_TEST",r=t({},this.options),i=new e(r),o=String(Date.now()),[4,i.transaction(n,function(e){var t,r;try{e.set(o);var i=e.get()===o;return!i&&s.config.diagnosticsClient&&(null===(t=s.config.diagnosticsClient)||void 0===t||t.recordEvent("cookies.isEnabled.failure",{reason:"Test Value mismatch",testKey:n,testValue:o,sync:!0})),i}catch(e){if(s.config.diagnosticsClient){var a=_instanceof(e,Error)?e.message:String(e);null===(r=s.config.diagnosticsClient)||void 0===r||r.recordEvent("cookies.isEnabled.failure",{reason:"Cookie getter/setter failed",testKey:n,testValue:o,error:a,sync:!0})}return!1}finally{e.set(null)}})];case 1:return[2,a.sent()]}})})},e.prototype.get=function(e){return Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){switch(n.label){case 0:return[4,this.getRaw(e)];case 1:return t=n.sent(),[2,this.decodeCookieValue(e,t)]}})})},e.prototype.decodeCookieValue=function(e,t){if(t)try{var n=Ye(t);return void 0===n?void console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(e,", value: ").concat(t)):JSON.parse(n)}catch(n){return void console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(e,", value: ").concat(t))}},e.prototype.getSync=function(e){var t=this.getRawSync(e);return this.decodeCookieValue(e,t)},e.prototype.getRaw=function(e){var t,n;return Ft(this,void 0,void 0,function(){var r,i,o,s,a,u,l,c,d;return Bt(this,function(f){switch(f.label){case 0:r=G(),i=r,f.label=1;case 1:return f.trys.push([1,4,,5]),(o=null==i?void 0:i.cookieStore)?[4,o.getAll(e)]:[3,3];case 2:if(s=f.sent()){s.length>1&&(null===(t=this.config.diagnosticsClient)||void 0===t||t.recordEvent("cookies.duplicate",{cookies:s.map(function(e){return e.domain})}),null===(n=this.config.diagnosticsClient)||void 0===n||n.increment("cookies.duplicate.occurrence.cookieStore"));try{for(a=qt(s),u=a.next();!u.done;u=a.next())if(l=u.value,Xe(l.domain,this.options.domain))return[2,l.value]}catch(e){c={error:e}}finally{try{u&&!u.done&&(d=a.return)&&d.call(a)}finally{if(c)throw c.error}}}f.label=3;case 3:return[3,5];case 4:return f.sent(),[3,5];case 5:return[2,this.getRawSync(e)]}})})},e.prototype.getRawSync=function(e){var t,n,r=this,i=G(),o=(null!==(n=null===(t=null==i?void 0:i.document)||void 0===t?void 0:t.cookie.split("; "))&&void 0!==n?n:[]).filter(function(t){return 0===t.indexOf(e+"=")}),s=void 0,a=this.config.duplicateResolverFn;if("function"==typeof a&&o.length>1&&(s=o.find(function(t){var n;try{var i=a(t.substring(e.length+1));return i||null===(n=r.config.diagnosticsClient)||void 0===n||n.increment("cookies.duplicate.occurrence.document.cookie"),i}catch(e){return!1}})),s||(s=o[0]),s)return s.substring(e.length+1)},e.prototype.set=function(e,t){return Ft(this,void 0,void 0,function(){return Bt(this,function(n){return this.setSync(e,t),[2]})})},e.prototype.setSync=function(e,t){var n;try{var r=null!==(n=this.options.expirationDays)&&void 0!==n?n:0,i=null!==t?r:-1,o=void 0;if(i){var s=new Date;s.setTime(s.getTime()+24*i*60*60*1e3),o=s}var a="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t))));o&&(a+="; expires=".concat(o.toUTCString())),a+="; path=/",this.options.domain&&(a+="; domain=".concat(this.options.domain)),this.options.secure&&(a+="; Secure"),this.options.sameSite&&(a+="; SameSite=".concat(this.options.sameSite));var u=G();(null==u?void 0:u.document)&&(u.document.cookie=a)}catch(t){var l=_instanceof(t,Error)?t.message:String(t);console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(e,". Error: ").concat(l))}},e.prototype.remove=function(e){return Ft(this,void 0,void 0,function(){return Bt(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 Ft(this,void 0,void 0,function(){return Bt(this,function(e){return[2]})})},e.isDomainWritable=function(t){return Ft(this,void 0,void 0,function(){var n,r;return Bt(this,function(i){switch(i.label){case 0:if(e.cachedTlds[t])return[2,!0];n="AMP_TLDTEST",r=new e({domain:"."+t}),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,r.transaction(n,function(n){if(e.cachedTlds[t])return!0;try{n.set(1);var r=!!n.get();return r&&(e.cachedTlds[t]=!0),r}finally{n.set(null)}})];case 2:return[2,!!i.sent()];case 3:return i.sent(),[2,!1];case 4:return[2]}})})},e.prototype.transaction=function(e,t){return Ft(this,void 0,void 0,function(){var n,r,i=this;return Bt(this,function(o){switch(o.label){case 0:if(n=Ke(),r=function(){return t({get:function(){return i.getSync(e)},set:function(t){return i.setSync(e,t)}})},!n)return[2,r()];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,n.request("com.amplitude:cookie-lock:".concat(e),r)];case 2:return[2,o.sent()];case 3:return o.sent(),[2,r()];case 4:return[2]}})})},e.cachedTlds={},e}(),$e=function(e){try{return decodeURIComponent(atob(e))}catch(e){return}},Qe=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch(e){return}},Ye=function(e){var t;return null!==(t=$e(e))&&void 0!==t?t:Qe(e)},Xe=function(e,t){if(""===e&&""===t)return!0;if(!e||!t)return!1;var n=e.startsWith(".")?e.substring(1):e,r=t.startsWith(".")?t.substring(1):t;return n.toLowerCase()===r.toLowerCase()}}}),ql=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/storage/helpers.js":function(){ll(),Ze=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[o,t,e.substring(0,n)].filter(Boolean).join("_")}}}),zl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/storage/browser-storage.js":function(){al(),et=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return Ft(this,void 0,void 0,function(){var t,n,r;return Bt(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 Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(t=n.sent())?[2,JSON.parse(t)]:[2,void 0];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 Ft(this,void 0,void 0,function(){return Bt(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 Ft(this,void 0,void 0,function(){return Bt(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 Ft(this,void 0,void 0,function(){return Bt(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 Ft(this,void 0,void 0,function(){return Bt(this,function(t){try{null===(e=this.storage)||void 0===e||e.clear()}catch(e){}return[2]})})},e}()}}),Vl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/diagnostics/diagnostics-storage.js":function(){al(),vl(),tt={TAGS:"tags",COUNTERS:"counters",HISTOGRAMS:"histograms",EVENTS:"events",INTERNAL:"internal"},nt={LAST_FLUSH_TIMESTAMP:"last_flush_timestamp"},rt=function(){function e(e,t){this.dbPromise=null,this.logger=t,this.dbName="AMP_diagnostics_".concat(e.substring(0,10))}return e.isSupported=function(){var e;return void 0!==(null===(e=G())||void 0===e?void 0:e.indexedDB)},e.prototype.getDB=function(){return Ft(this,void 0,void 0,function(){return Bt(this,function(e){return this.dbPromise||(this.dbPromise=this.openDB()),[2,this.dbPromise]})})},e.prototype.openDB=function(){var e=this;return new Promise(function(t,n){var r=indexedDB.open(e.dbName,1);r.onerror=function(){e.dbPromise=null,n(new Error("Failed to open IndexedDB"))},r.onsuccess=function(){var n=r.result;n.onclose=function(){e.dbPromise=null,e.logger.debug("DiagnosticsStorage: DB connection closed.")},n.onerror=function(t){e.logger.debug("DiagnosticsStorage: A global database error occurred.",t),n.close()},t(n)},r.onupgradeneeded=function(t){var n=t.target.result;e.createTables(n)}})},e.prototype.createTables=function(e){(e.objectStoreNames.contains(tt.TAGS)||e.createObjectStore(tt.TAGS,{keyPath:"key"}),e.objectStoreNames.contains(tt.COUNTERS)||e.createObjectStore(tt.COUNTERS,{keyPath:"key"}),e.objectStoreNames.contains(tt.HISTOGRAMS)||e.createObjectStore(tt.HISTOGRAMS,{keyPath:"key"}),e.objectStoreNames.contains(tt.EVENTS))||e.createObjectStore(tt.EVENTS,{keyPath:"id",autoIncrement:!0}).createIndex("time_idx","time",{unique:!1});e.objectStoreNames.contains(tt.INTERNAL)||e.createObjectStore(tt.INTERNAL,{keyPath:"key"})},e.prototype.setTags=function(e){return Ft(this,void 0,void 0,function(){var t,n,r,i,o=this;return Bt(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),0===Object.entries(e).length?[2]:[4,this.getDB()];case 1:return t=s.sent(),n=t.transaction([tt.TAGS],"readwrite"),r=n.objectStore(tt.TAGS),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to set tags",e),t()},i.forEach(function(e){var t=zt(e,2),n=t[0],i=t[1];r.put({key:n,value:i}).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to set tag",n,i,e)}})})];case 2:return i=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to set tags",i),[3,3];case 3:return[2]}})})},e.prototype.incrementCounters=function(e){return Ft(this,void 0,void 0,function(){var t,n,r,i,o=this;return Bt(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),0===Object.entries(e).length?[2]:[4,this.getDB()];case 1:return t=s.sent(),n=t.transaction([tt.COUNTERS],"readwrite"),r=n.objectStore(tt.COUNTERS),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to increment counters",e),t()},i.forEach(function(e){var t=zt(e,2),n=t[0],i=t[1],s=r.get(n);s.onsuccess=function(){var e=s.result,t=e?e.value:0;r.put({key:n,value:t+i}).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to update counter",n,e)}},s.onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to read existing counter",n,e)}})})];case 2:return i=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to increment counters",i),[3,3];case 3:return[2]}})})},e.prototype.setHistogramStats=function(e){return Ft(this,void 0,void 0,function(){var t,n,r,i,o=this;return Bt(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),0===Object.entries(e).length?[2]:[4,this.getDB()];case 1:return t=s.sent(),n=t.transaction([tt.HISTOGRAMS],"readwrite"),r=n.objectStore(tt.HISTOGRAMS),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to set histogram stats",e),t()},i.forEach(function(e){var t=zt(e,2),n=t[0],i=t[1],s=r.get(n);s.onsuccess=function(){var e,t=s.result;e=t?{key:n,count:t.count+i.count,min:Math.min(t.min,i.min),max:Math.max(t.max,i.max),sum:t.sum+i.sum}:{key:n,count:i.count,min:i.min,max:i.max,sum:i.sum},r.put(e).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to set histogram stats",n,e)}},s.onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to read existing histogram stats",n,e)}})})];case 2:return i=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to set histogram stats",i),[3,3];case 3:return[2]}})})},e.prototype.addEventRecords=function(e){return Ft(this,void 0,void 0,function(){var t,n,r,i,o=this;return Bt(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),0===e.length?[2]:[4,this.getDB()];case 1:return t=s.sent(),n=t.transaction([tt.EVENTS],"readwrite"),r=n.objectStore(tt.EVENTS),[2,new Promise(function(t){n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to add event records",e),t()};var i=r.count();i.onsuccess=function(){var t=i.result,n=Math.max(0,10-t);n<e.length&&o.logger.debug("DiagnosticsStorage: Only added ".concat(n," of ").concat(e.length," events due to storage limit")),e.slice(0,n).forEach(function(e){r.add(e).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to add event record",e)}})},i.onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to count existing events",e)}})];case 2:return i=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to add event records",i),[3,3];case 3:return[2]}})})},e.prototype.setInternal=function(e,t){return Ft(this,void 0,void 0,function(){var n,r,i,o;return Bt(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,this.getDB()];case 1:return n=s.sent(),r=n.transaction([tt.INTERNAL],"readwrite"),i=r.objectStore(tt.INTERNAL),[2,new Promise(function(n,o){r.onabort=function(){return o(new Error("Failed to set internal value"))};var s=i.put({key:e,value:t});s.onsuccess=function(){return n()},s.onerror=function(){return o(new Error("Failed to set internal value"))}})];case 2:return o=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to set internal value",o),[3,3];case 3:return[2]}})})},e.prototype.getInternal=function(e){return Ft(this,void 0,void 0,function(){var t,n,r,i;return Bt(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.getDB()];case 1:return t=o.sent(),n=t.transaction([tt.INTERNAL],"readonly"),r=n.objectStore(tt.INTERNAL),[2,new Promise(function(t,i){n.onabort=function(){return i(new Error("Failed to get internal value"))};var o=r.get(e);o.onsuccess=function(){return t(o.result)},o.onerror=function(){return i(new Error("Failed to get internal value"))}})];case 2:return i=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to get internal value",i),[2,void 0];case 3:return[2]}})})},e.prototype.getLastFlushTimestamp=function(){return Ft(this,void 0,void 0,function(){var e,t;return Bt(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getInternal(nt.LAST_FLUSH_TIMESTAMP)];case 1:return[2,(e=n.sent())?parseInt(e.value,10):void 0];case 2:return t=n.sent(),this.logger.debug("DiagnosticsStorage: Failed to get last flush timestamp",t),[2,void 0];case 3:return[2]}})})},e.prototype.setLastFlushTimestamp=function(e){return Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.setInternal(nt.LAST_FLUSH_TIMESTAMP,e.toString())];case 1:return n.sent(),[3,3];case 2:return t=n.sent(),this.logger.debug("DiagnosticsStorage: Failed to set last flush timestamp",t),[3,3];case 3:return[2]}})})},e.prototype.clearTable=function(e,t){return new Promise(function(n,r){var i=e.objectStore(t).clear();i.onsuccess=function(){return n()},i.onerror=function(){return r(new Error("Failed to clear table ".concat(t)))}})},e.prototype.getAllAndClear=function(){return Ft(this,void 0,void 0,function(){var e,t,n,r,i,o,s,a;return Bt(this,function(u){switch(u.label){case 0:return u.trys.push([0,4,,5]),[4,this.getDB()];case 1:return e=u.sent(),t=e.transaction([tt.TAGS,tt.COUNTERS,tt.HISTOGRAMS,tt.EVENTS],"readwrite"),[4,Promise.all([this.getAllFromStore(t,tt.TAGS),this.getAllFromStore(t,tt.COUNTERS),this.getAllFromStore(t,tt.HISTOGRAMS),this.getAllFromStore(t,tt.EVENTS)])];case 2:return n=zt.apply(void 0,[u.sent(),4]),r=n[0],i=n[1],o=n[2],s=n[3],[4,Promise.all([this.clearTable(t,tt.COUNTERS),this.clearTable(t,tt.HISTOGRAMS),this.clearTable(t,tt.EVENTS)])];case 3:return u.sent(),[2,{tags:r,counters:i,histogramStats:o,events:s}];case 4:return a=u.sent(),this.logger.debug("DiagnosticsStorage: Failed to get all and clear data",a),[2,{tags:[],counters:[],histogramStats:[],events:[]}];case 5:return[2]}})})},e.prototype.getAllFromStore=function(e,t){return new Promise(function(n,r){var i=e.objectStore(t).getAll();i.onsuccess=function(){return n(i.result)},i.onerror=function(){return r(new Error("Failed to get all from ".concat(t)))}})},e}()}}),Wl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/diagnostics/uncaught-sdk-errors.js":function(){al(),vl(),it=function(){var e=G();if(!e)return[];var t=e.__AMPLITUDE_SCRIPT_URL__;return Array.isArray(t)?t:"string"==typeof t?[t]:[]},ot=function(e){var n=G();if(n&&"function"==typeof n.addEventListener){var r=function(n){e.recordEvent("sdk.error.uncaught",t({type:n.type,message:n.message,filename:n.filename,error_name:n.errorName,stack:n.stack},n.metadata))};n.addEventListener("error",function(e){var t=_instanceof(e.error,Error)?e.error:void 0,n=null==t?void 0:t.stack,i=st({filename:e.filename,stack:n});i&&r({type:"error",message:e.message,stack:n,filename:e.filename,errorName:null==t?void 0:t.name,metadata:{colno:e.colno,lineno:e.lineno,isTrusted:e.isTrusted,matchReason:i}})},!0),n.addEventListener("unhandledrejection",function(e){var t,n=_instanceof(e.reason,Error)?e.reason:void 0,i=null==n?void 0:n.stack,o=at(i),s=st({filename:o,stack:i});s&&r({type:"unhandledrejection",message:null!==(t=null==n?void 0:n.message)&&void 0!==t?t:ut(e.reason),stack:i,filename:o,errorName:null==n?void 0:n.name,metadata:{isTrusted:e.isTrusted,matchReason:s}})},!0)}},st=function(e){var t,n,r=it();if(0!==r.length)try{for(var i=qt(r),o=i.next();!o.done;o=i.next()){var s=o.value;if(e.filename&&e.filename.includes(s))return"filename";if(e.stack&&e.stack.includes(s))return"stack"}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},at=function(e){if(e){var t=e.match(/(https?:\/\/\S+?)(?=[)\s]|$)/);return t?t[1]:void 0}},ut=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(e){return"[object Object]"}}}}),Hl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/diagnostics/diagnostics-client.js":function(){al(),Vl(),vl(),Dl(),Wl(),lt=3e5,ct=1e4,dt=function(){function e(e,n,r,i){void 0===r&&(r="US"),this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},this.inMemoryEvents=[],this.saveTimer=null,this.flushTimer=null,this.apiKey=e,this.logger=n,this.serverUrl="US"===r?"https://diagnostics.prod.us-west-2.amplitude.com/v1/capture":"https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture",this.logger.debug("DiagnosticsClient: Initializing with options",JSON.stringify(i,null,2)),this.config=t({enabled:!0,sampleRate:0},i),this.startTimestamp=Date.now(),this.shouldTrack=We(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,rt.isSupported()?this.storage=new rt(e,n):this.logger.debug("DiagnosticsClient: IndexedDB is not supported"),this.initializeFlushInterval(),this.shouldTrack&&(this.increment("sdk.diagnostics.sampled.in.and.enabled"),ot(this))}return e.prototype.isStorageAndTrackEnabled=function(){return Boolean(this.storage)&&Boolean(this.shouldTrack)},e.prototype.setTag=function(e,t){this.isStorageAndTrackEnabled()&&(Object.keys(this.inMemoryTags).length>=ct?this.logger.debug("DiagnosticsClient: Early return setTags as reaching memory limit"):(this.inMemoryTags[e]=t,this.startTimersIfNeeded()))},e.prototype.increment=function(e,t){void 0===t&&(t=1),this.isStorageAndTrackEnabled()&&(Object.keys(this.inMemoryCounters).length>=ct?this.logger.debug("DiagnosticsClient: Early return increment as reaching memory limit"):(this.inMemoryCounters[e]=(this.inMemoryCounters[e]||0)+t,this.startTimersIfNeeded()))},e.prototype.recordHistogram=function(e,t){if(this.isStorageAndTrackEnabled())if(Object.keys(this.inMemoryHistograms).length>=ct)this.logger.debug("DiagnosticsClient: Early return recordHistogram as reaching memory limit");else{var n=this.inMemoryHistograms[e];n?(n.count+=1,n.min=Math.min(n.min,t),n.max=Math.max(n.max,t),n.sum+=t):this.inMemoryHistograms[e]={count:1,min:t,max:t,sum:t},this.startTimersIfNeeded()}},e.prototype.recordEvent=function(e,t){this.isStorageAndTrackEnabled()&&(this.inMemoryEvents.length>=10?this.logger.debug("DiagnosticsClient: Early return recordEvent as reaching memory limit"):(this.inMemoryEvents.push({event_name:e,time:Date.now(),event_properties:t}),this.startTimersIfNeeded()))},e.prototype.startTimersIfNeeded=function(){var e=this;this.saveTimer||(this.saveTimer=setTimeout(function(){e.saveAllDataToStorage().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to save all data to storage",t)}).finally(function(){e.saveTimer=null})},1e3)),this.flushTimer||(this.flushTimer=setTimeout(function(){e._flush().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to flush",t)}).finally(function(){e.flushTimer=null})},lt))},e.prototype.saveAllDataToStorage=function(){return Ft(this,void 0,void 0,function(){var e,n,r,i;return Bt(this,function(o){switch(o.label){case 0:return this.storage?(e=t({},this.inMemoryTags),n=t({},this.inMemoryCounters),r=t({},this.inMemoryHistograms),i=Vt([],zt(this.inMemoryEvents),!1),this.inMemoryEvents=[],this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},[4,Promise.all([this.storage.setTags(e),this.storage.incrementCounters(n),this.storage.setHistogramStats(r),this.storage.addEventRecords(i)])]):[2];case 1:return o.sent(),[2]}})})},e.prototype._flush=function(){return Ft(this,void 0,void 0,function(){var e,t,n,r,i,o,s,a,u,l;return Bt(this,function(c){switch(c.label){case 0:return this.storage?[4,this.saveAllDataToStorage()]:[2];case 1:return c.sent(),this.saveTimer=null,this.flushTimer=null,[4,this.storage.getAllAndClear()];case 2:return e=c.sent(),t=e.tags,n=e.counters,r=e.histogramStats,i=e.events,this.storage.setLastFlushTimestamp(Date.now()),o={},t.forEach(function(e){o[e.key]=e.value}),s={},n.forEach(function(e){s[e.key]=e.value}),a={},r.forEach(function(e){a[e.key]={count:e.count,min:e.min,max:e.max,avg:Math.round(e.sum/e.count*100)/100}}),u=i.map(function(e){return{event_name:e.event_name,time:e.time,event_properties:e.event_properties}}),0===Object.keys(s).length&&0===Object.keys(a).length&&0===u.length?[2]:(l={tags:o,histogram:a,counters:s,events:u},this.fetch(l),[2])}})})},e.prototype.fetch=function(e){return Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){switch(n.label){case 0:if(n.trys.push([0,2,,3]),!G())throw new Error("DiagnosticsClient: Fetch is not supported");return[4,fetch(this.serverUrl,{method:"POST",headers:{"X-ApiKey":this.apiKey,"Content-Type":"application/json"},body:JSON.stringify(e)})];case 1:return n.sent().ok?(this.logger.debug("DiagnosticsClient: Successfully sent diagnostics data"),[3,3]):(this.logger.debug("DiagnosticsClient: Failed to send diagnostics data."),[2]);case 2:return t=n.sent(),this.logger.debug("DiagnosticsClient: Failed to send diagnostics data. ",t),[3,3];case 3:return[2]}})})},e.prototype.initializeFlushInterval=function(){return Ft(this,void 0,void 0,function(){var e,t,n;return Bt(this,function(r){switch(r.label){case 0:return this.storage?(e=Date.now(),[4,this.storage.getLastFlushTimestamp()]):[2];case 1:return-1===(t=r.sent()||-1)?(this.storage.setLastFlushTimestamp(e),this._setFlushTimer(lt),[2]):(n=e-t)>=lt?(this._flush(),[2]):(this._setFlushTimer(lt-n),[2])}})})},e.prototype._setFlushTimer=function(e){var t=this;this.flushTimer=setTimeout(function(){t._flush().catch(function(e){t.logger.debug("DiagnosticsClient: Failed to flush",e)}).finally(function(){t.flushTimer=null})},e)},e.prototype._setSampleRate=function(e){this.logger.debug("DiagnosticsClient: Setting sample rate to",e),this.config.sampleRate=e,this.shouldTrack=We(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug("DiagnosticsClient: Should track is",this.shouldTrack)},e}()}}),Gl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/transports/base.js":function(){hl(),Cl(),ft=function(){function e(){}return e.prototype.send=function(e,t,n){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,n,r,i,o,s,a,u,l,c,d,f,h,p,v,g,y,m,b,w,_,S;if("object"!==(void 0===e?"undefined":_type_of(e)))return null;var k=e.code||0,x=this.buildStatus(k);switch(x){case W.Success:return{status:x,statusCode:k,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 W.Invalid:return{status:x,statusCode:k,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_invalid_fields)&&void 0!==s?s:{},eventsWithMissingFields:null!==(a=e.events_with_missing_fields)&&void 0!==a?a:{},eventsWithInvalidIdLengths:null!==(u=e.events_with_invalid_id_lengths)&&void 0!==u?u:{},epsThreshold:null!==(l=e.eps_threshold)&&void 0!==l?l:0,exceededDailyQuotaDevices:null!==(c=e.exceeded_daily_quota_devices)&&void 0!==c?c:{},silencedDevices:null!==(d=e.silenced_devices)&&void 0!==d?d:[],silencedEvents:null!==(f=e.silenced_events)&&void 0!==f?f:[],throttledDevices:null!==(h=e.throttled_devices)&&void 0!==h?h:{},throttledEvents:null!==(p=e.throttled_events)&&void 0!==p?p:[]}};case W.PayloadTooLarge:return{status:x,statusCode:k,body:{error:null!==(v=e.error)&&void 0!==v?v:""}};case W.RateLimit:return{status:x,statusCode:k,body:{error:null!==(g=e.error)&&void 0!==g?g:"",epsThreshold:null!==(y=e.eps_threshold)&&void 0!==y?y:0,throttledDevices:null!==(m=e.throttled_devices)&&void 0!==m?m:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(w=e.exceeded_daily_quota_devices)&&void 0!==w?w:{},exceededDailyQuotaUsers:null!==(_=e.exceeded_daily_quota_users)&&void 0!==_?_:{},throttledEvents:null!==(S=e.throttled_events)&&void 0!==S?S:[]}};case W.Timeout:default:return{status:x,statusCode:k}}},e.prototype.buildStatus=function(e){return Wt(e)?W.Success:429===e?W.RateLimit:413===e?W.PayloadTooLarge:408===e?W.Timeout:e>=400&&e<500?W.Invalid:e>=500?W.Failed:W.Unknown},e}()}}),Kl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/transports/fetch.js":function(){al(),Gl(),ht=function(e){function n(t){void 0===t&&(t={});var n=e.call(this)||this;return n.customHeaders=t,n}return Dt(n,e),n.prototype.send=function(e,n){return Ft(this,void 0,void 0,function(){var r,i,o;return Bt(this,function(s){switch(s.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return r={headers:t({"Content-Type":"application/json",Accept:"*/*"},this.customHeaders),body:JSON.stringify(n),method:"POST"},[4,fetch(e,r)];case 1:return[4,(i=s.sent()).text()];case 2:o=s.sent();try{return[2,this.buildResponse(JSON.parse(o))]}catch(e){return[2,this.buildResponse({code:i.status})]}return[2]}})})},n}(ft)}}),Jl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/transports/gzip.js":function(){al(),pt=2048}}),$l=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/remote-config/remote-config-localstorage.js":function(){vt=function(){function e(e,t){this.key="AMP_remote_config_".concat(e.substring(0,10)),this.logger=t}return e.prototype.fetchConfig=function(){var e=null,t={remoteConfig:null,lastFetch:new Date};try{e=localStorage.getItem(this.key)}catch(e){return this.logger.debug("Remote config localstorage failed to access: ",e),Promise.resolve(t)}if(null===e)return this.logger.debug("Remote config localstorage gets null because the key does not exist"),Promise.resolve(t);try{var n=JSON.parse(e);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(n))),Promise.resolve({remoteConfig:n.remoteConfig,lastFetch:new Date(n.lastFetch)})}catch(e){return this.logger.debug("Remote config localstorage failed to parse: ",e),localStorage.removeItem(this.key),Promise.resolve(t)}},e.prototype.setConfig=function(e){try{return localStorage.setItem(this.key,JSON.stringify(e)),this.logger.debug("Remote config localstorage set successfully."),Promise.resolve(!0)}catch(e){this.logger.debug("Remote config localstorage failed to set: ",e)}return Promise.resolve(!1)},e}()}}),Ql=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/remote-config/remote-config.js":function(){al(),$l(),gl(),gt={INVALID_API_KEY:401,FORBIDDEN:403,RATE_LIMIT:429},yt=function(){function e(e,t,n,r){void 0===n&&(n="US"),this.callbackInfos=[],this.lastSuccessfulFetch=null,this.fetchPromise=null,this.isLastFetchInvalidApiKey=!1,this.apiKey=e,this.serverUrl=r||("US"===n?"https://sr-client-cfg.amplitude.com/config":"https://sr-client-cfg.eu.amplitude.com/config"),this.logger=t,this.storage=new vt(e,t)}return e.prototype.subscribe=function(e,t,n){var r=$(),i={id:r,key:e,deliveryMode:t,callback:n};return this.callbackInfos.push(i),"all"===t?this.subscribeAll(i):this.subscribeWaitForRemote(i,t.timeout),r},e.prototype.unsubscribe=function(e){var t=this.callbackInfos.findIndex(function(t){return t.id===e});return-1===t?(this.logger.debug("Remote config client unsubscribe failed because callback with id ".concat(e," doesn't exist.")),!1):(this.callbackInfos.splice(t,1),this.logger.debug("Remote config client unsubscribe succeeded removing callback with id ".concat(e,".")),!0)},e.prototype.updateConfigs=function(){return Ft(this,void 0,void 0,function(){var e,t=this;return Bt(this,function(n){switch(n.label){case 0:return this.lastSuccessfulFetch&&Date.now()-this.lastSuccessfulFetch<3e5?(this.logger.debug("Remote config client skipping updateConfigs: Too recent"),[2]):[4,this.getOrCreateFetchPromise()];case 1:return e=n.sent(),this.storage.setConfig(e),this.callbackInfos.forEach(function(n){t.sendCallback(n,e,"remote")}),[2]}})})},e.prototype.getOrCreateFetchPromise=function(){var e=this;return this.fetchPromise?this.fetchPromise:this.isLastFetchInvalidApiKey?(this.logger.debug("Remote config client skipping fetch: Invalid API key"),this.fetchPromise=Promise.resolve({remoteConfig:null,lastFetch:new Date}).finally(function(){e.fetchPromise=null}),this.fetchPromise):(this.fetchPromise=this.fetch().then(function(t){return null!==t.remoteConfig&&(e.lastSuccessfulFetch=Date.now()),t}).finally(function(){e.fetchPromise=null}),this.fetchPromise)},e.prototype.subscribeAll=function(e){return Ft(this,void 0,void 0,function(){var t,n,r,i=this;return Bt(this,function(o){switch(o.label){case 0:return t=this.getOrCreateFetchPromise().then(function(t){i.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(t))),i.sendCallback(e,t,"remote"),i.storage.setConfig(t)}),n=this.storage.fetchConfig().then(function(e){return e}),[4,Promise.race([t,n])];case 1:return void 0!==(r=o.sent())&&(this.logger.debug("Remote config client subscription all mode fetched from cache: ".concat(JSON.stringify(r))),null!==r.remoteConfig?this.sendCallback(e,r,"cache"):this.logger.debug("Remote config client skips sending callback because cache is empty (first time user).")),[4,t];case 2:return o.sent(),[2]}})})},e.prototype.subscribeWaitForRemote=function(e,t){return Ft(this,void 0,void 0,function(){var n,r;return Bt(this,function(i){switch(i.label){case 0:n=new Promise(function(e,n){setTimeout(function(){n("Timeout exceeded")},t)}),i.label=1;case 1:return i.trys.push([1,3,,5]),[4,Promise.race([this.getOrCreateFetchPromise(),n])];case 2:return r=i.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(e,r,"remote"),this.storage.setConfig(r),[3,5];case 3:return i.sent(),this.logger.debug("Remote config client subscription wait for remote mode exceeded timeout. Try to fetch from cache."),[4,this.storage.fetchConfig()];case 4:return null!==(r=i.sent()).remoteConfig?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(e,r,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(e,r,"remote")),[3,5];case 5:return[2]}})})},e.prototype.sendCallback=function(e,t,n){var r;e.lastCallback=new Date,r=e.key?e.key.split(".").reduce(function(e,t){return null===e?e:t in e?e[t]:null},t.remoteConfig):t.remoteConfig,e.callback(r,n,t.lastFetch)},e.prototype.fetch=function(e,t){return void 0===e&&(e=3),void 0===t&&(t=1e3),Ft(this,void 0,void 0,function(){var n,r,i,o,s,a,u=this;return Bt(this,function(l){switch(l.label){case 0:n=t/e,r={remoteConfig:null,lastFetch:new Date},i=function(r){var i,s,a,l,c,d;return Bt(this,function(f){switch(f.label){case 0:i=!0,s=new AbortController,a=setTimeout(function(){return s.abort()},t),f.label=1;case 1:return f.trys.push([1,7,8,9]),[4,fetch(o.getUrlParams(),{method:"GET",headers:{Accept:"*/*"},signal:s.signal})];case 2:return(l=f.sent()).ok?[3,4]:[4,l.text()];case 3:return c=f.sent(),o.logger.debug("Remote config client fetch with retry time ".concat(e," failed with ").concat(l.status,": ").concat(c)),l.status===gt.INVALID_API_KEY||l.status===gt.FORBIDDEN?(o.logger.error("Remote config client fetch failed with ".concat(l.status,". Invalid API key; future fetches will be skipped.")),o.isLastFetchInvalidApiKey=!0,i=!1):l.status>=400&&l.status<500&&l.status!==gt.RATE_LIMIT&&(i=!1),[3,6];case 4:return[4,l.json()];case 5:return[2,{value:{remoteConfig:f.sent(),lastFetch:new Date}}];case 6:return[3,9];case 7:return _instanceof(d=f.sent(),Error)&&"AbortError"===d.name?o.logger.debug("Remote config client fetch with retry time ".concat(e," timed out after ").concat(t,"ms")):o.logger.debug("Remote config client fetch with retry time ".concat(e," is rejected because: "),d),[3,9];case 8:return clearTimeout(a),[7];case 9:return i?r<e-1?[4,new Promise(function(e){return setTimeout(e,u.getJitterDelay(n))})]:[3,11]:[2,"break"];case 10:f.sent(),f.label=11;case 11:return[2]}})},o=this,s=0,l.label=1;case 1:return s<e?[5,i(s)]:[3,4];case 2:if("object"===(void 0===(a=l.sent())?"undefined":_type_of(a)))return[2,a.value];if("break"===a)return[3,4];l.label=3;case 3:return s++,[3,1];case 4:return[2,r]}})})},e.prototype.getJitterDelay=function(e){return Math.floor(Math.random()*e)},e.prototype.getUrlParams=function(){var t=encodeURIComponent(this.apiKey),n=new URLSearchParams;return n.append("config_group",e.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(t,"?").concat(n.toString())},e.CONFIG_GROUP="browser",e}()}}),Yl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/observers/console.js":function(){al(),vl(),mt=G(),bt=null==mt?void 0:mt.console,wt={},_t={},St=!1,kt={addListener:Qt,removeListener:Yt,_restoreConsole:Xt}}}),Xl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/server-zone.js":function(){var e;(e=xt||(xt={})).US="US",e.EU="EU",e.STAGING="STAGING"}}),Zl=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/offline.js":function(){Et=null}}),ec=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/element-interactions.js":function(){Ct=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],It="data-amp-track-",Ot=["div","span","h1","h2","h3","h4","h5","h6"],Tt=150}}),tc=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/frustration-interactions.js":function(){al(),At=Vt(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],zt(["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]']),!1),Rt=At,Pt=At,Mt=["*"],Nt=1e3,Lt=4,jt=50}});function nc(e){var t,n,r=e.json,i=e.targetObject,o=e.allowlist,s=e.excludelist,a=e.ancestors,u=e.parentObject,l=e.targetKey;i||(i=r);var c=Object.keys(i);try{for(var d=qt(c),f=d.next();!f.done;f=d.next()){var h=f.value,p=Vt(Vt([],zt(a),!1),[h],!1);Zt(i[h])?nn(p,o)&&!nn(p,s)||delete i[h]:nc({json:r,targetObject:i[h],allowlist:o,excludelist:s,ancestors:p,parentObject:i,targetKey:h})}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}0===Object.keys(i).length&&u&&l&&delete u[l]}function rc(e,t,n,r){if(void 0===n&&(n=0),void 0===r&&(r=0),r===t.length)return n===e.length;if(n===e.length){for(;r<t.length&&"**"===t[r];)r++;return r===t.length}var i=t[r];if("**"===i){if(r+1===t.length)return!0;for(var o=n;o<=e.length;o++)if(rc(e,t,o,r+1))return!0;return!1}return("*"===i||i===e[n])&&rc(e,t,n+1,r+1)}var ic,oc,sc,ac,uc,lc,cc,dc,fc,hc,pc,vc,gc,yc,mc,bc,wc,_c,Sc,kc,xc,Ec,Cc,Ic,Oc,Tc,Ac,Rc,Pc,Mc,Nc,Lc,jc,Dc,Uc,Fc,Bc,qc,zc,Vc,Wc,Hc,Gc,Kc,Jc,$c,Qc,Yc,Xc,Zc,ed,td,nd,rd,id,od,sd,ad,ud,ld,cd,dd,fd,hd,pd,vd,gd,yd,md,bd,wd,_d,Sd,kd,xd,Ed,Cd,Id,Od,Td,Ad,Rd,Pd,Md,Nd,Ld,jd,Dd,Ud,Fd,Bd,qd,zd,Vd,Wd,Hd,Gd,Kd,Jd,$d,Qd,Yd,Xd,Zd,ef,tf,nf,rf,of,sf,af,uf,lf,cf,df,ff,hf,pf,vf,gf,yf,mf,bf,wf,_f,Sf,kf,xf,Ef,Cf,If=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/json-query.js":function(){al()}}),Of=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/network-request-event.js":function(){var e;al(),vl(),If(),ll(),ic=function(){function e(e){this.request=e}return e.prototype.headers=function(e){var t,n;void 0===e&&(e=[]);var r=this.request.headers,i={};if(Array.isArray(r))r.forEach(function(e){var t=zt(e,2),n=t[0],r=t[1];i[n]=r});else if(_instanceof(r,Headers))r.forEach(function(e,t){i[t]=e});else if("object"===(void 0===r?"undefined":_type_of(r))&&null!==r)try{for(var o=qt(Object.entries(r)),s=o.next();!s.done;s=o.next()){var a=zt(s.value,2),u=a[0],l=a[1];i[u]=l}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return cc(i,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var e=G();if(null==e?void 0:e.TextEncoder){var t=this.request.body;return this._bodySize=rn(t,100),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.request.body?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),Ft(this,void 0,void 0,function(){var n;return Bt(this,function(r){return 0===e.length?[2,null]:(n=this.body,[2,on(n,e,t)])})})},e}(),oc=function(){function e(e,t){this.bodyRaw=e,this.requestHeaders=t}return e.prototype.headers=function(e){return void 0===e&&(e=[]),cc(this.requestHeaders,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return rn(this.bodyRaw,100)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.bodyRaw?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),Ft(this,void 0,void 0,function(){var n;return Bt(this,function(r){return 0===e.length?[2,null]:(n=this.body,[2,on(n,e,t)])})})},e}(),sc=function(){function e(e){this.response=e}return e.prototype.headers=function(e){var t;if(void 0===e&&(e=[]),_instanceof(this.response.headers,Headers)){var n=this.response.headers,r={};return null===(t=null==n?void 0:n.forEach)||void 0===t||t.call(n,function(e,t){r[t]=e}),cc(r,{allow:e})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){var e,t;if(void 0!==this._bodySize)return this._bodySize;var n=null===(t=null===(e=this.response.headers)||void 0===e?void 0:e.get)||void 0===t?void 0:t.call(e,"content-length"),r=n?parseInt(n,10):void 0;return this._bodySize=r,r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return Ft(this,void 0,void 0,function(){var e,t;return Bt(this,function(n){switch(n.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),n.label=1;case 1:return n.trys.push([1,3,,4]),e=this.clonedResponse.text(),t=new Promise(function(e){return setTimeout(function(){return e(null)},500)}),[4,Promise.race([e,t])];case 2:return[2,n.sent()];case 3:return n.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),Ft(this,void 0,void 0,function(){var n;return Bt(this,function(r){switch(r.label){case 0:return 0===e.length?[2,null]:[4,this.text()];case 1:return n=r.sent(),[2,on(n,e,t)]}})})},e}(),ac=function(){function e(e,t,n,r){this.statusCode=e,this.headersString=t,this.size=n,this.getJson=r}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),e.prototype.headers=function(e){var t,n;if(void 0===e&&(e=[]),!this.headersString)return{};var r={},i=this.headersString.split("\r\n");try{for(var o=qt(i),s=o.next();!s.done;s=o.next()){var a=s.value,u=zt(a.split(": "),2),l=u[0],c=u[1];l&&c&&(r[l]=c)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return cc(r,{allow:e})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),Ft(this,void 0,void 0,function(){var n;return Bt(this,function(r){return 0===e.length?[2,null]:(n=this.getJson())?(en(n,e,t),[2,n]):[2,null]})})},e}(),(e=uc||(uc={})).REDACT="redact",e.REMOVE="remove",lc="[REDACTED]",cc=function(e,t){var n,r,i=t.allow,o=void 0===i?[]:i,s=t.strategy,a=void 0===s?uc.REMOVE:s,u=Vt([],zt(R),!1),l={},c=function(t){var n=t.toLowerCase();u.find(function(e){return e.toLowerCase()===n})?a===uc.REDACT&&(l[t]=lc):o.find(function(e){return e.toLowerCase()===n})?l[t]=e[t]:a===uc.REDACT&&(l[t]=lc)};try{for(var d=qt(Object.keys(e)),f=d.next();!f.done;f=d.next()){c(f.value)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}return l},dc=function(){function e(e,t,n,r,i,o,s,a,u,l,c){void 0===s&&(s=0),this.type=e,this.method=t,this.timestamp=n,this.startTime=r,this.url=i,this.requestWrapper=o,this.status=s,this.duration=a,this.responseWrapper=u,this.error=l,this.endTime=c}return e.prototype.toSerializable=function(){var e,t,n,r,i={type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:null===(e=this.requestWrapper)||void 0===e?void 0:e.headers(Vt([],zt(A),!1)),requestBodySize:null===(t=this.requestWrapper)||void 0===t?void 0:t.bodySize,responseHeaders:null===(n=this.responseWrapper)||void 0===n?void 0:n.headers(Vt([],zt(A),!1)),responseBodySize:null===(r=this.responseWrapper)||void 0===r?void 0:r.bodySize};return Object.fromEntries(Object.entries(i).filter(function(e){var t=zt(e,2);t[0];return void 0!==t[1]}))},e}()}}),Tf=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/observers/network.js":function(){al(),vl(),gl(),Of(),fc=function(e,t){void 0===t&&(t=$()),this.callback=e,this.id=t},hc=function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var n=G();e.isSupported()&&(this.globalScope=n)}return e.isSupported=function(){var e=G();return!!e&&!!e.fetch},e.prototype.subscribe=function(e,t){var n,r,i,o,s,a,u,l,c,d;if(this.logger||(this.logger=t),this.eventCallbacks.set(e.id,e),!this.isObserving){var f=null===(i=null===(r=null===(n=this.globalScope)||void 0===n?void 0:n.XMLHttpRequest)||void 0===r?void 0:r.prototype)||void 0===i?void 0:i.open,h=null===(a=null===(s=null===(o=this.globalScope)||void 0===o?void 0:o.XMLHttpRequest)||void 0===s?void 0:s.prototype)||void 0===a?void 0:a.send,p=null===(c=null===(l=null===(u=this.globalScope)||void 0===u?void 0:u.XMLHttpRequest)||void 0===l?void 0:l.prototype)||void 0===c?void 0:c.setRequestHeader;f&&h&&p&&this.observeXhr(f,h,p);var v=null===(d=this.globalScope)||void 0===d?void 0:d.fetch;v&&this.observeFetch(v),this.isObserving=!0}},e.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},e.prototype.triggerEventCallbacks=function(e){var t=this;this.eventCallbacks.forEach(function(n){try{n.callback(e)}catch(e){sn(function(){var n;null===(n=t.logger)||void 0===n||n.debug("an unexpected error occurred while triggering event callbacks",e)})}})},e.prototype.handleNetworkRequestEvent=function(e,t,n,r,i,o,s){var a;if(void 0!==o&&void 0!==s){var u,l,c,d="GET";if(!function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&null!==e&&"url"in e&&"method"in e}(t)?u=null===(a=null==t?void 0:t.toString)||void 0===a?void 0:a.call(t):(u=t.url,d=t.method),u)try{var f=new URL(u);u="".concat(f.protocol,"//").concat(f.host).concat(f.pathname).concat(f.search).concat(f.hash)}catch(e){}d=(null==n?void 0:n.method)||d,r&&(l=r.status),i&&(c={name:i.name||"UnknownError",message:i.message||"An unknown error occurred"},l=0);var h=Math.floor(performance.now()-s),p=Math.floor(o+h),v=new dc(e,d,o,o,u,n,l,h,r,c,p);this.triggerEventCallbacks(v)}},e.prototype.getTimestamps=function(){var e,t;return{startTime:null===(e=Date.now)||void 0===e?void 0:e.call(Date),durationStart:null===(t=null===performance||void 0===performance?void 0:performance.now)||void 0===t?void 0:t.call(performance)}},e.prototype.observeFetch=function(e){var t=this;this.globalScope&&e&&(this.globalScope.fetch=function(n,r){return Ft(t,void 0,void 0,function(){var t,i,o,s,a=this;return Bt(this,function(u){switch(u.label){case 0:try{t=this.getTimestamps()}catch(e){sn(function(){var t;return null===(t=a.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while retrieving timestamps",e)})}u.label=1;case 1:return u.trys.push([1,3,,4]),[4,e(n,r)];case 2:return i=u.sent(),[3,4];case 3:return s=u.sent(),o=s,[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",n,r?new ic(r):void 0,i?new sc(i):void 0,o,null==t?void 0:t.startTime,null==t?void 0:t.durationStart)}catch(e){sn(function(){var t;return null===(t=a.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while handling fetch",e)})}if(i)return[2,i];throw o}})})})},e.createXhrJsonParser=function(e,t){return function(){var n;try{if("json"===e.responseType){if(null===(n=t.globalScope)||void 0===n?void 0:n.structuredClone)return t.globalScope.structuredClone(e.response)}else if(["text",""].includes(e.responseType))return JSON.parse(e.responseText)}catch(n){return _instanceof(n,Error)&&"InvalidStateError"===n.name&&sn(function(){var n;return null===(n=t.logger)||void 0===n?void 0:n.debug("unexpected error when retrieving responseText. responseType='".concat(e.responseType,"'"))}),null}return null}},e.prototype.observeXhr=function(n,r,i){if(this.globalScope&&n&&r){var o=this.globalScope.XMLHttpRequest.prototype,s=this;o.open=function(){for(var e,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=zt(r,2),a=o[0],u=o[1];try{this.$$AmplitudeAnalyticsEvent=t({method:a,url:null===(e=null==u?void 0:u.toString)||void 0===e?void 0:e.call(u),headers:{}},s.getTimestamps())}catch(e){sn(function(){var t;return null===(t=s.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while calling xhr open",e)})}return n.apply(this,r)},o.send=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=this,o=e.createXhrJsonParser(this,s),a=t[0],u=i.$$AmplitudeAnalyticsEvent;return i.$$AmplitudeAnalyticsEvent&&i.addEventListener("loadend",function(){try{var e=i.getAllResponseHeaders(),t=i.getResponseHeader("content-length"),n=new ac(i.status,e,t?parseInt(t,10):void 0,o),r=i.$$AmplitudeAnalyticsEvent.headers,l=new oc(a,r);u.status=i.status,s.handleNetworkRequestEvent("xhr",{url:u.url,method:u.method},l,n,void 0,u.startTime,u.durationStart)}catch(e){sn(function(){var t;return null===(t=s.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while handling xhr send",e)})}}),r.apply(i,t)},o.setRequestHeader=function(e,t){try{var n=this.$$AmplitudeAnalyticsEvent;n&&(n.headers[e]=t)}catch(e){sn(function(){var t;return null===(t=s.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while calling xhr setRequestHeader",e)})}i.apply(this,[e,t])}}},e}(),pc=new hc}}),Af=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/campaign/campaign-parser.js":function(){al(),Ll(),ll(),vc=function(){function e(){}return e.prototype.parse=function(){return Ft(this,void 0,void 0,function(){return Bt(this,function(e){return[2,t(t(t(t({},T),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=Fe();return{utm_campaign:e[f],utm_content:e[h],utm_id:e[p],utm_medium:e[v],utm_source:e[g],utm_term:e[y]}},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=Fe();return(e={})[m]=t[m],e[b]=t[b],e[w]=t[w],e[_]=t[_],e[S]=t[S],e[k]=t[k],e[x]=t[x],e[E]=t[E],e[C]=t[C],e[I]=t[I],e[O]=t[O],e},e}()}}),Rf=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/plugins/helpers.js":function(){al(),gc="data-amp-mask",yc="*****",mc=/\b(?:\d[ -]*?){13,16}\b/,bc=/(\d{3}-?\d{2}-?\d{4})/g,wc=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,_c=function(e,t){var n,r;if(void 0===t&&(t=[]),"string"!=typeof e)return"";var i=e;i=(i=(i=i.replace(mc,yc)).replace(bc,yc)).replace(wc,yc);try{for(var o=qt(t),s=o.next();!s.done;s=o.next()){var a=s.value;try{i=i.replace(a,yc)}catch(e){}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},Sc=function(e){if("undefined"==typeof document||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute(gc)?yc:e?e(document.title):document.title}}}),Pf=nl({"../../../../node_modules/zen-observable/lib/Observable.js":function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Observable=void 0;var t=function(e){return Boolean(Symbol[e])},n=function(e){return t(e)?Symbol[e]:"@@"+e},r=n("iterator"),i=n("observable"),o=n("species");function s(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function a(e){var t=e.constructor;return void 0!==t&&null===(t=t[o])&&(t=void 0),void 0!==t?t:v}function u(e){u.log?u.log(e):setTimeout(function(){throw e})}function l(e){Promise.resolve().then(function(){try{e()}catch(e){u(e)}})}function c(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=s(t,"unsubscribe");n&&n.call(t)}}catch(e){u(e)}}function d(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function f(e,t,n){e._state="running";var r=e._observer;try{var i=s(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(d(e),!i)throw n;i.call(r,n);break;case"complete":d(e),i&&i.call(r)}}catch(e){u(e)}"closed"===e._state?c(e):"running"===e._state&&(e._state="ready")}function h(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void l(function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(f(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e)})):void f(e,t,n);e._queue.push({type:t,value:n})}}var p=function(){function e(t,n){_class_call_check(this,e),this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";var r=this,i={get closed(){return"closed"===r._state},next:function(e){h(r,"next",e)},error:function(e){h(r,"error",e)},complete:function(){h(r,"complete")}};try{this._cleanup=n.call(void 0,i)}catch(e){i.error(e)}"initializing"===this._state&&(this._state="ready")}return _create_class(e,[{key:"closed",get:function(){return"closed"===this._state}},{key:"unsubscribe",value:function(){"closed"!==this._state&&(d(this),c(this))}}]),e}(),v=function(){function e(t){if(_class_call_check(this,e),!_instanceof(this,e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}return _create_class(e,[{key:"subscribe",value:function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new p(e,this._subscriber)}},{key:"forEach",value:function(e){var t=this;return new Promise(function(n,r){var i=function(){o.unsubscribe(),n()};if("function"==typeof e)var o=t.subscribe({next:function(t){try{e(t,i)}catch(e){r(e),o.unsubscribe()}},error:r,complete:n});else r(new TypeError(e+" is not a function"))})}},{key:"map",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(a(this))(function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})})}},{key:"filter",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(a(this))(function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})})}},{key:"reduce",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=a(this),r=arguments.length>1,i=!1,o=arguments[1];return new n(function(n){return t.subscribe({next:function(t){var s=!i;if(i=!0,!s||r)try{o=e(o,t)}catch(e){return n.error(e)}else o=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(o),n.complete()}})})}},{key:"all",value:function(){return _async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:return e=[],[4,this.forEach(function(t){return e.push(t)})];case 1:return t.sent(),[2,e]}})}).call(this)}},{key:"concat",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=a(this);return new i(function(t){var r,o=0;return function e(s){r=s.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===n.length?(r=void 0,t.complete()):e(i.from(n[o++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}})}},{key:"flatMap",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=a(this);return new n(function(r){var i=function(){s.closed&&0===o.length&&r.complete()},o=[],s=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return r.error(e)}var s=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=o.indexOf(s);e>=0&&o.splice(e,1),i()}});o.push(s)},error:function(e){r.error(e)},complete:function(){i()}});return function(){o.forEach(function(e){return e.unsubscribe()}),s.unsubscribe()}})}},{key:i,value:function(){return this}}],[{key:"from",value:function(n){var o="function"==typeof this?this:e;if(null==n)throw new TypeError(n+" is not an object");var a=s(n,i);if(a){var u=a.call(n);if(Object(u)!==u)throw new TypeError(u+" is not an object");return function(e){return _instanceof(e,v)}(u)&&u.constructor===o?u:new o(function(e){return u.subscribe(e)})}if(t("iterator")&&(a=s(n,r)))return new o(function(e){l(function(){if(!e.closed){var t=!0,r=!1,i=void 0;try{for(var o,s=a.call(n)[Symbol.iterator]();!(t=(o=s.next()).done);t=!0){var u=o.value;if(e.next(u),e.closed)return}}catch(e){r=!0,i=e}finally{try{t||null==s.return||s.return()}finally{if(r)throw i}}e.complete()}})});if(Array.isArray(n))return new o(function(e){l(function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}})});throw new TypeError(n+" is not observable")}},{key:"of",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return new("function"==typeof this?this:e)(function(e){l(function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}})})}},{key:o,get:function(){return this}}]),e}();e.Observable=v,Object.defineProperty(v,Symbol("extensions"),{value:{symbol:i,hostReportError:u},configurable:!0})}}),Mf=nl({"../../../../node_modules/zen-observable/index.js":function(e,t){t.exports=Pf().Observable}}),Nf=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/observable.js":function(){al(),kc=ol(Mf())}}),Lf=nl({"../../../../node_modules/safe-json-stringify/index.js":function(e,t){var n=Object.prototype.hasOwnProperty;function r(e){return"[Throws: "+(e?e.message:"?")+"]"}function i(e){var t=[];return function e(i){if(null===i||"object"!==(void 0===i?"undefined":_type_of(i)))return i;if(-1!==t.indexOf(i))return"[Circular]";if(t.push(i),"function"==typeof i.toJSON)try{var o=e(i.toJSON());return t.pop(),o}catch(e){return r(e)}if(Array.isArray(i)){var s=i.map(e);return t.pop(),s}var a=Object.keys(i).reduce(function(t,o){return t[o]=e(function(e,t){if(n.call(e,t))try{return e[t]}catch(e){return r(e)}return e[t]}(i,o)),t},{});return t.pop(),a}(e)}t.exports=function(e,t,n){return JSON.stringify(i(e),t,n)},t.exports.ensureProperties=i}}),jf=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/safe-stringify.js":function(){xc=ol(Lf()),Ec=xc.default||xc}}),Df=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/messenger/constants.js":function(){Ic={US:Cc="https://app.amplitude.com",EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"},Oc="https://cdn.amplitude.com/libs/background-capture-1.0.1.js.gz"}}),Uf=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/messenger/utils.js":function(){Tc=function(e){return document.querySelector('script[src="'.concat(CSS.escape(e),'"]'))?Promise.resolve({status:!0}):new Promise(function(t,n){var r;try{var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.addEventListener("load",function(){t({status:!0})},{once:!0}),i.addEventListener("error",function(){n({status:!1,message:"Failed to load the script ".concat(e)})}),null===(r=document.head)||void 0===r||r.appendChild(i)}catch(e){n(e)}})}}}),Ff=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/messenger/base-window-messenger.js":function(){al(),vl(),Df(),Uf(),Rc="__AMPLITUDE_MESSENGER_INSTANCE__",Pc="__AMPLITUDE_MESSENGER__",Mc=function(){function e(e){var t=(void 0===e?{}:e).origin,n=void 0===t?Cc:t;this[Ac]=!0,this.isSetup=!1,this.messageHandler=null,this.requestCallbacks={},this.actionHandlers=new Map,this.pendingMessages=new Map,this.scriptLoadPromises=new Map,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),n.timeout>0&&setTimeout(function(){s(new Error("".concat(e," timed out (id: ").concat(i,")"))),delete r.requestCallbacks[i]},n.timeout)})},e.prototype.handleResponse=function(e){var t;this.requestCallbacks[e.id]?(this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]):null===(t=this.logger)||void 0===t||t.warn("No callback found for request id: ".concat(e.id))},e.prototype.registerActionHandler=function(e,t){var n,r,i,o;this.actionHandlers.has(e)&&(null===(o=null===(i=this.logger)||void 0===i?void 0:i.warn)||void 0===o||o.call(i,"Overwriting existing action handler for: ".concat(e))),this.actionHandlers.set(e,t);var s=this.pendingMessages.get(e);if(s){this.pendingMessages.delete(e);try{for(var a=qt(s),u=a.next();!u.done;u=a.next()){t(u.value)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}},e.prototype.loadScriptOnce=function(e){return Ft(this,void 0,void 0,function(){var t,n,r;return Bt(this,function(i){switch(i.label){case 0:if(t=this.scriptLoadPromises.get(e))return[2,t];n=Tc(e).then(function(){}),this.scriptLoadPromises.set(e,n),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,n];case 2:return i.sent(),[3,4];case 3:throw r=i.sent(),this.scriptLoadPromises.delete(e),r;case 4:return[2]}})})},e.prototype.setup=function(e){var t,n,r=this,i=void 0===e?{}:e,o=i.logger,s=i.endpoint;o&&(this.logger=o),s&&this.endpoint===Cc&&(this.endpoint=s),this.isSetup||(this.isSetup=!0,null===(n=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Setting up messenger"),this.messageHandler=function(e){var t,n,i,o,s;if(null===(n=null===(t=r.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Message received: ",JSON.stringify(e)),r.endpoint===e.origin){var a=e.data,u=null==a?void 0:a.action;if(u)if("id"in a&&a.id)null===(o=null===(i=r.logger)||void 0===i?void 0:i.debug)||void 0===o||o.call(i,"Received Response to previous request: ",JSON.stringify(e)),r.handleResponse(a);else{if("ping"===u)return void r.notify({action:"pong"});var l=r.actionHandlers.get(u);if(l)l(a.data);else{var c=null!==(s=r.pendingMessages.get(u))&&void 0!==s?s:[];c.push(a.data),r.pendingMessages.set(u,c)}}}},window.addEventListener("message",this.messageHandler),this.notify({action:"page-loaded"}))},e.prototype.destroy=function(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=null),this.isSetup=!1,this.actionHandlers.clear(),this.pendingMessages.clear(),this.requestCallbacks={},this.scriptLoadPromises.clear();var e=G();(null==e?void 0:e[Pc])===this&&delete e[Pc]},e}(),Ac=Rc}}),Bf=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/messenger/background-capture.js":function(){Df(),Nc="__AMPLITUDE_BACKGROUND_CAPTURE__"}}),qf=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/types/config/browser-config.js":function(){Lc={always:"always",ifEmptyCampaign:"ifEmptyCampaign"}}}),zf=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/utils/environment.js":function(){vl()}}),Vf=tl({"../../../../node_modules/@amplitude/analytics-core/lib/esm/index.js":function(){wl(),dl(),_l(),Ol(),Rl(),El(),xl(),vl(),Al(),Pl(),Ml(),Nl(),Ll(),bl(),Il(),gl(),ml(),jl(),Dl(),Ul(),Fl(),Bl(),ql(),zl(),Hl(),Gl(),Kl(),Jl(),Ql(),kl(),ll(),Yl(),ul(),Xl(),Zl(),ec(),tc(),hl(),Tf(),ll(),ll(),Af(),Rf(),Nf(),jf(),Ff(),Bf(),Df(),qf(),zf()}}),Wf=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/constants.js":function(){var e;Vf(),Dc="".concat(jc="[Amplitude]"," Session Replay ID"),Uc=0,Fc=xt.US,Bc={enabled:!0},qc=1e3,zc="".concat(jc," Session Replay Debug"),Vc="amp-block",Wc="amp-mask",Hc="amp-unmask",Gc="https://api-sr.amplitude.com/sessions/v2/track",Kc="https://api-sr.eu.amplitude.com/sessions/v2/track",Jc="https://api-sr.stag2.amplitude.com/sessions/v2/track","".concat(o,"_replay_unsent"),Qc=9e6,Yc=/payload.*exceed/i,Xc=3e4,Zc=6e4,ed=500,td=1e4,nd=1024,rd=1e3,id=65536,od="X-Session-Replay-Event-Skipped",sd="429",ad="4004",ud="4005",ld=6e4,cd=2*($c=7e5),dd="amplitude-sr-iframe",(e=fd||(fd={})).GET_SR_PROPS="get-sr-props",e.DEBUG_INFO="debug-info",e.FETCH_REQUEST="fetch-request",e.METADATA="metadata",e.TARGETING_DECISION="targeting-decision",e.REPLAY_GATE_DECISION="replay-gate-decision"}}),Hf=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/logger.js":function(){hd=function(){function e(e){this.logger=e,this.log=this.getSafeMethod("log"),this.warn=this.getSafeMethod("warn"),this.error=this.getSafeMethod("error"),this.debug=this.getSafeMethod("debug")}return e.prototype.getSafeMethod=function(e){var t;if(!this.logger)return function(){};var n=this.logger[e];return"function"==typeof n?(null!==(t=n.__rrweb_original__)&&void 0!==t?t:n).bind(this.logger):function(){}},e.prototype.enable=function(e){this.logger.enable(e)},e.prototype.disable=function(){this.logger.disable()},e}()}}),Gf=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/config/types.js":function(){pd="medium"}}),Kf=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/utils/get-input-type.js":function(){}}),Jf=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/utils/server-url.js":function(){Wf()}}),$f=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/helpers.js":function(){al(),Vf(),Gf(),Wf(),Kf(),Jf(),vd=function(e,t,n){switch(t){case"light":if("input"!==e)return!1;var r=n?function(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?t.toLowerCase():null}(n):"";return!!r&&(!!["password","hidden","email","tel"].includes(r)||!!n.autocomplete.startsWith("cc-"));case"medium":return"input"===e;case"conservative":return!0;default:return vd(e,pd,n)}},gd=function(e,t){var n,r,i;if(e&&t.urlMaskLevels)try{for(var o=qt(t.urlMaskLevels),s=o.next();!s.done;s=o.next()){var a=s.value;if(xd(a.match).test(e))return a.maskLevel}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return null!==(i=t.defaultMaskLevel)&&void 0!==i?i:pd},yd=function(e,t,n,r){var i,o;if(void 0===t&&(t={defaultMaskLevel:pd}),n){if(n.closest("."+Wc))return!0;if((null!==(i=t.maskSelector)&&void 0!==i?i:[]).some(function(e){return n.closest(e)}))return!0;if(n.closest("."+Hc))return!1;if((null!==(o=t.unmaskSelector)&&void 0!==o?o:[]).some(function(e){return n.closest(e)}))return!1}return vd(e,gd(r,t),n)},md=function(e,t,n){return function(r,i){return yd(e,t,i,null==n?void 0:n())?r.replace(/[^\s]/g,"*"):r}},bd=function(e,t){return function(n,r,i){var o;if("style"===n)return r;if(!(null!==(o=null==e?void 0:e.maskAttributes)&&void 0!==o?o:[]).includes(n))return r;var s=["INPUT","SELECT","TEXTAREA"].includes(i.tagName)?"input":"text";return yd(s,e,i,null==t?void 0:t())?r.replace(/[^\s]/g,"*"):r}},wd=function(){var e=G();return(null==e?void 0:e.location)?e.location.href:""},_d=function(e,t){return"".concat(t,"/").concat(e)},Sd=function(e){if("string"!=typeof e||""===e.trim())return!1;return!!/^\/|^https?:\/\/[^\s]+$/.test(e)},kd=new Map,xd=function(e){var t=kd.get(e);if(t)return t;var n="\0TRAIL\0",r="\0MID\0",i="\0DS\0",o="\0ST\0",s="\0QU\0",a=e;a=(a=(a=(a=(a=(a=(a=(a=(a=(a=(a=a.replace(/\/\*\*$/,n)).replace(/\/\*\*\//g,r)).replace(/\*\*/g,i)).replace(/\*/g,o)).replace(/\?/g,s)).replace(/[.+^${}()|[\]\\]/g,"\\$&")).split(n).join("(/.*)?")).split(r).join("/(.*\\/)?")).split(i).join(".*")).split(o).join(".*")).split(s).join(".");var u=new RegExp("^".concat(a,"$"));return kd.set(e,u),u},Ed=function(e){if(!e.every(function(e){return"string"==typeof e.selector&&"string"==typeof e.replacement}))throw new Error("ugcFilterRules must be an array of objects with selector and replacement properties");if(!e.every(function(e){return Sd(e.selector)}))throw new Error("ugcFilterRules must be an array of objects with valid globs")},Cd=function(e,t){var n,r;try{for(var i=qt(t),o=i.next();!o.done;o=i.next()){var s=o.value,a=xd(s.selector);if(a.test(e))return e.replace(a,s.replacement)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},Id=function(){return Ft(void 0,void 0,void 0,function(){var e,t,n,r,i,o,s;return Bt(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),(e=G())?[4,e.navigator.storage.estimate()]:[3,2];case 1:return t=a.sent(),n=t.usage,r=t.quota,i=t.usageDetails,o=n?Math.round(n/nd):0,s=n&&r?Math.round(1e3*(n/r+Number.EPSILON))/1e3:0,[2,{totalStorageSize:o,percentOfQuota:s,usageDetails:JSON.stringify(i)}];case 2:return[3,4];case 3:return a.sent(),[3,4];case 4:return[2,{totalStorageSize:0,percentOfQuota:0,usageDetails:""}]}})})},Od=function(e){var n=t({},e),r=n.apiKey;return n.apiKey="****".concat(r.substring(r.length-4)),n}}}),Qf=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/config/local-config.js":function(){al(),Vf(),Wf(),Hf(),$f(),Td=function(){return{flushMaxRetries:2,logLevel:ae.Warn,loggerProvider:new le,transportProvider:new ht}},Ad=function(e){function n(n,r){var i,o,s,a,u,l,c,d,f,h,p=this,v=Td();if((p=e.call(this,t(t({transportProvider:v.transportProvider,loggerProvider:new hd(r.loggerProvider||v.loggerProvider)},r),{apiKey:n}))||this).flushMaxRetries=void 0!==r.flushMaxRetries&&r.flushMaxRetries<=v.flushMaxRetries?r.flushMaxRetries:v.flushMaxRetries,p.apiKey=n,p.sampleRate=r.sampleRate||Uc,p.serverZone=r.serverZone||Fc,p.configServerUrl=r.configServerUrl,p.trackServerUrl=r.trackServerUrl,p.shouldInlineStylesheet=r.shouldInlineStylesheet,p.version=r.version,p.performanceConfig=r.performanceConfig||Bc,p.storeType=null!==(i=r.storeType)&&void 0!==i?i:"memory",p.applyBackgroundColorToBlockedElements=null!==(o=r.applyBackgroundColorToBlockedElements)&&void 0!==o&&o,p.enableUrlChangePolling=null!==(s=r.enableUrlChangePolling)&&void 0!==s&&s,p.urlChangePollingInterval=null!==(a=r.urlChangePollingInterval)&&void 0!==a?a:qc,p.captureDocumentTitle=null!==(u=r.captureDocumentTitle)&&void 0!==u&&u,void 0!==r.fullSnapshotIntervalMs&&(p.fullSnapshotIntervalMs=r.fullSnapshotIntervalMs),p.privacyConfig=t(t({},null!==(l=r.privacyConfig)&&void 0!==l?l:{}),{unmaskSelector:Array.from(new Set(Vt([".".concat(Hc)],zt(null!==(d=null===(c=r.privacyConfig)||void 0===c?void 0:c.unmaskSelector)&&void 0!==d?d:[]),!1)))}),r.interactionConfig&&(p.interactionConfig=r.interactionConfig,p.interactionConfig.ugcFilterRules&&Ed(p.interactionConfig.ugcFilterRules)),r.debugMode&&(p.debugMode=r.debugMode),void 0!==r.useWebWorker)p.useWebWorker=r.useWebWorker;else{var g=r;void 0!==(null===(f=g.experimental)||void 0===f?void 0:f.useWebWorker)&&(p.useWebWorker=g.experimental.useWebWorker)}return p.captureAdoptedStyleSheets=null===(h=r.captureAdoptedStyleSheets)||void 0===h||h,r.crossOriginIframes&&(p.crossOriginIframes=r.crossOriginIframes),r.flushIntervalConfig&&(p.flushIntervalConfig=function(e,t){var n,r,i={};if(void 0!==e.minIntervalMs&&(!Number.isFinite(e.minIntervalMs)||e.minIntervalMs<Rd?(t.warn("flushIntervalConfig.minIntervalMs ".concat(e.minIntervalMs," is below floor ").concat(Rd,"ms; clamping.")),i.minIntervalMs=Rd):i.minIntervalMs=e.minIntervalMs),void 0!==e.maxIntervalMs&&(Number.isNaN(e.maxIntervalMs)||e.maxIntervalMs<Rd?(t.warn("flushIntervalConfig.maxIntervalMs ".concat(e.maxIntervalMs," is below floor ").concat(Rd,"ms; clamping.")),i.maxIntervalMs=Rd):i.maxIntervalMs=e.maxIntervalMs),void 0!==i.minIntervalMs||void 0!==i.maxIntervalMs){var o=null!==(n=i.minIntervalMs)&&void 0!==n?n:ed,s=null!==(r=i.maxIntervalMs)&&void 0!==r?r:td;s<o&&(void 0===i.maxIntervalMs?(t.warn("flushIntervalConfig.minIntervalMs (".concat(o,") exceeds the default maxIntervalMs (").concat(td,"); raising max to match min.")),i.maxIntervalMs=o):void 0===i.minIntervalMs?(t.warn("flushIntervalConfig.maxIntervalMs (".concat(s,") is below the default minIntervalMs (").concat(ed,"); lowering min to match max.")),i.minIntervalMs=s):(t.warn("flushIntervalConfig.maxIntervalMs (".concat(i.maxIntervalMs,") is less than minIntervalMs (").concat(i.minIntervalMs,"); raising max to match min.")),i.maxIntervalMs=i.minIntervalMs))}return i}(r.flushIntervalConfig,p.loggerProvider)),p}return Dt(n,e),n}(de),Rd=100}}),Yf=tl({"../../../../node_modules/@amplitude/session-replay-browser/node_modules/@amplitude/rrweb-types/dist/rrweb-types.js":function(){var e,t,n;(e=Pd||{})[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",Pd=e,(t=Md||{})[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",Md=t,(n=Nd||{})[n.MouseUp=0]="MouseUp",n[n.MouseDown=1]="MouseDown",n[n.Click=2]="Click",n[n.ContextMenu=3]="ContextMenu",n[n.DblClick=4]="DblClick",n[n.Focus=5]="Focus",n[n.Blur=6]="Blur",n[n.TouchStart=7]="TouchStart",n[n.TouchMove_Departed=8]="TouchMove_Departed",n[n.TouchEnd=9]="TouchEnd",n[n.TouchCancel=10]="TouchCancel",Nd=n}}),Xf=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/config/joined-config.js":function(){al(),Vf(),$f(),Qf(),Ld=function(e,t){var n=document.createDocumentFragment(),r=function(e){if(void 0===e&&(e=[]),"string"==typeof e&&(e=[e]),0!==(e=e.filter(function(e){try{n.querySelector(e)}catch(n){return t.warn('[session-replay-browser] omitting selector "'.concat(e,'" because it is invalid')),!1}return!0})).length)return e};return e.blockSelector=r(e.blockSelector),e.maskSelector=r(e.maskSelector),e.unmaskSelector=r(e.unmaskSelector),e},jd=function(){function e(e,t){this.localConfig=t,this.remoteConfigClient=e}return e.prototype.generateJoinedConfig=function(){var e,n,r,i,o,s,a;return Ft(this,void 0,void 0,function(){var u,l,c,d,f,h,p,v,g,y,m,b,w,_,S,k,x,E=this;return Bt(this,function(C){switch(C.label){case 0:(u=t({},this.localConfig)).optOut=this.localConfig.optOut,u.captureEnabled=!0,C.label=1;case 1:return C.trys.push([1,3,,4]),[4,new Promise(function(e,t){E.remoteConfigClient.subscribe("configs.sessionReplay",{timeout:1500},function(n,r){var i;if(E.localConfig.loggerProvider.debug("Session Replay remote configuration received from ".concat(r,":"),JSON.stringify(n,null,2)),n){var o=n,s=o.sr_sampling_config,a=o.sr_privacy_config,c=o.sr_targeting_config,d=null===(i=u.interactionConfig)||void 0===i?void 0:i.ugcFilterRules;u.interactionConfig=o.sr_interaction_config,u.interactionConfig&&d&&(u.interactionConfig.ugcFilterRules=d),u.loggingConfig=o.sr_logging_config,(s||a||c)&&(l={},s&&(l.sr_sampling_config=s),a&&(l.sr_privacy_config=a),c&&(l.sr_targeting_config=c)),e()}else t(new Error("No remote config received"))})})];case 2:return C.sent(),[3,4];case 3:return c=C.sent(),this.localConfig.loggerProvider.error("Failed to generate joined config: ",c),u.captureEnabled=!1,[2,{localConfig:this.localConfig,joinedConfig:u,remoteConfig:void 0}];case 4:if(!l)return[2,{localConfig:this.localConfig,joinedConfig:u,remoteConfig:l}];if(d=l.sr_sampling_config,f=l.sr_privacy_config,h=l.sr_targeting_config,d&&Object.keys(d).length>0?(Object.prototype.hasOwnProperty.call(d,"capture_enabled")?u.captureEnabled=d.capture_enabled:u.captureEnabled=!1,Object.prototype.hasOwnProperty.call(d,"sample_rate")&&(u.sampleRate=d.sample_rate),Object.prototype.hasOwnProperty.call(d,"min_session_duration_ms")&&(u.minSessionDurationMs=this.sanitizeMinSessionDurationMs(d.min_session_duration_ms))):(u.captureEnabled=!0,this.localConfig.loggerProvider.debug("Remote config successfully fetched, but no values set for project, Session Replay capture enabled.")),f){p=null!==(e=u.privacyConfig)&&void 0!==e?e:{},v={defaultMaskLevel:null!==(r=null!==(n=f.defaultMaskLevel)&&void 0!==n?n:p.defaultMaskLevel)&&void 0!==r?r:"medium",blockSelector:[],maskSelector:[],unmaskSelector:[],maskAttributes:Vt([],zt(new Set(Vt(Vt([],zt(null!==(i=p.maskAttributes)&&void 0!==i?i:[]),!1),zt(null!==(o=f.maskAttributes)&&void 0!==o?o:[]),!1))),!1),urlMaskLevels:Vt(Vt([],zt(null!==(s=f.urlMaskLevels)&&void 0!==s?s:[]),!1),zt(null!==(a=p.urlMaskLevels)&&void 0!==a?a:[]),!1)},y=t(t({},(g=function(e){var t,n,r,i,o,s,a,u,l,c={};"string"==typeof e.blockSelector&&(e.blockSelector=[e.blockSelector]);try{for(var d=qt(null!==(a=e.blockSelector)&&void 0!==a?a:[]),f=d.next();!f.done;f=d.next()){c[f.value]="block"}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}try{for(var h=qt(null!==(u=e.maskSelector)&&void 0!==u?u:[]),p=h.next();!p.done;p=h.next()){c[p.value]="mask"}}catch(e){r={error:e}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}try{for(var v=qt(null!==(l=e.unmaskSelector)&&void 0!==l?l:[]),g=v.next();!g.done;g=v.next()){c[g.value]="unmask"}}catch(e){o={error:e}}finally{try{g&&!g.done&&(s=v.return)&&s.call(v)}finally{if(o)throw o.error}}return c})(p)),g(f));try{for(m=qt(Object.entries(y)),b=m.next();!b.done;b=m.next())w=zt(b.value,2),_=w[0],"mask"===(S=w[1])?v.maskSelector.push(_):"block"===S?v.blockSelector.push(_):"unmask"===S&&v.unmaskSelector.push(_)}catch(e){k={error:e}}finally{try{b&&!b.done&&(x=m.return)&&x.call(m)}finally{if(k)throw k.error}}u.privacyConfig=Ld(v,this.localConfig.loggerProvider)}return h&&Object.keys(h).length>0&&(u.targetingConfig=h),this.localConfig.loggerProvider.debug(JSON.stringify({name:"session replay joined config",config:Od(u)},null,2)),[2,{localConfig:this.localConfig,joinedConfig:u,remoteConfig:l}]}})})},e.prototype.sanitizeMinSessionDurationMs=function(e){if("number"==typeof e&&Number.isFinite(e)){if(!(e<0))return e>Dd?(this.localConfig.loggerProvider.warn("min_session_duration_ms remote value ".concat(e," exceeds ").concat(Dd,"ms ceiling; clamping.")),Dd):e;this.localConfig.loggerProvider.warn("min_session_duration_ms remote value is negative (".concat(e,"); ignoring."))}else this.localConfig.loggerProvider.warn("min_session_duration_ms remote value is not a finite number (got ".concat(String(e),"); ignoring."))},e}(),Dd=6e4,Ud=function(e,t){return Ft(void 0,void 0,void 0,function(){var n,r;return Bt(this,function(i){return n=new Ad(e,t),r=new yt(e,n.loggerProvider,n.serverZone,t.configServerUrl),[2,new jd(r,n)]})})}}}),Zf=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/events/merge-mutation-events.js":function(){al(),Yf()}}),eh=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/events/event-compressor.js":function(){al(),Vf(),Yf(),Wf(),Zf(),Fd=function(){function e(e,t,n,r,i){var o,s=this;this.taskQueue=[],this.pendingQueue=[],this.isProcessing=!1,this.compressEvent=function(e){var t=e,n=t.type,r=t.timestamp,i=t.delay,o=t.data;return null!=i?JSON.stringify({type:n,timestamp:r,delay:i,data:o}):JSON.stringify({type:n,timestamp:r,data:o})},this.addCompressedEventToManager=function(e,t){var n=new Blob([e]).size;n>Qc?s.config.loggerProvider.warn("Session replay event dropped: serialized size ".concat(Math.round(n/1024)," KB exceeds maximum allowed event size. If this recurs, please open a GitHub issue at https://github.com/amplitude/Amplitude-TypeScript/issues or contact Amplitude support.")):s.eventsManager&&s.deviceId&&s.eventsManager.addEvent({event:{type:"replay",data:e},sessionId:t,deviceId:s.deviceId})},this.addCompressedEvent=function(e,t){if(s.worker)try{s.worker.postMessage({event:e,sessionId:t})}catch(n){"DataCloneError"===n.name?s.worker.postMessage(JSON.stringify({event:e,sessionId:t})):s.config.loggerProvider.warn("Unexpected error while posting message to worker:",n)}else{var n=s.compressEvent(e);s.addCompressedEventToManager(n,t)}},this.flushQueue=function(){var e;for(s.pendingQueue.length>0&&(e=s.taskQueue).push.apply(e,Vt([],zt(s.mergeMutationTasks(s.pendingQueue.splice(0))),!1));s.taskQueue.length>0;){var t=s.taskQueue.shift();if(t){var n=t.event,r=t.sessionId,i=s.compressEvent(n);s.addCompressedEventToManager(i,r)}}s.isProcessing=!1},this.terminate=function(){var e;null===(e=s.worker)||void 0===e||e.terminate()};var a=G();if(this.canUseIdleCallback=a&&"requestIdleCallback"in a,this.eventsManager=e,this.config=t,this.deviceId=n,this.timeout=(null===(o=t.performanceConfig)||void 0===o?void 0:o.timeout)||2e3,this.onFullSnapshotProcessed=i,r){t.loggerProvider.log("Enabling web worker for compression");try{var u=new Blob([r],{type:"application/javascript"}),l=URL.createObjectURL(u),c=new Worker(l);c.onerror=function(e){e.preventDefault(),t.loggerProvider.error("Worker failed, falling back to non-worker compression: ".concat(e.message," (").concat(e.filename,":").concat(e.lineno,")")),c.terminate(),s.worker=void 0},c.onmessage=function(e){var t=e.data,n=t.compressedEvent,r=t.sessionId;s.addCompressedEventToManager(n,r)},this.worker=c}catch(e){t.loggerProvider.error("Failed to create worker, falling back to non-worker compression:",e)}}}return e.prototype.scheduleIdleProcessing=function(){var e=this;this.isProcessing||(this.isProcessing=!0,requestIdleCallback(function(t){e.processQueue(t)},{timeout:this.timeout}))},e.prototype.enqueueEvent=function(e,t){var n,r,i,o;if(e.type===Pd.FullSnapshot){if(this.config.loggerProvider.debug("Processing full snapshot immediately."),this.taskQueue.length>0||this.pendingQueue.length>0){var s=Vt(Vt([],zt(this.taskQueue.splice(0)),!1),zt(this.mergeMutationTasks(this.pendingQueue.splice(0))),!1);try{for(var a=qt(s),u=a.next();!u.done;u=a.next()){var l=u.value,c=this.compressEvent(l.event);this.addCompressedEventToManager(c,l.sessionId)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}this.isProcessing=!1}var d=this.compressEvent(e);return this.addCompressedEventToManager(d,t),void(null===(i=this.onFullSnapshotProcessed)||void 0===i||i.call(this))}this.canUseIdleCallback&&(null===(o=this.config.performanceConfig)||void 0===o?void 0:o.enabled)?(this.config.loggerProvider.debug("Enqueuing event for processing during idle time."),this.pendingQueue.push({event:e,sessionId:t}),this.scheduleIdleProcessing()):(this.config.loggerProvider.debug("Processing event without idle callback."),this.addCompressedEvent(e,t))},e.prototype.processQueue=function(e){var t,n=this;for(this.pendingQueue.length>0&&(t=this.taskQueue).push.apply(t,Vt([],zt(this.mergeMutationTasks(this.pendingQueue.splice(0))),!1));this.taskQueue.length>0&&(e.timeRemaining()>0||e.didTimeout);){var r=this.taskQueue.shift();if(r){var i=r.event,o=r.sessionId;this.addCompressedEvent(i,o)}}this.taskQueue.length>0||this.pendingQueue.length>0?requestIdleCallback(function(e){n.processQueue(e)},{timeout:this.timeout}):this.isProcessing=!1},e.prototype.mergeMutationTasks=function(e){var t,n,r;if(!(null===(r=this.config.performanceConfig)||void 0===r?void 0:r.mergeMutations))return e;if(e.length<=1)return e;for(var i=[],o=0;o<e.length;){for(var s=e[o].sessionId,a=o+1;a<e.length&&e[a].sessionId===s;)a++;var u=vn(e.slice(o,a).map(function(e){return e.event}));try{for(var l=(t=void 0,qt(u)),c=l.next();!c.done;c=l.next()){var d=c.value;i.push({event:d,sessionId:s})}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}o=a}return i},e}()}}),th=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/messages.js":function(){Bd="Unexpected error occurred",qd="Network error occurred, event batch rejected",zd="Session replay event batch rejected due to exceeded retry count",Vd="Failed to store session replay events in IndexedDB",Wd="Session replay event batch not sent due to missing device ID",Hd="Session replay event batch not sent due to missing api key",Gd="Session replay event batch dropped: server signalled capture disabled or session out of valid range for this session"}}),nh=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/version.js":function(){Kd="1.44.0"}}),rh=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/utils/gzip.js":function(){al()}}),ih=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/track-destination.js":function(){al(),Vf(),$f(),th(),nh(),Wf(),rh(),Jd=function(){function e(e){var t=e.trackServerUrl,n=e.loggerProvider,r=e.payloadBatcher,i=e.workerScript,o=this;if(this.storageKey="",this.retryTimeout=1e3,this.scheduled=null,this.queue=[],this.sendIdCounter=0,this.pendingWorkerRequests=new Map,this.flushPauseUntilMs=0,this.mergeOnNextFlush=!1,this.mergeLogFiredThisPause=!1,this.killedSessions=new Set,this.loggerProvider=n,this.payloadBatcher=r||function(e){return e},this.trackServerUrl=t,i)try{var s=new Blob([i],{type:"application/javascript"}),a=URL.createObjectURL(s),u=new Worker(a);u.onerror=function(e){var t,r;e.preventDefault(),n.error("Track destination worker failed, falling back to main-thread sending: ".concat(e.message," (").concat(e.filename,":").concat(e.lineno,")")),u.terminate(),o.worker=void 0;try{for(var i=qt(o.pendingWorkerRequests),s=i.next();!s.done;s=i.next()){var a=zt(s.value,2)[1];n.warn("Session replay event send failed due to worker crash: ".concat(e.message)),a.resolve()}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}o.pendingWorkerRequests.clear()},u.onmessage=function(e){var t=e.data;if("log"===t.type)n.log(t.message);else if("warn"===t.type)n.warn(t.message);else if("payload_too_large"===t.type){var r=o.pendingWorkerRequests.get(t.id);r&&(o.handlePayloadTooLargeResponse(r.context,t.isWaf),r.resolve(),o.pendingWorkerRequests.delete(t.id))}else if("complete"===t.type){var i=o.pendingWorkerRequests.get(t.id);i&&(void 0!==t.skipCode&&o.applyServerDirective(i.context.sessionId,t.skipCode),o.completeRequest({context:i.context}),i.resolve(),o.pendingWorkerRequests.delete(t.id))}},this.worker=u}catch(e){n.error("Failed to create track destination worker, falling back to main-thread sending:",e)}}return e.prototype.sendEventsList=function(e){this.addToQueue(t(t({},e),{attempts:0,timeout:0}))},e.prototype.sendBeacon=function(e){var t,n,r=e.events,i=e.sessionId,o=e.deviceId,s=e.apiKey,a=e.serverZone,u=function(e){return new Blob([e]).size},l=r,c=JSON.stringify({version:2,events:l});if(u(c)>65536){for(var d=0,f=l.length;d<f;){var h=Math.floor((d+f+1)/2);u(JSON.stringify({version:2,events:l.slice(0,h)}))<=65536?d=h:f=h-1}l=l.slice(0,d),c=JSON.stringify({version:2,events:l}),this.loggerProvider.warn("sendBeacon payload exceeded 64 KB limit, trimmed from ".concat(r.length," to ").concat(l.length," events"))}if(0!==l.length){var p=new URLSearchParams({device_id:o,session_id:String(i),type:"replay",api_key:s}),v="".concat(fn(a,this.trackServerUrl),"?").concat(p.toString()),g=G();try{var y=new Blob([c],{type:"application/json"});!1===(null===(n=null===(t=null==g?void 0:g.navigator)||void 0===t?void 0:t.sendBeacon)||void 0===n?void 0:n.call(t,v,y))&&this.loggerProvider.warn("sendBeacon failed to queue session replay payload")}catch(e){}}},e.prototype.addToQueue=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];t.filter(function(t){return e.killedSessions.has(t.sessionId)?(e.completeRequest({context:t,err:Gd}),!1):t.attempts<(t.flushMaxRetries||0)?(t.attempts+=1,!0):(e.completeRequest({context:t,err:zd}),!1)}).forEach(function(t){e.queue=e.queue.concat(t),e.schedule(0)})},e.prototype.schedule=function(e){var t=this;if(!this.scheduled){var n=this.flushPauseUntilMs-Date.now(),r=n>e?n:e;n>0&&(this.mergeOnNextFlush=!0),this.scheduled=setTimeout(function(){t.flush(!0).then(function(){t.queue.length>0&&t.schedule(e)})},r)}},e.prototype.flush=function(e){return void 0===e&&(e=!1),Ft(this,void 0,void 0,function(){var t,n,r,i,o,s,a;return Bt(this,function(u){switch(u.label){case 0:t=this.queue,this.queue=[],this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),this.mergeOnNextFlush&&(this.mergeOnNextFlush=!1,t=this.mergeQueueAfterThrottle(t)),u.label=1;case 1:u.trys.push([1,6,7,8]),n=qt(t),r=n.next(),u.label=2;case 2:return r.done?[3,5]:(i=r.value,[4,this.send(i,e)]);case 3:u.sent(),u.label=4;case 4:return r=n.next(),[3,2];case 5:return[3,8];case 6:return o=u.sent(),s={error:o},[3,8];case 7:try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(s)throw s.error}return[7];case 8:return[2]}})})},e.prototype.mergeQueueAfterThrottle=function(e){var n,r,i,o,s,a,u,l,c,d,f,h=this;if(e.length<=1)return e;var p=new Map;try{for(var v=qt(e),g=v.next();!g.done;g=v.next()){var y=g.value,m=[y.sessionId,null!==(s=y.deviceId)&&void 0!==s?s:"",null!==(a=y.apiKey)&&void 0!==a?a:"",y.type,null!==(u=y.serverZone)&&void 0!==u?u:"",y.sampleRate,null!==(c=null===(l=y.version)||void 0===l?void 0:l.type)&&void 0!==c?c:"",null!==(f=null===(d=y.version)||void 0===d?void 0:d.version)&&void 0!==f?f:""].join("|"),b=p.get(m);b?b.push(y):p.set(m,[y])}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var w=[],_=function(e){var n,r;if(1===e.length)return w.push(e[0]),"continue";var i=null,o=0,s=function(){i&&w.push(i),i=null,o=0},a=function(e){var n=e.events.reduce(function(e,t){return e+new Blob([t]).size},0);if(null===i)return i=t(t({},e),{events:Vt([],zt(e.events),!1),attempts:0}),o=n,"continue";if(o+n>cd)return s(),i=t(t({},e),{events:Vt([],zt(e.events),!1),attempts:0}),o=n,"continue";var r=i.onComplete,a=e.onComplete;i.events=i.events.concat(e.events),o+=n,i.onComplete=function(){return Ft(h,void 0,void 0,function(){return Bt(this,function(e){switch(e.label){case 0:return[4,Promise.allSettled([r(),a()])];case 1:return e.sent(),[2]}})})}};try{for(var u=(n=void 0,qt(e)),l=u.next();!l.done;l=u.next()){a(l.value)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}s()};try{for(var S=qt(p.values()),k=S.next();!k.done;k=S.next()){_(k.value)}}catch(e){i={error:e}}finally{try{k&&!k.done&&(o=S.return)&&o.call(S)}finally{if(i)throw i.error}}return w.length<e.length&&!this.mergeLogFiredThisPause&&(this.mergeLogFiredThisPause=!0,this.loggerProvider.log("Session replay throttle pause ended; merged ".concat(e.length," queued batches into ").concat(w.length," request(s)"))),w},e.prototype.send=function(e,t){return void 0===t&&(t=!0),Ft(this,void 0,void 0,function(){var n,r,i,o;return Bt(this,function(s){return this.killedSessions.has(e.sessionId)?[2,this.completeRequest({context:e,err:Gd})]:(n=e.apiKey)?(r=e.deviceId)?0===(i=this.payloadBatcher({version:1,events:e.events})).events.length?(this.completeRequest({context:e}),[2]):(o=this.worker)?[2,this.sendViaWorker(o,e,i,t)]:[2,this.sendOnMainThread(n,r,e,i,t)]:[2,this.completeRequest({context:e,err:Wd})]:[2,this.completeRequest({context:e,err:Hd})]})})},e.prototype.sendViaWorker=function(e,t,n,r){return Ft(this,void 0,void 0,function(){var i,o=this;return Bt(this,function(s){return i="".concat(++this.sendIdCounter),[2,new Promise(function(s){var a;o.pendingWorkerRequests.set(i,{context:t,resolve:s}),e.postMessage({type:"send",id:i,payload:n,useRetry:r,context:{apiKey:t.apiKey,deviceId:t.deviceId,sessionId:t.sessionId,events:t.events,eventType:t.type,flushMaxRetries:null!==(a=t.flushMaxRetries)&&void 0!==a?a:0,sampleRate:t.sampleRate,serverZone:t.serverZone,trackServerUrl:o.trackServerUrl,version:t.version,currentUrl:wd(),sdkVersion:Kd}})})]})})},e.prototype.sendOnMainThread=function(e,n,r,i,o){var s,a,u,l,c,d,f;return Ft(this,void 0,void 0,function(){var h,p,v,g,y,m,b,w,_,S,k,x,E,C,I,O;return Bt(this,function(T){switch(T.label){case 0:h=wd(),p=Kd,v=r.sampleRate,g=new URLSearchParams({device_id:n,session_id:"".concat(r.sessionId),type:"".concat(r.type)}),y="".concat(null!==(a=null===(s=r.version)||void 0===s?void 0:s.type)&&void 0!==a?a:"standalone","/").concat(null!==(l=null===(u=r.version)||void 0===u?void 0:u.version)&&void 0!==l?l:p),T.label=1;case 1:return T.trys.push([1,13,,14]),m=JSON.stringify(i),(b=G())&&"CompressionStream"in b?[4,gn(m,b)]:[3,3];case 2:return _=T.sent(),[3,4];case 3:_=null,T.label=4;case 4:return S=(w=_)?w.byteLength:new Blob([m]).size,k={headers:t({"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(e),"X-Client-Version":p,"X-Client-Library":y,"X-Client-Url":h.substring(0,rd),"X-Client-Sample-Rate":"".concat(v),"X-Sampling-Hash-Alg":"xxhash32"},w?{"Content-Encoding":"gzip"}:{}),body:null!=w?w:m,method:"POST",keepalive:S<=id},x="".concat(fn(r.serverZone,this.trackServerUrl),"?").concat(g.toString()),0===i.events.length?(this.completeRequest({context:r}),[2]):[4,fetch(x,k)];case 5:if(null===(E=T.sent()))return this.completeRequest({context:r,err:Bd}),[2];if(E.status>=200&&E.status<300&&(C=null!==(f=null===(d=null===(c=E.headers)||void 0===c?void 0:c.get)||void 0===d?void 0:d.call(c,od))&&void 0!==f?f:null,this.applyServerDirective(r.sessionId,C)),o)return[3,6];I="";try{I=JSON.stringify(E.body,null,2)}catch(e){}return this.completeRequest({context:r,success:"".concat(E.status,": ").concat(I)}),[3,12];case 6:if(I="",413!==E.status)return[3,10];T.label=7;case 7:return T.trys.push([7,9,,10]),[4,E.text()];case 8:return I=T.sent(),[3,10];case 9:return T.sent(),[3,10];case 10:return[4,this.handleReponse(E.status,r,I)];case 11:T.sent(),T.label=12;case 12:return[3,14];case 13:return O=T.sent(),this.completeRequest({context:r,err:O}),[3,14];case 14:return[2]}})})},e.prototype.handleReponse=function(e,t,n){return void 0===n&&(n=""),Ft(this,void 0,void 0,function(){var r;return Bt(this,function(i){switch(i.label){case 0:switch(r=(new ft).buildStatus(e),r){case W.Success:return[3,1];case W.Failed:case W.Timeout:case W.RateLimit:return[3,2];case W.PayloadTooLarge:return[3,4]}return[3,5];case 1:return this.handleSuccessResponse(t),[3,8];case 2:return[4,this.handleOtherResponse(t)];case 3:return i.sent(),[3,8];case 4:return this.handlePayloadTooLargeResponse(t,Yc.test(n)),[3,8];case 5:return 499!==e?[3,7]:[4,this.handleOtherResponse(t)];case 6:return i.sent(),[3,8];case 7:this.completeRequest({context:t,err:qd}),i.label=8;case 8:return[2]}})})},e.prototype.handlePayloadTooLargeResponse=function(e,n){var r=n?"WAF (compressed payload too large)":"server (event too large)",i=Math.round(e.events.reduce(function(e,t){return e+t.length},0)/nd);if(n)if(1!==e.events.length){this.loggerProvider.warn("Session replay event batch rejected by ".concat(r," (").concat(e.events.length," events, ").concat(i," KB total) — splitting and retrying")),e.onComplete();var o=function(){return Promise.resolve()},s=Math.floor(e.events.length/2);this.sendEventsList(t(t({},e),{events:e.events.slice(0,s),onComplete:o})),this.sendEventsList(t(t({},e),{events:e.events.slice(s),onComplete:o}))}else this.completeRequest({context:e,err:"Session replay event dropped: single event (".concat(i," KB, 1 event) rejected by ").concat(r," — cannot split further")});else this.completeRequest({context:e,err:"Session replay event batch dropped: ".concat(r," rejected payload (").concat(e.events.length," events, ").concat(i," KB) — not retrying non-WAF 413")})},e.prototype.handleSuccessResponse=function(e){var t=Math.round(new Blob(e.events).size/nd);this.completeRequest({context:e,success:"Session replay event batch tracked successfully for session id ".concat(e.sessionId,", size of events: ").concat(t," KB")})},e.prototype.handleOtherResponse=function(e){return Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){switch(n.label){case 0:return t=Math.random()*e.attempts*this.retryTimeout,e.attempts++,e.attempts>(e.flushMaxRetries||0)?(this.completeRequest({context:e,err:zd}),[2]):[4,new Promise(function(e){return setTimeout(e,t)})];case 1:return n.sent(),[4,this.send(e,!0)];case 2:return n.sent(),[2]}})})},e.prototype.completeRequest=function(e){var t=e.context,n=e.err,r=e.success;t.onComplete(),n?this.loggerProvider.warn(n):r&&this.loggerProvider.log(r)},e.prototype.applyServerDirective=function(e,t){if(null===t)return this.flushPauseUntilMs=0,void(this.mergeLogFiredThisPause=!1);if(t===sd){var n=this.flushPauseUntilMs>Date.now();return this.flushPauseUntilMs=Date.now()+ld,void(n||this.loggerProvider.log("Session replay throttled by server; pausing flush schedule for ".concat(ld/1e3,"s")))}t!==ud&&t!==ad||this.killSession(e,t)},e.prototype.killSession=function(e,t){var n,r,i,o;if(!this.killedSessions.has(e)){if(this.killedSessions.add(e),this.killedSessions.size>256)try{for(var s=qt(this.killedSessions),a=s.next();!a.done;a=s.next()){var u=a.value;this.killedSessions.delete(u);break}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}this.loggerProvider.log("Session replay capture stopped for session ".concat(e," by server directive ").concat(t,"; remaining events will be dropped"));var l=[];try{for(var c=qt(this.queue),d=c.next();!d.done;d=c.next()){var f=d.value;f.sessionId===e?this.completeRequest({context:f,err:Gd}):l.push(f)}}catch(e){i={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}this.queue=l}},e}()}}),oh=tl({"../../../../node_modules/idb/build/index.js":function(){$d=function(e,t){return t.some(function(t){return _instanceof(e,t)})},Xd=new WeakMap,Zd=new WeakMap,ef=new WeakMap,tf={get:function(e,t,n){if(_instanceof(e,IDBTransaction)){if("done"===t)return Xd.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return _n(e[t])},set:function(e,t,n){return e[t]=n,!0},has:function(e,t){return!(!_instanceof(e,IDBTransaction)||"done"!==t&&"store"!==t)||t in e}},nf=function(e){return ef.get(e)},rf=["get","getKey","getAll","getAllKeys","count"],of=["put","add","delete","clear"],sf=new Map,mn(function(e){return _object_spread_props(_object_spread({},e),{get:function(t,n,r){return kn(t,n)||e.get(t,n,r)},has:function(t,n){return!!kn(t,n)||e.has(t,n)}})}),af=["continue","continuePrimaryKey","advance"],uf={},lf=new WeakMap,cf=new WeakMap,df={get:function(e,t){if(!af.includes(t))return e[t];var n=uf[t];return n||(n=uf[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;lf.set(this,(i=cf.get(this))[t].apply(i,_to_consumable_array(n)))}),n}},mn(function(e){return _object_spread_props(_object_spread({},e),{get:function(t,n,r){return En(t,n)?xn:e.get(t,n,r)},has:function(t,n){return En(t,n)||e.has(t,n)}})})}}),sh=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/events/base-events-store.js":function(){al(),Wf(),ff=function(){function e(e){var t,n,r,i=this;this.minInterval=ed,this.maxInterval=td,this.maxPersistedEventsSize=$c,this._timeAtLastSplit=Date.now(),this.shouldSplitEventsList=function(e,t){var n=i.getStringSize(t);return i.getEventsArraySize(e)+n>=i.maxPersistedEventsSize||!!(Date.now()-i.timeAtLastSplit>i.interval&&e.length)&&(i.interval=Math.min(i.maxInterval,i.interval+i.minInterval),i._timeAtLastSplit=Date.now(),!0)},this.loggerProvider=e.loggerProvider,this.minInterval=null!==(t=e.minInterval)&&void 0!==t?t:this.minInterval,this.maxInterval=null!==(n=e.maxInterval)&&void 0!==n?n:this.maxInterval,this.maxPersistedEventsSize=null!==(r=e.maxPersistedEventsSize)&&void 0!==r?r:this.maxPersistedEventsSize,this.interval=this.minInterval}return Object.defineProperty(e.prototype,"timeAtLastSplit",{get:function(){return this._timeAtLastSplit},enumerable:!1,configurable:!0}),e.prototype.getStringSize=function(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<=127)t++;else if(r<=2047)t+=2;else if(r>=55296&&r<=56319){var i=n+1<e.length?e.charCodeAt(n+1):NaN;i>=56320&&i<=57343?(t+=4,n++):t+=3}else t+=3}return t},e.prototype.getEventsArraySize=function(e){var t,n,r=0;try{for(var i=qt(e),o=i.next();!o.done;o=i.next()){var s=o.value;r+=this.getStringSize(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r+(2+Math.max(0,e.length-1)+2*e.length)},e}()}}),ah=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/utils/is-abort-error.js":function(){hf=function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&null!==e&&"AbortError"===e.name},pf=function(e,t,n){hf(n)?e.debug(t):e.warn(t)}}}),uh=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/events/events-idb-store.js":function(){al(),oh(),th(),sh(),ah(),vf="sessionCurrentSequence",gf="sequencesToSend",yf=5e3,mf=function(e){var t,n;return e.objectStoreNames.contains(vf)||(n=e.createObjectStore(vf,{keyPath:"sessionId"})),e.objectStoreNames.contains(gf)||(t=e.createObjectStore(gf,{keyPath:"sequenceId",autoIncrement:!0})).createIndex("sessionId","sessionId"),{sequencesStore:t,currentSequenceStore:n}},bf=function(e){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){switch(t.label){case 0:return[4,(n=Sn(e,1,{upgrade:mf}),r=2e3,i="IDB openDB timed out",void 0===i&&(i="IDB operation timed out"),new Promise(function(e,t){var o=setTimeout(function(){return t(new Error("".concat(i," after ").concat(r,"ms")))},r);n.then(function(t){clearTimeout(o),e(t)},function(e){clearTimeout(o),t(e)})}))];case 1:return[2,t.sent()]}var n,r,i})})},wf=function(e){function n(n){var r,i=this;return(i=e.call(this,n)||this).consecutiveFailures=0,i.hasTriggeredFallback=!1,i.emptyFilteredCount=0,i.getSequencesToSend=function(){return Ft(i,void 0,void 0,function(){var e,t,n,r,i,o,s,a,u,l,c=this;return Bt(this,function(d){switch(d.label){case 0:e=!1,t=!1,d.label=1;case 1:return d.trys.push([1,9,,10]),n=[],(r=this.db.transaction("sequencesToSend","readwrite")).done.catch(function(n){e||t||(pf(c.loggerProvider,"".concat(Vd,": ").concat(n),n),c.recordFailure())}),i=Cn(r.done,yf,function(){e||t||(t=!0,pf(c.loggerProvider,"".concat(Vd,": transaction timed out")),c.recordFailure())}),[4,r.store.openCursor()];case 2:o=d.sent(),d.label=3;case 3:return o?(s=o.value,a=s.sessionId,0!==(u=s.events).length?[3,5]:(this.maybeLogEmptyFiltered("getSequencesToSend"),[4,o.delete()])):[3,8];case 4:return d.sent(),[3,6];case 5:n.push({events:u,sequenceId:o.key,sessionId:a}),d.label=6;case 6:return[4,o.continue()];case 7:return o=d.sent(),[3,3];case 8:return this.recordSuccess(),i(),[2,n];case 9:return l=d.sent(),t||(e=!0,pf(this.loggerProvider,"".concat(Vd,": ").concat(l),l),this.recordFailure()),[3,10];case 10:return[2,void 0]}})})},i.storeCurrentSequence=function(e){return Ft(i,void 0,void 0,function(){var n,r,i,o,s,a,u,l,c=this;return Bt(this,function(d){switch(d.label){case 0:n=!1,r=!1,d.label=1;case 1:return d.trys.push([1,5,,6]),(i=this.db.transaction([vf,gf],"readwrite")).done.catch(function(e){n||r||(pf(c.loggerProvider,"".concat(Vd,": ").concat(e),e),c.recordFailure())}),o=Cn(i.done,yf,function(){n||r||(r=!0,pf(c.loggerProvider,"".concat(Vd,": transaction timed out")),c.recordFailure())}),[4,i.objectStore(vf).get(e)];case 2:return!(s=d.sent())||s.tabId&&s.tabId!==this.tabId?(o(),[2,void 0]):0===s.events.length?(this.maybeLogEmptyFiltered("storeCurrentSequence"),o(),[2,void 0]):[4,i.objectStore(gf).put({sessionId:e,events:s.events,tabId:this.tabId})];case 3:return a=d.sent(),[4,i.objectStore(vf).put({sessionId:e,events:[],tabId:this.tabId})];case 4:return d.sent(),this.recordSuccess(),o(),s.tabId,u=Ut(s,["tabId"]),[2,t(t({},u),{sessionId:e,sequenceId:a})];case 5:return l=d.sent(),r||(n=!0,pf(this.loggerProvider,"".concat(Vd,": ").concat(l),l),this.recordFailure()),[3,6];case 6:return[2,void 0]}})})},i.addEventToCurrentSequence=function(e,t){return Ft(i,void 0,void 0,function(){var n,r,i,o,s,a,u,l,c,d=this;return Bt(this,function(f){switch(f.label){case 0:n=!1,r=!1,f.label=1;case 1:return f.trys.push([1,15,,16]),(i=this.db.transaction([vf,gf],"readwrite")).done.catch(function(e){n||r||(pf(d.loggerProvider,"".concat(Vd,": ").concat(e),e),d.recordFailure())}),o=Cn(i.done,yf,function(){n||r||(r=!0,pf(d.loggerProvider,"".concat(Vd,": transaction timed out")),d.recordFailure())}),[4,i.objectStore(vf).get(e)];case 2:return(null==(s=f.sent())?void 0:s.tabId)&&s.tabId!==this.tabId?s.events.length>0?[4,i.objectStore(gf).put({sessionId:e,events:s.events,tabId:s.tabId})]:[3,4]:[3,6];case 3:f.sent(),f.label=4;case 4:return[4,i.objectStore(vf).put({sessionId:e,events:[t],tabId:this.tabId})];case 5:return f.sent(),this.recordSuccess(),o(),[2,void 0];case 6:return(a=s)?[3,8]:[4,i.objectStore(vf).put({sessionId:e,events:[t],tabId:this.tabId})];case 7:return f.sent(),this.recordSuccess(),o(),[2,void 0];case 8:return this.shouldSplitEventsList(a.events,t)?[3,10]:[4,i.objectStore(vf).put({sessionId:e,events:a.events.concat(t),tabId:this.tabId})];case 9:return f.sent(),this.recordSuccess(),o(),[2,void 0];case 10:return 0!==(u=a.events).length?[3,12]:(this.maybeLogEmptyFiltered("addEventToCurrentSequence"),[4,i.objectStore(vf).put({sessionId:e,events:[t],tabId:this.tabId})]);case 11:return f.sent(),this.recordSuccess(),o(),[2,void 0];case 12:return[4,i.objectStore(vf).put({sessionId:e,events:[t],tabId:this.tabId})];case 13:return f.sent(),[4,i.objectStore(gf).put({sessionId:e,events:u,tabId:this.tabId})];case 14:return l=f.sent(),this.recordSuccess(),o(),[2,{events:u,sessionId:e,sequenceId:l}];case 15:return c=f.sent(),r||(n=!0,pf(this.loggerProvider,"".concat(Vd,": ").concat(c),c),this.recordFailure()),[3,16];case 16:return[2,void 0]}})})},i.storeSendingEvents=function(e,t){return Ft(i,void 0,void 0,function(){var n,r;return Bt(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.db.put(gf,{sessionId:e,events:t,tabId:this.tabId})];case 1:return n=i.sent(),this.recordSuccess(),[2,n];case 2:return r=i.sent(),pf(this.loggerProvider,"".concat(Vd,": ").concat(r),r),this.recordFailure(),[3,3];case 3:return[2,void 0]}})})},i.cleanUpSessionEventsStore=function(e,t){return Ft(i,void 0,void 0,function(){var e;return Bt(this,function(n){switch(n.label){case 0:if(!t)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.db.delete(gf,t)];case 2:return n.sent(),this.recordSuccess(),[3,4];case 3:return e=n.sent(),pf(this.loggerProvider,"".concat(Vd,": ").concat(e),e),this.recordFailure(),[3,4];case 4:return[2]}})})},i.db=n.db,i.tabId=n.tabId,i.onPersistentFailure=n.onPersistentFailure,i.consecutiveFailureThreshold=null!==(r=n.consecutiveFailureThreshold)&&void 0!==r?r:1,i}return Dt(n,e),n.prototype.maybeLogEmptyFiltered=function(e){this.emptyFilteredCount++%100==0&&this.loggerProvider.debug("Filtered empty session replay sequence at ".concat(e," (idb store)"))},n.prototype.recordFailure=function(){var e;this.consecutiveFailures++,!this.hasTriggeredFallback&&this.consecutiveFailures>=this.consecutiveFailureThreshold&&(this.hasTriggeredFallback=!0,null===(e=this.onPersistentFailure)||void 0===e||e.call(this))},n.prototype.recordSuccess=function(){this.consecutiveFailures=0},n.new=function(e,r){var i;return Ft(this,void 0,void 0,function(){var o,s,a,u,l;return Bt(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),o="replay"===e?"":"_".concat(e),s="".concat(r.apiKey.substring(0,10),"_amp_session_replay_events").concat(o),[4,bf(s)];case 1:return a=c.sent(),u=null!==(i=r.tabId)&&void 0!==i?i:function(){try{return crypto.randomUUID()}catch(e){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}}(),[2,new n(t(t({},r),{db:a,tabId:u}))];case 2:return l=c.sent(),pf(r.loggerProvider,"".concat(Vd,": ").concat(l),l),[3,3];case 3:return[2]}})})},n.prototype.getCurrentSequenceEvents=function(e){return Ft(this,void 0,void 0,function(){var t,n,r,i,o,s,a,u;return Bt(this,function(l){switch(l.label){case 0:return e?[4,this.db.get("sessionCurrentSequence",e)]:[3,2];case 1:return(i=l.sent())?i.tabId&&i.tabId!==this.tabId?[2,void 0]:(i.tabId,[2,[o=Ut(i,["tabId"])]]):[2,void 0];case 2:t=[],l.label=3;case 3:return l.trys.push([3,8,9,10]),[4,this.db.getAll("sessionCurrentSequence")];case 4:n=qt.apply(void 0,[l.sent()]),r=n.next(),l.label=5;case 5:if(r.done)return[3,7];if((i=r.value).tabId&&i.tabId!==this.tabId)return[3,6];i.tabId,o=Ut(i,["tabId"]),t.push(o),l.label=6;case 6:return r=n.next(),[3,5];case 7:return[3,10];case 8:return s=l.sent(),a={error:s},[3,10];case 9:try{r&&!r.done&&(u=n.return)&&u.call(n)}finally{if(a)throw a.error}return[7];case 10:return[2,t]}})})},n}(ff)}}),lh=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/events/events-memory-store.js":function(){al(),sh(),_f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.finalizedSequences={},t.sequences={},t.sequenceId=0,t.emptyFilteredCount=0,t}return Dt(t,e),t.prototype.resetCurrentSequence=function(e){this.sequences[e]=[]},t.prototype.addSequence=function(e){var t=this.sequenceId++,n=Vt([],zt(this.sequences[e]),!1);return this.finalizedSequences[t]={sessionId:e,events:n},this.resetCurrentSequence(e),{sequenceId:t,events:n,sessionId:e}},t.prototype.maybeLogEmptyFiltered=function(e){this.emptyFilteredCount++%100==0&&this.loggerProvider.debug("Filtered empty session replay sequence at ".concat(e," (in-memory store)"))},t.prototype.getSequencesToSend=function(){return Ft(this,void 0,void 0,function(){var e,t,n,r,i,o,s,a,u,l;return Bt(this,function(c){e=[];try{for(t=qt(Object.entries(this.finalizedSequences)),n=t.next();!n.done;n=t.next())r=zt(n.value,2),i=r[0],o=r[1],s=o.sessionId,0!==(a=o.events).length?e.push({sequenceId:Number(i),sessionId:s,events:a}):(this.maybeLogEmptyFiltered("getSequencesToSend"),delete this.finalizedSequences[Number(i)])}catch(e){u={error:e}}finally{try{n&&!n.done&&(l=t.return)&&l.call(t)}finally{if(u)throw u.error}}return[2,e]})})},t.prototype.storeCurrentSequence=function(e){return Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){return(t=this.sequences[e])?0===t.length?(this.maybeLogEmptyFiltered("storeCurrentSequence"),[2,void 0]):[2,this.addSequence(e)]:[2,void 0]})})},t.prototype.addEventToCurrentSequence=function(e,t){return Ft(this,void 0,void 0,function(){var n;return Bt(this,function(r){return this.sequences[e]||this.resetCurrentSequence(e),this.shouldSplitEventsList(this.sequences[e],t)&&(0===this.sequences[e].length?this.maybeLogEmptyFiltered("addEventToCurrentSequence"):n=this.addSequence(e)),this.sequences[e].push(t),[2,n]})})},t.prototype.storeSendingEvents=function(e,t){return Ft(this,void 0,void 0,function(){return Bt(this,function(n){return this.finalizedSequences[this.sequenceId]={sessionId:e,events:t},[2,this.sequenceId++]})})},t.prototype.cleanUpSessionEventsStore=function(e,t){return Ft(this,void 0,void 0,function(){return Bt(this,function(e){return void 0!==t&&delete this.finalizedSequences[t],[2]})})},t}(ff)}}),ch=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/events/events-manager.js":function(){al(),Wf(),$f(),ih(),uh(),lh(),Sf=function(e){var n=e.config,r=e.minInterval,i=e.maxInterval,o=e.type,s=e.payloadBatcher,a=e.storeType,u=e.trackDestinationWorkerScript,l=e.shouldSend;return Ft(void 0,void 0,void 0,function(){function e(e){return void 0===e&&(e=!1),Ft(this,void 0,void 0,function(){return Bt(this,function(t){return[2,c.flush(e)]})})}var c,d,f,h,p,v,g,y,m,b,w,_;return Bt(this,function(S){switch(S.label){case 0:return c=new Jd(t(t({},n),{loggerProvider:n.loggerProvider,payloadBatcher:s,workerScript:u})),d=function(){return new _f({loggerProvider:n.loggerProvider,maxInterval:i,minInterval:r})},h=!1,v=function(){return Ft(void 0,void 0,void 0,function(){var e,t,r;return Bt(this,function(i){switch(i.label){case 0:return h?(h=!1,n.loggerProvider.warn("IDB store is experiencing repeated failures; falling back to in-memory event store."),f?[4,p.getSequencesToSend()]:[3,2]):[2];case 1:return t=i.sent(),[3,3];case 2:t=void 0,i.label=3;case 3:return e=t,p=d(),e&&f&&(r=f,e.forEach(function(e){_({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:r})})),[2]}})})},g=function(){return Ft(void 0,void 0,void 0,function(){var e;return Bt(this,function(t){switch(t.label){case 0:return[4,wf.new(o,{loggerProvider:n.loggerProvider,minInterval:r,maxInterval:i,apiKey:n.apiKey,onPersistentFailure:function(){v()}})];case 1:return(e=t.sent())?(h=!0,[2,e]):(n.loggerProvider.log("Failed to initialize idb store, falling back to memory store."),[2,d()])}})})},"idb"!==a?[3,2]:[4,g()];case 1:return y=S.sent(),[3,3];case 2:y=d(),S.label=3;case 3:return p=y,m=[],b=0,w=function(e){if(!(e<=b)){var t=Math.min(e-b,m.length);t>0&&(m.splice(0,t),b=e)}},_=function(e){var t=e.events,r=e.sessionId,i=e.deviceId,s=e.sequenceId,a=t.map(function(e){return{event:e,bytes:new Blob([e]).size}}),u=a.filter(function(e){return e.bytes>Qc});u.length>0&&n.loggerProvider.warn("Dropping ".concat(u.length," oversized event(s) from session replay sequence before send. Sizes: ").concat(u.map(function(e){return"".concat(Math.round(e.bytes/1024)," KB")}).join(", "),". If this recurs, please open a GitHub issue at https://github.com/amplitude/Amplitude-TypeScript/issues or contact Amplitude support."));var l=u.length>0?a.filter(function(e){return e.bytes<=Qc}).map(function(e){return e.event}):t;0!==l.length?(n.debugMode&&Id().then(function(e){var t=e.totalStorageSize,r=e.percentOfQuota,i=e.usageDetails;n.loggerProvider.debug("Total storage size: ".concat(t," KB, percentage of quota: ").concat(r,"%, usage details: ").concat(i))}).catch(function(){}),c.sendEventsList({events:l,sessionId:r,flushMaxRetries:n.flushMaxRetries,apiKey:n.apiKey,deviceId:i,sampleRate:n.sampleRate,serverZone:n.serverZone,version:n.version,type:o,onComplete:function(){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(e){switch(e.label){case 0:return[4,p.cleanUpSessionEventsStore(r,s)];case 1:return e.sent(),[2]}})})}})):p.cleanUpSessionEventsStore(r,s).catch(function(e){n.loggerProvider.warn("Failed to clean up session replay events store:",e)})},[2,{sendCurrentSequenceEvents:function(e){var t=e.sessionId,r=e.deviceId;if(f=r,!l||l()){var i=b+m.length;p.storeCurrentSequence(t).then(function(e){e&&(w(i),_({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:r}))}).catch(function(e){n.loggerProvider.warn("Failed to get current sequence of session replay events for session:",e)})}},addEvent:function(e){var t=e.event,r=e.sessionId,i=e.deviceId;f=i;var o=!l||l(),s=b+m.length;m.push(t.data),p.addEventToCurrentSequence(r,t.data).then(function(e){if(e){if(!o)return p.cleanUpSessionEventsStore(e.sessionId,e.sequenceId).catch(function(e){n.loggerProvider.warn("Failed to clean up dropped session replay sequence:",e)}),void w(s);w(s),_({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:i})}}).catch(function(e){n.loggerProvider.warn("Failed to add event to session replay capture:",e)})},sendStoredEvents:function(e){var t=e.deviceId;return Ft(void 0,void 0,void 0,function(){var e;return Bt(this,function(r){switch(r.label){case 0:return f=t,[4,p.getSequencesToSend()];case 1:return(null==(e=r.sent())?void 0:e.length)?(n.loggerProvider.log("Draining ".concat(e.length," stored sequence(s) from previous session.")),e.forEach(function(e){_({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:t})}),[2]):[2]}})})},flush:e,getBeaconEvents:function(){return Vt([],zt(m),!1)},dropPendingBeaconEvents:function(){w(b+m.length)},trackDestination:c}]}})})}}}),dh=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/events/multi-manager.js":function(){al(),kf=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=new Map;e.forEach(function(e){n.set(e.name,e.manager)}),this.managers=n}return e.prototype.sendStoredEvents=function(e){return Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){switch(n.label){case 0:return t=[],this.managers.forEach(function(n){t.push(n.sendStoredEvents(e))}),[4,Promise.all(t)];case 1:return n.sent(),[2]}})})},e.prototype.addEvent=function(e){var t,n=e.sessionId,r=e.event,i=e.deviceId;null===(t=this.managers.get(r.type))||void 0===t||t.addEvent({sessionId:n,event:r,deviceId:i})},e.prototype.sendCurrentSequenceEvents=function(e){var t=e.sessionId,n=e.deviceId;this.managers.forEach(function(e){e.sendCurrentSequenceEvents({sessionId:t,deviceId:n})})},e.prototype.flush=function(e){return Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){switch(n.label){case 0:return t=[],this.managers.forEach(function(n){t.push(n.flush(e))}),[4,Promise.all(t)];case 1:return n.sent(),[2]}})})},e}()}});function fh(e,t){var n,r,i,o,s,a;return void 0===t&&(t=[]),Bt(this,function(u){switch(u.label){case 0:if(!(e.length>0))return[3,9];u.label=1;case 1:u.trys.push([1,6,7,8]),n=qt(e[0]),r=n.next(),u.label=2;case 2:return r.done?[3,5]:(i=r.value,[5,qt(fh(e.slice(1,e.length),t.concat(i)))]);case 3:u.sent(),u.label=4;case 4:return r=n.next(),[3,2];case 5:return[3,8];case 6:return o=u.sent(),s={error:o},[3,8];case 7:try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(s)throw s.error}return[7];case 8:return[3,11];case 9:return[4,t];case 10:u.sent(),u.label=11;case 11:return[2]}})}function hh(e,t,n){var r,i,o;return void 0===n&&(n={counter:0,visited:new Map}),Bt(this,function(s){switch(s.label){case 0:if(!(e.length>2&&e.length>xf.optimizedMinLength))return[3,5];r=1,s.label=1;case 1:return r<e.length-1?n.counter>xf.maxNumberOfTries?[2]:(n.counter+=1,(i=Vt([],zt(e),!1)).splice(r,1),o=Rn(i),n.visited.has(o)?[2]:Mn(i)&&Hn(i,t)?[4,i]:[3,4]):[3,5];case 2:return s.sent(),n.visited.set(o,!0),[5,qt(hh(i,t,n))];case 3:s.sent(),s.label=4;case 4:return r++,[3,1];case 5:return[2]}})}var ph,vh,gh,yh,mh,bh,wh,_h,Sh,kh,xh,Eh,Ch,Ih,Oh,Th,Ah,Rh,Ph,Mh,Nh,Lh,jh,Dh,Uh,Fh,Bh,qh,zh,Vh,Wh,Hh,Gh,Kh,Jh,$h,Qh,Yh,Xh,Zh,ep,tp,np,rp,ip,op,sp,ap,up,lp,cp,dp,fp,hp,pp,vp,gp,yp,mp,bp,wp,_p,Sp,kp,xp,Ep,Cp,Ip,Op,Tp,Ap,Rp,Pp,Mp,Np,Lp,jp=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/libs/finder.js":function(){al()}}),Dp=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/hooks/click.js":function(){al(),Yf(),jp(),Vf(),$f(),ph=function(e){var t=e.version,n=e.events,r=[];return n.forEach(function(e){var t=JSON.parse(e);t.count=1,"click"===t.type&&r.push(t)}),{version:t,events:r}},vh=function(e){var n=e.version,r=e.events,i=[];r.forEach(function(e){var t=JSON.parse(e);"click"===t.type&&i.push(t)});var o=i.reduce(function(e,n){var r=n.x,i=n.y,o=n.selector,s=n.timestamp,a=s-s%36e5,u="".concat(r,":").concat(i,":").concat(null!=o?o:"",":").concat(a);return e[u]?e[u].count+=1:e[u]=t(t({},n),{timestamp:a,count:1}),e},{});return{version:n,events:Object.values(o)}},gh=function(e,t){var n=this;this.createHook=function(e){var t=e.eventsManager,r=e.sessionId,i=e.deviceIdFn,o=e.mirror,s=e.ugcFilterRules,a=e.performanceOptions;return function(e){if(e.type===Nd.Click){var u=G();if(u){var l=u.location,c=u.innerHeight,d=u.innerWidth;if(l){var f=e.x,h=e.y;if(void 0!==f&&void 0!==h){var p,v=o.getNode(e.id);if(v)try{p=In(v,a)}catch(e){n.logger.debug("error resolving selector from finder")}var g=Cd(l.href,s),y={x:f+n.scrollWatcher.currentScrollX,y:h+n.scrollWatcher.currentScrollY,selector:p,viewportHeight:c,viewportWidth:d,pageUrl:g,timestamp:Date.now(),type:"click"},m=i();m&&t.addEvent({sessionId:r,event:{type:"interaction",data:JSON.stringify(y)},deviceId:m})}}}}}},this.logger=e,this.scrollWatcher=t}}}),Up=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/utils/rrweb.js":function(){Vf()}}),Fp=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/beacon-transport.js":function(){Vf(),$f(),yh=function(){function e(e,t){var n=G();n&&n.navigator&&"function"==typeof n.navigator.sendBeacon?this.sendBeacon=function(e,t){try{if(n.navigator.sendBeacon(e,JSON.stringify(t)))return!0}catch(e){}return!1}:this.sendBeacon=function(){return!1},this.sendXhr=function(e,t){var n=new XMLHttpRequest;return n.open("POST",e,!0),n.setRequestHeader("Accept","*/*"),n.send(JSON.stringify(t)),!0},this.basePageUrl=fn(t.serverZone,t.trackServerUrl),this.apiKey=t.apiKey,this.context=e}return e.prototype.send=function(e,t){var n=this.context,r=n.sessionId,i=n.type,o=new URLSearchParams({device_id:e,session_id:String(r),type:String(i),api_key:this.apiKey}),s="".concat(this.basePageUrl,"?").concat(o.toString());this.sendBeacon(s,t)||this.sendXhr(s,t)},e}()}}),Bp=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/hooks/scroll.js":function(){Up(),Fp(),Vf(),$f(),mh=function(){function e(e,t){var n=this;this.timestamp=Date.now(),this.hook=function(e){n.update(e)},this.send=function(e){return function(t){var r,i,o,s,a=e(),u=G();if(u&&a){var l=null!==(r=u.scrollX)&&void 0!==r?r:0,c=null!==(i=u.scrollY)&&void 0!==i?i:0;(l>0||c>0)&&n.update({id:1,x:l,y:c}),n.transport.send(a,{version:1,events:[{maxScrollX:n._maxScrollX,maxScrollY:n._maxScrollY,maxScrollWidth:n._maxScrollWidth,maxScrollHeight:n._maxScrollHeight,viewportHeight:Gn(),viewportWidth:Kn(),pageUrl:Cd(u.location.href,null!==(s=null===(o=n.config.interactionConfig)||void 0===o?void 0:o.ugcFilterRules)&&void 0!==s?s:[]),timestamp:n.timestamp,type:"scroll"}]})}}},this._maxScrollX=0,this._maxScrollY=0,this._currentScrollX=0,this._currentScrollY=0,this._maxScrollWidth=Kn(),this._maxScrollHeight=Gn(),this.config=t,this.transport=e}return e.default=function(t,n){return new e(new yh(t,n),n)},Object.defineProperty(e.prototype,"maxScrollX",{get:function(){return this._maxScrollX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollY",{get:function(){return this._maxScrollY},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollWidth",{get:function(){return this._maxScrollWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollHeight",{get:function(){return this._maxScrollHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentScrollX",{get:function(){return this._currentScrollX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentScrollY",{get:function(){return this._currentScrollY},enumerable:!1,configurable:!0}),e.prototype.update=function(e){var t=Date.now();if(this._currentScrollX=e.x,this._currentScrollY=e.y,e.x>this._maxScrollX){var n=Kn();this._maxScrollX=e.x;var r=e.x+n;r>this._maxScrollWidth&&(this._maxScrollWidth=r),this.timestamp=t}if(e.y>this._maxScrollY){var i=Gn();this._maxScrollY=e.y;var o=e.y+i;o>this._maxScrollHeight&&(this._maxScrollHeight=o),this.timestamp=t}},e}()}}),qp=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/identifiers.js":function(){$f(),bh=function(e){var t=e.sessionId,n=e.deviceId;this.deviceId=n,this.sessionId=t,t&&n&&(this.sessionReplayId=_d(t,n))}}}),zp=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/replay-start-time-store.js":function(){al(),Vf(),wh=864e5,_h=function(e){return"".concat("AMP_SR_START_").concat(e.substring(0,10),"_")},Sh=function(e,t){return"".concat(_h(e)).concat(t)},kh=function(){try{var e=G();return null==e?void 0:e.localStorage}catch(e){return}},xh=function(e,t,n,r){var i=kh();if(i){var o=Sh(e,t);try{var s=i.getItem(o);if(null!==s){var a=Number(s);if(Number.isFinite(a)&&a>0&&a<=n&&n-a<wh)return a}return i.setItem(o,String(n)),n}catch(e){return void(null==r||r.debug("Failed to read/write replay start time from storage: ".concat(String(e))))}}},Eh=function(e,t,n,r){var i=kh();if(i)try{i.setItem(Sh(e,t),String(n))}catch(e){null==r||r.debug("Failed to write replay start time to storage: ".concat(String(e)))}},Ch=function(e,t,n){var r=kh();if(r)try{r.removeItem(Sh(e,t))}catch(e){null==n||n.debug("Failed to remove replay start time from storage: ".concat(String(e)))}},Ih=function(e,t,n){var r,i,o=kh();if(o){var s=_h(e);try{for(var a=[],u=0;u<o.length;u++){if((h=o.key(u))&&h.startsWith(s)){var l=o.getItem(h);if(null!==l){var c=Number(l);(!Number.isFinite(c)||c<=0||t-c>=wh)&&a.push(h)}}}try{for(var d=qt(a),f=d.next();!f.done;f=d.next()){var h=f.value;o.removeItem(h)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}catch(e){null==n||n.debug("Failed to prune stale replay start times: ".concat(String(e)))}}}}}),Vp=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/targeting/targeting-idb-store.js":function(){al(),oh(),ah(),Oh=new function(){var e=this;this.dbs={},this.createStore=function(t){return Ft(e,void 0,void 0,function(){return Bt(this,function(e){switch(e.label){case 0:return[4,Sn(t,1,{upgrade:function(e){e.objectStoreNames.contains("sessionTargetingMatch")||e.createObjectStore("sessionTargetingMatch",{keyPath:"sessionId"})}})];case 1:return[2,e.sent()]}})})},this.openOrCreateDB=function(t){return Ft(e,void 0,void 0,function(){var e,n;return Bt(this,function(r){switch(r.label){case 0:return this.dbs&&this.dbs[t]?[2,this.dbs[t]]:(e="".concat(t.substring(0,10),"_amp_session_replay_targeting"),[4,this.createStore(e)]);case 1:return n=r.sent(),this.dbs[t]=n,[2,n]}})})},this.getTargetingMatchForSession=function(t){var n=t.loggerProvider,r=t.apiKey,i=t.sessionId;return Ft(e,void 0,void 0,function(){var e,t,o,s;return Bt(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,this.openOrCreateDB(r)];case 1:return e=a.sent(),t=String(i),[4,e.get("sessionTargetingMatch",t)];case 2:return[2,null==(o=a.sent())?void 0:o.targetingMatch];case 3:return s=a.sent(),pf(n,"Failed to get targeting match for session id ".concat(i,": ").concat(s),s),[3,4];case 4:return[2,void 0]}})})},this.storeTargetingMatchForSession=function(t){var n=t.loggerProvider,r=t.apiKey,i=t.sessionId,o=t.targetingMatch;return Ft(e,void 0,void 0,function(){var e,t,s;return Bt(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,this.openOrCreateDB(r)];case 1:return e=a.sent(),t=String(i),[4,e.put("sessionTargetingMatch",{targetingMatch:o,sessionId:t,lastUpdated:Date.now()})];case 2:return[2,a.sent()];case 3:return s=a.sent(),pf(n,"Failed to store targeting match for session id ".concat(i,": ").concat(s),s),[3,4];case 4:return[2,void 0]}})})},this.clearStoreOfOldSessions=function(t){var n=t.loggerProvider,r=t.apiKey,i=t.currentSessionId;return Ft(e,void 0,void 0,function(){var e,t,o,s,a,u,l,c;return Bt(this,function(d){switch(d.label){case 0:return d.trys.push([0,8,,9]),[4,this.openOrCreateDB(r)];case 1:return e=d.sent(),t=String(i),[4,(o=e.transaction("sessionTargetingMatch","readwrite")).store.getAll()];case 2:s=d.sent(),a=0,d.label=3;case 3:return a<s.length?(u=s[a],l=Date.now()-u.lastUpdated,u.sessionId!==t&&l>1728e5?[4,o.store.delete(u.sessionId)]:[3,5]):[3,6];case 4:d.sent(),d.label=5;case 5:return a++,[3,3];case 6:return[4,o.done];case 7:return d.sent(),[3,9];case 8:return c=d.sent(),pf(n,"Failed to clear old targeting matches for sessions: ".concat(c),c),[3,9];case 9:return[2]}})})}}}}),Wp=tl({"../../../../node_modules/@amplitude/targeting/node_modules/@amplitude/experiment-core/dist/experiment-core.esm.js":function(){var e;Th=function(e,t){return(Th=Object.setPrototypeOf||_instanceof({__proto__:[]},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)},Ah=function(){return Ah=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},Ah.apply(this,arguments)},Rh={IS:"is",IS_NOT:"is not",CONTAINS:"contains",DOES_NOT_CONTAIN:"does not contain",LESS_THAN:"less",LESS_THAN_EQUALS:"less or equal",GREATER_THAN:"greater",GREATER_THAN_EQUALS:"greater or equal",VERSION_LESS_THAN:"version less",VERSION_LESS_THAN_EQUALS:"version less or equal",VERSION_GREATER_THAN:"version greater",VERSION_GREATER_THAN_EQUALS:"version greater or equal",SET_IS:"set is",SET_IS_NOT:"set is not",SET_CONTAINS:"set contains",SET_DOES_NOT_CONTAIN:"set does not contain",SET_CONTAINS_ANY:"set contains any",SET_DOES_NOT_CONTAIN_ANY:"set does not contain any",REGEX_MATCH:"regex match",REGEX_DOES_NOT_MATCH:"regex does not match"},Ph=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296==(64512&i)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return Uint8Array.from(t)},Mh=-862048943,Nh=461845907,Lh=function(e,t){void 0===t&&(t=0);for(var n=Ph(e),r=n.length,i=r>>2,o=t,s=0;s<i;s++){var a=Fh(n,s<<2);o=jh(a,o)}var u=i<<2,l=0;switch(r-u){case 3:l^=n[u+2]<<16,l^=n[u+1]<<8,l^=n[u],l=Math.imul(l,Mh),l=Uh(l,15),o^=l=Math.imul(l,Nh);break;case 2:l^=n[u+1]<<8,l^=n[u],l=Math.imul(l,Mh),l=Uh(l,15),o^=l=Math.imul(l,Nh);break;case 1:l^=n[u],l=Math.imul(l,Mh),l=Uh(l,15),o^=l=Math.imul(l,Nh)}return Dh(o^=r)>>>0},jh=function(e,t){var n=e,r=t;return n=Math.imul(n,Mh),n=Uh(n,15),n=Math.imul(n,Nh),r=Uh(r^=n,13),(r=Math.imul(r,5))+-430675100|0},Dh=function(e){var t=e;return t^=t>>>16,t=Math.imul(t,-2048144789),t^=t>>>13,t=Math.imul(t,-1028477387),t^=t>>>16},Uh=function(e,t,n){return void 0===n&&(n=32),t>n&&(t%=n),(e<<t|(e&4294967295<<n-t>>>0)>>>0>>>n-t>>>0)>>>0},Fh=function(e,t){void 0===t&&(t=0);var n=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return Bh(n)},Bh=function(e){return(-16777216&e)>>>24|(16711680&e)>>>8|(65280&e)<<8|(255&e)<<24},qh=function(e,t){var n,r;if(t&&0!==t.length){try{for(var i=Qn(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!s||!e||"object"!==(void 0===e?"undefined":_type_of(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||void 0}},zh="^".concat("(\\d+)\\.(\\d+)","(\\.").concat("(\\d+)").concat("(-(([-\\w]+\\.?)*))?",")?$"),Vh=function(){function e(e,t,n,r){void 0===r&&(r=void 0),this.major=e,this.minor=t,this.patch=n,this.preRelease=r}return e.parse=function(t){if(t){var n=new RegExp(zh).exec(t);if(n){var r=Number(n[1]),i=Number(n[2]);if(!isNaN(r)&&!isNaN(i))return new e(r,i,Number(n[4])||0,n[5]||void 0)}}},e.prototype.compareTo=function(e){return this.major>e.major?1:this.major<e.major?-1:this.minor>e.minor?1:this.minor<e.minor?-1:this.patch>e.patch?1:this.patch<e.patch||this.preRelease&&!e.preRelease?-1:!this.preRelease&&e.preRelease?1:this.preRelease&&e.preRelease?this.preRelease>e.preRelease?1:this.preRelease<e.preRelease?-1:0:0},e}(),Wh=function(){function e(){}return e.prototype.evaluate=function(e,t){var n,r,i={},o={context:e,result:i};try{for(var s=Qn(t),a=s.next();!a.done;a=s.next()){var u=a.value,l=this.evaluateFlag(o,u);l&&(i[u.key]=l)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i},e.prototype.evaluateFlag=function(e,t){var n,r,i;try{for(var o=Qn(t.segments),s=o.next();!s.done;s=o.next()){var a=s.value;if(i=this.evaluateSegment(e,t,a)){var u=Ah(Ah(Ah({},t.metadata),a.metadata),i.metadata);i=Ah(Ah({},i),{metadata:u});break}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},e.prototype.evaluateSegment=function(e,t,n){var r,i,o,s;if(!n.conditions)return void 0!==(l=this.bucket(e,n))?t.variants[l]:void 0;try{for(var a=Qn(n.conditions),u=a.next();!u.done;u=a.next()){var l,c=u.value,d=!0;try{for(var f=(o=void 0,Qn(c)),h=f.next();!h.done;h=f.next()){var p=h.value;if(!(d=this.matchCondition(e,p)))break}}catch(e){o={error:e}}finally{try{h&&!h.done&&(s=f.return)&&s.call(f)}finally{if(o)throw o.error}}if(d)return void 0!==(l=this.bucket(e,n))?t.variants[l]:void 0}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}},e.prototype.matchCondition=function(e,t){var n=qh(e,t.selector);if(n){if(this.isSetOperator(t.op)){var r=this.coerceStringArray(n);return!!r&&this.matchSet(r,t.op,t.values)}var i=this.coerceString(n);return void 0!==i&&this.matchString(i,t.op,t.values)}return this.matchNull(t.op,t.values)},e.prototype.getHash=function(e){return Lh(e)},e.prototype.bucket=function(e,t){var n,r,i,o;if(!t.bucket)return t.variant;var s=this.coerceString(qh(e,t.bucket.selector));if(!s||0===s.length)return t.variant;var a="".concat(t.bucket.salt,"/").concat(s),u=this.getHash(a),l=u%100,c=Math.floor(u/100);try{for(var d=Qn(t.bucket.allocations),f=d.next();!f.done;f=d.next()){var h=f.value,p=h.range[0],v=h.range[1];if(l>=p&&l<v)try{for(var g=(i=void 0,Qn(h.distributions)),y=g.next();!y.done;y=g.next()){var m=y.value,b=m.range[0],w=m.range[1];if(c>=b&&c<w)return m.variant}}catch(e){i={error:e}}finally{try{y&&!y.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}return t.variant},e.prototype.matchNull=function(e,t){var n=this.containsNone(t);switch(e){case Rh.IS:case Rh.CONTAINS:case Rh.LESS_THAN:case Rh.LESS_THAN_EQUALS:case Rh.GREATER_THAN:case Rh.GREATER_THAN_EQUALS:case Rh.VERSION_LESS_THAN:case Rh.VERSION_LESS_THAN_EQUALS:case Rh.VERSION_GREATER_THAN:case Rh.VERSION_GREATER_THAN_EQUALS:case Rh.SET_IS:case Rh.SET_CONTAINS:case Rh.SET_CONTAINS_ANY:return n;case Rh.IS_NOT:case Rh.DOES_NOT_CONTAIN:case Rh.SET_DOES_NOT_CONTAIN:case Rh.SET_DOES_NOT_CONTAIN_ANY:return!n;default:return!1}},e.prototype.matchSet=function(e,t,n){switch(t){case Rh.SET_IS:return this.setEquals(e,n);case Rh.SET_IS_NOT:return!this.setEquals(e,n);case Rh.SET_CONTAINS:return this.matchesSetContainsAll(e,n);case Rh.SET_DOES_NOT_CONTAIN:return!this.matchesSetContainsAll(e,n);case Rh.SET_CONTAINS_ANY:return this.matchesSetContainsAny(e,n);case Rh.SET_DOES_NOT_CONTAIN_ANY:return!this.matchesSetContainsAny(e,n);default:return!1}},e.prototype.matchString=function(e,t,n){var r=this;switch(t){case Rh.IS:return this.matchesIs(e,n);case Rh.IS_NOT:return!this.matchesIs(e,n);case Rh.CONTAINS:return this.matchesContains(e,n);case Rh.DOES_NOT_CONTAIN:return!this.matchesContains(e,n);case Rh.LESS_THAN:case Rh.LESS_THAN_EQUALS:case Rh.GREATER_THAN:case Rh.GREATER_THAN_EQUALS:return this.matchesComparable(e,t,n,function(e){return r.parseNumber(e)},this.comparator);case Rh.VERSION_LESS_THAN:case Rh.VERSION_LESS_THAN_EQUALS:case Rh.VERSION_GREATER_THAN:case Rh.VERSION_GREATER_THAN_EQUALS:return this.matchesComparable(e,t,n,function(e){return Vh.parse(e)},this.versionComparator);case Rh.REGEX_MATCH:return this.matchesRegex(e,n);case Rh.REGEX_DOES_NOT_MATCH:return!this.matchesRegex(e,n);default:return!1}},e.prototype.matchesIs=function(e,t){if(this.containsBooleans(t)){var n=e.toLowerCase();if("true"===n||"false"===n)return t.some(function(e){return e.toLowerCase()===n})}return t.some(function(t){return e===t})},e.prototype.matchesContains=function(e,t){var n,r;try{for(var i=Qn(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(e.toLowerCase().includes(s.toLowerCase()))return!0}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1},e.prototype.matchesComparable=function(e,t,n,r,i){var o=this,s=r(e),a=n.map(function(e){return r(e)}).filter(function(e){return void 0!==e});return void 0===s||0===a.length?n.some(function(n){return o.comparator(e,t,n)}):a.some(function(e){return i(s,t,e)})},e.prototype.comparator=function(e,t,n){switch(t){case Rh.LESS_THAN:case Rh.VERSION_LESS_THAN:return e<n;case Rh.LESS_THAN_EQUALS:case Rh.VERSION_LESS_THAN_EQUALS:return e<=n;case Rh.GREATER_THAN:case Rh.VERSION_GREATER_THAN:return e>n;case Rh.GREATER_THAN_EQUALS:case Rh.VERSION_GREATER_THAN_EQUALS:return e>=n;default:return!1}},e.prototype.versionComparator=function(e,t,n){var r=e.compareTo(n);switch(t){case Rh.LESS_THAN:case Rh.VERSION_LESS_THAN:return r<0;case Rh.LESS_THAN_EQUALS:case Rh.VERSION_LESS_THAN_EQUALS:return r<=0;case Rh.GREATER_THAN:case Rh.VERSION_GREATER_THAN:return r>0;case Rh.GREATER_THAN_EQUALS:case Rh.VERSION_GREATER_THAN_EQUALS:return r>=0;default:return!1}},e.prototype.matchesRegex=function(e,t){return t.some(function(t){return Boolean(new RegExp(t).exec(e))})},e.prototype.containsNone=function(e){return e.some(function(e){return"(none)"===e})},e.prototype.containsBooleans=function(e){return e.some(function(e){switch(e.toLowerCase()){case"true":case"false":return!0;default:return!1}})},e.prototype.parseNumber=function(e){var t;return null!==(t=Number(e))&&void 0!==t?t:void 0},e.prototype.coerceString=function(e){if(e)return"object"===(void 0===e?"undefined":_type_of(e))?JSON.stringify(e):String(e)},e.prototype.coerceStringArray=function(e){var t=this;if(Array.isArray(e))return e.map(function(e){return t.coerceString(e)}).filter(Boolean);var n=String(e);try{var r=JSON.parse(n);return Array.isArray(r)?e.map(function(e){return t.coerceString(e)}).filter(Boolean):void 0}catch(e){return}},e.prototype.isSetOperator=function(e){switch(e){case Rh.SET_IS:case Rh.SET_IS_NOT:case Rh.SET_CONTAINS:case Rh.SET_DOES_NOT_CONTAIN:case Rh.SET_CONTAINS_ANY:case Rh.SET_DOES_NOT_CONTAIN_ANY:return!0;default:return!1}},e.prototype.setEquals=function(e,t){var n=new Set(e),r=new Set(t);return n.size===r.size&&function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([],function(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}(r),!1).every(function(e){return n.has(e)})},e.prototype.matchesSetContainsAll=function(e,t){var n,r;if(e.length<t.length)return!1;try{for(var i=Qn(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!this.matchesIs(s,e))return!1}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0},e.prototype.matchesSetContainsAny=function(e,t){var n,r;try{for(var i=Qn(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(this.matchesIs(s,e))return!0}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1},e}(),Gh=Hh="3.7.5",Kh="function"==typeof atob,Jh="function"==typeof btoa,$h="function"==typeof Buffer,Qh="function"==typeof TextDecoder?new TextDecoder:void 0,Yh="function"==typeof TextEncoder?new TextEncoder:void 0,Xh=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),e={},Xh.forEach(function(t,n){return e[t]=n}),Zh=e,ep=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,tp=String.fromCharCode.bind(String),np="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(e){return new Uint8Array(Array.prototype.slice.call(e,0))},rp=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,function(e){return"+"==e?"-":"_"})},ip=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},op=function(e){for(var t,n,r,i,o="",s=e.length%3,a=0;a<e.length;){if((n=e.charCodeAt(a++))>255||(r=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");o+=Xh[(t=n<<16|r<<8|i)>>18&63]+Xh[t>>12&63]+Xh[t>>6&63]+Xh[63&t]}return s?o.slice(0,s-3)+"===".substring(s):o},ap=$h?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],n=0,r=e.length;n<r;n+=4096)t.push(tp.apply(null,e.subarray(n,n+4096)));return sp(t.join(""))},up=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?rp(ap(e)):ap(e)},lp=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?tp(192|t>>>6)+tp(128|63&t):tp(224|t>>>12&15)+tp(128|t>>>6&63)+tp(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return tp(240|t>>>18&7)+tp(128|t>>>12&63)+tp(128|t>>>6&63)+tp(128|63&t)},cp=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,fp=$h?function(e){return Buffer.from(e,"utf8").toString("base64")}:Yh?function(e){return ap(Yh.encode(e))}:function(e){return sp(dp(e))},hp=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?rp(fp(e)):fp(e)},pp=function(e){return hp(e,!0)},vp=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,gp=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return tp((t>>>10)+55296)+tp(56320+(1023&t));case 3:return tp((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return tp((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},mp=function(e){if(e=e.replace(/\s+/g,""),!ep.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));for(var t,n,r,i="",o=0;o<e.length;)t=Zh[e.charAt(o++)]<<18|Zh[e.charAt(o++)]<<12|(n=Zh[e.charAt(o++)])<<6|(r=Zh[e.charAt(o++)]),i+=64===n?tp(t>>16&255):64===r?tp(t>>16&255,t>>8&255):tp(t>>16&255,t>>8&255,255&t);return i},wp=$h?function(e){return np(Buffer.from(e,"base64"))}:function(e){return np(bp(e).split("").map(function(e){return e.charCodeAt(0)}))},_p=function(e){return wp(kp(e))},Sp=$h?function(e){return Buffer.from(e,"base64").toString("utf8")}:Qh?function(e){return Qh.decode(wp(e))}:function(e){return yp(bp(e))},kp=function(e){return ip(e.replace(/[-_]/g,function(e){return"-"==e?"+":"/"}))},Ep=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},Cp=function(){var e=function(e,t){return Object.defineProperty(String.prototype,e,Ep(t))};e("fromBase64",function(){return xp(this)}),e("toBase64",function(e){return hp(this,e)}),e("toBase64URI",function(){return hp(this,!0)}),e("toBase64URL",function(){return hp(this,!0)}),e("toUint8Array",function(){return _p(this)})},Ip=function(){var e=function(e,t){return Object.defineProperty(Uint8Array.prototype,e,Ep(t))};e("toBase64",function(e){return up(this,e)}),e("toBase64URI",function(){return up(this,!0)}),e("toBase64URL",function(){return up(this,!0)})},Op=function(){Cp(),Ip()},Tp={version:Hh,VERSION:Gh,atob:bp=Kh?function(e){return atob(ip(e))}:$h?function(e){return Buffer.from(e,"base64").toString("binary")}:mp,atobPolyfill:mp,btoa:sp=Jh?function(e){return btoa(e)}:$h?function(e){return Buffer.from(e,"binary").toString("base64")}:op,btoaPolyfill:op,fromBase64:xp=function(e){return Sp(kp(e))},toBase64:hp,encode:hp,encodeURI:pp,encodeURL:pp,utob:dp=function(e){return e.replace(cp,lp)},btou:yp=function(e){return e.replace(vp,gp)},decode:xp,isValid:function(e){if("string"!=typeof e)return!1;var t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:up,toUint8Array:_p,extendString:Cp,extendUint8Array:Ip,extendBuiltins:Op},Ap=function(e){function t(n,r){var i=e.call(this,r)||this;return i.statusCode=n,Object.setPrototypeOf(i,t.prototype),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Th(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error),function(){function e(e,t,n){this.deploymentKey=e,this.serverUrl=t,this.httpClient=n}return e.prototype.getVariants=function(e,t){return Jn(this,void 0,void 0,function(){var n,r,i;return $n(this,function(o){switch(o.label){case 0:return n=Tp.encodeURL(JSON.stringify(e)),r={Authorization:"Api-Key ".concat(this.deploymentKey),"X-Amp-Exp-User":n},(null==t?void 0:t.flagKeys)&&(r["X-Amp-Exp-Flag-Keys"]=Tp.encodeURL(JSON.stringify(t.flagKeys))),(null==t?void 0:t.trackingOption)&&(r["X-Amp-Exp-Track"]=t.trackingOption),[4,this.httpClient.request({requestUrl:"".concat(this.serverUrl,"/sdk/v2/vardata?v=0"),method:"GET",headers:r,timeoutMillis:null==t?void 0:t.timeoutMillis})];case 1:if(200!=(i=o.sent()).status)throw new Ap(i.status,"Fetch error response: status=".concat(i.status));return[2,JSON.parse(i.body)]}})})},e}(),function(){function e(e,t,n){this.deploymentKey=e,this.serverUrl=t,this.httpClient=n}return e.prototype.getFlags=function(e){return Jn(this,void 0,void 0,function(){var t,n;return $n(this,function(r){switch(r.label){case 0:return t={Authorization:"Api-Key ".concat(this.deploymentKey)},(null==e?void 0:e.libraryName)&&(null==e?void 0:e.libraryVersion)&&(t["X-Amp-Exp-Library"]="".concat(e.libraryName,"/").concat(e.libraryVersion)),[4,this.httpClient.request({requestUrl:"".concat(this.serverUrl,"/sdk/v2/flags"),method:"GET",headers:t,timeoutMillis:null==e?void 0:e.timeoutMillis})];case 1:if(200!=(n=r.sent()).status)throw Error("Flags error response: status=".concat(n.status));return[2,JSON.parse(n.body).reduce(function(e,t){return e[t.key]=t,e},{})]}})})},e}(),Rp="undefined"!=typeof globalThis?globalThis:global||self,function(){function e(e,t){this.poller=void 0,this.action=e,this.ms=t}return e.prototype.start=function(){this.poller||(this.poller=Rp.setInterval(this.action,this.ms),this.action())},e.prototype.stop=function(){this.poller&&(Rp.clearInterval(this.poller),this.poller=void 0)},e}()}}),Hp=tl({"../../../../node_modules/@amplitude/targeting/lib/esm/targeting-idb-store.js":function(){al(),oh(),Pp=new function(){var e=this;this.dbs={},this.createStore=function(t){return Ft(e,void 0,void 0,function(){return Bt(this,function(e){switch(e.label){case 0:return[4,Sn(t,1,{upgrade:function(e){e.objectStoreNames.contains("eventTypesForSession")||e.createObjectStore("eventTypesForSession",{keyPath:"sessionId"})}})];case 1:return[2,e.sent()]}})})},this.openOrCreateDB=function(t){return Ft(e,void 0,void 0,function(){var e,n;return Bt(this,function(r){switch(r.label){case 0:return this.dbs&&this.dbs[t]?[2,this.dbs[t]]:(e="".concat(t.substring(0,10),"_amp_targeting"),[4,this.createStore(e)]);case 1:return n=r.sent(),this.dbs[t]=n,[2,n]}})})},this.updateEventListForSession=function(n){var r=n.sessionId,i=n.eventType,o=n.eventTime,s=n.loggerProvider,a=n.tx;return Ft(e,void 0,void 0,function(){var e,n,u,l,c,d,f;return Bt(this,function(h){switch(h.label){case 0:return h.trys.push([0,3,,4]),[4,a.store.get(r)];case 1:return e=h.sent(),n=e?e.eventTypes:{},u=n[i]||{},l=t(t({},n),((d={})[i]=t(t({},u),((f={})[o]={event_type:i},f)),d)),[4,a.store.put({sessionId:r,eventTypes:l})];case 2:return h.sent(),[2,l];case 3:return c=h.sent(),s.warn("Failed to store events for targeting ".concat(r,": ").concat(c)),[3,4];case 4:return[2,void 0]}})})},this.deleteOldSessionEventTypes=function(t){var n=t.currentSessionId,r=t.loggerProvider,i=t.tx;return Ft(e,void 0,void 0,function(){var e,t,o,s,a;return Bt(this,function(u){switch(u.label){case 0:return u.trys.push([0,6,,7]),[4,i.store.getAll()];case 1:e=u.sent(),t=0,u.label=2;case 2:return t<e.length?(o=e[t],s=Date.now()-o.sessionId,o.sessionId!==n&&s>1728e5?[4,i.store.delete(o.sessionId)]:[3,4]):[3,5];case 3:u.sent(),u.label=4;case 4:return t++,[3,2];case 5:return[3,7];case 6:return a=u.sent(),r.warn("Failed to clear old session events for targeting: ".concat(a)),[3,7];case 7:return[2]}})})},this.storeEventTypeForSession=function(t){var n=t.loggerProvider,r=t.sessionId,i=t.eventType,o=t.eventTime,s=t.apiKey;return Ft(e,void 0,void 0,function(){var e,t,a,u;return Bt(this,function(l){switch(l.label){case 0:return l.trys.push([0,5,,6]),[4,this.openOrCreateDB(s)];case 1:return e=l.sent(),(t=e.transaction("eventTypesForSession","readwrite"))?[4,this.updateEventListForSession({sessionId:r,tx:t,loggerProvider:n,eventType:i,eventTime:o})]:[2];case 2:return a=l.sent(),[4,this.deleteOldSessionEventTypes({currentSessionId:r,tx:t,loggerProvider:n})];case 3:return l.sent(),[4,t.done];case 4:return l.sent(),[2,a];case 5:return u=l.sent(),n.warn("Failed to store events for targeting ".concat(r,": ").concat(u)),[3,6];case 6:return[2,void 0]}})})}}}}),Gp=tl({"../../../../node_modules/@amplitude/targeting/lib/esm/targeting.js":function(){al(),Wp(),Hp(),Mp=function(){var e=this;this.evaluateTargeting=function(t){var n=t.apiKey,r=t.loggerProvider,i=t.event,o=t.sessionId,s=t.userProperties,a=t.deviceId,u=t.flag;return Ft(e,void 0,void 0,function(){var e,t,l,c;return Bt(this,function(d){switch(d.label){case 0:return i&&i.time?[4,Pp.storeEventTypeForSession({loggerProvider:r,apiKey:n,sessionId:o,eventType:i.event_type,eventTime:i.time})]:[3,2];case 1:return t=d.sent(),[3,3];case 2:t=void 0,d.label=3;case 3:return l=(e=t)&&new Set(Object.keys(e)),c={session_id:o,event:i,event_types:l&&Array.from(l),user:{device_id:a,user_properties:s}},[2,this.evaluationEngine.evaluate(c,[u])]}})})},this.evaluationEngine=new Wh}}}),Kp=tl({"../../../../node_modules/@amplitude/targeting/lib/esm/targeting-factory.js":function(){Gp(),Np=function(){var e=new Mp;return{evaluateTargeting:e.evaluateTargeting.bind(e)}}()}}),Jp={};rl(Jp,{evaluateTargeting:function(){return Lp}});var $p,Qp,Yp,Xp,Zp,ev,tv,nv,rv,iv,ov,sv=tl({"../../../../node_modules/@amplitude/targeting/lib/esm/index.js":function(){Kp(),Lp=Np.evaluateTargeting}}),av=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/targeting/targeting-manager.js":function(){al(),Vp(),$p=function(e){var n=e.sessionId,r=e.targetingConfig,i=e.loggerProvider,o=e.apiKey,s=e.targetingParams,a=e.urlChange,u=void 0!==a&&a;return Ft(void 0,void 0,void 0,function(){var e,a,l,c,d,f;return Bt(this,function(h){switch(h.label){case 0:return[4,Oh.clearStoreOfOldSessions({loggerProvider:i,apiKey:o,currentSessionId:n})];case 1:return h.sent(),[4,Oh.getTargetingMatchForSession({loggerProvider:i,apiKey:o,sessionId:n})];case 2:if(!0===h.sent()&&!u)return[2,!0];e=!0,h.label=3;case 3:return h.trys.push([3,6,,7]),[4,Promise.resolve().then(function(){return sv(),Jp})];case 4:return a=h.sent().evaluateTargeting,l=t(t({},s),{flag:r,sessionId:"string"==typeof n?parseInt(n,10):n,apiKey:o,loggerProvider:i}),[4,a(l)];case 5:return(c=h.sent())&&c.sr_targeting_config&&(e="on"===c.sr_targeting_config.key),Oh.storeTargetingMatchForSession({loggerProvider:i,apiKey:o,sessionId:n,targetingMatch:e}),[3,7];case 6:return d=h.sent(),f=d,i.warn(f.message),[3,7];case 7:return[2,e]}})})}}}),uv=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/sampling.js":function(){Qp=2654435761,Yp=2246822519,Xp=3266489917,Zp=668265263,ev=374761393}}),lv=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/plugins/url-tracking-plugin.js":function(){al(),$f(),Wf(),tv="__amplitude_url_tracking_patched__",nv=new WeakMap,nr()}}),cv=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/cross-origin-iframes.js":function(){al(),Vf(),Wf(),rv=function(){function e(){this.pendingLoadListeners=new Map}return e.prototype.start=function(){var e,t=this;null===(e=this.mutationObserver)||void 0===e||e.disconnect(),G()&&(this.sendToAllIframes({type:dd,action:"start"}),this.mutationObserver=new MutationObserver(function(e){var n,r,i,o,s,a;try{for(var u=qt(e),l=u.next();!l.done;l=u.next()){var c=l.value;try{for(var d=(i=void 0,qt(Array.from(c.addedNodes))),f=d.next();!f.done;f=d.next()){_instanceof(v=f.value,HTMLIFrameElement)?t.sendToIframeAfterLoad(v):_instanceof(v,Element)&&v.querySelectorAll("iframe").forEach(function(e){t.sendToIframeAfterLoad(e)})}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}try{for(var h=(s=void 0,qt(Array.from(c.removedNodes))),p=h.next();!p.done;p=h.next()){var v;if(_instanceof(v=p.value,HTMLIFrameElement)){var g=t.pendingLoadListeners.get(v);g&&(v.removeEventListener("load",g),t.pendingLoadListeners.delete(v))}}}catch(e){s={error:e}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(s)throw s.error}}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}),this.mutationObserver.observe(document.documentElement,{childList:!0,subtree:!0}))},e.prototype.stop=function(){var e;null===(e=this.mutationObserver)||void 0===e||e.disconnect(),this.mutationObserver=void 0,this.pendingLoadListeners.forEach(function(e,t){t.removeEventListener("load",e)}),this.pendingLoadListeners.clear(),this.sendToAllIframes({type:dd,action:"stop"})},e.prototype.sendToIframeAfterLoad=function(e){var t=this,n=function(){t.pendingLoadListeners.delete(e),t.sendToIframe(e,{type:dd,action:"start"})};this.pendingLoadListeners.set(e,n),e.addEventListener("load",n,{once:!0})},e.prototype.sendToAllIframes=function(e){var t=this;document.querySelectorAll("iframe").forEach(function(n){return t.sendToIframe(n,e)})},e.prototype.sendToIframe=function(e,t){var n;try{null===(n=e.contentWindow)||void 0===n||n.postMessage(t,"*")}catch(e){}},e}()}}),dv={};rl(dv,{compressionScript:function(){return iv},trackDestinationScript:function(){return ov}});var fv,hv,pv,vv,gv,yv,mv,bv,wv,_v,Sv,kv,xv,Ev,Cv,Iv,Ov,Tv,Av,Rv,Pv,Mv,Nv,Lv,jv,Dv,Uv,Fv,Bv,qv,zv,Vv,Wv,Hv,Gv,Kv,Jv,$v,Qv,Yv,Xv,Zv,eg,tg,ng,rg,ig,og,sg,ag,ug,lg,cg,dg,fg,hg,pg,vg,gg,yg,mg,bg,wg,_g,Sg,kg,xg,Eg,Cg,Ig,Og,Tg,Ag,Rg,Pg,Mg,Ng,Lg,jg,Dg,Ug,Fg,Bg,qg,zg,Vg,Wg,Hg,Gg,Kg,Jg,$g,Qg,Yg,Xg,Zg,ey,ty,ny,ry,iy,oy,sy,ay,uy,ly,cy,dy,fy,hy,py,vy,gy,yy,my,by,wy,_y,Sy,ky,xy,Ey,Cy,Iy,Oy,Ty,Ay,Ry,Py,My,Ny,Ly,jy,Dy,Uy,Fy,By,qy,zy,Vy,Wy,Hy,Gy,Ky,Jy,$y,Qy,Yy,Xy,Zy,em,tm,nm,rm,im,om,sm,am,um,lm,cm,dm,fm,hm,pm,vm,gm,ym,mm,bm,wm=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/worker/index.js":function(){iv='var WebWorker=function(e){"use strict";onmessage=function(e){var s="string"==typeof e.data?JSON.parse(e.data):e.data,t=s.event,a=s.sessionId,n=t.type,r=t.timestamp,i=t.delay,o=t.data,d=null!=i?JSON.stringify({type:n,timestamp:r,delay:i,data:o}):JSON.stringify({type:n,timestamp:r,data:o});postMessage({compressedEvent:d,sessionId:a})};var s=onmessage;return e.compressionOnMessage=s,Object.defineProperty(e,"__esModule",{value:!0}),e}({});\n',ov='var WebWorker=function(e){"use strict";var t,r=function(){return r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},r.apply(this,arguments)};function n(e,t,r,n){return new(r||(r=Promise))(function(s,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function i(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(o,i)}c((n=n.apply(e,t||[])).next())})}function s(e,t){var r,n,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=i(0),o.throw=i(1),o.return=i(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,i[0]&&(a=0)),a;)try{if(r=1,n&&(s=2&i[0]?n.return:i[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(s=a.trys,(s=s.length>0&&s[s.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){a.label=i[1];break}if(6===i[0]&&a.label<s[1]){a.label=s[1],s=i;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(i);break}s[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}"function"==typeof SuppressedError&&SuppressedError,function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(t||(t={})),t.US;var a,o=/payload.*exceed/i;!function(e){e.GET_SR_PROPS="get-sr-props",e.DEBUG_INFO="debug-info",e.FETCH_REQUEST="fetch-request",e.METADATA="metadata",e.TARGETING_DECISION="targeting-decision",e.REPLAY_GATE_DECISION="replay-gate-decision"}(a||(a={}));var i="Network error occurred, event batch rejected";function c(e,t){return n(this,void 0,void 0,function(){var r,a,o,i,c,u,l,d,p,f,h,v,y,g,b=this;return s(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),r=t.CompressionStream,a=new r("gzip"),o=a.writable.getWriter(),i=a.readable.getReader(),c=[],u=n(b,void 0,void 0,function(){var e,t,r;return s(this,function(n){switch(n.label){case 0:return[4,i.read()];case 1:if(e=n.sent(),t=e.done,r=e.value,t)return[3,3];c.push(r),n.label=2;case 2:return[3,0];case 3:return[2]}})}),[4,o.write((new TextEncoder).encode(e))];case 1:return m.sent(),[4,o.close()];case 2:return m.sent(),[4,u];case 3:m.sent(),l=c.reduce(function(e,t){return e+t.length},0),d=new Uint8Array(l),p=0;try{for(f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(c),h=f.next();!h.done;h=f.next())v=h.value,d.set(v,p),p+=v.length}catch(e){y={error:e}}finally{try{h&&!h.done&&(g=f.return)&&g.call(f)}finally{if(y)throw y.error}}return[2,d];case 4:return m.sent(),[2,null];case 5:return[2]}})})}function u(e,t){var a,u,l,d,p,f,h;return n(this,void 0,void 0,function(){var n,v,y,g,b,m,S,w,T,E,R,k;return s(this,function(s){switch(s.label){case 0:return s.trys.push([0,10,,11]),"CompressionStream"in self?[4,c(e,self)]:[3,2];case 1:return v=s.sent(),[3,3];case 2:v=null,s.label=3;case 3:return n=v,y="".concat(null!==(u=null===(a=t.version)||void 0===a?void 0:a.type)&&void 0!==u?u:"standalone","/").concat(null!==(d=null===(l=t.version)||void 0===l?void 0:l.version)&&void 0!==d?d:t.sdkVersion),g=new URLSearchParams({device_id:t.deviceId,session_id:"".concat(t.sessionId),type:t.eventType}),b="".concat((x=t.serverZone,C=t.trackServerUrl,C||("STAGING"===x?"https://api-sr.stag2.amplitude.com/sessions/v2/track":"EU"===x?"https://api-sr.eu.amplitude.com/sessions/v2/track":"https://api-sr.amplitude.com/sessions/v2/track")),"?").concat(g.toString()),m=r({"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(t.apiKey),"X-Client-Version":t.sdkVersion,"X-Client-Library":y,"X-Client-Url":t.currentUrl.substring(0,1e3),"X-Client-Sample-Rate":"".concat(t.sampleRate),"X-Sampling-Hash-Alg":"xxhash32"},n?{"Content-Encoding":"gzip"}:{}),S=n?n.byteLength:new Blob([e]).size,[4,fetch(b,{method:"POST",headers:m,body:null!=n?n:e,keepalive:S<=65536})];case 4:if(null===(w=s.sent()))return[2,{shouldRetry:!1,success:!1,message:"Unexpected error occurred"}];if(w.status>=200&&w.status<300)return T=Math.round(new Blob(t.events).size/1024),E=null!==(h=null===(f=null===(p=w.headers)||void 0===p?void 0:p.get)||void 0===f?void 0:f.call(p,"X-Session-Replay-Event-Skipped"))&&void 0!==h?h:null,[2,{shouldRetry:!1,success:!0,message:"Session replay event batch tracked successfully for session id ".concat(t.sessionId,", size of events: ").concat(T," KB"),skipCode:E}];if(413!==w.status)return[3,9];R="",s.label=5;case 5:return s.trys.push([5,7,,8]),[4,w.text()];case 6:return R=s.sent(),[3,8];case 7:return s.sent(),[3,8];case 8:return[2,{shouldRetry:!1,success:!1,message:i,payloadTooLarge:!0,isWaf:o.test(R)}];case 9:return w.status>=500||408===w.status||429===w.status||499===w.status?[2,{shouldRetry:!0,success:!1,message:"HTTP ".concat(w.status)}]:[2,{shouldRetry:!1,success:!1,message:i}];case 10:return k=s.sent(),[2,{shouldRetry:!1,success:!1,message:String(k)}];case 11:return[2]}var x,C})})}function l(e,t,r,a){var o;return n(this,void 0,void 0,function(){var n,i,c;return s(this,function(s){switch(s.label){case 0:n=1,s.label=1;case 1:return[4,u(t,r)];case 2:return(i=s.sent()).success?(postMessage({type:"log",id:e,message:i.message}),postMessage({type:"complete",id:e,skipCode:null!==(o=i.skipCode)&&void 0!==o?o:null}),[2]):i.payloadTooLarge&&a?(postMessage({type:"payload_too_large",id:e,isWaf:!0===i.isWaf}),[2]):a&&i.shouldRetry&&n<r.flushMaxRetries?[4,new Promise(function(e){return setTimeout(e,Math.random()*n*1e3)})]:[3,4];case 3:return s.sent(),n++,[3,5];case 4:return c=n>=r.flushMaxRetries?"Session replay event batch rejected due to exceeded retry count":i.message,postMessage({type:"warn",id:e,message:c}),postMessage({type:"complete",id:e}),[2];case 5:return[3,1];case 6:return[2]}})})}onmessage=function(e){return n(void 0,void 0,void 0,function(){var t,r,n,a,o,i,c;return s(this,function(s){switch(s.label){case 0:return t=e.data,r=t.type,n=t.id,a=t.payload,o=t.context,i=t.useRetry,"send"!==r?[3,2]:(c=JSON.stringify(a),[4,l(n,c,o,i)]);case 1:s.sent(),s.label=2;case 2:return[2]}})})};var d=onmessage;return e.trackDestinationOnMessage=d,Object.defineProperty(e,"__esModule",{value:!0}),e}({});\n'}}),_m={};function Sm(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&Sm(Iv.parentNode(e),t,n);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&Sm(Iv.parentNode(e),t,n)}function km(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return km(e,t,o||{},!0)}}function xm(e,t){if(r=(n=e)&&"host"in n&&"mode"in n&&Iv.host(n)||null,Boolean(r&&"shadowRoot"in r&&Iv.shadowRoot(r)===n))return!1;var n,r,i=t.getId(e);if(!t.has(i))return!0;var o=rm.parentNode(e);return(!o||o.nodeType!==e.DOCUMENT_NODE)&&(!o||xm(o,t))}function Em(e,t){t(e.value);for(var n=e.children.length-1;n>=0;n--)Em(e.children[n],t)}function Cm(e,t){var n,r,i=null==(r=null==(n=e.ownerDocument)?void 0:n.defaultView)?void 0:r.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};var o=i.getBoundingClientRect(),s=Cm(i,t),a=o.height/i.clientHeight;return{x:o.x*s.relativeScale+s.x,y:o.y*s.relativeScale+s.y,relativeScale:a,absoluteScale:s.absoluteScale*a}}function Im(e,t){var n=e[t[0]];return 1===t.length?n:Im(n.cssRules[t[1]].cssRules,t.slice(2))}function Om(e,t){if(0===t)return!0;var n=Object.keys(e),r=!0,i=!1,o=void 0;try{for(var s,a=n[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value;if(Qi(e[u])&&Om(e[u],t-1))return!0}}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return!1}rl(_m,{PLUGIN_NAME:function(){return mm},getRecordConsolePlugin:function(){return bm}});var Tm,Am,Rm,Pm,Mm,Nm,Lm,jm,Dm,Um,Fm,Bm,qm,zm,Vm,Wm,Hm,Gm,Km,Jm,$m,Qm,Ym,Xm,Zm,eb,tb,nb,rb,ib,ob,sb,ab,ub,lb,cb,db,fb,hb,pb,vb,gb,yb,mb,bb,wb,_b,Sb,kb,xb,Eb,Cb,Ib,Ob,Tb,Ab,Rb,Pb,Mb,Nb,Lb,jb,Db,Ub,Fb,Bb,qb,zb,Vb,Wb,Hb,Gb,Kb,Jb,$b,Qb,Yb,Xb,Zb,ew,tw,nw,rw,iw,ow,sw,aw,uw,lw,cw,dw,fw,hw,pw,vw,gw,yw,mw,bw,ww,_w,Sw,kw,xw,Ew,Cw,Iw,Ow,Tw,Aw,Rw,Pw,Mw,Nw,Lw,jw,Dw,Uw,Fw,Bw,qw,zw,Vw,Ww,Hw,Gw,Kw,Jw,$w,Qw,Yw,Xw,Zw,e_,t_,n_,r_,i_,o_,s_,a_,u_,l_,c_,d_,f_,h_,p_,v_,g_,y_,m_,b_,w_,__,S_,k_,x_,E_,C_,I_,O_,T_,A_,R_,P_,M_,N_,L_,j_,D_,U_,F_,B_,q_,z_,V_,W_,H_,G_,K_,J_,$_,Q_,Y_,X_,Z_,eS,tS,nS,rS,iS,oS,sS,aS,uS,lS,cS,dS,fS,hS,pS,vS,gS,yS,mS,bS=tl({"../../../../node_modules/@amplitude/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.js":function(){var e,t;for(fv=Object.defineProperty,hv=function(e,t,n){return t in e?fv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},pv=function(e,t,n){return hv(e,"symbol"!==(void 0===t?"undefined":_type_of(t))?t+"":t,n)},vv=Object.defineProperty,gv=function(e,t,n){return t in e?vv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},yv=function(e,t,n){return gv(e,"symbol"!==(void 0===t?"undefined":_type_of(t))?t+"":t,n)},bv=Object.defineProperty,wv=function(e,t,n){return t in e?bv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},_v=function(e,t,n){return wv(e,"symbol"!==(void 0===t?"undefined":_type_of(t))?t+"":t,n)},Sv={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},kv={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},xv={},Ev={},Cv={},Iv={childNodes:sr,parentNode:ar,parentElement:ur,textContent:lr,contains:cr,getRootNode:dr,host:fr,styleSheets:hr,shadowRoot:pr,querySelector:vr,querySelectorAll:gr,mutationObserver:yr},Ov=function(){function e(){_class_call_check(this,e),_v(this,"idNodeMap",new Map),_v(this,"nodeMetaMap",new WeakMap)}return _create_class(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null==(t=this.getMeta(e))?void 0:t.id;return null!=n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}(),Tv=-2,Av={exports:{}},Pv={},Mv=Object.freeze(Object.defineProperty({__proto__:null,default:Pv},Symbol.toStringTag,{value:"Module"})),Nv=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){return _instanceof(this,e)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}(Mv),Dv={},Dg=qr(),(Ug=(e=Dg)&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e).stringify,Ug.fromJSON,Ug.plugin,Ug.parse,Ug.list,Ug.document,Ug.comment,Ug.atRule,Ug.rule,Ug.decl,Ug.root,Ug.CssSyntaxError,Ug.Declaration,Ug.Container,Ug.Processor,Ug.Document,Ug.Comment,Ug.Warning,Ug.AtRule,Ug.Result,Ug.Input,Ug.Rule,Ug.Root,Ug.Node,Fg=Object.defineProperty,Bg=function(e,t,n){return t in e?Fg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},qg=function(e,t,n){return Bg(e,"symbol"!==(void 0===t?"undefined":_type_of(t))?t+"":t,n)},zg={exports:{}},Wg={},Hg=Object.freeze(Object.defineProperty({__proto__:null,default:Wg},Symbol.toStringTag,{value:"Module"})),Gg=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){return _instanceof(this,e)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}(Hg),$g={},$y=di(),Qy=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}($y),Qy.stringify,Qy.fromJSON,Qy.plugin,Qy.parse,Qy.list,Qy.document,Qy.comment,Qy.atRule,Qy.rule,Qy.decl,Qy.root,Qy.CssSyntaxError,Qy.Declaration,Qy.Container,Qy.Processor,Qy.Document,Qy.Comment,Qy.Warning,Qy.AtRule,Qy.Result,Qy.Input,Qy.Rule,Qy.Root,Qy.Node,Yy=function(){function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];_class_call_check(this,e),qg(this,"parentElement",null),qg(this,"parentNode",null),qg(this,"ownerDocument"),qg(this,"firstChild",null),qg(this,"lastChild",null),qg(this,"previousSibling",null),qg(this,"nextSibling",null),qg(this,"ELEMENT_NODE",1),qg(this,"TEXT_NODE",3),qg(this,"nodeType"),qg(this,"nodeName"),qg(this,"RRNodeType")}return _create_class(e,[{key:"childNodes",get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}},{key:"contains",value:function(t){if(!_instanceof(t,e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}},{key:"appendChild",value:function(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"insertBefore",value:function(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}},{key:"removeChild",value:function(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"toString",value:function(){return"RRNode"}}]),e}(),Xy={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Zy={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},em={},tm={},nm={},rm={childNodes:vi,parentNode:gi,parentElement:yi,textContent:mi,contains:bi,getRootNode:wi,host:_i,styleSheets:Si,shadowRoot:ki,querySelector:xi,querySelectorAll:Ei,mutationObserver:Ci},im="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",om={map:{},getId:function(){return console.error(im),-1},getNode:function(){return console.error(im),null},removeNodeFromMap:function(){console.error(im)},has:function(){return console.error(im),!1},reset:function(){console.error(im)}},"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(om=new Proxy(om,{get:function(e,t,n){return"map"===t&&console.error(im),Reflect.get(e,t,n)}})),sm=Date.now,/[1-9][0-9]{12}/.test(Date.now().toString())||(sm=function(){return(new Date).getTime()}),am=function(){function e(){_class_call_check(this,e),yv(this,"id",1),yv(this,"styleIDMap",new WeakMap),yv(this,"idStyleMap",new Map)}return _create_class(e,[{key:"getId",value:function(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]),e}(),um=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:am,get _mirror(){return om},closestElementOfNode:Mi,getBaseDimension:Cm,getNestedRule:Im,getPositionsAndIndex:Vi,getRootShadowHost:Gi,getShadowHost:Hi,getWindowHeight:Ri,getWindowScroll:Ai,getWindowWidth:Pi,hasShadowRoot:zi,hookSetter:km,inDom:Ji,isAncestorRemoved:xm,isBlocked:Ni,isIgnored:ji,isSerialized:Li,isSerializedIframe:Bi,isSerializedStylesheet:qi,iterateResolveTree:Em,legacy_isTouchEvent:Di,get nowTimestamp(){return sm},on:Ii,patch:Ti,polyfill:Ui,queueToResolveTrees:Fi,shadowHostInDom:Ki,throttle:Oi,uniqueTextMutations:Wi},Symbol.toStringTag,{value:"Module"})),lm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",cm="undefined"==typeof Uint8Array?[]:new Uint8Array(256),nS=0;nS<64;nS++)cm[lm.charCodeAt(nS)]=nS;"undefined"!=typeof self&&self.Blob&&new Blob(['(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastBlobMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext("2d");\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n if (!lastBlobMap.has(id) && await transparentBase64 === base64) {\n lastBlobMap.set(id, base64);\n return worker.postMessage({ id });\n }\n if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });\n worker.postMessage({\n id,\n type,\n base64,\n width,\n height\n });\n lastBlobMap.set(id, base64);\n } else {\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map\n'],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],function(e){return 2*e})[0]){var n=document.createElement("iframe");document.body.appendChild(n),Array.from=(null==(mv=n.contentWindow)?void 0:mv.Array.from)||Array.from,document.body.removeChild(n)}}catch(e){console.debug("Unable to override Array.from",e)}new Ov,(t=dm||(dm={}))[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped",fm=function(){function e(t){_class_call_check(this,e),pv(this,"fileName"),pv(this,"functionName"),pv(this,"lineNumber"),pv(this,"columnNumber"),this.fileName=t.fileName||"",this.functionName=t.functionName||"",this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber}return _create_class(e,[{key:"toString",value:function(){var e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?"".concat(this.functionName," (").concat(this.fileName,":").concat(e,":").concat(t,")"):"".concat(this.fileName,":").concat(e,":").concat(t)}}]),e}(),hm=/(^|@)\S+:\d+/,pm=/^\s*at .*(\S+:\d+|\(native\))/m,vm=/^(eval@)?(\[native code])?$/,gm={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(pm)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error("Cannot parse given url: ".concat(e));return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(pm)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=t.match(/ (\((.+):(\d+):(\d+)\)$)/),r=(t=n?t.replace(n[0],""):t).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:r.pop()),o=r.join(" ")||void 0,s=["eval","<anonymous>"].indexOf(i[0])>-1?void 0:i[0];return new fm({functionName:o,fileName:s,lineNumber:i[1],columnNumber:i[2]})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(vm)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new fm({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(t,""));return new fm({functionName:r,fileName:i[0],lineNumber:i[1],columnNumber:i[2]})},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),r=[],i=2,o=n.length;i<o;i+=2){var s=t.exec(n[i]);s&&r.push(new fm({fileName:s[2],lineNumber:parseFloat(s[1])}))}return r},parseOpera10:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=e.stacktrace.split("\n"),r=[],i=0,o=n.length;i<o;i+=2){var s=t.exec(n[i]);s&&r.push(new fm({functionName:s[3]||void 0,fileName:s[2],lineNumber:parseFloat(s[1])}))}return r},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(hm)&&!e.match(/^Error created at/)},this).map(function(e){var t=e.split("@"),n=this.extractLocation(t.pop()),r=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new fm({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})},this)}},ym={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"},mm="rrweb/console@1",bm=function(e){return{name:mm,observer:Xi,options:e}}}}),wS={};function _S(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&_S(zm.parentNode(e),t,n);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&_S(zm.parentNode(e),t,n)}function SS(e,t){var n,r,i,o=t.doc,s=t.mirror,a=t.blockClass,u=t.blockSelector,l=t.maskTextClass,c=t.maskTextSelector,d=t.skipChild,f=void 0!==d&&d,h=t.inlineStylesheet,p=void 0===h||h,v=t.maskInputOptions,g=void 0===v?{}:v,y=t.maskTextFn,m=t.maskInputFn,b=t.maskAttributeFn,w=t.slimDOMOptions,_=t.dataURLOptions,S=void 0===_?{}:_,k=t.inlineImages,x=void 0!==k&&k,E=t.recordCanvas,C=void 0!==E&&E,I=t.onSerialize,O=t.onAdoptedStyleSheet,T=t.onIframeLoad,A=t.iframeLoadTimeout,R=void 0===A?5e3:A,P=t.onStylesheetLoad,M=t.stylesheetLoadTimeout,N=void 0===M?5e3:M,L=t.keepIframeSrcFn,j=void 0===L?function(){return!1}:L,D=t.newlyAddedElement,U=void 0!==D&&D,F=t.cssCaptured,B=void 0!==F&&F,q=t.applyBackgroundColorToBlockedElements,z=void 0!==q&&q,V=null!==(n=t._emittedStyleIds)&&void 0!==n?n:new Set,W=t.needsMask,H=t.preserveWhiteSpace,G=void 0===H||H;W||(W=Lo(e,l,c,void 0===W));var K,J=function(e,t){var n=t.doc,r=t.mirror,i=t.blockClass,o=t.blockSelector,s=t.needsMask,a=t.inlineStylesheet,u=t.maskInputOptions,l=void 0===u?{}:u,c=t.maskTextFn,d=t.maskInputFn,f=t.maskAttributeFn,h=t.dataURLOptions,p=void 0===h?{}:h,v=t.inlineImages,g=t.recordCanvas,y=t.keepIframeSrcFn,m=t.newlyAddedElement,b=void 0!==m&&m,w=t.cssCaptured,_=void 0!==w&&w,S=t.applyBackgroundColorToBlockedElements,k=void 0!==S&&S,x=jo(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:jm.Document,childNodes:[],compatMode:e.compatMode}:{type:jm.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:jm.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:x};case e.ELEMENT_NODE:return Uo(e,{doc:n,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:d,maskAttributeFn:f,dataURLOptions:p,inlineImages:v,recordCanvas:g,keepIframeSrcFn:y,newlyAddedElement:b,rootId:x,applyBackgroundColorToBlockedElements:k});case e.TEXT_NODE:return Do(e,{doc:n,needsMask:s,maskTextFn:c,rootId:x,cssCaptured:_});case e.CDATA_SECTION_NODE:return{type:jm.CDATA,textContent:"",rootId:x};case e.COMMENT_NODE:return{type:jm.Comment,textContent:zm.textContent(e)||"",rootId:x};default:return!1}}(e,{doc:o,mirror:s,blockClass:a,blockSelector:u,needsMask:W,inlineStylesheet:p,maskInputOptions:g,maskTextFn:y,maskInputFn:m,maskAttributeFn:b,dataURLOptions:S,inlineImages:x,recordCanvas:C,keepIframeSrcFn:j,newlyAddedElement:U,cssCaptured:B,applyBackgroundColorToBlockedElements:z});if(!J)return console.warn(e,"not serialized"),null;K=s.hasNode(e)?s.getId(e):function(e,t){if(t.comment&&e.type===jm.Comment)return!0;if(e.type===jm.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===Co(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Fo(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Fo(e.attributes.name)||"icon"===Fo(e.attributes.rel)||"apple-touch-icon"===Fo(e.attributes.rel)||"shortcut icon"===Fo(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Fo(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Fo(e.attributes.property).match(/^(og|twitter|fb):/)||Fo(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Fo(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Fo(e.attributes.name)||"googlebot"===Fo(e.attributes.name)||"bingbot"===Fo(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Fo(e.attributes.name)||"generator"===Fo(e.attributes.name)||"framework"===Fo(e.attributes.name)||"publisher"===Fo(e.attributes.name)||"progid"===Fo(e.attributes.name)||Fo(e.attributes.property).match(/^article:/)||Fo(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Fo(e.attributes.name)||"yandex-verification"===Fo(e.attributes.name)||"csrf-token"===Fo(e.attributes.name)||"p:domain_verify"===Fo(e.attributes.name)||"verify-v1"===Fo(e.attributes.name)||"verification"===Fo(e.attributes.name)||"shopify-checkout-api-token"===Fo(e.attributes.name)))return!0}}return!1}(J,w)||!G&&J.type===jm.Text&&!J.textContent.replace(/^\s+|\s+$/gm,"").length?Xm:Ao();var $=Object.assign(J,{id:K});if(s.add(e,$),K===Xm)return null;I&&I(e);var Q=!f;if($.type===jm.Element){Q=Q&&!$.needBlock,delete $.needBlock;var Y=zm.shadowRoot(e);Y&&yo(Y)&&($.isShadowHost=!0,O&&(null==(r=Y.adoptedStyleSheets)?void 0:r.length)&&($.adoptedStyleSheets=Bo(Y.adoptedStyleSheets,O,V)))}if($.type===jm.Document&&O){var X=e;(null==(i=X.adoptedStyleSheets)?void 0:i.length)&&($.adoptedStyleSheets=Bo(X.adoptedStyleSheets,O,V))}if(($.type===jm.Document||$.type===jm.Element)&&Q){w.headWhitespace&&$.type===jm.Element&&"head"===$.tagName&&(G=!1);var Z={doc:o,mirror:s,blockClass:a,blockSelector:u,needsMask:W,maskTextClass:l,maskTextSelector:c,skipChild:f,inlineStylesheet:p,maskInputOptions:g,maskTextFn:y,maskInputFn:m,maskAttributeFn:b,slimDOMOptions:w,dataURLOptions:S,inlineImages:x,recordCanvas:C,preserveWhiteSpace:G,onSerialize:I,onAdoptedStyleSheet:O,_emittedStyleIds:V,onIframeLoad:T,iframeLoadTimeout:R,onStylesheetLoad:P,stylesheetLoadTimeout:N,keepIframeSrcFn:j,cssCaptured:!1,applyBackgroundColorToBlockedElements:z};if($.type===jm.Element&&"textarea"===$.tagName&&void 0!==$.attributes.value);else{$.type===jm.Element&&void 0!==$.attributes._cssText&&"string"==typeof $.attributes._cssText&&(Z.cssCaptured=!0);var ee=!0,te=!1,ne=void 0;try{for(var re,ie=Array.from(zm.childNodes(e))[Symbol.iterator]();!(ee=(re=ie.next()).done);ee=!0){var oe=SS(re.value,Z);oe&&$.childNodes.push(oe)}}catch(e){te=!0,ne=e}finally{try{ee||null==ie.return||ie.return()}finally{if(te)throw ne}}}var se=null;if(vo(e)&&(se=zm.shadowRoot(e))){var ae=!0,ue=!1,le=void 0;try{for(var ce,de=Array.from(zm.childNodes(se))[Symbol.iterator]();!(ae=(ce=de.next()).done);ae=!0){var fe=SS(ce.value,Z);fe&&(yo(se)&&(fe.isShadow=!0),$.childNodes.push(fe))}}catch(e){ue=!0,le=e}finally{try{ae||null==de.return||de.return()}finally{if(ue)throw le}}}}var he=zm.parentNode(e);return he&&go(he)&&yo(he)&&($.isShadow=!0),$.type===jm.Element&&"iframe"===$.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(e){return}if("complete"===i){var s="about:blank";if(r.location.href!==s||e.src===s||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var a=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(a),o=!0,t()})}}}(e,function(){var t=e.contentDocument;if(t&&T){var n=SS(t,{doc:t,mirror:s,blockClass:a,blockSelector:u,needsMask:W,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:p,maskInputOptions:g,maskTextFn:y,maskInputFn:m,maskAttributeFn:b,slimDOMOptions:w,dataURLOptions:S,inlineImages:x,recordCanvas:C,preserveWhiteSpace:G,onSerialize:I,onAdoptedStyleSheet:O,onIframeLoad:T,iframeLoadTimeout:R,onStylesheetLoad:P,stylesheetLoadTimeout:N,keepIframeSrcFn:j});n&&T(e,n)}},R),$.type===jm.Element&&"link"===$.tagName&&"string"==typeof $.attributes.rel&&("stylesheet"===$.attributes.rel||"preload"===$.attributes.rel&&"string"==typeof $.attributes.href&&"css"===Co($.attributes.href))&&function(e,t,n){var r,i=!1;try{r=e.sheet}catch(e){return}if(!r){var o=setTimeout(function(){i||(t(),i=!0)},n);e.addEventListener("load",function(){clearTimeout(o),i=!0,t()})}}(e,function(){if(P){var t=SS(e,{doc:o,mirror:s,blockClass:a,blockSelector:u,needsMask:W,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:p,maskInputOptions:g,maskTextFn:y,maskInputFn:m,maskAttributeFn:b,slimDOMOptions:w,dataURLOptions:S,inlineImages:x,recordCanvas:C,preserveWhiteSpace:G,onSerialize:I,onIframeLoad:T,iframeLoadTimeout:R,onStylesheetLoad:P,stylesheetLoadTimeout:N,keepIframeSrcFn:j});t&&P(e,t)}},N),$}function kS(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return kS(e,t,o||{},!0)}}function xS(e,t){if(go(e))return!1;var n=t.getId(e);if(!t.has(n))return!0;var r=R_.parentNode(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||xS(r,t))}function ES(e,t){e.delete(t),R_.childNodes(t).forEach(function(t){return ES(e,t)})}function CS(e,t){var n=R_.parentNode(t);return!!n&&(!!e.has(n)||CS(e,n))}function IS(e,t,n){if(_instanceof(e,Array))return e.map(function(e){return IS(e,t,n)});if(null===e)return e;if(_instanceof(e,Float32Array)||_instanceof(e,Float64Array)||_instanceof(e,Int32Array)||_instanceof(e,Uint32Array)||_instanceof(e,Uint8Array)||_instanceof(e,Uint16Array)||_instanceof(e,Int16Array)||_instanceof(e,Int8Array)||_instanceof(e,Uint8ClampedArray))return{rr_type:e.constructor.name,args:[Object.values(e)]};if(_instanceof(e,ArrayBuffer))return{rr_type:e.constructor.name,base64:rS(e)};if(_instanceof(e,DataView))return{rr_type:e.constructor.name,args:[IS(e.buffer,t,n),e.byteOffset,e.byteLength]};if(_instanceof(e,HTMLImageElement))return{rr_type:e.constructor.name,src:e.src};if(_instanceof(e,HTMLCanvasElement)){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return _instanceof(e,ImageData)?{rr_type:e.constructor.name,args:[IS(e.data,t,n),e.width,e.height]}:aS(e,t)||"object"===(void 0===e?"undefined":_type_of(e))?{rr_type:e.constructor.name,index:oS(e,t,n)}:e}rl(wS,{record:function(){return Aa}});var OS,TS,AS=tl({"../../../../node_modules/@amplitude/rrweb-record/dist/rrweb-record.js":function(){var e,t,n,r,i,o,s,a,u;for(Tm=Object.defineProperty,Am=function(e,t,n){return t in e?Tm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Rm=function(e,t,n){return Am(e,"symbol"!==(void 0===t?"undefined":_type_of(t))?t+"":t,n)},Mm=Object.defineProperty,Nm=function(e,t,n){return t in e?Mm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Lm=function(e,t,n){return Nm(e,"symbol"!==(void 0===t?"undefined":_type_of(t))?t+"":t,n)},(e=jm||{})[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",jm=e,Dm={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Um={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Fm={},Bm={},qm={},zm={childNodes:no,parentNode:ro,parentElement:io,textContent:oo,contains:so,getRootNode:ao,host:uo,styleSheets:lo,shadowRoot:co,querySelector:fo,querySelectorAll:ho,mutationObserver:po},Vm=function(){function e(){_class_call_check(this,e),Lm(this,"idNodeMap",new Map),Lm(this,"nodeMetaMap",new WeakMap)}return _create_class(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null==(t=this.getMeta(e))?void 0:t.id;return null!=n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}(),Wm="__rrweb_original__",Hm=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Gm=/^(?:[a-z+]+:)?\/\//i,Km=/^www\..*/i,Jm=/^(data:)([^,]*),(.*)/i,$m="lightgrey",Qm=1,Ym=new RegExp("[^a-z0-9-_:]"),Xm=-2,tb=/^[^ \t\n\r\u000c]+/,nb=/^[, \t\n\r\u000c]+/,rb=new WeakMap,ib={exports:{}},sb={},ab=Object.freeze(Object.defineProperty({__proto__:null,default:sb},Symbol.toStringTag,{value:"Module"})),ub=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){return _instanceof(this,e)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}(ab),db={},dw=cs(),(fw=(t=dw)&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t).stringify,fw.fromJSON,fw.plugin,fw.parse,fw.list,fw.document,fw.comment,fw.atRule,fw.rule,fw.decl,fw.root,fw.CssSyntaxError,fw.Declaration,fw.Container,fw.Processor,fw.Document,fw.Comment,fw.Warning,fw.AtRule,fw.Result,fw.Input,fw.Rule,fw.Root,fw.Node,hw=Object.defineProperty,pw=function(e,t,n){return t in e?hw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},vw=function(e,t,n){return pw(e,"symbol"!==(void 0===t?"undefined":_type_of(t))?t+"":t,n)},gw={exports:{}},mw={},bw=Object.freeze(Object.defineProperty({__proto__:null,default:mw},Symbol.toStringTag,{value:"Module"})),ww=function(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){return _instanceof(this,e)?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}(bw),kw={},k_=Ns(),x_=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(k_),x_.stringify,x_.fromJSON,x_.plugin,x_.parse,x_.list,x_.document,x_.comment,x_.atRule,x_.rule,x_.decl,x_.root,x_.CssSyntaxError,x_.Declaration,x_.Container,x_.Processor,x_.Document,x_.Comment,x_.Warning,x_.AtRule,x_.Result,x_.Input,x_.Rule,x_.Root,x_.Node,E_=function(){function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];_class_call_check(this,e),vw(this,"parentElement",null),vw(this,"parentNode",null),vw(this,"ownerDocument"),vw(this,"firstChild",null),vw(this,"lastChild",null),vw(this,"previousSibling",null),vw(this,"nextSibling",null),vw(this,"ELEMENT_NODE",1),vw(this,"TEXT_NODE",3),vw(this,"nodeType"),vw(this,"nodeName"),vw(this,"RRNodeType")}return _create_class(e,[{key:"childNodes",get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}},{key:"contains",value:function(t){if(!_instanceof(t,e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}},{key:"appendChild",value:function(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"insertBefore",value:function(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}},{key:"removeChild",value:function(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"toString",value:function(){return"RRNode"}}]),e}(),C_={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},I_={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},O_={},T_={},A_={},R_={childNodes:Us,parentNode:Fs,parentElement:Bs,textContent:qs,contains:zs,getRootNode:Vs,host:Ws,styleSheets:Hs,shadowRoot:Gs,querySelector:Ks,querySelectorAll:Js,mutationObserver:$s},P_="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",M_={map:{},getId:function(){return console.error(P_),-1},getNode:function(){return console.error(P_),null},removeNodeFromMap:function(){console.error(P_)},has:function(){return console.error(P_),!1},reset:function(){console.error(P_)}},"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(M_=new Proxy(M_,{get:function(e,t,n){return"map"===t&&console.error(P_),Reflect.get(e,t,n)}})),N_=Date.now,/[1-9][0-9]{12}/.test(Date.now().toString())||(N_=function(){return(new Date).getTime()}),L_=function(){function e(){_class_call_check(this,e),Rm(this,"id",1),Rm(this,"styleIDMap",new WeakMap),Rm(this,"idStyleMap",new Map)}return _create_class(e,[{key:"getId",value:function(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]),e}(),(n=j_||{})[n.DomContentLoaded=0]="DomContentLoaded",n[n.Load=1]="Load",n[n.FullSnapshot=2]="FullSnapshot",n[n.IncrementalSnapshot=3]="IncrementalSnapshot",n[n.Meta=4]="Meta",n[n.Custom=5]="Custom",n[n.Plugin=6]="Plugin",j_=n,(r=D_||{})[r.Mutation=0]="Mutation",r[r.MouseMove=1]="MouseMove",r[r.MouseInteraction=2]="MouseInteraction",r[r.Scroll=3]="Scroll",r[r.ViewportResize=4]="ViewportResize",r[r.Input=5]="Input",r[r.TouchMove=6]="TouchMove",r[r.MediaInteraction=7]="MediaInteraction",r[r.StyleSheetRule=8]="StyleSheetRule",r[r.CanvasMutation=9]="CanvasMutation",r[r.Font=10]="Font",r[r.Log=11]="Log",r[r.Drag=12]="Drag",r[r.StyleDeclaration=13]="StyleDeclaration",r[r.Selection=14]="Selection",r[r.AdoptedStyleSheet=15]="AdoptedStyleSheet",r[r.CustomElement=16]="CustomElement",D_=r,(i=U_||{})[i.MouseUp=0]="MouseUp",i[i.MouseDown=1]="MouseDown",i[i.Click=2]="Click",i[i.ContextMenu=3]="ContextMenu",i[i.DblClick=4]="DblClick",i[i.Focus=5]="Focus",i[i.Blur=6]="Blur",i[i.TouchStart=7]="TouchStart",i[i.TouchMove_Departed=8]="TouchMove_Departed",i[i.TouchEnd=9]="TouchEnd",i[i.TouchCancel=10]="TouchCancel",U_=i,(o=F_||{})[o.Mouse=0]="Mouse",o[o.Pen=1]="Pen",o[o.Touch=2]="Touch",F_=o,(s=B_||{})[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",B_=s,(a=q_||{})[a.Play=0]="Play",a[a.Pause=1]="Pause",a[a.Seeked=2]="Seeked",a[a.VolumeChange=3]="VolumeChange",a[a.RateChange=4]="RateChange",q_=a,z_=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(z_||{}),V_=function(){function e(){_class_call_check(this,e),Rm(this,"length",0),Rm(this,"head",null),Rm(this,"tail",null)}return _create_class(e,[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}},{key:"addNode",value:function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&fa(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&fa(e.nextSibling)&&e.nextSibling.__ln.previous){var r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}},{key:"removeNode",value:function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}]),e}(),W_=function(e,t){return"".concat(e,"@").concat(t)},H_=function(){function e(){var t=this;_class_call_check(this,e),Rm(this,"frozen",!1),Rm(this,"locked",!1),Rm(this,"texts",[]),Rm(this,"attributes",[]),Rm(this,"attributeMap",new WeakMap),Rm(this,"removes",[]),Rm(this,"mapRemoves",[]),Rm(this,"movedMap",{}),Rm(this,"addedSet",new Set),Rm(this,"movedSet",new Set),Rm(this,"droppedSet",new Set),Rm(this,"removesSubTreeCache",new Set),Rm(this,"mutationCb"),Rm(this,"blockClass"),Rm(this,"blockSelector"),Rm(this,"maskTextClass"),Rm(this,"maskTextSelector"),Rm(this,"inlineStylesheet"),Rm(this,"maskInputOptions"),Rm(this,"maskTextFn"),Rm(this,"maskInputFn"),Rm(this,"maskAttributeFn"),Rm(this,"keepIframeSrcFn"),Rm(this,"recordCanvas"),Rm(this,"inlineImages"),Rm(this,"slimDOMOptions"),Rm(this,"dataURLOptions"),Rm(this,"doc"),Rm(this,"mirror"),Rm(this,"iframeManager"),Rm(this,"stylesheetManager"),Rm(this,"shadowDomManager"),Rm(this,"canvasManager"),Rm(this,"processedNodeManager"),Rm(this,"unattachedDoc"),Rm(this,"processMutations",function(e){e.forEach(t.processMutation),t.emit()}),Rm(this,"emit",function(){if(!t.frozen&&!t.locked){for(var e=[],n=new Set,r=new V_,i=function(e){for(var n=e,r=Xm;r===Xm;)r=(n=n&&n.nextSibling)&&t.mirror.getId(n);return r},o=function(o){var s=R_.parentNode(o);if(s&&da(o)){var a=!1;if(o.nodeType===Node.TEXT_NODE){var u=s.tagName;if("TEXTAREA"===u)return;"STYLE"===u&&t.addedSet.has(s)&&(a=!0)}var l=go(s)?t.mirror.getId(la(o)):t.mirror.getId(s),c=i(o);if(-1===l||-1===c)return r.addNode(o);var d=SS(o,{doc:t.doc,mirror:t.mirror,blockClass:t.blockClass,blockSelector:t.blockSelector,maskTextClass:t.maskTextClass,maskTextSelector:t.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:t.inlineStylesheet,maskInputOptions:t.maskInputOptions,maskTextFn:t.maskTextFn,maskInputFn:t.maskInputFn,slimDOMOptions:t.slimDOMOptions,dataURLOptions:t.dataURLOptions,recordCanvas:t.recordCanvas,inlineImages:t.inlineImages,onSerialize:function(e){sa(e,t.mirror)&&t.iframeManager.addIframe(e),aa(e,t.mirror)&&t.stylesheetManager.trackLinkElement(e),ua(o)&&t.shadowDomManager.addShadowRoot(R_.shadowRoot(o),t.doc)},onIframeLoad:function(e,n){t.iframeManager.attachIframe(e,n),t.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:function(e,n){t.stylesheetManager.attachLinkElement(e,n)},cssCaptured:a});d&&(e.push({parentId:l,nextId:c,node:d}),n.add(d.id))}};t.mapRemoves.length;)t.mirror.removeNodeFromMap(t.mapRemoves.shift());var s=!0,a=!1,u=void 0;try{for(var l,c=t.movedSet[Symbol.iterator]();!(s=(l=c.next()).done);s=!0){var d=l.value;ha(t.removesSubTreeCache,d,t.mirror)&&!t.movedSet.has(R_.parentNode(d))||o(d)}}catch(e){a=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(a)throw u}}var f=!0,h=!1,p=void 0;try{for(var v,g=t.addedSet[Symbol.iterator]();!(f=(v=g.next()).done);f=!0){var y=v.value;va(t.droppedSet,y)||ha(t.removesSubTreeCache,y,t.mirror)?va(t.movedSet,y)?o(y):t.droppedSet.add(y):o(y)}}catch(e){h=!0,p=e}finally{try{f||null==g.return||g.return()}finally{if(h)throw p}}for(var m=null;r.length;){var b=null;if(m){var w=t.mirror.getId(R_.parentNode(m.value)),_=i(m.value);-1!==w&&-1!==_&&(b=m)}if(!b)for(var S=r.tail;S;){var k=S;if(S=S.previous,k){var x=t.mirror.getId(R_.parentNode(k.value));if(-1===i(k.value))continue;if(-1!==x){b=k;break}var E=k.value,C=R_.parentNode(E);if(C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var I=R_.host(C);if(-1!==t.mirror.getId(I)){b=k;break}}}}if(!b){for(;r.head;)r.removeNode(r.head.value);break}m=b.previous,r.removeNode(b.value),o(b.value)}var O={texts:t.texts.map(function(e){var n=e.node,r=R_.parentNode(n);return r&&"TEXTAREA"===r.tagName&&t.genTextAreaValueMutation(r),{id:t.mirror.getId(n),value:e.value}}).filter(function(e){return!n.has(e.id)}).filter(function(e){return t.mirror.has(e.id)}),attributes:t.attributes.map(function(e){var n=e.attributes;if("string"==typeof n.style){var r=JSON.stringify(e.styleDiff),i=JSON.stringify(e._unchangedStyles);r.length<n.style.length&&(r+i).split("var(").length===n.style.split("var(").length&&(n.style=e.styleDiff)}return{id:t.mirror.getId(e.node),attributes:n}}).filter(function(e){return!n.has(e.id)}).filter(function(e){return t.mirror.has(e.id)}),removes:t.removes,adds:e};(O.texts.length||O.attributes.length||O.removes.length||O.adds.length)&&(t.texts=[],t.attributes=[],t.attributeMap=new WeakMap,t.removes=[],t.addedSet=new Set,t.movedSet=new Set,t.droppedSet=new Set,t.removesSubTreeCache=new Set,t.movedMap={},t.mutationCb(O))}}),Rm(this,"genTextAreaValueMutation",function(e){var n=t.attributeMap.get(e);n||(n={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},t.attributes.push(n),t.attributeMap.set(e,n));var r=Array.from(R_.childNodes(e),function(e){return R_.textContent(e)||""}).join("");n.attributes.value=ko({element:e,maskInputOptions:t.maskInputOptions,tagName:e.tagName,type:Eo(e),value:r,maskInputFn:t.maskInputFn})}),Rm(this,"processMutation",function(e){if(!ia(e.target,t.mirror,t.slimDOMOptions))switch(e.type){case"characterData":var n=R_.textContent(e.target);ra(e.target,t.blockClass,t.blockSelector,!1)||n===e.oldValue||t.texts.push({value:Lo(e.target,t.maskTextClass,t.maskTextSelector,!0)&&n?t.maskTextFn?t.maskTextFn(n,na(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break;case"attributes":var r=e.target,i=e.attributeName,o=e.target.getAttribute(i);if("value"===i){var s=Eo(r);o=ko({element:r,maskInputOptions:t.maskInputOptions,tagName:r.tagName,type:s,value:o,maskInputFn:t.maskInputFn})}if(ra(e.target,t.blockClass,t.blockSelector,!1)||o===e.oldValue)return;var a=t.attributeMap.get(e.target);if("IFRAME"===r.tagName&&"src"===i&&!t.keepIframeSrcFn(o)){if(r.contentDocument)return;i="rr_src"}if(a||(a={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},t.attributes.push(a),t.attributeMap.set(e.target,a)),"type"===i&&"INPUT"===r.tagName&&"password"===(e.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!No(r.tagName,i)){if(a.attributes[i]=Mo(t.doc,xo(r.tagName),xo(i),o),t.maskAttributeFn&&"string"==typeof a.attributes[i]){var u=t.maskAttributeFn(i,a.attributes[i],r);null!==u?a.attributes[i]=u:delete a.attributes[i]}if("style"===i){if(!t.unattachedDoc)try{t.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){t.unattachedDoc=t.doc}var l=t.unattachedDoc.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue);var c=!0,d=!1,f=void 0;try{for(var h,p=Array.from(r.style)[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var v=h.value,g=r.style.getPropertyValue(v),y=r.style.getPropertyPriority(v);g!==l.style.getPropertyValue(v)||y!==l.style.getPropertyPriority(v)?a.styleDiff[v]=""===y?g:[g,y]:a._unchangedStyles[v]=[g,y]}}catch(e){d=!0,f=e}finally{try{c||null==p.return||p.return()}finally{if(d)throw f}}var m=!0,b=!1,w=void 0;try{for(var _,S=Array.from(l.style)[Symbol.iterator]();!(m=(_=S.next()).done);m=!0){var k=_.value;""===r.style.getPropertyValue(k)&&(a.styleDiff[k]=!1)}}catch(e){b=!0,w=e}finally{try{m||null==S.return||S.return()}finally{if(b)throw w}}}else"open"===i&&"DIALOG"===r.tagName&&(r.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal")}break;case"childList":if(ra(e.target,t.blockClass,t.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void t.genTextAreaValueMutation(e.target);e.addedNodes.forEach(function(n){return t.genAdds(n,e.target)}),e.removedNodes.forEach(function(n){var r=t.mirror.getId(n),i=go(e.target)?t.mirror.getId(R_.host(e.target)):t.mirror.getId(e.target);ra(e.target,t.blockClass,t.blockSelector,!1)||ia(n,t.mirror,t.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(n,t.mirror)||(t.addedSet.has(n)?(ES(t.addedSet,n),t.droppedSet.add(n)):t.addedSet.has(e.target)&&-1===r||xS(e.target,t.mirror)||(t.movedSet.has(n)&&t.movedMap[W_(r,i)]?ES(t.movedSet,n):(t.removes.push({parentId:i,id:r,isShadow:!(!go(e.target)||!yo(e.target))||void 0}),function(e,t){for(var n=[e];n.length;){var r=n.pop();t.has(r)||(t.add(r),R_.childNodes(r).forEach(function(e){return n.push(e)}))}}(n,t.removesSubTreeCache))),t.mapRemoves.push(n))})}}),Rm(this,"genAdds",function(e,n){if(!t.processedNodeManager.inOtherBuffer(e,t)&&!t.addedSet.has(e)&&!t.movedSet.has(e)){if(t.mirror.hasNode(e)){if(ia(e,t.mirror,t.slimDOMOptions))return;t.movedSet.add(e);var r=null;n&&t.mirror.hasNode(n)&&(r=t.mirror.getId(n)),r&&-1!==r&&(t.movedMap[W_(t.mirror.getId(e),r)]=!0)}else t.addedSet.add(e),t.droppedSet.delete(e);ra(e,t.blockClass,t.blockSelector,!1)||(R_.childNodes(e).forEach(function(e){return t.genAdds(e)}),ua(e)&&R_.childNodes(R_.shadowRoot(e)).forEach(function(n){t.processedNodeManager.add(n,t),t.genAdds(n,e)}))}})}return _create_class(e,[{key:"init",value:function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","maskAttributeFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(function(n){t[n]=e[n]})}},{key:"freeze",value:function(){this.frozen=!0,this.canvasManager.freeze()}},{key:"unfreeze",value:function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}},{key:"isFrozen",value:function(){return this.frozen}},{key:"lock",value:function(){this.locked=!0,this.canvasManager.lock()}},{key:"unlock",value:function(){this.locked=!1,this.canvasManager.unlock(),this.emit()}},{key:"reset",value:function(){this.shadowDomManager.reset(),this.canvasManager.reset()}}]),e}(),K_=function(e){if(!G_)return e;return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];try{return e.apply(void 0,_to_consumable_array(n))}catch(e){if(G_&&!0===G_(e))return;throw e}}},J_=[],$_=["INPUT","TEXTAREA","SELECT"],Q_=new WeakMap,Y_=function(){function e(t){_class_call_check(this,e),Rm(this,"iframeIdToRemoteIdMap",new WeakMap),Rm(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}return _create_class(e,[{key:"getId",value:function(e,t,n,r){var i=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e),s=i.get(t);return s||(s=this.generateIdFn(),i.set(t,s),o.set(s,t)),s}},{key:"getIds",value:function(e,t){var n=this,r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(function(t){return n.getId(e,t,r,i)})}},{key:"getRemoteId",value:function(e,t,n){var r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;var i=r.get(t);return i||-1}},{key:"getRemoteIds",value:function(e,t){var n=this,r=this.getRemoteIdToIdMap(e);return t.map(function(t){return n.getRemoteId(e,t,r)})}},{key:"reset",value:function(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}},{key:"getIdToRemoteIdMap",value:function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}},{key:"getRemoteIdToIdMap",value:function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}]),e}(),X_=function(){function e(t){_class_call_check(this,e),Rm(this,"iframes",new WeakMap),Rm(this,"crossOriginIframeMap",new WeakMap),Rm(this,"crossOriginIframeMirror",new Y_(Ao)),Rm(this,"crossOriginIframeStyleMirror"),Rm(this,"crossOriginIframeRootIdMap",new WeakMap),Rm(this,"mirror"),Rm(this,"mutationCb"),Rm(this,"wrappedEmit"),Rm(this,"loadListener"),Rm(this,"stylesheetManager"),Rm(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Y_(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}return _create_class(e,[{key:"addIframe",value:function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}},{key:"addLoadListener",value:function(e){this.loadListener=e}},{key:"attachIframe",value:function(e,t){var n,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(n=e.contentWindow)||n.addEventListener("message",this.handleMessage.bind(this))),null==(r=this.loadListener)||r.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var n=this.crossOriginIframeMap.get(e.source);if(n){var r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}}}},{key:"transformCrossOriginEvent",value:function(e,t){var n,r=this;switch(t.type){case j_.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:j_.IncrementalSnapshot,data:{source:D_.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case j_.Meta:case j_.Load:case j_.DomContentLoaded:return!1;case j_.Plugin:return t;case j_.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case j_.IncrementalSnapshot:switch(t.data.source){case D_.Mutation:return t.data.adds.forEach(function(t){r.replaceIds(t,e,["parentId","nextId","previousId"]),r.replaceIdOnNode(t.node,e);var n=r.crossOriginIframeRootIdMap.get(e);n&&r.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(function(t){r.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(function(t){r.replaceIds(t,e,["id"])}),t.data.texts.forEach(function(t){r.replaceIds(t,e,["id"])}),t;case D_.Drag:case D_.TouchMove:case D_.MouseMove:return t.data.positions.forEach(function(t){r.replaceIds(t,e,["id"])}),t;case D_.ViewportResize:return!1;case D_.MediaInteraction:case D_.MouseInteraction:case D_.Scroll:case D_.CanvasMutation:case D_.Input:return this.replaceIds(t.data,e,["id"]),t;case D_.StyleSheetRule:case D_.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case D_.Font:return t;case D_.Selection:return t.data.ranges.forEach(function(t){r.replaceIds(t,e,["start","end"])}),t;case D_.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(n=t.data.styles)||n.forEach(function(t){r.replaceStyleIds(t,e,["styleId"])}),t}}return!1}},{key:"replace",value:function(e,t,n,r){var i=!0,o=!1,s=void 0;try{for(var a,u=r[Symbol.iterator]();!(i=(a=u.next()).done);i=!0){var l=a.value;(Array.isArray(t[l])||"number"==typeof t[l])&&(Array.isArray(t[l])?t[l]=e.getIds(n,t[l]):t[l]=e.getId(n,t[l]))}}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(function(e){n.replaceIdOnNode(e,t)})}},{key:"patchRootIdOnNode",value:function(e,t){var n=this;e.type===z_.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(function(e){n.patchRootIdOnNode(e,t)})}}]),e}(),Z_=function(){function e(t){_class_call_check(this,e),Rm(this,"shadowDoms",new WeakSet),Rm(this,"mutationCb"),Rm(this,"scrollCb"),Rm(this,"bypassOptions"),Rm(this,"mirror"),Rm(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}return _create_class(e,[{key:"init",value:function(){this.reset(),this.patchAttachShadow(Element,document)}},{key:"addShadowRoot",value:function(e,t){var n=this;if(yo(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=ma(_object_spread_props(_object_spread({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(function(){return r.disconnect()}),this.restoreHandlers.push(wa(_object_spread_props(_object_spread({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(R_.host(e))),n.restoreHandlers.push(ka({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e))},0)}}},{key:"observeAttachShadow",value:function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}},{key:"patchAttachShadow",value:function(e,t){var n=this;this.restoreHandlers.push(Xs(e.prototype,"attachShadow",function(e){return function(r){var i=e.call(this,r),o=R_.shadowRoot(this);return o&&da(this)&&n.addShadowRoot(o,t),i}}))}},{key:"reset",value:function(){this.restoreHandlers.forEach(function(e){try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}]),e}(),eS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tS="undefined"==typeof Uint8Array?[]:new Uint8Array(256),nS=0;nS<64;nS++)tS[eS.charCodeAt(nS)]=nS;rS=function(e){var t,n=new Uint8Array(e),r=n.length,i="";for(t=0;t<r;t+=3)i+=eS[n[t]>>2],i+=eS[(3&n[t])<<4|n[t+1]>>4],i+=eS[(15&n[t+1])<<2|n[t+2]>>6],i+=eS[63&n[t+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i},iS=new Map,oS=function(e,t,n){if(e&&(aS(e,t)||"object"===(void 0===e?"undefined":_type_of(e)))){var r=function(e,t){var n=iS.get(e);return n||(n=new Map,iS.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),i=r.indexOf(e);return-1===i&&(i=r.length,r.push(e)),i}},sS=function(e,t,n){return e.map(function(e){return IS(e,t,n)})},aS=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(function(e){return"function"==typeof t[e]});return Boolean(n.find(function(n){return _instanceof(e,t[n])}))},uS='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastBlobMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext("2d");\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n if (!lastBlobMap.has(id) && await transparentBase64 === base64) {\n lastBlobMap.set(id, base64);\n return worker.postMessage({ id });\n }\n if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });\n worker.postMessage({\n id,\n type,\n base64,\n width,\n height\n });\n lastBlobMap.set(id, base64);\n } else {\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map\n',lS="undefined"!=typeof self&&self.Blob&&new Blob([uS],{type:"text/javascript;charset=utf-8"}),cS=function(){function e(t){var n=this;_class_call_check(this,e),Rm(this,"pendingCanvasMutations",new Map),Rm(this,"rafStamps",{latestId:0,invokeId:null}),Rm(this,"mirror"),Rm(this,"mutationCb"),Rm(this,"resetObservers"),Rm(this,"frozen",!1),Rm(this,"locked",!1),Rm(this,"processMutation",function(e,t){!(n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId)&&n.rafStamps.invokeId||(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(e)||n.pendingCanvasMutations.set(e,[]),n.pendingCanvasMutations.get(e).push(t)});var r=t.sampling,i=void 0===r?"all":r,o=t.win,s=t.blockClass,a=t.blockSelector,u=t.recordCanvas,l=t.dataURLOptions;this.mutationCb=t.mutationCb,this.mirror=t.mirror,u&&"all"===i&&this.initCanvasMutationObserver(o,s,a),u&&"number"==typeof i&&this.initCanvasFPSObserver(i,o,s,a,{dataURLOptions:l})}return _create_class(e,[{key:"reset",value:function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}},{key:"freeze",value:function(){this.frozen=!0}},{key:"unfreeze",value:function(){this.frozen=!1}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"initCanvasFPSObserver",value:function(e,t,n,r,i){var o=this,s=Ia(t,n,r,!0),a=new Map,u=new Ta;u.onmessage=function(e){var t=e.data.id;if(a.set(t,!1),"base64"in e.data){var n=e.data,r=n.base64,i=n.type,s=n.width,u=n.height;o.mutationCb({id:t,type:B_["2D"],commands:[{property:"clearRect",args:[0,0,s,u]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}]})}};var l,c=1e3/e,d=0,f=function(e){var s;d&&e-d<c?l=requestAnimationFrame(f):(d=e,(s=[],t.document.querySelectorAll("canvas").forEach(function(e){ra(e,n,r,!0)||s.push(e)}),s).forEach(function(e){return _async_to_generator(function(){var t,n,r,o;return _ts_generator(this,function(s){switch(s.label){case 0:return n=this.mirror.getId(e),a.get(n)?[2]:0===e.width||0===e.height?[2]:(a.set(n,!0),["webgl","webgl2"].includes(e.__context)&&(r=e.getContext(e.__context),!1===(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&r.clear(r.COLOR_BUFFER_BIT)),[4,createImageBitmap(e)]);case 1:return o=s.sent(),u.postMessage({id:n,bitmap:o,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[o]),[2]}})}).call(o)}),l=requestAnimationFrame(f))};l=requestAnimationFrame(f),this.resetObservers=function(){s(),cancelAnimationFrame(l)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r=Ia(e,t,n,!1),i=function(e,t,n,r){var i=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),s=!0,a=!1,u=void 0;try{for(var l,c=function(){var o=l.value;try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])return"continue";var s=Xs(t.CanvasRenderingContext2D.prototype,o,function(i){return function(){for(var s=this,a=arguments.length,u=new Array(a),l=0;l<a;l++)u[l]=arguments[l];return ra(this.canvas,n,r,!0)||setTimeout(function(){var n=sS(u,t,s);e(s.canvas,{type:B_["2D"],property:o,args:n})},0),i.apply(this,u)}});i.push(s)}catch(n){var a=kS(t.CanvasRenderingContext2D.prototype,o,{set:function(t){e(this.canvas,{type:B_["2D"],property:o,args:[t],setter:!0})}});i.push(a)}},d=o[Symbol.iterator]();!(s=(l=d.next()).done);s=!0)c()}catch(e){a=!0,u=e}finally{try{s||null==d.return||d.return()}finally{if(a)throw u}}return function(){i.forEach(function(e){return e()})}}(this.processMutation.bind(this),e,t,n),o=function(e,t,n,r){var i,o,s=[];return(i=s).push.apply(i,_to_consumable_array(Oa(t.WebGLRenderingContext.prototype,B_.WebGL,e,n,r,t))),void 0!==t.WebGL2RenderingContext&&(o=s).push.apply(o,_to_consumable_array(Oa(t.WebGL2RenderingContext.prototype,B_.WebGL2,e,n,r,t))),function(){s.forEach(function(e){return e()})}}(this.processMutation.bind(this),e,t,n);this.resetObservers=function(){r(),i(),o()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame(function(){return e.flushPendingCanvasMutations()})}},{key:"startRAFTimestamping",value:function(){var e=this,t=function(n){e.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)}},{key:"flushPendingCanvasMutations",value:function(){var e=this;this.pendingCanvasMutations.forEach(function(t,n){var r=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(function(){return e.flushPendingCanvasMutations()})}},{key:"flushPendingCanvasMutationFor",value:function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var r=n.map(function(e){e.type;return _object_without_properties(e,["type"])}),i=n[0].type;this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}}}}]),e}(),dS=function(){function e(t){_class_call_check(this,e),Rm(this,"trackedLinkElements",new WeakSet),Rm(this,"mutationCb"),Rm(this,"adoptedStyleSheetCb"),Rm(this,"styleMirror",new L_),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}return _create_class(e,[{key:"attachLinkElement",value:function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}},{key:"trackLinkElement",value:function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}},{key:"adoptStyleSheets",value:function(e,t){if(0!==e.length){var n={id:t,styleIds:[]},r=[],i=!0,o=!1,s=void 0;try{for(var a,u,l=function(){var e=u.value,t=void 0;if(a.styleMirror.has(e))t=a.styleMirror.getId(e);else{t=a.styleMirror.add(e);var i=[];try{i=Array.from(e.cssRules,function(t,n){return{rule:bo(t,e.href),index:n}})}catch(e){if(!_instanceof(e,DOMException)||"SecurityError"!==e.name)throw e}r.push({styleId:t,rules:i})}n.styleIds.push(t)},c=e[Symbol.iterator]();!(i=(u=c.next()).done);i=!0)a=this,l()}catch(e){o=!0,s=e}finally{try{i||null==c.return||c.return()}finally{if(o)throw s}}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),e}(),fS=function(){function e(){_class_call_check(this,e),Rm(this,"nodeMap",new WeakMap),Rm(this,"active",!1)}return _create_class(e,[{key:"inOtherBuffer",value:function(e,t){var n=this.nodeMap.get(e);return n&&Array.from(n).some(function(e){return e!==t})}},{key:"add",value:function(e,t){var n=this;this.active||(this.active=!0,requestAnimationFrame(function(){n.nodeMap=new WeakMap,n.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}},{key:"destroy",value:function(){}}]),e}(),gS=!1;try{if(2!==Array.from([1],function(e){return 2*e})[0]){var l=document.createElement("iframe");document.body.appendChild(l),Array.from=(null==(Pm=l.contentWindow)?void 0:Pm.Array.from)||Array.from,document.body.removeChild(l)}}catch(e){console.debug("Unable to override Array.from",e)}yS=new Vm,Aa.addCustomEvent=function(e,t){if(!gS)throw new Error("please add custom event after start recording");hS({type:j_.Custom,data:{tag:e,payload:t}})},Aa.freezePage=function(){J_.forEach(function(e){return e.freeze()})},Aa.takeFullSnapshot=function(e){if(!gS)throw new Error("please take full snapshot after start recording");pS(e)},Aa.mirror=yS,(u=mS||(mS={}))[u.NotStarted=0]="NotStarted",u[u.Running=1]="Running",u[u.Stopped=2]="Stopped"}}),RS={};rl(RS,{NetworkObservers:function(){return TS}});var PS,MS,NS,LS,jS,DS,US,FS,BS,qS,zS,VS,WS,HS,GS,KS,JS,$S,QS,YS,XS=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/observers.js":function(){al(),Vf(),OS=["image/","audio/","video/","application/octet-stream","font/"],TS=function(){function e(){this.fetchObserver=null}return e.prototype.start=function(e,t){this.eventCallback=e,this.networkConfig=t,this.observeFetch()},e.prototype.stop=function(){var e;null===(e=this.fetchObserver)||void 0===e||e.call(this),this.fetchObserver=null,this.eventCallback=void 0,this.networkConfig=void 0},e.prototype.notifyEvent=function(e){var t;null===(t=this.eventCallback)||void 0===t||t.call(this,e)},e.prototype.observeFetch=function(){var e=this,t=G();if(t){var n=t.fetch;n&&(t.fetch=function(t,r){return Ft(e,void 0,void 0,function(){var e,i,o,s,a,u,l,c,d,f,h,p,v=this;return Bt(this,function(g){switch(g.label){case 0:e=Date.now(),i={timestamp:e,type:"fetch",method:(null==r?void 0:r.method)||"GET",url:t.toString(),requestHeaders:null==r?void 0:r.headers},(null==(o=null===(h=this.networkConfig)||void 0===h?void 0:h.body)?void 0:o.request)&&void 0!==(s=function(e){if(null!=e){if("string"==typeof e)return e;if(_instanceof(e,URLSearchParams))return e.toString();if(_instanceof(e,FormData)){var t=[];return e.forEach(function(e,n){t.push("".concat(n,"=").concat("string"==typeof e?e:"[File]"))}),t.join("&")}}}(null==r?void 0:r.body))&&(a=null!==(p=o.maxBodySizeBytes)&&void 0!==p?p:10240,i.requestBody=Ra(s,a).value),g.label=1;case 1:return g.trys.push([1,3,,4]),[4,n(t,r)];case 2:return u=g.sent(),d=Date.now(),i.status=u.status,i.duration=d-e,l={},u.headers.forEach(function(e,t){l[t]=e}),i.responseHeaders=l,(null==o?void 0:o.response)?!function(e){return!!e&&OS.some(function(t){return e.toLowerCase().startsWith(t)})}(l["content-type"]||null)?u.clone().text().then(function(e){var t,n=null!==(t=o.maxBodySizeBytes)&&void 0!==t?t:10240,r=Ra(e,n),s=r.value,a=r.truncated;i.responseBody=s,i.responseBodyStatus=a?"truncated":"captured",v.notifyEvent(i)},function(){i.responseBodyStatus="error",v.notifyEvent(i)}):(i.responseBodyStatus="skipped_binary",this.notifyEvent(i)):this.notifyEvent(i),[2,u];case 3:throw c=g.sent(),d=Date.now(),i.duration=d-e,f=c,i.error={name:f.name||"UnknownError",message:f.message||"An unknown error occurred"},this.notifyEvent(i),c;case 4:return[2]}})})},this.fetchObserver=function(){t.fetch=n})}},e}()}}),ZS=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/session-replay.js":function(){al(),Vf(),Yf(),Xf(),Wf(),$f(),eh(),ch(),dh(),Dp(),Bp(),qp(),Hf(),zp(),av(),uv(),nh(),lv(),cv(),PS=function(){function e(){var e=this;this.name="@amplitude/session-replay-browser",this.recordCancelCallback=null,this.eventCount=0,this.sessionTargetingMatch=!1,this.pageLeaveFns=[],this.suppressedSendCount=0,this.hasEmittedGateDecision=!1,this.recordFunction=null,this.recordEventsInFlight=!1,this.pendingEmitEvents=[],this.currentPageUrl="",this.recordEventsPendingShouldLogMetadata=null,this.urlChangeCleanup=null,this.crossOriginIframeCoordinator=null,this.crossOriginParentSignalCleanup=null,this.latestUrlChangeTargetingEvaluationId=0,this.teardownEventListeners=function(t){var n=G();n&&(n.removeEventListener("blur",e.blurListener),n.removeEventListener("focus",e.focusListener),!t&&n.addEventListener("blur",e.blurListener),!t&&n.addEventListener("focus",e.focusListener),n.self&&"onpagehide"in n.self?(n.removeEventListener("pagehide",e.pageLeaveListener),!t&&n.addEventListener("pagehide",e.pageLeaveListener)):(n.removeEventListener("beforeunload",e.pageLeaveListener),!t&&n.addEventListener("beforeunload",e.pageLeaveListener)))},this.blurListener=function(){e.sendEvents()},this.focusListener=function(){if(e.recordCancelCallback&&e.recordFunction)try{e.recordFunction.takeFullSnapshot(!0)}catch(t){e.loggerProvider.warn("Failed to take full snapshot on focus:",t)}else e.recordEventsInFlight||e.recordEvents(!1)},this.pageLeaveListener=function(t){var n;null===(n=e.eventCompressor)||void 0===n||n.flushQueue(),e.sendEvents(),e.pageLeaveFns.forEach(function(e){e(t)})},this.evaluateTargetingAndCapture=function(t,n,i,o){return void 0===n&&(n=!1),void 0===i&&(i=!1),void 0===o&&(o=!1),Ft(e,void 0,void 0,function(){var e,s,a,u,l,c,d,f,h,p,v,g;return Bt(this,function(y){switch(y.label){case 0:if(!this.identifiers||!this.identifiers.sessionId||!this.config)return this.identifiers&&!this.identifiers.sessionId?this.loggerProvider.log("Session ID has not been set yet, cannot evaluate targeting for Session Replay."):this.loggerProvider.warn("Session replay init has not been called, cannot evaluate targeting."),[2];if(!this.config.targetingConfig){if(!n)return this.loggerProvider.log("No targeting config set, skipping initialization/recording for event."),[2];this.loggerProvider.log("Targeting config has not been set yet, cannot evaluate targeting.")}return this.lastTargetingParams=t,e=this.config.targetingConfig,e&&!this.sessionTargetingMatch?(s=o?this.latestUrlChangeTargetingEvaluationId:void 0,(a=t.event)&&Object.values(r).includes(a.event_type)&&(a=void 0),u=null!==(v=null!==(f=null===(d=t.page)||void 0===d?void 0:d.url)&&void 0!==f?f:null===(p=null===(h=G())||void 0===h?void 0:h.location)||void 0===p?void 0:p.href)&&void 0!==v?v:"",l=null!==(g=t.page)&&void 0!==g?g:""!==u?{url:u}:void 0,[4,$p({sessionId:this.identifiers.sessionId,targetingConfig:e,loggerProvider:this.loggerProvider,apiKey:this.config.apiKey,targetingParams:{userProperties:t.userProperties,event:a,page:l},urlChange:o})]):[3,2];case 1:if(c=y.sent(),o&&void 0!==s&&s!==this.latestUrlChangeTargetingEvaluationId)return this.loggerProvider.debug("Ignoring stale URL-change targeting result #".concat(s,"; latest is #").concat(this.latestUrlChangeTargetingEvaluationId,".")),[2];this.sessionTargetingMatch=this.sessionTargetingMatch||c,this.loggerProvider.debug(JSON.stringify({name:"targeted replay capture config",sessionTargetingMatch:this.sessionTargetingMatch,event:a,targetingParams:t},null,2)),y.label=2;case 2:return n?(this.initialize(!0),[3,5]):[3,3];case 3:return!i&&this.recordCancelCallback?[3,5]:(this.loggerProvider.log("Recording events for session due to forceRestart or no ongoing recording."),[4,this.recordEvents()]);case 4:y.sent(),y.label=5;case 5:return[2]}})})},this.addCustomRRWebEvent=function(n,r,i){return void 0===r&&(r={}),void 0===i&&(i=!0),Ft(e,void 0,void 0,function(){var e,o,s,a;return Bt(this,function(u){switch(u.label){case 0:return u.trys.push([0,3,,4]),e=void 0,(o=this.config)&&n!==fd.METADATA?(e={config:Od(o),version:Kd},i?[4,Id()]:[3,2]):[3,2];case 1:s=u.sent(),e=t(t({},s),e),u.label=2;case 2:return this.recordCancelCallback&&this.recordFunction?this.recordFunction.addCustomEvent(n,t(t({},r),e)):this.loggerProvider.debug("Not able to add custom replay capture event ".concat(n," due to no ongoing recording.")),[3,4];case 3:return a=u.sent(),this.loggerProvider.debug("Error while adding custom replay capture event: ",a),[3,4];case 4:return[2]}})})},this.stopRecordingEvents=function(){var t,n,r;try{e.loggerProvider.log("Session Replay capture stopping."),e.recordCancelCallback&&e.recordCancelCallback(),e.recordCancelCallback=null,null===(t=e.networkObservers)||void 0===t||t.stop(),null===(n=e.crossOriginIframeCoordinator)||void 0===n||n.stop(),e.crossOriginIframeCoordinator=null,null===(r=e.crossOriginParentSignalCleanup)||void 0===r||r.call(e),e.crossOriginParentSignalCleanup=null}catch(t){var i=t;e.loggerProvider.warn("Error occurred while stopping replay capture: ".concat(i.toString()))}},this.loggerProvider=new hd(new le)}return e.prototype.init=function(e,t){return ne(this._init(e,t))},e.prototype.setupUrlChangeListener=function(){var e,t,n=this;null===(e=this.urlChangeCleanup)||void 0===e||e.call(this);var r=G();if(null==r?void 0:r.location){var i=!!(null===(t=this.config)||void 0===t?void 0:t.targetingConfig),o=tr(r,function(e){if(n.currentPageUrl=e,i){var t=++n.latestUrlChangeTargetingEvaluationId;n.evaluateTargetingAndCapture({userProperties:{},event:void 0,page:{url:e}},!1,!1,!0),n.loggerProvider.debug("Queued URL-change targeting re-evaluation #".concat(t," for ").concat(e,"."))}});this.urlChangeCleanup=function(){o(),n.urlChangeCleanup=null}}},e.prototype.isBelowMinSessionDuration=function(){var e,t=null===(e=this.config)||void 0===e?void 0:e.minSessionDurationMs;return void 0!==t&&void 0!==this.sessionStartTime&&Date.now()-this.sessionStartTime<t},e.prototype.getCurrentPageForTargeting=function(){var e,t,n=null===(t=null===(e=G())||void 0===e?void 0:e.location)||void 0===t?void 0:t.href;return null!=n?{url:n}:void 0},e.prototype._init=function(e,n){var r,i,o,s,a,u,l,c,d,f,h,p,v,g;return Ft(this,void 0,void 0,function(){var y,m,b,w,_,S,k,x,E,C,I,O,T,A,R,P,M,N,L,j,D,U,F,B,q,z,V,W,H,K,J=this;return Bt(this,function($){switch($.label){case 0:return null===(r=this.urlChangeCleanup)||void 0===r||r.call(this),this.loggerProvider=new hd(n.loggerProvider||new le),Object.prototype.hasOwnProperty.call(n,"logLevel")&&this.loggerProvider.enable(n.logLevel),this.currentPageUrl=wd(),this.identifiers=new bh({sessionId:n.sessionId,deviceId:n.deviceId}),y=Date.now(),Ih(e,y,this.loggerProvider),this.sessionStartTime=void 0!==n.sessionId&&null!==(i=xh(e,n.sessionId,y,this.loggerProvider))&&void 0!==i?i:y,m=this,[4,Ud(e,n)];case 1:return m.joinedConfigGenerator=$.sent(),[4,this.joinedConfigGenerator.generateJoinedConfig()];case 2:return b=$.sent(),w=b.joinedConfig,_=b.localConfig,S=b.remoteConfig,this.config=w,this.setMetadata(n.sessionId,w,_,S,null===(o=n.version)||void 0===o?void 0:o.version,Kd,null===(s=n.version)||void 0===s?void 0:s.type),this.pageLeaveFns=[],n.sessionId&&(null===(a=this.config.interactionConfig)||void 0===a?void 0:a.enabled)&&(k=mh.default({sessionId:n.sessionId,type:"interaction"},this.config),this.pageLeaveFns=[k.send(this.getDeviceId.bind(this)).bind(k)],this.scrollHook=k.hook.bind(k),this.clickHandler=new gh(this.loggerProvider,k)),x=[],"idb"!==(E=this.config.storeType)||(null===(u=G())||void 0===u?void 0:u.indexedDB)||(E="memory",this.loggerProvider.warn("Could not use preferred indexedDB storage, reverting to in memory option.")),this.loggerProvider.log("Using ".concat(E," for event storage.")),O=G(),this.config.useWebWorker&&O&&O.Worker?[4,Promise.resolve().then(function(){return wm(),dv})]:[3,4];case 3:T=$.sent(),A=T.compressionScript,R=T.trackDestinationScript,C=A,I=R,$.label=4;case 4:return $.trys.push([4,6,,7]),[4,Sf({config:this.config,type:"replay",minInterval:null===(l=this.config.flushIntervalConfig)||void 0===l?void 0:l.minIntervalMs,maxInterval:null===(c=this.config.flushIntervalConfig)||void 0===c?void 0:c.maxIntervalMs,storeType:E,trackDestinationWorkerScript:I,shouldSend:function(){return!J.isBelowMinSessionDuration()}})];case 5:return P=$.sent(),this.rrwebEventManager=P,x.push({name:"replay",manager:P}),[3,7];case 6:return M=$.sent(),D=M,this.loggerProvider.warn("Error occurred while creating replay events manager: ".concat(D.toString())),[3,7];case 7:if(!(null===(d=this.config.interactionConfig)||void 0===d?void 0:d.enabled))return[3,11];N=this.config.interactionConfig.batch?vh:ph,$.label=8;case 8:return $.trys.push([8,10,,11]),[4,Sf({config:this.config,type:"interaction",minInterval:null!==(f=this.config.interactionConfig.trackEveryNms)&&void 0!==f?f:Xc,maxInterval:Zc,payloadBatcher:N,storeType:E,trackDestinationWorkerScript:I})];case 9:return L=$.sent(),x.push({name:"interaction",manager:L}),[3,11];case 10:return j=$.sent(),D=j,this.loggerProvider.warn("Error occurred while creating interaction events manager: ".concat(D.toString())),[3,11];case 11:if(this.eventsManager=new(kf.bind.apply(kf,Vt([void 0],zt(x),!1))),this.eventCompressor&&this.eventCompressor.terminate(),this.eventCompressor=new Fd(this.eventsManager,this.config,this.getDeviceId(),C,function(){return J.sendEvents()}),this.pendingEmitEvents.length>0){U=this.pendingEmitEvents.splice(0);try{for(F=qt(U),B=F.next();!B.done;B=F.next())q=B.value,z=q.event,V=q.sessionId,this.eventCompressor.enqueueEvent(z,V)}catch(e){H={error:e}}finally{try{B&&!B.done&&(K=F.return)&&K.call(F)}finally{if(H)throw H.error}}}return this.pageLeaveFns=Vt(Vt([],zt(this.pageLeaveFns),!1),[function(){var e;if(J.config&&(null===(e=J.identifiers)||void 0===e?void 0:e.sessionId)&&P){var t=P.getBeaconEvents();if(t.length){var n=J.getDeviceId();n&&(J.isBelowMinSessionDuration()||P.trackDestination.sendBeacon({events:t,sessionId:J.identifiers.sessionId,deviceId:n,apiKey:J.config.apiKey,serverZone:J.config.serverZone}))}}}],!1),[4,this.initializeNetworkObservers()];case 12:return $.sent(),(null===(h=G())||void 0===h?void 0:h.opener)&&(W=cn(),dn(W),W.setup(t({logger:this.loggerProvider},this.config.serverZone&&{endpoint:Ic[this.config.serverZone]}))),this.loggerProvider.log("Installing @amplitude/session-replay-browser."),this.teardownEventListeners(!1),[4,this.evaluateTargetingAndCapture({userProperties:n.userProperties,page:this.getCurrentPageForTargeting()},!0)];case 13:return $.sent(),(this.config.targetingConfig||(null!==(g=null===(v=null===(p=this.config.privacyConfig)||void 0===p?void 0:p.urlMaskLevels)||void 0===v?void 0:v.length)&&void 0!==g?g:0)>0)&&this.setupUrlChangeListener(),[2]}})})},e.prototype.setSessionId=function(e,t){return ne(this.asyncSetSessionId(e,t))},e.prototype.asyncSetSessionId=function(e,t,n){var r,i,o;return Ft(this,void 0,void 0,function(){var s,a,u,l;return Bt(this,function(c){switch(c.label){case 0:return this.latestUrlChangeTargetingEvaluationId++,this.sessionTargetingMatch=!1,this.lastShouldRecordDecision=void 0,(s=this.identifiers&&this.identifiers.sessionId)&&this.sendEvents(s),(a=s!==e)&&(null===(r=this.rrwebEventManager)||void 0===r||r.dropPendingBeaconEvents()),u=t||this.getDeviceId(),this.identifiers=new bh({sessionId:e,deviceId:u}),a&&(this.sessionStartTime=Date.now(),this.suppressedSendCount=0,this.hasEmittedGateDecision=!1,(null===(i=this.config)||void 0===i?void 0:i.apiKey)&&(Eh(this.config.apiKey,e,this.sessionStartTime,this.loggerProvider),void 0!==s&&Ch(this.config.apiKey,s,this.loggerProvider))),this.joinedConfigGenerator&&s?[4,this.joinedConfigGenerator.generateJoinedConfig()]:[3,2];case 1:l=c.sent().joinedConfig,this.config=l,c.label=2;case 2:return(null===(o=this.config)||void 0===o?void 0:o.targetingConfig)?[4,this.evaluateTargetingAndCapture({userProperties:null==n?void 0:n.userProperties,page:this.getCurrentPageForTargeting()},!1,!0)]:[3,4];case 3:return c.sent(),[3,6];case 4:return[4,this.recordEvents()];case 5:c.sent(),c.label=6;case 6:return[2]}})})},e.prototype.getSessionReplayProperties=function(){var e,t=this.config,n=this.identifiers;if(!t||!n)return this.loggerProvider.warn("Session replay init has not been called, cannot get session replay properties."),{};var r=this.getShouldRecord(),i={};return r&&((e={})[Dc]=n.sessionReplayId?n.sessionReplayId:null,i=e,t.debugMode&&(i[zc]=JSON.stringify({appHash:Ve(t.apiKey).toString()}))),this.addCustomRRWebEvent(fd.GET_SR_PROPS,{shouldRecord:r,eventProperties:i},10===this.eventCount),10===this.eventCount&&(this.eventCount=0),this.eventCount++,i},e.prototype.sendEvents=function(e){var t,n,r=e||(null===(t=this.identifiers)||void 0===t?void 0:t.sessionId),i=this.getDeviceId();if(this.eventsManager&&r&&i){if(this.isBelowMinSessionDuration()){var o=this.sessionStartTime,s=this.config.minSessionDurationMs;return this.loggerProvider.log("Session ".concat(r," not sent: duration ").concat(Date.now()-o,"ms is below minimum ").concat(s,"ms.")),void this.suppressedSendCount++}if(!this.hasEmittedGateDecision&&void 0!==(null===(n=this.config)||void 0===n?void 0:n.minSessionDurationMs)&&this.recordCancelCallback&&this.recordFunction){this.hasEmittedGateDecision=!0;var a=void 0!==this.sessionStartTime?Date.now()-this.sessionStartTime:void 0;this.addCustomRRWebEvent(fd.REPLAY_GATE_DECISION,{sessionId:r,suppressedSendCount:this.suppressedSendCount,elapsedMs:a,minSessionDurationMs:this.config.minSessionDurationMs},!1)}this.eventsManager.sendCurrentSequenceEvents({sessionId:r,deviceId:i})}},e.prototype.initialize=function(e){var t;return void 0===e&&(e=!1),Ft(this,void 0,void 0,function(){var n;return Bt(this,function(r){return(null===(t=this.identifiers)||void 0===t?void 0:t.sessionId)?(n=this.getDeviceId())?(this.eventsManager&&e&&this.eventsManager.sendStoredEvents({deviceId:n}),[2,this.recordEvents()]):(this.loggerProvider.log("Session is not being recorded due to lack of device id."),[2,Promise.resolve()]):(this.loggerProvider.log("Session is not being recorded due to lack of session id."),[2,Promise.resolve()])})})},e.prototype.shouldOptOut=function(){var e,t,n;(null===(e=this.config)||void 0===e?void 0:e.instanceName)&&(n=Re(this.config.instanceName).identityStore.getIdentity().optOut);return void 0!==n?n:null===(t=this.config)||void 0===t?void 0:t.optOut},e.prototype.getShouldRecord=function(){if(!this.identifiers||!this.config||!this.identifiers.sessionId)return this.loggerProvider.warn("Session is not being recorded due to lack of config, please call sessionReplay.init."),!1;if(!this.config.captureEnabled)return this.loggerProvider.log("Session ".concat(this.identifiers.sessionId," not being captured due to capture being disabled for project or because the remote config could not be fetched.")),!1;if(this.shouldOptOut())return this.loggerProvider.log("Opting session ".concat(this.identifiers.sessionId," out of recording due to optOut config.")),!1;var e,t,n=!1,r="",i=!1;this.config.targetingConfig?this.sessionTargetingMatch?(r="Capturing replays for session ".concat(this.identifiers.sessionId," due to matching targeting conditions."),this.loggerProvider.log(r),n=!0,i=!0):(r="Not capturing replays for session ".concat(this.identifiers.sessionId," due to not matching targeting conditions."),this.loggerProvider.log(r),n=!1,i=!1):(e=this.identifiers.sessionId,t=this.config.sampleRate,er(e.toString())%1e6/1e6<t)?(n=!0,i=!0):(r="Opting session ".concat(this.identifiers.sessionId," out of recording due to sample rate."),this.loggerProvider.log(r),n=!1,i=!1);return this.lastShouldRecordDecision!==n&&this.config.targetingConfig&&(this.addCustomRRWebEvent(fd.TARGETING_DECISION,{message:r,sessionId:this.identifiers.sessionId,matched:i,targetingParams:this.lastTargetingParams}),this.lastShouldRecordDecision=n),n},e.prototype.getBlockSelectors=function(){var e,t,n,r=null!==(n=null===(t=null===(e=this.config)||void 0===e?void 0:e.privacyConfig)||void 0===t?void 0:t.blockSelector)&&void 0!==n?n:[];if(0!==r.length)return r},e.prototype.getMaskTextSelectors=function(){var e,t,n=null===(e=this.config)||void 0===e?void 0:e.privacyConfig;if("conservative"===(n?gd(this.currentPageUrl,n):void 0))return"*";if(null===(t=null==n?void 0:n.urlMaskLevels)||void 0===t?void 0:t.some(function(e){return"conservative"===e.maskLevel}))return"*";var r=null==n?void 0:n.urlMaskLevels;if("conservative"===(null==n?void 0:n.defaultMaskLevel)&&r&&r.length>0)return"*";var i=null==n?void 0:n.maskSelector;return i||void 0},e.prototype.getRecordingPlugins=function(e){var t,n,r,i,o,s;return Ft(this,void 0,void 0,function(){var a,u,l,c;return Bt(this,function(d){switch(d.label){case 0:a=[];try{u=nr({ugcFilterRules:(null===(n=null===(t=this.config)||void 0===t?void 0:t.interactionConfig)||void 0===n?void 0:n.ugcFilterRules)||[],enablePolling:(null===(r=this.config)||void 0===r?void 0:r.enableUrlChangePolling)||!1,pollingInterval:null===(i=this.config)||void 0===i?void 0:i.urlChangePollingInterval,captureDocumentTitle:null===(o=this.config)||void 0===o?void 0:o.captureDocumentTitle}),a.push(u)}catch(e){this.loggerProvider.warn("Failed to create URL tracking plugin:",e)}if(!(null===(s=null==e?void 0:e.console)||void 0===s?void 0:s.enabled))return[3,4];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,Promise.resolve().then(function(){return bS(),_m})];case 2:return l=d.sent().getRecordConsolePlugin,a.push(l({level:e.console.levels})),[3,4];case 3:return c=d.sent(),this.loggerProvider.warn("Failed to load console plugin:",c),[3,4];case 4:return[2,a.length>0?a:void 0]}})})},e.prototype.getRecordFunction=function(){return Ft(this,void 0,void 0,function(){var e,t;return Bt(this,function(n){switch(n.label){case 0:if(this.recordFunction)return[2,this.recordFunction];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,Promise.resolve().then(function(){return AS(),wS})];case 2:return e=n.sent().record,this.recordFunction=e,[2,e];case 3:return t=n.sent(),this.loggerProvider.warn("Failed to load rrweb-record module:",t),[2,null];case 4:return[2]}})})},e.prototype.recordEvents=function(e){return void 0===e&&(e=!0),Ft(this,void 0,void 0,function(){var t;return Bt(this,function(n){switch(n.label){case 0:if(this.recordEventsInFlight)return this.recordEventsPendingShouldLogMetadata=e,[2];this.recordEventsInFlight=!0,n.label=1;case 1:return n.trys.push([1,,6,7]),[4,this._recordEvents(e)];case 2:n.sent(),n.label=3;case 3:return null===this.recordEventsPendingShouldLogMetadata?[3,5]:(t=this.recordEventsPendingShouldLogMetadata,this.recordEventsPendingShouldLogMetadata=null,[4,this._recordEvents(t)]);case 4:return n.sent(),[3,3];case 5:return[3,7];case 6:return this.recordEventsInFlight=!1,this.recordEventsPendingShouldLogMetadata=null,[7];case 7:return[2]}})})},e.prototype._recordEvents=function(e){var n,r,i,o,s,a,u,l;return void 0===e&&(e=!0),Ft(this,void 0,void 0,function(){var c,d,f,h,p,v,g,y,m,b,w,_,S,k,x,E,C,I,O,T=this;return Bt(this,function(A){switch(A.label){case 0:return c=this.config,d=this.getShouldRecord(),f=null===(n=this.identifiers)||void 0===n?void 0:n.sessionId,d&&f&&c?(this.stopRecordingEvents(),[4,this.getRecordFunction()]):[2];case 1:return(h=A.sent())?[4,this.initializeNetworkObservers()]:[2];case 2:A.sent(),p=null===(r=c.loggingConfig)||void 0===r?void 0:r.network,v=fn(c.serverZone,c.trackServerUrl),g=[Gc,Kc,Jc,v],null===(i=this.networkObservers)||void 0===i||i.start(function(e){g.some(function(t){return e.url.startsWith(t)})||T.addCustomRRWebEvent(fd.FETCH_REQUEST,e)},p),y=c.interactionConfig,m=c.loggingConfig,b=(null==y?void 0:y.enabled)?{mouseInteraction:this.eventsManager&&(null===(o=this.clickHandler)||void 0===o?void 0:o.createHook({eventsManager:this.eventsManager,sessionId:f,deviceIdFn:this.getDeviceId.bind(this),mirror:h.mirror,ugcFilterRules:null!==(s=y.ugcFilterRules)&&void 0!==s?s:[],performanceOptions:null===(a=c.performanceConfig)||void 0===a?void 0:a.interaction})),scroll:this.scrollHook}:{},w=(null==y?void 0:y.enabled)&&y.ugcFilterRules?y.ugcFilterRules:[],this.loggerProvider.log("Session Replay capture beginning for ".concat(f,".")),A.label=3;case 3:return A.trys.push([3,5,,6]),_=!!(null===(u=c.crossOriginIframes)||void 0===u?void 0:u.enabled),S=!1!==(null===(l=c.crossOriginIframes)||void 0===l?void 0:l.coordinateChildren),(k=_&&function(){try{var e=G();return!!e&&e.parent!==e}catch(e){return!0}}())&&S?(this.crossOriginParentSignalCleanup=function(e){var t=G();if(!t)return function(){};var n=t.parent;function r(t){if(t.source===n){var r=t.data;(null==r?void 0:r.type)===dd&&("start"===r.action?e.onStart():"stop"===r.action&&e.onStop())}}return t.addEventListener("message",r),function(){return t.removeEventListener("message",r)}}({onStart:function(){return T._recordEventsInChildMode(h,f,c,b)},onStop:function(){try{T.recordCancelCallback&&T.recordCancelCallback(),T.recordCancelCallback=null}catch(t){var e=t;T.loggerProvider.warn("Error occurred while stopping child iframe replay capture: ".concat(e.toString()))}}}),[2]):(x=this,E=h,C=[t({},this.buildRRWebRecordOptions(c,b,function(e){if(T.shouldOptOut())return T.loggerProvider.log("Opting session ".concat(f," out of recording due to optOut config.")),T.stopRecordingEvents(),void T.sendEvents();e.type===Pd.Meta&&(e.data.href=Cd(e.data.href,w)),T.eventCompressor?T.eventCompressor.enqueueEvent(e,f):T.pendingEmitEvents.push({event:e,sessionId:f})},"Error while capturing replay: "))],O={},[4,this.getRecordingPlugins(m)]);case 4:return x.recordCancelCallback=E.apply(void 0,[t.apply(void 0,C.concat([(O.plugins=A.sent(),O.recordCrossOriginIframes=_,O)]))]),_&&!k&&S&&(this.crossOriginIframeCoordinator||(this.crossOriginIframeCoordinator=new rv),this.crossOriginIframeCoordinator.start()),this.addCustomRRWebEvent(fd.DEBUG_INFO),e&&this.addCustomRRWebEvent(fd.METADATA,this.metadata),[3,6];case 5:return I=A.sent(),this.loggerProvider.warn("Failed to initialize session replay:",I),[3,6];case 6:return[2]}})})},e.prototype.buildRRWebRecordOptions=function(e,n,r,i){var o=this,s=e.privacyConfig;return t(t({emit:r,inlineStylesheet:e.shouldInlineStylesheet,hooks:n,maskAllInputs:!0,maskTextClass:Wc,blockClass:Vc,blockSelector:this.getBlockSelectors(),applyBackgroundColorToBlockedElements:e.applyBackgroundColorToBlockedElements,maskInputFn:md("input",s,function(){return o.currentPageUrl}),maskTextFn:md("text",s,function(){return o.currentPageUrl}),maskAttributeFn:bd(s,function(){return o.currentPageUrl}),maskTextSelector:this.getMaskTextSelectors()},void 0!==e.fullSnapshotIntervalMs&&{checkoutEveryNms:e.fullSnapshotIntervalMs}),{recordCanvas:!1,captureAdoptedStyleSheets:e.captureAdoptedStyleSheets,slimDOMOptions:{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0},errorHandler:function(e){var t=e;if(t.message.includes("insertRule")&&t.message.includes("CSSStyleSheet"))throw t;if(t._external_)throw t;return o.loggerProvider.warn(i,t.toString()),!0}})},e.prototype._recordEventsInChildMode=function(e,n,r,i){try{this.recordCancelCallback&&this.recordCancelCallback(),this.recordCancelCallback=null,this.recordCancelCallback=e(t(t({},this.buildRRWebRecordOptions(r,i,function(){},"Error while capturing replay (child iframe): ")),{recordCrossOriginIframes:!0})),this.loggerProvider.log("Session Replay child iframe capture beginning for session ".concat(n,"."))}catch(e){this.loggerProvider.warn("Failed to initialize session replay in child iframe mode:",e)}},e.prototype.getDeviceId=function(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.deviceId},e.prototype.getSessionId=function(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.sessionId},e.prototype.flush=function(e){var t;return void 0===e&&(e=!1),Ft(this,void 0,void 0,function(){return Bt(this,function(n){return[2,null===(t=this.eventsManager)||void 0===t?void 0:t.flush(e)]})})},e.prototype.shutdown=function(){var e,t;null===(e=this.urlChangeCleanup)||void 0===e||e.call(this),null===(t=this.crossOriginParentSignalCleanup)||void 0===t||t.call(this),this.crossOriginParentSignalCleanup=null,this.teardownEventListeners(!0),this.stopRecordingEvents(),this.sendEvents()},e.prototype.mapSDKType=function(e){return"plugin"===e?"@amplitude/plugin-session-replay-browser":"segment"===e?"@amplitude/segment-session-replay-plugin":null},e.prototype.setMetadata=function(e,t,n,r,i,o,s){var a=(null==e?void 0:e.toString())?Ve(e.toString()):void 0;this.metadata={joinedConfig:t,localConfig:n,remoteConfig:r,sessionId:e,hashValue:a,sampleRate:t.sampleRate,replaySDKType:this.mapSDKType(s),replaySDKVersion:i,standaloneSDKType:"@amplitude/session-replay-browser",standaloneSDKVersion:o}},e.prototype.initializeNetworkObservers=function(){var e,t,n;return Ft(this,void 0,void 0,function(){var r,i;return Bt(this,function(o){switch(o.label){case 0:if(!(null===(n=null===(t=null===(e=this.config)||void 0===e?void 0:e.loggingConfig)||void 0===t?void 0:t.network)||void 0===n?void 0:n.enabled)||this.networkObservers)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,Promise.resolve().then(function(){return XS(),RS})];case 2:return r=o.sent().NetworkObservers,this.networkObservers=new r,[3,4];case 3:return i=o.sent(),this.loggerProvider.warn("Failed to import or instantiate NetworkObservers:",i),[3,4];case 4:return[2]}})})},e}()}}),ek=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/session-replay-factory.js":function(){Vf(),Qf(),ZS(),MS=function(e){return function(){var t=e.config||Td();return{logger:t.loggerProvider,logLevel:t.logLevel}}},NS=function(){var e=new PS;return{init:be(e.init.bind(e),"init",MS(e)),evaluateTargetingAndCapture:be(e.evaluateTargetingAndCapture.bind(e),"evaluateTargetingAndRecord",MS(e)),setSessionId:be(e.setSessionId.bind(e),"setSessionId",MS(e)),getSessionId:be(e.getSessionId.bind(e),"getSessionId",MS(e)),getSessionReplayProperties:be(e.getSessionReplayProperties.bind(e),"getSessionReplayProperties",MS(e)),flush:be(e.flush.bind(e),"flush",MS(e)),shutdown:be(e.shutdown.bind(e),"shutdown",MS(e))}}()}}),tk=tl({"../../../../node_modules/@amplitude/session-replay-browser/lib/esm/index.js":function(){ek(),LS=NS.init,jS=NS.setSessionId,DS=NS.getSessionId,US=NS.getSessionReplayProperties,FS=NS.flush,BS=NS.shutdown,qS=NS.evaluateTargetingAndCapture}}),nk=tl({"../../../../node_modules/@amplitude/analytics-client-common/lib/esm/analytics-connector.js":function(){Tl(),zS=function(e){return void 0===e&&(e="$default_instance"),Ae.getInstance(e)}}}),rk=tl({"../../../../node_modules/@amplitude/analytics-client-common/lib/esm/index.js":function(){nk()}}),ik=tl({"../../../../node_modules/@amplitude/plugin-session-replay-browser/node_modules/@amplitude/analytics-types/lib/esm/event.js":function(){var e,t,n;(e=VS||(VS={})).SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll",(t=WS||(WS={})).REVENUE_PRODUCT_ID="$productId",t.REVENUE_QUANTITY="$quantity",t.REVENUE_PRICE="$price",t.REVENUE_TYPE="$revenueType",t.REVENUE_CURRENCY="$currency",t.REVENUE="$revenue",(n=HS||(HS={})).IDENTIFY="$identify",n.GROUP_IDENTIFY="$groupidentify",n.REVENUE="revenue_amount"}}),ok=tl({"../../../../node_modules/@amplitude/plugin-session-replay-browser/node_modules/@amplitude/analytics-types/lib/esm/index.js":function(){ik()}}),sk=tl({"../../../../node_modules/@amplitude/plugin-session-replay-browser/lib/esm/constants.js":function(){ok(),GS=[VS.SET,VS.SET_ONCE,VS.ADD,VS.APPEND,VS.PREPEND,VS.POSTINSERT]}}),ak=tl({"../../../../node_modules/@amplitude/plugin-session-replay-browser/lib/esm/helpers.js":function(){al(),sk(),KS=function(e){if(e.user_properties){var n={};return Object.keys(e.user_properties).forEach(function(r){if(GS.includes(r)){var i=e.user_properties&&e.user_properties[r];n=t(t({},n),i)}}),n}}}}),uk=tl({"../../../../node_modules/@amplitude/plugin-session-replay-browser/lib/esm/version.js":function(){JS="1.31.0"}}),lk=tl({"../../../../node_modules/@amplitude/plugin-session-replay-browser/lib/esm/session-replay.js":function(){al(),Vf(),tk(),rk(),ak(),uk(),$S="".concat("[Amplitude]"," Session Replay ID"),QS=function(){function e(n){this.name=e.pluginName,this.type="enrichment",this.config=null,this.sessionReplay={flush:FS,getSessionId:DS,getSessionReplayProperties:US,init:LS,setSessionId:jS,shutdown:BS,evaluateTargetingAndCapture:qS},this.options=t({forceSessionTracking:!1},n),this.srInitOptions=this.options}return e.prototype.setup=function(e,n){var r,i,o,s,a,u,l,c;return Ft(this,void 0,void 0,function(){var n,d,f;return Bt(this,function(h){switch(h.label){case 0:return h.trys.push([0,2,,3]),null==e||e.loggerProvider.log("Installing @amplitude/plugin-session-replay, version ".concat(JS,".")),this.config=e,this.options.forceSessionTracking&&("boolean"==typeof e.defaultTracking?!1===e.defaultTracking&&(e.defaultTracking={pageViews:!1,formInteractions:!1,fileDownloads:!1,sessions:!0}):e.defaultTracking=t(t({},e.defaultTracking),{sessions:!0})),n=zS(this.config.instanceName).identityStore,d=n.getIdentity().userProperties,this.srInitOptions={instanceName:this.config.instanceName,deviceId:null!==(r=this.options.deviceId)&&void 0!==r?r:this.config.deviceId,optOut:this.config.optOut,sessionId:this.options.customSessionId?void 0:this.config.sessionId,loggerProvider:this.config.loggerProvider,logLevel:this.config.logLevel,flushMaxRetries:this.config.flushMaxRetries,serverZone:this.config.serverZone,configServerUrl:this.options.configServerUrl||(null===(i=this.config.remoteConfig)||void 0===i?void 0:i.serverUrl),trackServerUrl:this.options.trackServerUrl,sampleRate:this.options.sampleRate,privacyConfig:{blockSelector:null===(o=this.options.privacyConfig)||void 0===o?void 0:o.blockSelector,maskSelector:null===(s=this.options.privacyConfig)||void 0===s?void 0:s.maskSelector,unmaskSelector:null===(a=this.options.privacyConfig)||void 0===a?void 0:a.unmaskSelector,defaultMaskLevel:null===(u=this.options.privacyConfig)||void 0===u?void 0:u.defaultMaskLevel},debugMode:this.options.debugMode,shouldInlineStylesheet:this.options.shouldInlineStylesheet,version:{type:"plugin",version:JS},performanceConfig:this.options.performanceConfig,storeType:this.options.storeType,useWebWorker:null!==(l=this.options.useWebWorker)&&void 0!==l?l:null===(c=this.options.experimental)||void 0===c?void 0:c.useWebWorker,userProperties:d,applyBackgroundColorToBlockedElements:this.options.applyBackgroundColorToBlockedElements,interactionConfig:this.options.interactionConfig,captureDocumentTitle:this.options.captureDocumentTitle,enableUrlChangePolling:this.options.enableUrlChangePolling,urlChangePollingInterval:this.options.urlChangePollingInterval,captureAdoptedStyleSheets:this.options.captureAdoptedStyleSheets,crossOriginIframes:this.options.crossOriginIframes,flushIntervalConfig:this.options.flushIntervalConfig},[4,this.sessionReplay.init(e.apiKey,this.srInitOptions).promise];case 1:return h.sent(),[3,3];case 2:return f=h.sent(),null==e||e.loggerProvider.error("Session Replay: Failed to initialize due to ".concat(f.message)),[3,3];case 3:return[2]}})})},e.prototype.onSessionIdChanged=function(e){var t;return Ft(this,void 0,void 0,function(){return Bt(this,function(n){switch(n.label){case 0:return null===(t=this.config)||void 0===t||t.loggerProvider.debug("Analytics session id is changed to ".concat(e,", SR session id is ").concat(String(this.sessionReplay.getSessionId()),".")),[4,this.sessionReplay.setSessionId(e).promise];case 1:return n.sent(),[2]}})})},e.prototype.onOptOutChanged=function(e){var t;return Ft(this,void 0,void 0,function(){return Bt(this,function(n){switch(n.label){case 0:return null===(t=this.config)||void 0===t||t.loggerProvider.debug("optOut is changed to ".concat(String(e),", calling ").concat(e?"sessionReplay.shutdown()":"sessionReplay.init()",".")),e?(this.sessionReplay.shutdown(),[3,4]):[3,1];case 1:return null!=this.config?[4,this.sessionReplay.init(this.config.apiKey,this.srInitOptions).promise]:[3,3];case 2:n.sent(),n.label=3;case 3:n.label=4;case 4:return[2]}})})},e.prototype.execute=function(e){var n,i,o;return Ft(this,void 0,void 0,function(){var s,a,u,l,c;return Bt(this,function(d){switch(d.label){case 0:return d.trys.push([0,9,,10]),this.options.customSessionId?(s=this.options.customSessionId(e))?s===this.sessionReplay.getSessionId()?[3,2]:[4,this.sessionReplay.setSessionId(s).promise]:[3,3]:[3,4];case 1:d.sent(),d.label=2;case 2:l=this.sessionReplay.getSessionReplayProperties(),e.event_properties=t(t({},e.event_properties),l),d.label=3;case 3:return[3,8];case 4:return(s=null===(n=this.config)||void 0===n?void 0:n.sessionId)&&s!==this.sessionReplay.getSessionId()?[4,this.sessionReplay.setSessionId(s).promise]:[3,6];case 5:d.sent(),d.label=6;case 6:return s&&s===e.session_id?(a=void 0,e.event_type===r.IDENTIFY&&(a=KS(e)),u=G(),[4,this.sessionReplay.evaluateTargetingAndCapture({event:e,userProperties:a,page:null!=(null===(i=null==u?void 0:u.location)||void 0===i?void 0:i.href)?{url:u.location.href}:void 0})]):[3,8];case 7:d.sent(),l=this.sessionReplay.getSessionReplayProperties(),e.event_properties=t(t({},e.event_properties),l),d.label=8;case 8:return e.event_type===r.IDENTIFY&&e.event_properties&&delete e.event_properties[$S],[2,Promise.resolve(e)];case 9:return c=d.sent(),null===(o=this.config)||void 0===o||o.loggerProvider.error("Session Replay: Failed to enrich event due to ".concat(c.message)),[2,Promise.resolve(e)];case 10:return[2]}})})},e.prototype.teardown=function(){var e;return Ft(this,void 0,void 0,function(){return Bt(this,function(t){try{this.sessionReplay.shutdown(),this.config=null}catch(t){null===(e=this.config)||void 0===e||e.loggerProvider.error("Session Replay: teardown failed due to ".concat(t.message))}return[2]})})},e.prototype.getSessionReplayProperties=function(){return this.sessionReplay.getSessionReplayProperties()},e.pluginName="@amplitude/plugin-session-replay-browser",e}(),YS=function(e){return new QS(e)}}}),ck={};rl(ck,{SessionReplayPlugin:function(){return QS},plugin:function(){return YS},sessionReplayPlugin:function(){return YS}});var dk,fk,hk,pk,vk,gk,yk,mk,bk,wk,_k,Sk,kk,xk,Ek,Ck,Ik,Ok,Tk,Ak,Rk,Pk,Mk,Nk,Lk,jk,Dk,Uk,Fk,Bk,qk,zk,Vk,Wk,Hk,Gk,Kk,Jk,$k,Qk,Yk,Xk,Zk,ex,tx,nx,rx,ix,ox,sx,ax,ux,lx,cx,dx,fx,hx,px,vx,gx,yx,mx,bx,wx,_x,Sx,kx,xx,Ex,Cx,Ix,Ox,Tx,Ax,Rx,Px,Mx,Nx,Lx,jx,Dx,Ux,Fx,Bx,qx,zx,Vx,Wx,Hx,Gx,Kx,Jx,$x,Qx,Yx,Xx,Zx,eE,tE,nE,rE,iE,oE,sE,aE,uE,lE,cE,dE,fE,hE,pE,vE,gE,yE,mE,bE=tl({"../../../../node_modules/@amplitude/plugin-session-replay-browser/lib/esm/index.js":function(){lk()}}),wE=tl({"../../../../node_modules/@amplitude/experiment-core/dist/experiment-core.esm.js":function(){var e;dk=function(e,t){return(dk=Object.setPrototypeOf||_instanceof({__proto__:[]},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)},fk=function(){return fk=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},fk.apply(this,arguments)},hk={IS:"is",IS_NOT:"is not",CONTAINS:"contains",DOES_NOT_CONTAIN:"does not contain",LESS_THAN:"less",LESS_THAN_EQUALS:"less or equal",GREATER_THAN:"greater",GREATER_THAN_EQUALS:"greater or equal",VERSION_LESS_THAN:"version less",VERSION_LESS_THAN_EQUALS:"version less or equal",VERSION_GREATER_THAN:"version greater",VERSION_GREATER_THAN_EQUALS:"version greater or equal",SET_IS:"set is",SET_IS_NOT:"set is not",SET_CONTAINS:"set contains",SET_DOES_NOT_CONTAIN:"set does not contain",SET_CONTAINS_ANY:"set contains any",SET_DOES_NOT_CONTAIN_ANY:"set does not contain any",REGEX_MATCH:"regex match",REGEX_DOES_NOT_MATCH:"regex does not match"},pk=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296==(64512&i)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return Uint8Array.from(t)},vk=-862048943,gk=461845907,yk=function(e,t){void 0===t&&(t=0);for(var n=pk(e),r=n.length,i=r>>2,o=t,s=0;s<i;s++){var a=_k(n,s<<2);o=mk(a,o)}var u=i<<2,l=0;switch(r-u){case 3:l^=n[u+2]<<16,l^=n[u+1]<<8,l^=n[u],l=Math.imul(l,vk),l=wk(l,15),o^=l=Math.imul(l,gk);break;case 2:l^=n[u+1]<<8,l^=n[u],l=Math.imul(l,vk),l=wk(l,15),o^=l=Math.imul(l,gk);break;case 1:l^=n[u],l=Math.imul(l,vk),l=wk(l,15),o^=l=Math.imul(l,gk)}return bk(o^=r)>>>0},mk=function(e,t){var n=e,r=t;return n=Math.imul(n,vk),n=wk(n,15),n=Math.imul(n,gk),r=wk(r^=n,13),(r=Math.imul(r,5))+-430675100|0},bk=function(e){var t=e;return t^=t>>>16,t=Math.imul(t,-2048144789),t^=t>>>13,t=Math.imul(t,-1028477387),t^=t>>>16},wk=function(e,t,n){return void 0===n&&(n=32),t>n&&(t%=n),(e<<t|(e&4294967295<<n-t>>>0)>>>0>>>n-t>>>0)>>>0},_k=function(e,t){void 0===t&&(t=0);var n=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return Sk(n)},Sk=function(e){return(-16777216&e)>>>24|(16711680&e)>>>8|(65280&e)<<8|(255&e)<<24},kk=function(e,t){var n,r;if(t&&0!==t.length){try{for(var i=La(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!s||!e||"object"!==(void 0===e?"undefined":_type_of(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 null==e?void 0:e}},xk="^".concat("(\\d+)\\.(\\d+)","(\\.").concat("(\\d+)").concat("(-(([-\\w]+\\.?)*))?",")?$"),Ek=function(){function e(e,t,n,r){void 0===r&&(r=void 0),this.major=e,this.minor=t,this.patch=n,this.preRelease=r}return e.parse=function(t){if(t){var n=new RegExp(xk).exec(t);if(n){var r=Number(n[1]),i=Number(n[2]);if(!isNaN(r)&&!isNaN(i))return new e(r,i,Number(n[4])||0,n[5]||void 0)}}},e.prototype.compareTo=function(e){return this.major>e.major?1:this.major<e.major?-1:this.minor>e.minor?1:this.minor<e.minor?-1:this.patch>e.patch?1:this.patch<e.patch||this.preRelease&&!e.preRelease?-1:!this.preRelease&&e.preRelease?1:this.preRelease&&e.preRelease?this.preRelease>e.preRelease?1:this.preRelease<e.preRelease?-1:0:0},e}(),Ck=function(){function e(){}return e.prototype.evaluate=function(e,t){var n,r,i={},o={context:e,result:i};try{for(var s=La(t),a=s.next();!a.done;a=s.next()){var u=a.value,l=this.evaluateFlag(o,u);l&&(i[u.key]=l)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i},e.prototype.evaluateWithTraces=function(e,t){var n,r,i={},o={},s={context:e,result:i};try{for(var a=La(t),u=a.next();!u.done;u=a.next()){var l=u.value,c=this.evaluateFlagWithTrace(s,l),d=c.variant,f=c.trace;d&&(i[l.key]=d),o[l.key]=f}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return{results:i,traces:o}},e.prototype.evaluateFlag=function(e,t){var n,r,i;try{for(var o=La(t.segments),s=o.next();!s.done;s=o.next()){var a=s.value;if(i=this.evaluateSegment(e,t,a)){var u=fk(fk(fk({},t.metadata),a.metadata),i.metadata);i=fk(fk({},i),{metadata:u});break}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},e.prototype.evaluateFlagWithTrace=function(e,t){var n,r,i,o,s,a,u,l,c,d,f,h=[];try{for(var p=La(t.segments),v=p.next();!v.done;v=p.next()){var g=v.value;if(g.conditions){var y=[],m=!1;try{for(var b=(i=void 0,La(g.conditions)),w=b.next();!w.done;w=b.next()){var _=w.value,S=!0,k=[];try{for(var x=(s=void 0,La(_)),E=x.next();!E.done;E=x.next()){var C=E.value,I=kk(e,C.selector),O=this.matchCondition(e,C);if(k.push({propValue:I,condition:C,matched:O}),!O){S=!1;break}}}catch(e){s={error:e}}finally{try{E&&!E.done&&(a=x.return)&&a.call(x)}finally{if(s)throw s.error}}if(y.push(k),S){m=!0;break}}}catch(e){i={error:e}}finally{try{w&&!w.done&&(o=b.return)&&o.call(b)}finally{if(i)throw i.error}}var T=!1,A=void 0;m&&(T=void 0!==(A=this.bucket(e,g))),h.push({segmentMetadata:g.metadata,conditionsPassed:m,bucketed:T,bucketVariant:A,conditionResult:y,matched:m&&T}),m&&void 0!==A&&!c&&(c=t.variants[A],d=g,f=null===(l=g.metadata)||void 0===l?void 0:l.segmentName)}else{var R=this.bucket(e,g),P=void 0!==R;h.push({segmentMetadata:g.metadata,conditionsPassed:!0,bucketed:P,bucketVariant:R,conditionResult:void 0,matched:P}),c||void 0===R||(c=t.variants[R],d=g,f=null===(u=g.metadata)||void 0===u?void 0:u.segmentName)}}}catch(e){n={error:e}}finally{try{v&&!v.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}if(c&&d){var M=fk(fk(fk({},t.metadata),d.metadata),c.metadata);c=fk(fk({},c),{metadata:M})}return{variant:c,trace:{flagKey:t.key,matched:void 0!==c,matchedSegment:f,steps:h}}},e.prototype.evaluateSegment=function(e,t,n){var r;return n.conditions?this.evaluateConditions(e,n.conditions)&&void 0!==(r=this.bucket(e,n))?t.variants[r]:void 0:void 0!==(r=this.bucket(e,n))?t.variants[r]:void 0},e.prototype.evaluateConditions=function(e,t){var n,r,i,o;try{for(var s=La(t),a=s.next();!a.done;a=s.next()){var u=a.value,l=!0;try{for(var c=(i=void 0,La(u)),d=c.next();!d.done;d=c.next()){var f=d.value;if(!(l=this.matchCondition(e,f)))break}}catch(e){i={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(i)throw i.error}}if(l)return!0}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return!1},e.prototype.matchCondition=function(e,t){var n=kk(e,t.selector);if(null==n)return this.matchNull(t.op,t.values);var r=this.coerceStringArray(n);if(this.isSetOperator(t.op))return!!r&&this.matchSet(r,t.op,t.values);if(r)return this.matchStringsNonSet(r,t.op,t.values);var i=this.coerceString(n);return void 0!==i&&this.matchString(i,t.op,t.values)},e.prototype.getHash=function(e){return yk(e)},e.prototype.bucket=function(e,t){var n,r,i,o;if(!t.bucket)return t.variant;var s=this.coerceString(kk(e,t.bucket.selector));if(!s||0===s.length)return t.variant;var a="".concat(t.bucket.salt,"/").concat(s),u=this.getHash(a),l=u%100,c=Math.floor(u/100);try{for(var d=La(t.bucket.allocations),f=d.next();!f.done;f=d.next()){var h=f.value,p=h.range[0],v=h.range[1];if(l>=p&&l<v)try{for(var g=(i=void 0,La(h.distributions)),y=g.next();!y.done;y=g.next()){var m=y.value,b=m.range[0],w=m.range[1];if(c>=b&&c<w)return m.variant}}catch(e){i={error:e}}finally{try{y&&!y.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}return t.variant},e.prototype.matchNull=function(e,t){var n=this.containsNone(t);switch(e){case hk.IS:case hk.CONTAINS:case hk.LESS_THAN:case hk.LESS_THAN_EQUALS:case hk.GREATER_THAN:case hk.GREATER_THAN_EQUALS:case hk.VERSION_LESS_THAN:case hk.VERSION_LESS_THAN_EQUALS:case hk.VERSION_GREATER_THAN:case hk.VERSION_GREATER_THAN_EQUALS:case hk.SET_IS:case hk.SET_CONTAINS:case hk.SET_CONTAINS_ANY:return n;case hk.IS_NOT:case hk.DOES_NOT_CONTAIN:case hk.SET_DOES_NOT_CONTAIN:case hk.SET_DOES_NOT_CONTAIN_ANY:return!n;default:return!1}},e.prototype.matchSet=function(e,t,n){switch(t){case hk.SET_IS:return this.setEquals(e,n);case hk.SET_IS_NOT:return!this.setEquals(e,n);case hk.SET_CONTAINS:return this.matchesSetContainsAll(e,n);case hk.SET_DOES_NOT_CONTAIN:return!this.matchesSetContainsAll(e,n);case hk.SET_CONTAINS_ANY:return this.matchesSetContainsAny(e,n);case hk.SET_DOES_NOT_CONTAIN_ANY:return!this.matchesSetContainsAny(e,n);default:return!1}},e.prototype.matchString=function(e,t,n){var r=this;switch(t){case hk.IS:return this.matchesIs(e,n);case hk.IS_NOT:return!this.matchesIs(e,n);case hk.CONTAINS:return this.matchesContains(e,n);case hk.DOES_NOT_CONTAIN:return!this.matchesContains(e,n);case hk.LESS_THAN:case hk.LESS_THAN_EQUALS:case hk.GREATER_THAN:case hk.GREATER_THAN_EQUALS:return this.matchesComparable(e,t,n,function(e){return r.parseNumber(e)},this.comparator);case hk.VERSION_LESS_THAN:case hk.VERSION_LESS_THAN_EQUALS:case hk.VERSION_GREATER_THAN:case hk.VERSION_GREATER_THAN_EQUALS:return this.matchesComparable(e,t,n,function(e){return Ek.parse(e)},this.versionComparator);case hk.REGEX_MATCH:return this.matchesRegex(e,n);case hk.REGEX_DOES_NOT_MATCH:return!this.matchesRegex(e,n);default:return!1}},e.prototype.matchStringsNonSet=function(e,t,n){var r=this;return e.some(function(e){return r.matchString(e,t,n)})},e.prototype.matchesIs=function(e,t){if(this.containsBooleans(t)){var n=e.toLowerCase();if("true"===n||"false"===n)return t.some(function(e){return e.toLowerCase()===n})}return t.some(function(t){return e===t})},e.prototype.matchesContains=function(e,t){var n,r;try{for(var i=La(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(e.toLowerCase().includes(s.toLowerCase()))return!0}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1},e.prototype.matchesComparable=function(e,t,n,r,i){var o=this,s=r(e),a=n.map(function(e){return r(e)}).filter(function(e){return void 0!==e});return void 0===s||0===a.length?n.some(function(n){return o.comparator(e,t,n)}):a.some(function(e){return i(s,t,e)})},e.prototype.comparator=function(e,t,n){switch(t){case hk.LESS_THAN:case hk.VERSION_LESS_THAN:return e<n;case hk.LESS_THAN_EQUALS:case hk.VERSION_LESS_THAN_EQUALS:return e<=n;case hk.GREATER_THAN:case hk.VERSION_GREATER_THAN:return e>n;case hk.GREATER_THAN_EQUALS:case hk.VERSION_GREATER_THAN_EQUALS:return e>=n;default:return!1}},e.prototype.versionComparator=function(e,t,n){var r=e.compareTo(n);switch(t){case hk.LESS_THAN:case hk.VERSION_LESS_THAN:return r<0;case hk.LESS_THAN_EQUALS:case hk.VERSION_LESS_THAN_EQUALS:return r<=0;case hk.GREATER_THAN:case hk.VERSION_GREATER_THAN:return r>0;case hk.GREATER_THAN_EQUALS:case hk.VERSION_GREATER_THAN_EQUALS:return r>=0;default:return!1}},e.prototype.matchesRegex=function(e,t){return t.some(function(t){return Boolean(new RegExp(t).exec(e))})},e.prototype.containsNone=function(e){return e.some(function(e){return"(none)"===e})},e.prototype.containsBooleans=function(e){return e.some(function(e){switch(e.toLowerCase()){case"true":case"false":return!0;default:return!1}})},e.prototype.parseNumber=function(e){var t;return null!==(t=Number(e))&&void 0!==t?t:void 0},e.prototype.coerceString=function(e){if(null!=e)return"object"===(void 0===e?"undefined":_type_of(e))?JSON.stringify(e):String(e)},e.prototype.coerceStringArray=function(e){var t=this;if(Array.isArray(e))return e.map(function(e){return t.coerceString(e)}).filter(Boolean);var n=String(e);if(n.startsWith("["))try{var r=JSON.parse(n);return Array.isArray(r)?r.map(function(e){return t.coerceString(e)}).filter(Boolean):void 0}catch(e){return}},e.prototype.isSetOperator=function(e){switch(e){case hk.SET_IS:case hk.SET_IS_NOT:case hk.SET_CONTAINS:case hk.SET_DOES_NOT_CONTAIN:case hk.SET_CONTAINS_ANY:case hk.SET_DOES_NOT_CONTAIN_ANY:return!0;default:return!1}},e.prototype.setEquals=function(e,t){var n=new Set(e),r=new Set(t);return n.size===r.size&&Da([],ja(r),!1).every(function(e){return n.has(e)})},e.prototype.matchesSetContainsAll=function(e,t){var n,r;if(e.length<t.length)return!1;try{for(var i=La(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!this.matchesIs(s,e))return!1}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0},e.prototype.matchesSetContainsAny=function(e,t){var n,r;try{for(var i=La(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(this.matchesIs(s,e))return!0}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1},e}(),Ik=function(e,t){var n,r,i=fk({},e),o=[],s=t||Object.keys(i);try{for(var a=La(s),u=a.next();!u.done;u=a.next()){var l=u.value,c=Ok(l,i);c&&o.push.apply(o,Da([],ja(c),!1))}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},Ok=function(e,t,n){var r,i;void 0===n&&(n=[]);var o=t[e];if(o){if(!o.dependencies||0===o.dependencies.length)return delete t[o.key],[o];n.push(o.key);var s=[],a=function(e){if(n.some(function(t){return t===e}))throw Error("Detected a cycle between flags ".concat(n));var r=Ok(e,t,n);r&&s.push.apply(s,Da([],ja(r),!1))};try{for(var u=La(o.dependencies),l=u.next();!l.done;l=u.next()){a(l.value)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return s.push(o),n.pop(),delete t[o.key],s}},Ak=Tk="3.7.8",Rk="function"==typeof Buffer,Pk="function"==typeof TextDecoder?new TextDecoder:void 0,Mk="function"==typeof TextEncoder?new TextEncoder:void 0,Nk=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),e={},Nk.forEach(function(t,n){return e[t]=n}),Lk=e,jk=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Dk=String.fromCharCode.bind(String),Uk="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(e){return new Uint8Array(Array.prototype.slice.call(e,0))},Fk=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,function(e){return"+"==e?"-":"_"})},Bk=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},qk=function(e){for(var t,n,r,i,o="",s=e.length%3,a=0;a<e.length;){if((n=e.charCodeAt(a++))>255||(r=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");o+=Nk[(t=n<<16|r<<8|i)>>18&63]+Nk[t>>12&63]+Nk[t>>6&63]+Nk[63&t]}return s?o.slice(0,s-3)+"===".substring(s):o},zk="function"==typeof btoa?function(e){return btoa(e)}:Rk?function(e){return Buffer.from(e,"binary").toString("base64")}:qk,Vk=Rk?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],n=0,r=e.length;n<r;n+=4096)t.push(Dk.apply(null,e.subarray(n,n+4096)));return zk(t.join(""))},Wk=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?Fk(Vk(e)):Vk(e)},Hk=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?Dk(192|t>>>6)+Dk(128|63&t):Dk(224|t>>>12&15)+Dk(128|t>>>6&63)+Dk(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return Dk(240|t>>>18&7)+Dk(128|t>>>12&63)+Dk(128|t>>>6&63)+Dk(128|63&t)},Gk=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Kk=function(e){return e.replace(Gk,Hk)},Jk=Rk?function(e){return Buffer.from(e,"utf8").toString("base64")}:Mk?function(e){return Vk(Mk.encode(e))}:function(e){return zk(Kk(e))},$k=function(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?Fk(Jk(e)):Jk(e)},Qk=function(e){return $k(e,!0)},Yk=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Xk=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return Dk((t>>>10)+55296)+Dk(56320+(1023&t));case 3:return Dk((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return Dk((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},Zk=function(e){return e.replace(Yk,Xk)},ex=function(e){if(e=e.replace(/\s+/g,""),!jk.test(e))throw new TypeError("malformed base64.");var t,n,r;e+="==".slice(2-(3&e.length));for(var i=[],o=0;o<e.length;)t=Lk[e.charAt(o++)]<<18|Lk[e.charAt(o++)]<<12|(n=Lk[e.charAt(o++)])<<6|(r=Lk[e.charAt(o++)]),64===n?i.push(Dk(t>>16&255)):64===r?i.push(Dk(t>>16&255,t>>8&255)):i.push(Dk(t>>16&255,t>>8&255,255&t));return i.join("")},tx="function"==typeof atob?function(e){return atob(Bk(e))}:Rk?function(e){return Buffer.from(e,"base64").toString("binary")}:ex,nx=Rk?function(e){return Uk(Buffer.from(e,"base64"))}:function(e){return Uk(tx(e).split("").map(function(e){return e.charCodeAt(0)}))},rx=function(e){return nx(ox(e))},ix=Rk?function(e){return Buffer.from(e,"base64").toString("utf8")}:Pk?function(e){return Pk.decode(nx(e))}:function(e){return Zk(tx(e))},ox=function(e){return Bk(e.replace(/[-_]/g,function(e){return"-"==e?"+":"/"}))},ax=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},ux=function(){var e=function(e,t){return Object.defineProperty(String.prototype,e,ax(t))};e("fromBase64",function(){return sx(this)}),e("toBase64",function(e){return $k(this,e)}),e("toBase64URI",function(){return $k(this,!0)}),e("toBase64URL",function(){return $k(this,!0)}),e("toUint8Array",function(){return rx(this)})},lx=function(){var e=function(e,t){return Object.defineProperty(Uint8Array.prototype,e,ax(t))};e("toBase64",function(e){return Wk(this,e)}),e("toBase64URI",function(){return Wk(this,!0)}),e("toBase64URL",function(){return Wk(this,!0)})},cx=function(){ux(),lx()},dx={version:Tk,VERSION:Ak,atob:tx,atobPolyfill:ex,btoa:zk,btoaPolyfill:qk,fromBase64:sx=function(e){return ix(ox(e))},toBase64:$k,encode:$k,encodeURI:Qk,encodeURL:Qk,utob:Kk,btou:Zk,decode:sx,isValid:function(e){if("string"!=typeof e)return!1;var t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:Wk,toUint8Array:rx,extendString:ux,extendUint8Array:lx,extendBuiltins:cx},fx=function(e){function t(n,r){var i=e.call(this,r)||this;return i.statusCode=n,Object.setPrototypeOf(i,t.prototype),i}return Pa(t,e),t}(Error),hx=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return Pa(t,e),t}(Error),px=function(){function e(e,t,n){this.deploymentKey=e,this.serverUrl=t,this.httpClient=n}return e.prototype.getVariants=function(e,t){return Ma(this,void 0,void 0,function(){var n,r,i,o;return Na(this,function(s){switch(s.label){case 0:return n=dx.encodeURL(JSON.stringify(e)),r={Authorization:"Api-Key ".concat(this.deploymentKey),"X-Amp-Exp-User":n},(null==t?void 0:t.flagKeys)&&(r["X-Amp-Exp-Flag-Keys"]=dx.encodeURL(JSON.stringify(t.flagKeys))),(null==t?void 0:t.trackingOption)&&(r["X-Amp-Exp-Track"]=t.trackingOption),(null==t?void 0:t.exposureTrackingOption)&&(r["X-Amp-Exp-Exposure-Track"]=t.exposureTrackingOption),i=new URL("".concat(this.serverUrl,"/sdk/v2/vardata?v=0")),(null==t?void 0:t.evaluationMode)&&i.searchParams.append("eval_mode",null==t?void 0:t.evaluationMode),(null==t?void 0:t.deliveryMethod)&&i.searchParams.append("delivery_method",null==t?void 0:t.deliveryMethod),[4,this.httpClient.request({requestUrl:i.toString(),method:"GET",headers:r,timeoutMillis:null==t?void 0:t.timeoutMillis})];case 1:if(200!=(o=s.sent()).status)throw new fx(o.status,"Fetch error response: status=".concat(o.status));return[2,JSON.parse(o.body)]}})})},e}(),vx=function(){function e(e,t,n){this.deploymentKey=e,this.serverUrl=t,this.httpClient=n}return e.prototype.getFlags=function(e){return Ma(this,void 0,void 0,function(){var t,n;return Na(this,function(r){switch(r.label){case 0:return t={Authorization:"Api-Key ".concat(this.deploymentKey)},(null==e?void 0:e.libraryName)&&(null==e?void 0:e.libraryVersion)&&(t["X-Amp-Exp-Library"]="".concat(e.libraryName,"/").concat(e.libraryVersion)),(null==e?void 0:e.user)&&(t["X-Amp-Exp-User"]=dx.encodeURL(JSON.stringify(e.user))),[4,this.httpClient.request({requestUrl:"".concat(this.serverUrl,"/sdk/v2/flags")+((null==e?void 0:e.deliveryMethod)?"?delivery_method=".concat(e.deliveryMethod):""),method:"GET",headers:t,timeoutMillis:null==e?void 0:e.timeoutMillis})];case 1:if(200!=(n=r.sent()).status)throw Error("Flags error response: status=".concat(n.status));return[2,JSON.parse(n.body).reduce(function(e,t){return e[t.key]=t,e},{})]}})})},e}(),gx="undefined"!=typeof globalThis?globalThis:global||self,yx=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},mx=function(){var e=yx();if(e)try{var t="EXP_test";return e.localStorage.setItem(t,t),e.localStorage.removeItem(t),!0}catch(e){return!1}return!1},bx=function(){function e(e,t){this.poller=void 0,this.action=e,this.ms=t}return e.prototype.start=function(){this.poller||(this.poller=gx.setInterval(this.action,this.ms),this.action())},e.prototype.stop=function(){this.poller&&(gx.clearInterval(this.poller),this.poller=void 0)},e}()}}),_E=nl({"../../../../node_modules/@amplitude/ua-parser-js/src/ua-parser.js":function(e,t){!function(n,r){var i="function",o="undefined",s="object",a="string",u="model",l="name",c="type",d="vendor",f="version",h="architecture",p="console",v="mobile",g="tablet",y="smarttv",m="wearable",b="embedded",w="Amazon",_="Apple",S="ASUS",k="BlackBerry",x="Browser",E="Chrome",C="Firefox",I="Google",O="Huawei",T="LG",A="Microsoft",R="Motorola",P="Opera",M="Samsung",N="Sharp",L="Sony",j="Xiaomi",D="Zebra",U="Facebook",F=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},B=function(e,t){return(void 0===e?"undefined":_type_of(e))===a&&-1!==q(t).indexOf(q(e))},q=function(e){return e.toLowerCase()},z=function(e,t){if((void 0===e?"undefined":_type_of(e))===a)return e=e.replace(/^\s\s*/,""),(void 0===t?"undefined":_type_of(t))===o?e:e.substring(0,350)},V=function(e,t){for(var n,o,a,u,l,c,d=0;d<t.length&&!l;){var f=t[d],h=t[d+1];for(n=o=0;n<f.length&&!l;)if(l=f[n++].exec(e))for(a=0;a<h.length;a++)c=l[++o],(void 0===(u=h[a])?"undefined":_type_of(u))===s&&u.length>0?2===u.length?_type_of(u[1])==i?this[u[0]]=u[1].call(this,c):this[u[0]]=u[1]:3===u.length?_type_of(u[1])!==i||u[1].exec&&u[1].test?this[u[0]]=c?c.replace(u[1],u[2]):r:this[u[0]]=c?u[1].call(this,c,u[2]):r:4===u.length&&(this[u[0]]=c?u[3].call(this,c.replace(u[1],u[2])):r):this[u]=c||r;d+=2}},W=function(e,t){for(var n in t)if(_type_of(t[n])===s&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(B(t[n][i],e))return"?"===n?r:n}else if(B(t[n],e))return"?"===n?r:n;return e},H={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},G={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,f],[/opios[\/ ]+([\w\.]+)/i],[f,[l,P+" Mini"]],[/\bopr\/([\w\.]+)/i],[f,[l,P]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[l,f],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[l,"UC"+x]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[f,[l,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[f,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[l,"IE"]],[/yabrowser\/([\w\.]+)/i],[f,[l,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+x],f],[/\bfocus\/([\w\.]+)/i],[f,[l,C+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[l,P+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[l,P+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[l,"MIUI "+x]],[/fxios\/([-\w\.]+)/i],[f,[l,C]],[/\bqihu|(qi?ho?o?|360)browser/i],[[l,"360 "+x]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1 "+x],f],[/(comodo_dragon)\/([\w\.]+)/i],[[l,/_/g," "],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[l,f],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,U],f],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[l,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[l,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[l,E+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,E+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[l,"Android "+x]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[f,W,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[l,C+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[l,f],[/(cobalt)\/([\w\.]+)/i],[l,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[h,"amd64"]],[/(ia32(?=;))/i],[[h,q]],[/((?:i[346]|x)86)[;\)]/i],[[h,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[h,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[h,"armhf"]],[/windows (ce|mobile); ppc;/i],[[h,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[h,/ower/,"",q]],[/(sun4\w)[;\)]/i],[[h,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[h,q]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[d,M],[c,g]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[d,M],[c,v]],[/((ipod|iphone)\d+,\d+)/i],[u,[d,_],[c,v]],[/(ipad\d+,\d+)/i],[u,[d,_],[c,g]],[/\((ip(?:hone|od)[\w ]*);/i],[u,[d,_],[c,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[d,_],[c,g]],[/(macintosh);/i],[u,[d,_]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[d,O],[c,g]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[d,O],[c,v]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[d,j],[c,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[d,j],[c,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[d,"OPPO"],[c,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[d,"Vivo"],[c,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[u,[d,"Realme"],[c,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[d,R],[c,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[d,R],[c,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[d,T],[c,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[d,T],[c,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[d,"Lenovo"],[c,g]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[d,"Nokia"],[c,v]],[/(pixel c)\b/i],[u,[d,I],[c,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[d,I],[c,v]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[d,L],[c,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[d,L],[c,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[d,"OnePlus"],[c,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[d,w],[c,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[d,w],[c,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,d,[c,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[d,k],[c,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[d,S],[c,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[d,S],[c,v]],[/(nexus 9)/i],[u,[d,"HTC"],[c,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[u,/_/g," "],[c,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[d,"Acer"],[c,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[d,"Meizu"],[c,v]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[d,N],[c,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d,u,[c,v]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d,u,[c,g]],[/(surface duo)/i],[u,[d,A],[c,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[d,"Fairphone"],[c,v]],[/(u304aa)/i],[u,[d,"AT&T"],[c,v]],[/\bsie-(\w*)/i],[u,[d,"Siemens"],[c,v]],[/\b(rct\w+) b/i],[u,[d,"RCA"],[c,g]],[/\b(venue[\d ]{2,7}) b/i],[u,[d,"Dell"],[c,g]],[/\b(q(?:mv|ta)\w+) b/i],[u,[d,"Verizon"],[c,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[d,"Barnes & Noble"],[c,g]],[/\b(tm\d{3}\w+) b/i],[u,[d,"NuVision"],[c,g]],[/\b(k88) b/i],[u,[d,"ZTE"],[c,g]],[/\b(nx\d{3}j) b/i],[u,[d,"ZTE"],[c,v]],[/\b(gen\d{3}) b.+49h/i],[u,[d,"Swiss"],[c,v]],[/\b(zur\d{3}) b/i],[u,[d,"Swiss"],[c,g]],[/\b((zeki)?tb.*\b) b/i],[u,[d,"Zeki"],[c,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],u,[c,g]],[/\b(ns-?\w{0,9}) b/i],[u,[d,"Insignia"],[c,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[d,"NextBook"],[c,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],u,[c,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],u,[c,v]],[/\b(ph-1) /i],[u,[d,"Essential"],[c,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[d,"Envizen"],[c,g]],[/\b(trio[-\w\. ]+) b/i],[u,[d,"MachSpeed"],[c,g]],[/\btu_(1491) b/i],[u,[d,"Rotor"],[c,g]],[/(shield[\w ]+) b/i],[u,[d,"Nvidia"],[c,g]],[/(sprint) (\w+)/i],[d,u,[c,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[d,A],[c,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[d,D],[c,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[d,D],[c,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,u,[c,p]],[/droid.+; (shield) bui/i],[u,[d,"Nvidia"],[c,p]],[/(playstation [345portablevi]+)/i],[u,[d,L],[c,p]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[d,A],[c,p]],[/smart-tv.+(samsung)/i],[d,[c,y]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[d,M],[c,y]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,T],[c,y]],[/(apple) ?tv/i],[d,[u,_+" TV"],[c,y]],[/crkey/i],[[u,E+"cast"],[d,I],[c,y]],[/droid.+aft(\w)( bui|\))/i],[u,[d,w],[c,y]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[d,N],[c,y]],[/(bravia[\w ]+)( bui|\))/i],[u,[d,L],[c,y]],[/(mitv-\w{5}) bui/i],[u,[d,j],[c,y]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[d,z],[u,z],[c,y]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[c,y]],[/((pebble))app/i],[d,u,[c,m]],[/droid.+; (glass) \d/i],[u,[d,I],[c,m]],[/droid.+; (wt63?0{2,3})\)/i],[u,[d,D],[c,m]],[/(quest( 2)?)/i],[u,[d,U],[c,m]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[c,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[u,[c,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[c,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[c,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[c,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[l,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[l,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[l,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,f],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[l,[f,W,H]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[l,"Windows"],[f,W,H]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,"Mac OS"],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,l],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[l,f],[/\(bb(10);/i],[f,[l,k]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[l,C+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[l,"webOS"]],[/crkey\/([\d\.]+)/i],[f,[l,E+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[l,"Chromium OS"],f],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[l,f],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[l,f]]},K=function(e,t){if((void 0===e?"undefined":_type_of(e))===s&&(t=e,e=r),!_instanceof(this,K))return new K(e,t).getResult();var i=e||((void 0===n?"undefined":_type_of(n))!==o&&n.navigator&&n.navigator.userAgent?n.navigator.userAgent:""),p=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(G,t):G;return this.getBrowser=function(){var e,t={};return t[l]=r,t[f]=r,V.call(t,i,p.browser),t.major=(void 0===(e=t.version)?"undefined":_type_of(e))===a?e.replace(/[^\d\.]/g,"").split(".")[0]:r,t},this.getCPU=function(){var e={};return e[h]=r,V.call(e,i,p.cpu),e},this.getDevice=function(){var e={};return e[d]=r,e[u]=r,e[c]=r,V.call(e,i,p.device),e},this.getEngine=function(){var e={};return e[l]=r,e[f]=r,V.call(e,i,p.engine),e},this.getOS=function(){var e={};return e[l]=r,e[f]=r,V.call(e,i,p.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return i},this.setUA=function(e){return i=(void 0===e?"undefined":_type_of(e))===a&&e.length>350?z(e,350):e,this},this.setUA(i),this};K.VERSION="0.7.33",K.BROWSER=F([l,f,"major"]),K.CPU=F([h]),K.DEVICE=F([u,d,c,p,v,y,g,m,b]),K.ENGINE=K.OS=F([l,f]),(void 0===e?"undefined":_type_of(e))!==o?((void 0===t?"undefined":_type_of(t))!==o&&t.exports&&(e=t.exports=K),e.UAParser=K):("undefined"==typeof define?"undefined":_type_of(define))===i&&define.amd?define(function(){return K}):(void 0===n?"undefined":_type_of(n))!==o&&(n.UAParser=K);var J=(void 0===n?"undefined":_type_of(n))!==o&&(n.jQuery||n.Zepto);if(J&&!J.ua){var $=new K;J.ua=$.getResult(),J.ua.get=function(){return $.getUA()},J.ua.set=function(e){$.setUA(e);var t=$.getResult();for(var n in t)J.ua[n]=t[n]}}}("object"===("undefined"==typeof window?"undefined":_type_of(window))?window:e)}}),SE=tl({"../../../../node_modules/@amplitude/experiment-js-client/dist/experiment.esm.js":function(){var e,t,n;wE(),Tl(),wx=ol(_E()),function(){function e(e){this.amplitudeInstance=e}return e.prototype.getUser=function(){var e,t,n,r,i,o,s,a,u,l;return{device_id:null===(t=null===(e=this.amplitudeInstance)||void 0===e?void 0:e.options)||void 0===t?void 0:t.deviceId,user_id:null===(r=null===(n=this.amplitudeInstance)||void 0===n?void 0:n.options)||void 0===r?void 0:r.userId,version:null===(o=null===(i=this.amplitudeInstance)||void 0===i?void 0:i.options)||void 0===o?void 0:o.versionName,language:null===(a=null===(s=this.amplitudeInstance)||void 0===s?void 0:s.options)||void 0===a?void 0:a.language,platform:null===(l=null===(u=this.amplitudeInstance)||void 0===u?void 0:u.options)||void 0===l?void 0:l.platform,os:this.getOs(),device_model:this.getDeviceModel()}},e.prototype.getOs=function(){var e,t,n,r,i,o;return[null===(n=null===(t=null===(e=this.amplitudeInstance)||void 0===e?void 0:e._ua)||void 0===t?void 0:t.browser)||void 0===n?void 0:n.name,null===(o=null===(i=null===(r=this.amplitudeInstance)||void 0===r?void 0:r._ua)||void 0===i?void 0:i.browser)||void 0===o?void 0:o.major].filter(function(e){return null!=e}).join(" ")},e.prototype.getDeviceModel=function(){var e,t,n;return null===(n=null===(t=null===(e=this.amplitudeInstance)||void 0===e?void 0:e._ua)||void 0===t?void 0:t.os)||void 0===n?void 0:n.name},e}(),function(){function e(e){this.amplitudeInstance=e}return e.prototype.track=function(e){this.amplitudeInstance.logEvent(e.name,e.properties)},e.prototype.setUserProperty=function(e){var t,n;this.amplitudeInstance.setUserProperties(((t={})[e.userProperty]=null===(n=e.variant)||void 0===n?void 0:n.value,t))},e.prototype.unsetUserProperty=function(e){var t;this.amplitudeInstance._logEvent("$identify",null,null,{$unset:(t={},t[e.userProperty]="-",t)})},e}(),_x=function(){return _x=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},_x.apply(this,arguments)},Sx=function(e,t){var n,r;void 0===t&&(t=!1);var i=Ex(e,t),o=void 0,s=gx.document.cookie.split("; ");try{for(var a=Ba(s),u=a.next();!u.done;u=a.next()){var l=u.value,c=qa(l.split("=",2),2),d=c[0],f=c[1];d===i&&(o=decodeURIComponent(f))}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}if(o)try{if(t){var h=atob(o);return JSON.parse(decodeURIComponent(h))}var p=o.split("."),v=void 0;return p.length>=2&&p[1]&&(v=atob(p[1])),{deviceId:p[0],userId:v}}catch(e){return}},kx=function(e){var t=Ex(e,!0);try{var n=gx.localStorage.getItem(t);if(!n)return;var r=JSON.parse(n);if("object"!==(void 0===r?"undefined":_type_of(r)))return;return r}catch(e){return}},xx=function(e){var t=Ex(e,!0);try{var n=gx.sessionStorage.getItem(t);if(!n)return;var r=JSON.parse(n);if("object"!==(void 0===r?"undefined":_type_of(r)))return;return r}catch(e){return}},Ex=function(e,t){if(t){if((null==e?void 0:e.length)<10)return;return"AMP_".concat(e.substring(0,10))}if(!((null==e?void 0:e.length)<6))return"amp_".concat(e.substring(0,6))},Cx=function(){function e(e,t,n){this.type="integration",this.apiKey=e,this.identityStore=t.identityStore,this.eventBridge=t.eventBridge,this.contextProvider=t.applicationContextProvider,this.timeoutMillis=n,this.loadPersistedState(),n<=0&&(this.setup=void 0)}return e.prototype.setup=function(e,t){return Ua(this,void 0,void 0,function(){return Fa(this,function(n){return(null==e?void 0:e.automaticFetchOnAmplitudeIdentityChange)&&this.identityStore.addIdentityListener(function(){null==t||t.fetch()}),[2,this.waitForConnectorIdentity(this.timeoutMillis)]})})},e.prototype.getUser=function(){var e=this.identityStore.getIdentity();return{user_id:e.userId,device_id:e.deviceId,user_properties:e.userProperties,version:this.contextProvider.versionName}},e.prototype.track=function(e){return!!this.eventBridge.receiver&&(this.eventBridge.logEvent({eventType:e.eventType,eventProperties:e.eventProperties}),!0)},e.prototype.loadPersistedState=function(){if(!this.apiKey||this.apiKey.startsWith("client-"))return!1;var e=Sx(this.apiKey,!0);return(e||(e=Sx(this.apiKey,!1))||(e=kx(this.apiKey))||!!(e=xx(this.apiKey)))&&(this.commitIdentityToConnector(e),!0)},e.prototype.commitIdentityToConnector=function(e){var t=this.identityStore.editIdentity();t.setDeviceId(e.deviceId),e.userId&&t.setUserId(e.userId),t.commit()},e.prototype.waitForConnectorIdentity=function(e){return Ua(this,void 0,void 0,function(){var t,n=this;return Fa(this,function(r){return(t=this.identityStore.getIdentity()).userId||t.deviceId?[2]:[2,Promise.race([new Promise(function(e){var t=function(){e(),n.identityStore.removeIdentityListener(t)};n.identityStore.addIdentityListener(t)}),new Promise(function(t,n){gx.setTimeout(n,e,"Timed out waiting for Amplitude Analytics SDK to initialize.")})])]})})},e}(),Ix=gx.fetch||Va,Ox=function(e,t){return null==t||t<=0?e:new Promise(function(n,r){gx.setTimeout(function(){r(new hx("Request timeout after "+t+" milliseconds"))},t),e.then(n,r)})},Tx=function(e,t,n,r,i){return Ox(Ua(void 0,void 0,void 0,function(){var i,o;return Fa(this,function(s){switch(s.label){case 0:return[4,Ix(e,{method:t,headers:n,body:r})];case 1:return i=s.sent(),o={status:i.status},[4,i.text()];case 2:return o.body=s.sent(),[2,o]}})}),i)},Ax=function(){function e(e){this.client=e}return e.prototype.request=function(e){return Ua(this,void 0,void 0,function(){return Fa(this,function(t){switch(t.label){case 0:return[4,this.client.request(e.requestUrl,e.method,e.headers,null,e.timeoutMillis)];case 1:return[2,t.sent()]}})})},e}(),Rx={request:Tx},(e=Px||(Px={}))[e.Disable=0]="Disable",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Info=3]="Info",e[e.Debug=4]="Debug",e[e.Verbose=5]="Verbose",(t=Mx||(Mx={})).LocalStorage="localStorage",t.InitialVariants="initialVariants",(n=Nx||(Nx={})).LocalStorage="storage",n.InitialVariants="initial",n.SecondaryLocalStorage="secondary-storage",n.SecondaryInitialVariants="secondary-initial",n.FallbackInline="fallback-inline",n.FallbackConfig="fallback-config",n.LocalEvaluation="local-evaluation",Lx=function(e){return!e||e===Nx.FallbackInline||e===Nx.FallbackConfig||e===Nx.SecondaryInitialVariants},jx={debug:!1,logLevel:Px.Error,loggerProvider:null,instanceName:"$default_instance",fallbackVariant:{},initialVariants:{},initialFlags:void 0,source:Mx.LocalStorage,serverUrl:"https://api.lab.amplitude.com",flagsServerUrl:"https://flag.lab.amplitude.com",serverZone:"US",fetchTimeoutMillis:1e4,retryFetchOnFailure:!0,throwOnError:!1,automaticExposureTracking:!0,pollOnStart:!0,flagConfigPollingIntervalMillis:3e5,fetchOnStart:!0,automaticFetchOnAmplitudeIdentityChange:!1,userProvider:null,analyticsProvider:null,exposureTrackingProvider:null,httpClient:Rx},Dx="1.21.1",Ux=function(){function e(e,t){var n,r=this;this.isReady=new Promise(function(e){r.resolve=e}),this.config=e,this.client=t;var i=null!==(n=e.instanceName)&&void 0!==n?n:jx.instanceName;this.queue=new Bx(i),this.cache=new Fx(i)}return e.prototype.ready=function(){return this.integration?this.isReady:Promise.resolve()},e.prototype.setIntegration=function(e){var t=this;this.integration&&this.integration.teardown&&this.integration.teardown(),this.integration=e,e.setup?this.integration.setup(this.config,this.client).then(function(){t.queue.setTracker(t.integration.track.bind(e)),t.resolve()},function(){t.queue.setTracker(t.integration.track.bind(e)),t.resolve()}):(this.queue.setTracker(this.integration.track.bind(e)),this.resolve())},e.prototype.getUser=function(){return this.integration?this.integration.getUser():{}},e.prototype.track=function(e,t){if(this.cache.shouldTrack(e,t)){var n=this.getExposureEvent(e);this.queue.push(n)}},e.prototype.getExposureEvent=function(e){var t,n,r,i={eventType:"$exposure",eventProperties:e};return(null===(t=e.metadata)||void 0===t?void 0:t.exposureEvent)?i={eventType:null===(n=e.metadata)||void 0===n?void 0:n.exposureEvent,eventProperties:e}:"web"===(null===(r=e.metadata)||void 0===r?void 0:r.deliveryMethod)&&(i={eventType:"$impression",eventProperties:e}),i},e}(),Fx=function(){function e(e){this.isSessionStorageAvailable=qx(),this.inMemoryCache={},this.identity={},this.storageKey="EXP_sent_v3_".concat(e),this.isSessionStorageAvailable&&(gx.sessionStorage.removeItem("EXP_sent_".concat(e)),gx.sessionStorage.removeItem("EXP_sent_v2_".concat(e)))}return e.prototype.shouldTrack=function(e,t){var n,r;if("web"===(null===(n=e.metadata)||void 0===n?void 0:n.deliveryMethod))return!0;var i={userId:null==t?void 0:t.user_id,deviceId:null==t?void 0:t.device_id};this.identityEquals(this.identity,i)||this.clearCache(),this.identity=i,this.loadCache();var o=e.flag_key in this.inMemoryCache,s=this.inMemoryCache[e.flag_key],a=null!==(r=e.variant)&&void 0!==r?r:null,u=!1;return o&&(null!=s?s:null)===a||(u=!0,this.inMemoryCache[e.flag_key]=a),this.storeCache(),u},e.prototype.clearCache=function(){this.inMemoryCache={},this.isSessionStorageAvailable&&gx.sessionStorage.removeItem(this.storageKey)},e.prototype.identityEquals=function(e,t){return e.userId&&t.userId?e.userId===t.userId:!e.userId&&!t.userId&&e.deviceId===t.deviceId},e.prototype.loadCache=function(){if(this.isSessionStorageAvailable){var e=gx.sessionStorage.getItem(this.storageKey);this.inMemoryCache=e?JSON.parse(e):{}}},e.prototype.storeCache=function(){if(this.isSessionStorageAvailable)try{gx.sessionStorage.setItem(this.storageKey,JSON.stringify(this.inMemoryCache))}catch(e){}},e}(),Bx=function(){function e(e,t){void 0===t&&(t=512),this.isLocalStorageAvailable=mx(),this.inMemoryQueue=[],this.storageKey="EXP_unsent_".concat(e),this.maxQueueSize=t}return e.prototype.push=function(e){this.loadQueue(),this.inMemoryQueue.push(e),this.flush(),this.storeQueue()},e.prototype.setTracker=function(e){var t=this;this.tracker=e,this.poller=gx.setInterval(function(){t.loadFlushStore()},1e3),this.loadFlushStore()},e.prototype.flush=function(){if(this.tracker&&0!==this.inMemoryQueue.length){for(var e=0;e<this.inMemoryQueue.length;e++)try{if(!this.tracker(this.inMemoryQueue[e]))break}catch(e){break}this.inMemoryQueue=this.inMemoryQueue.slice(e),0===this.inMemoryQueue.length&&this.poller&&(gx.clearInterval(this.poller),this.poller=void 0)}},e.prototype.loadQueue=function(){if(this.isLocalStorageAvailable){var e=gx.localStorage.getItem(this.storageKey);this.inMemoryQueue=e?JSON.parse(e):[]}},e.prototype.storeQueue=function(){this.isLocalStorageAvailable&&(this.inMemoryQueue.length>this.maxQueueSize&&(this.inMemoryQueue=this.inMemoryQueue.slice(this.inMemoryQueue.length-this.maxQueueSize)),gx.localStorage.setItem(this.storageKey,JSON.stringify(this.inMemoryQueue)))},e.prototype.loadFlushStore=function(){this.loadQueue(),this.flush(),this.storeQueue()},e}(),qx=function(){var e=yx();if(e)try{var t="EXP_test";return e.sessionStorage.setItem(t,t),e.sessionStorage.removeItem(t),!0}catch(e){return!1}return!1},zx=function(){function e(e,t){void 0===t&&(t=Px.Error),this.logger=e,this.logLevel=t}return e.prototype.error=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.logLevel>=Px.Error&&(t=this.logger).error.apply(t,za([e],qa(n),!1))},e.prototype.warn=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.logLevel>=Px.Warn&&(t=this.logger).warn.apply(t,za([e],qa(n),!1))},e.prototype.info=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.logLevel>=Px.Info&&(t=this.logger).info.apply(t,za([e],qa(n),!1))},e.prototype.debug=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.logLevel>=Px.Debug&&(t=this.logger).debug.apply(t,za([e],qa(n),!1))},e.prototype.verbose=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.logLevel>=Px.Verbose&&(t=this.logger).verbose.apply(t,za([e],qa(n),!1))},e}(),Vx=function(){function e(){}return e.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];console.error.apply(console,za([e],qa(t),!1))},e.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];console.warn.apply(console,za([e],qa(t),!1))},e.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];console.info.apply(console,za([e],qa(t),!1))},e.prototype.debug=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];console.debug.apply(console,za([e],qa(t),!1))},e.prototype.verbose=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];console.debug.apply(console,za([e],qa(t),!1))},e}(),Wx=function(){function e(){this.globalScope=yx()}return e.prototype.get=function(e){var t;return null===(t=this.globalScope)||void 0===t?void 0:t.localStorage.getItem(e)},e.prototype.put=function(e,t){var n;null===(n=this.globalScope)||void 0===n||n.localStorage.setItem(e,t)},e.prototype.delete=function(e){var t;null===(t=this.globalScope)||void 0===t||t.localStorage.removeItem(e)},e}(),Hx=function(e,t,n){var r=e.substring(e.length-6),i="amp-exp-".concat(t,"-").concat(r);return new $x(i,n,Qx)},Gx=function(e,t,n){void 0===n&&(n=new Wx);var r=e.substring(e.length-6),i="amp-exp-".concat(t,"-").concat(r,"-flags");return new $x(i,n)},Kx=function(e,t,n){void 0===n&&(n=new Wx);var r=e.substring(e.length-6),i="amp-exp-".concat(t,"-").concat(r,"-variants-options");return new Jx(i,n)},Jx=function(){function e(e,t){this.namespace=e,this.storage=t}return e.prototype.get=function(){return this.value},e.prototype.put=function(e){this.value=e},e.prototype.load=function(){var e=this.storage.get(this.namespace);e&&(this.value=JSON.parse(e))},e.prototype.store=function(){void 0===this.value?this.storage.delete(this.namespace):this.storage.put(this.namespace,JSON.stringify(this.value))},e}(),$x=function(){function e(e,t,n){this.cache={},this.namespace=e,this.storage=t,this.transformer=n}return e.prototype.get=function(e){return this.cache[e]},e.prototype.getAll=function(){return _x({},this.cache)},e.prototype.put=function(e,t){this.cache[e]=t},e.prototype.putAll=function(e){var t,n;try{for(var r=Ba(Object.keys(e)),i=r.next();!i.done;i=r.next()){var o=i.value;this.cache[o]=e[o]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.remove=function(e){delete this.cache[e]},e.prototype.clear=function(){this.cache={}},e.prototype.load=function(){var e,t,n,r=this.storage.get(this.namespace);try{n=JSON.parse(r)||{}}catch(e){return}var i={};try{for(var o=Ba(Object.keys(n)),s=o.next();!s.done;s=o.next()){var a=s.value;try{var u=void 0;(u=this.transformer?this.transformer(n[a]):n[a])&&(i[a]=u)}catch(e){}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}this.clear(),this.putAll(i)},e.prototype.store=function(e){void 0===e&&(e=this.cache),this.storage.put(this.namespace,JSON.stringify(e))},e}(),Qx=function(e){if("string"==typeof e)return{key:e,value:e};if("object"===(void 0===e?"undefined":_type_of(e))){var t=e.key,n=e.value,r=e.payload,i=e.metadata,o=e.expKey;i&&i.experimentKey?o=i.experimentKey:o&&((i=i||{}).experimentKey=o);var s={};return t?s.key=t:n&&(s.key=n),n&&(s.value=n),i&&(s.metadata=i),r&&(s.payload=r),o&&(s.expKey=o),s}},Yx=function(){function e(){this.globalScope=yx()}return e.prototype.get=function(e){var t;return null===(t=this.globalScope)||void 0===t?void 0:t.sessionStorage.getItem(e)},e.prototype.put=function(e,t){var n;null===(n=this.globalScope)||void 0===n||n.sessionStorage.setItem(e,t)},e.prototype.delete=function(e){var t;null===(t=this.globalScope)||void 0===t||t.sessionStorage.removeItem(e)},e}(),Xx=function(e,t,n,r){var i,o=null==n?void 0:n.value,s="[Experiment] ".concat(t);return{name:"[Experiment] Exposure",user:e,key:t,variant:n,userProperty:s,properties:{key:t,variant:o,source:r},userProperties:(i={},i[s]=o,i)}},Zx=function(e){return null==e},eE=function(e){return!!Zx(e)||e&&0===Object.keys(e).length},tE=function(e){var t,n;if(!e||"object"!==(void 0===e?"undefined":_type_of(e)))return{};var r={};try{for(var i=Ba(Object.entries(e)),o=i.next();!o.done;o=i.next()){var s=qa(o.value,2),a=s[0],u=s[1];Zx(u)||(r[a]=u)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},nE=function(e){var t;return"local"===(null===(t=null==e?void 0:e.metadata)||void 0===t?void 0:t.evaluationMode)},rE=function(){function e(e,t,n,r){this.started=!1,this.done=!1,this.attempts=e,this.min=t,this.max=n,this.scalar=r}return e.prototype.start=function(e){return Ua(this,void 0,void 0,function(){return Fa(this,function(t){switch(t.label){case 0:if(this.started)throw Error("Backoff already started");return this.started=!0,[4,this.backoff(e,0,this.min)];case 1:return t.sent(),[2]}})})},e.prototype.cancel=function(){this.done=!0,clearTimeout(this.timeoutHandle)},e.prototype.backoff=function(e,t,n){return Ua(this,void 0,void 0,function(){var r=this;return Fa(this,function(i){return this.done||(this.timeoutHandle=gx.setTimeout(function(){return Ua(r,void 0,void 0,function(){var r,i;return Fa(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,e()];case 1:return o.sent(),[3,3];case 2:return o.sent(),(r=t+1)<this.attempts&&(i=Math.min(n*this.scalar,this.max),this.backoff(e,r,i)),[3,3];case 3:return[2]}})})},n)),[2]})})},e}(),iE=function(e){var t,n,r,i;if(!e)return{};var o={user:e},s=yx();s&&(o.page={url:s.location.href});var a={};if(!e.groups)return o;try{for(var u=Ba(Object.keys(e.groups)),l=u.next();!l.done;l=u.next()){var c=l.value,d=e.groups[c];if(d.length>0&&d[0]){var f=d[0],h={group_name:f},p=null===(i=null===(r=e.group_properties)||void 0===r?void 0:r[c])||void 0===i?void 0:i[f];p&&Object.keys(p).length>0&&(h.group_properties=p),a[c]=h}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return Object.keys(a).length>0&&(o.groups=a),delete o.user.groups,delete o.user.group_properties,o},oE=function(e){return null==e?{}:"string"==typeof e?{key:e,value:e}:e},sE=function(e){if(!e)return{};var t=void 0;e.metadata&&(t=e.metadata.experimentKey);var n={};return e.key&&(n.key=e.key),e.value&&(n.value=e.value),e.payload&&(n.payload=e.payload),t&&(n.expKey=t),e.metadata&&(n.metadata=e.metadata),n},aE=function(){function e(e){this.setProperties={},this.unsetProperties={},this.analyticsProvider=e}return e.prototype.track=function(e){this.setProperties[e.key]!=e.variant.value&&(this.setProperties[e.key]=e.variant.value,delete this.unsetProperties[e.key],this.analyticsProvider.track(e))},e.prototype.setUserProperty=function(e){this.setProperties[e.key]!=e.variant.value&&this.analyticsProvider.setUserProperty(e)},e.prototype.unsetUserProperty=function(e){this.unsetProperties[e.key]||(this.unsetProperties[e.key]="unset",delete this.setProperties[e.key],this.analyticsProvider.unsetUserProperty(e))},e}(),uE=function(){function e(e){this.tracked={},this.identity={},this.exposureTrackingProvider=e}return e.prototype.track=function(e,t){var n={userId:null==t?void 0:t.user_id,deviceId:null==t?void 0:t.device_id};this.identityEquals(this.identity,n)||(this.tracked={}),this.identity=n;var r=e.flag_key in this.tracked,i=this.tracked[e.flag_key];r&&i===e.variant||(this.tracked[e.flag_key]=e.variant,this.exposureTrackingProvider.track(e))},e.prototype.identityEquals=function(e,t){return e.userId===t.userId&&e.deviceId===t.deviceId},e}(),lE=function(){function e(t,n){var r,i,o,s,a=this;this.engine=new Ck,this.isRunning=!1,this.apiKey=t,n=tE(n),this.config=_x(_x(_x({},jx),n),{serverUrl:(null==n?void 0:n.serverUrl)||("eu"===(null===(r=null==n?void 0:n.serverZone)||void 0===r?void 0:r.toLowerCase())?"https://api.lab.eu.amplitude.com":jx.serverUrl),flagsServerUrl:(null==n?void 0:n.flagsServerUrl)||("eu"===(null===(i=null==n?void 0:n.serverZone)||void 0===i?void 0:i.toLowerCase())?"https://flag.lab.eu.amplitude.com":jx.flagsServerUrl),flagConfigPollingIntervalMillis:n.flagConfigPollingIntervalMillis<6e4?6e4:null!==(o=n.flagConfigPollingIntervalMillis)&&void 0!==o?o:jx.flagConfigPollingIntervalMillis}),this.logger=new zx(this.config.loggerProvider||new Vx,e.getLogLevel(n));var u=null===(s=this.config)||void 0===s?void 0:s.internalInstanceNameSuffix;if(this.isWebExperiment="web"===u,this.poller=new bx(function(){return Ua(a,void 0,void 0,function(){var e;return Fa(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.doFlags()];case 1:return t.sent(),[3,3];case 2:return e=t.sent(),this.logger.info(e),[3,3];case 3:return[2]}})})},this.config.flagConfigPollingIntervalMillis),this.config.initialVariants)for(var l in this.config.initialVariants)this.config.initialVariants[l]=Qx(this.config.initialVariants[l]);this.config.userProvider&&(this.userProvider=this.config.userProvider),this.config.analyticsProvider&&(this.analyticsProvider=new aE(this.config.analyticsProvider)),this.config.exposureTrackingProvider&&(this.userSessionExposureTracker=new uE(this.config.exposureTrackingProvider)),this.integrationManager=new Ux(this.config,this);var c,d=new Ax(this.config.httpClient||Rx);this.flagApi=new vx(this.apiKey,this.config.flagsServerUrl,d),this.evaluationApi=new px(this.apiKey,this.config.serverUrl,d);var f=u?"".concat(this.config.instanceName,"-").concat(u):this.config.instanceName;c=this.isWebExperiment?new Yx:new Wx,this.variants=Hx(this.apiKey,f,c),this.flags=Gx(this.apiKey,f,c),this.fetchVariantsOptions=Kx(this.apiKey,f,c);try{this.flags.load(),this.variants.load(),this.fetchVariantsOptions.load()}catch(e){}this.mergeInitialFlagsWithStorage()}return e.prototype.start=function(e){return Ua(this,void 0,void 0,function(){var t,n,r;return Fa(this,function(i){switch(i.label){case 0:if(this.isRunning)return[2];this.isRunning=!0,this.setUser(e),i.label=1;case 1:return i.trys.push([1,6,,7]),t=this.doFlags(),null===(r=this.config.fetchOnStart)||void 0===r||r?[4,Promise.all([this.fetch(e),t])]:[3,3];case 2:return i.sent(),[3,5];case 3:return[4,t];case 4:i.sent(),i.label=5;case 5:return[3,7];case 6:if(n=i.sent(),this.config.throwOnError)throw n;return[3,7];case 7:return this.config.pollOnStart&&this.poller.start(),[2]}})})},e.prototype.stop=function(){this.isRunning&&(this.poller.stop(),this.isRunning=!1)},e.prototype.fetch=function(){return Ua(this,arguments,void 0,function(e,t){var n;return void 0===e&&(e=this.user),Fa(this,function(r){switch(r.label){case 0:this.setUser(e||{}),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.fetchInternal(e,this.config.fetchTimeoutMillis,this.config.retryFetchOnFailure,t)];case 2:return r.sent(),[3,4];case 3:if(n=r.sent(),this.config.throwOnError)throw n;return _instanceof(n,hx)?this.logger.debug(n):this.logger.error(n),[3,4];case 4:return[2,this]}})})},e.prototype.variant=function(e,t){var n,r;if(!this.apiKey)return{value:void 0};var i=this.variantAndSource(e,t);return this.config.automaticExposureTracking&&this.exposureInternal(e,i),this.logger.debug("[Experiment] variant for ".concat(e," is ").concat((null===(n=i.variant)||void 0===n?void 0:n.key)||(null===(r=i.variant)||void 0===r?void 0:r.value))),i.variant||{}},e.prototype.exposure=function(e){var t=this.variantAndSource(e);this.exposureInternal(e,t)},e.prototype.all=function(){if(!this.apiKey)return{};var e=this.evaluate();for(var t in e){var n=this.flags.get(t);nE(n)||delete e[t]}return _x(_x(_x({},this.secondaryVariants()),this.sourceVariants()),e)},e.prototype.clear=function(){this.variants.clear();try{this.variants.store()}catch(e){}},e.prototype.getUser=function(){var e;if(!this.user)return this.user;if(null===(e=this.user)||void 0===e?void 0:e.user_properties){var t=_x({},this.user.user_properties);return _x(_x({},this.user),{user_properties:t})}return _x({},this.user)},e.prototype.setUser=function(e){var t;if(e)if(null===(t=this.user)||void 0===t?void 0:t.user_properties){var n=_x({},e.user_properties);this.user=_x(_x({},e),{user_properties:n})}else this.user=_x({},e);else this.user=null},e.prototype.getUserProvider=function(){return this.userProvider},e.prototype.setUserProvider=function(e){return this.userProvider=e,this},e.prototype.mergeInitialFlagsWithStorage=function(){var e=this;this.config.initialFlags&&JSON.parse(this.config.initialFlags).forEach(function(t){e.flags.get(t.key)||e.flags.put(t.key,t)})},e.prototype.evaluate=function(e){var t,n,r=this.addContext(this.user),i=Ik(this.flags.getAll(),e),o=iE(r),s=this.engine.evaluate(o,i),a={};try{for(var u=Ba(Object.keys(s)),l=u.next();!l.done;l=u.next()){var c=l.value;a[c]=sE(s[c])}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}return a},e.prototype.getEvaluationTraces=function(e){var t=this.addContext(this.user),n=Ik(this.flags.getAll(),e),r=iE(t);return this.engine.evaluateWithTraces(r,n).traces},e.prototype.variantAndSource=function(e,t){var n={};this.config.source===Mx.LocalStorage?n=this.localStorageVariantAndSource(e,t):this.config.source===Mx.InitialVariants&&(n=this.initialVariantsVariantAndSource(e,t));var r=this.flags.get(e);return(nE(r)||!n.variant&&r)&&(n=this.localEvaluationVariantAndSource(e,r,t)),n},e.prototype.localEvaluationVariantAndSource=function(e,t,n){var r,i={},o=this.evaluate([t.key])[e],s=Nx.LocalEvaluation,a=null===(r=null==o?void 0:o.metadata)||void 0===r?void 0:r.default;if(!Zx(o)&&!a)return{variant:oE(o),source:s,hasDefaultVariant:!1};if(a&&(i={variant:oE(o),source:s,hasDefaultVariant:!0}),!Zx(n))return{variant:oE(n),source:Nx.FallbackInline,hasDefaultVariant:i.hasDefaultVariant};var u=this.config.initialVariants[e];if(!Zx(u))return{variant:oE(u),source:Nx.SecondaryInitialVariants,hasDefaultVariant:i.hasDefaultVariant};var l=oE(this.config.fallbackVariant),c={variant:l,source:Nx.FallbackConfig,hasDefaultVariant:i.hasDefaultVariant};return eE(l)?i:c},e.prototype.localStorageVariantAndSource=function(e,t){var n,r={},i=this.variants.get(e),o=null===(n=null==i?void 0:i.metadata)||void 0===n?void 0:n.default;if(!Zx(i)&&!o)return{variant:oE(i),source:Nx.LocalStorage,hasDefaultVariant:!1};if(o&&(r={variant:oE(i),source:Nx.LocalStorage,hasDefaultVariant:!0}),!Zx(t))return{variant:oE(t),source:Nx.FallbackInline,hasDefaultVariant:r.hasDefaultVariant};var s=this.config.initialVariants[e];if(!Zx(s))return{variant:oE(s),source:Nx.SecondaryInitialVariants,hasDefaultVariant:r.hasDefaultVariant};var a=oE(this.config.fallbackVariant),u={variant:a,source:Nx.FallbackConfig,hasDefaultVariant:r.hasDefaultVariant};return eE(a)?r:u},e.prototype.initialVariantsVariantAndSource=function(e,t){var n,r={},i=this.config.initialVariants[e];if(!Zx(i))return{variant:oE(i),source:Nx.InitialVariants,hasDefaultVariant:!1};var o=this.variants.get(e),s=null===(n=null==o?void 0:o.metadata)||void 0===n?void 0:n.default;if(!Zx(o)&&!s)return{variant:oE(o),source:Nx.LocalStorage,hasDefaultVariant:!1};if(s&&(r={variant:oE(o),source:Nx.LocalStorage,hasDefaultVariant:!0}),!Zx(t))return{variant:oE(t),source:Nx.FallbackInline,hasDefaultVariant:r.hasDefaultVariant};var a=oE(this.config.fallbackVariant),u={variant:a,source:Nx.FallbackConfig,hasDefaultVariant:r.hasDefaultVariant};return eE(a)?r:u},e.prototype.fetchInternal=function(e,t,n,r){return Ua(this,void 0,void 0,function(){var i,o,s;return Fa(this,function(a){switch(a.label){case 0:if(!this.apiKey)throw Error("Experiment API key is empty");this.logger.debug("[Experiment] Fetch all: retry=".concat(n)),n&&this.stopRetries(),a.label=1;case 1:return a.trys.push([1,4,,5]),[4,this.doFetch(e,t,_x({trackingOption:null===(s=this.fetchVariantsOptions.get())||void 0===s?void 0:s.trackingOption},r))];case 2:return i=a.sent(),[4,this.storeVariants(i,r)];case 3:return a.sent(),[2,i];case 4:throw o=a.sent(),n&&this.shouldRetryFetch(o)&&this.startRetries(e,r),o;case 5:return[2]}})})},e.prototype.setTracksAssignment=function(e){return Ua(this,void 0,void 0,function(){return Fa(this,function(t){return this.fetchVariantsOptions.put(_x(_x({},this.fetchVariantsOptions.get()||{}),{trackingOption:e?"track":"no-track"})),this.fetchVariantsOptions.store(),[2]})})},e.prototype.cleanUserPropsForFetch=function(e){var t=_x({},e);return delete t.cookie,t},e.prototype.doFetch=function(e,t,n){return Ua(this,void 0,void 0,function(){var r,i,o,s,a,u,l;return Fa(this,function(c){switch(c.label){case 0:return[4,this.addContextOrWait(e)];case 1:return e=c.sent(),e=this.cleanUserPropsForFetch(e),this.logger.debug("[Experiment] Fetch variants for user: ",e),[4,this.evaluationApi.getVariants(e,_x({timeoutMillis:t},n))];case 2:r=c.sent(),i={};try{for(o=Ba(Object.keys(r)),s=o.next();!s.done;s=o.next())a=s.value,i[a]=sE(r[a])}catch(e){u={error:e}}finally{try{s&&!s.done&&(l=o.return)&&l.call(o)}finally{if(u)throw u.error}}return this.logger.debug("[Experiment] Received variants: ",i),[2,i]}})})},e.prototype.doFlags=function(){return Ua(this,void 0,void 0,function(){var e,t,n;return Fa(this,function(r){switch(r.label){case 0:return r.trys.push([0,4,,5]),e=void 0,this.isWebExperiment?[4,this.addContextOrWait(this.getUser())]:[3,2];case 1:e=r.sent(),r.label=2;case 2:return[4,this.flagApi.getFlags({libraryName:"experiment-js-client",libraryVersion:Dx,timeoutMillis:this.config.fetchTimeoutMillis,deliveryMethod:this.isWebExperiment?"web":void 0,user:(null==e?void 0:e.user_id)||(null==e?void 0:e.device_id)?{user_id:null==e?void 0:e.user_id,device_id:null==e?void 0:e.device_id}:void 0})];case 3:return t=r.sent(),this.flags.clear(),this.flags.putAll(t),[3,5];case 4:if(!_instanceof(n=r.sent(),hx))throw n;if(this.logger.debug(n),this.config.throwOnError)throw n;return[3,5];case 5:try{this.flags.store()}catch(e){}return this.mergeInitialFlagsWithStorage(),[2]}})})},e.prototype.storeVariants=function(e,t){return Ua(this,void 0,void 0,function(){var n,r,i,o;return Fa(this,function(s){for(o in 0===(n=t&&t.flagKeys?t.flagKeys:[]).length&&this.variants.clear(),r=function(t){n=n.filter(function(e){return e!==t}),i.variants.put(t,e[t])},i=this,e)r(o);for(o in n)this.variants.remove(o);try{this.variants.store()}catch(e){}return this.logger.debug("[Experiment] Stored variants: ",e),[2]})})},e.prototype.startRetries=function(e,t){return Ua(this,void 0,void 0,function(){var n=this;return Fa(this,function(r){return this.logger.debug("[Experiment] Retry fetch"),this.retriesBackoff=new rE(8,500,1e4,1.5),this.retriesBackoff.start(function(){return Ua(n,void 0,void 0,function(){return Fa(this,function(n){switch(n.label){case 0:return[4,this.fetchInternal(e,1e4,!1,t)];case 1:return n.sent(),[2]}})})}),[2]})})},e.prototype.stopRetries=function(){this.retriesBackoff&&this.retriesBackoff.cancel()},e.prototype.addContext=function(e){var t,n=null===(t=this.userProvider)||void 0===t?void 0:t.getUser(),r=this.integrationManager.getUser(),i=_x(_x(_x({},null==n?void 0:n.user_properties),r.user_properties),null==e?void 0:e.user_properties);return _x(_x(_x(_x({library:"experiment-js-client/".concat(Dx)},n),r),e),{user_properties:i})},e.prototype.addContextOrWait=function(e){return Ua(this,void 0,void 0,function(){return Fa(this,function(t){switch(t.label){case 0:return[4,this.integrationManager.ready()];case 1:return t.sent(),[2,this.addContext(e)]}})})},e.prototype.sourceVariants=function(){return this.config.source==Mx.LocalStorage?this.variants.getAll():this.config.source==Mx.InitialVariants?this.config.initialVariants:void 0},e.prototype.secondaryVariants=function(){return this.config.source==Mx.LocalStorage?this.config.initialVariants:this.config.source==Mx.InitialVariants?this.variants.getAll():void 0},e.prototype.exposureInternal=function(e,t){var n,r,i,o,s,a,u,l,c;if(null===(i=null===(r=null===(n=t.variant)||void 0===n?void 0:n.metadata)||void 0===r?void 0:r.trackExposure)||void 0===i||i){this.legacyExposureInternal(e,t.variant,t.source);var d={flag_key:e},f=Lx(t.source);if(!f||t.hasDefaultVariant){(null===(o=t.variant)||void 0===o?void 0:o.expKey)&&(d.experiment_key=null===(s=t.variant)||void 0===s?void 0:s.expKey);var h=null===(a=t.variant)||void 0===a?void 0:a.metadata;if(f||(null==h?void 0:h.default)||((null===(u=t.variant)||void 0===u?void 0:u.key)?d.variant=t.variant.key:(null===(l=t.variant)||void 0===l?void 0:l.value)&&(d.variant=t.variant.value)),h&&(d.metadata=h),this.isWebExperiment&&(d.time=Date.now()),this.isWebExperiment){var p=yx();if(null==p?void 0:p.location)try{var v=p.location.href;d.metadata.url=v.split("?")[0]||""}catch(e){}}var g=this.addContext(this.getUser());null===(c=this.userSessionExposureTracker)||void 0===c||c.track(d,g),this.integrationManager.track(d,g)}}},e.prototype.legacyExposureInternal=function(e,t,n){var r,i,o,s,a;if(this.analyticsProvider){var u=this.addContext(this.getUser()),l=Xx(u,e,t,n);Lx(n)||!(null==t?void 0:t.value)?null===(i=null===(r=this.analyticsProvider)||void 0===r?void 0:r.unsetUserProperty)||void 0===i||i.call(r,l):(null==t?void 0:t.value)&&(null===(s=null===(o=this.analyticsProvider)||void 0===o?void 0:o.setUserProperty)||void 0===s||s.call(o,l),null===(a=this.analyticsProvider)||void 0===a||a.track(l))}},e.getLogLevel=function(e){var t;return!0===e.debug?Px.Debug:null!==(t=e.logLevel)&&void 0!==t?t:Px.Error},e.prototype.shouldRetryFetch=function(e){return!_instanceof(e,fx)||(e.statusCode<400||e.statusCode>=500||429===e.statusCode)},e.prototype.addPlugin=function(e){"integration"===e.type&&this.integrationManager.setIntegration(e)},e}(),cE=function(){function e(e,t){var n,r,i;this.globalScope=yx(),this.userAgent=void 0!==(null===(n=this.globalScope)||void 0===n?void 0:n.navigator)?null===(r=this.globalScope)||void 0===r?void 0:r.navigator.userAgent:void 0,this.ua=new wx.UAParser(this.userAgent).getResult(),this.localStorage=new Wx,this.sessionStorage=new Yx,this.userProvider=e,this.apiKey=t,this.storageKey="EXP_".concat(null===(i=this.apiKey)||void 0===i?void 0:i.slice(0,10),"_DEFAULT_USER_PROVIDER")}return e.prototype.getUser=function(){var e,t,n,r,i,o=(null===(e=this.userProvider)||void 0===e?void 0:e.getUser())||{};return _x({language:this.getLanguage(),platform:"Web",os:this.getOs(this.ua),device_model:this.getDeviceModel(this.ua),device_category:null!==(n=null===(t=this.ua.device)||void 0===t?void 0:t.type)&&void 0!==n?n:"desktop",referring_url:null===(i=null===(r=this.globalScope)||void 0===r?void 0:r.document)||void 0===i?void 0:i.referrer.replace(/\/$/,""),cookie:this.getCookie(),browser:this.getBrowser(this.ua),landing_url:this.getLandingUrl(),first_seen:this.getFirstSeen(),url_param:this.getUrlParam(),user_agent:this.userAgent},o)},e.prototype.getLanguage=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},e.prototype.getOs=function(e){var t,n;return[null===(t=e.browser)||void 0===t?void 0:t.name,null===(n=e.browser)||void 0===n?void 0:n.major].filter(function(e){return null!=e}).join(" ")},e.prototype.getDeviceModel=function(e){var t;return null===(t=e.os)||void 0===t?void 0:t.name},e.prototype.getBrowser=function(e){var t,n=null===(t=e.browser)||void 0===t?void 0:t.name;return(null==n?void 0:n.includes("Chrom"))&&(n="Chrome"),(null==n?void 0:n.includes("Firefox"))&&(n="Firefox"),(null==n?void 0:n.includes("Safari"))&&(n="Safari"),(null==n?void 0:n.includes("Edge"))&&(n="Edge"),(null==n?void 0:n.includes("Opera"))&&(n="Opera"),n},e.prototype.getCookie=function(){var e,t,n,r,i;if(null===(t=null===(e=this.globalScope)||void 0===e?void 0:e.document)||void 0===t?void 0:t.cookie)return Object.fromEntries(null===(i=null===(r=null===(n=this.globalScope)||void 0===n?void 0:n.document)||void 0===r?void 0:r.cookie)||void 0===i?void 0:i.split("; ").map(function(e){return e.split("=")}))},e.prototype.getLandingUrl=function(){var e,t;try{var n=JSON.parse(this.sessionStorage.get(this.storageKey)||"{}");return n.landing_url||(n.landing_url=null===(t=null===(e=this.globalScope)||void 0===e?void 0:e.location)||void 0===t?void 0:t.href.replace(/\/$/,""),this.sessionStorage.put(this.storageKey,JSON.stringify(n))),n.landing_url}catch(e){return}},e.prototype.getFirstSeen=function(){try{var e=JSON.parse(this.localStorage.get(this.storageKey)||"{}");return e.first_seen||(e.first_seen=(Date.now()/1e3).toString(),this.localStorage.put(this.storageKey,JSON.stringify(e))),e.first_seen}catch(e){return}},e.prototype.getUrlParam=function(){var e,t,n;if(this.globalScope){var r={};try{var i=new URL(this.globalScope.location.href);try{for(var o=Ba(i.searchParams),s=o.next();!s.done;s=o.next()){var a=qa(s.value,2),u=a[0],l=a[1];r[u]=za(za([],qa(null!==(n=r[u])&&void 0!==n?n:[]),!1),qa(l.split(",")),!1)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}}catch(e){return}return Object.entries(r).reduce(function(e,t){var n=qa(t,2),r=n[0],i=n[1];return e[r]=1==i.length?i[0]:i,e},{})}},e}(),gx.experimentInstances={},dE=gx.experimentInstances,fE=function(e,t){return gE(e,t,function(){return new Cx(e,Ae.getInstance(hE(t)),1e4)})},hE=function(e){return(null==e?void 0:e.instanceName)||jx.instanceName},pE=function(e,t){var n=hE(t),r=null==t?void 0:t.internalInstanceNameSuffix;return r?"".concat(n,".").concat(e,".").concat(r):"".concat(n,".").concat(e)},vE=function(e,t){return new lE(e,_x(_x({},t),{userProvider:new cE(null==t?void 0:t.userProvider,e)}))},gE=function(e,t,n){var r=pE(e,t),i=dE[r];return i||(i=vE(e,t),n&&i.addPlugin(n()),dE[r]=i,i)},function(){function e(){}return e.prototype.getUser=function(){return{}},e.prototype.start=function(e){return Ua(this,void 0,void 0,function(){return Fa(this,function(e){return[2]})})},e.prototype.stop=function(){},e.prototype.setUser=function(e){},e.prototype.fetch=function(e,t){return Ua(this,void 0,void 0,function(){return Fa(this,function(e){return[2,this]})})},e.prototype.getUserProvider=function(){return null},e.prototype.setUserProvider=function(e){return this},e.prototype.variant=function(e,t){return jx.fallbackVariant},e.prototype.all=function(){return{}},e.prototype.clear=function(){},e.prototype.exposure=function(e){},e}()}}),kE=tl({"../../../../node_modules/@amplitude/plugin-experiment-browser/lib/esm/experiment.js":function(){al(),SE(),yE=function(){function e(t){this.name=e.pluginName,this.config=t}return e.prototype.setup=function(e,t){var n;return Ft(this,void 0,void 0,function(){return Bt(this,function(t){return this.experiment=fE((null===(n=this.config)||void 0===n?void 0:n.deploymentKey)||e.apiKey,this.config),[2]})})},e.pluginName="@amplitude/experiment-analytics-plugin",e}(),mE=function(e){return new yE(e)}}}),xE={};rl(xE,{ExperimentPlugin:function(){return yE},experimentPlugin:function(){return mE}});var EE,CE,IE,OE,TE,AE,RE,PE,ME,NE,LE,jE,DE,UE,FE,BE,qE,zE=tl({"../../../../node_modules/@amplitude/plugin-experiment-browser/lib/esm/index.js":function(){kE()}}),VE={};rl(VE,{init:function(){return BE},plugin:function(){return qE}});var WE=tl({"../../../../node_modules/@amplitude/engagement-browser/index.esm.js":function(){var e;EE=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:CE(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),CE=function(){return("undefined"==typeof navigator?"undefined":_type_of(navigator))<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},IE=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}(),OE=function(){return OE=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},OE.apply(this,arguments)},TE=function(e,t){var n,r,i=void 0===e?"undefined":_type_of(e);if(i!==(void 0===t?"undefined":_type_of(t)))return!1;try{for(var o=Wa(["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 a=Array.isArray(e),u=Array.isArray(t);if(a!==u)return!1;if(!a||!u){var l=Object.keys(e).sort(),c=Object.keys(t).sort();if(!TE(l,c))return!1;var d=!0;return Object.keys(e).forEach(function(n){TE(e[n],t[n])||(d=!1)}),d}for(var f=0;f<e.length;f++)if(!TE(e[f],t[f]))return!1;return!0},Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}),AE=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=OE({},this.identity.userProperties),n=OE(OE({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},setOptOut:function(e){return n.optOut=e,this},updateUserProperties:function(e){var t,r,i,o,s,a,u=n.userProperties||{};try{for(var l=Wa(Object.entries(e)),c=l.next();!c.done;c=l.next()){var d=Ha(c.value,2),f=d[0],h=d[1];switch(f){case"$set":try{for(var p=(i=void 0,Wa(Object.entries(h))),v=p.next();!v.done;v=p.next()){var g=Ha(v.value,2),y=g[0],m=g[1];u[y]=m}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}break;case"$unset":try{for(var b=(s=void 0,Wa(Object.keys(h))),w=b.next();!w.done;w=b.next()){delete u[y=w.value]}}catch(e){s={error:e}}finally{try{w&&!w.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}break;case"$clearAll":u={}}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}return n.userProperties=u,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return OE({},this.identity)},e.prototype.setIdentity=function(e){var t=OE({},this.identity);this.identity=OE({},e),TE(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}(),RE=("undefined"==typeof globalThis?"undefined":_type_of(globalThis))<"u"?globalThis:("undefined"==typeof window?"undefined":_type_of(window))<"u"?window:self,PE=function(){function e(){this.identityStore=new AE,this.eventBridge=new IE,this.applicationContextProvider=new EE}return e.getInstance=function(t){return RE.analyticsConnectorInstances||(RE.analyticsConnectorInstances={}),RE.analyticsConnectorInstances[t]||(RE.analyticsConnectorInstances[t]=new e),RE.analyticsConnectorInstances[t]},e}(),ME=["boot"],NE="$default_instance",LE=Symbol.for("amplitude-engagement-plugin-caller"),(e=jE||{}).Local="https://local.amplitude.com:3010/",e.Staging="https://apps.stag2.amplitude.com/",e.Production="https://app.amplitude.com/",e.ProductionEU="https://app.eu.amplitude.com/",jE=e,DE=function(e){var t=!0,n=!1,r=void 0;if(("undefined"==typeof window?"undefined":_type_of(window))<"u"&&window.opener)try{for(var i,o=Object.values(jE)[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var s=i.value;window.opener.postMessage({message:e},s)}}catch(e){n=!0,r=e}finally{try{t||null==o.return||o.return()}finally{if(n)throw r}}},UE=function(){return DE("ENGAGEMENT_SNIPPET"),function(e){var t,n,r,i,o,s,a,u,l,c,d=("undefined"==typeof window?"undefined":_type_of(window))<"u"?window.engagement:void 0,f=!1,h={_q:null!=(t=null==d?void 0:d._q)?t:[],_configuration:{apiKey:null!=(r=null==(n=null==d?void 0:d._configuration)?void 0:n.apiKey)?r:"",serverUrl:null==(i=null==d?void 0:d._configuration)?void 0:i.serverUrl,chatUrl:null==(o=null==d?void 0:d._configuration)?void 0:o.chatUrl,mediaUrl:null==(s=null==d?void 0:d._configuration)?void 0:s.mediaUrl,serverZone:null!=(u=null==(a=null==d?void 0:d._configuration)?void 0:a.serverZone)?u:"US",autoRefreshIntervalSeconds:null==(l=null==d?void 0:d._configuration)?void 0:l.autoRefreshIntervalSeconds,options:_object_spread({},null==(c=null==d?void 0:d._configuration)?void 0:c.options)},init:function(t,n){var r,i,o,s;if(h._configuration.apiKey)console.log("Engagement SDK has already been initialized. Ignoring additional init call.");else{if(!0===(null==n?void 0:n.skip))return console.log("Engagement SDK init skipped via `skip: true`. The SDK bundle will not be loaded."),void(f=!0);if(f&&(h._q.length=0),f=!1,null!=n&&n.useEngagementDomain){var a="EU"===(null!=(r=n.serverZone)?r:h._configuration.serverZone),u="amplitudeengagement.com";n.serverUrl||(n.serverUrl=a?"https://gs.eu.".concat(u):"https://gs.".concat(u)),n.chatUrl||(n.chatUrl=a?"https://houston-chat.eu.".concat(u):"https://houston-chat.".concat(u)),n.mediaUrl||(n.mediaUrl=a?"https://engagement-static.eu.".concat(u):"https://engagement-static.".concat(u)),n.cdnUrl||(n.cdnUrl=a?"https://cdn.eu.".concat(u):"https://cdn.".concat(u))}var l;if(h._configuration=_object_spread_props(_object_spread({},h._configuration,n),{apiKey:t,options:_object_spread({splitting:!0},h._configuration.options,null==n?void 0:n.options)}),null!=(o=null==(i=h._configuration)?void 0:i.options)&&o.logger&&h._configuration.options.logger.enable(null!=(s=h._configuration.options.logLevel)?s:2),null!=n&&n.cdnUrl)l=h._configuration.options.splitting?"".concat(n.cdnUrl,"/engagement-browser/prod/split/index.js"):n.cdnUrl+"/engagement-browser/prod/index.min.js.gz";else{var c="EU"===h._configuration.serverZone?"https://cdn.eu.amplitude.com":"https://cdn.amplitude.com";l=h._configuration.options.splitting?"".concat(c,"/engagement-browser/prod/split/index.js"):"".concat(c,"/engagement-browser/prod/index.min.js.gz")}var d=null,p=function(){if(f=!0,d&&(clearTimeout(d),d=null),h._q&&h._q.length>0)for(console.warn("Engagement SDK failed to load within ".concat(v,"ms. Resolving pending calls gracefully."));h._q.length>0;){var e=h._q.shift();if(e){var t=e[0],n=ME.includes(t);if(console.warn("Engagement SDK method '".concat(t,"' still in queue (isAsyncMethod=").concat(n,"); attempting to resolve as no-op.")),n&&_instanceof(e[1],Function)&&_instanceof(e[2],Function)){var r=e[1];console.warn("Engagement SDK method '".concat(t,"' resolved as no-op due to script loading failure")),r(void 0)}}}};e(l,h._configuration.options.splitting?"module":void 0,null==n?void 0:n.nonce,p);var v=1e4;d=setTimeout(function(){p()},v)}},plugin:function(e){var t=h.init,n=null==e?void 0:e.token,r=!0===(null==e?void 0:e.skip),i=function(e,t){var r=t.getIdentity(),i="function"==typeof n?n():n;return _object_spread({user_id:e.getUserId(),device_id:e.getDeviceId(),user_properties:r.userProperties,getSessionId:e.getSessionId},i?{token:i}:{})};return{name:"@amplitude/engagement-browser",type:"enrichment",setup:function(n,o){return _async_to_generator(function(){var s,a,u,l;return _ts_generator(this,function(c){switch(c.label){case 0:return r?(t(n.apiKey,{skip:!0}),[2]):(a=null!=(s=n.instanceName)?s:NE,u=PE.getInstance(a).identityStore,h._configuration._installedViaPlugin=!0,t(n.apiKey,_object_spread_props(_object_spread({serverZone:n.serverZone},e),{options:_object_spread({logLevel:n.logLevel,logger:n.loggerProvider},null==e?void 0:e.options)})),l=[{track:function(e){o.track(e)}}],[4,window.engagement.boot({user:function(){return i(o,u)},integrations:l},LE)]);case 1:return c.sent(),u.addIdentityListener(function(e){var t,n,r,s;null!=(t=window.engagement)&&t._.user&&null!=(n=window.engagement)&&n._analytics.hasBooted?(null==(s=null==(r=window.engagement)?void 0:r._.user)?void 0:s.user_id)!==e.userId?(window.engagement.shutdown(LE),window.engagement.boot({user:function(){return i(o,u)},integrations:l},LE)):window.engagement._setUserProperties(e.userProperties):console.warn("Engagement SDK not booted. Ignoring identity change.")}),[2]}})})()},execute:function(e){return _async_to_generator(function(){return _ts_generator(this,function(t){return[2,(r||window.engagement.forwardEvent(e),e)]})})()}}}},p=h;return new Proxy(h,{get:function(e,t){return t in p?p[t]:"then"!==t?"gs"===t||"rc"===t||"assistant"===t?new Proxy({},{get:function(e,n){return function(){var e=Array.from(arguments),r="".concat(t,".").concat(n);e.unshift(r),h._q.push(e)}}}):ME.includes(t)?function(){var e=Array.prototype.slice.call(arguments);return new Promise(function(n,r){e.unshift(t,n,r),h._q.push(e),f&&n(void 0)})}:function(){var e=Array.prototype.slice.call(arguments);e.unshift(t),h._q.push(e)}:void 0}})}(function(e,t,n,r){return function(e,t,n,r){var i=!0,o=!1,s=void 0;try{for(var a,u=e[Symbol.iterator]();!(i=(a=u.next()).done);i=!0){var l=a.value,c=document.createElement("script");c.src=l,c.id="engagement-sdk-bundle",n&&c.setAttribute("nonce",n),t&&c.setAttribute("type",t),r&&(c.onerror=r);var d=document.getElementsByTagName("head")[0];d&&d.appendChild(c)}}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}}([e||"https://cdn.amplitude.com/engagement-browser/prod/index.min.js.gz"],t,n,r)})},FE=UE(),BE=function(e,t){("undefined"==typeof window?"undefined":_type_of(window))<"u"&&!window.engagement&&(window.engagement=FE),FE.init(e,t)},qE=function(e){return("undefined"==typeof window?"undefined":_type_of(window))<"u"&&!window.engagement&&(window.engagement=FE),FE.plugin(e)}}}),HE={};rl(HE,{DestinationAmplitude:function(){return HT},default:function(){return $T},destinationAmplitude:function(){return JT}});var GE=Object.defineProperty,KE=function(e,t){for(var n in t)GE(e,n,{get:t[n],enumerable:!0})};KE({},{stepId:function(){return Ga}});KE({},{getDestination:function(){return Ka}});KE({},{Level:function(){return $E}});var JE,$E=((JE=$E||{})[JE.ERROR=0]="ERROR",JE[JE.WARN=1]="WARN",JE[JE.INFO=2]="INFO",JE[JE.DEBUG=3]="DEBUG",JE);KE({},{getTransformer:function(){return Ja}});KE({},{getSource:function(){return $a}});KE({},{getStore:function(){return Qa},getStoreValue:function(){return Ya}});var QE="\\$flow\\.(".concat("[a-zA-Z_][a-zA-Z0-9_-]*",")(?:\\.([a-zA-Z0-9_.]+))?");new RegExp("^".concat(QE,"$")),new RegExp(QE,"g");function YE(e){for(var t=arguments.length>2?arguments[2]:void 0,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"").split("."),r=e,i=0;i<n.length;i++){var o=n[i];if("*"===o&&Xa(r)){var s=n.slice(i+1).join("."),a=[],u=!0,l=!1,c=void 0;try{for(var d,f=r[Symbol.iterator]();!(u=(d=f.next()).done);u=!0){var h=YE(d.value,s,t);a.push(h)}}catch(e){l=!0,c=e}finally{try{u||null==f.return||f.return()}finally{if(l)throw c}}return a}if(void 0===(r=tu(r)||Xa(r)?r[o]:void 0))break}return Za(r)?r:t}function XE(e){return function(e){return"boolean"==typeof e}(e)||nu(e)||eu(e)||!Za(e)||Xa(e)&&e.every(XE)||tu(e)&&Object.values(e).every(XE)}var ZE=function(){function e(t,n){var r;return _class_call_check(this,e),(r=_call_super(this,e,[t])).name="FatalError",n&&"cause"in n&&su(r,n.cause),Object.setPrototypeOf(r,e.prototype),r}return _inherits(e,_wrap_native_super(Error)),e}(),eC=["transport","timeout","breaker-open","blocked","queue-full","vendor-not-ready","vendor-timeout"],tC=function(e){function t(e,n){var r;return _class_call_check(this,t),r=_call_super(this,t,[e]),sl(r,"code"),sl(r,"status"),sl(r,"retryable"),sl(r,"body"),void 0!==n.cause&&su(r,n.cause),r.name="StepError",r.code=n.code,void 0!==n.status&&(r.status=n.status),r.retryable=function(e){if(void 0!==e.retryable)return e.retryable;var t=e.status;if(void 0!==t){if(429===t||t>=500&&t<600)return!0;if(t>=400&&t<500)return!1}return eC.includes(e.code)}(n),void 0!==n.body&&(r.body=n.body),Object.setPrototypeOf(r,(_instanceof(this,t)?this.constructor:void 0).prototype),r}return _inherits(t,e),t}(_wrap_native_super(Error)),nC=["type","mappingKey"],rC=["count","suppressed"],iC=["condition","consent","fn","key","loop","map","set","validate","value"];function oC(e,t,n,r){return _async_to_generator(function(){return _ts_generator(this,function(i){return[2,(Xa(t)?t:[t]).reduce(function(t,i){return _async_to_generator(function(){var o,s,a,u,l,c,d,f,h,p,v,g,y,m,b,w,_,S,k,x,E,C,I,O,T;return _ts_generator(this,function(A){switch(A.label){case 0:return[4,t];case 1:return(o=A.sent())?[2,o]:(s=nu(i)?{key:i}:i,Object.keys(s).length?iC.some(function(e){return e in s})?(a=s.condition,u=s.consent,l=s.fn,c=s.key,d=s.loop,f=s.map,h=s.set,p=s.validate,v=s.value,g=_object_spread_props(_object_spread({},n),{mapping:i}),(y=a)?[4,ou(a,function(e){if(_instanceof(e,ZE))throw e;return cu(g,r,"mapping condition failed",e),!1})(e,g)]:[3,3]):[2,void cu(_object_spread_props(_object_spread({},n),{mapping:i}),r,"mapping value has no operator (".concat(Object.keys(s).join(", "),"): wrap the fields in map, or use key, value, fn, loop or set"))]:[2]);case 2:y=!A.sent(),A.label=3;case 3:return y?[2]:u&&!ru(u,g.consent)?[2,v]:(m=Za(v)?v:e,d?(b=_sliced_to_array(d,2),w=b[0],_=b[1],"this"!==w?[3,4]:(k=[e],[3,6])):[3,10]);case 4:return[4,du(e,w,g,r)];case 5:k=A.sent(),A.label=6;case 6:return Xa(S=k)?[4,Promise.all(S.map(function(e){return Za(e)?du(e,_,g,r):void 0}))]:[3,8];case 7:return x=A.sent().filter(Za),[3,9];case 8:x=void 0,A.label=9;case 9:return m=x,[3,21];case 10:return f?[4,Object.entries(f).reduce(function(t,n){var i=_sliced_to_array(n,2),o=i[0],s=i[1];return _async_to_generator(function(){var n,i;return _ts_generator(this,function(a){switch(a.label){case 0:return[4,t];case 1:return n=a.sent(),[4,du(e,s,g,r)];case 2:return i=a.sent(),[2,(Za(i)&&(n[o]=i),n)]}})})()},Promise.resolve({}))]:[3,12];case 11:return m=A.sent(),[3,20];case 12:return h?[4,Promise.all(h.map(function(t){return oC(e,t,g,r)}))]:[3,14];case 13:return E=m=A.sent(),[3,19];case 14:return c?(C=m=YE(e,c,v),[3,18]):[3,15];case 15:return(I=l)?[4,ou(l,function(e){if(_instanceof(e,ZE))throw e;cu(g,r,"mapping fn failed",e)})(e,g)]:[3,17];case 16:I=m=A.sent(),A.label=17;case 17:C=I,A.label=18;case 18:E=C,A.label=19;case 19:A.label=20;case 20:A.label=21;case 21:return(O=p)?[4,ou(p,function(e){if(_instanceof(e,ZE))throw e;return cu(g,r,"mapping validate failed",e),!1})(m,g)]:[3,23];case 22:O=!A.sent(),A.label=23;case 23:return O&&(m=void 0),T=iu(m),[2,Za(T)?T:iu(v)]}})})()},Promise.resolve(void 0))]})})()}al(),Vf(),al(),Vf(),al(),Vf();var sC=function(e,t){return"boolean"==typeof e?e:!1!==(null==e?void 0:e[t])&&(i=G(),"string"!=typeof(null===(r=null===(n=null==i?void 0:i.chrome)||void 0===n?void 0:n.runtime)||void 0===r?void 0:r.id)||!!(null==e?void 0:e[t]));var n,r,i},aC=function(e){return sC(e,"attribution")},uC=function(e){return sC(e,"formInteractions")},lC=function(e){return sC(e,"pageViews")},cC=function(e){return sC(e,"sessions")},dC=function(e){return"boolean"==typeof e?e:"object"===(void 0===e?"undefined":_type_of(e))&&(!0===e.networkTracking||"object"===_type_of(e.networkTracking))},fC=function(e){return"boolean"==typeof e?e:"object"===(void 0===e?"undefined":_type_of(e))&&(!0===e.elementInteractions||"object"===_type_of(e.elementInteractions))},hC=function(e){return"boolean"==typeof e?e:"object"===(void 0===e?"undefined":_type_of(e))&&(!0===e.frustrationInteractions||"object"===_type_of(e.frustrationInteractions))},pC=function(e){if("object"===_type_of(e.autocapture)){var t=e.autocapture.performanceTracking;return!0===t?{mainThreadBlock:!0}:"object"===(void 0===t?"undefined":_type_of(t))&&null!==t?t:void 0}},vC=function(e){if(fC(e.autocapture)&&"object"===_type_of(e.autocapture)&&"object"===_type_of(e.autocapture.elementInteractions))return e.autocapture.elementInteractions},gC=function(e){if(hC(e.autocapture)&&"object"===_type_of(e.autocapture)&&"object"===_type_of(e.autocapture.frustrationInteractions))return e.autocapture.frustrationInteractions},yC=function(e){var n;if(dC(e.autocapture)){var r=void 0;return"object"===_type_of(e.autocapture)&&"object"===_type_of(e.autocapture.networkTracking)?r=e.autocapture.networkTracking:e.networkTrackingOptions&&(r=e.networkTrackingOptions),t(t({},r),{captureRules:null===(n=null==r?void 0:r.captureRules)||void 0===n?void 0:n.map(function(n){var r,i,o;if((null===(r=n.urls)||void 0===r?void 0:r.length)&&(null===(i=n.hosts)||void 0===i?void 0:i.length)){var s=JSON.stringify(n.hosts),a=JSON.stringify(n.urls);return null===(o=e.loggerProvider)||void 0===o||o.warn("Found network capture rule with both urls='".concat(a,"' and hosts='").concat(s,"' set. ")+"Definition of urls takes precedence over hosts, so ignoring hosts."),t(t({},n),{hosts:void 0})}return n})})}},mC=function(e){var t,n=function(){return!1},r=void 0,i=e.pageCounter;return lC(e.defaultTracking)&&(n=void 0,t=void 0,e.defaultTracking&&"object"===_type_of(e.defaultTracking)&&e.defaultTracking.pageViews&&"object"===_type_of(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}},bC=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,s=r.resolve,a=e&&e[i];if("function"==typeof a){var u=a.apply(e,o);"function"==typeof s&&s(null==u?void 0:u.promise)}}return e},wC=function(e){return e&&void 0!==e._q};al(),Vf();var _C="2.42.5",SC="amplitude-ts",kC=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat(SC,"/").concat(_C),"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 n,r;return Ft(this,void 0,void 0,function(){var i,o,s;return Bt(this,function(a){return i=(new Date).getTime(),o=null!==(n=this.config.lastEventId)&&void 0!==n?n:-1,s=null!==(r=e.event_id)&&void 0!==r?r:o+1,this.config.lastEventId=s,e.time||(this.config.lastEventTime=i),[2,t(t(t(t(t(t(t(t({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:i},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.language&&{language:Ue()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:$(),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:s,library:this.library,user_agent:this.userAgent})]})})},e}();al(),Vf(),al(),Vf();var xC=1e3,EC=function(e){function t(t){var n,r,i,o=this;try{i=null===(n=G())||void 0===n?void 0:n.localStorage}catch(e){null===(r=null==t?void 0:t.loggerProvider)||void 0===r||r.debug("Failed to access localStorage. error=".concat(JSON.stringify(e))),i=void 0}return(o=e.call(this,i)||this).loggerProvider=null==t?void 0:t.loggerProvider,o}return Dt(t,e),t.prototype.set=function(t,n){var r;return Ft(this,void 0,void 0,function(){var i;return Bt(this,function(o){switch(o.label){case 0:return Array.isArray(n)&&n.length>xC?(i=n.length-xC,[4,e.prototype.set.call(this,t,n.slice(0,xC))]):[3,2];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(xC,".")),[3,4];case 2:return[4,e.prototype.set.call(this,t,n)];case 3:o.sent(),o.label=4;case 4:return[2]}})})},t}(et);al(),Vf();var CC=function(e){function t(){var t;return e.call(this,null===(t=G())||void 0===t?void 0:t.sessionStorage)||this}return Dt(t,e),t}(et);al(),Vf();var IC=function(e){function n(t){void 0===t&&(t={});var n=e.call(this)||this;return n.state={done:4},n.customHeaders=t,n}return Dt(n,e),n.prototype.send=function(e,n,r){return void 0===r&&(r=!1),Ft(this,void 0,void 0,function(){var i=this;return Bt(this,function(o){return[2,new Promise(function(o,s){"undefined"==typeof XMLHttpRequest&&s(new Error("XHRTransport is not supported."));var a=new XMLHttpRequest;a.open("POST",e,!0),a.onreadystatechange=function(){if(a.readyState===i.state.done){var e=a.responseText;try{o(i.buildResponse(JSON.parse(e)))}catch(e){o(i.buildResponse({code:a.status}))}}};var u={"Content-Type":"application/json",Accept:"*/*"},l=JSON.stringify(n),c=r&&l.length>=pt&&Jt(),d=function(e){var n,r;u=t(t({},i.customHeaders),u);try{for(var o=qt(Object.entries(u)),s=o.next();!s.done;s=o.next()){var l=zt(s.value,2),c=l[0],d=l[1];a.setRequestHeader(c,d)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}a.send(e)};Ft(i,void 0,void 0,function(){var e;return Bt(this,function(t){switch(t.label){case 0:return c?[4,$t(l)]:[3,2];case 1:return(e=t.sent())?(u["Content-Encoding"]="gzip",d(e)):d(l),[3,3];case 2:d(l),t.label=3;case 3:return[2]}})}).catch(s)})]})})},n}(ft);al(),Vf();var OC=function(e){function n(t){void 0===t&&(t={});var n=e.call(this)||this;return n.customHeaders=t,n}return Dt(n,e),n.prototype.send=function(e,n,r){return void 0===r&&(r=!1),Ft(this,void 0,void 0,function(){var i,o,s,a,u,l,c;return Bt(this,function(d){switch(d.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return i=JSON.stringify(n),o=r&&i.length>=pt&&Jt(),s=i,a={"Content-Type":"application/json",Accept:"*/*"},o?[4,$t(i)]:[3,2];case 1:(u=d.sent())&&(a["Content-Encoding"]="gzip",s=u),d.label=2;case 2:return a=t(t({},this.customHeaders),a),[4,fetch(e,{headers:a,body:s,method:"POST"})];case 3:return[4,(l=d.sent()).text()];case 4:c=d.sent();try{return[2,this.buildResponse(JSON.parse(c))]}catch(e){return[2,this.buildResponse({code:l.status})]}return[2]}})})},n}(ft);al(),Vf();var TC=function(e){function t(){return e.call(this)||this}return Dt(t,e),t.prototype.send=function(e,t,n){return void 0===n&&(n=!1),Ft(this,void 0,void 0,function(){var n=this;return Bt(this,function(r){return[2,new Promise(function(r,i){var o=G();if(!(null==o?void 0:o.navigator.sendBeacon))throw new Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(t);return r(o.navigator.sendBeacon(e,s)?n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}):n.buildResponse({code:500}))}catch(e){i(e)}})]})})},t}(ft);al(),Vf();var AC=function(e,t,n){return void 0===n&&(n=!0),Ft(void 0,void 0,void 0,function(){var r,i,o,s,a,u,l,c,d;return Bt(this,function(f){switch(f.label){case 0:return r=De(e),[4,t.getRaw(r)];case 1:return(i=f.sent())?n?[4,t.remove(r)]:[3,3]:[2,{optOut:!1}];case 2:f.sent(),f.label=3;case 3:return o=zt(i.split("."),6),s=o[0],a=o[1],u=o[2],l=o[3],c=o[4],d=o[5],[2,{deviceId:s,userId:PC(a),sessionId:RC(l),lastEventId:RC(d),lastEventTime:RC(c),optOut:Boolean(u)}]}})})},RC=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},PC=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},MC="[Amplitude]",NC=("".concat(MC," Page Viewed"),"".concat(MC," Form Started")),LC="".concat(MC," Form Submitted"),jC="".concat(MC," File Downloaded"),DC="session_start",UC="session_end",FC="".concat(MC," File Extension"),BC="".concat(MC," File Name"),qC="".concat(MC," Link ID"),zC="".concat(MC," Link Text"),VC="".concat(MC," Link URL"),WC="".concat(MC," Form ID"),HC="".concat(MC," Form Name"),GC="".concat(MC," Form Destination"),KC="cookie";al(),Vf(),Vf();var JC=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},$C=function(e,n,r,i,o,s){void 0===o&&(o=!0);e.referrer;var a,u=e.referring_domain,l=Ut(e,["referrer","referring_domain"]),c=n||{},d=(c.referrer,c.referring_domain),f=Ut(c,["referrer","referring_domain"]),h=r.excludeInternalReferrers;if(h){var p=YC(h,i);if(!_instanceof(p,TypeError)&&e.referring_domain&&eI(e.referring_domain,s)){if("always"===p)return pu(p,e.referring_domain,i),!1;if("ifEmptyCampaign"===p&&(a=t(t({},e),{referring_domain:void 0,referrer:void 0}),Object.values(a).every(function(e){return!e})))return pu(p,e.referring_domain,i),!1}}if(QC(r.excludeReferrers,e.referring_domain))return i.debug("This is not a new campaign because ".concat(e.referring_domain," is in the exclude referrer list.")),!1;if(!o&&function(e){return Object.values(e).every(function(e){return!e})}(e)&&n)return i.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var v=JSON.stringify(l)!==JSON.stringify(f),g=JC(u||"")!==JC(d||""),y=!n||v||g;return y?i.debug("This is a new campaign. An $identify event will be sent."):i.debug("This is not a new campaign because it's the same as the previous one."),y},QC=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=""),e.some(function(e){return _instanceof(e,RegExp)?e.test(t):e===t})},YC=function(e,t){if(!0===e)return Lc.always;if("object"===(void 0===e?"undefined":_type_of(e))){var n=e.condition;if("string"==typeof n&&Object.keys(Lc).includes(n))return n;if(void 0===n)return Lc.always}var r="Invalid configuration provided for attribution.excludeInternalReferrers: ".concat(JSON.stringify(e));return t.error(r),new TypeError(r)},XC=["ac.in","ac.jp","ac.kr","ac.th","ac.uk","ac.za","appspot.com","asn.au","azurewebsites.net","cloudfront.net","myshopify.com","blogspot.com","co.ca","co.in","co.jp","co.kr","co.nz","co.th","co.uk","co.za","com.ar","com.au","com.br","com.cn","com.hk","com.in","com.jp","com.kr","com.mx","com.pl","com.sg","com.tr","com.tw","ed.jp","edu.au","edu.br","edu.cn","edu.hk","edu.sg","edu.th","edu.tr","edu.tw","firebaseapp.com","fly.dev","gc.ca","geek.nz","github.io","gitlab.io","go.jp","go.kr","go.th","gob.ar","gob.mx","gov.au","gov.br","gov.cn","gov.hk","gov.in","gov.pl","gov.sg","gov.tr","gov.tw","gov.uk","gov.za","govt.nz","gr.jp","herokuapp.com","id.au","idv.hk","iwi.nz","lg.jp","ltd.uk","maori.nz","me.uk","mil.kr","ne.jp","ne.kr","net.au","net.br","net.cn","net.hk","net.in","net.nz","net.pl","net.sg","net.tr","net.tw","net.za","onrender.com","or.jp","or.kr","or.th","org.ar","org.au","org.br","org.cn","org.hk","org.in","org.mx","org.nz","org.pl","org.sg","org.tw","org.uk","org.za","pages.dev","pe.kr","plc.uk","re.kr","res.in","sch.uk","vercel.app","netlify.app","workers.dev"],ZC=function(e){var t,n,r=e||(null===(n=null===(t=G())||void 0===t?void 0:t.location)||void 0===n?void 0:n.hostname);if(!r)return"";var i=r.split("."),o=i[i.length-1],s=i[i.length-2];return XC.find(function(e){return r.endsWith(".".concat(e))})&&(o=i[i.length-2]+"."+i[i.length-1],s=i[i.length-3]),s?"".concat(s,".").concat(o):o},eI=function(e,t){var n=G();if(!n)return!1;var r,i,o,s=(t||"").trim()||ZC(n.location.hostname);return r=e,o=(i=s).startsWith(".")?i:".".concat(i),!!(r.startsWith(".")?r:".".concat(r)).endsWith(o)},tI=function(e){function t(t,n,r,i,o,s,a,u,l,c,d,f,h,p,v,g,y,m,b,w,_,S,k,x,E,C,I,O,T,A,R,P,M,N,L,j,D,U,F,B,q,z,V,W){void 0===r&&(r=new Ge),void 0===i&&(i={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===u&&(u=1e3),void 0===l&&(l=5),void 0===c&&(c=30),void 0===d&&(d=KC),void 0===g&&(g=new le),void 0===y&&(y=ae.Warn),void 0===b&&(b=!1),void 0===w&&(w=!1),void 0===k&&(k=""),void 0===x&&(x="US"),void 0===I&&(I=18e5),void 0===O&&(O=new EC({loggerProvider:g})),void 0===T&&(T={ipAddress:!0,language:!0,platform:!0}),void 0===A&&(A="fetch"),void 0===R&&(R=!1),void 0===P&&(P=!0),void 0===U&&(U=!0),void 0===F&&(F=0),void 0===V&&(V=!1);var H,G=this;(G=e.call(this,{apiKey:t,storageProvider:O,transportProvider:iI(A)})||this).apiKey=t,G.appVersion=n,G.cookieOptions=i,G.defaultTracking=o,G.autocapture=s,G.flushIntervalMillis=u,G.flushMaxRetries=l,G.flushQueueSize=c,G.identityStorage=d,G.ingestionMetadata=f,G.instanceName=h,G.loggerProvider=g,G.logLevel=y,G.minIdLength=m,G.offline=b,G.partnerId=_,G.plan=S,G.serverUrl=k,G.serverZone=x,G.sessionTimeout=I,G.storageProvider=O,G.trackingOptions=T,G.transport=A,G.useBatch=R,G.fetchRemoteConfig=P,G.networkTrackingOptions=j,G.identify=D,G.enableDiagnostics=U,G.diagnosticsSampleRate=F,G.diagnosticsClient=B,G.remoteConfig=q,G.topLevelDomain=z,G.enableRequestBodyCompression=V,G.customEnrichment=W,G.version=_C,G._optOut=!1,G._cookieStorage=r,G.deviceId=a,G.lastEventId=p,G.lastEventTime=v,G.optOut=w,G.deferredSessionId=C,G.sessionId=E,G.pageCounter=N,G.userId=M,G.debugLogsEnabled=L,G.loggerProvider.enable(L?ae.Debug:G.logLevel),G.networkTrackingOptions=j,G.identify=D,G.enableDiagnostics=U,G.diagnosticsSampleRate=F,G.diagnosticsClient=B;var K=null!==(H=null==q?void 0:q.fetchRemoteConfig)&&void 0!==H?H:P;return G.remoteConfig=G.remoteConfig||{},G.remoteConfig.fetchRemoteConfig=K,G.fetchRemoteConfig=K,G.topLevelDomain=z||ZC(),G}return Dt(t,e),Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(e){this._deviceId!==e&&(this._deviceId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(e){this._userId!==e&&(this._userId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(e){this._sessionId!==e&&(this._sessionId=e,void 0!==e&&void 0!==this._deferredSessionId&&(this._deferredSessionId=void 0),this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deferredSessionId",{get:function(){return this._deferredSessionId},set:function(e){this._deferredSessionId!==e&&e!==this.sessionId&&(this._deferredSessionId=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,deferredSessionId:this._deferredSessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled,cookieDomain:void 0};_instanceof(this.cookieStorage,Je)&&(e.cookieDomain=this.cookieStorage.options.domain),this.cookieStorage.set(je(this.apiKey),e)},t}(de),nI=function(e,n,r,i,o){return void 0===n&&(n={}),Ft(void 0,void 0,void 0,function(){var s,a,u,l,c,d,f,h,p,v,g,y,m,b,w,_,S,k,x,E,C,I,O,T,A,R,P,M,N,L,j,D,U,F,B,q,z,V,W,H,G,K,J,Q,Y,X,Z,ee,te,ne,re;return Bt(this,function(ie){switch(ie.label){case 0:return s=n.identityStorage||KC,a="",s!==KC||(null===(I=n.cookieOptions)||void 0===I?void 0:I.domain)||""===(null===(O=n.cookieOptions)||void 0===O?void 0:O.domain)?[3,2]:[4,oI(void 0,i)];case 1:a=ie.sent(),ie.label=2;case 2:return u=t({domain:null!==(A=null===(T=n.cookieOptions)||void 0===T?void 0:T.domain)&&void 0!==A?A:a,expiration:365,sameSite:"Lax",secure:!1,upgrade:!0},n.cookieOptions),l={duplicateResolverFn:function(e){var t=Ye(e);if(!t)return!1;var n=JSON.parse(t);return Xe(n.cookieDomain,u.domain)},diagnosticsClient:i},c=rI(n.identityStorage,u,l),[4,AC(e,c,null===(P=null===(R=n.cookieOptions)||void 0===R?void 0:R.upgrade)||void 0===P||P)];case 3:return d=ie.sent(),[4,c.get(je(e))];case 4:return f=ie.sent(),h=Fe(),p=h.ampTimestamp?Number(h.ampTimestamp):void 0,v=!p||Date.now()<p,g=null!==(D=null!==(j=null!==(L=null!==(M=n.deviceId)&&void 0!==M?M:v?null!==(N=h.ampDeviceId)&&void 0!==N?N:h.deviceId:void 0)&&void 0!==L?L:null==f?void 0:f.deviceId)&&void 0!==j?j:d.deviceId)&&void 0!==D?D:$(),y=null!==(U=null==f?void 0:f.lastEventId)&&void 0!==U?U:d.lastEventId,m=null!==(F=null==f?void 0:f.lastEventTime)&&void 0!==F?F:d.lastEventTime,b=null!==(q=null!==(B=n.optOut)&&void 0!==B?B:null==f?void 0:f.optOut)&&void 0!==q?q:d.optOut,w=null!==(z=null==f?void 0:f.sessionId)&&void 0!==z?z:d.sessionId,_=null==f?void 0:f.deferredSessionId,S=null!==(W=null!==(V=n.userId)&&void 0!==V?V:null==f?void 0:f.userId)&&void 0!==W?W:d.userId,r.previousSessionDeviceId=null!==(H=null==f?void 0:f.deviceId)&&void 0!==H?H:d.deviceId,r.previousSessionUserId=null!==(G=null==f?void 0:f.userId)&&void 0!==G?G:d.userId,k={ipAddress:null===(J=null===(K=n.trackingOptions)||void 0===K?void 0:K.ipAddress)||void 0===J||J,language:null===(Y=null===(Q=n.trackingOptions)||void 0===Q?void 0:Q.language)||void 0===Y||Y,platform:null===(Z=null===(X=n.trackingOptions)||void 0===X?void 0:X.platform)||void 0===Z||Z},x=null==f?void 0:f.pageCounter,E=null==f?void 0:f.debugLogsEnabled,void 0!==n.autocapture&&(n.defaultTracking=n.autocapture),[4,(C=new tI(e,n.appVersion,c,u,n.defaultTracking,n.autocapture,g,n.flushIntervalMillis,n.flushMaxRetries,n.flushQueueSize,s,n.ingestionMetadata,n.instanceName,y,m,null!==(ee=null==o?void 0:o.loggerProvider)&&void 0!==ee?ee:n.loggerProvider,n.logLevel,n.minIdLength,n.offline,b,n.partnerId,n.plan,n.serverUrl,null!==(te=null==o?void 0:o.serverZone)&&void 0!==te?te:n.serverZone,w,_,n.sessionTimeout,n.storageProvider,k,n.transport,n.useBatch,n.fetchRemoteConfig,S,x,E,n.networkTrackingOptions,n.identify,null!==(ne=null==o?void 0:o.enableDiagnostics)&&void 0!==ne?ne:n.enableDiagnostics,null!==(re=null==o?void 0:o.diagnosticsSampleRate)&&void 0!==re?re:r._diagnosticsSampleRate,i,n.remoteConfig,a,n.enableRequestBodyCompression,n.customEnrichment)).storageProvider.isEnabled()];case 5:return ie.sent()||(C.loggerProvider.warn("Storage provider ".concat(C.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),C.storageProvider=new Ge),[2,C]}})})},rI=function(e,n,r){switch(void 0===e&&(e=KC),void 0===n&&(n={}),e){case"localStorage":return new EC;case"sessionStorage":return new CC;case"none":return new Ge;default:return new Je(t(t({},n),{expirationDays:n.expiration}),r)}},iI=function(e){var t="object"===(void 0===e?"undefined":_type_of(e))?e.type:e,n="object"===(void 0===e?"undefined":_type_of(e))?e.headers:void 0;return"xhr"===t?new IC(n):"beacon"===t?new TC:new OC(n)},oI=function(e,t){return Ft(void 0,void 0,void 0,function(){var n,r,i,o,s,a,u;return Bt(this,function(l){switch(l.label){case 0:return[4,new Je(void 0,{diagnosticsClient:t}).isEnabled()];case 1:if(!l.sent()||!e&&("undefined"==typeof location||!location.hostname))return[2,""];if(n=null!=e?e:location.hostname,1===(r=n.split(".")).length)return[2,""];for(i=[],o=1,XC.find(function(e){return n.endsWith(".".concat(e))})&&(o=2),s=r.length-o-1;s>=0;--s)i.push(r.slice(s).join("."));s=0,l.label=2;case 2:if(!(s<i.length))return[3,7];a=i[s],l.label=3;case 3:return l.trys.push([3,5,,6]),[4,Je.isDomainWritable(a)];case 4:return l.sent()?[2,"."+a]:[3,6];case 5:return u=l.sent(),t&&t.recordEvent("cookies.tld.failure",{reason:"Unexpected exception checking domain is writable: ".concat(a),error:_instanceof(u,Error)?u.message:String(u)}),[3,6];case 6:return s++,[3,2];case 7:return t&&t.recordEvent("cookies.tld.failure",{reason:"Could not determine TLD for host ".concat(n)}),[2,""]}})})};al(),Vf();var sI="AMP_PAGE_VIEW",aI=function(e){var n;void 0===e&&(e={});var r,i,o=G(),s=void 0,a=!1,u=e.trackOn,l=e.trackHistoryChanges,c=e.eventType,d=void 0===c?"[Amplitude] Page Viewed":c,f=function(e){var t=e;try{t=decodeURI(e)}catch(e){null==s||s.error("Malformed URI sequence: ",e)}return t},h=function(e){return Ft(void 0,void 0,void 0,function(){var n,r,i;return Bt(this,function(o){switch(o.label){case 0:return n=f("undefined"!=typeof location&&location.href||""),i={event_type:d},r=[{}],[4,uI()];case 1:return[2,(i.event_properties=t.apply(void 0,[t.apply(void 0,r.concat([o.sent()])),{"[Amplitude] Page Domain":"undefined"!=typeof location&&location.hostname||"","[Amplitude] Page Location":n,"[Amplitude] Page Path":"undefined"!=typeof location&&f(location.pathname)||"","[Amplitude] Page Title":Sc(_c),"[Amplitude] Page URL":n.split("?")[0],"[Amplitude] Page View ID":e}]),i)]}})})},p=function(){return void 0===u||"function"==typeof u&&u()},v="undefined"!=typeof location?location.href:null,g=function(){Ft(void 0,void 0,void 0,function(){var e,t,r,o,a;return Bt(this,function(u){switch(u.label){case 0:return e=location.href,t=cI(l,e,v||"")&&p(),v=e,t?(r=void 0,i&&(r=$(),i.set(sI,{pageViewId:r})),null==s||s.log("Tracking page view event"),null!=n?[3,1]:[3,3]):[3,4];case 1:return a=(o=n).track,[4,h(r)];case 2:a.apply(o,[u.sent()]),u.label=3;case 3:u.label=4;case 4:return[2]}})})};return{name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(e,t){return Ft(void 0,void 0,void 0,function(){var u,l,c;return Bt(this,function(d){switch(d.label){case 0:if(n=t,r=e,(s=e.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),a=!0,o){try{i=new et(o.sessionStorage)}catch(e){null==s||s.debug("sessionStorage is not available in this environment.")}o.addEventListener("popstate",g),o.history.pushState=new Proxy(o.history.pushState,{apply:function(e,t,n){var r=zt(n,3),i=r[0],o=r[1],s=r[2];e.apply(t,[i,o,s]),a&&g()}})}return p()?(s.log("Tracking page view event"),u=void 0,i&&(u=$(),i.set(sI,{pageViewId:u})),c=(l=n).track,[4,h(u)]):[3,2];case 1:c.apply(l,[d.sent()]),d.label=2;case 2:return[2]}})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){var n,o,a;return Bt(this,function(l){switch(l.label){case 0:return"attribution"===u&&lI(e)?(null==s||s.log("Enriching campaign event to page view event with campaign parameters"),n=void 0,i?[4,i.get(sI)]:[3,2]):[3,4];case 1:o=l.sent(),n=null==o?void 0:o.pageViewId,l.label=2;case 2:return[4,h(n)];case 3:a=l.sent(),e.event_type=a.event_type,e.event_properties=t(t({},e.event_properties),a.event_properties),l.label=4;case 4:return r&&e.event_type===d&&(r.pageCounter=r.pageCounter?r.pageCounter+1:1,e.event_properties=t(t({},e.event_properties),{"[Amplitude] Page Counter":r.pageCounter})),[2,e]}})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(e){return o&&(o.removeEventListener("popstate",g),a=!1),[2]})})}}},uI=function(){return Ft(void 0,void 0,void 0,function(){var e;return Bt(this,function(t){switch(t.label){case 0:return e=He,[4,(new vc).parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},lI=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,r=t[n.SET]||{},i=t[n.UNSET]||{},o=Vt(Vt([],zt(Object.keys(r)),!1),zt(Object.keys(i)),!1);return Object.keys(T).every(function(e){return o.includes(e)})}return!1},cI=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};al(),Vf();var dI=function(){var e,t,n=[],r=function(e,t,r){e.addEventListener(t,r),n.push({element:e,type:t,handler:r})};return{name:"@amplitude/plugin-form-interaction-tracking-browser",type:"enrichment",setup:function(n,i){return Ft(void 0,void 0,void 0,function(){var o,s;return Bt(this,function(a){return t=function(e){if(uC(e.defaultTracking)&&e.defaultTracking&&"object"===_type_of(e.defaultTracking)&&"object"===_type_of(e.defaultTracking.formInteractions))return e.defaultTracking.formInteractions}(n),o=function(){if(i){if("undefined"!=typeof document){var o=new WeakSet,s=function(e){if(!o.has(e)){o.add(e);var s=!1;r(e,"change",function(){var t,n=hI(e);s||i.track(NC,((t={})[WC]=fI(e.id),t[HC]=fI(e.name),t[GC]=n,t)),s=!0}),r(e,"submit",function(r){var o,a,u=hI(e);if(s||i.track(NC,((o={})[WC]=fI(e.id),o[HC]=fI(e.name),o[GC]=u,o)),s=!0,void 0!==(null==t?void 0:t.shouldTrackSubmit))if("function"==typeof t.shouldTrackSubmit&&"undefined"!=typeof SubmitEvent&&_instanceof(r,SubmitEvent))try{if(!t.shouldTrackSubmit(r))return}catch(e){n.loggerProvider.warn("shouldTrackSubmit callback threw an error, proceeding with tracking.")}else n.loggerProvider.warn("shouldTrackSubmit is ignored because it is not a function or event is not a SubmitEvent.");i.track(LC,((a={})[WC]=fI(e.id),a[HC]=fI(e.name),a[GC]=u,a)),s=!1})}};Array.from(document.getElementsByTagName("form")).forEach(s),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"FORM"===e.nodeName&&s(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("form")).map(s)})})})).observe(document.body,{subtree:!0,childList:!0})}}else n.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.")},"complete"===document.readyState?o():(s=G())?s.addEventListener("load",o):n.loggerProvider.debug("Form interaction tracking is not installed because global is undefined."),[2]})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){return[2,e]})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){return null==e||e.disconnect(),n.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),n=[],[2]})})}}},fI=function(e){if("string"==typeof e)return e},hI=function(e){var t=e.getAttribute("action");try{t=new URL(encodeURI(null!=t?t:""),window.location.href).href}catch(e){}return t};al(),Vf();var pI=function(){var e,t=[];return{name:"@amplitude/plugin-file-download-tracking-browser",type:"enrichment",setup:function(n,r){return Ft(void 0,void 0,void 0,function(){var i,o;return Bt(this,function(s){return i=function(){if(r){if("undefined"!=typeof document){var i=function(e){var n;try{n=new URL(e.href,window.location.href)}catch(e){return}var i,s,a,u=o.exec(n.href),l=null==u?void 0:u[1];l&&(s="click",a=function(){var t;l&&r.track(jC,((t={})[FC]=l,t[BC]=n.pathname,t[qC]=e.id,t[zC]=e.text,t[VC]=e.href,t))},(i=e).addEventListener(s,a),t.push({element:i,type:s,handler:a}))},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.forEach(function(e){"A"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("a")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}}else n.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.")},"complete"===document.readyState?i():(o=G())?o.addEventListener("load",i):n.loggerProvider.debug("File download tracking is not installed because global is undefined."),[2]})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){return[2,e]})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(n){return null==e||e.disconnect(),t.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),t=[],[2]})})}}},vI=!1;al(),Vf();var gI=function(){var e=G(),t=[],n=function(n,r){(null==e?void 0:e.addEventListener)&&(null==e||e.addEventListener(n,r),t.push({type:n,handler:r}))};return{name:"@amplitude/plugin-network-checker-browser",type:"before",setup:function(e,t){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(r){return"undefined"==typeof navigator?(e.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),e.offline=!1,[2]):(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 Ft(void 0,void 0,void 0,function(){return Bt(this,function(n){return t.forEach(function(t){var n=t.type,r=t.handler;null==e||e.removeEventListener(n,r)}),t=[],[2]})})}}};function yI(e){var t,n,r,i,o,s,a,u,l,c,d,f;if("object"===(void 0===e?"undefined":_type_of(e))&&null!==e&&!Array.isArray(e)){var h=Object.keys(e);try{for(var p=qt(h),v=p.next();!v.done;v=p.next()){var g=v.value;try{var y=e[g];"boolean"==typeof(null==y?void 0:y.enabled)&&(y.enabled?(delete y.enabled,0===Object.keys(y).length&&(e[g]=!0)):e[g]=!1),yI(y)}catch(e){}}}catch(e){t={error:e}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}try{if(null===(l=null===(u=null===(a=e.autocapture)||void 0===a?void 0:a.networkTracking)||void 0===u?void 0:u.captureRules)||void 0===l?void 0:l.length)try{for(var m=qt(e.autocapture.networkTracking.captureRules),b=m.next();!b.done;b=m.next()){var w=b.value;try{for(var _=(o=void 0,qt(["responseHeaders","requestHeaders"])),S=_.next();!S.done;S=_.next()){var k=S.value,x=null!==(c=w[k])&&void 0!==c?c:{},E=x.captureSafeHeaders,C=x.allowlist;(E||C)&&(void 0===C||Array.isArray(C)?w[k]=Vt(Vt([],zt(E?A:[]),!1),zt(null!=C?C:[]),!1):delete w[k])}}catch(e){o={error:e}}finally{try{S&&!S.done&&(s=_.return)&&s.call(_)}finally{if(o)throw o.error}}}}catch(e){r={error:e}}finally{try{b&&!b.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}}catch(e){}var I=null===(d=e.autocapture)||void 0===d?void 0:d.frustrationInteractions;I&&(I.rageClick&&(I.rageClicks=I.rageClick,delete I.rageClick),I.deadClick&&(I.deadClicks=I.deadClick,delete I.deadClick));try{var O=null===(f=e.autocapture)||void 0===f?void 0:f.elementInteractions;if(O&&"object"===(void 0===O?"undefined":_type_of(O))&&(!0===O.viewportContentUpdated&&(O.viewportContentUpdated={}),!1===O.viewportContentUpdated&&(O.viewportContentUpdated={enabled:!1}),void 0!==O.exposureDuration)){var T=O.viewportContentUpdated;void 0===T?O.viewportContentUpdated={exposureDuration:O.exposureDuration}:"object"===(void 0===T?"undefined":_type_of(T))&&void 0===T.exposureDuration&&!1!==T.enabled&&(T.exposureDuration=O.exposureDuration),delete O.exposureDuration}}catch(e){}}}al(),Vf(),al(),Vf();var mI="1.27.2";Vf();var bI="[Amplitude] Element Clicked",wI="[Amplitude] Dead Click",_I="[Amplitude] Rage Click",SI="[Amplitude] Error Click",kI="[Amplitude] Element Changed",xI="[Amplitude] Main Thread Block",EI="[Amplitude] Element Tag",CI="[Amplitude] Element Text",II="[Amplitude] Page URL",OI="[Amplitude] Viewport Height",TI="[Amplitude] Viewport Width",AI="[Amplitude] Max Page X",RI="[Amplitude] Max Page Y",PI="[Amplitude] Page View ID",MI="https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz",NI="amp-visual-tagging-selector-highlight",LI="data-amp-mask-attributes",jI=128,DI=18e3;al(),Vf();var UI,FI,BI=["input","select","textarea"],qI=function(e,t){var n,r=null===(n=null===window||void 0===window?void 0:window.getComputedStyle)||void 0===n?void 0:n.call(window,e);return"pointer"===(null==r?void 0:r.getPropertyValue("cursor"))&&"click"===t},zI=function(e){var t=e.pageUrlAllowlist,n=e.pageUrlExcludelist;return!(n&&n.length>0&&qe(window.location.href,n))&&!!qe(window.location.href,t)},VI=function(e,t,n){return void 0===n&&(n=!1),function(r,i){var o,s,a=e.shouldTrackEventResolver,u=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(!u)return!1;if(a)return a(r,i);if(!zI(e))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 c=qI(i,r);if(n&&c)return!0;if(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(u){case"input":case"select":case"textarea":return"change"===r||"click"===r;default:return!!c||"click"===r}}},WI=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=!!_instanceof(e,HTMLElement)&&"true"===(null===(r=e.getAttribute("contenteditable"))||void 0===r?void 0:r.toLowerCase());return!BI.includes(i)&&!o},HI=function(e){return e?e.split(",").map(function(e){return e.trim()}).filter(function(e){return e.length>0&&"id"!==e&&"class"!==e}):[]},GI=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return function(e){return null==e||"object"===(void 0===e?"undefined":_type_of(e))&&0===Object.keys(e).length||"string"==typeof e&&0===e.trim().length}(r)||(t[n]=r),t},{})},KI=function(){var e;try{var t=G(),n=null===(e=null==t?void 0:t.sessionStorage)||void 0===e?void 0:e.getItem("AMP_PAGE_VIEW");if(!n)return;var r=JSON.parse(n);if("string"==typeof r.pageViewId)return r.pageViewId}catch(e){}},JI=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:JI(null==e?void 0:e.parentElement,t):null},$I=function(e){return!(null===e.event.target||!e.closestTrackedAncestor)};(FI=UI||(UI={}))[FI.LEFT_OR_TOUCH_CONTACT=0]="LEFT_OR_TOUCH_CONTACT",FI[FI.MIDDLE=1]="MIDDLE",FI[FI.RIGHT=2]="RIGHT";var QI="__AMPLITUDE_VISUAL_TAGGING__";Vf(),Vf(),al(),Vf();var YI=G(),XI=function(){return new kc.default(function(e){var t=new MutationObserver(function(t){e.next(t)});return document.body&&t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}})},ZI=function(e){return void 0===e&&(e="click"),new kc.default(function(t){var n,r=function(e){t.next(e)};return null===(n=G())||void 0===n||n.document.addEventListener(e,r,{capture:!0}),function(){var t;null===(t=G())||void 0===t||t.document.removeEventListener(e,r,{capture:!0})}})},eO=function(){var e=un(new kc.default(function(e){var n=function(n){if(_instanceof(n,ErrorEvent)){var r={kind:"error"};_instanceof(n.error,Error)||_instanceof(n.error,DOMException)?r=t(t({},r),{message:n.error.message,stack:n.error.stack,filename:n.filename,lineNumber:n.lineno,columnNumber:n.colno}):"string"==typeof n.error&&(r.message=n.error),e.next(r)}};return YI.addEventListener("error",n),function(){YI.removeEventListener("error",n)}}),new kc.default(function(e){var t=function(t){var n={kind:"unhandledrejection"};_instanceof(t.reason,Error)||_instanceof(t.reason,DOMException)?(n.message=t.reason.message,n.stack=t.reason.stack):"string"==typeof t.reason&&(n.message=t.reason),e.next(n)};return YI.addEventListener("unhandledrejection",t),function(){YI.removeEventListener("unhandledrejection",t)}}));return un(e,new kc.default(function(e){var t=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=void 0;Array.isArray(n[0])&&"string"==typeof n[0][0]&&(i=n[0][0]),e.next({kind:"console",message:i})};return kt.addListener("error",t),function(){kt.removeListener(t)}}))};al();var tO=function(e,t,n){e.forEach(function(e){if("string"!=typeof e&&"ATTACH_EVENT_PROPERTY"===e.actionType){var r=n.extractDataFromDataSource(e.dataSource,t.closestTrackedAncestor);t.targetElementProperties[e.destinationKey]=r}})},nO={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},rO=function(e){var t,n,r,i,o=Object.values(nO).reduce(function(e,t){return e[t]=new Set,e},{});if(!e)return o;try{for(var s=qt(e),a=s.next();!a.done;a=s.next()){var u=a.value;try{try{for(var l=(r=void 0,qt(u.definition)),c=l.next();!c.done;c=l.next()){var d=c.value,f=nO[d.event_type];f&&o[f].add(u.id)}}catch(e){r={error:e}}finally{try{c&&!c.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==u?void 0:u.id,e)}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return o},iO=function(e){var t,n,r,i,o=new Map;try{for(var s=qt(e),a=s.next();!a.done;a=s.next()){var u=a.value;try{for(var l=(r=void 0,qt(u.conditions)),c=l.next();!c.done;c=l.next()){var d=c.value;if("LABELED_EVENT"===d.type){var f=d.match.eventId,h=o.get(f);h||(h=[],o.set(f,h)),h.push(u)}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return o},oO=function(e,t){return t.filter(function(t){return t.definition.some(function(t){return nO[t.event_type]===e.type&&t.filters.every(function(t){return function(e,t){try{if("[Amplitude] Element Text"===t.subprop_key)return"is"===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){return console.error("Error matching event to filter",e),!1}return!1}(e,t)})})})},sO=function(){function e(e,t,n,r){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.dataExtractor=n,this.options=r}return e.prototype.evaluate=function(e){var t,n,r=this.options.pageActions;if(!r)return e;var i=function(e,t){var n,r,i,o,s=new Set;try{for(var a=qt(e),u=a.next();!u.done;u=a.next()){var l=u.value,c=t.get(l.id);if(c)try{for(var d=(i=void 0,qt(c)),f=d.next();!f.done;f=d.next()){var h=f.value;s.add(h)}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return Array.from(s)}(oO(e,Array.from(this.groupedLabeledEvents[e.type]).map(function(e){return r.labeledEvents[e]})),this.labeledEventToTriggerMap);try{for(var o=qt(i),s=o.next();!s.done;s=o.next()){var a=s.value;tO(a.actions,e,this.dataExtractor)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return e},e.prototype.update=function(e,t,n){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.options=n},e}();al(),Vf(),al(),Vf();var aO=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",LI,gc]),uO=["type"],lO=["svg","path","g"],cO=["password","hidden"];al();var dO,fO,hO=function(){function e(e,t){this.value=e,this.optimized=t}return e.prototype.toString=function(){return this.value},e}(),pO=function(e,t,n){var r,i;if(e.nodeType!==Node.ELEMENT_NODE)return null;var o=e.getAttribute("id");if(t){if(o)return new hO(c(o),!0);var s=e.tagName.toLowerCase();if("body"===s||"head"===s||"html"===s)return new hO(s,!0)}var a=e.tagName.toLowerCase();if(o)return new hO(a+c(o),!0);var u=e.parentNode;if(!u||u.nodeType===Node.DOCUMENT_NODE)return new hO(a,!0);function l(e){var t=e.getAttribute("class");return t?t.split(/\s+/g).filter(Boolean).map(function(e){return"$"+e}):[]}function c(e){return"#"+CSS.escape(e)}for(var d=l(e),f=!1,h=!1,p=-1,v=-1,g=u.children,y=0;g&&(-1===p||!h)&&y<g.length;++y){var m=g[y];if(m.nodeType===Node.ELEMENT_NODE)if(v+=1,m!==e){if(!h&&m.tagName.toLowerCase()===a){f=!0;var b=new Set(d);if(b.size)for(var w=l(m),_=0;_<w.length;++_){var S=w[_];if(b.has(S)&&(b.delete(S),!b.size)){h=!0;break}}else h=!0}}else p=v}var k=a;if(n&&"input"===a.toLowerCase()&&e.getAttribute("type")&&!e.getAttribute("id")&&!e.getAttribute("class")&&(k+="[type="+CSS.escape(e.getAttribute("type")||"")+"]"),h)k+=":nth-child("+String(p+1)+")";else if(f)try{for(var x=qt(d),E=x.next();!E.done;E=x.next()){var C=E.value;k+="."+CSS.escape(C.slice(1))}}catch(e){r={error:e}}finally{try{E&&!E.done&&(i=x.return)&&i.call(x)}finally{if(r)throw r.error}}return new hO(k,!1)},vO=function(e,t){var n,r,i,o=this;this.replaceSensitiveString=function(e){return _c(e,o.additionalMaskTextPatterns)},this.getHierarchy=function(e){var t,n,r,i,s,a=performance.now();if(!e)return[];for(var u=function(e){var t=[];if(!e)return t;t.push(e);for(var n=e.parentElement;n&&"HTML"!==n.tagName;)t.push(n),n=n.parentElement;return t}(e),l=new Map,c=u.length-1;c>=0;c--){var d=u[c];if(d){var f=HI(d.getAttribute(LI)),h=c===u.length-1?[]:null!==(r=l.get(u[c+1]))&&void 0!==r?r:new Set,p=new Set(Vt(Vt([],zt(h),!1),zt(f),!1));l.set(d,p)}}s=u.map(function(e){var t;return function(e,t){var n,r,i,o,s,a;if(null===e)return null;var u=String(e.tagName).toLowerCase(),l={tag:u},c=Array.from(null!==(o=null===(i=e.parentElement)||void 0===i?void 0:i.children)&&void 0!==o?o:[]);c.length&&(l.index=c.indexOf(e),l.indexOfType=c.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var d=null===(a=null===(s=e.previousElementSibling)||void 0===s?void 0:s.tagName)||void 0===a?void 0:a.toLowerCase();d&&(l.prevSib=String(d));var f=e.getAttribute("id");f&&(l.id=String(f));var h=Array.from(e.classList);h.length&&(l.classes=h);var p={},v=Array.from(e.attributes).filter(function(e){return!aO.has(e.name)}),g=!WI(e);if(!cO.includes(String(e.getAttribute("type")))&&!lO.includes(u))try{for(var y=qt(v),m=y.next();!m.done;m=y.next()){var b=m.value;g&&!uO.includes(b.name)||(t.has(b.name)?p[b.name]=yc:p[b.name]=String(b.value).substring(0,jI))}}catch(e){n={error:e}}finally{try{m&&!m.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}return Object.keys(p).length&&(l.attrs=p),l}(e,null!==(t=l.get(e))&&void 0!==t?t:new Set)});var v=function(e){(null==e?void 0:e.attrs)&&Object.entries(e.attrs).forEach(function(t){var n=zt(t,2),r=n[0],i=n[1];e.attrs&&(e.attrs[r]=o.replaceSensitiveString(i))})};try{for(var g=qt(s),y=g.next();!y.done;y=g.next())v(y.value)}catch(e){t={error:e}}finally{try{y&&!y.done&&(n=g.return)&&n.call(g)}finally{if(t)throw t.error}}var m=performance.now();return null===(i=o.diagnosticsClient)||void 0===i||i.recordHistogram("autocapturePlugin.getHierarchy",m-a),s},this.getNearestLabel=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}return t?o.getText(t):o.getNearestLabel(n)},this.getElementPath=function(e){var t;if(!e)return"";var n=performance.now(),r=function(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return"";for(var n=[],r=e;r;){var i=pO(r,Boolean(t),r===e);if(!i)break;if(n.push(i),i.optimized)break;r=r.parentElement}return n.reverse(),n.join(" > ")}(e),i=performance.now();return null===(t=o.diagnosticsClient)||void 0===t||t.recordHistogram("autocapturePlugin.getElementPath",i-n),r},this.getEventProperties=function(e,t,n){var r,i,s,a,u,l,c=null===(s=null===(i=null==t?void 0:t.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===s?void 0:s.call(i),d="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},f=o.getHierarchy(t),h=null===(a=f[0])||void 0===a?void 0:a.attrs,p=o.getNearestLabel(t),v=(u=null!=h?h:{},l=n,Object.entries(u).reduce(function(e,t){var n=zt(t,2),r=n[0],i=n[1];if(r.startsWith(l)){var o=r.replace(l,"");o&&(e[o]=i||"")}return e},{})),g=((r={})["[Amplitude] Element Hierarchy"]=f,r[EI]=c,r[CI]=o.getText(t),r["[Amplitude] Element Position Left"]=null==d.left?null:Math.round(d.left),r["[Amplitude] Element Position Top"]=null==d.top?null:Math.round(d.top),r["[Amplitude] Element Attributes"]=v,r["[Amplitude] Element Path"]=o.getElementPath(t),r["[Amplitude] Element Parent Label"]=p,r[II]=ze(window.location.href.split("?")[0]),r["[Amplitude] Page Title"]=Sc(o.replaceSensitiveString),r[OI]=window.innerHeight,r[TI]=window.innerWidth,r),y=KI();if(y&&(g[PI]=y),g["[Amplitude] Element ID"]=t.getAttribute("id")||"",g["[Amplitude] Element Class"]=t.getAttribute("class"),g["[Amplitude] Element Aria Label"]=null==h?void 0:h["aria-label"],"a"===c&&"click"===e&&_instanceof(t,HTMLAnchorElement)){var m=t.href.substring(0,jI);g["[Amplitude] Element Href"]=o.replaceSensitiveString(m)}return GI(g)},this.addTypeAndTimestamp=function(e,t){return{event:e,timestamp:Date.now(),type:t}},this.addAdditionalEventProperties=function(e,t,n,r,i){void 0===i&&(i=!1);var s=o.addTypeAndTimestamp(e,t);if(function(e){return"click"===e.type||"change"===e.type}(s)&&null!==s.event.target){if(i&&qI(s.event.target,s.type))return s.closestTrackedAncestor=s.event.target,s.targetElementProperties=o.getEventProperties(s.type,s.closestTrackedAncestor,r),s;var a=JI(s.event.target,n);return a&&(s.closestTrackedAncestor=a,s.targetElementProperties=o.getEventProperties(s.type,a,r)),s}return s},this.extractDataFromDataSource=function(e,t){if("DOM_ELEMENT"===e.sourceType){var n=function(e,t){try{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}}catch(e){return}}(e,t);if(!n)return;return"TEXT"===e.elementExtractType?o.getText(n):"ATTRIBUTE"===e.elementExtractType&&e.attribute?n.getAttribute(e.attribute):void 0}},this.getTextWithMaskedDescendants=function(e){var t,n,r="[".concat(gc,"], [contenteditable]");if(!e.querySelector(r))return e.innerText;var i="",s=Array.from(e.childNodes);try{for(var a=qt(s),u=a.next();!u.done;u=a.next()){var l=u.value;l.nodeType!==Node.TEXT_NODE?_instanceof(l,Element)&&(l.hasAttribute(gc)||l.hasAttribute("contenteditable")?i+=yc:i+=o.getTextWithMaskedDescendants(l)):i+=l.textContent||""}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return i},this.getText=function(e){if(null!==e.closest("[".concat(gc,"]")))return yc;var t="";return t=e.querySelector("[".concat(gc,"], [contenteditable]"))?o.getTextWithMaskedDescendants(e):e.innerText||"",o.replaceSensitiveString(t.substring(0,255)).replace(/\s+/g," ").trim()},this.getEventTagProps=function(e){var t,n,r;if(!e)return{};var 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),s=((t={})[EI]=i,t[CI]=o.getText(e),t[II]=window.location.href.split("?")[0],t);return GI(s)},this.diagnosticsClient=null==t?void 0:t.diagnosticsClient;var s=null!==(i=e.maskTextRegex)&&void 0!==i?i:[],a=[];try{for(var u=qt(s),l=u.next();!l.done;l=u.next()){var c=l.value;if(a.length>=25)break;if(_instanceof(c,RegExp))a.push(c);else if("pattern"in c&&"string"==typeof c.pattern)try{a.push(new RegExp(c.pattern,"i"))}catch(e){}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}this.additionalMaskTextPatterns=a};Vf(),Vf(),Vf(),(fO=dO||(dO={})).ClickObservable="clickObservable",fO.ChangeObservable="changeObservable",fO.NavigateObservable="navigateObservable",fO.MutationObservable="mutationObservable",fO.ScrollObservable="scrollObservable",fO.ExposureObservable="exposureObservable",fO.BrowserErrorObservable="browserErrorObservable",fO.SelectionObservable="selectionObservable",fO.MouseMoveObservable="mouseMoveObservable";var gO=function(e,n){var r,i,o,s,a,u,l,c,d,f,h,p;void 0===e&&(e={}),null==n||n.diagnosticsClient.setTag("plugin.autocapture.version",mI);var v=e.dataAttributePrefix,g=void 0===v?It:v,y=e.visualTaggingOptions,m=void 0===y?{enabled:!0}:y;e.cssSelectorAllowlist=null!==(r=e.cssSelectorAllowlist)&&void 0!==r?r:Ct,e.actionClickAllowlist=null!==(i=e.actionClickAllowlist)&&void 0!==i?i:Ot,e.debounceTime=null!==(o=e.debounceTime)&&void 0!==o?o:0;var b=!1!==(null===(s=e.viewportContentUpdated)||void 0===s?void 0:s.enabled),w=null!==(l=null!==(u=null===(a=e.viewportContentUpdated)||void 0===a?void 0:a.exposureDuration)&&void 0!==u?u:e.exposureDuration)&&void 0!==l?l:Tt;e.viewportContentUpdated=t(t({},e.viewportContentUpdated),{exposureDuration:w}),e.pageUrlExcludelist=null===(c=e.pageUrlExcludelist)||void 0===c?void 0:c.reduce(function(e,t){if("string"==typeof t&&e.push(t),_instanceof(t,RegExp)&&e.push(t),"object"===(void 0===t?"undefined":_type_of(t))&&null!==t&&"pattern"in t)try{e.push(new RegExp(t.pattern))}catch(n){return console.warn("Invalid regex pattern: ".concat(t.pattern),n),e}return e},[]);var _,S="@amplitude/plugin-autocapture-browser",k=[],x=new vO(e,n),E=new Set,C=new Set,I=function(){var t,n,r=ln(ZI().map(function(t){return x.addAdditionalEventProperties(t,"click",e.cssSelectorAllowlist,g)})),i=ln(new kc.default(function(t){var n,r=function(n){var r=x.addAdditionalEventProperties(n,"change",e.cssSelectorAllowlist,g);t.next(r)};return null===(n=G())||void 0===n||n.document.addEventListener("change",r,{capture:!0}),function(){var e;return null===(e=G())||void 0===e?void 0:e.document.removeEventListener("change",r)}}));window.navigation&&(n=ln(new kc.default(function(t){var n=function(n){var r=x.addAdditionalEventProperties(n,"navigate",e.cssSelectorAllowlist,g);t.next(r)};return window.navigation.addEventListener("navigate",n),function(){window.navigation.removeEventListener("navigate",n)}})));var o=ln(XI().map(function(t){return x.addAdditionalEventProperties(t,"mutation",e.cssSelectorAllowlist,g)})),s=new kc.default(function(e){var t,n=function(t){e.next(t)};return null===(t=G())||void 0===t||t.addEventListener("scroll",n),function(){var e;null===(e=G())||void 0===e||e.removeEventListener("scroll",n)}}),a=function(e,t){return new kc.default(function(n){var r,i=G();if(!(null==i?void 0:i.IntersectionObserver))return function(){};var o=new IntersectionObserver(function(e){e.forEach(function(e){n.next(e)})},{root:null,rootMargin:"0px",threshold:1}),s=t.join(",");(null!==(r=null==i?void 0:i.document.querySelectorAll(s))&&void 0!==r?r:[]).forEach(function(e){o.observe(e)});var a=e.subscribe(function(e){return e.event.forEach(function(e){return e.addedNodes.forEach(function(e){_instanceof(e,Element)&&(e.matches(s)&&o.observe(e),e.querySelectorAll(s).forEach(function(e){o.observe(e)}))})})});return function(){a.unsubscribe(),o.disconnect()}})}(o,e.cssSelectorAllowlist);return(t={})[dO.ChangeObservable]=i,t[dO.ClickObservable]=r,t[dO.MutationObservable]=o,t[dO.NavigateObservable]=n,t[dO.ScrollObservable]=s,t[dO.ExposureObservable]=a,t},O=rO(Object.values(null!==(f=null===(d=e.pageActions)||void 0===d?void 0:d.labeledEvents)&&void 0!==f?f:{})),T=iO(null!==(p=null===(h=e.pageActions)||void 0===h?void 0:h.triggers)&&void 0!==p?p:[]),A=function(e,t,n,r){return new sO(e,t,n,r)}(O,T,x,e);return{name:S,type:"enrichment",setup:function(n,r){return Ft(void 0,void 0,void 0,function(){var i,o,s,a,u,l,c,d,f,h,p,v,y,R,P,M,N,L,j,D,U;return Bt(this,function(F){return"undefined"==typeof document||(i=!1,o={maxX:void 0,maxY:void 0},n.fetchRemoteConfig&&(n.remoteConfigClient?n.remoteConfigClient.subscribe("configs.analyticsSDK.pageActions","all",function(n){!function(n){var r,i;n&&(e.pageActions=t(t({},e.pageActions),n),O=rO(Object.values(null!==(r=e.pageActions.labeledEvents)&&void 0!==r?r:{})),T=iO(null!==(i=e.pageActions.triggers)&&void 0!==i?i:[]),A.update(O,T,e))}(n)}):n.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),s=VI(e,e.cssSelectorAllowlist),a=VI(e,e.actionClickAllowlist),u=I(),l=function(e){var t=e.amplitude,n=e.allObservables,r=e.shouldTrackEvent,i=e.evaluateTriggers;return n.clickObservable.filter($I).filter(function(e){return r("click",e.closestTrackedAncestor)}).map(function(e){return i(e)}).subscribe(function(e){null==t||t.track(bI,e.targetElementProperties)})}({allObservables:u,amplitude:r,shouldTrackEvent:s,evaluateTriggers:A.evaluate.bind(A)}),k.push(l),c=function(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackEvent,o=e.evaluateTriggers;return n.changeObservable.filter($I).filter(function(e){return i("change",e.closestTrackedAncestor)}).map(function(e){return o(e)}).subscribe(function(e){null==t||t.track(kI,r("change",e.closestTrackedAncestor))})}({allObservables:u,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return x.getEventProperties.apply(x,Vt(Vt([],zt(e),!1),[g],!1))},amplitude:r,shouldTrackEvent:s,evaluateTriggers:A.evaluate.bind(A)}),k.push(c),d=function(e){var t=e.amplitude,n=e.allObservables,r=e.options,i=e.getEventProperties,o=e.shouldTrackEvent,s=e.shouldTrackActionClick,a=n.clickObservable,u=n.mutationObservable,l=n.navigateObservable,c=a.filter(function(e){return!o("click",e.closestTrackedAncestor)}).map(function(e){var t=JI(e.event.target,r.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=i(e.type,e.closestTrackedAncestor)),e}).filter($I).filter(function(e){return s("click",e.closestTrackedAncestor)}),d=l?un(u,l):u,f=un(c,d),h=null,p=null;return an(f,function(e){if(h&&(clearTimeout(h),h=null),"click"===e.type)return p=e,h=setTimeout(function(){h=null,p=null},500),Promise.resolve(null);if(p){var t=p;return p=null,Promise.resolve(t)}return Promise.resolve(null)}).subscribe(function(e){e&&(null==t||t.track(bI,i("click",e.closestTrackedAncestor)))})}({allObservables:u,options:e,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return x.getEventProperties.apply(x,Vt(Vt([],zt(e),!1),[g],!1))},amplitude:r,shouldTrackEvent:s,shouldTrackActionClick:a}),d&&k.push(d),f=function(e){e.amplitude;var t=e.allObservables.scrollObservable,n={maxX:0,maxY:0},r=t.subscribe(function(){var e,t,r,i,o=G(),s=Math.floor(null!==(t=null!==(e=null==o?void 0:o.scrollX)&&void 0!==e?e:null==o?void 0:o.pageXOffset)&&void 0!==t?t:0),a=Math.floor(null!==(i=null!==(r=null==o?void 0:o.scrollY)&&void 0!==r?r:null==o?void 0:o.pageYOffset)&&void 0!==i?i:0);n.maxX=Math.max(n.maxX,s),n.maxY=Math.max(n.maxY,a)});return{unsubscribe:function(){r.unsubscribe()},getState:function(){return n},reset:function(){n.maxX=0,n.maxY=0}}}({allObservables:u,amplitude:r}),k.push(f),h={},p=G(),v=function(e){e&&i||(setTimeout(function(){i=!1},100),i=!0,function(e){var t,n,r,i,o,s,a=e.amplitude,u=e.scrollTracker,l=e.currentElementExposed,c=e.elementExposedForPage,d=e.exposureTracker,f=e.isPageEnd,h=e.lastScroll,p=u.getState(),v=G(),g=null!==(n=null==v?void 0:v.innerWidth)&&void 0!==n?n:0,y=null!==(r=null==v?void 0:v.innerHeight)&&void 0!==r?r:0,m=((t={})[II]=ze(null!==(s=null===(o=null===(i=null==v?void 0:v.location)||void 0===i?void 0:i.href)||void 0===o?void 0:o.split("?")[0])&&void 0!==s?s:""),t[AI]=p.maxX+g,t[RI]=p.maxY+y,t[OI]=y,t[TI]=g,t["[Amplitude] Element Exposed"]=Array.from(l),t),b=KI();b&&(m[PI]=b),0!==l.size||p.maxX!==h.maxX||p.maxY!==h.maxY?(null==a||a.track("[Amplitude] Viewport Content Updated",m),h.maxX=p.maxX,h.maxY=p.maxY,l.clear(),f&&(u.reset(),c.clear(),null==d||d.reset())):f&&(u.reset(),c.clear(),null==d||d.reset())}({amplitude:r,scrollTracker:f,currentElementExposed:C,elementExposedForPage:E,exposureTracker:h.exposure,isPageEnd:e,lastScroll:o}))},y=function(e){!function(e,t,n,r){if(!t.has(e)){t.add(e),n.add(e);var i=Array.from(n);JSON.stringify(i).length>=DI&&r(!1)}}(e,E,C,v)},b&&(h.exposure=function(e){var t=e.allObservables,n=e.onExposure,r=e.dataExtractor,i=e.exposureDuration,o=void 0===i?Tt:i,s=new Map,a=new Map,u=t.exposureObservable.subscribe(function(e){var t=e,i=t.target;if(t.isIntersecting){if(!s.get(i)){var u=setTimeout(function(){s.set(i,!0);var e=r.getElementPath(i);n(e),a.set(i,null)},o);a.set(i,u)}}else!t.isIntersecting&&t.intersectionRatio<1&&(u=a.get(i))&&(clearTimeout(u),a.set(i,null))});return{unsubscribe:function(){u.unsubscribe()},reset:function(){a.forEach(function(e){e&&clearTimeout(e)}),a.clear(),s.clear()}}}({allObservables:u,onExposure:y,dataExtractor:x,exposureDuration:w}),h.exposure&&k.push(h.exposure),R=function(){v(!0)},null==p||p.addEventListener("beforeunload",R),_=function(){null==p||p.removeEventListener("beforeunload",R)},k.push({unsubscribe:function(){return _()}}),(P=u[dO.NavigateObservable])?k.push(P.subscribe(function(){v(!0)})):p&&(M=function(){v(!0)},p.addEventListener("popstate",M),N=p.history.pushState,p.history&&N&&(p.history.pushState=new Proxy(N,{apply:function(e,t,n){var r=zt(n,3),i=r[0],o=r[1],s=r[2];e.apply(t,[i,o,s]),v(!0)}})),k.push({unsubscribe:function(){p.removeEventListener("popstate",M),p.history&&N&&(p.history.pushState=N)}}))),null===(U=null==n?void 0:n.loggerProvider)||void 0===U||U.log("".concat(S," has been successfully added.")),window.opener&&m.enabled&&(L=e.cssSelectorAllowlist,j=e.actionClickAllowlist,function(e,t){var n=e;if(!0!==n[QI]){n[QI]=!0;var r=t.dataExtractor,i=t.isElementSelectable,o=t.cssSelectorAllowlist,s=t.actionClickAllowlist,a=null,u=function(t){e.notify({action:"element-selected",data:t})},l=function(t,n){"selector-mode-changed"===t?e.notify({action:"track-selector-mode-changed",data:n}):"selector-moved"===t&&e.notify({action:"track-selector-moved",data:n})};e.registerActionHandler("initialize-visual-tagging-selector",function(t){e.loadScriptOnce(MI).then(function(){var n;a=null===(n=null===window||void 0===window?void 0:window.amplitudeVisualTaggingSelector)||void 0===n?void 0:n.call(window,{getEventTagProps:r.getEventTagProps,isElementSelectable:function(e){return!i||i((null==t?void 0:t.actionType)||"click",e)},onTrack:l,onSelect:u,visualHighlightClass:NI,messenger:e,cssSelectorAllowlist:o,actionClickAllowlist:s,extractDataFromDataSource:r.extractDataFromDataSource,dataExtractor:r,diagnostics:{autocapture:{version:mI}}}),e.notify({action:"selector-loaded"})}).catch(function(){var t;null===(t=e.logger)||void 0===t||t.warn("Failed to initialize visual tagging selector")})}),e.registerActionHandler("close-visual-tagging-selector",function(){var e;null===(e=null==a?void 0:a.close)||void 0===e||e.call(a)})}}(D=cn(),{dataExtractor:x,isElementSelectable:VI(e,Vt(Vt([],zt(L),!1),zt(j),!1)),cssSelectorAllowlist:L,actionClickAllowlist:j}),dn(D),D.setup(t({logger:null==n?void 0:n.loggerProvider},(null==n?void 0:n.serverZone)&&{endpoint:Ic[n.serverZone]})))),[2]})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){return[2,e]})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){var e,t,n,r;return Bt(this,function(i){try{for(e=qt(k),t=e.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]})})}}};al(),Vf(),al(),Vf();var yO=3e3,mO=["mutation","navigate"];al(),Vf();var bO=Lt,wO=Nt,_O=jt;al(),Vf();var SO,kO,xO,EO,CO=2e3;Vf(),(kO=SO||(SO={})).INCREASING="increasing",kO.DECREASING="decreasing",(EO=xO||(xO={})).X="x",EO.Y="y";var IO=function(e){var t=e.mouseDirectionChangeObservable,n=e.directionChanges,r=void 0===n?20:n,i=e.thresholdMs,o=void 0===i?2e3:i;return new kc.default(function(e){var n={changes:[],changesThreshold:r,thresholdMs:o},i={changes:[],changesThreshold:r,thresholdMs:o},s=void 0,a=null;function u(){void 0!==s&&(e.next(s),s=void 0,null!==a&&clearTimeout(a),_u(n),_u(i))}return t.subscribe(function(e){null!==a&&clearTimeout(a),function(e){var t=+Date.now();e.startTime=e.startTime||t;var n=e.changes,r=e.changesThreshold;n.push(t),n.length>r&&n.shift()}(e===xO.X?n:i);var t=function(e,t){var n=void 0;if(wu(e)&&(n=e.startTime),wu(t)){var r=t.startTime;r&&(!n||r<n)&&(n=r)}return n}(n,i);return t?(s=s||t,a=setTimeout(function(){u(),a=null},o)):u(),Su(n),Su(i),function(){null!==a&&(clearTimeout(a),a=null)}})})},OO=function(e){var t=e.amplitude,n=e.options,r=e.allObservables,i=e.directionChanges,o=void 0===i?20:i,s=e.thresholdMs,a=void 0===s?2e3:s,u=function(e){var t=e.allWindowObservables.mouseMoveObservable;return new kc.default(function(e){var n=null,r=null,i=null;return t.subscribe(function(t){var o={x:t.clientX,y:t.clientY};null!==n?(o.x>n.x?(r===SO.DECREASING&&e.next(xO.X),r=SO.INCREASING):o.x<n.x&&(r===SO.INCREASING&&e.next(xO.X),r=SO.DECREASING),o.y>n.y?(i===SO.DECREASING&&e.next(xO.Y),i=SO.INCREASING):o.y<n.y&&(i===SO.INCREASING&&e.next(xO.Y),i=SO.DECREASING),n=o):n=o})})}({allWindowObservables:r});return IO({mouseDirectionChangeObservable:u,directionChanges:o,thresholdMs:a}).subscribe(function(e){zI(n)&&t.track("[Amplitude] Thrashed Cursor",void 0,{time:e})})},TO=4e3,AO=function(e){var n;void 0===e&&(e={});var r="@amplitude/plugin-frustration-browser",i=[],o=!1!==e.errorClicks;e.errorClicks||(o=!1);var s=!1!==e.deadClicks&&null!==e.deadClicks,a=!1!==e.rageClicks&&null!==e.rageClicks,u=!1!==e.thrashedCursor&&null!==e.thrashedCursor;e.thrashedCursor||(u=!1);var l=ku(e,"rageClicks",Mt,a),c=ku(e,"deadClicks",Rt,s),d=ku(e,"errorClicks",Pt,o),f=null!==(n=e.dataAttributePrefix)&&void 0!==n?n:It,h=new vO(e),p=Vt([],zt(new Set(Vt(Vt(Vt([],zt(l),!1),zt(c),!1),zt(d),!1))),!1),v=function(){var e,n,r=ln(ZI("pointerdown").map(function(e){return h.addAdditionalEventProperties(e,"click",p,f,!0)})),i=ln(eO().map(function(e){return h.addTypeAndTimestamp(e,"error")})),o=ln(XI().map(function(e){return h.addAdditionalEventProperties(e,"mutation",p,f)}));if(window.navigation){var s=new kc.default(function(e){var n=function(n){e.next(t(t({},n),{type:"navigate"}))};return window.navigation.addEventListener("navigate",n),function(){window.navigation.removeEventListener("navigate",n)}});n=ln(s.map(function(e){return h.addAdditionalEventProperties(e,"navigate",p,f)}))}var a=ln(new kc.default(function(e){var t=function(){var t=document.activeElement;if(t&&("TEXTAREA"===t.tagName||"INPUT"===t.tagName)){try{if(t.selectionStart===t.selectionEnd)return}catch(e){return}return e.next()}var n=window.getSelection();if(n&&!n.isCollapsed)return e.next()};return window.document.addEventListener("selectionchange",t),function(){window.document.removeEventListener("selectionchange",t)}})),u=ln(new kc.default(function(e){var t=function(t){e.next(t)},n={capture:!0};return YI.document.addEventListener("mousemove",t,n),function(){YI.document.removeEventListener("mousemove",t,n)}}));return(e={})[dO.ClickObservable]=r,e[dO.MutationObservable]=o,e[dO.NavigateObservable]=n,e[dO.BrowserErrorObservable]=i,e[dO.SelectionObservable]=a,e[dO.MouseMoveObservable]=u,e};return{name:r,type:"enrichment",setup:function(n,p){return Ft(void 0,void 0,void 0,function(){var g,y,m,b,w,_,S,k,x,E,C;return Bt(this,function(I){return"undefined"==typeof document||(g=v(),a&&(y=VI(e,l),m=bu({allObservables:g,amplitude:p,shouldTrackRageClick:y}),i.push(m)),s&&(b=VI(e,c),w=function(e){var n=e.amplitude,r=e.allObservables,i=e.getEventProperties,o=e.shouldTrackDeadClick,s=r.clickObservable,a=r.mutationObservable,u=r.navigateObservable,l=s.filter(function(e){return $I(e)&&o("click",e.closestTrackedAncestor)&&_instanceof(e.event.target,Element)&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===UI.LEFT_OR_TOUCH_CONTACT}),c=u?un(a,u):a,d=un(l,c),f=null;return an(d,function(e){return f&&mO.includes(e.type)?(clearTimeout(f),f=null,Promise.resolve(null)):"click"===e.type?f?Promise.resolve(null):new Promise(function(t){f=setTimeout(function(){t(e),f=null},yO)}):Promise.resolve(null)}).subscribe(function(e){if(e){var r={"[Amplitude] X":e.event.clientX,"[Amplitude] Y":e.event.clientY};n.track(wI,t(t({},i("click",e.closestTrackedAncestor)),r),{time:e.timestamp})}})}({amplitude:p,allObservables:g,getEventProperties:function(e,t){return h.getEventProperties(e,t,f)},shouldTrackDeadClick:b}),i.push(w)),o&&(_=VI(e,d),S=function(e){var n=e.amplitude,r=e.allObservables,i=e.shouldTrackErrorClick,o=r.clickObservable,s=r.browserErrorObservable,a=o.filter(function(e){return $I(e)&&i("click",e.closestTrackedAncestor)&&_instanceof(e.event.target,Element)&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===UI.LEFT_OR_TOUCH_CONTACT}),u=null,l=null,c=function(){null!==u&&(clearTimeout(u),u=null),l=null};return un(a,s).subscribe(function(e){var r;if("click"===e.type)return c(),l=e,void(u=setTimeout(c,CO));"error"===e.type&&l&&(n.track(SI,t(((r={})["[Amplitude] Kind"]=e.event.kind,r["[Amplitude] Message"]=e.event.message,r["[Amplitude] Stack"]=e.event.stack,r["[Amplitude] Filename"]=e.event.filename,r["[Amplitude] Line Number"]=e.event.lineNumber,r["[Amplitude] Column Number"]=e.event.columnNumber,r),l.targetElementProperties)),c())})}({amplitude:p,allObservables:g,shouldTrackErrorClick:_}),i.push(S)),u&&(k=void 0,x=void 0,"object"===_type_of(e.thrashedCursor)&&(k=e.thrashedCursor.directionChanges,x=e.thrashedCursor.threshold,k&&k<5&&(n.loggerProvider.warn("'thrashedCursor.directionChanges' of ".concat(k," is below the minimum of ").concat(5,", setting to ").concat(5)),k=5),x&&x>TO&&(n.loggerProvider.warn("'thrashedCursor.threshold' of ".concat(x," is above the maximum of ").concat(TO,", setting to ").concat(TO)),x=TO)),E=OO({amplitude:p,options:e,allObservables:g,directionChanges:k,thresholdMs:x}),i.push(E)),null===(C=null==n?void 0:n.loggerProvider)||void 0===C||C.log("".concat(r," has been successfully added."))),[2]})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){return[2,e]})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){var e,t,n,r;return Bt(this,function(o){try{for(e=qt(i),t=e.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]})})}}};al(),al();var RO=100,PO=1e4,MO=function(e){void 0===e&&(e={});var t="@amplitude/plugin-performance-browser",n=[],r=!0===e.mainThreadBlock||"object"===_type_of(e.mainThreadBlock)&&null!==e.mainThreadBlock;return{name:t,type:"enrichment",setup:function(i,o){return Ft(void 0,void 0,void 0,function(){var s,a,u;return Bt(this,function(l){return"undefined"==typeof document||(r&&(s=100,"object"===_type_of(e.mainThreadBlock)&&void 0!==e.mainThreadBlock.durationThreshold&&(s=e.mainThreadBlock.durationThreshold),a=Iu({amplitude:o,options:e,durationThreshold:s}),n.push(a)),null===(u=null==i?void 0:i.loggerProvider)||void 0===u||u.log("".concat(t," performance tracking has been successfully added."))),[2]})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){return[2,e]})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){var e,t,r,i;return Bt(this,function(o){try{for(e=qt(n),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}return[2]})})}}};al(),Vf();var NO="[Amplitude] Network Request",LO=!0;Vf(),al(),Vf();var jO,DO,UO="500-599";!function(e){e.NetworkObservable="networkObservable"}(jO||(jO={}));var FO=function(e){void 0===e&&(e={});var t,n="@amplitude/plugin-network-capture-browser",r=function(){var e,n=new kc.default(function(e){var n=new fc(function(t){var n=function(e,t){return{event:e,timestamp:Date.now(),type:t}}(t,"network");e.next(n)});return pc.subscribe(n,t),function(){pc.unsubscribe(n)}});return(e={})[jO.NetworkObservable]=n,e};return{name:n,type:"enrichment",setup:function(i,o){return Ft(void 0,void 0,void 0,function(){var s;return Bt(this,function(a){return"undefined"==typeof document||(s=r(),t=null==i?void 0:i.loggerProvider,DO=Nu({allObservables:s,networkTrackingOptions:e,amplitude:o,loggerProvider:t}),null==t||t.log("".concat(n," has been successfully added."))),[2]})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){return[2,e]})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(e){return DO.unsubscribe(),[2]})})}}};al(),Vf();var BO,qO=-1,zO=function(e){addEventListener("pageshow",function(t){t.persisted&&(qO=t.timeStamp,e(t))},!0)},VO=function(e,t,n,r){var i,o;return function(s){var a,u;t.value>=0&&(s||r)&&(((o=t.value-(null!=i?i:0))||void 0===i)&&(i=t.value,t.delta=o,t.rating=(a=t.value)>(u=n)[1]?"poor":a>u[0]?"needs-improvement":"good",e(t)))}},WO=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},HO=function(){var e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},GO=function(){var e,t=HO();return null!==(e=null==t?void 0:t.activationStart)&&void 0!==e?e:0},KO=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=HO(),r="navigate";return qO>=0?r="back-forward-cache":n&&(document.prerendering||GO()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:"v5-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},JO=new WeakMap,$O=function(){function e(){_class_call_check(this,e),sl(this,"t"),sl(this,"i",0),sl(this,"o",[])}return _create_class(e,[{key:"h",value:function(e){var t;if(!e.hadRecentInput){var n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&e.startTime-r.startTime<1e3&&e.startTime-n.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),null===(t=this.t)||void 0===t||t.call(this,e)}}}]),e}(),QO=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver(function(e){Promise.resolve().then(function(){t(e.getEntries())})});return r.observe(_object_spread({type:e,buffered:!0},n)),r}}catch(e){}},YO=function(e){var t=!1;return function(){t||(e(),t=!0)}},XO=-1,ZO=new Set,eT=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},tT=function(e){if("hidden"===document.visibilityState){var t=!0,n=!1,r=void 0;if("visibilitychange"===e.type)try{for(var i,o=ZO[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){(0,i.value)()}}catch(e){n=!0,r=e}finally{try{t||null==o.return||o.return()}finally{if(n)throw r}}isFinite(XO)||(XO="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",tT,!0))}},nT=function(){if(XO<0){var e,t=GO(),n=document.prerendering||null===(e=globalThis.performance.getEntriesByType("visibility-state").filter(function(e){return"hidden"===e.name&&e.startTime>t})[0])||void 0===e?void 0:e.startTime;XO=null!=n?n:eT(),addEventListener("visibilitychange",tT,!0),addEventListener("prerenderingchange",tT,!0),zO(function(){setTimeout(function(){XO=eT()})})}return{get firstHiddenTime(){return XO},onHidden:function(e){ZO.add(e)}}},rT=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},iT=[1800,3e3],oT=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};rT(function(){var n,r=nT(),i=KO("FCP"),o=QO("paint",function(e){var t=!0,s=!1,a=void 0;try{for(var u,l=e[Symbol.iterator]();!(t=(u=l.next()).done);t=!0){var c=u.value;"first-contentful-paint"===c.name&&(o.disconnect(),c.startTime<r.firstHiddenTime&&(i.value=Math.max(c.startTime-GO(),0),i.entries.push(c),n(!0)))}}catch(e){s=!0,a=e}finally{try{t||null==l.return||l.return()}finally{if(s)throw a}}});o&&(n=VO(e,i,iT,t.reportAllChanges),zO(function(r){i=KO("FCP"),n=VO(e,i,iT,t.reportAllChanges),WO(function(){i.value=performance.now()-r.timeStamp,n(!0)})}))})},sT=[.1,.25],aT=0,uT=1/0,lT=0,cT=function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=e[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var s=i.value;s.interactionId&&(uT=Math.min(uT,s.interactionId),lT=Math.max(lT,s.interactionId),aT=lT?(lT-uT)/7+1:0)}}catch(e){n=!0,r=e}finally{try{t||null==o.return||o.return()}finally{if(n)throw r}}},dT=function(){var e;return BO?aT:null!==(e=performance.interactionCount)&&void 0!==e?e:0},fT=0,hT=function(){function e(){_class_call_check(this,e),sl(this,"u",[]),sl(this,"l",new Map),sl(this,"m"),sl(this,"p")}return _create_class(e,[{key:"v",value:function(){fT=dT(),this.u.length=0,this.l.clear()}},{key:"L",value:function(){var e=Math.min(this.u.length-1,Math.floor((dT()-fT)/50));return this.u[e]}},{key:"h",value:function(e){var t;if(null===(t=this.m)||void 0===t||t.call(this,e),e.interactionId||"first-input"===e.entryType){var n=this.u.at(-1),r=this.l.get(e.interactionId);if(r||this.u.length<10||e.duration>n.P){var i;if(r?e.duration>r.P?(r.entries=[e],r.P=e.duration):e.duration===r.P&&e.startTime===r.entries[0].startTime&&r.entries.push(e):(r={id:e.interactionId,entries:[e],P:e.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort(function(e,t){return t.P-e.P}),this.u.length>10){var o=this.u.splice(10),s=!0,a=!1,u=void 0;try{for(var l,c=o[Symbol.iterator]();!(s=(l=c.next()).done);s=!0){var d=l.value;this.l.delete(d.id)}}catch(e){a=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(a)throw u}}}null===(i=this.p)||void 0===i||i.call(this,r)}}}}]),e}(),pT=function(e){var t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=YO(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t(function(){e(),removeEventListener("visibilitychange",e,{capture:!0})}))},vT=[200,500],gT=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype){var n=nT();rT(function(){var r;"interactionCount"in performance||BO||(BO=QO("event",cT,{type:"event",buffered:!0,durationThreshold:0}));var i,o=KO("INP"),s=Lu(t,hT),a=function(e){pT(function(){var t=!0,n=!1,r=void 0;try{for(var a,u=e[Symbol.iterator]();!(t=(a=u.next()).done);t=!0){var l=a.value;s.h(l)}}catch(e){n=!0,r=e}finally{try{t||null==u.return||u.return()}finally{if(n)throw r}}var c=s.L();c&&c.P!==o.value&&(o.value=c.P,o.entries=c.entries,i())})},u=QO("event",a,{durationThreshold:null!==(r=t.durationThreshold)&&void 0!==r?r:40});i=VO(e,o,vT,t.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),n.onHidden(function(){a(u.takeRecords()),i(!0)}),zO(function(){s.v(),o=KO("INP"),i=VO(e,o,vT,t.reportAllChanges)}))})}},yT=function(){function e(){_class_call_check(this,e),sl(this,"m")}return _create_class(e,[{key:"h",value:function(e){var t;null===(t=this.m)||void 0===t||t.call(this,e)}}]),e}(),mT=[2500,4e3],bT=[800,1800],wT=function(e){document.prerendering?rT(function(){return wT(e)}):"complete"!==document.readyState?addEventListener("load",function(){return wT(e)},!0):setTimeout(e)},_T=function(){var e=null,t=G(),n=null==t?void 0:t.document,r=null==t?void 0:t.location;return{name:"web-vitals-browser",type:"enrichment",setup:function(t,i){return Ft(void 0,void 0,void 0,function(){var o,s;return Bt(this,function(a){return void 0===n||(o=ze((null==r?void 0:r.href)||"",t.loggerProvider),s={"[Amplitude] Page Domain":(null==r?void 0:r.hostname)||"","[Amplitude] Page Location":o,"[Amplitude] Page Path":ze((null==r?void 0:r.pathname)||"",t.loggerProvider),"[Amplitude] Page Title":"undefined"!=typeof document&&document.title||"","[Amplitude] Page URL":ze(o.split("?")[0],t.loggerProvider)},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};rT(function(){var n,r=nT(),i=KO("LCP"),o=Lu(t,yT),s=function(e){t.reportAllChanges||(e=e.slice(-1));var s=!0,a=!1,u=void 0;try{for(var l,c=e[Symbol.iterator]();!(s=(l=c.next()).done);s=!0){var d=l.value;o.h(d),d.startTime<r.firstHiddenTime&&(i.value=Math.max(d.startTime-GO(),0),i.entries=[d],n())}}catch(e){a=!0,u=e}finally{try{s||null==c.return||c.return()}finally{if(a)throw u}}},a=QO("largest-contentful-paint",s);if(a){n=VO(e,i,mT,t.reportAllChanges);for(var u=YO(function(){s(a.takeRecords()),a.disconnect(),n(!0)}),l=function(e){e.isTrusted&&(pT(u),removeEventListener(e.type,l,{capture:!0}))},c=0,d=["keydown","click","visibilitychange"];c<d.length;c++)addEventListener(d[c],l,{capture:!0});zO(function(r){i=KO("LCP"),n=VO(e,i,mT,t.reportAllChanges),WO(function(){i.value=performance.now()-r.timeStamp,n(!0)})})}})}(function(e){s["[Amplitude] LCP"]=Du(e)}),oT(function(e){s["[Amplitude] FCP"]=Du(e)}),gT(function(e){s["[Amplitude] INP"]=Du(e)}),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=nT();oT(YO(function(){var r,i=KO("CLS",0),o=Lu(t,$O),s=function(e){var t=!0,n=!1,s=void 0;try{for(var a,u=e[Symbol.iterator]();!(t=(a=u.next()).done);t=!0){var l=a.value;o.h(l)}}catch(e){n=!0,s=e}finally{try{t||null==u.return||u.return()}finally{if(n)throw s}}o.i>i.value&&(i.value=o.i,i.entries=o.o,r())},a=QO("layout-shift",s);a&&(r=VO(e,i,sT,t.reportAllChanges),n.onHidden(function(){s(a.takeRecords()),r(!0)}),zO(function(){o.i=0,i=KO("CLS",0),r=VO(e,i,sT,t.reportAllChanges),WO(function(){return r()})}),setTimeout(r))}))}(function(e){s["[Amplitude] CLS"]=Du(e)}),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=KO("TTFB"),r=VO(e,n,bT,t.reportAllChanges);wT(function(){var i=HO();i&&(n.value=Math.max(i.responseStart-GO(),0),n.entries=[i],r(!0),zO(function(){n=KO("TTFB",0),(r=VO(e,n,bT,t.reportAllChanges))(!0)}))})}(function(e){s["[Amplitude] TTFB"]=Du(e)}),e=function(){"hidden"===n.visibilityState&&e&&(i.track("[Amplitude] Web Vitals",s),n.removeEventListener("visibilitychange",e),e=null)},n.addEventListener("visibilitychange",e)),[2]})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){return[2,e]})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(t){return e&&(null==n||n.removeEventListener("visibilitychange",e)),[2]})})}}};al(),Vf();var ST=function(){function e(e,n){var r,i,o;this.shouldTrackNewCampaign=!1,this.options=t({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:(i=(null===(r=n.cookieOptions)||void 0===r?void 0:r.domain)||n.topLevelDomain,o=i,o?(o.startsWith(".")&&(o=o.substring(1)),[new RegExp("".concat(o.replace(".","\\."),"$"))]):[]),optOut:n.optOut},e),this.storage=n.cookieStorage,this.storageKey=Ze(n.apiKey,"MKTG"),this.webExpStorageKey=Ze(n.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=T,this.sessionTimeout=n.sessionTimeout,this.lastEventTime=n.lastEventTime,this.logger=n.loggerProvider,this.topLevelDomain=n.topLevelDomain,n.loggerProvider.log("Installing web attribution tracking.")}return e.prototype.init=function(){return Ft(this,void 0,void 0,function(){var e,t;return Bt(this,function(n){switch(n.label){case 0:return this.options.optOut?[2]:[4,this.fetchCampaign()];case 1:return t=zt.apply(void 0,[n.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||Le(this.sessionTimeout,this.lastEventTime),$C(this.currentCampaign,this.previousCampaign,this.options,this.logger,e,this.topLevelDomain)?(this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)]):[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return Ft(this,void 0,void 0,function(){var e;return Bt(this,function(t){switch(t.label){case 0:return[4,this.storage.get(this.webExpStorageKey)];case 1:return(e=t.sent())?[4,this.storage.remove(this.webExpStorageKey)]:[3,3];case 2:t.sent(),t.label=3;case 3:return[4,Promise.all([e||(new vc).parse(),this.storage.get(this.storageKey)])];case 4:return[2,t.sent()]}})})},e.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var n,r,i,o,s=(n=this.currentCampaign,r=this.options,i=t(t({},T),n),o=Object.entries(i).reduce(function(e,t){var n,i=zt(t,2),o=i[0],s=i[1];return e.setOnce("initial_".concat(o),null!==(n=null!=s?s:r.initialEmptyValue)&&void 0!==n?n:"EMPTY"),s?e.set(o,s):e.unset(o)},new N),X(o));return e&&(s.event_id=e),s},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}();al(),Vf();var kT=new Set([r.IDENTIFY,r.GROUP_IDENTIFY]),xT=function(e){var n;void 0===e&&(e={});var r,i,o,s,a,u,l=null!==(n=e.fallbackAttributionEvent)&&void 0!==n&&n,c=G(),d={},f=!1,h=!1,p=function(){return Ft(void 0,void 0,void 0,function(){var e;return Bt(this,function(t){switch(t.label){case 0:return[4,(new vc).parse()];case 1:return e=t.sent(),d=He(e),l&&(null==i||i.log("Tracking attribution fallback event."),null==r||r.track("[Amplitude] Attribution",d)),[2]}})})},v=function(){p()},g=function(e){return new Proxy(e,{apply:function(e,t,n){Reflect.apply(e,t,n),f&&v()}})};return{name:"@amplitude/plugin-event-property-attribution-browser",type:"enrichment",setup:function(e,t){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(n){switch(n.label){case 0:return r=t,i=e.loggerProvider,f=!0,i.log("Installing event property attribution tracking."),[4,p()];case 1:if(n.sent(),!c)return[2];if(c.addEventListener("popstate",v),!h){if(o=Reflect.get(c.history,"pushState"),s=Reflect.get(c.history,"replaceState"),!o||!s)return[2];a=g(o),c.history.pushState=a,u=g(s),c.history.replaceState=u,h=!0}return[2]}})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(n){return kT.has(e.event_type)||(e.event_properties=t(t({},d),e.event_properties)),[2,e]})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){var e,t;return Bt(this,function(n){return c&&(c.removeEventListener("popstate",v),e=Reflect.get(c.history,"pushState"),t=Reflect.get(c.history,"replaceState"),h&&e===a&&o&&(c.history.pushState=o),h&&t===u&&s&&(c.history.replaceState=s)),f=!1,h=!1,o=void 0,s=void 0,a=void 0,u=void 0,d={},[2]})})}}};al(),Vf();var ET,CT,IT="AMP_CURRENT_PAGE",OT="AMP_PREVIOUS_PAGE",TT="AMP_URL_INFO";(CT=ET||(ET={})).Direct="direct",CT.Internal="internal",CT.External="external";var AT=new Set([r.IDENTIFY,r.GROUP_IDENTIFY,r.REVENUE]),RT=function(e){var n=(void 0===e?{}:e).internalDomains,r=void 0===n?[]:n,i=G(),o=void 0,s=!1,a=void 0,u=!1,l=!1,c=function(e){var t;try{var n=ze(e,a);t=new URL(n).hostname}catch(e){null==a||a.error("Could not parse URL: ",e)}return t},d=function(e){var t="undefined"!=typeof location&&location.hostname||"",n=e?c(e):void 0;if(!n)return ET.Direct;var i=r.some(function(e){return-1!==t.indexOf(e)}),o=r.some(function(e){return-1!==n.indexOf(e)});return t===n||o&&i?ET.Internal:ET.External},f=function(){return Ft(void 0,void 0,void 0,function(){var e,t,n,r,i;return Bt(this,function(a){switch(a.label){case 0:return o&&s?[4,o.get(TT)]:[3,3];case 1:return e=a.sent(),t=ze("undefined"!=typeof location&&location.href||""),n=(null==e?void 0:e[IT])||"",r=void 0,r=t===n?(null==e?void 0:e[OT])||"":n||(document.referrer||""),[4,o.set(TT,(i={},i[IT]=t,i[OT]=r,i))];case 2:a.sent(),a.label=3;case 3:return[2]}})})},h=function(){f()};return{name:"@amplitude/plugin-page-url-enrichment-browser",type:"enrichment",setup:function(e,t){return Ft(void 0,void 0,void 0,function(){var t,n,r,d,p,v,g,y;return Bt(this,function(m){switch(m.label){case 0:if((a=e.loggerProvider).log("Installing @amplitude/plugin-page-url-enrichment-browser"),l=!0,!i)return[3,7];try{o=new et(i.sessionStorage)}catch(e){null==a||a.debug("sessionStorage is not available in this environment.")}return[4,null==o?void 0:o.isEnabled()];case 1:return s=null!==(y=m.sent())&&void 0!==y&&y,o&&s?(t="undefined"!=typeof document&&document.referrer||"",n=t?c(t):void 0,r="undefined"!=typeof location&&location.hostname||"",d=ze("undefined"!=typeof location&&location.href||""),[4,o.get(TT)]):[3,6];case 2:return p=m.sent(),v=(null==p?void 0:p[IT])||"",!!n&&n!==r&&v!==d?[4,o.set(TT,(g={},g[IT]=d,g[OT]=t,g))]:[3,4];case 3:return m.sent(),[3,6];case 4:return[4,f()];case 5:m.sent(),m.label=6;case 6:i.addEventListener("popstate",h),u||(i.history.pushState=new Proxy(i.history.pushState,{apply:function(e,t,n){var r=zt(n,3),i=r[0],o=r[1],s=r[2];e.apply(t,[i,o,s]),l&&h()}}),i.history.replaceState=new Proxy(i.history.replaceState,{apply:function(e,t,n){var r=zt(n,3),i=r[0],o=r[1],s=r[2];e.apply(t,[i,o,s]),l&&h()}}),u=!0),m.label=7;case 7:return[2]}})})},execute:function(e){return Ft(void 0,void 0,void 0,function(){var n,r,i;return Bt(this,function(a){switch(a.label){case 0:return n=ze("undefined"!=typeof location&&location.href||""),o&&s?[4,o.get(TT)]:[3,2];case 1:if(r=a.sent(),i=(null==r?void 0:r[OT])||"",AT.has(e.event_type))return[2,e];e.event_properties=t(t({},e.event_properties||{}),{"[Amplitude] Page Domain":Uu(e,"[Amplitude] Page Domain","undefined"!=typeof location&&location.hostname||""),"[Amplitude] Page Location":Uu(e,"[Amplitude] Page Location",n),"[Amplitude] Page Path":Uu(e,"[Amplitude] Page Path","undefined"!=typeof location&&ze(location.pathname)||""),"[Amplitude] Page Title":Uu(e,"[Amplitude] Page Title",Sc(_c)),"[Amplitude] Page URL":Uu(e,"[Amplitude] Page URL",n.split("?")[0]),"[Amplitude] Previous Page Location":i,"[Amplitude] Previous Page Type":d(i)}),a.label=2;case 2:return[2,e]}})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(e){switch(e.label){case 0:return i&&(i.removeEventListener("popstate",h),l=!1),o&&s?[4,o.set(TT,{})]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})}}};al();var PT=function(){var e,t,n;function r(t){if(t)try{var n=new Function("return "+t)();if("function"==typeof n)return n;null==e||e.error("Custom enrichment body did not evaluate to a function")}catch(t){null==e||e.error("Could not create custom enrichment function",t)}return function(e){return e}}return{name:"@amplitude/plugin-custom-enrichment-browser",type:"enrichment",setup:function(i,o){return Ft(void 0,void 0,void 0,function(){var o,s;return Bt(this,function(a){return null==(e=i.loggerProvider)||e.log("Installing @amplitude/plugin-custom-enrichment-browser"),(null===(s=i.remoteConfig)||void 0===s?void 0:s.fetchRemoteConfig)&&(i.remoteConfigClient?(o=i.remoteConfigClient.subscribe("configs.analyticsSDK.browserSDK.customEnrichment","all",function(e){n=e&&function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&null!==e&&"body"in e&&"string"==typeof e.body}(e)?r(e.body||""):r("")}),t=function(){var e;return null===(e=i.remoteConfigClient)||void 0===e?void 0:e.unsubscribe(o)}):null==e||e.debug("Remote config client is not provided, skipping remote config fetch")),[2]})})},execute:function(t){return Ft(void 0,void 0,void 0,function(){var r;return Bt(this,function(i){if(n)try{return[2,null!==(r=n(t))&&void 0!==r?r:null]}catch(n){return null==e||e.error("Could not execute custom enrichment function",n),[2,t]}return[2,t]})})},teardown:function(){return Ft(void 0,void 0,void 0,function(){return Bt(this,function(e){return t&&t(),[2]})})}}};al();var MT,NT="userProperty",LT="eventProperty",jT=function(e){return e===NT||e===LT},DT=function(e,t){return function(e){var t=Vt([],zt(new Set((Array.isArray(e)?e:[e]).filter(jT))),!1);return t.length>0?t:[NT]}(e.trackingMethod).includes(t)},UT=function(e){return DT(e,NT)},FT=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._diagnosticsSampleRate=0,t}return Dt(n,e),n.prototype.init=function(e,n,r){var i,o;return void 0===e&&(e=""),arguments.length>2?(i=n,o=r):"string"==typeof n?(i=n,o=void 0):(i=null==n?void 0:n.userId,o=n),ne(this._init(t(t({},o),{userId:i,apiKey:e})))},n.prototype._init=function(n){var r,i,o,s,a,u,l,c;return Ft(this,void 0,void 0,function(){var d,f,h,p,v,g,y,m,b,w,_,S,k,x,E,C=this;return Bt(this,function(I){switch(I.label){case 0:return this.initializing?[2]:(this.initializing=!0,d=function(e){var t,n;return void 0===e&&(e={}),!0===(null===(t=e.remoteConfig)||void 0===t?void 0:t.fetchRemoteConfig)||!1!==(null===(n=e.remoteConfig)||void 0===n?void 0:n.fetchRemoteConfig)&&!1!==e.fetchRemoteConfig}(n),f=null!==(r=n.loggerProvider)&&void 0!==r?r:new le,n.loggerProvider||f.enable(null!==(i=n.logLevel)&&void 0!==i?i:ae.Warn),h=null!==(o=n.serverZone)&&void 0!==o?o:"US",v=this._diagnosticsSampleRate,g=null===(s=n.enableDiagnostics)||void 0===s||s,d?(p=new yt(n.apiKey,f,h,null===(a=n.remoteConfig)||void 0===a?void 0:a.serverUrl),[4,new Promise(function(e){null==p||p.subscribe("configs.diagnostics.browserSDK","all",function(t,n,r){if(f.debug("Diagnostics remote configuration received:",JSON.stringify({remoteConfig:t,source:n,lastFetch:r},null,2)),t){var i=t.sampleRate;"number"!=typeof i||isNaN(i)||(v=i);var o=t.enabled;"boolean"==typeof o&&(g=o)}e()})})]):[3,2]);case 1:I.sent(),I.label=2;case 2:return(y=new dt(n.apiKey,f,h,{enabled:g,sampleRate:v})).setTag("library","".concat(SC,"/").concat(_C)),"undefined"!=typeof navigator&&y.setTag("user_agent",navigator.userAgent),[4,nI(n.apiKey,n,this,y,{loggerProvider:f,serverZone:h,enableDiagnostics:g,diagnosticsSampleRate:v})];case 3:return m=I.sent(),d&&p?[4,new Promise(function(e){null==p||p.subscribe("configs.analyticsSDK.browserSDK","all",function(t,n,r){m.loggerProvider.debug("Remote configuration received:",JSON.stringify({remoteConfig:t,source:n,lastFetch:r},null,2)),t&&gu(t,m),e()})})]:[3,5];case 4:I.sent(),I.label=5;case 5:return[4,e.prototype._init.call(this,m)];case 6:return I.sent(),this.logBrowserOptions(m),this.config.remoteConfigClient=p,A=this.config,b=aC(A.defaultTracking)&&A.defaultTracking&&"object"===_type_of(A.defaultTracking)&&A.defaultTracking.attribution&&"object"===_type_of(A.defaultTracking.attribution)?t({},A.defaultTracking.attribution):{},aC(this.config.defaultTracking)&&UT(b)?(this.config.optOut&&this.timeline.addOptOutListener(function(e){return Ft(C,void 0,void 0,function(){return Bt(this,function(t){switch(t.label){case 0:return e?[3,2]:(this.webAttribution=new ST(b,this.config),[4,this.webAttribution.init()]);case 1:t.sent(),t.label=2;case 2:return[2]}})})}),this.webAttribution=new ST(b,this.config),[4,this.webAttribution.init()]):[3,8];case 7:I.sent(),I.label=8;case 8:return w=Fe(),_=w.ampTimestamp?Number(w.ampTimestamp):void 0,S=!_||Date.now()<_,k=S&&!Number.isNaN(Number(w.ampSessionId))?Number(w.ampSessionId):void 0,-1!==(x=this.config.deferredSessionId)||this.config.optOut||(x=Date.now()),this.setSessionId(null!==(c=null!==(l=null!==(u=n.sessionId)&&void 0!==u?u:k)&&void 0!==l?l:x)&&void 0!==c?c:this.config.sessionId),this.config.optOut&&this.timeline.addOptOutListener(function(e){return Ft(C,void 0,void 0,function(){return Bt(this,function(t){return!e&&this.config.deferredSessionId&&(-1===this.config.deferredSessionId?this.setSessionId(void 0):this.setSessionId(this.config.deferredSessionId)),[2]})})}),(E=Re(n.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),this.config.offline===Et?[3,10]:[4,this.add(gI()).promise];case 9:I.sent(),I.label=10;case 10:return[4,this.add(new Se({diagnosticsClient:y})).promise];case 11:return I.sent(),[4,this.add(new kC).promise];case 12:return I.sent(),[4,this.add(new Ne).promise];case 13:return I.sent(),function(e){vI||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."),vI=!0)}(this.config),T=this.config.defaultTracking,sC(T,"fileDownloads")?(this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(pI()).promise]):[3,15];case 14:I.sent(),I.label=15;case 15:return uC(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(dI()).promise]):[3,17];case 16:I.sent(),I.label=17;case 17:return lC(this.config.defaultTracking)?this.config.optOut?[3,19]:(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(aI(mC(this.config))).promise]):[3,20];case 18:return I.sent(),[3,20];case 19:this.timeline.addOptOutListener(function(e){return Ft(C,void 0,void 0,function(){return Bt(this,function(t){switch(t.label){case 0:return e?[2]:(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(aI(mC(this.config))).promise]);case 1:return t.sent(),[2]}})})}),I.label=20;case 20:return aC(this.config.defaultTracking)&&function(e){return DT(e,LT)}(b)?(this.config.loggerProvider.debug("Adding event property attribution plugin"),[4,this.add(xT(b)).promise]):[3,22];case 21:I.sent(),I.label=22;case 22:return fC(this.config.autocapture)?(this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(gO(vC(this.config),{diagnosticsClient:y})).promise]):[3,24];case 23:I.sent(),I.label=24;case 24:return hC(this.config.autocapture)?(this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(AO(gC(this.config))).promise]):[3,26];case 25:I.sent(),I.label=26;case 26:return dC(this.config.autocapture)?(this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(FO(yC(this.config))).promise]):[3,28];case 27:I.sent(),I.label=28;case 28:return function(e){return"boolean"==typeof e?e:"object"===(void 0===e?"undefined":_type_of(e))&&!0===e.webVitals}(this.config.autocapture)?(this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(_T()).promise]):[3,30];case 29:I.sent(),I.label=30;case 30:return function(e){return"object"===(void 0===e?"undefined":_type_of(e))&&(!0===e.performanceTracking||"object"===_type_of(e.performanceTracking))}(this.config.autocapture)?(this.config.loggerProvider.debug("Adding performance tracking plugin"),[4,this.add(MO(pC(this.config))).promise]):[3,32];case 31:I.sent(),I.label=32;case 32:return function(e){return sC(e,"pageUrlEnrichment")}(this.config.autocapture)?(this.config.loggerProvider.debug("Adding referrer page url plugin"),[4,this.add(RT()).promise]):[3,34];case 33:I.sent(),I.label=34;case 34:return("boolean"==typeof(O=this.config.customEnrichment)?O:"object"===(void 0===O?"undefined":_type_of(O))&&null!==O&&!1!==O.enabled)?(this.config.loggerProvider.debug("Adding custom enrichment plugin"),[4,this.add(PT()).promise]):[3,36];case 35:I.sent(),I.label=36;case 36:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 37:return I.sent(),E.eventBridge.setEventReceiver(function(e){var t=e.eventProperties||{},n=t.time,r=Ut(t,["time"]),i="number"==typeof n?{time:n}:void 0;C.track(e.eventType,r,i)}),[2]}var O,T,A})})},n.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},n.prototype.setUserId=function(e){this.config?(this.config.loggerProvider.debug("function setUserId: ",e),e===this.config.userId&&void 0!==e||(this.config.userId=e,this.timeline.onIdentityChanged({userId:e}),Pe(e,this.config.instanceName))):this.q.push(this.setUserId.bind(this,e))},n.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},n.prototype.setDeviceId=function(e){this.config?(this.config.loggerProvider.debug("function setDeviceId: ",e),e!==this.config.deviceId&&(this.config.deviceId=e,this.timeline.onIdentityChanged({deviceId:e}),Me(e,this.config.instanceName))):this.q.push(this.setDeviceId.bind(this,e))},n.prototype.reset=function(){this.setDeviceId($()),this.setUserId(void 0),this.timeline.onReset()},n.prototype.getIdentity=function(){var e,t;return{deviceId:null===(e=this.config)||void 0===e?void 0:e.deviceId,userId:null===(t=this.config)||void 0===t?void 0:t.userId,userProperties:this.userProperties}},n.prototype.setIdentity=function(e){var t,n,r;if("userId"in e&&this.setUserId(e.userId),"deviceId"in e&&e.deviceId&&this.setDeviceId(e.deviceId),"userProperties"in e){this.userProperties=e.userProperties;var i=new N,o=null!==(r=e.userProperties)&&void 0!==r?r:{};try{for(var s=qt(Object.entries(o)),a=s.next();!a.done;a=s.next()){var u=zt(a.value,2),l=u[0],c=u[1];i.set(l,c)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}this.identify(i)}},n.prototype.getOptOut=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.optOut},n.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},n.prototype.setSessionId=function(e){var t,n=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),ne(Promise.resolve());if(this.config.optOut)return this.config.deferredSessionId=null!=e?e:-1,ne(Promise.resolve());if(void 0===e&&(e=Date.now()),e===this.config.sessionId)return ne(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var r=this.getSessionId();r!==e&&this.timeline.onSessionIdChanged(e);var 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,cC(this.config.defaultTracking)&&(r&&i&&n.push(this.track(UC,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 this.config.identify&&n.push(this.track(X(this.config.identify)).promise),cC(this.config.defaultTracking)&&n.push(this.track(DC,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,ne(Promise.all(n))},n.prototype.extendSession=function(){this.config?this.config.lastEventTime=Date.now():this.q.push(this.extendSession.bind(this))},n.prototype.setTransport=function(e){this.config?this.config.transportProvider=iI(e):this.q.push(this.setTransport.bind(this,e))},n.prototype.identify=function(t,n){if(wC(t)){var r=t._q;t._q=[],t=bC(new N,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)},n.prototype.groupIdentify=function(t,n,r,i){if(wC(r)){var o=r._q;r._q=[],r=bC(new N,o)}return e.prototype.groupIdentify.call(this,t,n,r,i)},n.prototype.revenue=function(t,n){if(wC(t)){var r=t._q;t._q=[],t=bC(new ie,r)}return e.prototype.revenue.call(this,t,n)},n.prototype.trackCampaignEventIfNeeded=function(e,t){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign||!UT(this.webAttribution.options))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},n.prototype.process=function(t){return Ft(this,void 0,void 0,function(){var n,r,i;return Bt(this,function(o){return n=Date.now(),r=Le(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type===DC||t.event_type===UC||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)]})})},n.prototype.logBrowserOptions=function(e){try{var n=t(t({},e),{apiKey:e.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",Ec(n))}catch(e){this.config.loggerProvider.error("Error logging browser config",e)}},n.prototype._setDiagnosticsSampleRate=function(e){e>1||e<0||this.config||(this._diagnosticsSampleRate=e)},n}(re);MT=new FT,be(MT.init.bind(MT),"init",ge(MT),me(MT,["config"])),be(MT.add.bind(MT),"add",ge(MT),me(MT,["config.apiKey","timeline.plugins"])),be(MT.remove.bind(MT),"remove",ge(MT),me(MT,["config.apiKey","timeline.plugins"])),be(MT.track.bind(MT),"track",ge(MT),me(MT,["config.apiKey","timeline.queue.length"])),be(MT.logEvent.bind(MT),"logEvent",ge(MT),me(MT,["config.apiKey","timeline.queue.length"])),be(MT.identify.bind(MT),"identify",ge(MT),me(MT,["config.apiKey","timeline.queue.length"])),be(MT.groupIdentify.bind(MT),"groupIdentify",ge(MT),me(MT,["config.apiKey","timeline.queue.length"])),be(MT.setGroup.bind(MT),"setGroup",ge(MT),me(MT,["config.apiKey","timeline.queue.length"])),be(MT.revenue.bind(MT),"revenue",ge(MT),me(MT,["config.apiKey","timeline.queue.length"])),be(MT.flush.bind(MT),"flush",ge(MT),me(MT,["config.apiKey","timeline.queue.length"])),be(MT.getUserId.bind(MT),"getUserId",ge(MT),me(MT,["config","config.userId"])),be(MT.setUserId.bind(MT),"setUserId",ge(MT),me(MT,["config","config.userId"])),be(MT.getDeviceId.bind(MT),"getDeviceId",ge(MT),me(MT,["config","config.deviceId"])),be(MT.setDeviceId.bind(MT),"setDeviceId",ge(MT),me(MT,["config","config.deviceId"])),be(MT.reset.bind(MT),"reset",ge(MT),me(MT,["config","config.userId","config.deviceId"])),be(MT.getSessionId.bind(MT),"getSessionId",ge(MT),me(MT,["config"])),be(MT.setSessionId.bind(MT),"setSessionId",ge(MT),me(MT,["config"])),be(MT.extendSession.bind(MT),"extendSession",ge(MT),me(MT,["config"])),be(MT.setOptOut.bind(MT),"setOptOut",ge(MT),me(MT,["config"])),be(MT.setTransport.bind(MT),"setTransport",ge(MT),me(MT,["config"])),be(MT.getIdentity.bind(MT),"getIdentity",ge(MT),me(MT,["config"])),be(MT.setIdentity.bind(MT),"setIdentity",ge(MT),me(MT,["config","config.userId","config.deviceId"])),be(MT.getOptOut.bind(MT),"getOptOut",ge(MT),me(MT,["config"])),be(MT._setDiagnosticsSampleRate.bind(MT),"_setDiagnosticsSampleRate",ge(MT),me(MT,["config"]));Vf();bE(),zE(),WE(),al();var BT=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Dt(n,e),n.prototype.sessionReplay=function(){return this._sessionReplay},n.prototype.experiment=function(){if(void 0!==this.config){var e=this.plugins(yE);return 0===e.length?void this.config.loggerProvider.debug("".concat(yE.pluginName," plugin is not found.")):1===e.length?e[0].experiment:void this.config.loggerProvider.debug("Multiple instances of ".concat(yE.pluginName," are found."))}},n.prototype.initAll=function(n,r){return Ft(this,void 0,void 0,function(){var i=this;return Bt(this,function(o){return this._initAllPromise||(this._initAllPromise=Ft(i,void 0,void 0,function(){var i,o;return Bt(this,function(s){switch(s.label){case 0:return i={serverZone:null==r?void 0:r.serverZone,instanceName:null==r?void 0:r.instanceName},e.prototype.add.call(this,{type:"enrichment",name:"@amplitude/unified-library-plugin",execute:function(e){var t;return Ft(this,void 0,void 0,function(){return Bt(this,function(n){return e.library="".concat("amplitude-ts-unified","/").concat("1.1.10","-").concat(null!==(t=e.library)&&void 0!==t?t:""),[2,e]})})}}),[4,e.prototype.init.call(this,n,t(t({},null==r?void 0:r.analytics),i)).promise];case 1:return s.sent(),[4,e.prototype.add.call(this,YS(t(t({},null==r?void 0:r.sessionReplay),i))).promise];case 2:return s.sent(),[4,e.prototype.add.call(this,mE(t(t({},null==r?void 0:r.experiment),i))).promise];case 3:return s.sent(),void 0===(o=this.plugin(QS.pluginName))?this.config.loggerProvider.debug("".concat(QS.pluginName," plugin is not found.")):this._sessionReplay=o.sessionReplay,[4,e.prototype.add.call(this,qE(t(t({},null==r?void 0:r.engagement),i))).promise];case 4:return s.sent(),[2]}})}).finally(function(){i._initAllPromise=void 0})),[2,this._initAllPromise]})})},n.prototype.init=function(t,n,r){return void 0===t&&(t=""),e.prototype.init.call(this,t,n,r)},n}(FT);Vf();var qT,zT,VT=function(){var e=new BT;return{_setDiagnosticsSampleRate:be(e._setDiagnosticsSampleRate.bind(e),"_setDiagnosticsSampleRate",ge(e),me(e,["config"])),experiment:be(e.experiment.bind(e),"experiment",ge(e),me(e,["config"])),sessionReplay:be(e.sessionReplay.bind(e),"sessionReplay",ge(e),me(e,["config"])),initAll:be(e.initAll.bind(e),"initAll",ge(e),me(e,["config"])),init:be(e.init.bind(e),"init",ge(e),me(e,["config"])),add:be(e.add.bind(e),"add",ge(e),me(e,["config.apiKey","timeline.plugins"])),remove:be(e.remove.bind(e),"remove",ge(e),me(e,["config.apiKey","timeline.plugins"])),track:be(e.track.bind(e),"track",ge(e),me(e,["config.apiKey","timeline.queue.length"])),logEvent:be(e.logEvent.bind(e),"logEvent",ge(e),me(e,["config.apiKey","timeline.queue.length"])),identify:be(e.identify.bind(e),"identify",ge(e),me(e,["config.apiKey","timeline.queue.length"])),groupIdentify:be(e.groupIdentify.bind(e),"groupIdentify",ge(e),me(e,["config.apiKey","timeline.queue.length"])),setGroup:be(e.setGroup.bind(e),"setGroup",ge(e),me(e,["config.apiKey","timeline.queue.length"])),revenue:be(e.revenue.bind(e),"revenue",ge(e),me(e,["config.apiKey","timeline.queue.length"])),flush:be(e.flush.bind(e),"flush",ge(e),me(e,["config.apiKey","timeline.queue.length"])),getUserId:be(e.getUserId.bind(e),"getUserId",ge(e),me(e,["config","config.userId"])),setUserId:be(e.setUserId.bind(e),"setUserId",ge(e),me(e,["config","config.userId"])),getDeviceId:be(e.getDeviceId.bind(e),"getDeviceId",ge(e),me(e,["config","config.deviceId"])),setDeviceId:be(e.setDeviceId.bind(e),"setDeviceId",ge(e),me(e,["config","config.deviceId"])),reset:be(e.reset.bind(e),"reset",ge(e),me(e,["config","config.userId","config.deviceId"])),getSessionId:be(e.getSessionId.bind(e),"getSessionId",ge(e),me(e,["config"])),setSessionId:be(e.setSessionId.bind(e),"setSessionId",ge(e),me(e,["config"])),extendSession:be(e.extendSession.bind(e),"extendSession",ge(e),me(e,["config"])),setOptOut:be(e.setOptOut.bind(e),"setOptOut",ge(e),me(e,["config"])),getOptOut:be(e.getOptOut.bind(e),"getOptOut",ge(e),me(e,["config"])),setTransport:be(e.setTransport.bind(e),"setTransport",ge(e),me(e,["config"])),getIdentity:be(e.getIdentity.bind(e),"getIdentity",ge(e),me(e,["config"])),setIdentity:be(e.setIdentity.bind(e),"setIdentity",ge(e),me(e,["config","config.userId","config.deviceId"]))}},WT=VT(),HT=(WT._setDiagnosticsSampleRate,WT.initAll,WT.experiment,WT.sessionReplay,WT.add,WT.extendSession,WT.flush,WT.getDeviceId,WT.getIdentity,WT.getOptOut,WT.getSessionId,WT.getUserId,WT.groupIdentify,WT.identify,WT.logEvent,WT.remove,WT.reset,WT.revenue,WT.setDeviceId,WT.setGroup,WT.setIdentity,WT.setOptOut,WT.setSessionId,WT.setTransport,WT.setUserId,WT.track,{}),GT=function(e){return au(e,"transport","Amplitude call failed")},KT=["set","setOnce","add","append","prepend","preInsert","postInsert","remove"],JT={type:"amplitude",config:{},init:function(e){return _async_to_generator(function(e){var t,n,r,i,o,s,a;return _ts_generator(this,function(u){switch(u.label){case 0:if(t=e.config,n=e.env,!(i=null===(r=t.settings)||void 0===r?void 0:r.apiKey))throw new tC("Amplitude needs settings.apiKey",{code:"config"});return o=_object_spread_props(_object_spread({},t.settings),{apiKey:i}),(s=Bu(n))?[4,Gu(s,o)]:[3,2];case 1:return u.sent(),[3,4];case 2:return[4,Gu(Fu(),o).catch(function(e){throw qT=void 0,e})];case 3:u.sent(),u.label=4;case 4:return a={lastIdentity:{}},[2,_object_spread_props(_object_spread({},t),{settings:_object_spread_props(_object_spread({},o),{_state:a})})]}})}).apply(this,arguments)},push:function(e,t){return _async_to_generator(function(e,t){var n,r,i,o,s,a,u,l,c;return _ts_generator(this,function(d){switch(d.label){case 0:return n=t.config,r=t.rule,i=t.env,o=t.data,s=t.collector,a=t.logger,u=_object_spread({apiKey:""},n.settings),l=(null==r?void 0:r.settings)||{},c=Bu(i),[4,Ku(c||Fu(),e,u,l,r,o,s,a)];case 1:return d.sent(),[2]}})}).apply(this,arguments)},on:function(e,t){return _async_to_generator(function(e,t){var n,r,i,o,s,a,u,l;return _ts_generator(this,function(c){switch(c.label){case 0:return n=t.config,r=t.data,i=t.env,o=t.collector,a=n.consent,"consent"===e&&a&&tu(r)?Object.keys(a).some(function(e){return e in r})?(u=!1!==ru(a,o.consent),l=null!==(s=Bu(i))&&void 0!==s?s:Fu(),[4,au(function(){return l.setOptOut(!u)},"consent-not-applied","Amplitude did not take the consent update")]):[2]:[2];case 1:return c.sent(),[2]}})}).apply(this,arguments)}},$T=JT;return zT=HE,il(Qu({},"__esModule",{value:!0}),zT)}();