1(()=>{var RT=Object.create;var Va=Object.defineProperty;var OT=Object.getOwnPropertyDescriptor;var PT=Object.getOwnPropertyNames;var kT=Object.getPrototypeOf,NT=Object.prototype.hasOwnProperty;var Y=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var zi=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},kn=(e,t)=>{for(var r in t)Va(e,r,{get:t[r],enumerable:!0})},MT=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of PT(t))!NT.call(e,i)&&i!==r&&Va(e,i,{get:()=>t[i],enumerable:!(n=OT(t,i))||n.enumerable});return e};var za=(e,t,r)=>(r=e!=null?RT(kT(e)):{},MT(t||!e||!e.__esModule?Va(r,"default",{value:e,enumerable:!0}):r,e));function De(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");$a(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Rt(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function O(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function c(a){try{u(n.next(a))}catch(h){s(h)}}function l(a){try{u(n.throw(a))}catch(h){s(h)}}function u(a){a.done?o(a.value):i(a.value).then(c,l)}u((n=n.apply(e,t||[])).next())})}function R(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=c(0),s.throw=c(1),s.return=c(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(a){return l([u,a])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(a){u=[6,a],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function U(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")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.")}function B(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(c){s={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function H(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var $a,P,z=Y(()=>{$a=function(e,t){return $a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},$a(e,t)};P=function(){return P=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},P.apply(this,arguments)}});var yt,Ge,$i=Y(()=>{(function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"})(yt||(yt={}));(function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"})(Ge||(Ge={}))});var Ha,Kt,Ka,Hi,Nn,Ki,Xi,Yi,wp,_p,xp,Tp,Cp,Ip,Xa,Ya,Ja,Qa,Za,el,tl,rl,nl,il,ol,Xt,Yt,sl,ft=Y(()=>{Ha="-",Kt="AMP",Ka="".concat(Kt,"_unsent"),Hi="$default_instance",Nn="https://api2.amplitude.com/2/httpapi",Ki="https://api.eu.amplitude.com/2/httpapi",Xi="https://api2.amplitude.com/batch",Yi="https://api.eu.amplitude.com/batch",wp="utm_campaign",_p="utm_c
1ontent",xp="utm_id",Tp="utm_medium",Cp="utm_source",Ip="utm_term",Xa="dclid",Ya="fbclid",Ja="gbraid",Qa="gclid",Za="ko_click_id",el="li_fat_id",tl="msclkid",rl="rdt_cid",nl="ttclid",il="twclid",ol="wbraid",Xt={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},Yt=["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"],sl=["authorization","cookie","set-cookie"]});var LT,Ji,al,ll=Y(()=>{z();LT=1e3,Ji=function(e){if(Object.keys(e).length>LT)return!1;for(var t in e){var r=e[t];if(!al(t,r))return!1}return!0},al=function(e,t){var r,n;if(typeof e!="string")return!1;if(Array.isArray(t)){var i=!0;try{for(var o=U(t),s=o.next();!s.done;s=o.next()){var c=s.value;if(Array.isArray(c))return!1;if(typeof c=="object")i=i&&Ji(c);else if(!["number","string"].includes(typeof c))return!1;if(!i)return!1}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}else{if(t==null)return!1;if(typeof t=="object")return Ji(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0}});var dt,ke,Ap,Qi=Y(()=>{z();ft();ll();dt=(function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return P({},this._properties)},e.prototype.set=function(t,r){return this._safeSet(ke.SET,t,r),this},e.prototype.setOnce=function(t,r){return this._safeSet(ke.SET_ONCE,t,r),this},e.prototype.append=function(t,r){return this._safeSet(ke.APPEND,t,r),this},e.prototype.prepend=function(t,r){return this._safeSet(ke.PREPEND,t,r),this},e.prototype.postInsert=function(t,r){return this._safeSet(ke.POSTINSERT,t,r),this},e.prototype.preInsert=function(t,r){return this._safeSet(ke.PREINSERT,t,r),this},e.prototype.remove=function(t,r){return this._safeSet(ke.REMOVE,t,r),this},e.prototype.add=function(t,r){return this._safeSet(ke.ADD,t,r),this},e.prototype.unset=function(t){return this._safeSet(ke.UNSET,t,Ha),this},e.prototype.clearAll=function(){return this._properties={},this._properties[ke.CLEAR_ALL]=Ha,this},e.prototype._safeSet=function(t,r,n){if(this._validate(t,r,n)){var i=this._properties[t];return i===void 0&&(i={},this._properties[t]=i),i[r]=n,this._propertySet.add(r),!0}return!1},e.prototype._validate=function(t,r,n){return this._properties[ke.CLEAR_ALL]!==void 0||this._propertySet.has(r)?!1:t===ke.ADD?typeof n=="number":t!==ke.UNSET&&t!==ke.REMOVE?al(r,n):!0},e})();(function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"})(ke||(ke={}));Ap=[ke.CLEAR_ALL,ke.UNSET,ke.SET,ke.SET_ONCE,ke.ADD,ke.APPEND,ke.PREPEND,ke.PREINSERT,ke.POSTINSERT,ke.REMOVE]});var Rp,Op,Pp,kp,ul,Np,Mp,Lp,cl=Y(()=>{Rp="Event tracked successfully",Op="Unexpected error occurred",Pp="Event rejected due to exceeded retry count",kp="Event skipped due to optOut config",ul="Event skipped due to empty event type",Np="Event rejected due to missing API key",Mp="Invalid API key",Lp="Client not initialized"});var Ae,Mn=Y(()=>{(function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"})(Ae||(Ae={}))});var Bt,Zi=Y(()=>{Mn();Bt=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Ae.Unknown),{event:e,code:t,message:r}}});var j,ht=Y(()=>{j=function(){var e="ampIntegrationContext";if(typeof globalThis<"u"&&typeof globalThis[e]<"u")return globalThis[e];if(typeof globalThis<"u")return globalThis;if(typeof window<"u")return window;if(typeof self<"u")return self;if(typeof global<"u")return global}});var DT,Dp,Xe,Gr=Y(()=>{z();ht();DT=function(e){return e?(e^Math.random()*16>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,Xe)},Dp=H([],B(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),Xe=function(e){var t,r=j();if(!(!((t=r?.crypto)===null||t===void 0)&&t.getRandomValues))return DT(e);var n=r.crypto.getRandomValues(new Uint8Array(16));return n[6]=n[6]&15|64,n[8]=n[8]&63|128,H([],B(n.entries()),!1).map(function(i){var o=B(i,2),s=o[0],c=o[1];return[4,6,8,10].includes(s)?"-".concat(Dp[c]):Dp[c]}).join("")}});var Up,Fp=Y(()=>{z();Zi();Gr();Up=(function(){function e(t){this.client=t,this.queue=[],this.applying=!1,this.plugins=[],this.pluginStatus=new Map,this._optOutListeners=[]}return e.prototype.register=function(t,r){var n,i;return O(this,void 0,void 0,function(){var o;return R(this,function(s){switch(s.label){case 0:return t.name===void 0&&(t.name=Xe(),this.loggerProvider.warn(`Plugin name is undefined. 2 Generating a random UUID for plugin name: `.concat(t.name,`. 3 Set a name for the plugin to prevent it from being added multiple times.`))),o=t.name,this.pluginStatus.has(o)?(this.loggerProvider.warn("Plugin with name ".concat(o," already exists, skipping registration")),[2]):(t.type=(n=t.type)!==null&&n!==void 0?n:"enrichment",this.pluginStatus.set(o,"locked"),[4,(i=t.setup)===null||i===void 0?void 0:i.call(t,r,this.client)]);case 1:return s.sent(),this.pluginStatus.get(o)!=="locked"?[2]:(this.plugins.push(t),this.pluginStatus.set(o,"installed"),[2])}})})},e.prototype.deregister=function(t,r){var n;return O(this,void 0,void 0,function(){var i,o;return R(this,function(s){switch(s.label){case 0:return this.pluginStatus.delete(t),i=this.plugins.findIndex(function(c){return c.name===t}),i===-1?(r.loggerProvider.warn("Plugin with name ".concat(t," does not exist, skipping deregistration")),[2]):(o=this.plugins[i],this.plugins.splice(i,1),[4,(n=o.teardown)===null||n===void 0?void 0:n.call(o)]);case 1:return s.sent(),[2]}})})},e.prototype.reset=function(t){this._clearOptOutListeners(),this.applying=!1;var r=this.plugins;r.map(function(n){var i;return(i=n.teardown)===null||i===void 0?void 0:i.call(n)}),this.plugins=[],this.pluginStatus.clear(),this.client=t},e.prototype.push=function(t){var r=this;return new Promise(function(n){r.queue.push([t,n]),r.scheduleApply(0)})},e.prototype.scheduleApply=function(t){var r=this;this.applying||(this.applying=!0,setTimeout(function(){r.apply(r.queue.shift()).then(function(){r.applying=!1,r.queue.length>0&&r.scheduleApply(0)})},t))},e.prototype.apply=function(t){return O(this,void 0,void 0,function(){var r,n,i,o,s,c,l,d,p,u,a,h,f,d,p,v,g,y,m,E,w,b;return R(this,function(S){switch(S.label){case 0:if(!t)return[2];r=B(t,1),n=r[0],i=B(t,2),o=i[1],this.loggerProvider.log("Timeline.apply: Initial event",n),s=this.plugins.filter(function(_){return _.type==="before"}),S.label=1;case 1:S.trys.push([1,6,7,8]),c=U(s),l=c.next(),S.label=2;case 2:return l.done?[3,5]:(d=l.value,d.execute?[4,d.execute(P({},n))]:[3,4]);case 3:if(p=S.sent(),p===null)return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(d.name),"', event: ").concat(JSON.stringify(n))),o({event:n,code:0,message:""}),[2];n=p,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(d.name),"', event: ").concat(JSON.stringify(n))),S.label=4;case 4:return l=c.next(),[3,2];case 5:return[3,8];case 6:return u=S.sent(),m={error:u},[3,8];case 7:try{l&&!l.done&&(E=c.return)&&E.call(c)}finally{if(m)throw m.error}
3return[7];case 8:a=this.plugins.filter(function(_){return _.type==="enrichment"||_.type===void 0}),S.label=9;case 9:S.trys.push([9,14,15,16]),h=U(a),f=h.next(),S.label=10;case 10:return f.done?[3,13]:(d=f.value,d.execute?[4,d.execute(P({},n))]:[3,12]);case 11:if(p=S.sent(),p===null)return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(d.name),"', event: ").concat(JSON.stringify(n))),o({event:n,code:0,message:""}),[2];n=p,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(d.name),"', event: ").concat(JSON.stringify(n))),S.label=12;case 12:return f=h.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&&(b=h.return)&&b.call(h)}finally{if(w)throw w.error}return[7];case 16:return g=this.plugins.filter(function(_){return _.type==="destination"}),this.loggerProvider.log("Timeline.apply: Final event before destinations, event: ".concat(JSON.stringify(n))),y=g.map(function(_){var x=P({},n);return _.execute(x).catch(function(I){return Bt(x,0,String(I))})}),Promise.all(y).then(function(_){var x=B(_,1),I=x[0],C=I||Bt(n,100,"Event not tracked, no destination plugins on the instance");o(C)}),[2]}})})},e.prototype.flush=function(){return O(this,void 0,void 0,function(){var t,r,n,i=this;return R(this,function(o){switch(o.label){case 0:return t=this.queue,this.queue=[],[4,Promise.all(t.map(function(s){return i.apply(s)}))];case 1:return o.sent(),r=this.plugins.filter(function(s){return s.type==="destination"}),n=r.map(function(s){return s.flush&&s.flush()}),[4,Promise.all(n)];case 2:return o.sent(),[2]}})})},e.prototype.addOptOutListener=function(t){this._optOutListeners.push(t)},e.prototype._clearOptOutListeners=function(){this._optOutListeners=[]},e.prototype.onIdentityChanged=function(t){this.plugins.forEach(function(r){var n;(n=r.onIdentityChanged)===null||n===void 0||n.call(r,t)})},e.prototype.onSessionIdChanged=function(t){this.plugins.forEach(function(r){var n;(n=r.onSessionIdChanged)===null||n===void 0||n.call(r,t)})},e.prototype.onOptOutChanged=function(t){this.plugins.forEach(function(r){var n;(n=r.onOptOutChanged)===null||n===void 0||n.call(r,t)}),this._callOptOutListeners(t)},e.prototype._callOptOutListeners=function(t){return O(this,void 0,void 0,function(){var r,n,i,o,s,c,l;return R(this,function(u){switch(u.label){case 0:u.trys.push([0,7,8,9]),r=U(this._optOutListeners),n=r.next(),u.label=1;case 1:if(n.done)return[3,6];i=n.value,u.label=2;case 2:return u.trys.push([2,4,,5]),[4,i(t)];case 3:return u.sent(),[3,5];case 4:return o=u.sent(),this.loggerProvider.error("Error calling optOut listener",o),[3,5];case 5:return n=r.next(),[3,1];case 6:return[3,9];case 7:return s=u.sent(),c={error:s},[3,9];case 8:try{n&&!n.done&&(l=r.return)&&l.call(r)}finally{if(c)throw c.error}return[7];case 9:return[2]}})})},e.prototype.onReset=function(){this.plugins.forEach(function(t){var r;(r=t.onReset)===null||r===void 0||r.call(t)})},e})()});var Bp,yr,qp,Gp,Wp,fl=Y(()=>{z();Qi();$i();Bp=function(e,t,r){var n=typeof e=="string"?{event_type:e}:e;return P(P(P({},n),r),t&&{event_properties:t})},yr=function(e,t){var r=P(P({},t),{event_type:Ge.IDENTIFY,user_properties:e.getUserProperties()});return r},qp=function(e,t,r,n){var i,o=P(P({},n),{event_type:Ge.GROUP_IDENTIFY,group_properties:r.getUserProperties(),groups:(i={},i[e]=t,i)});return o},Gp=function(e,t,r){var n,i=new dt;i.set(e,t);var o=P(P({},r),{event_type:Ge.IDENTIFY,user_properties:i.getUserProperties(),groups:(n={},n[e]=t,n)});return o},Wp=function(e,t){return P(P({},t),{event_type:Ge.REVENUE,event_properties:e.getEventProperties()})}});var Ve,dl=Y(()=>{Ve=function(e){return{promise:e||Promise.resolve()}}});var hl,jp=Y(()=>{z();$i();Qi();cl();Fp();fl();Zi();dl();hl=(function(){function e(t){t===void 0&&(t="$default"),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new Up(this),this.name=t}return e.prototype._init=function(t){return O(this,void 0,void 0,function(){var r=this;return R(this,function(n){switch(n.label){case 0:return this.config=t,this.timeline.reset(this),this.timeline.loggerProvider=this.config.loggerProvider,[4,this.runQueuedFunctions("q",function(){return r.isReady=!0})];case 1:return n.sent(),[2]}})})},e.prototype.runQueuedFunctions=function(t,r){return O(this,void 0,void 0,function(){var n,i,o,s,c,l,u,a;return R(this,function(h){switch(h.label){case 0:n=this[t],this[t]=[],h.label=1;case 1:h.trys.push([1,8,9,10]),i=U(n),o=i.next(),h.label=2;case 2:return o.done?[3,7]:(s=o.value,c=s(),c&&"promise"in c?[4,c.promise]:[3,4]);case 3:return h.sent(),[3,6];case 4:return[4,c];case 5:h.sent(),h.label=6;case 6:return o=i.next(),[3,2];case 7:return[3,10];case 8:return l=h.sent(),u={error:l},[3,10];case 9:try{o&&!o.done&&(a=i.return)&&a.call(i)}finally{if(u)throw u.error}
3return[7];case 10:return this[t].length?[4,this.runQueuedFunctions(t,r)]:[3,12];case 11:return h.sent(),[3,13];case 12:r?.(),h.label=13;case 13:return[2]}})})},e.prototype.track=function(t,r,n){var i=Bp(t,r,n);return this.userProperties=this.getOperationAppliedUserProperties(i.user_properties),Ve(this.dispatch(i))},e.prototype.identify=function(t,r){var n=yr(t,r);return this.userProperties=this.getOperationAppliedUserProperties(n.user_properties),Ve(this.dispatch(n))},e.prototype.groupIdentify=function(t,r,n,i){var o=qp(t,r,n,i);return Ve(this.dispatch(o))},e.prototype.setGroup=function(t,r,n){var i=Gp(t,r,n);return this.userProperties=this.getOperationAppliedUserProperties(i.user_properties),Ve(this.dispatch(i))},e.prototype.revenue=function(t,r){var n=Wp(t,r);return Ve(this.dispatch(n))},e.prototype.add=function(t){return this.isReady?this._addPlugin(t):(this.q.push(this._addPlugin.bind(this,t)),Ve())},e.prototype._addPlugin=function(t){return Ve(this.timeline.register(t,this.config))},e.prototype.remove=function(t){return this.isReady?this._removePlugin(t):(this.q.push(this._removePlugin.bind(this,t)),Ve())},e.prototype._removePlugin=function(t){return Ve(this.timeline.deregister(t,this.config))},e.prototype.dispatchWithCallback=function(t,r){if(!this.isReady)return r(Bt(t,0,Lp));this.process(t).then(r)},e.prototype.dispatch=function(t){return O(this,void 0,void 0,function(){var r=this;return R(this,function(n){return this.isReady?[2,this.process(t)]:[2,new Promise(function(i){r.dispatchQ.push(r.dispatchWithCallback.bind(r,t,i))})]})})},e.prototype.getOperationAppliedUserProperties=function(t){var r,n=(r=this.userProperties)!==null&&r!==void 0?r:{},i=P({},n);if(t===void 0)return i;var o={};return Object.keys(t).forEach(function(s){Object.values(yt).includes(s)||(o[s]=t[s])}),Ap.forEach(function(s){if(Object.keys(t).includes(s)){var c=t[s];
3switch(s){case yt.CLEAR_ALL:Object.keys(i).forEach(function(l){delete i[l]});break;case yt.UNSET:Object.keys(c).forEach(function(l){delete i[l]});break;case yt.SET:Object.assign(i,c);break}}}),Object.assign(i,o),i},e.prototype.process=function(t){return O(this,void 0,void 0,function(){var r,o,n,i,o;return R(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),this.config.optOut?[2,Bt(t,0,kp)]:(r=t.event_type,typeof r!="string"||r.trim().length===0?(this.config.loggerProvider.error(ul),[2,Bt(t,0,ul)]):(t.event_type===Ge.IDENTIFY&&this.timeline.onIdentityChanged({userProperties:this.userProperties}),[4,this.timeline.push(t)]));case 1:return o=s.sent(),o.code===200?this.config.loggerProvider.log(o.message):o.code===100?this.config.loggerProvider.warn(o.message):this.config.loggerProvider.error(o.message),[2,o];case 2:return n=s.sent(),i=String(n),this.config.loggerProvider.error(i),o=Bt(t,0,i),[2,o];case 3:return[2]}})})},e.prototype.setOptOut=function(t){if(!this.isReady){this.q.push(this._setOptOut.bind(this,!!t));return}this._setOptOut(t)},e.prototype._setOptOut=function(t){this.config.optOut!==t&&(this.config.optOut=!!t,this.timeline.onOptOutChanged(t))},e.prototype.flush=function(){return Ve(this.timeline.flush())},e.prototype.plugin=function(t){var r=this.timeline.plugins.find(function(n){return n.name===t});if(r===void 0){this.config.loggerProvider.debug("Cannot find plugin with name ".concat(t));return}return r},e.prototype.plugins=function(t){return this.timeline.plugins.filter(function(r){return r instanceof t})},e})()});var Ln,bt,Vp=Y(()=>{z();ll();Ln=(function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(t){return this.productId=t,this},e.prototype.setQuantity=function(t){return t>0&&(this.quantity=t),this},e.prototype.setPrice=function(t){return this.price=t,this},e.prototype.setRevenueType=function(t){return this.revenueType=t,this},e.prototype.setCurrency=function(t){return this.currency=t,this},e.prototype.setRevenue=function(t){return this.revenue=t,this},e.prototype.setReceipt=function(t){return this.receipt=t,this},e.prototype.setReceiptSig=function(t){return this.receiptSig=t,this},e.prototype.setEventProperties=function(t){try{var r=JSON.parse(JSON.stringify(t));Ji(r)&&(this.properties=r)}catch{}return this},e.prototype.getEventProperties=function(){var t=this.properties?P({},this.properties):{};return t[bt.REVENUE_PRODUCT_ID]=this.productId,t[bt.REVENUE_QUANTITY]=this.quantity,t[bt.REVENUE_PRICE]=this.price,t[bt.REVENUE_TYPE]=this.revenueType,t[bt.REVENUE_CURRENCY]=this.currency,t[bt.REVENUE]=this.revenue,t[bt.RECEIPT]=this.receipt,t[bt.RECEIPT_SIG]=this.receiptSig,t},e})();(function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue",e.RECEIPT="$receipt",e.RECEIPT_SIG="$receiptSig"})(bt||(bt={}))});var zp,$p=Y(()=>{zp=function(e,t){var r=Math.max(t,1);return e.reduce(function(n,i,o){var s=Math.floor(o/r);return n[s]||(n[s]=[]),n[s].push(i),n},[])}});var We,Dn=Y(()=>{(function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"})(We||(We={}))});var eo,St,pl=Y(()=>{Dn();eo="Amplitude Logger ",St=(function(){function e(){this.logLevel=We.None}return e.prototype.disable=function(){this.logLevel=We.None},e.prototype.enable=function(t){t===void 0&&(t=We.Warn),this.logLevel=t},e.prototype.log=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.logLevel<We.Verbose||console.log("".concat(eo,"[Log]: ").concat(t.join(" ")))},e.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.logLevel<We.Warn||console.warn("".concat(eo,"[Warn]: ").concat(t.join(" ")))},e.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.logLevel<We.Error||console.error("".concat(eo,"[Error]: ").concat(t.join(" ")))},e.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.logLevel<We.Debug||console.log("".concat(eo,"[Debug]: ").concat(t.join(" ")))},e})()});var to,Un,UT,vl,gl,ml=Y(()=>{ft();pl();Dn();to=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:Hi,logLevel:We.Warn,loggerProvider:new St,offline:!1,optOut:!1,serverUrl:Nn,serverZone:"US",useBatch:!1}},Un=(function(){function e(t){var r,n,i,o;this._optOut=!1;var s=to();this.apiKey=t.apiKey,this.flushIntervalMillis=(r=t.flushIntervalMillis)!==null&&r!==void 0?r:s.flushIntervalMillis,this.flushMaxRetries=t.flushMaxRetries||s.flushMaxRetries,this.flushQueueSize=t.flushQueueSize||s.flushQueueSize,this.instanceName=t.instanceName||s.instanceName,this.loggerProvider=t.loggerProvider||s.loggerProvider,this.logLevel=(n=t.logLevel)!==null&&n!==void 0?n:s.logLevel,this.minIdLength=t.minIdLength,this.plan=t.plan,this.ingestionMetadata=t.ingestionMetadata,this.offline=t.offline!==void 0?t.offline:s.offline,this.optOut=(i=t.optOut)!==null&&i!==void 0?i:s.optOut,this.serverUrl=t.serverUrl,this.serverZone=t.serverZone||s.serverZone,this.storageProvider=t.storageProvider,this.transportProvider=t.transportProvider,this.useBatch=(o=t.useBatch)!==null&&o!==void 0?o:s.useBatch,this.loggerProvider.enable(this.logLevel);var c=vl(t.serverUrl,t.serverZone,t.useBatch);this.serverZone=c.serverZone,this.serverUrl=c.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(t){this._optOut=t}
3,enumerable:!1,configurable:!0}),e})(),UT=function(e,t){return e==="EU"?t?Yi:Ki:t?Xi:Nn},vl=function(e,t,r){if(e===void 0&&(e=""),t===void 0&&(t=to().serverZone),r===void 0&&(r=to().useBatch),e)return{serverUrl:e,serverZone:void 0};var n=["US","EU"].includes(t)?t:to().serverZone;return{serverZone:n,serverUrl:UT(n,r)}},gl=(function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(t,r){this.sdk.metrics.histogram[t]=r},e})()});function Fn(e){return e>=200&&e<300}var yl=Y(()=>{});var Bn,le,FT,ue,Z,bl=Y(()=>{z();Dn();Bn=function(e){e===void 0&&(e=0);var t=new Error().stack||"";return t.split(` 4`).slice(2+e).map(function(r){return r.trim()})},le=function(e){return function(){var t=P({},e.config),r=t.loggerProvider,n=t.logLevel;return{logger:r,logLevel:n}}},FT=function(e,t){var r,n;t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,"");try{for(var i=U(t.split(".")),o=i.next();!o.done;o=i.next()){var s=o.value;if(s in e)e=e[s];else return}}catch(c){r={error:c}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return e},ue=function(e,t){return function(){var r,n,i={};try{for(var o=U(t),s=o.next();!s.done;s=o.next()){var c=s.value;i[c]=FT(e,c)}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}},Z=function(e,t,r,n,i){return i===void 0&&(i=null),function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var c=r(),l=c.logger,u=c.logLevel;if(u&&u<We.Debug||!u||!l)return e.apply(i,o);var a={type:"invoke public method",name:t,args:o,stacktrace:Bn(1),time:{start:new Date().toISOString()},states:{}};n&&a.states&&(a.states.before=n());var h=e.apply(i,o);return h&&h.promise?h.promise.then(function(){n&&a.states&&(a.states.after=n()),a.time&&(a.time.end=new Date().toISOString()),l.debug(JSON.stringify(a,null,2))}):(n&&a.states&&(a.states.after=n()),a.time&&(a.time.end=new Date().toISOString()),l.debug(JSON.stringify(a,null,2))),h}}});function GT(e){return e instanceof Error?e.message:String(e)}function qn(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch{}return t}var BT,qT,Sl,Hp=Y(()=>{z();Mn();cl();ft();$p();Zi();ml();Gr();yl();bl();BT=new Set([Nn,Ki,Xi,Yi]),qT=function(e,t){return t===void 0&&(t=!1),BT.has(e)?!0:t};Sl=(function(){function e(t){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=t?.diagnosticsClient}return e.prototype.setup=function(t){var r;return O(this,void 0,void 0,function(){var n,i=this;return R(this,function(o){switch(o.label){case 0:return this.config=t,this.storageKey="".concat(Ka,"_").concat(this.config.apiKey.substring(0,10)),[4,(r=this.config.storageProvider)===null||r===void 0?void 0:r.get(this.storageKey)];case 1:return n=o.sent(),n&&n.length>0&&Promise.all(n.map(function(s){return i.execute(s)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(t){var r=this;return t.insert_id||(t.insert_id=Xe()),new Promise(function(n){var i={event:t,attempts:0,callback:function(o){return n(o)},timeout:0};r.queue.push(i),r.schedule(r.config.flushIntervalMillis),r.saveEvents()})},e.prototype.removeEventsExceedFlushMaxRetries=function(t){var r=this;return t.filter(function(n){return n.attempts+=1,n.attempts<r.config.flushMaxRetries?!0:(r.fulfillRequest([n],500,Pp),!1)})},e.prototype.scheduleEvents=function(t){var r=this;t.forEach(function(n){r.schedule(n.timeout===0?r.config.flushIntervalMillis:n.timeout)})},e.prototype.schedule=function(t){var r=this;if(!this.config.offline&&(this.scheduleId===null||this.scheduleId&&t>this.scheduledTimeout)){this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=t,this.scheduleId=setTimeout(function(){r.queue=r.queue.map(function(n){return n.timeout=0,n}),r.flush(!0)},t);return}},e.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},e.prototype.flush=function(t){return t===void 0&&(t=!1),O(this,void 0,void 0,function(){var r,n,i,o=this;return R(this,function(s){switch(s.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(),r=[],n=[],this.queue.forEach(function(c){return c.timeout===0?r.push(c):n.push(c)}),i=zp(r,this.config.flushQueueSize),[4,i.reduce(function(c,l){return O(o,void 0,void 0,function(){return R(this,function(u){switch(u.label){case 0:return[4,c];case 1:return u.sent(),[4,this.send(l,t)];case 2:return[2,u.sent()]}})})},Promise.resolve())]);case 1:return s.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}})})},e.prototype.send=function(t,r){var n;return r===void 0&&(r=!0),O(this,void 0,void 0,function(){var i,o,s,c,l,u;return R(this,function(a){switch(a.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(t,400,Np)];i={api_key:this.config.apiKey,events:t.map(function(h){var f=h.event,d=f.extra,p=Rt(f,["extra"]);return p}),options:{min_id_length:this.config.minIdLength},client_upload_time:new Date().toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new gl,a.label=1;case 1:return a.trys.push([1,3,,4]),o=vl(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,s=qT(o,this.config.enableRequestBodyCompression),[4,this.config.transportProvider.send(o,i,s)];case 2:return c=a.sent(),c===null?(this.fulfillRequest(t,0,Op),[2]):r?(this.handleResponse(c,t),[3,4]):("body"in c?this.fulfillRequest(t,c.statusCode,"".concat(c.status,": ").concat(qn(c))):this.fulfillRequest(t,c.statusCode,c.status),[2]);case 3:return l=a.sent(),u=GT(l),this.config.loggerProvider.error(u),(n=this.diagnosticsClient)===null||n===void 0||n.recordEvent("analytics.events.unsuccessful.from.catch.error",{events:t.map(function(h){return h.event.event_type}),message:u,stack_trace:Bn()}),this.handleResponse({status:Ae.Failed,statusCode:0},t),[3,4];case 4:return[2]}})})},e.prototype.handleResponse=function(t,r){var n;Fn(t.statusCode)||(n=this.diagnosticsClient)===null||n===void 0||n.recordEvent("analytics.events.unsuccessful",{events:r.map(function(o){return o.event.event_type}),code:t.statusCode,status:t.status,body:qn(t),stack_trace:Bn()});var i=t.status;switch(i){case Ae.Success:{this.handleSuccessResponse(t,r);break}case Ae.Invalid:{this.handleInvalidResponse(t,r);break}case Ae.PayloadTooLarge:{this.handlePayloadTooLargeResponse(t,r);break}case Ae.RateLimit:{this.handleRateLimitResponse(t,r);break}default:{this.config.loggerProvider.warn(`{code: 0, error: "Status '`.concat(i,"' provided for ").concat(r.length,' events"}')),this.handleOtherResponse(r);break}}},e.prototype.handleSuccessResponse=function(t,r){this.fulfillRequest(r,t.statusCode,Rp)},e.prototype.handleInvalidResponse=function(t,r){var n=this;if(t.body.missingField||t.body.error.startsWith(Mp)){this.fulfillRequest(r,t.statusCode,t.body.error);return}var i=H(H(H(H([],B(Object.values(t.body.eventsWithInvalidFields)),!1),B(Object.values(t.body.eventsWithMissingFields)),!1),B(Object.values(t.body.eventsWithInvalidIdLengths)),!1),B(t.body.silencedEvents),!1).flat(),o=new Set(i),s=r.filter(function(l,u){if(o.has(u)){n.fulfillRequest([l],t.statusCode,t.body.error);return}return!0});s.length>0&&this.config.loggerProvider.warn(qn(t));
4var c=this.removeEventsExceedFlushMaxRetries(s);this.scheduleEvents(c)},e.prototype.handlePayloadTooLargeResponse=function(t,r){if(r.length===1){this.fulfillRequest(r,t.statusCode,t.body.error);return}this.config.loggerProvider.warn(qn(t)),this.config.flushQueueSize/=2;var n=this.removeEventsExceedFlushMaxRetries(r);this.scheduleEvents(n)},e.prototype.handleRateLimitResponse=function(t,r){var n=this,i=Object.keys(t.body.exceededDailyQuotaUsers),o=Object.keys(t.body.exceededDailyQuotaDevices),s=t.body.throttledEvents,c=new Set(i),l=new Set(o),u=new Set(s),a=r.filter(function(f,d){if(f.event.user_id&&c.has(f.event.user_id)||f.event.device_id&&l.has(f.event.device_id)){n.fulfillRequest([f],t.statusCode,t.body.error);return}return u.has(d)&&(f.timeout=n.throttleTimeout),!0});a.length>0&&this.config.loggerProvider.warn(qn(t));var h=this.removeEventsExceedFlushMaxRetries(a);this.scheduleEvents(h)},e.prototype.handleOtherResponse=function(t){var r=this,n=t.map(function(o){return o.timeout=o.attempts*r.retryTimeout,o}),i=this.removeEventsExceedFlushMaxRetries(n);this.scheduleEvents(i)},e.prototype.fulfillRequest=function(t,r,n){var i,o,s;Fn(r)?(s=this.diagnosticsClient)===null||s===void 0||s.increment("analytics.events.sent",t.length):((i=this.diagnosticsClient)===null||i===void 0||i.increment("analytics.events.dropped",t.length),(o=this.diagnosticsClient)===null||o===void 0||o.recordEvent("analytics.events.dropped",{events:t.map(function(c){return c.event.event_type}),code:r,message:n,stack_trace:Bn()})),this.removeEvents(t),t.forEach(function(c){return c.callback(Bt(c.event,r,n))})},e.prototype.saveEvents=function(){if(this.config.storageProvider){var t=this.queue.map(function(r){return r.event});this.config.storageProvider.set(this.storageKey,t)}},e.prototype.removeEvents=function(t){this.queue=this.queue.filter(function(r){return!t.some(function(n){return n.event.insert_id===r.event.insert_id})}),this.saveEvents()},e})()});function ro(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")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.")}function Kp(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(c){s={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}var WT,jT,VT,ir,no,zT,$T,HT,KT,Gn,Wr,io=Y(()=>{WT=(function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:jT(),platform:"Web",os:void 0,deviceModel:void 0}},e})(),jT=function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},VT=(function(){function e(){this.queue=[]}return e.prototype.logEvent=function(t){this.receiver?this.receiver(t):this.queue.length<512&&this.queue.push(t)},e.prototype.setEventReceiver=function(t){this.receiver=t,this.queue.length>0&&(this.queue.forEach(function(r){t(r)}),this.queue=[])},e})(),ir=function(){return ir=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},ir.apply(this,arguments)};no=function(e,t){var r,n,i=["string","number","boolean","undefined"],o=typeof e,s=typeof t;if(o!==s)return!1;try{for(var c=ro(i),l=c.next();!l.done;l=c.next()){var u=l.value;if(u===o)return e===t}}catch(g){r={error:g}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}if(e==null&&t==null)return!0;if(e==null||t==null||e.length!==t.length)return!1;var a=Array.isArray(e),h=Array.isArray(t);if(a!==h)return!1;if(a&&h){for(var f=0;f<e.length;f++)if(!no(e[f],t[f]))return!1}else{var d=Object.keys(e).sort(),p=Object.keys(t).sort();if(!no(d,p))return!1;var v=!0;return Object.keys(e).forEach(function(g){no(e[g],t[g])||(v=!1)}),v}return!0},zT="$set",$T="$unset",HT="$clearAll";Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n});KT=(function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var t=this,r=ir({}
4,this.identity.userProperties),n=ir(ir({},this.identity),{userProperties:r});return{setUserId:function(i){return n.userId=i,this},setDeviceId:function(i){return n.deviceId=i,this},setUserProperties:function(i){return n.userProperties=i,this},setOptOut:function(i){return n.optOut=i,this},updateUserProperties:function(i){var o,s,c,l,u,a,h=n.userProperties||{};try{for(var f=ro(Object.entries(i)),d=f.next();!d.done;d=f.next()){var p=Kp(d.value,2),v=p[0],g=p[1];switch(v){case zT:try{for(var y=(c=void 0,ro(Object.entries(g))),m=y.next();!m.done;m=y.next()){var E=Kp(m.value,2),w=E[0],b=E[1];h[w]=b}}catch(x){c={error:x}}finally{try{m&&!m.done&&(l=y.return)&&l.call(y)}finally{if(c)throw c.error}}break;case $T:try{for(var S=(u=void 0,ro(Object.keys(g))),_=S.next();!_.done;_=S.next()){var w=_.value;delete h[w]}}catch(x){u={error:x}}finally{try{_&&!_.done&&(a=S.return)&&a.call(S)}finally{if(u)throw u.error}}break;case HT:h={};break}}}catch(x){o={error:x}}finally{try{d&&!d.done&&(s=f.return)&&s.call(f)}finally{if(o)throw o.error}}return n.userProperties=h,this},commit:function(){return t.setIdentity(n),this}}},e.prototype.getIdentity=function(){return ir({},this.identity)},e.prototype.setIdentity=function(t){var r=ir({},this.identity);this.identity=ir({},t),no(r,this.identity)||this.listeners.forEach(function(n){n(t)})},e.prototype.addIdentityListener=function(t){this.listeners.add(t)},e.prototype.removeIdentityListener=function(t){this.listeners.delete(t)},e})(),Gn=typeof globalThis<"u"?globalThis:typeof global<"u"?global:self,Wr=(function(){function e(){this.identityStore=new KT,this.eventBridge=new VT,this.applicationContextProvider=new WT}return e.getInstance=function(t){return Gn.analyticsConnectorInstances||(Gn.analyticsConnectorInstances={}),Gn.analyticsConnectorInstances[t]||(Gn.analyticsConnectorInstances[t]=new e),Gn.analyticsConnectorInstances[t]},e})()});var qt,El,wl,_l=Y(()=>{io();ft();qt=function(e){return e===void 0&&(e=Hi),Wr.getInstance(e)},El=function(e,t){qt(t).identityStore.editIdentity().setUserId(e).commit()},wl=function(e,t){qt(t).identityStore.editIdentity().setDeviceId(e).commit()}});var xl,Xp=Y(()=>{z();_l();xl=(function(){function e(){this.name="identity",this.type="before",this.identityStore=qt().identityStore}return e.prototype.execute=function(t){return O(this,void 0,void 0,function(){var r;return R(this,function(n){return r=t.user_properties,r&&this.identityStore.editIdentity().updateUserProperties(r).commit(),[2,t]})})},e.prototype.setup=function(t){return O(this,void 0,void 0,function(){return R(this,function(r){return t.instanceName&&(this.identityStore=qt(t.instanceName).identityStore),[2]})})},e})()});var Wn,Yp=Y(()=>{Wn=function(e,t){t===void 0&&(t=Date.now());var r=Date.now(),n=r-t;return n>e}});var oo,Tl,Jp=Y(()=>{ft();oo=function(e,t,r){return t===void 0&&(t=""),r===void 0&&(r=10),[Kt,t,e.substring(0,r)].filter(Boolean).join("_")},Tl=function(e){return"".concat(Kt.toLowerCase(),"_").concat(e.substring(0,6))}});var Cl,Qp=Y(()=>{Cl=function(){var e,t,r,n;if(typeof navigator>"u")return"";var i=navigator.userLanguage;return(n=(r=(t=(e=navigator.languages)===null||e===void 0?void 0:e[0])!==null&&t!==void 0?t:navigator.language)!==null&&r!==void 0?r:i)!==null&&n!==void 0?n:""}});var or,Zp,Il=Y(()=>{ht();or=function(){var e,t=j();if(!(!((e=t?.location)===null||e===void 0)&&e.search))return{};var r=t.location.search.substring(1).split("&").filter(Boolean),n=r.reduce(function(i,o){var s=o.split("=",2),c=Zp(s[0]),l=Zp(s[1]);return l&&(i[c]=l),i},{});return n},Zp=function(e){e===void 0&&(e="");try{return decodeURIComponent(e)}catch{return""}}});var jr,ot,ev=Y(()=>{jr=function(e,t){return!t||!t.length?!0:t.some(function(r){return typeof r=="string"?e===r:e.match(r)})},ot=function(e,t){var r=e;try{r=decodeURI(e)}catch(n){t?.error("Malformed URI sequence: ",n)}return r}});var jn,Al,Rl=Y(()=>{jn=function(e){var t=0;if(e.length===0)return t;for(var r=0;r<e.length;r++){var n=e.charCodeAt(r);t=(t<<5)-t+n,t|=0}return t},Al=function(e,t){var r=jn(e.toString()),n=Math.abs(r),i=n*31,o=i%1e5;return o/1e5<t}});var Vn,tv=Y(()=>{Vn=function(e){var t={};for(var r in e){var n=e[r];n&&(t[r]=n)}return t}});var zn,rv=Y(()=>{z();zn=(function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return O(this,void 0,void 0,function(){return R(this,function(t){return[2,!0]})})},e.prototype.get=function(t){return O(this,void 0,void 0,function(){return R(this,function(r){return[2,this.memoryStorage.get(t)]})})},e.prototype.getRaw=function(t){return O(this,void 0,void 0,function(){var r;return R(this,function(n){switch(n.label){case 0:return[4,this.get(t)];case 1:return r=n.sent(),[2,r?JSON.stringify(r):void 0]}})})},e.prototype.set=function(t,r){return O(this,void 0,void 0,function(){return R(this,function(n){return this.memoryStorage.set(t,r),[2]})})},e.prototype.remove=function(t){return O(this,void 0,void 0,function(){return R(this,function(r){return this.memoryStorage.delete(t),[2]})})},e.prototype.reset=function(){return O(this,void 0,void 0,function(){return R(this,function(t){return this.memoryStorage.clear(),[2]})})},e})()});var XT,Vr,YT,JT,so,ao,nv=Y(()=>{z();ht();XT=function(){var e,t=j();return(e=t?.navigator)===null||e===void 0?void 0:e.locks},Vr=(function(){function e(t,r){r===void 0&&(r={}),this.options=P({},t),this.config=r}return e.prototype.isEnabled=function(){return O(this,void 0,void 0,function(){var t,r,n,i,o=this;return R(this,function(s){switch(s.label){case 0:return t="AMP_TEST",r=P({},this.options),n=new e(r),i=String(Date.now()),[4,n.transaction(t,function(c){var l,u;try{c.set(i);var a=c.get(),h=a===i;return!h&&o.config.diagnosticsClient&&((l=o.config.diagnosticsClient)===null||l===void 0||l.recordEvent("cookies.isEnabled.failure",{reason:"Test Value mismatch",testKey:t,testValue:i,sync:!0})),h}catch(d){if(o.config.diagnosticsClient){var f=d instanceof Error?d.message:String(d);(u=o.config.diagnosticsClient)===null||u===void 0||u.recordEvent("cookies.isEnabled.failure",{reason:"Cookie getter/setter failed",testKey:t,testValue:i,error:f,sync:!0})}return!1}finally{c.set(null)}})];case 1:return[2,s.sent()]}})})},e.prototype.get=function(t){return O(this,void 0,void 0,function(){var r;return R(this,function(n){switch(n.label){case 0:return[4,this.getRaw(t)];case 1:return r=n.sent(),[2,this.decodeCookieValue(t,r)]}})})},e.prototype.decodeCookieValue=function(t,r){if(r)try{var n=so(r);if(n===void 0){console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(t,", value: ").concat(r));return}return JSON.parse(n)}catch{console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(t,", value: ").concat(r));return}},e.prototype.getSync=function(t){var r=this.getRawSync(t);return this.decodeCookieValue(t,r)},e.prototype.getRaw=function(t){var r,n;return O(this,void 0,void 0,function(){var i,o,s,c,l,u,a,h,f,d;return R(this,function(p){switch(p.label){case 0:i=j(),o=i,p.label=1;case 1:return p.trys.push([1,4,,5]),s=o?.cookieStore,s?[4,s.getAll(t)]:[3,3];case 2:if(c=p.sent(),c){c.length>1&&((r=this.config.diagnosticsClient)===null||r===void 0||r.recordEvent("cookies.duplicate",{cookies:c.map(function(v){return v.domain})}),(n=this.config.diagnosticsClient)===null||n===void 0||n.increment("cookies.duplicate.occurrence.cookieStore"));try{for(l=U(c),u=l.next();!u.done;u=l.next())if(a=u.value,ao(a.domain,this.options.domain))return[2,a.value]}catch(v){f={error:v}}finally{try{u&&!u.done&&(d=l.return)&&d.call(l)}finally{if(f)throw f.error}}}p.label=3;case 3:return[3,5];case 4:return h=p.sent(),[3,5];case 5:return[2,this.getRawSync(t)]}})})},e.prototype.getRawSync=function(t){var r=this,n,i,o=j(),s=((i=(n=o?.document)===null||n===void 0?void 0:n.cookie.split("; "))!==null&&i!==void 0?i:[]).filter(function(u){return u.indexOf(t+"=")===0}),c=void 0,l=this.config.duplicateResolverFn;
4if(typeof l=="function"&&s.length>1&&(c=s.find(function(u){var a;try{var h=l(u.substring(t.length+1));return h||(a=r.config.diagnosticsClient)===null||a===void 0||a.increment("cookies.duplicate.occurrence.document.cookie"),h}catch{return!1}})),c||(c=s[0]),!!c)return c.substring(t.length+1)},e.prototype.set=function(t,r){return O(this,void 0,void 0,function(){return R(this,function(n){return this.setSync(t,r),[2]})})},e.prototype.setSync=function(t,r){var n;try{var i=j();if(!i||!i.document||typeof i.btoa!="function"||typeof i.encodeURIComponent!="function")return;var o=(n=this.options.expirationDays)!==null&&n!==void 0?n:0,s=r!==null?o:-1,c=void 0;if(s){var l=new Date;l.setTime(l.getTime()+s*24*60*60*1e3),c=l}var u="".concat(t,"=").concat(i.btoa(i.encodeURIComponent(JSON.stringify(r))));c&&(u+="; expires=".concat(c.toUTCString())),u+="; path=/",this.options.domain&&(u+="; domain=".concat(this.options.domain)),this.options.secure&&(u+="; Secure"),this.options.sameSite&&(u+="; SameSite=".concat(this.options.sameSite)),i.document.cookie=u}catch(h){var a=h instanceof Error?h.message:String(h);console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(t,". Error: ").concat(a))}},e.prototype.remove=function(t){return O(this,void 0,void 0,function(){return R(this,function(r){switch(r.label){case 0:return[4,this.set(t,null)];case 1:return r.sent(),[2]}})})},e.prototype.reset=function(){return O(this,void 0,void 0,function(){return R(this,function(t){return[2]})})},e.isDomainWritable=function(t){return O(this,void 0,void 0,function(){var r,n,i,o,s;return R(this,function(c){switch(c.label){case 0:if(e.cachedTlds[t])return[2,!0];r={domain:"."+t},n="AMP_TLDTEST",i=new e(r),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,i.transaction(n,function(l){if(e.cachedTlds[t])return!0;try{l.set(1);var u=!!l.get();return u&&(e.cachedTlds[t]=!0),u}finally{l.set(null)}})];case 2:return o=c.sent(),[2,!!o];case 3:return s=c.sent(),[2,!1];case 4:return[2]}})})},e.prototype.transaction=function(t,r){return O(this,void 0,void 0,function(){var n,i,o,s=this;return R(this,function(c){switch(c.label){case 0:if(n=XT(),i=function(){var l={get:function(){return s.getSync(t)},set:function(u){return s.setSync(t,u)}};return r(l)},!n)return[2,i()];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,n.request("com.amplitude:cookie-lock:".concat(t),i)];case 2:return[2,c.sent()];case 3:return o=c.sent(),[2,i()];case 4:return[2]}})})},e.cachedTlds={},e})(),YT=function(e){try{return decodeURIComponent(atob(e))}catch{return}},JT=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch{return}},so=function(e){var t;return(t=YT(e))!==null&&t!==void 0?t:JT(e)},ao=function(e,t){if(e===""&&t==="")return!0;if(!e||!t)return!1;var r=e.startsWith(".")?e.substring(1):e,n=t.startsWith(".")?t.substring(1):t;return r.toLowerCase()===n.toLowerCase()}});var lo,iv=Y(()=>{ft();lo=function(e,t,r){return t===void 0&&(t=""),r===void 0&&(r=10),[Kt,t,e.substring(0,r)].filter(Boolean).join("_")}});var Jt,ov=Y(()=>{z();Jt=(function(){function e(t){this.storage=t}return e.prototype.isEnabled=function(){return O(this,void 0,void 0,function(){var t,r,n,i,o;return R(this,function(s){switch(s.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),r=new e(this.storage),n="AMP_TEST",s.label=1;case 1:return s.trys.push([1,4,5,7]),[4,r.set(n,t)];case 2:return s.sent(),[4,r.get(n)];case 3:return i=s.sent(),[2,i===t];case 4:return o=s.sent(),[2,!1];case 5:return[4,r.remove(n)];case 6:return s.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(t){return O(this,void 0,void 0,function(){var r,n;return R(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.getRaw(t)];case 1:return r=i.sent(),r?[2,JSON.parse(r)]:[2,void 0];case 2:return n=i.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}})})},e.prototype.getRaw=function(t){var r;return O(this,void 0,void 0,function(){return R(this,function(n){return[2,((r=this.storage)===null||r===void 0?void 0:r.getItem(t))||void 0]})})},e.prototype.set=function(t,r){var n;return O(this,void 0,void 0,function(){return R(this,function(i){try{(n=this.storage)===null||n===void 0||n.setItem(t,JSON.stringify(r))}catch{}return[2]})})},e.prototype.remove=function(t){var r;return O(this,void 0,void 0,function(){return R(this,function(n){try{(r=this.storage)===null||r===void 0||r.removeItem(t)}catch{}return[2]})})},e.prototype.reset=function(){var t;return O(this,void 0,void 0,function(){return R(this,function(r){try{(t=this.storage)===null||t===void 0||t.clear()}catch{}return[2]})})},e})()});var QT,ZT,Te,sv,Ol,av=Y(()=>{z();ht();QT=10,ZT=1,Te={TAGS:"tags",COUNTERS:"counters",HISTOGRAMS:"histograms",EVENTS:"events",INTERNAL:"internal"},sv={LAST_FLUSH_TIMESTAMP:"last_flush_timestamp"},Ol=(function(){function e(t,r){this.dbPromise=null,this.logger=r,this.dbName="AMP_diagnostics_".concat(t.substring(0,10))}return e.isSupported=function(){var t;return((t=j())===null||t===void 0?void 0:t.indexedDB)!==void 0},e.prototype.getDB=function(){return O(this,void 0,void 0,function(){return R(this,function(t){return this.dbPromise||(this.dbPromise=this.openDB()),[2,this.dbPromise]})})},e.prototype.openDB=function(){var t=this;return new Promise(function(r,n){var i=indexedDB.open(t.dbName,ZT);i.onerror=function(){t.dbPromise=null,n(new Error("Failed to open IndexedDB"))},i.onsuccess=function(){var o=i.result;
4o.onclose=function(){t.dbPromise=null,t.logger.debug("DiagnosticsStorage: DB connection closed.")},o.onerror=function(s){t.logger.debug("DiagnosticsStorage: A global database error occurred.",s),o.close()},r(o)},i.onupgradeneeded=function(){var o=i.result;if(!o){t.logger.debug("DiagnosticsStorage: Missing DB during upgrade.");return}t.createTables(o)}})},e.prototype.createTables=function(t){if(t.objectStoreNames.contains(Te.TAGS)||t.createObjectStore(Te.TAGS,{keyPath:"key"}),t.objectStoreNames.contains(Te.COUNTERS)||t.createObjectStore(Te.COUNTERS,{keyPath:"key"}),t.objectStoreNames.contains(Te.HISTOGRAMS)||t.createObjectStore(Te.HISTOGRAMS,{keyPath:"key"}),!t.objectStoreNames.contains(Te.EVENTS)){var r=t.createObjectStore(Te.EVENTS,{keyPath:"id",autoIncrement:!0});r.createIndex("time_idx","time",{unique:!1})}t.objectStoreNames.contains(Te.INTERNAL)||t.createObjectStore(Te.INTERNAL,{keyPath:"key"})},e.prototype.setTags=function(t){return O(this,void 0,void 0,function(){var r,n,i,o,s=this;return R(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),Object.entries(t).length===0?[2]:[4,this.getDB()];case 1:return r=c.sent(),n=r.transaction([Te.TAGS],"readwrite"),i=n.objectStore(Te.TAGS),[2,new Promise(function(l){var u=Object.entries(t);n.oncomplete=function(){l()},n.onabort=function(a){s.logger.debug("DiagnosticsStorage: Failed to set tags",a),l()},u.forEach(function(a){var h=B(a,2),f=h[0],d=h[1],p=i.put({key:f,value:d});p.onerror=function(v){s.logger.debug("DiagnosticsStorage: Failed to set tag",f,d,v)}})})];case 2:return o=c.sent(),this.logger.debug("DiagnosticsStorage: Failed to set tags",o),[3,3];case 3:return[2]}})})},e.prototype.incrementCounters=function(t){return O(this,void 0,void 0,function(){var r,n,i,o,s=this;return R(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),Object.entries(t).length===0?[2]:[4,this.getDB()];case 1:return r=c.sent(),n=r.transaction([Te.COUNTERS],"readwrite"),i=n.objectStore(Te.COUNTERS),[2,new Promise(function(l){var u=Object.entries(t);n.oncomplete=function(){l()},n.onabort=function(a){s.logger.debug("DiagnosticsStorage: Failed to increment counters",a),l()},u.forEach(function(a){var h=B(a,2),f=h[0],d=h[1],p=i.get(f);p.onsuccess=function(){var v=p.result,g=v?v.value:0,y=i.put({key:f,value:g+d});y.onerror=function(m){s.logger.debug("DiagnosticsStorage: Failed to update counter",f,m)}},p.onerror=function(v){s.logger.debug("DiagnosticsStorage: Failed to read existing counter",f,v)}})})];case 2:return o=c.sent(),this.logger.debug("DiagnosticsStorage: Failed to increment counters",o),[3,3];case 3:return[2]}})})},e.prototype.setHistogramStats=function(t){return O(this,void 0,void 0,function(){var r,n,i,o,s=this;return R(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),Object.entries(t).length===0?[2]:[4,this.getDB()];case 1:return r=c.sent(),n=r.transaction([Te.HISTOGRAMS],"readwrite"),i=n.objectStore(Te.HISTOGRAMS),[2,new Promise(function(l){var u=Object.entries(t);n.oncomplete=function(){l()},n.onabort=function(a){s.logger.debug("DiagnosticsStorage: Failed to set histogram stats",a),l()},u.forEach(function(a){var h=B(a,2),f=h[0],d=h[1],p=i.get(f);p.onsuccess=function(){var v=p.result,g;v?g={key:f,count:v.count+d.count,min:Math.min(v.min,d.min),max:Math.max(v.max,d.max),sum:v.sum+d.sum}:g={key:f,count:d.count,min:d.min,max:d.max,sum:d.sum};var y=i.put(g);y.onerror=function(m){s.logger.debug("DiagnosticsStorage: Failed to set histogram stats",f,m)}},p.onerror=function(v){s.logger.debug("DiagnosticsStorage: Failed to read existing histogram stats",f,v)}})})];case 2:return o=c.sent(),this.logger.debug("DiagnosticsStorage: Failed to set histogram stats",o),[3,3];case 3:return[2]}})})},e.prototype.addEventRecords=function(t){return O(this,void 0,void 0,function(){var r,n,i,o,s=this;return R(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),t.length===0?[2]:[4,this.getDB()];case 1:return r=c.sent(),n=r.transaction([Te.EVENTS],"readwrite"),i=n.objectStore(Te.EVENTS),[2,new Promise(function(l){n.oncomplete=function(){l()},n.onabort=function(a){s.logger.debug("DiagnosticsStorage: Failed to add event records",a),l()};var u=i.count();u.onsuccess=function(){var a=u.result,h=Math.max(0,QT-a);h<t.length&&s.logger.debug("DiagnosticsStorage: Only added ".concat(h," of ").concat(t.length," events due to storage limit")),t.slice(0,h).forEac
4h(function(f){var d=i.add(f);d.onerror=function(p){s.logger.debug("DiagnosticsStorage: Failed to add event record",p)}})},u.onerror=function(a){s.logger.debug("DiagnosticsStorage: Failed to count existing events",a)}})];case 2:return o=c.sent(),this.logger.debug("DiagnosticsStorage: Failed to add event records",o),[3,3];case 3:return[2]}})})},e.prototype.setInternal=function(t,r){return O(this,void 0,void 0,function(){var n,i,o,s;return R(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,this.getDB()];case 1:return n=c.sent(),i=n.transaction([Te.INTERNAL],"readwrite"),o=i.objectStore(Te.INTERNAL),[2,new Promise(function(l,u){i.onabort=function(){return u(new Error("Failed to set internal value"))};var a=o.put({key:t,value:r});a.onsuccess=function(){return l()},a.onerror=function(){return u(new Error("Failed to set internal value"))}})];case 2:return s=c.sent(),this.logger.debug("DiagnosticsStorage: Failed to set internal value",s),[3,3];case 3:return[2]}})})},e.prototype.getInternal=function(t){return O(this,void 0,void 0,function(){var r,n,i,o;return R(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,this.getDB()];case 1:return r=s.sent(),n=r.transaction([Te.INTERNAL],"readonly"),i=n.objectStore(Te.INTERNAL),[2,new Promise(function(c,l){n.onabort=function(){return l(new Error("Failed to get internal value"))};var u=i.get(t);u.onsuccess=function(){return c(u.result)},u.onerror=function(){return l(new Error("Failed to get internal value"))}})];case 2:return o=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to get internal value",o),[2,void 0];case 3:return[2]}})})},e.prototype.getLastFlushTimestamp=function(){return O(this,void 0,void 0,function(){var t,r;return R(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getInternal(sv.LA
4ST_FLUSH_TIMESTAMP)];case 1:return t=n.sent(),[2,t?parseInt(t.value,10):void 0];case 2:return r=n.sent(),this.logger.debug("DiagnosticsStorage: Failed to get last flush timestamp",r),[2,void 0];case 3:return[2]}})})},e.prototype.setLastFlushTimestamp=function(t){return O(this,void 0,void 0,function(){var r;return R(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.setInternal(sv.LAST_FLUSH_TIMESTAMP,t.toString())];case 1:return n.sent(),[3,3];case 2:return r=n.sent(),this.logger.debug("DiagnosticsStorage: Failed to set last flush timestamp",r),[3,3];case 3:return[2]}})})},e.prototype.clearTable=function(t,r){return new Promise(function(n,i){var o=t.objectStore(r),s=o.clear();s.onsuccess=function(){return n()},s.onerror=function(){return i(new Error("Failed to clear table ".concat(r)))}})},e.prototype.getAllAndClear=function(){return O(this,void 0,void 0,function(){var t,r,n,i,o,s,c,l;return R(this,function(u){switch(u.label){case 0:return u.trys.push([0,4,,5]),[4,this.getDB()];case 1:return t=u.sent(),r=t.transaction([Te.TAGS,Te.COUNTERS,Te.HISTOGRAMS,Te.EVENTS],"readwrite"),[4,Promise.all([this.getAllFromStore(r,Te.TAGS),this.getAllFromStore(r,Te.COUNTERS),this.getAllFromStore(r,Te.HISTOGRAMS),this.getAllFromStore(r,Te.EVENTS)])];case 2:return n=B.apply(void 0,[u.sent(),4]),i=n[0],o=n[1],s=n[2],c=n[3],[4,Promise.all([this.clearTable(r,Te.COUNTERS),this.clearTable(r,Te.HISTOGRAMS),this.clearTable(r,Te.EVENTS)])];case 3:return u.sent(),[2,{tags:i,counters:o,histogramStats:s,events:c}];case 4:return l=u.sent(),this.logger.debug("DiagnosticsStorage: Failed to get all and clear data",l),[2,{tags:[],counters:[],histogramStats:[],events:[]}];case 5:return[2]}})})},e.prototype.getAllFromStore=function(t,r){return new Promise(function(n,i){var o=t.objectStore(r),s=o.getAll();s.onsuccess=function(){return n(s.result)},s.onerror=function(){return i(new Error("Failed to get all from ".concat(r)))}})},e})()});var eC,tC,rC,uv,lv,nC,iC,cv=Y(()=>{z();ht();eC="__AMPLITUDE_SCRIPT_URL__",tC="sdk.error.uncaught",rC=function(){var e=j();if(!e)return[];var t=e[eC];return Array.isArray(t)?t:typeof t=="string"?[t]:[]},uv=function(e){var t=j();if(!(!t||typeof t.addEventListener!="function")){var r=function(o){var s=o.error instanceof Error?o.error:void 0,c=s?.stack,l=lv({filename:o.filename,stack:c});l&&i({type:"error",message:o.message,stack:c,filename:o.filename,errorName:s?.name,metadata:{colno:o.colno,lineno:o.lineno,isTrusted:o.isTrusted,matchReason:l}})},n=function(o){var s,c=o.reason instanceof Error?o.reason:void 0,l=c?.stack,u=nC(l),a=lv({filename:u,stack:l});a&&i({type:"unhandledrejection",message:(s=c?.message)!==null&&s!==void 0?s:iC(o.reason),stack:l,filename:u,errorName:c?.name,metadata:{isTrusted:o.isTrusted,matchReason:a}})},i=function(o){e.recordEvent(tC,P({type:o.type,message:o.message,filename:o.filename,error_name:o.errorName,stack:o.stack},o.metadata))};t.addEventListener("error",r,!0),t.addEventListener("unhandledrejection",n,!0)}},lv=function(e){var t,r,n=rC();if(n.length!==0)try{for(var i=U(n),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(c){t={error:c}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}},nC=function(e){if(e){var t=e.match(/(https?:\/\/\S+?)(?=[)\s]|$)/);return t?t[1]:void 0}},iC=function(e){if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return"[object Object]"}}});var oC,uo,sC,aC,Pl,lC,kl,fv=Y(()=>{z();av();ht();Rl();cv();oC=1e3,uo=300*1e3,sC="https://diagnostics.prod.us-west-2.amplitude.com/v1/capture",aC="https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture",Pl=1e4,lC=10,kl=(function(){function e(t,r,n,i){n===void 0&&(n="US"),this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},this.inMemoryEvents=[],this.saveTimer=null,this.flushTimer=null,this.apiKey=t,this.logger=r,this.serverUrl=n==="US"?sC:aC,this.logger.debug("DiagnosticsClient: Initializing with options",JSON.stringify(i,null,2)),this.config=P({enabled:!0,sampleRate:0},i),this.startTimestamp=Date.now(),this.shouldTrack=Al(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,Ol.isSupported()?this.storage=new Ol(t,r):this.logger.debug("DiagnosticsClient: IndexedDB is not supported"),this.initializeFlushInterval(),this.shouldTrack&&(this.increment("sdk.diagnostics.sampled.in.and.enabled"),uv(this))}return e.prototype.isStorageAndTrackEnabled=function(){return!!this.storage&&!!this.shouldTrack},e.prototype.setTag=function(t,r){if(this.isStorageAndTrackEnabled()){if
4(Object.keys(this.inMemoryTags).length>=Pl){this.logger.debug("DiagnosticsClient: Early return setTags as reaching memory limit");return}this.inMemoryTags[t]=r,this.startTimersIfNeeded()}},e.prototype.increment=function(t,r){if(r===void 0&&(r=1),!!this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryCounters).length>=Pl){this.logger.debug("DiagnosticsClient: Early return increment as reaching memory limit");return}this.inMemoryCounters[t]=(this.inMemoryCounters[t]||0)+r,this.startTimersIfNeeded()}},e.prototype.recordHistogram=function(t,r){if(this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryHistograms).length>=Pl){this.logger.debug("DiagnosticsClient: Early return recordHistogram as reaching memory limit");return}var n=this.inMemoryHistograms[t];n?(n.count+=1,n.min=Math.min(n.min,r),n.max=Math.max(n.max,r),n.sum+=r):this.inMemoryHistograms[t]={count:1,min:r,max:r,sum:r},this.startTimersIfNeeded()}},e.prototype.recordEvent=function(t,r){if(this.isStorageAndTrackEnabled()){if(this.inMemoryEvents.length>=lC){this.logger.debug("DiagnosticsClient: Early return recordEvent as reaching memory limit");return}this.inMemoryEvents.push({event_name:t,time:Date.now(),event_properties:r}),this.startTimersIfNeeded()}},e.prototype.startTimersIfNeeded=function(){var t=this;this.saveTimer||(this.saveTimer=setTimeout(function(){t.saveAllDataToStorage().catch(function(r){t.logger.debug("DiagnosticsClient: Failed to save all data to storage",r)}).finally(function(){t.saveTimer=null})},oC)),this.flushTimer||(this.flushTimer=setTimeout(function(){t._flush().catch(function(r){t.logger.debug("DiagnosticsClient: Failed to flush",r)}).finally(function(){t.flushTimer=null})},uo))},e.prototype.saveAllDataToStorage=function(){return O(this,void 0,void 0,function(){var t,r,n,i;return R(this,function(o){switch(o.label){case 0:return this.storage?(t=P({},this.inMemoryTags),r=P({},this.inMemoryCounters),n=P({},this.inMemoryHistograms),i=H([],B(this.inMemoryEvents),!1),this.inMemoryEvents=[],this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},[4,Promise.all([this.storage.setTags(t),this.storage.incrementCounters(r),this.storage.setHistogramStats(n),this.storage.addEventRecords(i)])]):[2];case 1:return o.sent(),[2]}})})},e.prototype._flush=function(){return O(this,void 0,void 0,function(){var t,r,n,i,o,s,c,l,u,a;return R(this,function(h){switch(h.label){case 0:return this.storage?[4,this.saveAllDataToStorage()]:[2];case 1:return h.sent(),this.saveTimer=null,this.flushTimer=null,[4,this.storage.getAllAndClear()];case 2:return t=h.sent(),r=t.tags,n=t.counters,i=t.histogramStats,o=t.events,this.storage.setLastFlushTimestamp(Date.now()),s={},r.forEach(function(f){s[f.key]=f.value}),c={},n.forEach(function(f){c[f.key]=f.value}),l={},i.forEach(function(f){l[f.key]={count:f.count,min:f.min,max:f.max,avg:Math.round(f.sum/f.count*100)/100}}),u=o.map(function(f){return{event_name:f.event_name,time:f.time,event_properties:f.event_properties}}),Object.keys(c).length===0&&Object.keys(l).length===0&&u.length===0?[2]:(a={tags:s,histogram:l,counters:c,events:u},this.fetch(a),[2])}})})},e.prototype.fetch=function(t){return O(this,void 0,void 0,function(){var r,n;return R(this,function(i){switch(i.label){case 0:if(i.trys.push([0,2,,3]),!j())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(t)})];case 1:return r=i.sent(),r.ok?(this.logger.debug("DiagnosticsClient: Successfully sent diagnostics data"),[3,3]):(this.logger.debug("DiagnosticsClient: Failed to send diagnostics data."),[2]);case 2:return n=i.sent(),this.logger.debug("DiagnosticsClient: Failed to send diagnostics data. ",n),[3,3];case 3:return[2]}})})},e.prototype.initializeFlushInterval=function(){return O(this,void 0,void 0,function(){var t,r,n;return R(this,function(i){switch(i.label){case 0:return this.storage?(t=Date.now(),[4,this.storage.getLastFlushTimestamp()]):[2];case 1:return r=i.sent()||-1,r===-1?(this.storage.setLastFlushTimestamp(t),this._setFlushTimer(uo),[2]):(n=t-r,n>=uo?(this._flush(),[2]):(this._setFlushTimer(uo-n),[2]))}})})},e.prototype._setFlushTimer=function(t){var r=this;this.flushTimer=setTimeout(function(){r._flush().catch(function(n){r.logger.debug("DiagnosticsClient: Failed to flush",n)}).finally(function(){r.flushTimer=null})},t)},e.prototype._setSampleRate=function(t){this.logger.debug("DiagnosticsClient: Setting sample rate to",t),this.config.sampleRate=t,this.shouldTrack=Al(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug("DiagnosticsClient: Should track is",this.shouldTrack)},e})()});var Ot,Nl=Y(()=>{Mn();yl();Ot=(function(){function e(){}return e.prototype.send=function(t,r,n){return Promise.resolve(null)},e.prototype.buildResponse=function(t){var r,n,i,o,s,c,l,u,a,h,f,d,p,v,g,y,m,E,w,b,S,_;if(typeof t!="object")return null;var x=t.code||0,I=this.buildStatus(x);switch(I){case Ae.Success:return{status:I,statusCode:x,body:{eventsIngested:(r=t.events_ingested)!==null&&r!==void 0?r:0,payloadSizeBytes:(n=t.payload_size_bytes)!==null&&n!==void 0?n:0,serverUploadTime:(i=t.server_upload_time)!==null&&i!==void 0?i:0}};case Ae.Invalid:return{status:I,statusCode:x,body:{error:(o=t.error)!==null&&o!==void 0?o:"",missingField:(s=t.missing_field)!==null&&s!==void 0?s:"",eventsWithInvalidFields:(c=t.events_with_invali
4d_fields)!==null&&c!==void 0?c:{},eventsWithMissingFields:(l=t.events_with_missing_fields)!==null&&l!==void 0?l:{},eventsWithInvalidIdLengths:(u=t.events_with_invalid_id_lengths)!==null&&u!==void 0?u:{},epsThreshold:(a=t.eps_threshold)!==null&&a!==void 0?a:0,exceededDailyQuotaDevices:(h=t.exceeded_daily_quota_devices)!==null&&h!==void 0?h:{},silencedDevices:(f=t.silenced_devices)!==null&&f!==void 0?f:[],silencedEvents:(d=t.silenced_events)!==null&&d!==void 0?d:[],throttledDevices:(p=t.throttled_devices)!==null&&p!==void 0?p:{},throttledEvents:(v=t.throttled_events)!==null&&v!==void 0?v:[]}};case Ae.PayloadTooLarge:return{status:I,statusCode:x,body:{error:(g=t.error)!==null&&g!==void 0?g:""}};case Ae.RateLimit:return{status:I,statusCode:x,body:{error:(y=t.error)!==null&&y!==void 0?y:"",epsThreshold:(m=t.eps_threshold)!==null&&m!==void 0?m:0,throttledDevices:(E=t.throttled_devices)!==null&&E!==void 0?E:{},throttledUsers:(w=t.throttled_users)!==null&&w!==void 0?w:{},exceededDailyQuotaDevices:(b=t.exceeded_daily_quota_devices)!==null&&b!==void 0?b:{},exceededDailyQuotaUsers:(S=t.exceeded_daily_quota_users)!==null&&S!==void 0?S:{},throttledEvents:(_=t.throttled_events)!==null&&_!==void 0?_:[]}};case Ae.Timeout:default:return{status:I,statusCode:x}}},e.prototype.buildStatus=function(t){return Fn(t)?Ae.Success:t===429?Ae.RateLimit:t===413?Ae.PayloadTooLarge:t===408?Ae.Timeout:t>=400&&t<500?Ae.Invalid:t>=500?Ae.Failed:Ae.Unknown},e})()});var Ml,dv=Y(()=>{z();Nl();Ml=(function(e){De(t,e);function t(r){r===void 0&&(r={});var n=e.call(this)||this;return n.customHeaders=r,n}return t.prototype.send=function(r,n){return O(this,void 0,void 0,function(){var i,o,s;return R(this,function(c){switch(c.label){case 0:if(typeof fetch>"u")throw new Error("FetchTransport is not supported");return i={headers:P({"Content-Type":"application/json",Accept:"*/*"},this.customHeaders),body:JSON.stringify(n),method:"POST"},[4,fetch(r,i)];case 1:return o=c.sent(),[4,o.text()];case 2:s=c.sent();try{return[2,this.buildResponse(JSON.parse(s))]}catch{return[2,this.buildResponse({code:o.status})]}return[2]}})})},t})(Ot)});function Hn(){return typeof CompressionStream<"u"}function Kn(e){return O(this,void 0,void 0,function(){var t,r,n;return R(this,function(i){switch(i.label){case 0:if(t=CompressionStream,typeof t>"u")return[2,void 0];i.label=1;case 1:return i.trys.push([1,3,,4]),r=new Blob([e]).stream().pipeThrough(new t("gzip")),[4,new Response(r).arrayBuffer()];case 2:return[2,i.sent()];case 3:return n=i.sent(),[2,void 0];case 4:return[2]}})})}var $n,hv=Y(()=>{z();$n=2*1024});var pv,vv=Y(()=>{pv=(function(){function e(t,r){this.key="AMP_remote_config_".concat(t.substring(0,10)),this.logger=r}return e.prototype.fetchConfig=function(){var t=null,r={remoteConfig:null,lastFetch:new Date};try{t=localStorage.getItem(this.key)}catch(i){return this.logger.debug("Remote config localstorage failed to access: ",i),Promise.resolve(r)}if(t===null)return this.logger.debug("Remote config localstorage gets null because the key does not exist"),Promise.resolve(r);try{var n=JSON.parse(t);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(n))),Promise.resolve({remoteConfig:n.remoteConfig,lastFetch:new Date(n.lastFetch)})}catch(i){return this.logger.debug("Remote config localstorage failed to parse: ",i),localStorage.removeItem(this.key),Promise.resolve(r)}},e.prototype.setConfig=function(t){try{return localStorage.setItem(this.key,JSON.stringify(t)),this.logger.debug("Remote config localstorage set successfully."),Promise.resolve(!0)}catch(r){this.logger.debug("Remote config localstorage failed to set: ",r)}return Promise.resolve(!1)},e})()});function uC(e,t){return new Promise(function(r,n){var i=function(){var o=new Error("Remote config custom fetch aborted by timeout");o.name="AbortError",n(o)};t.addEventListener("abort",i,{once:!0}),e.then(function(o){t.removeEventListener("abort",i),r(o)},function(o){t.removeEventListener("abort",i),n(o)})})}var cC,fC,dC,Ll,hC,pC,Xn,gv=Y(()=>{z();vv();Gr();cC="https://sr-client-cfg.amplitude.com/config",fC="https://sr-client-cfg.eu.amplitude.com/config",dC=3,Ll={INVALID_API_KEY:401,FORB
4IDDEN:403,RATE_LIMIT:429},hC=1e3,pC=300*1e3,Xn=(function(){function e(t,r,n,i,o){n===void 0&&(n="US"),this.callbackInfos=[],this.lastSuccessfulFetch=null,this.fetchPromise=null,this.isLastFetchInvalidApiKey=!1,this.apiKey=t,this.serverUrl=i||(n==="US"?cC:fC),this.logger=r,this.storage=new pv(t,r),this.customFetch=o}return e.prototype.subscribe=function(t,r,n){var i=Xe(),o={id:i,key:t,deliveryMode:r,callback:n};return this.callbackInfos.push(o),r==="all"?this.subscribeAll(o):this.subscribeWaitForRemote(o,r.timeout),i},e.prototype.unsubscribe=function(t){var r=this.callbackInfos.findIndex(function(n){return n.id===t});return r===-1?(this.logger.debug("Remote config client unsubscribe failed because callback with id ".concat(t," doesn't exist.")),!1):(this.callbackInfos.splice(r,1),this.logger.debug("Remote config client unsubscribe succeeded removing callback with id ".concat(t,".")),!0)},e.prototype.updateConfigs=function(){return O(this,void 0,void 0,function(){var t,r,n=this;return R(this,function(i){switch(i.label){case 0:return this.lastSuccessfulFetch&&(t=Date.now()-this.lastSuccessfulFetch,t<pC)?(this.logger.debug("Remote config client skipping updateConfigs: Too recent"),[2]):[4,this.getOrCreateFetchPromise()];case 1:return r=i.sent(),this.storage.setConfig(r),this.callbackInfos.forEach(function(o){n.sendCallback(o,r,"remote")}),[2]}})})},e.prototype.getOrCreateFetchPromise=function(){var t=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(){t.fetchPromise=null}),this.fetchPromise):(this.fetchPromise=this.fetch().then(function(r){return r.remoteConfig!==null&&(t.lastSuccessfulFetch=Date.now()),r}).finally(function(){t.fetchPromise=null}),this.fetchPromise)},e.prototype.subscribeAll=function(t){return O(this,void 0,void 0,function(){var r,n,i,o=this;return R(this,function(s){switch(s.label){case 0:return r=this.getOrCreateFetchPromise().then(function(c){o.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(c))),o.sendCallback(t,c,"remote"),o.storage.setConfig(c)}),n=this.storage.fetchConfig().then(function(c){return c}),[4,Promise.race([r,n])];case 1:return i=s.sent(),i!==void 0&&(this.logger.debug("Remote config client subscription all mode fetched from cache: ".concat(JSON.stringify(i))),i.remoteConfig!==null?this.sendCallback(t,i,"cache"):this.logger.debug("Remote config client skips sending c
4allback because cache is empty (first time user).")),[4,r];case 2:return s.sent(),[2]}})})},e.prototype.subscribeWaitForRemote=function(t,r){return O(this,void 0,void 0,function(){var n,o,i,o;return R(this,function(s){switch(s.label){case 0:n=new Promise(function(c,l){setTimeout(function(){l("Timeout exceeded")},r)}),s.label=1;case 1:return s.trys.push([1,3,,5]),[4,Promise.race([this.getOrCreateFetchPromise(),n])];case 2:return o=s.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(t,o,"remote"),this.storage.setConfig(o),[3,5];case 3:return i=s.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 o=s.sent(),o.remoteConfig!==null?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(t,o,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(t,o,"remote")),[3,5];case 5:return[2]}})})},e.prototype.sendCallback=function(t,r,n){t.lastCallback=new Date;var i;t.key?i=t.key.split(".").reduce(function(o,s){return o===null?o:s in o?o[s]:null},r.remoteConfig):i=r.remoteConfig,t.callback(i,n,r.lastFetch)},e.prototype.fetch=function(t,r){return t===void 0&&(t=dC),r===void 0&&(r=hC),O(this,void 0,void 0,function(){var n,i,o,s,c,l,u=this;return R(this,function(a){switch(a.label){case 0:n=r/t,i={remoteConfig:null,lastFetch:new Date},o=function(h){var f,d,p,v,g,y,m,E,w,b,S;return R(this,function(_){switch(_.label){case 0:f=!0,d=new AbortController,p=setTimeout(function(){return d.abort()},r),_.label=1;case 1:return _.trys.push([1,10,11,12]),v=s.getUrlParams(),g={Accept:"*/*"},s.customFetch?[4,uC(s.customFetch({url:v,method:"GET",headers:g,signal:d.signal}),d.signal)]:[3,3];case 2:return m=_.sent(),[3,5];case 3:return[4,fetch(v,{method:"GET",headers:g,signal:d.signal})];case 4:m=_.sent(),_.label=5;case 5:return y=m,E=y.ok||y.status>=200&&y.status<300,E?[3,7]:[4,y.text()];case 6:return w=_.sent(),s.logger.debug("Remote config client fetch with retry time ".concat(t," failed with ").concat(y.status,": ").concat(w)),y.status===Ll.INVA
4LID_API_KEY||y.status===Ll.FORBIDDEN?(s.logger.error("Remote config client fetch failed with ".concat(y.status,". Invalid API key; future fetches will be skipped.")),s.isLastFetchInvalidApiKey=!0,f=!1):y.status>=400&&y.status<500&&y.status!==Ll.RATE_LIMIT&&(f=!1),[3,9];case 7:return[4,y.json()];case 8:return b=_.sent(),[2,{value:{remoteConfig:b,lastFetch:new Date}}];case 9:return[3,12];case 10:return S=_.sent(),S instanceof Error&&S.name==="AbortError"?s.logger.debug("Remote config client fetch with retry time ".concat(t," timed out after ").concat(r,"ms")):s.logger.debug("Remote config client fetch with retry time ".concat(t," is rejected because: "),S),[3,12];case 11:return clearTimeout(p),[7];case 12:return f?h<t-1?[4,new Promise(function(x){return setTimeout(x,u.getJitterDelay(n))})]:[3,14]:[2,"break"];case 13:_.sent(),_.label=14;case 14:return[2]}})},s=this,c=0,a.label=1;case 1:return c<t?[5,o(c)]:[3,4];case 2:if(l=a.sent(),typeof l=="object")return[2,l.value];if(l==="break")return[3,4];a.label=3;case 3:return c++,[3,1];case 4:return[2,i]}})})},e.prototype.getJitterDelay=function(t){return Math.floor(Math.random()*t)},e.prototype.getUrlParams=function(){var t=encodeURIComponent(this.apiKey),r=new URLSearchParams;return r.append("config_group",e.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(t,"?").concat(r.toString())},e.CONFIG_GROUP="browser",e})()});function vC(e){if(!zr||typeof zr[e]!="function")return!1;if(Yn[e])return!0;var t=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{if(br[e]&&!Ul){Ul=!0;var i=br[e];i&&i.forEach(function(o){try{o(e,r)}catch{}})}}catch{}return Ul=!1,Yn[e].apply(zr,r)};return Yn[e]=zr[e],zr[e]=t,!0}function gC(e,t){var r=vC(e);if(!r)return new Error("Console override failed");br[e]?br[e].push(t):br[e]=[t]}function mC(e){var t,r;try{for(var n=U(Object.values(br)),i=n.next();!i.done;i=n.next())for(var o=i.value,s=o.length-1;s>=0;s--)if(o[s]===e){o.splice(s,1);break}}catch(c){t={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}}function yC(){var e,t;try{for(var r=U(Object.entries(Yn)),n=r.next();!n.done;n=r.next()){var i=B(n.value,2),o=i[0],s=i[1];s&&(zr[o]=s)}}catch(c){e={error:c}}finally{try{n&&!n.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}Yn={},br={}}var Dl,zr,br,Yn,Ul,co,mv=Y(()=>{z();ht();Dl=j(),zr=Dl?.console,br={},Yn={},Ul=!1;co={addListener:gC,removeListener:mC,_restoreConsole:yC}});var $r,yv=Y(()=>{(function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"})($r||($r={}))});var fo,bv=Y(()=>{fo=null});var ho,Hr,po,Jn,Sv=Y(()=>{ho=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],Hr="data-amp-track-",po=["div","span","h1","h2","h3","h4","h5","h6"],Jn=150});var bC,Ev,Fl,Bl,ql,Gl,Wl,jl,wv=Y(()=>{z();bC=["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]'],Ev=H(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],B(bC),!1),Fl=Ev,Bl=Ev,ql=["*"],Gl=1e3,Wl=4,jl=50});function SC(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||e===null||e===void 0}function Kr(e,t,r){if(e){var n=t.map(_v),i=r.map(_v);Tv({json:e,allowlist:n,excludelist:i,ancestors:[]})}}function Tv(e){var t,r,n=e.json,i=e.targetObject,o=e.allowlist,s=e.excludelist,c=e.ancestors,l=e.parentObject,u=e.targetKey;i||(i=n);var a=Object.keys(i);try{for(var h=U(a),f=h.next();!f.done;f=h.next()){var d=f.value,p=H(H([],B(c),!1),[d],!1);SC(i[d])?(!xv(p,o)||xv(p,s))&&delete i[d]:Tv({json:n,targetObject:i[d],allowlist:o,excludelist:s,ancestors:p,parentObject:i,targetKey:d})}}catch(v){t={error:v}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(t)throw t.error}}Object.keys(i).length===0&&l&&u&&delete l[u]}function _v(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(t){return t.replace(/~0/g,"~").replace(/~1/g,"/")})}function Vl(e,t,r,n){if(r===void 0&&(r=0),n===void 0&&(n=0),n===t.length)return r===e.length;if(r===e.length){for(;n<t.length&&t[n]==="**";)n++;return n===t.length}var i=t[n];if(i==="**"){if(n+1===t.length)return!0;for(var o=r;o<=e.length;o++)if(Vl(e,t,o,n+1))return!0;return!1}else return i==="*"||i===e[r]?Vl(e,t,r+1,n+1):!1}function xv(e,t){return t.some(function(r){return Vl(e,r)})}var zl=Y(()=>{z()});function Ov(e,t){var r,n,i,o=j(),s=o?.TextEncoder;if(s&&e!=null){var c;if(typeof e=="string")c=e,i=new s().encode(c).length;else if(typeof Blob<"u"&&e instanceof Blob)c=e,i=c.size;else if(typeof URLSearchParams<"u"&&e instanceof URLSearchParams)c=e,i=new s().encode(c.toString()).length;else if(ArrayBuffer.isView(e))c=e,i=c.byteLength;else if(e instanceof ArrayBuffer)c=e,i=c.byteLength;else if(typeof FormData<"u"&&e instanceof FormData){var l=e,u=0,a=0;try{for(var h=U(l.entries()),f=h.next();!f.done;f=h.next()){var d=B(f.value,2),p=d[0],v=d[1];if(u+=p.length,typeof v=="string")u+=new s().encode(v).length;else if(typeof Blob<"u"&&v instanceof Blob)u+=v.size;else return;if(++a>=t)return}}catch(g){r={error:g}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}i=u}else if(typeof ReadableStream<"u"&&e instanceof ReadableStream){c=e;return}return i}}function $l(e,t,r){if(!e)return null;try{var n=JSON.parse(e);return Kr(n,t,r),n}catch{return null}}var EC,Iv,Av,Rv,Pv,kv,Qn,Cv,vo,Nv,Mv=Y(()=>{z();ht();zl();ft();EC=500,Iv=100,Av=(function(){function e(t){this.request=t}return e.prototype.headers=function(t){var r,n;t===void 0&&(t=[]);var i=this.request.headers,o={};if(Array.isArray(i))i.forEach(function(h){var f=B(h,2),d=f[0],p=f[1];o[d]=p});else if(i instanceof Headers)i.forEach(function(h,f){o[f]=h});else if(typeof i=="object"&&i!==null)try{for(var s=U(Object.entries(i)),c=s.next();!c.done;c=s.next()){var l=B(c.value,2),u=l[0],a=l[1];o[u]=a}}catch(h){r={error:h}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return vo(o,{allow:t})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if(typeof this._bodySize=="number")return this._bodySize;var t=j();if(t?.TextEncoder){var r=this.request.body;return this._bodySize=Ov(r,Iv),this._bodySize}}
4,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 typeof this.request.body=="string"?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(t,r){return t===void 0&&(t=[]),r===void 0&&(r=[]),O(this,void 0,void 0,function(){var n;return R(this,function(i){return t.length===0?[2,null]:(n=this.body,[2,$l(n,t,r)])})})},e})(),Rv=(function(){function e(t,r){this.bodyRaw=t,this.requestHeaders=r}return e.prototype.headers=function(t){return t===void 0&&(t=[]),vo(this.requestHeaders,{allow:t})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return Ov(this.bodyRaw,Iv)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return typeof this.bodyRaw=="string"?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(t,r){return t===void 0&&(t=[]),r===void 0&&(r=[]),O(this,void 0,void 0,function(){var n;return R(this,function(i){return t.length===0?[2,null]:(n=this.body,[2,$l(n,t,r)])})})},e})();Pv=(function(){function e(t){this.response=t}return e.prototype.headers=function(t){var r;if(t===void 0&&(t=[]),this.response.headers instanceof Headers){var n=this.response.headers,i={};return(r=n?.forEach)===null||r===void 0||r.call(n,function(o,s){i[s]=o}),vo(i,{allow:t})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){var t,r;if(this._bodySize!==void 0)return this._bodySize;var n=(r=(t=this.response.headers)===null||t===void 0?void 0:t.get)===null||r===void 0?void 0:r.call(t,"content-length"),i=n?parseInt(n,10):void 0;return this._bodySize=i,i},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return O(this,void 0,void 0,function(){var t,r,n,i;return R(this,function(o){switch(o.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),o.label=1;case 1:return o.trys.push([1,3,,4]),t=this.clonedResponse.text(),r=new Promise(function(s){return setTimeout(function(){return s(null)},EC)}),[4,Promise.race([t,r])];case 2:return n=o.sent(),[2,n];case 3:return i=o.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(t,r){return t===void 0&&(t=[]),r===void 0&&(r=[]),O(this,void 0,void 0,function(){var n;return R(this,function(i){switch(i.label){case 0:return t.length===0?[2,null]:[4,this.text()];case 1:return n=i.sent(),[2,$l(n,t,r)]}})})},e})(),kv=(function(){function e(t,r,n,i){this.statusCode=t,this.headersString=r,this.size=n,this.getJson=i}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(t){var r,n;if(t===void 0&&(t=[]),!this.headersString)return{};var i={},o=this.headersString.split(`\r 5`);try{for(var s=U(o),c=s.next();!c.done;c=s.next()){var l=c.value,u=B(l.split(": "),2),a=u[0],h=u[1];a&&h&&(i[a]=h)}}catch(f){r={error:f}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return vo(i,{allow:t})},e.prototype.json=function(t,r){return t===void 0&&(t=[]),r===void 0&&(r=[]),O(this,void 0,void 0,function(){var n;return R(this,function(i){return t.length===0?[2,null]:(n=this.getJson(),n?(Kr(n,t,r),[2,n]):[2,null])})})},e})();(function(e){e.REDACT="redact",e.REMOVE="remove"})(Qn||(Qn={}));Cv="[REDACTED]",vo=function(e,t){var r,n,i=t.allow,o=i===void 0?[]:i,s=t.strategy,c=s===void 0?Qn.REMOVE:s,l=H([],B(sl),!1),u={},a=function(p){var v=p.toLowerCase();l.find(function(g){return g.toLowerCase()===v})?c===Qn.REDACT&&(u[p]=Cv):o.find(function(g){return g.toLowerCase()===v})?u[p]=e[p]:c===Qn.REDACT&&(u[p]=Cv)};try{for(var h=U(Object.keys(e)),f=h.next();!f.done;f=h.next()){var d=f.value;a(d)}}catch(p){r={error:p}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}return u},Nv=(function(){function e(t,r,n,i,o,s,c,l,u,a,h){c===void 0&&(c=0),this.type=t,this.method=r,this.timestamp=n,this.startTime=i,this.url=o,this.requestWrapper=s,this.status=c,this.duration=l,this.responseWrapper=u,this.error=a,this.endTime=h}return e.prototype.toSerializable=function(){var t,r,n,i,o={type:this.t
5ype,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:(t=this.requestWrapper)===null||t===void 0?void 0:t.headers(H([],B(Yt),!1)),requestBodySize:(r=this.requestWrapper)===null||r===void 0?void 0:r.bodySize,responseHeaders:(n=this.responseWrapper)===null||n===void 0?void 0:n.headers(H([],B(Yt),!1)),responseBodySize:(i=this.responseWrapper)===null||i===void 0?void 0:i.bodySize};return Object.fromEntries(Object.entries(o).filter(function(s){var c=B(s,2),l=c[0],u=c[1];return u!==void 0}))},e})()});function wC(e){return typeof e=="object"&&e!==null&&"url"in e&&"method"in e}function Sr(e){try{e()}catch{}}var Hl,_C,go,Lv=Y(()=>{z();ht();Gr();Mv();Hl=(function(){function e(t,r){r===void 0&&(r=Xe()),this.callback=t,this.id=r}return e})();_C=(function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var r=j();e.isSupported()&&(this.globalScope=r)}return e.isSupported=function(){var t=j();return!!t&&!!t.fetch},e.prototype.subscribe=function(t,r){var n,i,o,s,c,l,u,a,h,f;if(this.logger||(this.logger=r),this.eventCallbacks.set(t.id,t),!this.isObserving){var d=(o=(i=(n=this.globalScope)===null||n===void 0?void 0:n.XMLHttpRequest)===null||i===void 0?void 0:i.prototype)===null||o===void 0?void 0:o.open,p=(l=(c=(s=this.globalScope)===null||s===void 0?void 0:s.XMLHttpRequest)===null||c===void 0?void 0:c.prototype)===null||l===void 0?void 0:l.send,v=(h=(a=(u=this.globalScope)===null||u===void 0?void 0:u.XMLHttpRequest)===null||a===void 0?void 0:a.prototype)===null||h===void 0?void 0:h.setRequestHeader;d&&p&&v&&this.observeXhr(d,p,v);var g=(f=this.globalScope)===null||f===void 0?void 0:f.fetch;g&&this.observeFetch(g),this.isObserving=!0}},e.prototype.unsubscribe=function(t){this.eventCallbacks.delete(t.id)},e.prototype.triggerEventCallbacks=function(t){var r=this;this.eventCallbacks.forEach(function(n){try{n.callback(t)}catch(i){Sr(function(){var o;(o=r.logger)===null||o===void 0||o.debug("an unexpected error occurred while triggering event callbacks",i)})}})},e.prototype.handleNetworkRequestEvent=function(t,r,n,i,o,s,c){var l;if(!(s===void 0||c===void 0)){var u,a="GET";if(wC(r)?(u=r.url,a=r.method):u=(l=r?.toString)===null||l===void 0?void 0:l.call(r),u)try{var h=new URL(u);u="".concat(h.protocol,"//").concat(h.host).concat(h.pathname).concat(h.search).concat(h.hash)}catch{}a=n?.method||a;var f,d;i&&(f=i.status),o&&(d={name:o.name||"UnknownError",message:o.message||"An unknown error occurred"},f=0);var p=Math.floor(performance.now()-c),v=Math.floor(s+p),g=new Nv(t,a,s,s,u,n,f,p,i,d,v);this.triggerEventCallbacks(g)}},e.prototype.getTimestamps=function(){var t,r;return{startTime:(t=Date.now)===null||t===void 0?void 0:t.call(Date),durationStart:(r=performance?.now)===null||r===void 0?void 0:r.call(performance)}},e.prototype.observeFetch=function(t){var r=this;!this.globalScope||!t||(this.globalScope.fetch=function(n,i){return O(r,void 0,void 0,function(){var o,s,c,l,u=this;return R(this,function(a){switch(a.label){case 0:try{o=this.getTimestamps()}catch(h){Sr(function(){var f;return(f=u.logger)===null||f===void 0?void 0:f.debug("an unexpected error occurred while retrieving timestamps",h)})}a.label=1;case 1:return a.trys.push([1,3,,4]),[4,t(n,i)];case 2:return s=a.sent(),[3,4];case 3:return l=a.sent(),c=l,[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",n,i?new Av(i):void 0,s?new Pv(s):void 0,c,o?.startTime,o?.durationStart)}catch(h){Sr(function(){var f;return(f=u.logger)===null||f===void 0?void 0:f.debug("an unexpected error occurred while handling fetch",h)})}if(s)return[2,s];throw c}})})})},e.createXhrJsonParser=function(t,r){return function(){var n;try{if(t.responseType==="json"){if(!((n=r.globalScope)===null||n===void 0)&&n.structuredClone)return r.globalScope.structuredClone(t.response)}else if(["text",""].includes(t.responseType))return JSON.parse(t.responseText)}catch(i){return i instanceof Error&&i.name==="InvalidStateError"&&Sr(function(){var o;return(o=r.logger)===null||o===void 0?void 0:o.debug("unexpected error when retrieving responseText. responseType='".concat(t.responseType,"'"))}),null}return null}},e.prototype.observeXhr=function(t,r,n){if(!(!this.globalScope||!t||!r)){var i=this.globalScope.XMLHttpRequest.prototype,o=this;i.open=function(){for(var s,c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];var u=this,a=B(c,2),h=a[0],f=a[1];try{u.$$AmplitudeAnalyticsEvent=P({method:h,url:(s=f?.toString)===null||s===void 0?void 0:s.call(f),headers:{}},o.getTimestamps())}catch(d){Sr(function(){var p;return(p=o.logger)===null||p===void 0?void 0:p.debug("an unexpected error occurred while calling xhr open",d)})}return t.apply(u,c)},i.send=function(){for(var s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];var l=this,u=l,a=e.createXhrJsonParser(l,o),h=s[0],f=u.$$AmplitudeAnalyticsEvent;return u.$$AmplitudeAnalyticsEvent&&u.addEventListener("loadend",function(){try{var d=u.getAllResponseHeaders(),p=u.getResponseHeader("content-length"),v=new kv(u.status,d,p?parseInt(p,10):void 0,a),g=u.$$AmplitudeAnalyticsEvent.headers,y=new Rv(h,g);f.status=u.status,o.handleNetworkRequestEvent("xhr",{url:f.url,method:f.method},y,v,void 0,f.startTime,f.durationStart)}catch(m){Sr(function(){var E;return(E=o.logger)===null||E===void 0?void 0:E.debug("an unexpected error occurred while handling xhr send",m)})}}),r.apply(u,s)},i.setRequestHeader=function(s,c){var l=this;try{var u=l.$$AmplitudeAnalyticsEvent;u&&(u.headers[s]=c)}catch(a){Sr(function(){var h;
5return(h=o.logger)===null||h===void 0?void 0:h.debug("an unexpected error occurred while calling xhr setRequestHeader",a)})}n.apply(l,[s,c])}}},e})(),go=new _C});var Kl,Dv=Y(()=>{z();Kl=function(e,t){return e?.map(function(r){var n,i;if(!((n=r.urls)===null||n===void 0)&&n.length&&(!((i=r.hosts)===null||i===void 0)&&i.length)){var o=JSON.stringify(r.hosts),s=JSON.stringify(r.urls);return t?.warn("Found network capture rule with both urls='".concat(s,"' and hosts='").concat(o,"' set. ")+"Definition of urls takes precedence over hosts, so ignoring hosts."),P(P({},r),{hosts:void 0})}return r})}});var Er,Uv=Y(()=>{z();Il();ft();Er=(function(){function e(){}return e.prototype.parse=function(){return O(this,void 0,void 0,function(){return R(this,function(t){return[2,P(P(P(P({},Xt),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var t=or(),r=t[wp],n=t[_p],i=t[xp],o=t[Tp],s=t[Cp],c=t[Ip];return{utm_campaign:r,utm_content:n,utm_id:i,utm_medium:o,utm_source:s,utm_term:c}},e.prototype.getReferrer=function(){var t,r,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=(r=(t=n.referrer)===null||t===void 0?void 0:t.split("/")[2])!==null&&r!==void 0?r:void 0}catch{}return n},e.prototype.getClickIds=function(){var t,r=or();return t={},t[Xa]=r[Xa],t[Ya]=r[Ya],t[Ja]=r[Ja],t[Qa]=r[Qa],t[Za]=r[Za],t[el]=r[el],t[tl]=r[tl],t[rl]=r[rl],t[nl]=r[nl],t[il]=r[il],t[ol]=r[ol],t},e})()});var Qt,Pt,Fv,Bv,qv,wr,_r,Gv=Y(()=>{z();Qt="data-amp-mask",Pt="*****",Fv=/\b(?:\d[ -]*?){13,16}\b/,Bv=/(\d{3}-?\d{2}-?\d{4})/g,qv=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,wr=function(e,t){var r,n;if(t===void 0&&(t=[]),typeof e!="string")return"";var i=e;i=i.replace(Fv,Pt),i=i.replace(Bv,Pt),i=i.replace(qv,Pt);try{for(var o=U(t),s=o.next();!s.done;s=o.next()){var c=s.value;try{i=i.replace(c,Pt)}catch{}}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},_r=function(e){if(typeof document>"u"||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute(Qt)?Pt:e?e(document.title):document.title}});var $v=zi(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.Observable=void 0;var Wv=e=>!!Symbol[e],Zl=e=>Wv(e)?Symbol[e]:"@@"+e,xC=Zl("iterator"),Yl=Zl("observable"),jv=Zl("species");function yo(e,t){let r=e[t];if(r!=null){if(typeof r!="function")throw new TypeError(r+" is not a function");return r}}function Zn(e){let t=e.constructor;return t!==void 0&&(t=t[jv],t===null&&(t=void 0)),t!==void 0?t:Yr}function TC(e){return e instanceof Yr}function Xr(e){Xr.log?Xr.log(e):setTimeout(()=>{throw e})}function mo(e){Promise.resolve().then(()=>{try{e()}catch(t){Xr(t)}})}function Vv(e){let t=e._cleanup;if(t!==void 0&&(e._cleanup=void 0,!!t))try{if(typeof t=="function")t();else{let r=yo(t,"unsubscribe");r&&r.call(t)}}catch(r){Xr(r)}}function Jl(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function CC(e){let t=e._queue;if(t){e._queue=void 0,e._state="ready";for(let r=0;r<t.length&&(zv(e,t[r].type,t[r].value),e._state!=="closed");++r);}}function zv(e,t,r){e._state="running";let n=e._observer;try{let i=yo(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(Jl(e),i)i.call(n,r);else throw r;break;case"complete":Jl(e),i&&i.call(n);break}}catch(i){Xr(i)}e._state==="closed"?Vv(e):e._state==="running"&&(e._state="ready")}function Xl(e,t,r){if(e._state!=="closed"){if(e._state==="buffering"){e._queue.push({type:t,value:r});return}if(e._state!=="ready"){e._state="buffering",e._queue=[{type:t,value:r}],mo(()=>CC(e));return}zv(e,t,r)}}var Ql=class{constructor(t,r){this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";let n=this,i={get closed(){return n._state==="closed"},next(o){Xl(n,"next",o)},error(o){Xl(n,"error",o)},complete(){Xl(n,"complete")}};try{this._cleanup=r.call(void 0,i)}catch(o){i.error(o)}this._state==="initializing"&&(this._state="ready")}get closed(){return this._state==="closed"}unsubscribe(){this._state!=="closed"&&(Jl(this),Vv(this))}},Yr=class e{constructor(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if(typeof t!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=t}subscribe(t){return(typeof t!="object"||t===null)&&(t={next:t,error:arguments[1],complete:arguments[2]}),new Ql(t,this._subscriber)}forEach(t){return new Promise((r,n)=>{if(typeof t!="function"){n(new TypeError(t+" is not a function"));return}function i(){o.unsubscribe(),r()}let o=this.subscribe({next(s){try{t(s,i)}catch(c){n(c),o.unsubscribe()}},error:n,complete:r})})}map(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Zn(this);return new r(n=>this.subscribe({next(i){try{i=t(i)}catch(o){return n.error(o)}n.next(i)},error(i){n.error(i)},complete(){n.complete()}}))}filter(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Zn(this);return new r(n=>this.subscribe({next(i){try{if(!t(i))return}catch(o){return n.error(o)}n.next(i)},error(i){n.error(i)},complete(){n.complete()}}))}reduce(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Zn(this),n=arguments.length>1,i=!1,s=arguments[1];return new r(c=>this.subscribe({next(l){let u=!i;if(i=!0,!u||n)try{s=t(s,l)}catch(a){return c.error(a)}else s=l},error(l){c.error(l)},complete(){if(!i&&!n)return c.error(new TypeError("Cannot reduce an empty sequence"));c.next(s),c.complete()}}))}async all(){let t=[];return await this.forEach(r=>t.push(r)),t}concat(...t){let r=Zn(this);return new r(n=>{let i,o=0;function s(c){i=c.subscribe({next(l){n.next(l)},error(l){n.error(l)},complete(){o===t.length?(i=void 0,n.complete()):s(r.from(t[o++]))}})}return s(this),()=>{i&&(i.unsubscribe(),i=void 0)}})}flatMap(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Zn(this);return new r(n=>{let i=[],o=this.subscribe({next(c){if(t)try{c=t(c)}catch(u){return n.error(u)}let l=r.from(c).subscribe({next(u){n.next(u)},error(u){n.error(u)},complete(){let u=i.indexOf(l);u>=0&&i.splice(u,1),s()}});i.push(l)},error(c){n.error(c)},complete(){s()}});function s(){o.closed&&i.length===0&&n.complete()}return()=>
5{i.forEach(c=>c.unsubscribe()),o.unsubscribe()}})}[Yl](){return this}static from(t){let r=typeof this=="function"?this:e;if(t==null)throw new TypeError(t+" is not an object");let n=yo(t,Yl);if(n){let i=n.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return TC(i)&&i.constructor===r?i:new r(o=>i.subscribe(o))}if(Wv("iterator")&&(n=yo(t,xC),n))return new r(i=>{mo(()=>{if(!i.closed){for(let o of n.call(t))if(i.next(o),i.closed)return;i.complete()}})});if(Array.isArray(t))return new r(i=>{mo(()=>{if(!i.closed){for(let o=0;o<t.length;++o)if(i.next(t[o]),i.closed)return;i.complete()}})});throw new TypeError(t+" is not observable")}static of(...t){let r=typeof this=="function"?this:e;return new r(n=>{mo(()=>{if(!n.closed){for(let i=0;i<t.length;++i)if(n.next(t[i]),n.closed)return;n.complete()}})})}static get[jv](){return this}};bo.Observable=Yr;Object.defineProperty(Yr,Symbol("extensions"),{value:{symbol:Yl,hostReportError:Xr},configurable:!0})});var Kv=zi((WD,Hv)=>{Hv.exports=$v().Observable});function xr(e,t){return new Me.default(function(r){e.subscribe({next:function(n){t(n).then(function(i){return r.next(i)}).catch(function(i){return r.error(i)})},error:function(n){r.error(n)},complete:function(){r.complete()}})})}function Et(e,t){return new Me.default(function(r){var n=!1,i=new Set,o=function(){var c,l;n=!0;try{for(var u=U(i),a=u.next();!a.done;a=u.next()){var h=a.value;try{h.unsubscribe()}catch{}}}catch(f){c={error:f}}finally{try{a&&!a.done&&(l=u.return)&&l.call(u)}finally{if(c)throw c.error}}i.clear()},s=function(c){var l=c.subscribe({next:function(u){n||r.next(u)},error:function(u){n||(n=!0,r.error(u),o())},complete:function(){i.delete(l),!n&&i.size===0&&(r.complete(),o(),n=!0)}});i.add(l)};return s(e),s(t),o})}function pt(e){var t=new Set,r=null;function n(){r?.unsubscribe(),r=null,t.clear()}return new Me.default(function(i){return t.add(i),r===null&&(r=e.subscribe({next:function(o){var s,c,l;try{for(var u=U(t),a=u.next();!a.done;a=u.next()){var h=a.value;(l=h.next)===null||l===void 0||l.call(h,o)}}catch(f){s={error:f}}finally{try{a&&!a.done&&(c=u.return)&&c.call(u)}finally{if(s)throw s.error}}},error:function(o){var s,c,l;try{for(var u=U(t),a=u.next();!a.done;a=u.next()){var h=a.value;(l=h.error)===null||l===void 0||l.call(h,o)}}catch(f){s={error:f}}finally{try{a&&!a.done&&(c=u.return)&&c.call(u)}finally{if(s)throw s.error}}n()},complete:function(){var o,s,c;try{for(var l=U(t),u=l.next();!u.done;u=l.next()){var a=u.value;(c=a.complete)===null||c===void 0||c.call(a)}}catch(h){o={error:h}}finally{try{u&&!u.done&&(s=l.return)&&s.call(l)}finally{if(o)throw o.error}}n()}})),function(){t.delete(i),t.size===0&&r&&(r.unsubscribe(),r=null)}})}var Me,Xv=Y(()=>{z();Me=za(Kv())});var Qv=zi((zD,eu)=>{var IC=Object.prototype.hasOwnProperty;function Yv(e){return"[Throws: "+(e?e.message:"?")+"]"}function AC(e,t){if(IC.call(e,t))try{return e[t]}catch(r){return Yv(r)}return e[t]}function Jv(e){var t=[];function r(n){if(n===null||typeof n!="object")return n;if(t.indexOf(n)!==-1)return"[Circular]";if(t.push(n),typeof n.toJSON=="function")try{var i=r(n.toJSON());return t.pop(),i}catch(c){return Yv(c)}if(Array.isArray(n)){var o=n.map(r);return t.pop(),o}var s=Object.keys(n).reduce(function(c,l){return c[l]=r(AC(n,l)),c},{});return t.pop(),s}return r(e)}eu.exports=function(e,t,r){return JSON.stringify(Jv(e),t,r)};eu.exports.ensureProperties=Jv});var tu,Jr,Zv=Y(()=>{tu=za(Qv()),Jr=tu.default||tu});var Qr,ru,nu,Zr,So,Eo=Y(()=>{Qr="https://app.amplitude.com",ru="https://app.eu.amplitude.com",nu="https://apps.stag2.amplitude.com",Zr={US:Qr,EU:ru,STAGING:nu},So="https://cdn.amplitude.com/libs/background-capture-1.0.3.js.gz"});function tg(){return"".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9))}var eg,rg=Y(()=>{eg=function(e){var t=document.querySelector('script[src="'.concat(CSS.escape(e),'"]'));return t?Promise.resolve({status:!0}):new Promise(function(r,n){var i;try{var o=document.createElement("script");o.type="text/javascript",o.async=!0,o.src=e,o.addEventListener("load",function(){r({status:!0})},{once:!0}),o.addEventListener("error",function(){n({status:!1,message:"Failed to load the script ".concat(e)})}),(i=document.head)===null||i===void 0||i.appendChild(o)}catch(s){n(s)}})}});function OC(e){return typeof e=="object"&&e!==null&&iu in e&&e[iu]===!0}function ei(e){var t=j(),r=t?.[wo];if(OC(r))return r;var n=new RC(e);return t&&(t[wo]=n),n}var ng,iu,wo,RC,ig=Y(()=>{z();ht();Eo();rg();iu="__AMPLITUDE_MESSENGER_INSTANCE__",wo="__AMPLITUDE_MESSENGER__",RC=(function(){function e(t){var r=t===void 0?{}:t,n=r.origin,i=n===void 0?Qr:n;this[ng]=!0,this.isSetup=!1,this.messageHandler=null,this.requestCallbacks={},this.actionHandlers=new Map,this.pendingMessages=new Map,this.scriptLoadPromises=new Map,this.endpoint=i}return e.prototype.notify=function(t){var r,n,i,o;(n=(r=this.logger)===null||r===void 0?void 0:r.debug)===null||n===void 0||n.call(r,"Message sent: ",JSON.stringify(t)),(o=(i=window.opener)===null||i===void 0?void 0:i.postMessage)===null||o===void 0||o.call(i,t,this.endpoint)},e.prototype.sendRequest=function(t,r,n){var i=this;n===void 0&&(n={timeout:15e3});var o=tg(),s={id:o,action:t,args:r},c=new Promise(function(l,u){i.requestCallbacks[o]={resolve:l,reject:u},i.notify(s),n.timeout>0&&setTimeout(function(){u(new Error("".concat(t," timed out (id: ").concat(o,")"))),delete i.requestCallbacks[o]},n.timeout)});return c},e.prototype.handleResponse=function(t){var r;if(!this.requestCallbacks[t.id]){(r=this.logger)===null||r===void 0||r.warn("No callback found for request id: ".concat(t.id));return}this.requestCallbacks[t.id].resolve(t.responseData),delete this.requestCallbacks[t.id]},e.prototype.registerActionHandler=function(t,r){var n,i,o,s;this.actionHandlers.has(t)&&((s=(o=this.logger)===null||o===void 0?void 0:o.warn)===null||s===void 0||s.call(o,"Overwriting existing action handler for: ".concat(t))),this.actionHandlers.set(t,r);var c=this.pendingMessages.get(t);if(c){this.pendingMessages.delete(t);try{for(var l=U(c),u=l.next();!u.done;u=l.next()){var a=u.value;
5r(a)}}catch(h){n={error:h}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}}},e.prototype.loadScriptOnce=function(t){return O(this,void 0,void 0,function(){var r,n,i;return R(this,function(o){switch(o.label){case 0:if(r=this.scriptLoadPromises.get(t),r)return[2,r];n=eg(t).then(function(){}),this.scriptLoadPromises.set(t,n),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,n];case 2:return o.sent(),[3,4];case 3:throw i=o.sent(),this.scriptLoadPromises.delete(t),i;case 4:return[2]}})})},e.prototype.setup=function(t){var r=this,n,i,o=t===void 0?{}:t,s=o.logger,c=o.endpoint;s&&(this.logger=s),c&&this.endpoint===Qr&&(this.endpoint=c),!this.isSetup&&(this.isSetup=!0,(i=(n=this.logger)===null||n===void 0?void 0:n.debug)===null||i===void 0||i.call(n,"Setting up messenger"),this.messageHandler=function(l){var u,a,h,f,d;if((a=(u=r.logger)===null||u===void 0?void 0:u.debug)===null||a===void 0||a.call(u,"Message received: ",JSON.stringify(l)),r.endpoint===l.origin){var p=l.data,v=p?.action;if(v)if("id"in p&&p.id)(f=(h=r.logger)===null||h===void 0?void 0:h.debug)===null||f===void 0||f.call(h,"Received Response to previous request: ",JSON.stringify(l)),r.handleResponse(p);else{if(v==="ping"){r.notify({action:"pong"});return}var g=r.actionHandlers.get(v);if(g)g(p.data);else{var y=(d=r.pendingMessages.get(v))!==null&&d!==void 0?d:[];y.push(p.data),r.pendingMessages.set(v,y)}}}},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 t=j();t?.[wo]===this&&delete t[wo]},e})();ng=iu});function ti(e,t){var r,n=e;if(n[og]!==!0){n[og]=!0;var i=(r=t?.scriptUrl)!==null&&r!==void 0?r:So,o=null,s=function(c,l){var u,a;c==="background-capture-complete"&&((a=(u=e.logger)===null||u===void 0?void 0:u.debug)===null||a===void 0||a.call(u,"Background capture complete"),e.notify({action:"background-capture-complete",data:l}))};e.registerActionHandler("initialize-background-capture",function(){var c,l;(l=(c=e.logger)===null||c===void 0?void 0:c.debug)===null||l===void 0||l.call(c,"Initializing background capture (external script)");var u=new URL(i,e.endpoint).toString();e.loadScriptOnce(u).then(function(){var a,h,f;(h=(a=e.logger)===null||a===void 0?void 0:a.debug)===null||h===void 0||h.call(a,"Background capture script loaded (external)"),o=(f=window?.amplitudeBackgroundCapture)===null||f===void 0?void 0:f.call(window,{messenger:e,onBackgroundCapture:s}),e.notify({action:"background-capture-loaded"})}).catch(function(){var a;(a=e.logger)===null||a===void 0||a.warn("Failed to initialize background capture")})}),e.registerActionHandler("close-background-capture",function(){var c;(c=o?.close)===null||c===void 0||c.call(o),o=null})}}var og,sg=Y(()=>{Eo();og="__AMPLITUDE_BACKGROUND_CAPTURE__"});var en,ag=Y(()=>{en={always:"always",ifEmptyCampaign:"ifEmptyCampaign"}});function ou(){var e,t,r=j();return typeof((t=(e=r?.chrome)===null||e===void 0?void 0:e.runtime)===null||t===void 0?void 0:t.id)=="string"}function su(){var e,t=j();return((e=t?.navigator)===null||e===void 0?void 0:e.product)==="ReactNative"}var lg=Y(()=>{ht()});function _o(e,t,r){var n,i,o=[];try{for(var s=U(t??[]),c=s.next();!c.done;c=s.next()){var l=c.value;try{o.push(new RegExp(l))}catch(u){r.warn("Invalid regex pattern: ".concat(l),u)}}}catch(u){n={error:u}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return e.concat(o)}function au(e,t){var r,n,i,o,s;if(!(typeof e!="object"||e===null||!(!((i=e.captureRules)===null||i===void 0)&&i.length))){var c=P({},e),l=(o=c.captureRules)!==null&&o!==void 0?o:[];try{for(var u=U(l),a=u.next();!a.done;a=u.next()){var h=a.value;h.urls=_o((s=h.urls)!==null&&s!==void 0?s:[],h.urlsRegex,t),delete h.urlsRegex}}catch(f){r={error:f}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return c}}function xo(e){var t,r,n,i,o,s,c,l,u,a,h,f;if(!(typeof e!="object"||e===null)&&!Array.isArray(e)){var d=Object.keys(e);try{for(var p=U(d),v=p.next();!v.done;v=p.next()){var g=v.value;try{var y=e[g];typeof y?.enabled=="boolean"&&(y.enabled?(delete y.enabled,Object.keys(y).length===0&&(e[g]=!0)):e[g]=!1),xo(y)}catch{}}}catch(F){t={error:F}}finally{try{v&&!v.done&&(r=p.return)&&r.call(p)}finally{if(t)throw t.error}}
5try{if(!((u=(l=(c=e.autocapture)===null||c===void 0?void 0:c.networkTracking)===null||l===void 0?void 0:l.captureRules)===null||u===void 0)&&u.length)try{for(var m=U(e.autocapture.networkTracking.captureRules),E=m.next();!E.done;E=m.next()){var w=E.value;try{for(var b=(o=void 0,U(["responseHeaders","requestHeaders"])),S=b.next();!S.done;S=b.next()){var _=S.value,x=(a=w[_])!==null&&a!==void 0?a:{},I=x.captureSafeHeaders,C=x.allowlist;if(!(!I&&!C)){if(C!==void 0&&!Array.isArray(C)){delete w[_];continue}w[_]=H(H([],B(I?Yt:[]),!1),B(C??[]),!1)}}}catch(F){o={error:F}}finally{try{S&&!S.done&&(s=b.return)&&s.call(b)}finally{if(o)throw o.error}}}}catch(F){n={error:F}}finally{try{E&&!E.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}}catch{}var k=(h=e.autocapture)===null||h===void 0?void 0:h.frustrationInteractions;k&&(k.rageClick&&(k.rageClicks=k.rageClick,delete k.rageClick),k.deadClick&&(k.deadClicks=k.deadClick,delete k.deadClick));try{var N=(f=e.autocapture)===null||f===void 0?void 0:f.elementInteractions;if(N&&typeof N=="object"&&(N.viewportContentUpdated===!0&&(N.viewportContentUpdated={}),N.viewportContentUpdated===!1&&(N.viewportContentUpdated={enabled:!1}),N.exposureDuration!==void 0)){var T=N.viewportContentUpdated;T===void 0?N.viewportContentUpdated={exposureDuration:N.exposureDuration}:typeof T=="object"&&T.exposureDuration===void 0&&T.enabled!==!1&&(T.exposureDuration=N.exposureDuration),delete N.exposureDuration}}catch{}}}var ug=Y(()=>{z();ft()});var ee=Y(()=>{jp();Qi();Vp();Hp();Xp();ml();pl();ht();_l();Yp();Jp();Qp();Il();dl();bl();Gr();fl();ev();Rl();tv();rv();nv();iv();ov();fv();Nl();dv();hv();gv();Dn();ft();mv();$i();yv();bv();Sv();wv();Mn();Lv();Dv();ft();ft();Uv();Gv();Xv();Zv();zl();ig();sg();Eo();ag();lg();ug()});function yA(){return Fb||(Fb=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function bA(){return Bb||(Bb=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}function SA(e){let t=new Promise((r,n)=>{let i=()=>{e.removeEventListener("success",o),e.removeEventListener("error",s)},o=()=>{r(Rr(e.result)),i()},s=()=>{n(e.error),i()};e.addEventListener("success",o),e.addEventListener("error",s)});return gs.set(t,e),t}function EA(e){if(mc.has(e))return;let t=new Promise((r,n)=>{let i=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",s),e.removeEventListener("abort",s)},o=()=>{r(),i()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",o),e.addEventListener("error",s),e.addEventListener("abort",s)});mc.set(e,t)}function jb(e){yc=e(yc)}function wA(e){return bA().includes(e)?function(...t){return e.apply(bc(this),t),Rr(this.request)}:function(...t){return Rr(e.apply(bc(this),t))}}function _A(e){return typeof e=="function"?wA(e):(e instanceof IDBTransaction&&EA(e),gc(e,yA())?new Proxy(e,yc):e)}function Rr(e){if(e instanceof IDBRequest)return SA(e);if(pc.has(e))return pc.get(e);let t=_A(e);return t!==e&&(pc.set(e,t),gs.set(t,e)),t}function hn(e,t,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){let s=indexedDB.open(e,t),c=Rr(s);return n&&s.addEventListener("upgradeneeded",l=>{n(Rr(s.result),l.oldVersion,l.newVersion,Rr(s.transaction),l)}),r&&s.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),c.then(l=>{o&&l.addEventListener("close",()=>o()),i&&l.addEventListener("versionchange",u=>i(u.oldVersion,u.newVersion,u))}).catch(()=>{}),c}function qb(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(vc.get(t))return vc.get(t);let r=t.replace(/FromIndex$/,""),n=t!==r,i=TA.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||xA.includes(r)))return;let o=async function(s,...c){let l=this.transaction(s,i?"readwrite":"readonly"),u=l.store;return n&&(u=u.index(c.shift())),(await Promise.all([u[r](...c),i&&l.done]))[0]};return vc.set(t,o),o}async function*AA(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;let r=new Proxy(t,IA);for(Vb.set(r,t),gs.set(r,bc(t));t;)yield r,t=await(Sc.get(r)||t.continue()),Sc.delete(r)}function Wb(e,t){return t===Symbol.asyncIterator&&gc(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&gc(e,[IDBIndex,IDBObjectStore])}var gc,Fb,Bb,mc,pc,gs,yc,bc,xA,TA,vc,CA,Gb,Sc,Vb,IA,ms=Y(()=>{gc=(e,t)=>t.some(r=>e instanceof r);mc=new WeakMap,pc=new WeakMap,gs=new WeakMap;yc={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return mc.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Rr(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};bc=e=>gs.get(e);xA=["get","getKey","getAll","getAllKeys","count"],TA=["put","add","delete","clear"],vc=new Map;jb(e=>({...e,get:(t,r,n)=>qb(t,r)||e.get(t,r,n),has:(t,r)=>!!qb(t,r)||e.has(t,r)}));CA=["continue","continuePrimaryKey","advance"],Gb={},Sc=new WeakMap,Vb=new WeakMap,IA={get(e,t){if(!CA.includes(t))return e[t];let r=Gb[t];return r||(r=Gb[t]=function(...n){Sc.set(this,Vb.get(this)[t](...n))}),r}};jb(e=>({...e,get(t,r,n){return Wb(t,r)?AA:e.get(t,r,n)},has(t,r){return Wb(t,r)||e.has(t,r)}}))});function KA(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Rc(e,t);function r(){this.constructor=e}
vendor: 17,013 bytes, line 5
5e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function E0(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function c(a){try{u(n.next(a))}catch(h){s(h)}}function l(a){try{u(n.throw(a))}catch(h){s(h)}}function u(a){a.done?o(a.value):i(a.value).then(c,l)}u((n=n.apply(e,t||[])).next())})}function w0(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(a){return l([u,a])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(a){u=[6,a],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function $t(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")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.")}function XA(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(c){s={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function YA(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var Rc,Or,ie,JA,As,Rs,Os,QA,ZA,eR,tR,rR,nR,_i,iR,oR,h0,sR,aR,lR,uR,cR,_0,x0,fR,dR,hR,vn,p0,v0,pR,wi,Is,vR,Ze,g0,T0,C0,I0,kc,Oc,Ps,gR,mR,A0,m0,pn,y0,yR,bR,R0,O0,Nc,P0,k0,SR,N0,Pc,ER,M0,L0,D0,wR,b0,_R,jj,Vj,S0,zj,U0=Y(()=>{Rc=function(e,t){return Rc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Rc(e,t)};Or=function(){return Or=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Or.apply(this,arguments)};ie={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"},JA=function(e){for(var t=[],r=0,n=0;n<e.length;n++){var i=e.charCodeAt(n);i<128?t[r++]=i:i<2048?(t[r++]=i>>6|192,t[r++]=i&63|128):(i&64512)==55296&&n+1<e.length&&(e.charCodeAt(n+1)&64512)==56320?(i=65536+((i&1023)<<10)+(e.charCodeAt(++n)&1023),t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=i&63|128):(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=i&63|128)}return Uint8Array.from(t)},As=-862048943,Rs=461845907,Os=15,QA=13,ZA=5,eR=-430675100,tR=function(e,t){t===void 0&&(t=0);for(var r=JA(e),n=r.length,i=n>>2,o=t,s=0;s<i;s++){var c=s<<2,l=iR(r,c);o=rR(l,o)}var u=i<<2,a=0;switch(n-u){case 3:a^=r[u+2]<<16,a^=r[u+1]<<8,a^=r[u],a=Math.imul(a,As),a=_i(a,Os),a=Math.imul(a,Rs),o^=a;break;case 2:a^=r[u+1]<<8,a^=r[u],a=Math.imul(a,As),a=_i(a,Os),a=Math.imul(a,Rs),o^=a;break;case 1:a^=r[u],a=Math.imul(a,As),a=_i(a,Os),a=Math.imul(a,Rs),o^=a;break}return o^=n,nR(o)>>>0},rR=function(e,t){var r=e,n=t;return r=Math.imul(r,As),r=_i(r,Os),r=Math.imul(r,Rs),n^=r,n=_i(n,QA),n=Math.imul(n,ZA),n+eR|0},nR=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,t},_i=function(e,t,r){r===void 0&&(r=32),t>r&&(t=t%r);var n=4294967295<<r-t>>>0,i=(e&n)>>>0>>>r-t>>>0;return(e<<t|i)>>>0},iR=function(e,t){t===void 0&&(t=0);var r=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return oR(r)},oR=function(e){return(e&-16777216)>>>24|(e&16711680)>>>8|(e&65280)<<8|(e&255)<<24},h0=function(e,t){var r,n;if(!(!t||t.length===0)){try{for(var i=$t(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!s||!e||typeof e!="object")return;e=e[s]}}catch(c){r={error:c}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}if(e)return e}},sR="(\\d+)\\.(\\d+)",aR="(\\d+)",lR="(-(([-\\w]+\\.?)*))?",uR="^".concat(sR,"(\\.").concat(aR).concat(lR,")?$"),cR=(function(){function e(t,r,n,i){i===void 0&&(i=void 0),this.major=t,this.minor=r,this.patch=n,this.preRelease=i}return e.parse=function(t){if(t){var r=new RegExp(uR).exec(t);if(r){var n=Number(r[1]),i=Number(r[2]);if(!(isNaN(n)||isNaN(i))){var o=Number(r[4])||0,s=r[5]||void 0;return new e(n,i,o,s)}}}},e.prototype.compareTo=function(t){return this.major>t.major?1:this.major<t.major?-1:this.minor>t.minor?1:this.minor<t.minor?-1:this.patch>t.patch?1:this.patch<t.patch||this.preRelease&&!t.preRelease?-1:!this.preRelease&&t.preRelease?1:this.preRelease&&t.preRelease?this.preRelease>t.preRelease?1:this.preRelease<t.preRelease?-1:0:0},e})(),_0=(function(){function e(){}return e.prototype.evaluate=function(t,r){var n,i,o={},s={context:t,result:o};try{for(var c=$t(r),l=c.next();!l.done;l=c.next()){var u=l.value,a=this.evaluateFlag(s,u);a&&(o[u.key]=a)}}catch(h){n={error:h}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}return o},e.prototype.evaluateFlag=function(t,r){var n,i,o;try{for(var s=$t(r.segments),c=s.next();!c.done;c=s.next()){var l=c.value;if(o=this.evaluateSegment(t,r,l),o){var u=Or(Or(Or({},r.metadata),l.metadata),o.metadata);o=Or(Or({},o),{metadata:u});break}}}catch(a){n={error:a}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return o},e.prototype.evaluateSegment=function(t,r,n){var i,o,s,c;if(!n.conditions){var l=this.bucket(t,n);return l!==void 0?r.variants[l]:void 0}try{for(var u=$t(n.conditions),a=u.next();!a.done;a=u.next()){var h=a.value,f=!0;try{for(var d=(s=void 0,$t(h)),p=d.next();!p.done;p=d.next()){var v=p.value;if(f=this.matchCondition(t,v),!f)break}}catch(g){s={error:g}}finally{try{p&&!p.done&&(c=d.return)&&c.call(d)}finally{if(s)throw s.error}}if(f){var l=this.bucket(t,n);return l!==void 0?r.variants[l]:void 0}}}catch(g){i={error:g}}finally{try{a&&!a.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}},e.prototype.matchCondition=function(t,r){var n=h0(t,r.selector);if(n)if(this.isSetOperator(r.op)){var i=this.coerceStringArray(n);return i?this.matchSet(i,r.op,r.values):!1}else{var o=this.coerceString(n);return o!==void 0?this.matchString(o,r.op,r.values):!1}else return this.matchNull(r.op,r.values)},e.prototype.getHash=function(t){return tR(t)},e.prototype.bucket=function(t,r){var n,i,o,s;if(!r.bucket)return r.variant;var c=this.coerceString(h0(t,r.bucket.selector));if(!c||c.length===0)return r.variant;var l="".concat(r.bucket.salt,"/").concat(c),u=this.getHash(l),a=u%100,h=Math.floor(u/100);try{for(var f=$t(r.bucket.allocations),d=f.next();!d.done;d=f.next()){var p=d.value,v=p.range[0],g=p.range[1];if(a>=v&&a<g)try{for(var y=(o=void 0,$t(p.distributions)),m=y.next();!m.done;m=y.next()){var E=m.value,w=E.range[0],b=E.range[1];if(h>=w&&h<b)return E.variant}}catch(S){o={error:S}}finally{try{m&&!m.done&&(s=y.return)&&s.call(y)}finally{if(o)throw o.error}}}}catch(S){n={error:S}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}return r.variant},e.prototype.matchNull=function(t,r){var n=this.containsNone(r);switch(t){case ie.IS:case ie.CONTAINS:case ie.LESS_THAN:case ie.LESS_THAN_EQUALS:case ie.GREATER_THAN:case ie.GREATER_THAN_EQUALS:case ie.VERSION_LESS_THAN:case ie.VERSION_LESS_THAN_EQUALS:case ie.VERSION_GREATER_THAN:case ie.VERSION_GREATER_THAN_EQUALS:case ie.SET_IS:case ie.SET_CONTAINS:case ie.SET_CONTAINS_ANY:return n;case ie.IS_NOT:case ie.DOES_NOT_CONTAIN:case ie.SET_DOES_NOT_CONTAIN:case ie.SET_DOES_NOT_CONTAIN_ANY:return!n;default:return!1}},e.prototype.matchSet=function(t,r,n){switch(r){case ie.SET_IS:return this.setEquals(t,n);case ie.SET_IS_NOT:return!this.setEquals(t,n);case ie.SET_CONTAINS:return this.matchesSetContainsAll(t,n);case ie.SET_DOES_NOT_CONTAIN:return!this.matchesSetContainsAll(t,n);case ie.SET_CONTAINS_ANY:return this.matchesSetContainsAny(t,n);case ie.SET_DOES_NOT_CONTAIN_ANY:return!this.matchesSetContainsAny(t,n);default:return!1}},e.prototype.matchString=function(t,r,n){var i=this;switch(r){case ie.IS:return this.matchesIs(t,n);case ie.IS_NOT:return!this.matchesIs(t,n);case ie.CONTAINS:return this.matchesContains(t,n);case ie.DOES_NOT_CONTAIN:return!this.matchesContains(t,n);case ie.LESS_THAN:case ie.LESS_THAN_EQUALS:case ie.GREATER_THAN:case ie.GREATER_THAN_EQUALS:return this.matchesComparable(t,r,n,function(o){return i.parseNumber(o)},this.comparator);case ie.VERSION_LESS_THAN:case ie.VERSION_LESS_THAN_EQUALS:case ie.VERSION_GREATER_THAN:case ie.VERSION_GREATER_THAN_EQUALS:return this.matchesComparable(t,r,n,function(o){return cR.parse(o)},this.versionComparator);case ie.REGEX_MATCH:return this.matchesRegex(t,n);case ie.REGEX_DOES_NOT_MATCH:return!this.matchesRegex(t,n);default:return!1}},e.prototype.matchesIs=function(t,r){if(this.containsBooleans(r)){var n=t.toLowerCase();if(n==="true"||n==="false")return r.some(function(i){return i.toLowerCase()===n})}return r.some(function(i){return t===i})},e.prototype.matchesContains=function(t,r){var n,i;try{for(var o=$t(r),s=o.next();!s.done;s=o.next()){var c=s.value;if(t.toLowerCase().includes(c.toLowerCase()))return!0}}catch(l){n={error:l}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return!1},e.prototype.matchesComparable=function(t,r,n,i,o){var s=this,c=i(t),l=n.map(function(u){return i(u)}).filter(function(u){return u!==void 0});return c===void 0||l.length===0?n.some(function(u){return s.comparator(t,r,u)}):l.some(function(u){return o(c,r,u)})},e.prototype.comparator=function(t,r,n){switch(r){case ie.LESS_THAN:case ie.VERSION_LESS_THAN:return t<n;case ie.LESS_THAN_EQUALS:case ie.VERSION_LESS_THAN_EQUALS:return t<=n;case ie.GREATER_THAN:case ie.VERSION_GREATER_THAN:return t>n;case ie.GREATER_THAN_EQUALS:case ie.VERSION_GREATER_THAN_EQUALS:return t>=n;default:return!1}},e.prototype.versionComparator=function(t,r,n){var i=t.compareTo(n);switch(r){case ie.LESS_THAN:case ie.VERSION_LESS_THAN:return i<0;case ie.LESS_THAN_EQUALS:case ie.VERSION_LESS_THAN_EQUALS:return i<=0;case ie.GREATER_THAN:case ie.VERSION_GREATER_THAN:return i>0;case ie.GREATER_THAN_EQUALS:case ie.VERSION_GREATER_THAN_EQUALS:return i>=0;default:return!1}},e.prototype.matchesRegex=function(t,r){return r.some(function(n){return!!new RegExp(n).exec(t)})},e.prototype.containsNone=function(t){return t.some(function(r){return r==="(none)"})},e.prototype.containsBooleans=function(t){return t.some(function(r){switch(r.toLowerCase()){case"true":case"false":return!0;default:return!1}})},e.prototype.parseNumber=function(t){var r;return(r=Number(t))!==null&&r!==void 0?r:void 0},e.prototype.coerceString=function(t){if(t)return typeof t=="object"?JSON.stringify(t):String(t)},e.prototype.coerceStringArray=function(t){var r=this;if(Array.isArray(t)){var n=t;return n.map(function(s){return r.coerceString(s)}).filter(Boolean)}var i=String(t);try{var o=JSON.parse(i);if(Array.isArray(o)){var n=t;return n.map(function(c){return r.coerceString(c)}).filter(Boolean)}else return}catch{return}},e.prototype.isSetOperator=function(t){switch(t){case ie.SET_IS:case ie.SET_IS_NOT:case ie.SET_CONTAINS:case ie.SET_DOES_NOT_CONTAIN:case ie.SET_CONTAINS_ANY:case ie.SET_DOES_NOT_CONTAIN_ANY:return!0;default:return!1}},e.prototype.setEquals=function(t,r){var n=new Set(t),i=new Set(r);return n.size===i.size&&YA([],XA(i),!1).every(function(o){return n.has(o)})},e.prototype.matchesSetContainsAll=function(t,r){var n,i;if(t.length<r.length)return!1;try{for(var o=$t(r),s=o.next();!s.done;s=o.next()){var c=s.value;if(!this.matchesIs(c,t))return!1}}catch(l){n={error:l}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return!0},e.prototype.matchesSetContainsAny=function(t,r){var n,i;try{for(var o=$t(r),s=o.next();!s.done;s=o.next()){var c=s.value;if(this.matchesIs(c,t))return!0}}catch(l){n={error:l}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return!1},e})(),x0="3.7.5",fR=x0,dR=typeof atob=="function",hR=typeof btoa=="function",vn=typeof Buffer=="function",p0=typeof TextDecoder=="function"?new TextDecoder:void 0,v0=typeof TextEncoder=="function"?new TextEncoder:void 0,pR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",wi=Array.prototype.slice.call(pR),Is=(e=>{let t={};return e.forEach((r,n)=>t[r]=n),t})(wi),vR=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Ze=String.fromCharCode.bind(String),g0=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),T0=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),C0=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),I0=e=>{let t,r,n,i,o="",s=e.length%3;for(let c=0;c<e.length;){if((r=e.charCodeAt(c++))>255||(n=e.charCodeAt(c++))>255||(i=e.charCodeAt(c++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|i,o+=wi[t>>18&63]+wi[t>>12&63]+wi[t>>6&63]+wi[t&63]}return s?o.slice(0,s-3)+"===".substring(s):o},kc=hR?e=>btoa(e):vn?e=>Buffer.from(e,"binary").toString("base64"):I0,Oc=vn?e=>Buffer.from(e).toString("base64"):e=>{let r=[];for(let n=0,i=e.length;n<i;n+=4096)r.push(Ze.apply(null,e.subarray(n,n+4096)));return kc(r.join(""))},Ps=(e,t=!1)=>t?T0(Oc(e)):Oc(e),gR=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?Ze(192|t>>>6)+Ze(128|t&63):Ze(224|t>>>12&15)+Ze(128|t>>>6&63)+Ze(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return Ze(240|t>>>18&7)+Ze(128|t>>>12&63)+Ze(128|t>>>6&63)+Ze(128|t&63)}},mR=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,A0=e=>e.replace(mR,gR),m0=vn?e=>Buffer.from(e,"utf8").toString("base64"):v0?e=>Oc(v0.encode(e)):e=>kc(A0(e)),pn=(e,t=!1)=>t?T0(m0(e)):m0(e),y0=e=>pn(e,!0),yR=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,bR=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),r=t-65536;return Ze((r>>>10)+55296)+Ze((r&1023)+56320);case 3:return Ze((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return Ze((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},R0=e=>e.replace(yR,bR),O0=e=>{if(e=e.replace(/\s+/g,""),!vR.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,r="",n,i;for(let o=0;o<e.length;)t=Is[e.charAt(o++)]<<18|Is[e.charAt(o++)]<<12|(n=Is[e.charAt(o++)])<<6|(i=Is[e.charAt(o++)]),r+=n===64?Ze(t>>16&255):i===64?Ze(t>>16&255,t>>8&255):Ze(t>>16&255,t>>8&255,t&255);return r},Nc=dR?e=>atob(C0(e)):vn?e=>Buffer.from(e,"base64").toString("binary"):O0,P0=vn?e=>g0(Buffer.from(e,"base64")):e=>g0(Nc(e).split("").map(t=>t.charCodeAt(0))),k0=e=>P0(N0(e)),SR=vn?e=>Buffer.from(e,"base64").toString("utf8"):p0?e=>p0.decode(P0(e)):e=>R0(Nc(e)),N0=e=>C0(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),Pc=e=>SR(N0(e)),ER=e=>{if(typeof e!="string")return!1;let t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},M0=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),L0=function(){let e=(t,r)=>Object.defineProperty(String.prototype,t,M0(r));e("fromBase64",function(){return Pc(this)}),e("toBase64",function(t){return pn(this,t)}),e("toBase64URI",function(){return pn(this,!0)}),e("toBase64URL",function(){return pn(this,!0)}),e("toUint8Array",function(){return k0(this)})},D0=function(){let e=(t,r)=>Object.defineProperty(Uint8Array.prototype,t,M0(r));e("toBase64",function(t){return Ps(this,t)}),e("toBase64URI",function(){return Ps(this,!0)}),e("toBase64URL",function(){return Ps(this,!0)})},wR=()=>{L0(),D0()},b0={version:x0,VERSION:fR,atob:Nc,atobPolyfill:O0,btoa:kc,btoaPolyfill:I0,fromBase64:Pc,toBase64:pn,encode:pn,encodeURI:y0,encodeURL:y0,utob:A0,btou:R0,decode:P
5c,isValid:ER,fromUint8Array:Ps,toUint8Array:k0,extendString:L0,extendUint8Array:D0,extendBuiltins:wR},_R=(function(e){KA(t,e);function t(r,n){var i=e.call(this,n)||this;return i.statusCode=r,Object.setPrototypeOf(i,t.prototype),i}return t})(Error),jj=(function(){function e(t,r,n){this.deploymentKey=t,this.serverUrl=r,this.httpClient=n}return e.prototype.getVariants=function(t,r){return E0(this,void 0,void 0,function(){var n,i,o;return w0(this,function(s){switch(s.label){case 0:return n=b0.encodeURL(JSON.stringify(t)),i={Authorization:"Api-Key ".concat(this.deploymentKey),"X-Amp-Exp-User":n},r?.flagKeys&&(i["X-Amp-Exp-Flag-Keys"]=b0.encodeURL(JSON.stringify(r.flagKeys))),r?.trackingOption&&(i["X-Amp-Exp-Track"]=r.trackingOption),[4,this.httpClient.request({requestUrl:"".concat(this.serverUrl,"/sdk/v2/vardata?v=0"),method:"GET",headers:i,timeoutMillis:r?.timeoutMillis})];case 1:if(o=s.sent(),o.status!=200)throw new _R(o.status,"Fetch error response: status=".concat(o.status));return[2,JSON.parse(o.body)]}})})},e})(),Vj=(function(){function e(t,r,n){this.deploymentKey=t,this.serverUrl=r,this.httpClient=n}return e.prototype.getFlags=function(t){return E0(this,void 0,void 0,function(){var r,n,i;return w0(this,function(o){switch(o.label){case 0:return r={Authorization:"Api-Key ".concat(this.deploymentKey)},t?.libraryName&&t?.libraryVersion&&(r["X-Amp-Exp-Library"]="".concat(t.libraryName,"/").concat(t.libraryVersion)),[4,this.httpClient.request({requestUrl:"".concat(this.serverUrl,"/sdk/v2/flags"),method:"GET",headers:r,timeoutMillis:t?.timeoutMillis})];case 1:if(n=o.sent(),n.status!=200)throw Error("Flags error response: status=".concat(n.status));return i=JSON.parse(n.body),[2,i.reduce(function(s,c){return s[c.key]=c,s},{})]}})})},e})(),S0=typeof globalThis<"u"?globalThis:global||self,zj=(function(){function e(t,r){this.poller=void 0,this.action=t,this.ms=r}return e.prototype.start=function(){this.poller||(this.poller=S0.setInterval(this.action,this.ms),this.action())},e.prototype.stop=function(){this.poller&&(S0.clearInterval(this.poller),this.poller=void 0)},e})()});var xR,TR,F0,B0=Y(()=>{z();ms();xR=1e3*60*60*24*2,TR=(function(){function e(){var t=this;this.dbs={},this.createStore=function(r){return O(t,void 0,void 0,function(){return R(this,function(n){switch(n.label){case 0:return[4,hn(r,1,{upgrade:function(i){i.objectStoreNames.contains("eventTypesForSession")||i.createObjectStore("eventTypesForSession",{keyPath:"sessionId"})}})];case 1:return[2,n.sent()]}})})},this.openOrCreateDB=function(r){return O(t,void 0,void 0,function(){var n,i;return R(this,function(o){switch(o.label){case 0:return this.dbs&&this.dbs[r]?[2,this.dbs[r]]:(n="".concat(r.substring(0,10),"_amp_targeting"),[4,this.createStore(n)]);case 1:return i=o.sent(),this.dbs[r]=i,[2,i]}})})},this.updateEventListForSession=function(r){var n=r.sessionId,i=r.eventType,o=r.eventTime,s=r.loggerProvider,c=r.tx;return O(t,void 0,void 0,function(){var l,u,a,h,f,d,p,v,g;return R(this,function(y){switch(y.label){case 0:return y.trys.push([0,3,,4]),l=String(n),[4,c.store.get(l)];case 1:return u=y.sent(),a=u?u.eventTypes:{},h=a[i]||{},f=P(P({},a),(v={},v[i]=P(P({},h),(g={},g[o]={event_type:i},g)),v)),d={sessionId:l,eventTypes:f,lastUpdated:Date.now()},[4,c.store.put(d)];case 2:return y.sent(),[2,f];case 3:return p=y.sent(),s.warn("Failed to store events for targeting ".concat(n,": ").concat(p)),[3,4];case 4:return[2,void 0]}})})},this.deleteOldSessionEventTypes=function(r){var n=r.currentSessionId,i=r.loggerProvider,o=r.tx;return O(t,void 0,void 0,function(){var s,c,l,u,a,h;return R(this,function(f){switch(f.label){case 0:return f.trys.push([0,6,,7]),s=String(n),[4,o.store.getAll()];case 1:c=f.sent(),l=0,f.label=2;case 2:return l<c.length?(u=c[l],a=Date.now()-u.lastUpdated,u.sessionId!==s&&a>xR?[4,o.store.delete(u.sessionId)]:[3,4]):[3,5];case 3:f.sent(),f.label=4;case 4:return l++,[3,2];case 5:return[3,7];case 6:return h=f.sent(),i.warn("Failed to clear old session event types for targeting: ".concat(h)),[3,7];case 7:return[2]}})})},this.storeEventTypeForSession=function(r){var n=r.loggerProvider,i=r.sessionId,o=r.eventType,s=r.eventTime,c=r.apiKey;return O(t,void 0,void 0,function(){var l,u,a,h;return R(this,function(f){switch(f.label){case 0:return f.trys.push([0,5,,6]),[4,this.openOrCreateDB(c)];case 1:return l=f.sent(),u=l.transaction("eventTypesForSession","readwrite"),u?[4,this.updateEventListForSession({sessionId:i,tx:u,loggerProvider:n,eventType:o,eventTime:s})]:[2];case 2:return a=f.sent(),[4,this.deleteOldSessionEventTypes({currentSessionId:i,tx:u,loggerProvider:n})];case 3:return f.sent(),[4,u.done];case 4:return f.sent(),[2,a];case 5:return h=f.sent(),n.warn("Failed to store events for targeting ".concat(i,": ").concat(h)),[3,6];case 6:return[2,void 0]}})})}}return e})(),F0=new TR});var q0,G0=Y(()=>{z();U0();B0();q0=(function(){function e(){var t=this;this.evaluateTargeting=function(r){var n=r.apiKey,i=r.loggerProvider,o=r.event,s=r.sessionId,c=r.userProperties,l=r.deviceId,u=r.page,a=r.flag;return O(t,void 0,void 0,function(){var h,f,d,p,v;return R(this,function(g){switch(g.label){case 0:return o&&o.time?[4,F0.storeEventTypeForSession({loggerProvider:i,apiKey:n,sessionId:s,eventType:o.event_type,eventTime:o.time})]:[3,2];case 1:return f=g.sent(),[3,3];case 2:f=void 0,g.label=3;case 3:return h=f,d=h&&new Set(Object.keys(h)),p={session_id:s,event:o,event_types:d&&Array.from(d),user:P(P({},c),{device_id:l,user_properties:c}),page:u},v=this.evaluationEngine.evaluate(p,[a]),[2,v]}})})},this.evaluationEngine=new _0}return e})()});var CR,W0,j0=Y(()=>{G0();CR=function(){var e=new q0;return{evaluateTargeting:e.evaluateTargeting.bind(e)}},W0=CR()});var V0={};kn(V0,{evaluateTargeting:()=>IR});var IR,z0=Y(()=>{j0();IR=W0.evaluateTargeting});var eS={};
5kn(eS,{compressionScript:()=>PR,trackDestinationScript:()=>kR});var PR,kR,tS=Y(()=>{PR=`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}({}); 6`,kR=`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,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function i(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,i)}u((n=n.apply(e,t||[])).next())})}function s(e,t){var r,n,s,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=i(0),a.throw=i(1),a.return=i(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,i[0]&&(o=0)),o;)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 o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(s=o.trys,(s=s.length>0&&s[s.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){o.label=i[1];break}if(6===i[0]&&o.label<s[1]){o.label=s[1],s=i;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(i);break}s[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}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,u])}}}"function"==typeof SuppressedError&&SuppressedError,function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(t||(t={})),t.US;var o,a=/payload.*exceed/i,i="X-Session-Replay-Event-Skipped";!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"}(o||(o={}));var u="Network error occurred, event batch rejected";function c(e,t){return n(this,void 0,void 0,function(){var r,o,a,i,u,c,l,d,p,f,v,y,h,b,g=this;return s(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),r=t.CompressionStream,o=new r("gzip"),a=o.writable.getWriter(),i=o.readable.getReader(),u=[],c=n(g,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];u.push(r),n.label=2;case 2:return[3,0];case 3:return[2]}})}),[4,a.write((new TextEncoder).encode(e))];case 1:return m.sent(),[4,a.close()];case 2:return m.sent(),[4,c];case 3:m.sent(),l=u.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.")}(u),v=f.next();!v.done;v=f.next())y=v.value,d.set(y,p),p+=y.length}catch(e){h={error:e}}finally{try{v&&!v.done&&(b=f.return)&&b.call(f)}finally{if(h)throw h.error}}return[2,d];case 4:return m.sent(),[2,null];case 5:return[2]}})})}var l=0,d=new Map,p=function(e,t){return fetch(e,t)},f=function(e,t){var r="".concat(++l);return new Promise(function(n,s){var o=t.signal,a=function(){d.delete(r);var e=new Error("Delegated session replay fetch aborted by send timeout");e.name="AbortError",s(e)};o.addEventListener("abort",a,{once:!0}),d.set(r,function(e){o.removeEventListener("abort",a),e.error?s(new Error(e.body)):n({status:e.status,headers:{get:function(t){return t===i?e.skipHeader:null}},text:function(){return Promise.resolve(e.body)}})}),postMessage({type:"fetch-request",requestId:r,url:e,method:"POST",headers:t.headers,body:t.body,keepalive:t.keepalive})})};function v(e,t,o){var l,d,p,f,v,y,h,b;return n(this,void 0,void 0,function(){var n,g,m,w,S,T,E,k,R,x,C,I,A,M,O;return s(this,function(s){switch(s.label){case 0:n=null!==(l=t.sendTimeoutMs)&&void 0!==l?l:1e4,s.label=1;case 1:return s.trys.push([1,14,,15]),!1!==t.enableTransportCompression&&"CompressionStream"in self?[4,c(e,self)]:[3,3];case 2:return m=s.sent(),[3,4];case 3:m=null,s.label=4;
6case 4:g=m,w="".concat(null!==(p=null===(d=t.version)||void 0===d?void 0:d.type)&&void 0!==p?p:"standalone","/").concat(null!==(v=null===(f=t.version)||void 0===f?void 0:f.version)&&void 0!==v?v:t.sdkVersion),S=new URLSearchParams({device_id:t.deviceId,session_id:"".concat(t.sessionId),type:t.eventType}),T="".concat((U=t.serverZone,P=t.trackServerUrl,P||("STAGING"===U?"https://api-sr.stag2.amplitude.com/sessions/v2/track":"EU"===U?"https://api-sr.eu.amplitude.com/sessions/v2/track":"https://api-sr.amplitude.com/sessions/v2/track")),"?").concat(S.toString()),E=r({"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(t.apiKey),"X-Client-Version":t.sdkVersion,"X-Client-Library":w,"X-Client-Url":t.currentUrl.substring(0,1e3),"X-Client-Sample-Rate":"".concat(t.sampleRate),"X-Sampling-Hash-Alg":"xxhash32"},g?{"Content-Encoding":"gzip"}:{}),k=g?g.byteLength:new Blob([e]).size,R=new AbortController,x=n>0?setTimeout(function(){R.abort()},n):void 0,C=void 0,s.label=5;case 5:return s.trys.push([5,,7,8]),[4,o(T,{method:"POST",headers:E,body:null!=g?g:e,keepalive:k<=65536,signal:R.signal})];case 6:return C=s.sent(),[3,8];case 7:return x&&clearTimeout(x),[7];case 8:if(null===C)return[2,{shouldRetry:!1,success:!1,message:"Unexpected error occurred"}];if(C.status>=200&&C.status<300)return I=Math.round(new Blob(t.events).size/1024),A=null!==(b=null===(h=null===(y=C.headers)||void 0===y?void 0:y.get)||void 0===h?void 0:h.call(y,i))&&void 0!==b?b:null,[2,{shouldRetry:!1,success:!0,message:"Session replay event batch tracked successfully for session id ".concat(t.sessionId,", size of events: ").concat(I," KB"),skipCode:A}];if(413!==C.status)return[3,13];M="",s.label=9;case 9:return s.trys.push([9,11,,12]),[4,C.text()];case 10:return M=s.sent(),[3,12];case 11:return s.sent(),[3,12];case 12:return[2,{shouldRetry:!1,success:!1,message:u,payloadTooLarge:!0,isWaf:a.test(M)}];case 13:return C.status>=500||408===C.status||429===C.status||499===C.status?[2,{shouldRetry:!0,success:!1,message:"HTTP ".concat(C.status)}]:[2,{shouldRetry:!1,success:!1,message:u}];case 14:return(O=s.sent())&&"object"==typeof O&&"AbortError"===O.name?[2,{shouldRetry:!0,success:!1,message:"Session replay worker request timed out after ".concat(n,"ms")}]:[2,{shouldRetry:!1,success:!1,message:String(O)}];case 15:return[2]}var U,P})})}function y(e,t,r,o,a){var i;return n(this,void 0,void 0,function(){var n,u,c;return s(this,function(s){switch(s.label){case 0:n=1,s.label=1;case 1:return[4,v(t,r,a)];case 2:return(u=s.sent()).success?(postMessage({type:"log",id:e,message:u.message}),postMessage({type:"complete",id:e,skipCode:null!==(i=u.skipCode)&&void 0!==i?i:null}),[2]):u.payloadTooLarge&&o?(postMessage({type:"payload_too_large",id:e,isWaf:!0===u.isWaf}),[2]):o&&u.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":u.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,o,a,i,u,c;return s(this,function(s){switch(s.label){case 0:return"fetch-response"===(t=e.data).type?((r=d.get(t.requestId))&&(d.delete(t.requestId),r(t)),[2]):"send"!==t.type?[3,2]:(n=t.id,o=t.payload,a=t.context,i=t.useRetry,u=t.useCustomTransport,c=JSON.stringify(o),[4,y(n,c,a,i,u?f:p)]);case 1:s.sent(),s.label=2;case 2:return[2]}})})};var h=onmessage;return e.trackDestinationOnMessage=h,Object.defineProperty(e,"__esModule",{value:!0}),e}({}); 7`});var VE={};kn(VE,{PLUGIN_NAME:()=>jE,getRecordConsolePlugin:()=>hP});function BR(e){var t,r;let n=(r=(t=globalThis?.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(n&&globalThis[n])return globalThis[n]}function Yf(e){if(Ds[e])return Ds[e];let t=BR(e)||globalThis[e],r=t.prototype,n=e in iS?iS[e]:void 0,i=!!(n&&n.every(c=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(r,c))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=e in oS?oS[e]:void 0,s=!!(o&&o.every(c=>{var l;return typeof r[c]=="function"&&((l=r[c])==null?void 0:l.toString().includes("[native code]"))}));if(i&&s)return Ds[e]=t.prototype,t.prototype;try{let c=document.createElement("iframe");document.body.appendChild(c);let l=c.contentWindow;if(!l)return t.prototype;let u=l[e].prototype;return document.body.removeChild(c),u?Ds[e]=u:r}catch{return r}}function ur(e,t,r){var n;let i=`${e}.${String(r)}`;if(Fc[i])return Fc[i].call(t);let o=Yf(e),s=(n=Object.getOwnPropertyDescriptor(o,r))==null?void 0:n.get;return s?(Fc[i]=s,s.call(t)):t[r]}function gE(e,t,r){let n=`${e}.${String(r)}`;if(Bc[n])return Bc[n].bind(t);let o=Yf(e)[r];return typeof o!="function"?t[r]:(Bc[n]=o,o.bind(t))}function qR(e){return ur("Node",e,"childNodes")}function GR(e){return ur("Node",e,"parentNode")}function WR(e){return ur("Node",e,"parentElement")}function jR(e){return ur("Node",e,"textContent")}function VR(e,t){return gE("Node",e,"contains")(t)}function zR(e){return gE("Node",e,"getRootNode")()}function $R(e){return!e||!("host"in e)?null:ur("ShadowRoot",e,"host")}function HR(e){return e.styleSheets}function KR(e){return!e||!("shadowRoot"in e)?null:ur("Element",e,"shadowRoot")}function XR(e,t){return ur("Element",e,"querySelector")(t)}function YR(e,t){return ur("Element",e,"querySelectorAll")(t)}function JR(){return Yf("MutationObserver").constructor}function QR(e){let t=e&&"host"in e&&"mode"in e&&Ws.host(e)||null;return!!(t&&"shadowRoot"in t&&Ws.shadowRoot(t)===e)}function ZR(){return new Vf}function zf(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?zf(Ws.parentNode(e),t,r):!1;for(let n=e.classList.length;n--;){let i=e.classList[n];if(t.test(i))return!0}return r?zf(Ws.parentNode(e),t,r):!1}
vendor: 2,622 bytes, lines 7-17
7function tO(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function rO(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}function nO(){if(sS)return Us.exports;sS=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 Us.exports=t(),Us.exports.createColors=t,Us.exports}function Jf(){if(aS)return qc;aS=1;let e=nO(),t=kt;class r extends Error{constructor(i,o,s,c,l,u){super(i),this.name="CssSyntaxError",this.reason=i,l&&(this.file=l),c&&(this.source=c),u&&(this.plugin=u),typeof o<"u"&&typeof s<"u"&&(typeof o=="number"?(this.line=o,this.column=s):(this.line=o.line,this.column=o.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let o=this.source;i==null&&(i=e.isColorSupported),t&&i&&(o=t(o));let s=o.split(/\r?\n/),c=Math.max(this.line-3,0),l=Math.min(this.line+2,s.length),u=String(l).length,a,h;if(i){let{bold:f,gray:d,red:p}=e.createColors(!0);a=v=>f(p(v)),h=v=>d(v)}else a=h=f=>f;return s.slice(c,l).map((f,d)=>{let p=c+1+d,v=" "+(" "+p).slice(-u)+" | ";if(p===this.line){let g=h(v.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+h(v)+f+` 8 `+g+a("^")}return" "+h(v)+f}).join(` 9`)}toString(){let i=this.showSourceCode();return i&&(i=` 10 11`+i+` 12`),this.name+": "+this.message+i}}return qc=r,r.default=r,qc}function Qf(){return lS||(lS=1,Fs.isClean=Symbol("isClean"),Fs.my=Symbol("my")),Fs}function mE(){if(uS)return Gc;uS=1;let e={after:` 13`,beforeClose:` 14`,beforeComment:` 15`,beforeDecl:` 16`,beforeOpen:" ",beforeRule:` 17`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(n){return n[0].toUpperCase()+n.slice(1)}
vendor: 7,929 bytes, lines 17-24
17class r{constructor(i){this.builder=i}atrule(i,o){let s="@"+i.name,c=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName<"u"?s+=i.raws.afterName:c&&(s+=" "),i.nodes)this.block(i,s+c);else{let l=(i.raws.between||"")+(o?";":"");this.builder(s+c+l,i)}}beforeAfter(i,o){let s;i.type==="decl"?s=this.raw(i,null,"beforeDecl"):i.type==="comment"?s=this.raw(i,null,"beforeComment"):o==="before"?s=this.raw(i,null,"beforeRule"):s=this.raw(i,null,"beforeClose");let c=i.parent,l=0;for(;c&&c.type!=="root";)l+=1,c=c.parent;if(s.includes(` 18`)){let u=this.raw(i,null,"indent");if(u.length)for(let a=0;a<l;a++)s+=u}return s}block(i,o){let s=this.raw(i,"between","beforeOpen");this.builder(o+s+"{",i,"start");let c;i.nodes&&i.nodes.length?(this.body(i),c=this.raw(i,"after")):c=this.raw(i,"after","emptyBody"),c&&this.builder(c),this.builder("}",i,"end")}body(i){let o=i.nodes.length-1;for(;o>0&&i.nodes[o].type==="comment";)o-=1;let s=this.raw(i,"semicolon");for(let c=0;c<i.nodes.length;c++){let l=i.nodes[c],u=this.raw(l,"before");u&&this.builder(u),this.stringify(l,o!==c||s)}}comment(i){let o=this.raw(i,"left","commentLeft"),s=this.raw(i,"right","commentRight");this.builder("/*"+o+i.text+s+"*/",i)}decl(i,o){let s=this.raw(i,"between","colon"),c=i.prop+s+this.rawValue(i,"value");i.important&&(c+=i.raws.important||" !important"),o&&(c+=";"),this.builder(c,i)}document(i){this.body(i)}raw(i,o,s){let c;if(s||(s=o),o&&(c=i.raws[o],typeof c<"u"))return c;let l=i.parent;if(s==="before"&&(!l||l.type==="root"&&l.first===i||l&&l.type==="document"))return"";if(!l)return e[s];let u=i.root();if(u.rawCache||(u.rawCache={}),typeof u.rawCache[s]<"u")return u.rawCache[s];if(s==="before"||s==="after")return this.beforeAfter(i,s);{let a="raw"+t(s);this[a]?c=this[a](u,i):u.walk(h=>{if(c=h.raws[o],typeof c<"u")return!1})}return typeof c>"u"&&(c=e[s]),u.rawCache[s]=c,c}rawBeforeClose(i){let o;return i.walk(s=>{if(s.nodes&&s.nodes.length>0&&typeof s.raws.after<"u")return o=s.raws.after,o.includes(` 19`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawBeforeComment(i,o){let s;return i.walkComments(c=>{if(typeof c.raws.before<"u")return s=c.raws.before,s.includes(` 20`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(o,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(i,o){let s;return i.walkDecls(c=>{if(typeof c.raws.before<"u")return s=c.raws.before,s.includes(` 21`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(o,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(i){let o;return i.walk(s=>{if(s.type!=="decl"&&(o=s.raws.between,typeof o<"u"))return!1}),o}rawBeforeRule(i){let o;return i.walk(s=>{if(s.nodes&&(s.parent!==i||i.first!==s)&&typeof s.raws.before<"u")return o=s.raws.before,o.includes(` 22`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawColon(i){let o;return i.walkDecls(s=>{if(typeof s.raws.between<"u")return o=s.raws.between.replace(/[^\s:]/g,""),!1}),o}rawEmptyBody(i){let o;return i.walk(s=>{if(s.nodes&&s.nodes.length===0&&(o=s.raws.after,typeof o<"u"))return!1}),o}rawIndent(i){if(i.raws.indent)return i.raws.indent;let o;return i.walk(s=>{let c=s.parent;if(c&&c!==i&&c.parent&&c.parent===i&&typeof s.raws.before<"u"){let l=s.raws.before.split(` 23`);return o=l[l.length-1],o=o.replace(/\S/g,""),!1}}),o}rawSemicolon(i){let o;return i.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(o=s.raws.semicolon,typeof o<"u"))return!1}),o}rawValue(i,o){let s=i[o],c=i.raws[o];return c&&c.value===s?c.raw:s}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,o){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,o)}}return Gc=r,r.default=r,Gc}function js(){if(cS)return Wc;cS=1;let e=mE();function t(r,n){new e(n).stringify(r)}return Wc=t,t.default=t,Wc}function Vs(){if(fS)return jc;fS=1;let{isClean:e,my:t}=Qf(),r=Jf(),n=mE(),i=js();function o(c,l){let u=new c.constructor;for(let a in c){if(!Object.prototype.hasOwnProperty.call(c,a)||a==="proxyCache")continue;let h=c[a],f=typeof h;a==="parent"&&f==="object"?l&&(u[a]=l):a==="source"?u[a]=h:Array.isArray(h)?u[a]=h.map(d=>o(d,u)):(f==="object"&&h!==null&&(h=o(h)),u[a]=h)}return u}class s{constructor(l={}){this.raws={},this[e]=!1,this[t]=!0;for(let u in l)if(u==="nodes"){this.nodes=[];for(let a of l[u])typeof a.clone=="function"?this.append(a.clone()):this.append(a)}else this[u]=l[u]}addToError(l){if(l.postcssNode=this,l.stack&&this.source&&/\n\s{4}at /.test(l.stack)){let u=this.source;l.stack=l.stack.replace(/\n\s{4}at /,`$&${u.input.from}:${u.start.line}:${u.start.column}$&`)}return l}after(l){return this.parent.insertAfter(this,l),this}assign(l={}){for(let u in l)this[u]=l[u];return this}before(l){return this.parent.insertBefore(this,l),this}cleanRaws(l){delete this.raws.before,delete this.raws.after,l||delete this.raws.between}clone(l={}){let u=o(this);for(let a in l)u[a]=l[a];return u}cloneAfter(l={}){let u=this.clone(l);return this.parent.insertAfter(this,u),u}cloneBefore(l={}){let u=this.clone(l);return this.parent.insertBefore(this,u),u}error(l,u={}){if(this.source){let{end:a,start:h}=this.rangeBy(u);return this.source.input.error(l,{column:h.column,line:h.line},{column:a.column,line:a.line},u)}return new r(l)}getProxyProcessor(){return{get(l,u){return u==="proxyOf"?l:u==="root"?()=>l.root().toProxy():l[u]},set(l,u,a){return l[u]===a||(l[u]=a,(u==="prop"||u==="value"||u==="name"||u==="params"||u==="important"||u==="text")&&l.markDirty()),!0}}}markDirty(){if(this[e]){this[e]=!1;let l=this;for(;l=l.parent;)l[e]=!1}}next(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l+1]}positionBy(l,u){let a=this.source.start;if(l.index)a=this.positionInside(l.index,u);else if(l.word){u=this.toString();let h=u.indexOf(l.word);h!==-1&&(a=this.positionInside(h,u))}return a}positionInside(l,u){let a=u||this.toString(),h=this.source.start.column,f=this.source.start.line;for(let d=0;d<l;d++)a[d]===` 24`?(h=1,f+=1):h+=1;return{column:h,line:f}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l){let u={column:this.source.start.column,line:this.source.start.line},a=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:u.column+1,line:u.line};if(l.word){let h=this.toString(),f=h.indexOf(l.word);f!==-1&&(u=this.positionInside(f,h),a=this.positionInside(f+l.word.length,h))}else l.start?u={column:l.start.column,line:l.start.line}:l.index&&(u=this.positionInside(l.index)),l.end?a={column:l.end.column,line:l.end.line}:typeof l.endIndex=="number"?a=this.positionInside(l.endIndex):l.index&&(a=this.positionInside(l.index+1));return(a.line<u.line||a.line===u.line&&a.column<=u.column)&&(a={column:u.column+1,line:u.line}),{end:a,start:u}}raw(l,u){return new n().raw(this,l,u)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...l){if(this.parent){let u=this,a=!1;for(let h of l)h===this?a=!0:a?(this.parent.insertAfter(u,h),u=h):this.parent.insertBefore(u,h);a||this.remove()}return this}root(){let l=this;for(;l.parent&&l.parent.type!=="document";)l=l.parent;return l}toJSON(l,u){let a={},h=u==null;u=u||new Map;let f=0;for(let d in this){if(!Object.prototype.hasOwnProperty.call(this,d)||d==="parent"||d==="proxyCache")continue;let p=this[d];if(Array.isArray(p))a[d]=p.map(v=>typeof v=="object"&&v.toJSON?v.toJSON(null,u):v);else if(typeof p=="object"&&p.toJSON)a[d]=p.toJSON(null,u);else if(d==="source"){let v=u.get(p.input);v==null&&(v=f,u.set(p.input,f),f++),a[d]={end:p.end,inputId:v,start:p.start}}else a[d]=p}return h&&(a.inputs=[...u.keys()].map(d=>d.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}
vendor: 6,522 bytes, lines 24-25
24toString(l=i){l.stringify&&(l=l.stringify);let u="";return l(this,a=>{u+=a}),u}warn(l,u,a){let h={node:this};for(let f in a)h[f]=a[f];return l.warn(u,h)}get proxyOf(){return this}}return jc=s,s.default=s,jc}function zs(){if(dS)return Vc;dS=1;let e=Vs();class t extends e{constructor(n){n&&typeof n.value<"u"&&typeof n.value!="string"&&(n={...n,value:String(n.value)}),super(n),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Vc=t,t.default=t,Vc}function sO(){if(hS)return zc;hS=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return zc={nanoid:(n=21)=>{let i="",o=n;for(;o--;)i+=e[Math.random()*64|0];return i},customAlphabet:(n,i=21)=>(o=i)=>{let s="",c=o;for(;c--;)s+=n[Math.random()*n.length|0];return s}},zc}function yE(){if(pS)return $c;pS=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=kt,{existsSync:r,readFileSync:n}=kt,{dirname:i,join:o}=kt;function s(l){return Buffer?Buffer.from(l,"base64").toString():window.atob(l)}class c{constructor(u,a){if(a.map===!1)return;this.loadAnnotation(u),this.inline=this.startWith(this.annotation,"data:");let h=a.map?a.map.prev:void 0,f=this.loadMap(a.from,h);!this.mapFile&&a.from&&(this.mapFile=a.from),this.mapFile&&(this.root=i(this.mapFile)),f&&(this.text=f)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(u){let a=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,f=/^data:application\/json;charset=utf-?8,/,d=/^data:application\/json,/;if(f.test(u)||d.test(u))return decodeURIComponent(u.substr(RegExp.lastMatch.length));if(a.test(u)||h.test(u))return s(u.substr(RegExp.lastMatch.length));let p=u.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+p)}getAnnotationURL(u){return u.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(u){return typeof u!="object"?!1:typeof u.mappings=="string"||typeof u._mappings=="string"||Array.isArray(u.sections)}loadAnnotation(u){let a=u.match(/\/\*\s*# sourceMappingURL=/gm);if(!a)return;let h=u.lastIndexOf(a.pop()),f=u.indexOf("*/",h);h>-1&&f>-1&&(this.annotation=this.getAnnotationURL(u.substring(h,f)))}loadFile(u){if(this.root=i(u),r(u))return this.mapFile=u,n(u,"utf-8").toString().trim()}loadMap(u,a){if(a===!1)return!1;if(a){if(typeof a=="string")return a;if(typeof a=="function"){let h=a(u);if(h){let f=this.loadFile(h);if(!f)throw new Error("Unable to load previous source map: "+h.toString());return f}}else{if(a instanceof e)return t.fromSourceMap(a).toString();if(a instanceof t)return a.toString();if(this.isMap(a))return JSON.stringify(a);throw new Error("Unsupported previous source map format: "+a.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return u&&(h=o(i(u),h)),this.loadFile(h)}}}startWith(u,a){return u?u.substr(0,a.length)===a:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return $c=c,c.default=c,$c}function $s(){if(vS)return Hc;vS=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=kt,{fileURLToPath:r,pathToFileURL:n}=kt,{isAbsolute:i,resolve:o}=kt,{nanoid:s}=sO(),c=kt,l=Jf(),u=yE(),a=Symbol("fromOffsetCache"),h=!!(e&&t),f=!!(o&&i);class d{constructor(v,g={}){if(v===null||typeof v>"u"||typeof v=="object"&&!v.toString)throw new Error(`PostCSS received ${v} instead of CSS string`);if(this.css=v.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,g.from&&(!f||/^\w+:\/\//.test(g.from)||i(g.from)?this.file=g.from:this.file=o(g.from)),f&&h){let y=new u(this.css,g);if(y.text){this.map=y;let m=y.consumer().file;!this.file&&m&&(this.file=this.mapResolve(m))}}this.file||(this.id="<input css "+s(6)+">"),this.map&&(this.map.file=this.from)}error(v,g,y,m={}){let E,w,b;if(g&&typeof g=="object"){let _=g,x=y;if(typeof _.offset=="number"){let I=this.fromOffset(_.offset);g=I.line,y=I.col}else g=_.line,y=_.column;if(typeof x.offset=="number"){let I=this.fromOffset(x.offset);w=I.line,b=I.col}else w=x.line,b=x.column}else if(!y){let _=this.fromOffset(g);g=_.line,y=_.col}let S=this.origin(g,y,w,b);return S?E=new l(v,S.endLine===void 0?S.line:{column:S.column,line:S.line},S.endLine===void 0?S.column:{column:S.endColumn,line:S.endLine},S.source,S.file,m.plugin):E=new l(v,w===void 0?g:{column:y,line:g},w===void 0?y:{column:b,line:w},this.css,this.file,m.plugin),E.input={column:y,endColumn:b,endLine:w,line:g,source:this.css},this.file&&(n&&(E.input.url=n(this.file).toString()),E.input.file=this.file),E}fromOffset(v){let g,y;if(this[a])y=this[a];else{let E=this.css.split(` 25`);y=new Array(E.length);let w=0;for(let b=0,S=E.length;b<S;b++)y[b]=w,w+=E[b].length+1;this[a]=y}g=y[y.length-1];let m=0;if(v>=g)m=y.length-1;else{let E=y.length-2,w;for(;m<E;)if(w=m+(E-m>>1),v<y[w])E=w-1;else if(v>=y[w+1])m=w+1;else{m=w;break}}return{col:v-y[m]+1,line:m+1}}mapResolve(v){return/^\w+:\/\//.test(v)?v:o(this.map.consumer().sourceRoot||this.map.root||".",v)}origin(v,g,y,m){if(!this.map)return!1;let E=this.map.consumer(),w=E.originalPositionFor({column:g,line:v});if(!w.source)return!1;let b;typeof y=="number"&&(b=E.originalPositionFor({column:m,line:y}));let S;i(w.source)?S=n(w.source):S=new URL(w.source,this.map.consumer().sourceRoot||n(this.map.mapFile));let _={column:w.column,endColumn:b&&b.column,endLine:b&&b.line,line:w.line,url:S.toString()};if(S.protocol==="file:")if(r)_.file=r(S);else throw new Error("file: protocol is not available in this PostCSS build");let x=E.sourceContentFor(w.source);return x&&(_.source=x),_}toJSON(){let v={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(v[g]=this[g]);return this.map&&(v.map={...this.map},v.map.consumerCache&&(v.map.consumerCache=void 0)),v}get from(){return this.file||this.id}}return Hc=d,d.default=d,c&&c.registerInput&&c.registerInput(d),Hc}function bE(){if(gS)return Kc;gS=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=kt,{dirname:r,relative:n,resolve:i,sep:o}=kt,{pathToFileURL:s}=kt,c=$s(),l=!!(e&&t),u=!!(r&&i&&n&&o);class a{constructor(f,d,p,v){this.stringify=f,this.mapOpts=p.map||{},this.root=d,this.opts=p,this.css=v,this.originalCSS=v,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let f;this.isInline()?f="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="str
25ing"?f=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?f=this.mapOpts.annotation(this.opts.to,this.root):f=this.outputFile()+".map";let d=` 26`;this.css.includes(`\r 27`)&&(d=`\r 28`),this.css+=d+"/*# sourceMappingURL="+f+" */"}applyPrevMaps(){for(let f of this.previous()){let d=this.toUrl(this.path(f.file)),p=f.root||r(f.file),v;this.mapOpts.sourcesContent===!1?(v=new e(f.text),v.sourcesContent&&(v.sourcesContent=null)):v=f.consumer(),this.map.applySourceMap(v,d,this.toUrl(this.path(p)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let f;for(let d=this.root.nodes.length-1;d>=0;d--)f=this.root.nodes[d],f.type==="comment"&&f.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(d)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&l&&this.isMap())return this.generateMap();{let f="";return this.stringify(this.root,d=>{f+=d}),[f]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let f=this.previous()[0].consumer();f.file=this.outputFile(),this.map=t.fromSourceMap(f,{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]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let f=1,d=1,p="<no source>",v={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,y;this.stringify(this.root,(m,E,w)=>{if(this.css+=m,E&&w!=="end"&&(v.generated.line=f,v.generated.column=d-1,E.source&&E.source.start?(v.source=this.sourcePath(E),v.original.line=E.source.start.line,v.original.column=E.source.start.column-1,this.map.addMapping(v)):(v.source=p,v.original.line=1,v.original.column=0,this.map.addMapping(v))),g=m.match(/\n/g),g?(f+=g.length,y=m.lastIndexOf(` 29`),d=m.length-y):d+=m.length,E&&w!=="start"){let b=E.parent||{raws:{}};(!(E.type==="decl"||E.type==="atrule"&&!E.nodes)||E!==b.last||b.raws.semicolon)&&(E.source&&E.source.end?(v.source=this.sourcePath(E),v.original.line=E.source.end.line,v.original.column=E.source.end.column-1,v.generated.line=f,v.generated.column=d-2,this.map.addMapping(v)):(v.source=p,v.original.line=1,v.original.column=0,v.generated.line=f,v.generated.column=d-1,this.map.addMapping(v)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(f=>f.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let f=this.mapOpts.annotation;return typeof f<"u"&&f!==!0?!1:this.previous().length?this.previous().some(d=>d.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(f=>f.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(f){if(this.mapOpts.absolute||f.charCodeAt(0)===60||/^\w+:\/\//.test(f))return f;let d=this.memoizedPaths.get(f);if(d)return d;let p=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=r(i(p,this.mapOpts.annotation)));let v=n(p,f);return this.memoizedPaths.set(f,v),v}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(f=>{if(f.source&&f.source.input.map){let d=f.source.input.map;this.previousMaps.includes(d)||this.previousMaps.push(d)}});else{let f=new c(this.originalCSS,this.opts);f.map&&this.previousMaps.push(f.map)}return this.previousMaps}setSourcesContent(){let f={};if(this.root)this.root.walk(d=>{if(d.source){let p=d.source.input.from;if(p&&!f[p]){f[p]=!0;let v=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(v,d.source.input.css)}}});else if(this.css){let d=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(d,this.css)}}sourcePath(f){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(f.source.input.from):this.toUrl(this.path(f.source.input.from))}toBase64(f){return Buffer?Buffer.from(f).toString("base64"):window.btoa(unescape(encodeURIComponent(f)))}toFileUrl(f){let d=this.memoizedFileURLs.get(f);if(d)return d;if(s){let p=s(f).toString();return this.memoizedFileURLs.set(f,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(f){let d=this.memoizedURLs.get(f);if(d)return d;o==="\\"&&(f=f.replace(/\\/g,"/"));let p=encodeURI(f).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(f,p),p}}return Kc=a,Kc}function Hs(){if(mS)return Xc;mS=1;let e=Vs();class t extends e{constructor(n){super(n),this.type="comment"}}return Xc=t,t.default=t,Xc}function kr(){if(yS)return Yc;yS=1;let{isClean:e,my:t}=Qf(),r=zs(),n=Hs(),i=Vs(),o,s,c,l;function u(f){return f.map(d=>(d.nodes&&(d.nodes=u(d.nodes)),delete d.source,d))}function a(f){if(f[e]=!1,f.proxyOf.nodes)for(let d of f.proxyOf.nodes)a(d)}class h extends i{append(...d){for(let p of d){let v=this.normalize(p,this.last);for(let g of v)this.proxyOf.nodes.push(g)}return this.markDirty(),this}
vendor: 4,830 bytes, line 29
29cleanRaws(d){if(super.cleanRaws(d),this.nodes)for(let p of this.nodes)p.cleanRaws(d)}each(d){if(!this.proxyOf.nodes)return;let p=this.getIterator(),v,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(v=this.indexes[p],g=d(this.proxyOf.nodes[v],v),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(d){return this.nodes.every(d)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let d=this.lastEach;return this.indexes[d]=0,d}getProxyProcessor(){return{get(d,p){return p==="proxyOf"?d:d[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...v)=>d[p](...v.map(g=>typeof g=="function"?(y,m)=>g(y.toProxy(),m):g)):p==="every"||p==="some"?v=>d[p]((g,...y)=>v(g.toProxy(),...y)):p==="root"?()=>d.root().toProxy():p==="nodes"?d.nodes.map(v=>v.toProxy()):p==="first"||p==="last"?d[p].toProxy():d[p]:d[p]},set(d,p,v){return d[p]===v||(d[p]=v,(p==="name"||p==="params"||p==="selector")&&d.markDirty()),!0}}}index(d){return typeof d=="number"?d:(d.proxyOf&&(d=d.proxyOf),this.proxyOf.nodes.indexOf(d))}insertAfter(d,p){let v=this.index(d),g=this.normalize(p,this.proxyOf.nodes[v]).reverse();v=this.index(d);for(let m of g)this.proxyOf.nodes.splice(v+1,0,m);let y;for(let m in this.indexes)y=this.indexes[m],v<y&&(this.indexes[m]=y+g.length);return this.markDirty(),this}insertBefore(d,p){let v=this.index(d),g=v===0?"prepend":!1,y=this.normalize(p,this.proxyOf.nodes[v],g).reverse();v=this.index(d);for(let E of y)this.proxyOf.nodes.splice(v,0,E);let m;for(let E in this.indexes)m=this.indexes[E],v<=m&&(this.indexes[E]=m+y.length);return this.markDirty(),this}normalize(d,p){if(typeof d=="string")d=u(o(d).nodes);else if(typeof d>"u")d=[];else if(Array.isArray(d)){d=d.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type==="root"&&this.type!=="document"){d=d.nodes.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type)d=[d];else if(d.prop){if(typeof d.value>"u")throw new Error("Value field is missed in node creation");typeof d.value!="string"&&(d.value=String(d.value)),d=[new r(d)]}else if(d.selector)d=[new s(d)];else if(d.name)d=[new c(d)];else if(d.text)d=[new n(d)];else throw new Error("Unknown node type in node creation");return d.map(g=>(g[t]||h.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&a(g),typeof g.raws.before>"u"&&p&&typeof p.raws.before<"u"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...d){d=d.reverse();for(let p of d){let v=this.normalize(p,this.first,"prepend").reverse();for(let g of v)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+v.length}return this.markDirty(),this}push(d){return d.parent=this,this.proxyOf.nodes.push(d),this}removeAll(){for(let d of this.proxyOf.nodes)d.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(d){d=this.index(d),this.proxyOf.nodes[d].parent=void 0,this.proxyOf.nodes.splice(d,1);let p;for(let v in this.indexes)p=this.indexes[v],p>=d&&(this.indexes[v]=p-1);return this.markDirty(),this}replaceValues(d,p,v){return v||(v=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(d,v))}),this.markDirty(),this}some(d){return this.nodes.some(d)}walk(d){return this.each((p,v)=>{let g;try{g=d(p,v)}catch(y){throw p.addToError(y)}return g!==!1&&p.walk&&(g=p.walk(d)),g})}walkAtRules(d,p){return p?d instanceof RegExp?this.walk((v,g)=>{if(v.type==="atrule"&&d.test(v.name))return p(v,g)}):this.walk((v,g)=>{if(v.type==="atrule"&&v.name===d)return p(v,g)}):(p=d,this.walk((v,g)=>{if(v.type==="atrule")return p(v,g)}))}walkComments(d){return this.walk((p,v)=>{if(p.type==="comment")return d(p,v)})}walkDecls(d,p){return p?d instanceof RegExp?this.walk((v,g)=>{if(v.type==="decl"&&d.test(v.prop))return p(v,g)}):this.walk((v,g)=>{if(v.type==="decl"&&v.prop===d)return p(v,g)}):(p=d,this.walk((v,g)=>{if(v.type==="decl")return p(v,g)}))}walkRules(d,p){return p?d instanceof RegExp?this.walk((v,g)=>{if(v.type==="rule"&&d.test(v.selector))return p(v,g)}):this.walk((v,g)=>{if(v.type==="rule"&&v.selector===d)return p(v,g)}):(p=d,this.walk((v,g)=>{if(v.type==="rule")return p(v,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=f=>{o=f},h.registerRule=f=>{s=f},h.registerAtRule=f=>{c=f},h.registerRoot=f=>{l=f},Yc=h,h.default=h,h.rebuild=f=>{f.type==="atrule"?Object.setPrototypeOf(f,c.prototype):f.type==="rule"?Object.setPrototypeOf(f,s.prototype):f.type==="decl"?Object.setPrototypeOf(f,r.prototype):f.type==="comment"?Object.setPrototypeOf(f,n.prototype):f.type==="root"&&Object.setPrototypeOf(f,l.prototype),f[t]=!0,f.nodes&&f.nodes.forEac
vendor: 15,315 bytes, lines 29-30
29h(d=>{h.rebuild(d)})},Yc}function Zf(){if(bS)return Jc;bS=1;let e=kr(),t,r;class n extends e{constructor(o){super({type:"document",...o}),this.nodes||(this.nodes=[])}toResult(o={}){return new t(new r,this,o).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},Jc=n,n.default=n,Jc}function SE(){if(SS)return Qc;SS=1;let e={};return Qc=function(r){e[r]||(e[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},Qc}function EE(){if(ES)return Zc;ES=1;class e{constructor(r,n={}){if(this.type="warning",this.text=r,n.node&&n.node.source){let i=n.node.rangeBy(n);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in n)this[i]=n[i]}toString(){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}}return Zc=e,e.default=e,Zc}function ed(){if(wS)return ef;wS=1;let e=EE();class t{constructor(n,i,o){this.processor=n,this.messages=[],this.root=i,this.opts=o,this.css=void 0,this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let o=new e(n,i);return this.messages.push(o),o}warnings(){return this.messages.filter(n=>n.type==="warning")}get content(){return this.css}}return ef=t,t.default=t,ef}function aO(){if(_S)return tf;_S=1;let e=39,t=34,r=92,n=47,i=10,o=32,s=12,c=9,l=13,u=91,a=93,h=40,f=41,d=123,p=125,v=59,g=42,y=58,m=64,E=/[\t\n\f\r "#'()/;[\\\]{}]/g,w=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,b=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return tf=function(x,I={}){let C=x.css.valueOf(),k=I.ignoreErrors,N,T,F,D,G,q,$,L,W,M,X=C.length,A=0,Q=[],J=[];function te(){return A}function se(re){throw x.error("Unclosed "+re,A)}function ce(){return J.length===0&&A>=X}function de(re){if(J.length)return J.pop();if(A>=X)return;let ae=re?re.ignoreUnclosed:!1;switch(N=C.charCodeAt(A),N){case i:case o:case c:case l:case s:{T=A;do T+=1,N=C.charCodeAt(T);while(N===o||N===i||N===c||N===l||N===s);M=["space",C.slice(A,T)],A=T-1;break}case u:case a:case d:case p:case y:case v:case f:{let fe=String.fromCharCode(N);M=[fe,fe,A];break}case h:{if(L=Q.length?Q.pop()[1]:"",W=C.charCodeAt(A+1),L==="url"&&W!==e&&W!==t&&W!==o&&W!==i&&W!==c&&W!==s&&W!==l){T=A;do{if(q=!1,T=C.indexOf(")",T+1),T===-1)if(k||ae){T=A;break}else se("bracket");for($=T;C.charCodeAt($-1)===r;)$-=1,q=!q}while(q);M=["brackets",C.slice(A,T+1),A,T],A=T}else T=C.indexOf(")",A+1),D=C.slice(A,T+1),T===-1||b.test(D)?M=["(","(",A]:(M=["brackets",D,A,T],A=T);break}case e:case t:{F=N===e?"'":'"',T=A;do{if(q=!1,T=C.indexOf(F,T+1),T===-1)if(k||ae){T=A+1;break}else se("string");for($=T;C.charCodeAt($-1)===r;)$-=1,q=!q}while(q);M=["string",C.slice(A,T+1),A,T],A=T;break}case m:{E.lastIndex=A+1,E.test(C),E.lastIndex===0?T=C.length-1:T=E.lastIndex-2,M=["at-word",C.slice(A,T+1),A,T],A=T;break}case r:{for(T=A,G=!0;C.charCodeAt(T+1)===r;)T+=1,G=!G;if(N=C.charCodeAt(T+1),G&&N!==n&&N!==o&&N!==i&&N!==c&&N!==l&&N!==s&&(T+=1,S.test(C.charAt(T)))){for(;S.test(C.charAt(T+1));)T+=1;C.charCodeAt(T+1)===o&&(T+=1)}M=["word",C.slice(A,T+1),A,T],A=T;break}default:{N===n&&C.charCodeAt(A+1)===g?(T=C.indexOf("*/",A+2)+1,T===0&&(k||ae?T=C.length:se("comment")),M=["comment",C.slice(A,T+1),A,T],A=T):(w.lastIndex=A+1,w.test(C),w.lastIndex===0?T=C.length-1:T=w.lastIndex-2,M=["word",C.slice(A,T+1),A,T],Q.push(M),A=T);break}}return A++,M}function V(re){J.push(re)}return{back:V,endOfFile:ce,nextToken:de,position:te}},tf}function td(){if(xS)return rf;xS=1;let e=kr();class t extends e{constructor(n){super(n),this.type="atrule"}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return rf=t,t.default=t,e.registerAtRule(t),rf}function Ci(){if(TS)return nf;TS=1;let e=kr(),t,r;class n extends e{constructor(o){super(o),this.type="root",this.nodes||(this.nodes=[])}normalize(o,s,c){let l=super.normalize(o);if(s){if(c==="prepend")this.nodes.length>1?s.raws.before=this.nodes[1].raws.before:delete s.raws.before;else if(this.first!==s)for(let u of l)u.raws.before=s.raws.before}return l}removeChild(o,s){let c=this.index(o);return!s&&c===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[c].raws.before),super.removeChild(o)}toResult(o={}){return new t(new r,this,o).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},nf=n,n.default=n,e.registerRoot(n),nf}function wE(){if(CS)return of;CS=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",` 30`," "];return e.split(t,r)},split(t,r,n){let i=[],o="",s=!1,c=0,l=!1,u="",a=!1;for(let h of t)a?a=!1:h==="\\"?a=!0:l?h===u&&(l=!1):h==='"'||h==="'"?(l=!0,u=h):h==="("?c+=1:h===")"?c>0&&(c-=1):c===0&&r.includes(h)&&(s=!0),s?(o!==""&&i.push(o.trim()),o="",s=!1):o+=h;return(n||o!=="")&&i.push(o.trim()),i}};return of=e,e.default=e,of}function rd(){if(IS)return sf;IS=1;let e=kr(),t=wE();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let o=this.selector?this.selector.match(/,\s*/):null,s=o?o[0]:","+this.raw("between","beforeOpen");this.selector=i.join(s)}}return sf=r,r.default=r,e.registerRule(r),sf}function lO(){if(AS)return af;AS=1;let e=zs(),t=aO(),r=Hs(),n=td(),i=Ci(),o=rd(),s={empty:!0,space:!0};function c(u){for(let a=u.length-1;a>=0;a--){let h=u[a],f=h[3]||h[2];if(f)return f}}class l{constructor(a){this.input=a,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:a,start:{column:1,line:1,offset:0}}}atrule(a){let h=new n;h.name=a[1].slice(1),h.name===""&&this.unnamedAtrule(h,a),this.init(h,a[2]);let f,d,p,v=!1,g=!1,y=[],m=[];for(;!this.tokenizer.endOfFile();){if(a=this.tokenizer.nextToken(),f=a[0],f==="("||f==="["?m.push(f==="("?")":"]"):f==="{"&&m.length>0?m.push("}"):f===m[m.length-1]&&m.pop(),m.length===0)if(f===";"){h.source.end=this.getPosition(a[2]),h.source.end.offset++,this.semicolon=!0;break}else if(f==="{"){g=!0;break}else if(f==="}"){if(y.length>0){for(p=y.length-1,d=y[p];d&&d[0]==="space";)d=y[--p];d&&(h.source.end=this.getPosition(d[3]||d[2]),h.source.end.offset++)}this.end(a);break}else y.push(a);else y.push(a);if(this.tokenizer.endOfFile()){v=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(h.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(h,"params",y),v&&(a=y[y.length-1],h.source.end=this.getPosition(a[3]||a[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),g&&(h.nodes=[],this.current=h)}checkMissedSemicolon(a){let h=this.colon(a);if(h===!1)return;let f=0,d;for(let p=h-1;p>=0&&(d=a[p],!(d[0]!=="space"&&(f+=1,f===2)));p--);throw this.input.error("Missed semicolon",d[0]==="word"?d[3]+1:d[2])}colon(a){let h=0,f,d,p;for(let[v,g]of a.entries()){if(f=g,d=f[0],d==="("&&(h+=1),d===")"&&(h-=1),h===0&&d===":")if(!p)this.doubleColon(f);else{if(p[0]==="word"&&p[1]==="progid")continue;return v}p=f}return!1}comment(a){let h=new r;this.init(h,a[2]),h.source.end=this.getPosition(a[3]||a[2]),h.source.end.offset++;let f=a[1].slice(2,-2);if(/^\s*$/.test(f))h.text="",h.raws.left=f,h.raws.right="";else{let d=f.match(/^(\s*)([^]*\S)(\s*)$/);h.text=d[2],h.raws.left=d[1],h.raws.right=d[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(a,h){let f=new e;this.init(f,a[0][2]);let d=a[a.length-1];for(d[0]===";"&&(this.semicolon=!0,a.pop()),f.source.end=this.getPosition(d[3]||d[2]||c(a)),f.source.end.offset++;a[0][0]!=="word";)a.length===1&&this.unknownWord(a),f.raws.before+=a.shift()[1];for(f.source.start=this.getPosition(a[0][2]),f.prop="";a.length;){let m=a[0][0];if(m===":"||m==="space"||m==="comment")break;f.prop+=a.shift()[1]}f.raws.between="";let p;for(;a.length;)if(p=a.shift(),p[0]===":"){f.raws.between+=p[1];break}else p[0]==="word"&&/\w/.test(p[1])&&this.unknownWord([p]),f.raws.between+=p[1];(f.prop[0]==="_"||f.prop[0]==="*")&&(f.raws.before+=f.prop[0],f.prop=f.prop.slice(1));let v=[],g;for(;a.length&&(g=a[0][0],!(g!=="space"&&g!=="comment"));)v.push(a.shift());this.precheckMissedSemicolon(a);for(let m=a.length-1;m>=0;m--){if(p=a[m],p[1].toLowerCase()==="!important"){f.important=!0;let E=this.stringFrom(a,m);E=this.spacesFromEnd(a)+E,E!==" !important"&&(f.raws.important=E);break}else if(p[1].toLowerCase()==="important"){let E=a.slice(0),w="";for(let b=m;b>0;b--){let S=E[b][0];if(w.trim().indexOf("!")===0&&S!=="space")break;w=E.pop()[1]+w}w.trim().indexOf("!")===0&&(f.important=!0,f.raws.important=w,a=E)}if(p[0]!=="space"&&p[0]!=="comment")break}a.some(m=>m[0]!=="space"&&m[0]!=="comment")&&(f.raws.between+=v.map(m=>m[1]).join(""),v=[]),this.raw(f,"value",v.concat(a),h),f.value.includes(":")&&!h&&this.checkMissedSemicolon(a)}doubleColon(a){throw this.input.error("Double colon",{offset:a[2]},{offset:a[2]+a[1].length})}emptyRule(a){let h=new o;this.init(h,a[2]),h.selector="",h.raws.between="",this.current=h}end(a){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(a[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(a)}endFile(){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())}freeSemicolon(a){if(this.spaces+=a[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(a){let h=this.input.fromOffset(a);return{column:h.col,line:h.line,offset:a}}init(a,h){this.current.push(a),a.source={input:this.input,start:this.getPosition(h)},a.raws.before=this.spaces,this.spaces="",a.type!=="comment"&&(this.semicolon=!1)}other(a){let h=!1,f=null,d=!1,p=null,v=[],g=a[1].startsWith("--"),y=[],m=a;for(;m;){if(f=m[0],y.push(m),f==="("||f==="[")p||(p=m),v.push(f==="("?")":"]");else if(g&&d&&f==="{")p||(p=m),v.push("}");else if(v.length===0)if(f===";")if(d){this.decl(y,g);return}else break;else if(f==="{"){this.rule(y);return}else if(f==="}"){this.tokenizer.back(y.pop()),h=!0;break}else f===":"&&(d=!0);else f===v[v.length-1]&&(v.pop(),v.length===0&&(p=null));m=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),v.length>0&&this.unclosedBracket(p),h&&d){if(!g)for(;y.length&&(m=y[y.length-1][0],!(m!=="space"&&m!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,g)}else this.unknownWord(y)}parse(){let a;for(;!this.tokenizer.endOfFile();)switch(a=this.tokenizer.nextToken(),a[0]){case"space":this.spaces+=a[1];break;case";":this.freeSemicolon(a);break;case"}":this.end(a);break;case"comment":this.comment(a);break;case"at-word":this.atrule(a);break;case"{":this.emptyRule(a);break;default:this.other(a);break}this.endFile()}precheckMissedSemicolon(){}raw(a,h,f,d){let p,v,g=f.length,y="",m=!0,E,w;for(let b=0;b<g;b+=1)p=f[b],v=p[0],v==="space"&&b===g-1&&!d?m=!1:v==="comment"?(w=f[b-1]?f[b-1][0]:"empty",E=f[b+1]?f[b+1][0]:"empty",!s[w]&&!s[E]?y.slice(-1)===","?m=!1:y+=p[1]:m=!1):y+=p[1];if(!m){let b=f.reduce((S,_)=>S+_[1],"");a.raws[h]={raw:b,value:y}}a[h]=y}rule(a){a.pop();let h=new o;this.init(h,a[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(a),this.raw(h,"selector",a),this.current=h}spacesAndCommentsFromEnd(a){let h,f="";for(;a.length&&(h=a[a.length-1][0],!(h!=="space"&&h!=="comment"));)f=a.pop()[1]+f;return f}spacesAndCommentsFromStart(a){let h,f="";for(;a.length&&(h=a[0][0],!(h!=="space"&&h!=="comment"));)f+=a.shift()[1];return f}spacesFromEnd(a){let h,f="";for(;a.length&&(h=a[a.length-1][0],h==="space");)f=a.pop()[1]+f;return f}stringFrom(a,h){let f="";for(let d=h;d<a.length;d++)f+=a[d][1];return a.splice(h,a.length-h),f}unclosedBlock(){let a=this.current.source.start;throw this.input.error("Unclosed block",a.line,a.column)}unclosedBracket(a){throw this.input.error("Unclosed bracket",{offset:a[2]},{offset:a[2]+1})}unexpectedClose(a){throw this.input.error("Unexpected }",{offset:a[2]},{offset:a[2]+1})}unknownWord(a){throw this.input.error("Unknown word",{offset:a[0][2]},{offset:a[0][2]+a[0][1].length})}unnamedAtrule(a,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return af=l,af}function nd(){if(RS)return lf;RS=1;let e=kr(),t=lO(),r=$s();function n(i,o){let s=new r(i,o),c=new t(s);try{c.parse()}catch(l){throw l}return c.root}return lf=n,n.default=n,e.registerParse(n),lf}function _E(){if(OS)return uf;OS=1;let{isClean:e,my:t}=Qf(),r=bE(),n=js(),i=kr(),o=Zf(),s=SE(),c=ed(),l=nd(),u=Ci(),a={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},f={Once:!0,postcssPlugin:!0,prepare:!0},d=0;function p(w){return typeof w=="object"&&typeof w.then=="function"}function v(w){let b=!1,S=a[w.type];return w.type==="decl"?b=w.prop.toLowerCase():w.type==="atrule"&&(b=w.name.toLowerCase()),b&&w.append?[S,S+"-"+b,d,S+"Exit",S+"Exit-"+b]:b?[S,S+"-"+b,S+"Exit",S+"Exit-"+b]:w.append?[S,d,S+"Exit"]:[S,S+"Exit"]}function g(w){let b;return w.type==="document"?b=["Document",d,"DocumentExit"]:w.type==="root"?b=["Root",d,"RootExit"]:b=v(w),{eventIndex:0,events:b,iterator:0,node:w,visitorIndex:0,visitors:[]}}function y(w){return w[e]=!1,w.nodes&&w.nodes.forEach(b=>y(b)),w}let m={};class E{constructor(b,S,_){this.stringified=!1,this.processed=!1;let x;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))x=y(S);else if(S instanceof E||S instanceof c)x=y(S.root),S.map&&(typeof _.map>"u"&&(_.map={}),_.map.inline||(_.map.inline=!1),_.map.prev=S.map);else{let I=l;_.syntax&&(I=_.syntax.parse),_.parser&&(I=_.parser),I.parse&&(I=I.parse);try{x=I(S,_)}catch(C){this.processed=!0,this.error=C}x&&!x[t]&&i.rebuild(x)}this.result=new c(b,x,_),this.helpers={...m,postcss:m,result:this.result},this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?{...I,...I.prepare(this.result)}:I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(b){return this.async().catch(b)}finally(b){return this.async().then(b,b)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(b,S){let _=this.result.lastPlugin;try{S&&S.addToError(b),this.error=b,b.name==="CssSyntaxError"&&!b.plugin?(b.plugin=_.postcssPlugin,b.setMessage()):_.postcssVersion}catch(x){console&&console.error&&console.error(x)}return b}prepareVisitors(){this.listeners={};let b=(S,_,x)=>{this.listeners[_]||(this.listeners[_]=[]),this.listeners[_].push([S,x])};for(let S of this.plugins)if(typeof S=="object")for(let _ in S){if(!h[_]&&/^[A-Z]/.test(_))throw new Error(`Unknown event ${_} in ${S.postcssPlugin}
30. Try to update PostCSS (${this.processor.version} now).`);if(!f[_])if(typeof S[_]=="object")for(let x in S[_])x==="*"?b(S,_,S[_][x]):b(S,_+"-"+x.toLowerCase(),S[_][x]);else typeof S[_]=="function"&&b(S,_,S[_])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let b=0;b<this.plugins.length;b++){let S=this.plugins[b],_=this.runOnRoot(S);if(p(_))try{await _}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[e];){b[e]=!0;let S=[g(b)];for(;S.length>0;){let _=this.visitTick(S);if(p(_))try{await _}catch(x){let I=S[S.length-1].node;throw this.handleError(x,I)}}}if(this.listeners.OnceExit)for(let[S,_]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(b.type==="document"){let x=b.nodes.map(I=>_(I,this.helpers));await Promise.all(x)}else await _(b,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(b){this.result.lastPlugin=b;try{if(typeof b=="object"&&b.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(_=>b.Once(_,this.helpers));return p(S[0])?Promise.all(S):S}return b.Once(this.result.root,this.helpers)}else if(typeof b=="function")return b(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let b=this.result.opts,S=n;b.syntax&&(S=b.syntax.stringify),b.stringifier&&(S=b.stringifier),S.stringify&&(S=S.stringify);let x=new r(S,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let b of this.plugins){let S=this.runOnRoot(b);if(p(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[e];)b[e]=!0,this.walkSync(b);if(this.listeners.OnceExit)if(b.type==="document")for(let S of b.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,b)}return this.result}then(b,S){return this.async().then(b,S)}toString(){return this.css}visitSync(b,S){for(let[_,x]of b){this.result.lastPlugin=_;let I;try{I=x(S,this.helpers)}catch(C){throw this.handleError(C,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(p(I))throw this.getAsyncError()}}visitTick(b){let S=b[b.length-1],{node:_,visitors:x}=S;if(_.type!=="root"&&_.type!=="document"&&!_.parent){b.pop();return}if(x.length>0&&S.visitorIndex<x.length){let[C,k]=x[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===x.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=C;try{return k(_.toProxy(),this.helpers)}catch(N){throw this.handleError(N,_)}}if(S.iterator!==0){let C=S.iterator,k;for(;k=_.nodes[_.indexes[C]];)if(_.indexes[C]+=1,!k[e]){k[e]=!0,b.push(g(k));return}S.iterator=0,delete _.indexes[C]}let I=S.events;for(;S.eventIndex<I.length;){let C=I[S.eventIndex];if(S.eventIndex+=1,C===d){_.nodes&&_.nodes.length&&(_[e]=!0,S.iterator=_.getIterator());return}else if(this.listeners[C]){S.visitors=this.listeners[C];return}}b.pop()}walkSync(b){b[e]=!0;let S=v(b);for(let _ of S)if(_===d)b.nodes&&b.each(x=>{x[e]||this.walkSync(x)});else{let x=this.listeners[_];if(x&&this.visitSync(x,b.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return E.registerPostcss=w=>{m=w},uf=E,E.default=E,u.registerLazyResult(E),o.registerLazyResult(E),uf}function uO(){if(PS)return cf;PS=1;let e=bE(),t=js(),r=SE(),n=nd(),i=ed();class o{constructor(c,l,u){l=l.toString(),this.stringified=!1,this._processor=c,this._css=l,this._opts=u,this._map=void 0;let a,h=t;this.result=new i(this._processor,a,this._opts),this.result.css=l;let f=this;Object.defineProperty(this.result,"root",{get(){return f.root}});let d=new e(h,a,this._opts,l);if(d.isMap()){let[p,v]=d.generate();p&&(this.result.css=p),v&&(this.result.map=v)}else d.clearAnnotation(),this.result.css=d.css}
vendor: 6,021 bytes, lines 30-42
30async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(c){return this.async().catch(c)}finally(c){return this.async().then(c,c)}sync(){if(this.error)throw this.error;return this.result}then(c,l){return this.async().then(c,l)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let c,l=n;try{c=l(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=c,c}get[Symbol.toStringTag](){return"NoWorkResult"}}return cf=o,o.default=o,cf}function cO(){if(kS)return ff;kS=1;let e=uO(),t=_E(),r=Zf(),n=Ci();class i{constructor(s=[]){this.version="8.4.38",this.plugins=this.normalize(s)}normalize(s){let c=[];for(let l of s)if(l.postcss===!0?l=l():l.postcss&&(l=l.postcss),typeof l=="object"&&Array.isArray(l.plugins))c=c.concat(l.plugins);else if(typeof l=="object"&&l.postcssPlugin)c.push(l);else if(typeof l=="function")c.push(l);else if(!(typeof l=="object"&&(l.parse||l.stringify)))throw new Error(l+" is not a PostCSS plugin");return c}process(s,c={}){return!this.plugins.length&&!c.parser&&!c.stringifier&&!c.syntax?new e(this,s,c):new t(this,s,c)}use(s){return this.plugins=this.plugins.concat(this.normalize([s])),this}}return ff=i,i.default=i,n.registerProcessor(i),r.registerProcessor(i),ff}function fO(){if(NS)return df;NS=1;let e=zs(),t=yE(),r=Hs(),n=td(),i=$s(),o=Ci(),s=rd();function c(l,u){if(Array.isArray(l))return l.map(f=>c(f));let{inputs:a,...h}=l;if(a){u=[];for(let f of a){let d={...f,__proto__:i.prototype};d.map&&(d.map={...d.map,__proto__:t.prototype}),u.push(d)}}if(h.nodes&&(h.nodes=l.nodes.map(f=>c(f,u))),h.source){let{inputId:f,...d}=h.source;h.source=d,f!=null&&(h.source.input=u[f])}if(h.type==="root")return new o(h);if(h.type==="decl")return new e(h);if(h.type==="rule")return new s(h);if(h.type==="comment")return new r(h);if(h.type==="atrule")return new n(h);throw new Error("Unknown node type: "+l.type)}return df=c,c.default=c,df}function dO(){if(MS)return hf;MS=1;let e=Jf(),t=zs(),r=_E(),n=kr(),i=cO(),o=js(),s=fO(),c=Zf(),l=EE(),u=Hs(),a=td(),h=ed(),f=$s(),d=nd(),p=wE(),v=rd(),g=Ci(),y=Vs();function m(...E){return E.length===1&&Array.isArray(E[0])&&(E=E[0]),new i(E)}return m.plugin=function(w,b){let S=!1;function _(...I){console&&console.warn&&!S&&(S=!0,console.warn(w+`: postcss.plugin was deprecated. Migration guide: 31https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(w+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357: 32https://www.w3ctech.com/topic/2226`));let C=b(...I);return C.postcssPlugin=w,C.postcssVersion=new i().version,C}let x;return Object.defineProperty(_,"postcss",{get(){return x||(x=_()),x}}),_.process=function(I,C,k){return m([_(k)]).process(I,C)},_},m.stringify=o,m.parse=d,m.fromJSON=s,m.list=p,m.comment=E=>new u(E),m.atRule=E=>new a(E),m.decl=E=>new t(E),m.rule=E=>new v(E),m.root=E=>new g(E),m.document=E=>new c(E),m.CssSyntaxError=e,m.Declaration=t,m.Container=n,m.Processor=i,m.Document=c,m.Comment=u,m.Warning=l,m.AtRule=a,m.Result=h,m.Input=f,m.Rule=v,m.Root=g,m.Node=y,r.registerPostcss(m),hf=m,m.default=m,hf}function gO(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function mO(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}function yO(){if(LS)return Bs.exports;LS=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 Bs.exports=t(),Bs.exports.createColors=t,Bs.exports}function id(){if(DS)return pf;DS=1;let e=yO(),t=Nt;class r extends Error{constructor(i,o,s,c,l,u){super(i),this.name="CssSyntaxError",this.reason=i,l&&(this.file=l),c&&(this.source=c),u&&(this.plugin=u),typeof o<"u"&&typeof s<"u"&&(typeof o=="number"?(this.line=o,this.column=s):(this.line=o.line,this.column=o.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let o=this.source;i==null&&(i=e.isColorSupported),t&&i&&(o=t(o));let s=o.split(/\r?\n/),c=Math.max(this.line-3,0),l=Math.min(this.line+2,s.length),u=String(l).length,a,h;if(i){let{bold:f,gray:d,red:p}=e.createColors(!0);a=v=>f(p(v)),h=v=>d(v)}else a=h=f=>f;return s.slice(c,l).map((f,d)=>{let p=c+1+d,v=" "+(" "+p).slice(-u)+" | ";if(p===this.line){let g=h(v.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+h(v)+f+` 33 `+g+a("^")}return" "+h(v)+f}).join(` 34`)}toString(){let i=this.showSourceCode();return i&&(i=` 35 36`+i+` 37`),this.name+": "+this.message+i}}return pf=r,r.default=r,pf}function od(){return US||(US=1,qs.isClean=Symbol("isClean"),qs.my=Symbol("my")),qs}function xE(){if(FS)return vf;FS=1;let e={after:` 38`,beforeClose:` 39`,beforeComment:` 40`,beforeDecl:` 41`,beforeOpen:" ",beforeRule:` 42`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(n){return n[0].toUpperCase()+n.slice(1)}
vendor: 7,929 bytes, lines 42-49
42class r{constructor(i){this.builder=i}atrule(i,o){let s="@"+i.name,c=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName<"u"?s+=i.raws.afterName:c&&(s+=" "),i.nodes)this.block(i,s+c);else{let l=(i.raws.between||"")+(o?";":"");this.builder(s+c+l,i)}}beforeAfter(i,o){let s;i.type==="decl"?s=this.raw(i,null,"beforeDecl"):i.type==="comment"?s=this.raw(i,null,"beforeComment"):o==="before"?s=this.raw(i,null,"beforeRule"):s=this.raw(i,null,"beforeClose");let c=i.parent,l=0;for(;c&&c.type!=="root";)l+=1,c=c.parent;if(s.includes(` 43`)){let u=this.raw(i,null,"indent");if(u.length)for(let a=0;a<l;a++)s+=u}return s}block(i,o){let s=this.raw(i,"between","beforeOpen");this.builder(o+s+"{",i,"start");let c;i.nodes&&i.nodes.length?(this.body(i),c=this.raw(i,"after")):c=this.raw(i,"after","emptyBody"),c&&this.builder(c),this.builder("}",i,"end")}body(i){let o=i.nodes.length-1;for(;o>0&&i.nodes[o].type==="comment";)o-=1;let s=this.raw(i,"semicolon");for(let c=0;c<i.nodes.length;c++){let l=i.nodes[c],u=this.raw(l,"before");u&&this.builder(u),this.stringify(l,o!==c||s)}}comment(i){let o=this.raw(i,"left","commentLeft"),s=this.raw(i,"right","commentRight");this.builder("/*"+o+i.text+s+"*/",i)}decl(i,o){let s=this.raw(i,"between","colon"),c=i.prop+s+this.rawValue(i,"value");i.important&&(c+=i.raws.important||" !important"),o&&(c+=";"),this.builder(c,i)}document(i){this.body(i)}raw(i,o,s){let c;if(s||(s=o),o&&(c=i.raws[o],typeof c<"u"))return c;let l=i.parent;if(s==="before"&&(!l||l.type==="root"&&l.first===i||l&&l.type==="document"))return"";if(!l)return e[s];let u=i.root();if(u.rawCache||(u.rawCache={}),typeof u.rawCache[s]<"u")return u.rawCache[s];if(s==="before"||s==="after")return this.beforeAfter(i,s);{let a="raw"+t(s);this[a]?c=this[a](u,i):u.walk(h=>{if(c=h.raws[o],typeof c<"u")return!1})}return typeof c>"u"&&(c=e[s]),u.rawCache[s]=c,c}rawBeforeClose(i){let o;return i.walk(s=>{if(s.nodes&&s.nodes.length>0&&typeof s.raws.after<"u")return o=s.raws.after,o.includes(` 44`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawBeforeComment(i,o){let s;return i.walkComments(c=>{if(typeof c.raws.before<"u")return s=c.raws.before,s.includes(` 45`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(o,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(i,o){let s;return i.walkDecls(c=>{if(typeof c.raws.before<"u")return s=c.raws.before,s.includes(` 46`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(o,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(i){let o;return i.walk(s=>{if(s.type!=="decl"&&(o=s.raws.between,typeof o<"u"))return!1}),o}rawBeforeRule(i){let o;return i.walk(s=>{if(s.nodes&&(s.parent!==i||i.first!==s)&&typeof s.raws.before<"u")return o=s.raws.before,o.includes(` 47`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawColon(i){let o;return i.walkDecls(s=>{if(typeof s.raws.between<"u")return o=s.raws.between.replace(/[^\s:]/g,""),!1}),o}rawEmptyBody(i){let o;return i.walk(s=>{if(s.nodes&&s.nodes.length===0&&(o=s.raws.after,typeof o<"u"))return!1}),o}rawIndent(i){if(i.raws.indent)return i.raws.indent;let o;return i.walk(s=>{let c=s.parent;if(c&&c!==i&&c.parent&&c.parent===i&&typeof s.raws.before<"u"){let l=s.raws.before.split(` 48`);return o=l[l.length-1],o=o.replace(/\S/g,""),!1}}),o}rawSemicolon(i){let o;return i.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(o=s.raws.semicolon,typeof o<"u"))return!1}),o}rawValue(i,o){let s=i[o],c=i.raws[o];return c&&c.value===s?c.raw:s}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,o){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,o)}}return vf=r,r.default=r,vf}function Ks(){if(BS)return gf;BS=1;let e=xE();function t(r,n){new e(n).stringify(r)}return gf=t,t.default=t,gf}function Xs(){if(qS)return mf;qS=1;let{isClean:e,my:t}=od(),r=id(),n=xE(),i=Ks();function o(c,l){let u=new c.constructor;for(let a in c){if(!Object.prototype.hasOwnProperty.call(c,a)||a==="proxyCache")continue;let h=c[a],f=typeof h;a==="parent"&&f==="object"?l&&(u[a]=l):a==="source"?u[a]=h:Array.isArray(h)?u[a]=h.map(d=>o(d,u)):(f==="object"&&h!==null&&(h=o(h)),u[a]=h)}return u}class s{constructor(l={}){this.raws={},this[e]=!1,this[t]=!0;for(let u in l)if(u==="nodes"){this.nodes=[];for(let a of l[u])typeof a.clone=="function"?this.append(a.clone()):this.append(a)}else this[u]=l[u]}addToError(l){if(l.postcssNode=this,l.stack&&this.source&&/\n\s{4}at /.test(l.stack)){let u=this.source;l.stack=l.stack.replace(/\n\s{4}at /,`$&${u.input.from}:${u.start.line}:${u.start.column}$&`)}return l}after(l){return this.parent.insertAfter(this,l),this}assign(l={}){for(let u in l)this[u]=l[u];return this}before(l){return this.parent.insertBefore(this,l),this}cleanRaws(l){delete this.raws.before,delete this.raws.after,l||delete this.raws.between}clone(l={}){let u=o(this);for(let a in l)u[a]=l[a];return u}cloneAfter(l={}){let u=this.clone(l);return this.parent.insertAfter(this,u),u}cloneBefore(l={}){let u=this.clone(l);return this.parent.insertBefore(this,u),u}error(l,u={}){if(this.source){let{end:a,start:h}=this.rangeBy(u);return this.source.input.error(l,{column:h.column,line:h.line},{column:a.column,line:a.line},u)}return new r(l)}getProxyProcessor(){return{get(l,u){return u==="proxyOf"?l:u==="root"?()=>l.root().toProxy():l[u]},set(l,u,a){return l[u]===a||(l[u]=a,(u==="prop"||u==="value"||u==="name"||u==="params"||u==="important"||u==="text")&&l.markDirty()),!0}}}markDirty(){if(this[e]){this[e]=!1;let l=this;for(;l=l.parent;)l[e]=!1}}next(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l+1]}positionBy(l,u){let a=this.source.start;if(l.index)a=this.positionInside(l.index,u);else if(l.word){u=this.toString();let h=u.indexOf(l.word);h!==-1&&(a=this.positionInside(h,u))}return a}positionInside(l,u){let a=u||this.toString(),h=this.source.start.column,f=this.source.start.line;for(let d=0;d<l;d++)a[d]===` 49`?(h=1,f+=1):h+=1;return{column:h,line:f}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l){let u={column:this.source.start.column,line:this.source.start.line},a=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:u.column+1,line:u.line};if(l.word){let h=this.toString(),f=h.indexOf(l.word);f!==-1&&(u=this.positionInside(f,h),a=this.positionInside(f+l.word.length,h))}else l.start?u={column:l.start.column,line:l.start.line}:l.index&&(u=this.positionInside(l.index)),l.end?a={column:l.end.column,line:l.end.line}:typeof l.endIndex=="number"?a=this.positionInside(l.endIndex):l.index&&(a=this.positionInside(l.index+1));return(a.line<u.line||a.line===u.line&&a.column<=u.column)&&(a={column:u.column+1,line:u.line}),{end:a,start:u}}raw(l,u){return new n().raw(this,l,u)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...l){if(this.parent){let u=this,a=!1;for(let h of l)h===this?a=!0:a?(this.parent.insertAfter(u,h),u=h):this.parent.insertBefore(u,h);a||this.remove()}return this}root(){let l=this;for(;l.parent&&l.parent.type!=="document";)l=l.parent;return l}toJSON(l,u){let a={},h=u==null;u=u||new Map;let f=0;for(let d in this){if(!Object.prototype.hasOwnProperty.call(this,d)||d==="parent"||d==="proxyCache")continue;let p=this[d];if(Array.isArray(p))a[d]=p.map(v=>typeof v=="object"&&v.toJSON?v.toJSON(null,u):v);else if(typeof p=="object"&&p.toJSON)a[d]=p.toJSON(null,u);else if(d==="source"){let v=u.get(p.input);v==null&&(v=f,u.set(p.input,f),f++),a[d]={end:p.end,inputId:v,start:p.start}}else a[d]=p}return h&&(a.inputs=[...u.keys()].map(d=>d.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}
vendor: 6,522 bytes, lines 49-50
49toString(l=i){l.stringify&&(l=l.stringify);let u="";return l(this,a=>{u+=a}),u}warn(l,u,a){let h={node:this};for(let f in a)h[f]=a[f];return l.warn(u,h)}get proxyOf(){return this}}return mf=s,s.default=s,mf}function Ys(){if(GS)return yf;GS=1;let e=Xs();class t extends e{constructor(n){n&&typeof n.value<"u"&&typeof n.value!="string"&&(n={...n,value:String(n.value)}),super(n),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return yf=t,t.default=t,yf}function EO(){if(WS)return bf;WS=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return bf={nanoid:(n=21)=>{let i="",o=n;for(;o--;)i+=e[Math.random()*64|0];return i},customAlphabet:(n,i=21)=>(o=i)=>{let s="",c=o;for(;c--;)s+=n[Math.random()*n.length|0];return s}},bf}function TE(){if(jS)return Sf;jS=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Nt,{existsSync:r,readFileSync:n}=Nt,{dirname:i,join:o}=Nt;function s(l){return Buffer?Buffer.from(l,"base64").toString():window.atob(l)}class c{constructor(u,a){if(a.map===!1)return;this.loadAnnotation(u),this.inline=this.startWith(this.annotation,"data:");let h=a.map?a.map.prev:void 0,f=this.loadMap(a.from,h);!this.mapFile&&a.from&&(this.mapFile=a.from),this.mapFile&&(this.root=i(this.mapFile)),f&&(this.text=f)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(u){let a=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,f=/^data:application\/json;charset=utf-?8,/,d=/^data:application\/json,/;if(f.test(u)||d.test(u))return decodeURIComponent(u.substr(RegExp.lastMatch.length));if(a.test(u)||h.test(u))return s(u.substr(RegExp.lastMatch.length));let p=u.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+p)}getAnnotationURL(u){return u.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(u){return typeof u!="object"?!1:typeof u.mappings=="string"||typeof u._mappings=="string"||Array.isArray(u.sections)}loadAnnotation(u){let a=u.match(/\/\*\s*# sourceMappingURL=/gm);if(!a)return;let h=u.lastIndexOf(a.pop()),f=u.indexOf("*/",h);h>-1&&f>-1&&(this.annotation=this.getAnnotationURL(u.substring(h,f)))}loadFile(u){if(this.root=i(u),r(u))return this.mapFile=u,n(u,"utf-8").toString().trim()}loadMap(u,a){if(a===!1)return!1;if(a){if(typeof a=="string")return a;if(typeof a=="function"){let h=a(u);if(h){let f=this.loadFile(h);if(!f)throw new Error("Unable to load previous source map: "+h.toString());return f}}else{if(a instanceof e)return t.fromSourceMap(a).toString();if(a instanceof t)return a.toString();if(this.isMap(a))return JSON.stringify(a);throw new Error("Unsupported previous source map format: "+a.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return u&&(h=o(i(u),h)),this.loadFile(h)}}}startWith(u,a){return u?u.substr(0,a.length)===a:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Sf=c,c.default=c,Sf}function Js(){if(VS)return Ef;VS=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Nt,{fileURLToPath:r,pathToFileURL:n}=Nt,{isAbsolute:i,resolve:o}=Nt,{nanoid:s}=EO(),c=Nt,l=id(),u=TE(),a=Symbol("fromOffsetCache"),h=!!(e&&t),f=!!(o&&i);class d{constructor(v,g={}){if(v===null||typeof v>"u"||typeof v=="object"&&!v.toString)throw new Error(`PostCSS received ${v} instead of CSS string`);if(this.css=v.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,g.from&&(!f||/^\w+:\/\//.test(g.from)||i(g.from)?this.file=g.from:this.file=o(g.from)),f&&h){let y=new u(this.css,g);if(y.text){this.map=y;let m=y.consumer().file;!this.file&&m&&(this.file=this.mapResolve(m))}}this.file||(this.id="<input css "+s(6)+">"),this.map&&(this.map.file=this.from)}error(v,g,y,m={}){let E,w,b;if(g&&typeof g=="object"){let _=g,x=y;if(typeof _.offset=="number"){let I=this.fromOffset(_.offset);g=I.line,y=I.col}else g=_.line,y=_.column;if(typeof x.offset=="number"){let I=this.fromOffset(x.offset);w=I.line,b=I.col}else w=x.line,b=x.column}else if(!y){let _=this.fromOffset(g);g=_.line,y=_.col}let S=this.origin(g,y,w,b);return S?E=new l(v,S.endLine===void 0?S.line:{column:S.column,line:S.line},S.endLine===void 0?S.column:{column:S.endColumn,line:S.endLine},S.source,S.file,m.plugin):E=new l(v,w===void 0?g:{column:y,line:g},w===void 0?y:{column:b,line:w},this.css,this.file,m.plugin),E.input={column:y,endColumn:b,endLine:w,line:g,source:this.css},this.file&&(n&&(E.input.url=n(this.file).toString()),E.input.file=this.file),E}fromOffset(v){let g,y;if(this[a])y=this[a];else{let E=this.css.split(` 50`);y=new Array(E.length);let w=0;for(let b=0,S=E.length;b<S;b++)y[b]=w,w+=E[b].length+1;this[a]=y}g=y[y.length-1];let m=0;if(v>=g)m=y.length-1;else{let E=y.length-2,w;for(;m<E;)if(w=m+(E-m>>1),v<y[w])E=w-1;else if(v>=y[w+1])m=w+1;else{m=w;break}}return{col:v-y[m]+1,line:m+1}}mapResolve(v){return/^\w+:\/\//.test(v)?v:o(this.map.consumer().sourceRoot||this.map.root||".",v)}origin(v,g,y,m){if(!this.map)return!1;let E=this.map.consumer(),w=E.originalPositionFor({column:g,line:v});if(!w.source)return!1;let b;typeof y=="number"&&(b=E.originalPositionFor({column:m,line:y}));let S;i(w.source)?S=n(w.source):S=new URL(w.source,this.map.consumer().sourceRoot||n(this.map.mapFile));let _={column:w.column,endColumn:b&&b.column,endLine:b&&b.line,line:w.line,url:S.toString()};if(S.protocol==="file:")if(r)_.file=r(S);else throw new Error("file: protocol is not available in this PostCSS build");let x=E.sourceContentFor(w.source);return x&&(_.source=x),_}toJSON(){let v={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(v[g]=this[g]);return this.map&&(v.map={...this.map},v.map.consumerCache&&(v.map.consumerCache=void 0)),v}get from(){return this.file||this.id}}return Ef=d,d.default=d,c&&c.registerInput&&c.registerInput(d),Ef}function CE(){if(zS)return wf;zS=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Nt,{dirname:r,relative:n,resolve:i,sep:o}=Nt,{pathToFileURL:s}=Nt,c=Js(),l=!!(e&&t),u=!!(r&&i&&n&&o);class a{constructor(f,d,p,v){this.stringify=f,this.mapOpts=p.map||{},this.root=d,this.opts=p,this.css=v,this.originalCSS=v,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let f;this.isInline()?f="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="str
50ing"?f=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?f=this.mapOpts.annotation(this.opts.to,this.root):f=this.outputFile()+".map";let d=` 51`;this.css.includes(`\r 52`)&&(d=`\r 53`),this.css+=d+"/*# sourceMappingURL="+f+" */"}applyPrevMaps(){for(let f of this.previous()){let d=this.toUrl(this.path(f.file)),p=f.root||r(f.file),v;this.mapOpts.sourcesContent===!1?(v=new e(f.text),v.sourcesContent&&(v.sourcesContent=null)):v=f.consumer(),this.map.applySourceMap(v,d,this.toUrl(this.path(p)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let f;for(let d=this.root.nodes.length-1;d>=0;d--)f=this.root.nodes[d],f.type==="comment"&&f.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(d)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&l&&this.isMap())return this.generateMap();{let f="";return this.stringify(this.root,d=>{f+=d}),[f]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let f=this.previous()[0].consumer();f.file=this.outputFile(),this.map=t.fromSourceMap(f,{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]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let f=1,d=1,p="<no source>",v={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,y;this.stringify(this.root,(m,E,w)=>{if(this.css+=m,E&&w!=="end"&&(v.generated.line=f,v.generated.column=d-1,E.source&&E.source.start?(v.source=this.sourcePath(E),v.original.line=E.source.start.line,v.original.column=E.source.start.column-1,this.map.addMapping(v)):(v.source=p,v.original.line=1,v.original.column=0,this.map.addMapping(v))),g=m.match(/\n/g),g?(f+=g.length,y=m.lastIndexOf(` 54`),d=m.length-y):d+=m.length,E&&w!=="start"){let b=E.parent||{raws:{}};(!(E.type==="decl"||E.type==="atrule"&&!E.nodes)||E!==b.last||b.raws.semicolon)&&(E.source&&E.source.end?(v.source=this.sourcePath(E),v.original.line=E.source.end.line,v.original.column=E.source.end.column-1,v.generated.line=f,v.generated.column=d-2,this.map.addMapping(v)):(v.source=p,v.original.line=1,v.original.column=0,v.generated.line=f,v.generated.column=d-1,this.map.addMapping(v)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(f=>f.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let f=this.mapOpts.annotation;return typeof f<"u"&&f!==!0?!1:this.previous().length?this.previous().some(d=>d.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(f=>f.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(f){if(this.mapOpts.absolute||f.charCodeAt(0)===60||/^\w+:\/\//.test(f))return f;let d=this.memoizedPaths.get(f);if(d)return d;let p=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=r(i(p,this.mapOpts.annotation)));let v=n(p,f);return this.memoizedPaths.set(f,v),v}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(f=>{if(f.source&&f.source.input.map){let d=f.source.input.map;this.previousMaps.includes(d)||this.previousMaps.push(d)}});else{let f=new c(this.originalCSS,this.opts);f.map&&this.previousMaps.push(f.map)}return this.previousMaps}setSourcesContent(){let f={};if(this.root)this.root.walk(d=>{if(d.source){let p=d.source.input.from;if(p&&!f[p]){f[p]=!0;let v=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(v,d.source.input.css)}}});else if(this.css){let d=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(d,this.css)}}sourcePath(f){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(f.source.input.from):this.toUrl(this.path(f.source.input.from))}toBase64(f){return Buffer?Buffer.from(f).toString("base64"):window.btoa(unescape(encodeURIComponent(f)))}toFileUrl(f){let d=this.memoizedFileURLs.get(f);if(d)return d;if(s){let p=s(f).toString();return this.memoizedFileURLs.set(f,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(f){let d=this.memoizedURLs.get(f);if(d)return d;o==="\\"&&(f=f.replace(/\\/g,"/"));let p=encodeURI(f).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(f,p),p}}return wf=a,wf}function Qs(){if($S)return _f;$S=1;let e=Xs();class t extends e{constructor(n){super(n),this.type="comment"}}return _f=t,t.default=t,_f}function Nr(){if(HS)return xf;HS=1;let{isClean:e,my:t}=od(),r=Ys(),n=Qs(),i=Xs(),o,s,c,l;function u(f){return f.map(d=>(d.nodes&&(d.nodes=u(d.nodes)),delete d.source,d))}function a(f){if(f[e]=!1,f.proxyOf.nodes)for(let d of f.proxyOf.nodes)a(d)}class h extends i{append(...d){for(let p of d){let v=this.normalize(p,this.last);for(let g of v)this.proxyOf.nodes.push(g)}return this.markDirty(),this}
vendor: 4,830 bytes, line 54
54cleanRaws(d){if(super.cleanRaws(d),this.nodes)for(let p of this.nodes)p.cleanRaws(d)}each(d){if(!this.proxyOf.nodes)return;let p=this.getIterator(),v,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(v=this.indexes[p],g=d(this.proxyOf.nodes[v],v),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(d){return this.nodes.every(d)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let d=this.lastEach;return this.indexes[d]=0,d}getProxyProcessor(){return{get(d,p){return p==="proxyOf"?d:d[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...v)=>d[p](...v.map(g=>typeof g=="function"?(y,m)=>g(y.toProxy(),m):g)):p==="every"||p==="some"?v=>d[p]((g,...y)=>v(g.toProxy(),...y)):p==="root"?()=>d.root().toProxy():p==="nodes"?d.nodes.map(v=>v.toProxy()):p==="first"||p==="last"?d[p].toProxy():d[p]:d[p]},set(d,p,v){return d[p]===v||(d[p]=v,(p==="name"||p==="params"||p==="selector")&&d.markDirty()),!0}}}index(d){return typeof d=="number"?d:(d.proxyOf&&(d=d.proxyOf),this.proxyOf.nodes.indexOf(d))}insertAfter(d,p){let v=this.index(d),g=this.normalize(p,this.proxyOf.nodes[v]).reverse();v=this.index(d);for(let m of g)this.proxyOf.nodes.splice(v+1,0,m);let y;for(let m in this.indexes)y=this.indexes[m],v<y&&(this.indexes[m]=y+g.length);return this.markDirty(),this}insertBefore(d,p){let v=this.index(d),g=v===0?"prepend":!1,y=this.normalize(p,this.proxyOf.nodes[v],g).reverse();v=this.index(d);for(let E of y)this.proxyOf.nodes.splice(v,0,E);let m;for(let E in this.indexes)m=this.indexes[E],v<=m&&(this.indexes[E]=m+y.length);return this.markDirty(),this}normalize(d,p){if(typeof d=="string")d=u(o(d).nodes);else if(typeof d>"u")d=[];else if(Array.isArray(d)){d=d.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type==="root"&&this.type!=="document"){d=d.nodes.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type)d=[d];else if(d.prop){if(typeof d.value>"u")throw new Error("Value field is missed in node creation");typeof d.value!="string"&&(d.value=String(d.value)),d=[new r(d)]}else if(d.selector)d=[new s(d)];else if(d.name)d=[new c(d)];else if(d.text)d=[new n(d)];else throw new Error("Unknown node type in node creation");return d.map(g=>(g[t]||h.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&a(g),typeof g.raws.before>"u"&&p&&typeof p.raws.before<"u"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...d){d=d.reverse();for(let p of d){let v=this.normalize(p,this.first,"prepend").reverse();for(let g of v)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+v.length}return this.markDirty(),this}push(d){return d.parent=this,this.proxyOf.nodes.push(d),this}removeAll(){for(let d of this.proxyOf.nodes)d.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(d){d=this.index(d),this.proxyOf.nodes[d].parent=void 0,this.proxyOf.nodes.splice(d,1);let p;for(let v in this.indexes)p=this.indexes[v],p>=d&&(this.indexes[v]=p-1);return this.markDirty(),this}replaceValues(d,p,v){return v||(v=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(d,v))}),this.markDirty(),this}some(d){return this.nodes.some(d)}walk(d){return this.each((p,v)=>{let g;try{g=d(p,v)}catch(y){throw p.addToError(y)}return g!==!1&&p.walk&&(g=p.walk(d)),g})}walkAtRules(d,p){return p?d instanceof RegExp?this.walk((v,g)=>{if(v.type==="atrule"&&d.test(v.name))return p(v,g)}):this.walk((v,g)=>{if(v.type==="atrule"&&v.name===d)return p(v,g)}):(p=d,this.walk((v,g)=>{if(v.type==="atrule")return p(v,g)}))}walkComments(d){return this.walk((p,v)=>{if(p.type==="comment")return d(p,v)})}walkDecls(d,p){return p?d instanceof RegExp?this.walk((v,g)=>{if(v.type==="decl"&&d.test(v.prop))return p(v,g)}):this.walk((v,g)=>{if(v.type==="decl"&&v.prop===d)return p(v,g)}):(p=d,this.walk((v,g)=>{if(v.type==="decl")return p(v,g)}))}walkRules(d,p){return p?d instanceof RegExp?this.walk((v,g)=>{if(v.type==="rule"&&d.test(v.selector))return p(v,g)}):this.walk((v,g)=>{if(v.type==="rule"&&v.selector===d)return p(v,g)}):(p=d,this.walk((v,g)=>{if(v.type==="rule")return p(v,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=f=>{o=f},h.registerRule=f=>{s=f},h.registerAtRule=f=>{c=f},h.registerRoot=f=>{l=f},xf=h,h.default=h,h.rebuild=f=>{f.type==="atrule"?Object.setPrototypeOf(f,c.prototype):f.type==="rule"?Object.setPrototypeOf(f,s.prototype):f.type==="decl"?Object.setPrototypeOf(f,r.prototype):f.type==="comment"?Object.setPrototypeOf(f,n.prototype):f.type==="root"&&Object.setPrototypeOf(f,l.prototype),f[t]=!0,f.nodes&&f.nodes.forEac
vendor: 15,315 bytes, lines 54-55
54h(d=>{h.rebuild(d)})},xf}function sd(){if(KS)return Tf;KS=1;let e=Nr(),t,r;class n extends e{constructor(o){super({type:"document",...o}),this.nodes||(this.nodes=[])}toResult(o={}){return new t(new r,this,o).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},Tf=n,n.default=n,Tf}function IE(){if(XS)return Cf;XS=1;let e={};return Cf=function(r){e[r]||(e[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},Cf}function AE(){if(YS)return If;YS=1;class e{constructor(r,n={}){if(this.type="warning",this.text=r,n.node&&n.node.source){let i=n.node.rangeBy(n);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in n)this[i]=n[i]}toString(){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}}return If=e,e.default=e,If}function ad(){if(JS)return Af;JS=1;let e=AE();class t{constructor(n,i,o){this.processor=n,this.messages=[],this.root=i,this.opts=o,this.css=void 0,this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let o=new e(n,i);return this.messages.push(o),o}warnings(){return this.messages.filter(n=>n.type==="warning")}get content(){return this.css}}return Af=t,t.default=t,Af}function wO(){if(QS)return Rf;QS=1;let e=39,t=34,r=92,n=47,i=10,o=32,s=12,c=9,l=13,u=91,a=93,h=40,f=41,d=123,p=125,v=59,g=42,y=58,m=64,E=/[\t\n\f\r "#'()/;[\\\]{}]/g,w=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,b=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return Rf=function(x,I={}){let C=x.css.valueOf(),k=I.ignoreErrors,N,T,F,D,G,q,$,L,W,M,X=C.length,A=0,Q=[],J=[];function te(){return A}function se(re){throw x.error("Unclosed "+re,A)}function ce(){return J.length===0&&A>=X}function de(re){if(J.length)return J.pop();if(A>=X)return;let ae=re?re.ignoreUnclosed:!1;switch(N=C.charCodeAt(A),N){case i:case o:case c:case l:case s:{T=A;do T+=1,N=C.charCodeAt(T);while(N===o||N===i||N===c||N===l||N===s);M=["space",C.slice(A,T)],A=T-1;break}case u:case a:case d:case p:case y:case v:case f:{let fe=String.fromCharCode(N);M=[fe,fe,A];break}case h:{if(L=Q.length?Q.pop()[1]:"",W=C.charCodeAt(A+1),L==="url"&&W!==e&&W!==t&&W!==o&&W!==i&&W!==c&&W!==s&&W!==l){T=A;do{if(q=!1,T=C.indexOf(")",T+1),T===-1)if(k||ae){T=A;break}else se("bracket");for($=T;C.charCodeAt($-1)===r;)$-=1,q=!q}while(q);M=["brackets",C.slice(A,T+1),A,T],A=T}else T=C.indexOf(")",A+1),D=C.slice(A,T+1),T===-1||b.test(D)?M=["(","(",A]:(M=["brackets",D,A,T],A=T);break}case e:case t:{F=N===e?"'":'"',T=A;do{if(q=!1,T=C.indexOf(F,T+1),T===-1)if(k||ae){T=A+1;break}else se("string");for($=T;C.charCodeAt($-1)===r;)$-=1,q=!q}while(q);M=["string",C.slice(A,T+1),A,T],A=T;break}case m:{E.lastIndex=A+1,E.test(C),E.lastIndex===0?T=C.length-1:T=E.lastIndex-2,M=["at-word",C.slice(A,T+1),A,T],A=T;break}case r:{for(T=A,G=!0;C.charCodeAt(T+1)===r;)T+=1,G=!G;if(N=C.charCodeAt(T+1),G&&N!==n&&N!==o&&N!==i&&N!==c&&N!==l&&N!==s&&(T+=1,S.test(C.charAt(T)))){for(;S.test(C.charAt(T+1));)T+=1;C.charCodeAt(T+1)===o&&(T+=1)}M=["word",C.slice(A,T+1),A,T],A=T;break}default:{N===n&&C.charCodeAt(A+1)===g?(T=C.indexOf("*/",A+2)+1,T===0&&(k||ae?T=C.length:se("comment")),M=["comment",C.slice(A,T+1),A,T],A=T):(w.lastIndex=A+1,w.test(C),w.lastIndex===0?T=C.length-1:T=w.lastIndex-2,M=["word",C.slice(A,T+1),A,T],Q.push(M),A=T);break}}return A++,M}function V(re){J.push(re)}return{back:V,endOfFile:ce,nextToken:de,position:te}},Rf}function ld(){if(ZS)return Of;ZS=1;let e=Nr();class t extends e{constructor(n){super(n),this.type="atrule"}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return Of=t,t.default=t,e.registerAtRule(t),Of}function Ii(){if(eE)return Pf;eE=1;let e=Nr(),t,r;class n extends e{constructor(o){super(o),this.type="root",this.nodes||(this.nodes=[])}normalize(o,s,c){let l=super.normalize(o);if(s){if(c==="prepend")this.nodes.length>1?s.raws.before=this.nodes[1].raws.before:delete s.raws.before;else if(this.first!==s)for(let u of l)u.raws.before=s.raws.before}return l}removeChild(o,s){let c=this.index(o);return!s&&c===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[c].raws.before),super.removeChild(o)}toResult(o={}){return new t(new r,this,o).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},Pf=n,n.default=n,e.registerRoot(n),Pf}function RE(){if(tE)return kf;tE=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",` 55`," "];return e.split(t,r)},split(t,r,n){let i=[],o="",s=!1,c=0,l=!1,u="",a=!1;for(let h of t)a?a=!1:h==="\\"?a=!0:l?h===u&&(l=!1):h==='"'||h==="'"?(l=!0,u=h):h==="("?c+=1:h===")"?c>0&&(c-=1):c===0&&r.includes(h)&&(s=!0),s?(o!==""&&i.push(o.trim()),o="",s=!1):o+=h;return(n||o!=="")&&i.push(o.trim()),i}};return kf=e,e.default=e,kf}function ud(){if(rE)return Nf;rE=1;let e=Nr(),t=RE();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let o=this.selector?this.selector.match(/,\s*/):null,s=o?o[0]:","+this.raw("between","beforeOpen");this.selector=i.join(s)}}return Nf=r,r.default=r,e.registerRule(r),Nf}function _O(){if(nE)return Mf;nE=1;let e=Ys(),t=wO(),r=Qs(),n=ld(),i=Ii(),o=ud(),s={empty:!0,space:!0};function c(u){for(let a=u.length-1;a>=0;a--){let h=u[a],f=h[3]||h[2];if(f)return f}}class l{constructor(a){this.input=a,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:a,start:{column:1,line:1,offset:0}}}atrule(a){let h=new n;h.name=a[1].slice(1),h.name===""&&this.unnamedAtrule(h,a),this.init(h,a[2]);let f,d,p,v=!1,g=!1,y=[],m=[];for(;!this.tokenizer.endOfFile();){if(a=this.tokenizer.nextToken(),f=a[0],f==="("||f==="["?m.push(f==="("?")":"]"):f==="{"&&m.length>0?m.push("}"):f===m[m.length-1]&&m.pop(),m.length===0)if(f===";"){h.source.end=this.getPosition(a[2]),h.source.end.offset++,this.semicolon=!0;break}else if(f==="{"){g=!0;break}else if(f==="}"){if(y.length>0){for(p=y.length-1,d=y[p];d&&d[0]==="space";)d=y[--p];d&&(h.source.end=this.getPosition(d[3]||d[2]),h.source.end.offset++)}this.end(a);break}else y.push(a);else y.push(a);if(this.tokenizer.endOfFile()){v=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(h.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(h,"params",y),v&&(a=y[y.length-1],h.source.end=this.getPosition(a[3]||a[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),g&&(h.nodes=[],this.current=h)}checkMissedSemicolon(a){let h=this.colon(a);if(h===!1)return;let f=0,d;for(let p=h-1;p>=0&&(d=a[p],!(d[0]!=="space"&&(f+=1,f===2)));p--);throw this.input.error("Missed semicolon",d[0]==="word"?d[3]+1:d[2])}colon(a){let h=0,f,d,p;for(let[v,g]of a.entries()){if(f=g,d=f[0],d==="("&&(h+=1),d===")"&&(h-=1),h===0&&d===":")if(!p)this.doubleColon(f);else{if(p[0]==="word"&&p[1]==="progid")continue;return v}p=f}return!1}comment(a){let h=new r;this.init(h,a[2]),h.source.end=this.getPosition(a[3]||a[2]),h.source.end.offset++;let f=a[1].slice(2,-2);if(/^\s*$/.test(f))h.text="",h.raws.left=f,h.raws.right="";else{let d=f.match(/^(\s*)([^]*\S)(\s*)$/);h.text=d[2],h.raws.left=d[1],h.raws.right=d[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(a,h){let f=new e;this.init(f,a[0][2]);let d=a[a.length-1];for(d[0]===";"&&(this.semicolon=!0,a.pop()),f.source.end=this.getPosition(d[3]||d[2]||c(a)),f.source.end.offset++;a[0][0]!=="word";)a.length===1&&this.unknownWord(a),f.raws.before+=a.shift()[1];for(f.source.start=this.getPosition(a[0][2]),f.prop="";a.length;){let m=a[0][0];if(m===":"||m==="space"||m==="comment")break;f.prop+=a.shift()[1]}f.raws.between="";let p;for(;a.length;)if(p=a.shift(),p[0]===":"){f.raws.between+=p[1];break}else p[0]==="word"&&/\w/.test(p[1])&&this.unknownWord([p]),f.raws.between+=p[1];(f.prop[0]==="_"||f.prop[0]==="*")&&(f.raws.before+=f.prop[0],f.prop=f.prop.slice(1));let v=[],g;for(;a.length&&(g=a[0][0],!(g!=="space"&&g!=="comment"));)v.push(a.shift());this.precheckMissedSemicolon(a);for(let m=a.length-1;m>=0;m--){if(p=a[m],p[1].toLowerCase()==="!important"){f.important=!0;let E=this.stringFrom(a,m);E=this.spacesFromEnd(a)+E,E!==" !important"&&(f.raws.important=E);break}else if(p[1].toLowerCase()==="important"){let E=a.slice(0),w="";for(let b=m;b>0;b--){let S=E[b][0];if(w.trim().indexOf("!")===0&&S!=="space")break;w=E.pop()[1]+w}w.trim().indexOf("!")===0&&(f.important=!0,f.raws.important=w,a=E)}if(p[0]!=="space"&&p[0]!=="comment")break}a.some(m=>m[0]!=="space"&&m[0]!=="comment")&&(f.raws.between+=v.map(m=>m[1]).join(""),v=[]),this.raw(f,"value",v.concat(a),h),f.value.includes(":")&&!h&&this.checkMissedSemicolon(a)}doubleColon(a){throw this.input.error("Double colon",{offset:a[2]},{offset:a[2]+a[1].length})}emptyRule(a){let h=new o;this.init(h,a[2]),h.selector="",h.raws.between="",this.current=h}end(a){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(a[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(a)}endFile(){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())}freeSemicolon(a){if(this.spaces+=a[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(a){let h=this.input.fromOffset(a);return{column:h.col,line:h.line,offset:a}}init(a,h){this.current.push(a),a.source={input:this.input,start:this.getPosition(h)},a.raws.before=this.spaces,this.spaces="",a.type!=="comment"&&(this.semicolon=!1)}other(a){let h=!1,f=null,d=!1,p=null,v=[],g=a[1].startsWith("--"),y=[],m=a;for(;m;){if(f=m[0],y.push(m),f==="("||f==="[")p||(p=m),v.push(f==="("?")":"]");else if(g&&d&&f==="{")p||(p=m),v.push("}");else if(v.length===0)if(f===";")if(d){this.decl(y,g);return}else break;else if(f==="{"){this.rule(y);return}else if(f==="}"){this.tokenizer.back(y.pop()),h=!0;break}else f===":"&&(d=!0);else f===v[v.length-1]&&(v.pop(),v.length===0&&(p=null));m=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),v.length>0&&this.unclosedBracket(p),h&&d){if(!g)for(;y.length&&(m=y[y.length-1][0],!(m!=="space"&&m!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,g)}else this.unknownWord(y)}parse(){let a;for(;!this.tokenizer.endOfFile();)switch(a=this.tokenizer.nextToken(),a[0]){case"space":this.spaces+=a[1];break;case";":this.freeSemicolon(a);break;case"}":this.end(a);break;case"comment":this.comment(a);break;case"at-word":this.atrule(a);break;case"{":this.emptyRule(a);break;default:this.other(a);break}this.endFile()}precheckMissedSemicolon(){}raw(a,h,f,d){let p,v,g=f.length,y="",m=!0,E,w;for(let b=0;b<g;b+=1)p=f[b],v=p[0],v==="space"&&b===g-1&&!d?m=!1:v==="comment"?(w=f[b-1]?f[b-1][0]:"empty",E=f[b+1]?f[b+1][0]:"empty",!s[w]&&!s[E]?y.slice(-1)===","?m=!1:y+=p[1]:m=!1):y+=p[1];if(!m){let b=f.reduce((S,_)=>S+_[1],"");a.raws[h]={raw:b,value:y}}a[h]=y}rule(a){a.pop();let h=new o;this.init(h,a[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(a),this.raw(h,"selector",a),this.current=h}spacesAndCommentsFromEnd(a){let h,f="";for(;a.length&&(h=a[a.length-1][0],!(h!=="space"&&h!=="comment"));)f=a.pop()[1]+f;return f}spacesAndCommentsFromStart(a){let h,f="";for(;a.length&&(h=a[0][0],!(h!=="space"&&h!=="comment"));)f+=a.shift()[1];return f}spacesFromEnd(a){let h,f="";for(;a.length&&(h=a[a.length-1][0],h==="space");)f=a.pop()[1]+f;return f}stringFrom(a,h){let f="";for(let d=h;d<a.length;d++)f+=a[d][1];return a.splice(h,a.length-h),f}unclosedBlock(){let a=this.current.source.start;throw this.input.error("Unclosed block",a.line,a.column)}unclosedBracket(a){throw this.input.error("Unclosed bracket",{offset:a[2]},{offset:a[2]+1})}unexpectedClose(a){throw this.input.error("Unexpected }",{offset:a[2]},{offset:a[2]+1})}unknownWord(a){throw this.input.error("Unknown word",{offset:a[0][2]},{offset:a[0][2]+a[0][1].length})}unnamedAtrule(a,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return Mf=l,Mf}function cd(){if(iE)return Lf;iE=1;let e=Nr(),t=_O(),r=Js();function n(i,o){let s=new r(i,o),c=new t(s);try{c.parse()}catch(l){throw l}return c.root}return Lf=n,n.default=n,e.registerParse(n),Lf}function OE(){if(oE)return Df;oE=1;let{isClean:e,my:t}=od(),r=CE(),n=Ks(),i=Nr(),o=sd(),s=IE(),c=ad(),l=cd(),u=Ii(),a={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},f={Once:!0,postcssPlugin:!0,prepare:!0},d=0;function p(w){return typeof w=="object"&&typeof w.then=="function"}function v(w){let b=!1,S=a[w.type];return w.type==="decl"?b=w.prop.toLowerCase():w.type==="atrule"&&(b=w.name.toLowerCase()),b&&w.append?[S,S+"-"+b,d,S+"Exit",S+"Exit-"+b]:b?[S,S+"-"+b,S+"Exit",S+"Exit-"+b]:w.append?[S,d,S+"Exit"]:[S,S+"Exit"]}function g(w){let b;return w.type==="document"?b=["Document",d,"DocumentExit"]:w.type==="root"?b=["Root",d,"RootExit"]:b=v(w),{eventIndex:0,events:b,iterator:0,node:w,visitorIndex:0,visitors:[]}}function y(w){return w[e]=!1,w.nodes&&w.nodes.forEach(b=>y(b)),w}let m={};class E{constructor(b,S,_){this.stringified=!1,this.processed=!1;let x;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))x=y(S);else if(S instanceof E||S instanceof c)x=y(S.root),S.map&&(typeof _.map>"u"&&(_.map={}),_.map.inline||(_.map.inline=!1),_.map.prev=S.map);else{let I=l;_.syntax&&(I=_.syntax.parse),_.parser&&(I=_.parser),I.parse&&(I=I.parse);try{x=I(S,_)}catch(C){this.processed=!0,this.error=C}x&&!x[t]&&i.rebuild(x)}this.result=new c(b,x,_),this.helpers={...m,postcss:m,result:this.result},this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?{...I,...I.prepare(this.result)}:I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(b){return this.async().catch(b)}finally(b){return this.async().then(b,b)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(b,S){let _=this.result.lastPlugin;try{S&&S.addToError(b),this.error=b,b.name==="CssSyntaxError"&&!b.plugin?(b.plugin=_.postcssPlugin,b.setMessage()):_.postcssVersion}catch(x){console&&console.error&&console.error(x)}return b}prepareVisitors(){this.listeners={};let b=(S,_,x)=>{this.listeners[_]||(this.listeners[_]=[]),this.listeners[_].push([S,x])};for(let S of this.plugins)if(typeof S=="object")for(let _ in S){if(!h[_]&&/^[A-Z]/.test(_))throw new Error(`Unknown event ${_} in ${S.postcssPlugin}
55. Try to update PostCSS (${this.processor.version} now).`);if(!f[_])if(typeof S[_]=="object")for(let x in S[_])x==="*"?b(S,_,S[_][x]):b(S,_+"-"+x.toLowerCase(),S[_][x]);else typeof S[_]=="function"&&b(S,_,S[_])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let b=0;b<this.plugins.length;b++){let S=this.plugins[b],_=this.runOnRoot(S);if(p(_))try{await _}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[e];){b[e]=!0;let S=[g(b)];for(;S.length>0;){let _=this.visitTick(S);if(p(_))try{await _}catch(x){let I=S[S.length-1].node;throw this.handleError(x,I)}}}if(this.listeners.OnceExit)for(let[S,_]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(b.type==="document"){let x=b.nodes.map(I=>_(I,this.helpers));await Promise.all(x)}else await _(b,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(b){this.result.lastPlugin=b;try{if(typeof b=="object"&&b.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(_=>b.Once(_,this.helpers));return p(S[0])?Promise.all(S):S}return b.Once(this.result.root,this.helpers)}else if(typeof b=="function")return b(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let b=this.result.opts,S=n;b.syntax&&(S=b.syntax.stringify),b.stringifier&&(S=b.stringifier),S.stringify&&(S=S.stringify);let x=new r(S,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let b of this.plugins){let S=this.runOnRoot(b);if(p(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[e];)b[e]=!0,this.walkSync(b);if(this.listeners.OnceExit)if(b.type==="document")for(let S of b.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,b)}return this.result}then(b,S){return this.async().then(b,S)}toString(){return this.css}visitSync(b,S){for(let[_,x]of b){this.result.lastPlugin=_;let I;try{I=x(S,this.helpers)}catch(C){throw this.handleError(C,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(p(I))throw this.getAsyncError()}}visitTick(b){let S=b[b.length-1],{node:_,visitors:x}=S;if(_.type!=="root"&&_.type!=="document"&&!_.parent){b.pop();return}if(x.length>0&&S.visitorIndex<x.length){let[C,k]=x[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===x.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=C;try{return k(_.toProxy(),this.helpers)}catch(N){throw this.handleError(N,_)}}if(S.iterator!==0){let C=S.iterator,k;for(;k=_.nodes[_.indexes[C]];)if(_.indexes[C]+=1,!k[e]){k[e]=!0,b.push(g(k));return}S.iterator=0,delete _.indexes[C]}let I=S.events;for(;S.eventIndex<I.length;){let C=I[S.eventIndex];if(S.eventIndex+=1,C===d){_.nodes&&_.nodes.length&&(_[e]=!0,S.iterator=_.getIterator());return}else if(this.listeners[C]){S.visitors=this.listeners[C];return}}b.pop()}walkSync(b){b[e]=!0;let S=v(b);for(let _ of S)if(_===d)b.nodes&&b.each(x=>{x[e]||this.walkSync(x)});else{let x=this.listeners[_];if(x&&this.visitSync(x,b.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return E.registerPostcss=w=>{m=w},Df=E,E.default=E,u.registerLazyResult(E),o.registerLazyResult(E),Df}function xO(){if(sE)return Uf;sE=1;let e=CE(),t=Ks(),r=IE(),n=cd(),i=ad();class o{constructor(c,l,u){l=l.toString(),this.stringified=!1,this._processor=c,this._css=l,this._opts=u,this._map=void 0;let a,h=t;this.result=new i(this._processor,a,this._opts),this.result.css=l;let f=this;Object.defineProperty(this.result,"root",{get(){return f.root}});let d=new e(h,a,this._opts,l);if(d.isMap()){let[p,v]=d.generate();p&&(this.result.css=p),v&&(this.result.map=v)}else d.clearAnnotation(),this.result.css=d.css}
vendor: 19,117 bytes, lines 55-60
55async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(c){return this.async().catch(c)}finally(c){return this.async().then(c,c)}sync(){if(this.error)throw this.error;return this.result}then(c,l){return this.async().then(c,l)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let c,l=n;try{c=l(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=c,c}get[Symbol.toStringTag](){return"NoWorkResult"}}return Uf=o,o.default=o,Uf}function TO(){if(aE)return Ff;aE=1;let e=xO(),t=OE(),r=sd(),n=Ii();class i{constructor(s=[]){this.version="8.4.38",this.plugins=this.normalize(s)}normalize(s){let c=[];for(let l of s)if(l.postcss===!0?l=l():l.postcss&&(l=l.postcss),typeof l=="object"&&Array.isArray(l.plugins))c=c.concat(l.plugins);else if(typeof l=="object"&&l.postcssPlugin)c.push(l);else if(typeof l=="function")c.push(l);else if(!(typeof l=="object"&&(l.parse||l.stringify)))throw new Error(l+" is not a PostCSS plugin");return c}process(s,c={}){return!this.plugins.length&&!c.parser&&!c.stringifier&&!c.syntax?new e(this,s,c):new t(this,s,c)}use(s){return this.plugins=this.plugins.concat(this.normalize([s])),this}}return Ff=i,i.default=i,n.registerProcessor(i),r.registerProcessor(i),Ff}function CO(){if(lE)return Bf;lE=1;let e=Ys(),t=TE(),r=Qs(),n=ld(),i=Js(),o=Ii(),s=ud();function c(l,u){if(Array.isArray(l))return l.map(f=>c(f));let{inputs:a,...h}=l;if(a){u=[];for(let f of a){let d={...f,__proto__:i.prototype};d.map&&(d.map={...d.map,__proto__:t.prototype}),u.push(d)}}if(h.nodes&&(h.nodes=l.nodes.map(f=>c(f,u))),h.source){let{inputId:f,...d}=h.source;h.source=d,f!=null&&(h.source.input=u[f])}if(h.type==="root")return new o(h);if(h.type==="decl")return new e(h);if(h.type==="rule")return new s(h);if(h.type==="comment")return new r(h);if(h.type==="atrule")return new n(h);throw new Error("Unknown node type: "+l.type)}return Bf=c,c.default=c,Bf}function IO(){if(uE)return qf;uE=1;let e=id(),t=Ys(),r=OE(),n=Nr(),i=TO(),o=Ks(),s=CO(),c=sd(),l=AE(),u=Qs(),a=ld(),h=ad(),f=Js(),d=cd(),p=RE(),v=ud(),g=Ii(),y=Xs();function m(...E){return E.length===1&&Array.isArray(E[0])&&(E=E[0]),new i(E)}return m.plugin=function(w,b){let S=!1;function _(...I){console&&console.warn&&!S&&(S=!0,console.warn(w+`: postcss.plugin was deprecated. Migration guide: 56https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(w+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357: 57https://www.w3ctech.com/topic/2226`));let C=b(...I);return C.postcssPlugin=w,C.postcssVersion=new i().version,C}let x;return Object.defineProperty(_,"postcss",{get(){return x||(x=_()),x}}),_.process=function(I,C,k){return m([_(k)]).process(I,C)},_},m.stringify=o,m.parse=d,m.fromJSON=s,m.list=p,m.comment=E=>new u(E),m.atRule=E=>new a(E),m.decl=E=>new t(E),m.rule=E=>new v(E),m.root=E=>new g(E),m.document=E=>new c(E),m.CssSyntaxError=e,m.Declaration=t,m.Container=n,m.Processor=i,m.Document=c,m.Comment=u,m.Warning=l,m.AtRule=a,m.Result=h,m.Input=f,m.Rule=v,m.Root=g,m.Node=y,r.registerPostcss(m),qf=m,m.default=m,qf}function RO(e){var t,r;let n=(r=(t=globalThis?.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(n&&globalThis[n])return globalThis[n]}function fd(e){if(Gs[e])return Gs[e];let t=RO(e)||globalThis[e],r=t.prototype,n=e in cE?cE[e]:void 0,i=!!(n&&n.every(c=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(r,c))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=e in fE?fE[e]:void 0,s=!!(o&&o.every(c=>{var l;return typeof r[c]=="function"&&((l=r[c])==null?void 0:l.toString().includes("[native code]"))}));if(i&&s)return Gs[e]=t.prototype,t.prototype;try{let c=document.createElement("iframe");document.body.appendChild(c);let l=c.contentWindow;if(!l)return t.prototype;let u=l[e].prototype;return document.body.removeChild(c),u?Gs[e]=u:r}catch{return r}}function cr(e,t,r){var n;let i=`${e}.${String(r)}`;if(Gf[i])return Gf[i].call(t);let o=fd(e),s=(n=Object.getOwnPropertyDescriptor(o,r))==null?void 0:n.get;return s?(Gf[i]=s,s.call(t)):t[r]}function PE(e,t,r){let n=`${e}.${String(r)}`;if(Wf[n])return Wf[n].bind(t);let o=fd(e)[r];return typeof o!="function"?t[r]:(Wf[n]=o,o.bind(t))}function OO(e){return cr("Node",e,"childNodes")}function PO(e){return cr("Node",e,"parentNode")}function kO(e){return cr("Node",e,"parentElement")}function NO(e){return cr("Node",e,"textContent")}function MO(e,t){return PE("Node",e,"contains")(t)}function LO(e){return PE("Node",e,"getRootNode")()}function DO(e){return!e||!("host"in e)?null:cr("ShadowRoot",e,"host")}function UO(e){return e.styleSheets}function FO(e){return!e||!("shadowRoot"in e)?null:cr("Element",e,"shadowRoot")}function BO(e,t){return cr("Element",e,"querySelector")(t)}function qO(e,t){return cr("Element",e,"querySelectorAll")(t)}function GO(){return fd("MutationObserver").constructor}function WO(e,t,r=document){let n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function jO(e,t,r={}){let n=null,i=0;return function(...o){let s=Date.now();!i&&r.leading===!1&&(i=s);let c=t-(s-i),l=this;c<=0||c>t?(n&&(clearTimeout(n),n=null),i=s,e.apply(l,o)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{i=r.leading===!1?0:Date.now(),n=null,e.apply(l,o)},c))}}function kE(e,t,r,n,i=window){let o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,n?r:{set(s){setTimeout(()=>{r.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>kE(e,t,o||{},!0)}function VO(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch{return()=>{}}}function zO(e){var t,r,n,i;let o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:o.documentElement.scrollLeft||o?.body&&((t=Ct.parentElement(o.body))==null?void 0:t.scrollLeft)||((r=o?.body)==null?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:o?.documentElement.scrollTop||o?.body&&((n=Ct.parentElement(o.body))==null?void 0:n.scrollTop)||((i=o?.body)==null?void 0:i.scrollTop)||0}}function $O(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function HO(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ME(e){return e?e.nodeType===e.ELEMENT_NODE?e:Ct.parentElement(e):null}function KO(e,t,r,n){if(!e)return!1;let i=ME(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||n&&i.closest("."+t)!==null)return!0}else if(zf(i,t,n))return!0}catch{}return!!(r&&(i.matches(r)||n&&i.closest(r)!==null))}function XO(e,t){return t.getId(e)!==-1}function YO(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===eO}function LE(e,t){if(QR(e))return!1;let r=t.getId(e);if(!t.has(r))return!0;let n=Ct.parentNode(e);return n&&n.nodeType===e.DOCUMENT_NODE?!1:n?LE(n,t):!0}function JO(e){return!!e.changedTouches}function QO(e=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)}function ZO(e){let t={},r=(i,o)=>{let s={value:i,parent:o,children:[]};return t[i.node.id]=s,s},n=[];for(let i of e){let{nextId:o,parentId:s}=i;if(o&&o in t){let c=t[o];if(c.parent){let l=c.parent.children.indexOf(c);c.parent.children.splice(l,0,r(i,c.parent))}else{let l=n.indexOf(c);n.splice(l,0,r(i,null))}continue}if(s in t){let c=t[s];c.children.push(r(i,c));continue}n.push(r(i,null))}return n}function DE(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)DE(e.children[r],t)}function eP(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function tP(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function UE(e,t){var r,n;let i=(n=(r=e.ownerDocument)==null?void 0:r.defaultView)==null?void 0:n.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};let o=i.getBoundingClientRect(),s=UE(i,t),c=o.height/i.clientHeight;return{x:o.x*s.relativeScale+s.x,y:o.y*s.relativeScale+s.y,relativeScale:c,absoluteScale:s.absoluteScale*c}}function rP(e){return e?e instanceof $f&&"shadowRoot"in e?!!e.shadowRoot:!!Ct.shadowRoot(e):!1}function FE(e,t){let r=e[t[0]];return t.length===1?r:FE(r.cssRules[t[1]].cssRules,t.slice(2))}function nP(e){let t=[...e],r=t.pop();return{positions:t,index:r}}function iP(e){let t=new Set,r=[];for(let n=e.length;n--;){let i=e[n];t.has(i.id)||(r.push(i),t.add(i.id))}return r}function BE(e){var t;let r=null;return"getRootNode"in e&&((t=Ct.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Ct.host(Ct.getRootNode(e))&&(r=Ct.host(Ct.getRootNode(e))),r}function qE(e){let t=e,r;for(;r=BE(t);)t=r;return t}function GE(e){let t=e.ownerDocument;if(!t)return!1;let r=qE(e);return Ct.contains(t,r)}function oP(e){let t=e.ownerDocument;return t?Ct.contains(t,e)||GE(e):!1}function fP(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let r=e.localName;if(!r)break;r=r.toLowerCase();let n=e.parentElement,i=[];if(n.children&&n.children.length>0)for(let o=0;o<n.children.length;o++){let s=n.children[o];s.localName&&s.localName.toLowerCase&&s.localName.toLowerCase()===r&&i.push(s)}i.length>1&&(r+=`:eq(${i.indexOf(e)})`),t=r+(t?">"+t:""),e=n}return t}function Xf(e){return Object.prototype.toString.call(e)==="[object Object]"}function WE(e,t){if(t===0)return!0;let r=Object.keys(e);for(let n of r)if(Xf(e[n])&&WE(e[n],t-1))return!0;return!1}function gn(e,t){let r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);let n=[],i=[];return JSON.stringify(e,function(c,l){if(n.length>0){let u=n.indexOf(this);~u?n.splice(u+1):n.push(this),~u?i.splice(u,1/0,c):i.push(c),~n.indexOf(l)&&(n[0]===l?l="[Circular ~]":l="[Circular ~."+i.slice(0,n.indexOf(l)).join(".")+"]")}else n.push(l);if(l===null)return l;if(l===void 0)return"undefined";if(o(l))return s(l);if(typeof l=="bigint")return l.toString()+"n";if(l instanceof Event){let u={};for(let a in l){let h=l[a];Array.isArray(h)?u[a]=fP(h.length?h[0]:null):u[a]=h}return u}else{if(l instanceof Node)return l instanceof HTMLElement?l?l.outerHTML:"":l.nodeName;if(l instanceof Error)return l.stack?l.stack+` 58End of stack for Error object`:l.name+": "+l.message}return l});function o(c){return!!(Xf(c)&&Object.keys(c).length>r.numOfKeysLimit||typeof c=="function"||Xf(c)&&WE(c,r.depthOfLimit))}function s(c){let l=c.toString();return r.stringLengthLimit&&l.length>r.stringLengthLimit&&(l=`${l.slice(0,r.stringLengthLimit)}...`),l}}function dP(e,t,r){let n=r?Object.assign({},vE,r):vE,i=n.logger;if(!i)return()=>{};let o;typeof i=="string"?o=t[i]:o=i;let s=0,c=!1,l=[];if(n.level.includes("error")){let a=f=>{let d=f.message,p=f.error,v=jf.parse(p).map(y=>y.toString()),g=[gn(d,n.stringifyOptions)];e({level:"error",trace:v,payload:g})};t.addEventListener("error",a),l.push(()=>{t.removeEventListener("error",a)});let h=f=>{let d,p;f.reason instanceof Error?(d=f.reason,p=[gn(`Uncaught (in promise) ${d.name}: ${d.message}`,n.stringifyOptions)]):(d=new Error,p=[gn("Uncaught (in promise)",n.stringifyOptions),gn(f.reason,n.stringifyOptions)]);let v=jf.parse(d).map(g=>g.toString());e({level:"error",trace:v,payload:p})};t.addEventListener("unhandledrejection",h),l.push(()=>{t.removeEventListener("unhandledrejection",h)})}for(let a of n.level)l.push(u(o,a));return()=>{l.forEach(a=>a())};function u(a,h){return a[h]?sP.patch(a,h,f=>(...d)=>{if(f.apply(this,d),!(h==="assert"&&d[0])&&!c){c=!0;try{let p=jf.parse(new Error).map(y=>y.toString()).splice(1),g=(h==="assert"?d.slice(1):d).map(y=>gn(y,n.stringifyOptions));s++,s<n.lengthThreshold?e({level:h,trace:p,payload:g}):s===n.lengthThreshold&&e({level:"warn",trace:[],payload:[gn("The number of log records reached the threshold.")]})}catch(p){f("rrweb logger error:",p,...d)}finally{c=!1}}}):()=>{}}}var NR,MR,Ls,LR,DR,Uc,rS,UR,FR,nS,iS,oS,Ds,Fc,Bc,Ws,Vf,eO,Us,sS,iO,oO,kt,qc,aS,Fs,lS,Gc,uS,Wc,cS,jc,fS,Vc,dS,zc,hS,$c,pS,Hc,vS,Kc,gS,Xc,mS,Yc,yS,Jc,bS,Qc,SS,Zc,ES,ef,wS,tf,_S,rf,xS,nf,TS,of,CS,sf,IS,af,AS,lf,RS,uf,OS,cf,PS,ff,kS,df,NS,hf,MS,hO,Ue,pO,vO,Tt,Bs,LS,bO,SO,Nt,pf,DS,qs,US,vf,FS,gf,BS,mf,qS,yf,GS,bf,WS,Sf,jS,Ef,VS,wf,zS,_f,$S,xf,HS,Tf,KS,Cf,XS,If,YS,Af,JS,Rf,QS,Of,ZS,Pf,eE,kf,tE,Nf,rE,Mf,nE,Lf,iE,Df,oE,Uf,sE,Ff,aE,Bf,lE,qf,uE,AO,Fe,$f,cE,fE,Gs,Gf,Wf,Ct,mn,Hf,NE,Kf,sP,dE,aP,Ti,lP,hE,lr,uP,pE,cP,jf,vE,jE,hP,zE=Y(()=>{NR=Object.defineProperty,MR=(e,t,r)=>t in e?NR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ls=(e,t,r)=>MR(e,typeof t!="symbol"?t+"":t,r),LR=Object.defineProperty,DR=(e,t,r)=>t in e?LR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Uc=(e,t,r)=>DR(e,typeof t!="symbol"?t+"":t,r),UR=Object.defineProperty,FR=(e,t,r)=>t in e?UR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nS=(e,t,r)=>FR(e,typeof t!="symbol"?t+"":t,r),iS={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},oS={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ds={};Fc={};Bc={};Ws={childNodes:qR,parentNode:GR,parentElement:WR,textContent:jR,contains:VR,getRootNode:zR,host:$R,styleSheets:HR,shadowRoot:KR,querySelector:XR,querySelectorAll:YR,mutationObserver:JR};Vf=class{constructor(){nS(this,"idNodeMap",new Map),nS(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){let n=this.getNode(t);if(n){let i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};eO=-2;Us={exports:{}};iO={},oO=Object.freeze(Object.defineProperty({__proto__:null,default:iO},Symbol.toStringTag,{value:"Module"})),kt=rO(oO);Fs={};hO=dO(),Ue=tO(hO);Ue.stringify;Ue.fromJSON;Ue.plugin;Ue.parse;Ue.list;Ue.document;Ue.comment;Ue.atRule;Ue.rule;Ue.decl;Ue.root;Ue.CssSyntaxError;Ue.Declaration;Ue.Container;Ue.Processor;Ue.Document;Ue.Comment;Ue.Warning;Ue.AtRule;Ue.Result;Ue.Input;Ue.Rule;Ue.Root;Ue.Node;pO=Object.defineProperty,vO=(e,t,r)=>t in e?pO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Tt=(e,t,r)=>vO(e,typeof t!="symbol"?t+"":t,r);Bs={exports:{}};bO={},SO=Object.freeze(Object.defineProperty({__proto__:null,default:bO},Symbol.toStringTag,{value:"Module"})),Nt=mO(SO);qs={};AO=IO(),Fe=gO(AO);Fe.stringify;Fe.fromJSON;Fe.plugin;Fe.parse;Fe.list;Fe.document;Fe.comment;Fe.atRule;Fe.rule;Fe.decl;Fe.root;Fe.CssSyntaxError;Fe.Declaration;Fe.Container;Fe.Processor;Fe.Document;Fe.Comment;Fe.Warning;Fe.AtRule;Fe.Result;Fe.Input;Fe.Rule;Fe.Root;Fe.Node;$f=class e{constructor(...t){Tt(this,"parentElement",null),Tt(this,"parentNode",null),Tt(this,"ownerDocument"),Tt(this,"firstChild",null),Tt(this,"lastChild",null),Tt(this,"previousSibling",null),Tt(this,"nextSibling",null),Tt(this,"ELEMENT_NODE",1),Tt(this,"TEXT_NODE",3),Tt(this,"nodeType"),Tt(this,"nodeName"),Tt(this,"RRNodeType")}get childNodes(){let t=[],r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof e){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},cE={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},fE={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Gs={};Gf={};Wf={};Ct={childNodes:OO,parentNode:PO,parentElement:kO,textContent:NO,contains:MO,getRootNode:LO,host:DO,styleSheets:UO,shadowRoot:FO,querySelector:BO,querySelectorAll:qO,mutationObserver:GO};mn=`Please stop import mirror directly. Instead of that,\r 59now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 60or you can use record.mirror to access the mirror instance during recording.`,Hf={map:{},getId(){return console.error(mn),-1},getNode(){return console.error(mn),null},removeNodeFromMap(){console.error(mn)},has(){return console.error(mn),!1},reset(){console.error(mn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Hf=new Proxy(Hf,{get(e,t,r){return t==="map"&&console.error(mn),Reflect.get(e,t,r)}}));NE=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(NE=()=>new Date().getTime());Kf=class{constructor(){Uc(this,"id",1),Uc(this,"styleIDMap",new WeakMap),Uc(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};sP=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Kf,get _mirror(){return Hf},closestElementOfNode:ME,getBaseDimension:UE,getNestedRule:FE,getPositionsAndIndex:nP,getRootShadowHost:qE,getShadowHost:BE,getWindowHeight:$O,getWindowScroll:zO,getWindowWidth:HO,hasShadowRoot:rP,hookSetter:kE,inDom:oP,isAncestorRemoved:LE,isBlocked:KO,isIgnored:YO,isSerialized:XO,isSerializedIframe:eP,isSerializedStylesheet:tP,iterateResolveTree:DE,legacy_isTouchEvent:JO,get nowTimestamp(){return NE},on:WO,patch:VO,polyfill:QO,queueToResolveTrees:ZO,shadowHostInDom:GE,throttle:jO,uniqueTextMutations:iP},Symbol.toStringTag,{value:"Module"})),dE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
60+/",aP=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Ti=0;Ti<dE.length;Ti++)aP[dE.charCodeAt(Ti)]=Ti;lP=`(function() { 61 "use strict"; 62 var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 63 var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256); 64 for (var i = 0; i < chars.length; i++) { 65 lookup[chars.charCodeAt(i)] = i; 66 } 67 var encode = function(arraybuffer) { 68 var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = ""; 69 for (i2 = 0; i2 < len; i2 += 3) { 70 base64 += chars[bytes[i2] >> 2]; 71 base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4]; 72 base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6]; 73 base64 += chars[bytes[i2 + 2] & 63]; 74 } 75 if (len % 3 === 2) { 76 base64 = base64.substring(0, base64.length - 1) + "="; 77 } else if (len % 3 === 1) { 78 base64 = base64.substring(0, base64.length - 2) + "=="; 79 } 80 return base64; 81 }; 82 const lastBlobMap = /* @__PURE__ */ new Map(); 83 const transparentBlobMap = /* @__PURE__ */ new Map(); 84 async function getTransparentBlobFor(width, height, dataURLOptions) { 85 const id = \`\${width}-\${height}\`; 86 if ("OffscreenCanvas" in globalThis) { 87 if (transparentBlobMap.has(id)) return transparentBlobMap.get(id); 88 const offscreen = new OffscreenCanvas(width, height); 89 offscreen.getContext("2d"); 90 const blob = await offscreen.convertToBlob(dataURLOptions); 91 const arrayBuffer = await blob.arrayBuffer(); 92 const base64 = encode(arrayBuffer); 93 transparentBlobMap.set(id, base64); 94 return base64; 95 } else { 96 return ""; 97 } 98 } 99 const worker = self; 100 worker.onmessage = async function(e) { 101 if ("OffscreenCanvas" in globalThis) { 102 const { id, bitmap, width, height, dataURLOptions } = e.data; 103 const transparentBase64 = getTransparentBlobFor( 104 width, 105 height, 106 dataURLOptions 107 ); 108 const offscreen = new OffscreenCanvas(width, height); 109 const ctx = offscreen.getContext("2d"); 110 ctx.drawImage(bitmap, 0, 0); 111 bitmap.close(); 112 const blob = await offscreen.convertToBlob(dataURLOptions); 113 const type = blob.type; 114 const arrayBuffer = await blob.arrayBuffer(); 115 const base64 = encode(arrayBuffer); 116 if (!lastBlobMap.has(id) && await transparentBase64 === base64) { 117 lastBlobMap.set(id, base64); 118 return worker.postMessage({ id }); 119 } 120 if (lastBlobMap.get(id) === base64) return worker.postMessage({ id }); 121 worker.postMessage({ 122 id, 123 type, 124 base64, 125 width, 126 height 127 }); 128 lastBlobMap.set(id, base64); 129 } else { 130 return worker.postMessage({ id: e.data.id }); 131 } 132 }; 133})(); 134//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map 135`;typeof self<"u"&&self.Blob&&new Blob([lP],{type:"text/javascript;charset=utf-8"});try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=((rS=e.contentWindow)==null?void 0:rS.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}ZR();(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(hE||(hE={}));lr=class{constructor(t){Ls(this,"fileName"),Ls(this,"functionName"),Ls(this,"lineNumber"),Ls(this,"columnNumber"),this.fileName=t.fileName||"",this.functionName=t.functionName||"",this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber}toString(){let t=this.lineNumber||"",r=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${t}:${r})`:`${this.fileName}:${t}:${r}`}},uP=/(^|@)\S+:\d+/,pE=/^\s*at .*(\S+:\d+|\(native\))/m,cP=/^(eval@)?(\[native code])?$/,jf={parse:function(e){return e?typeof e.stacktrace<"u"||typeof e["opera#sourceloc"]<"u"?this.parseOpera(e):e.stack&&e.stack.match(pE)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(e.indexOf(":")===-1)return[e];let r=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!r)throw new Error(`Cannot parse given url: ${e}`);return[r[1],r[2]||void 0,r[3]||void 0]},parseV8OrIE:function(e){return e.stack.split(` 136`).filter(function(r){return!!r.match(pE)},this).map(function(r){r.indexOf("(eval ")>-1&&(r=r.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let n=r.replace(/^\s+/,"").replace(/\(eval code/g,"("),i=n.match(/ (\((.+):(\d+):(\d+)\)$)/);n=i?n.replace(i[0],""):n;let o=n.split(/\s+/).slice(1),s=this.extractLocation(i?i[1]:o.pop()),c=o.join(" ")||void 0,l=["eval","<anonymous>"].indexOf(s[0])>-1?void 0:s[0];return new lr({functionName:c,fileName:l,lineNumber:s[1],columnNumber:s[2]})},this)},parseFFOrSafari:function(e){return e.stack.split(` 137`).filter(function(r){return!r.match(cP)},this).map(function(r){if(r.indexOf(" > eval")>-1&&(r=r.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),r.indexOf("@")===-1&&r.indexOf(":")===-1)return new lr({functionName:r});
vendor: 10,174 bytes, lines 137-143
137{let n=/((.*".+"[^@]*)?[^@]*)(?:@)/,i=r.match(n),o=i&&i[1]?i[1]:void 0,s=this.extractLocation(r.replace(n,""));return new lr({functionName:o,fileName:s[0],lineNumber:s[1],columnNumber:s[2]})}},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf(` 138`)>-1&&e.message.split(` 139`).length>e.stacktrace.split(` 140`).length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){let t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split(` 141`),n=[];for(let i=2,o=r.length;i<o;i+=2){let s=t.exec(r[i]);s&&n.push(new lr({fileName:s[2],lineNumber:parseFloat(s[1])}))}return n},parseOpera10:function(e){let t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split(` 142`),n=[];for(let i=0,o=r.length;i<o;i+=2){let s=t.exec(r[i]);s&&n.push(new lr({functionName:s[3]||void 0,fileName:s[2],lineNumber:parseFloat(s[1])}))}return n},parseOpera11:function(e){return e.stack.split(` 143`).filter(function(r){return!!r.match(uP)&&!r.match(/^Error created at/)},this).map(function(r){let n=r.split("@"),i=this.extractLocation(n.pop()),s=(n.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new lr({functionName:s,fileName:i[0],lineNumber:i[1],columnNumber:i[2]})},this)}};vE={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};jE="rrweb/console@1",hP=e=>({name:jE,observer:dP,options:e})});var ox={};kn(ox,{record:()=>pr});function yP(e){var t,r;let n=(r=(t=globalThis?.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(n&&globalThis[n])return globalThis[n]}function Ph(e){if(Zs[e])return Zs[e];let t=yP(e)||globalThis[e],r=t.prototype,n=e in KE?KE[e]:void 0,i=!!(n&&n.every(c=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(r,c))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=e in XE?XE[e]:void 0,s=!!(o&&o.every(c=>{var l;return typeof r[c]=="function"&&((l=r[c])==null?void 0:l.toString().includes("[native code]"))}));if(i&&s)return Zs[e]=t.prototype,t.prototype;try{let c=document.createElement("iframe");document.body.appendChild(c);let l=c.contentWindow;if(!l)return t.prototype;let u=l[e].prototype;return document.body.removeChild(c),u?Zs[e]=u:r}catch{return r}}function dr(e,t,r){var n;let i=`${e}.${String(r)}`;if(dd[i])return dd[i].call(t);let o=Ph(e),s=(n=Object.getOwnPropertyDescriptor(o,r))==null?void 0:n.get;return s?(dd[i]=s,s.call(t)):t[r]}function y_(e,t,r){let n=`${e}.${String(r)}`;if(hd[n])return hd[n].bind(t);let o=Ph(e)[r];return typeof o!="function"?t[r]:(hd[n]=o,o.bind(t))}function bP(e){return dr("Node",e,"childNodes")}function SP(e){return dr("Node",e,"parentNode")}function EP(e){return dr("Node",e,"parentElement")}function wP(e){return dr("Node",e,"textContent")}function _P(e,t){return y_("Node",e,"contains")(t)}function xP(e){return y_("Node",e,"getRootNode")()}function TP(e){return!e||!("host"in e)?null:dr("ShadowRoot",e,"host")}function CP(e){return e.styleSheets}function IP(e){return!e||!("shadowRoot"in e)?null:dr("Element",e,"shadowRoot")}function AP(e,t){return dr("Element",e,"querySelector")(t)}function RP(e,t){return dr("Element",e,"querySelectorAll")(t)}function OP(){return Ph("MutationObserver").constructor}function b_(e){return e.nodeType===e.ELEMENT_NODE}function Ri(e){let t=e&&"host"in e&&"mode"in e&&rt.host(e)||null;return!!(t&&"shadowRoot"in t&&rt.shadowRoot(t)===e)}function Oi(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function PP(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function kP(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function yh(e){try{let t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&e.ownerNode.ownerDocument&&(r=e.ownerNode.ownerDocument.location.href);let n=Array.from(t,i=>kh(i,r)).join("");return PP(n)}catch{return null}}function kh(e,t){if(MP(e)){let r;try{r=yh(e.styleSheet)||kP(e)}catch{r=e.cssText}return e.styleSheet.href?ha(r,e.styleSheet.href):r}else{let r=e.cssText;return LP(e)&&e.selectorText.includes(":")&&(r=NP(r)),t?ha(r,t):r}}function NP(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function MP(e){return"styleSheet"in e}function LP(e){return"selectorText"in e}function DP(){return new ca}function fa({element:e,maskInputOptions:t,tagName:r,type:n,value:i,maskInputFn:o}){let s=i||"",c=n&&Lr(n);return(t[r.toLowerCase()]||c&&t[c])&&(o?s=o(s,e):s="*".repeat(s.length)),s}function Lr(e){return e.toLowerCase()}function UP(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let n=0;n<e.width;n+=r)for(let i=0;i<e.height;i+=r){let o=t.getImageData,s=YE in o?o[YE]:o;if(new Uint32Array(s.call(t,n,i,Math.min(r,e.width-n),Math.min(r,e.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function da(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Lr(t):null}function S_(e,t){let r;try{r=new URL(e,t??window.location.href)}catch{return null}let n=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(n);return i?.[1]??null}function FP(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}function ha(e,t){return(e||"").replace(BP,(r,n,i,o,s,c)=>{let l=i||s||c,u=n||o||"";if(!l)return r;if(qP.test(l)||GP.test(l))return`url(${u}${l}${u})`;if(WP.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${FP(t)+l}${u})`;let a=t.split("/"),h=l.split("/");a.pop();for(let f of h)f!=="."&&(f===".."?a.pop():a.push(f));return`url(${u}${a.join("/")}${u})`})}function ea(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function jP(e,t,r=!1){let n=Array.from(t.childNodes),i=[],o=0;if(n.length>1&&e&&typeof e=="string"){let s=ea(e,r),c=s.length/e.length;for(let l=1;l<n.length;l++)if(n[l].textContent&&typeof n[l].textContent=="string"){let u=ea(n[l].textContent,r),a=100,h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let f=u.substring(0,h),d=s.split(f),p=-1;if(d.length===2)p=d[0].length;else if(d.length>2&&d[0]===""&&n[l-1].textContent!=="")p=s.indexOf(f,1);else if(d.length===1){if(f=f.substring(0,f.length-1),d=s.split(f),d.length<=1)return i.push(e),i;h=a+1}else h===u.length-1&&(p=s.indexOf(f));if(d.length>=2&&h>a){let v=n[l-1].textContent;if(v&&typeof v=="string"){let g=ea(v).length;p=s.indexOf(f,g)}p===-1&&(p=d[0].length)}if(p!==-1){let v=Math.floor(p/c);for(;v>0&&v<e.length;){if(o+=1,o>50*n.length)return i.push(e),i;let g=ea(e.substring(0,v),r);if(g.length===p){i.push(e.substring(0,v)),e=e.substring(v),s=s.substring(p);break}else g.length<p?v+=Math.max(1,Math.floor((p-g.length)/c)):v-=Math.max(1,Math.floor((g.length-p)*c))}break}}}}return i.push(e),i}function VP(e,t){return jP(e,t).join("/* rr_split */")}function E_(){return $P++}function KP(e){if(e instanceof HTMLFormElement)return"form";let t=Lr(e.tagName);return HP.test(t)?"div":t}function JP(e,t){if(t.trim()==="")return t;let r=0;function n(o){let s,c=o.exec(t.substring(r));return c?(s=c[0],r+=s.length,s):""}let i=[];for(;n(YP),!(r>=t.length);){let o=n(XP);if(o.slice(-1)===",")o=En(e,o.substring(0,o.length-1)),i.push(o);else{let s="";o=En(e,o);let c=!1;for(;;){let l=t.charAt(r);if(l===""){i.push((o+s).trim());break}else if(c)l===")"&&(c=!1);else if(l===","){r+=1,i.push((o+s).trim());break}else l==="("&&(c=!0);s+=l,r+=1}}}return i.join(", ")}function En(e,t){return!t||t.trim()===""?t:Nh(e,t)}function QP(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Nh(e,t){let r=QE.get(e);if(r||(r=e.createElement("a"),QE.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function w_(e,t,r,n){return n&&(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&(t==="table"||t==="td"||t==="th")?En(e,n):r==="srcset"?JP(e,n):r==="style"?ha(n,Nh(e)):t==="object"&&r==="data"?En(e,n):n)}function __(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function ZP(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let i=e.classList[n];if(t.test(i))return!0}if(r)return e.matches(r)}catch{}return!1}function pa(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?pa(rt.parentNode(e),t,r):!1;for(let n=e.classList.length;n--;){let i=e.classList[n];if(t.test(i))return!0}return r?pa(rt.parentNode(e),t,r):!1}function x_(e,t,r,n){let i;if(b_(e)){if(i=e,!rt.childNodes(i).length)return!1}else{if(rt.parentElement(e)===null)return!1;i=rt.parentElement(e)}try{if(typeof t=="string"){if(n){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(pa(i,t,n))return!0;if(r){if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch{}return!1}function ek(e,t,r){let n=e.contentWindow;if(!n)return;let i=!1,o;try{o=n.document.readyState}catch{return}if(o!=="complete"){let c=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(c),i=!0,t()});return}let s="about:blank";if(n.location.href!==s||e.src===s||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function tk(e,t,r){let n=!1,i;try{i=e.sheet}catch{return}if(i)return;let o=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(o),n=!0,t()})}function rk(e,t){let{doc:r,mirror:n,blockClass:i,blockSelector:o,needsMask:s,inlineStylesheet:c,maskInputOptions:l={},maskTextFn:u,maskInputFn:a,maskAttributeFn:h,dataURLOptions:f={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:v,newlyAddedElement:g=!1,cssCaptured:y=!1,applyBackgroun
vendor: 4,183 bytes, line 143
143dColorToBlockedElements:m=!1}=t,E=nk(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:ze.Document,childNodes:[],compatMode:e.compatMode}:{type:ze.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:ze.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:E};case e.ELEMENT_NODE:return ok(e,{doc:r,blockClass:i,blockSelector:o,inlineStylesheet:c,maskInputOptions:l,maskInputFn:a,maskAttributeFn:h,dataURLOptions:f,inlineImages:d,recordCanvas:p,keepIframeSrcFn:v,newlyAddedElement:g,rootId:E,applyBackgroundColorToBlockedElements:m});case e.TEXT_NODE:return ik(e,{doc:r,needsMask:s,maskTextFn:u,rootId:E,cssCaptured:y});case e.CDATA_SECTION_NODE:return{type:ze.CDATA,textContent:"",rootId:E};case e.COMMENT_NODE:return{type:ze.Comment,textContent:rt.textContent(e)||"",rootId:E};default:return!1}}function nk(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function ik(e,t){let{needsMask:r,maskTextFn:n,rootId:i,cssCaptured:o}=t,s=rt.parentNode(e),c=s&&s.tagName,l="",u=c==="STYLE"?!0:void 0,a=c==="SCRIPT"?!0:void 0;return a?l="SCRIPT_PLACEHOLDER":o||(l=rt.textContent(e),u&&l&&(l=ha(l,Nh(t.doc)))),!u&&!a&&l&&r&&(l=n?n(l,rt.parentElement(e)):l.replace(/[\S]/g,"*")),{type:ze.Text,textContent:l||"",rootId:i}}function ok(e,t){let{doc:r,blockClass:n,blockSelector:i,inlineStylesheet:o,maskInputOptions:s={},maskInputFn:c,maskAttributeFn:l,dataURLOptions:u={},inlineImages:a,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:d=!1,rootId:p,applyBackgroundColorToBlockedElements:v=!1}=t,g=ZP(e,n,i),y=KP(e),m={},E=e.attributes.length;for(let b=0;b<E;b++){let S=e.attributes[b];if(!__(y,S.name,S.value)){let _=w_(r,y,Lr(S.name),S.value);if(l&&_!==null){let x=l(S.name,_,e);x!==null&&(m[S.name]=x)}else m[S.name]=_}}if(y==="link"&&o){let b=Array.from(r.styleSheets).find(_=>_.href===e.href),S=null;b&&(S=yh(b)),S&&(delete m.rel,delete m.href,m._cssText=S)}if(y==="style"&&e.sheet){let b=yh(e.sheet);b&&(e.childNodes.length>1&&(b=VP(b,e)),m._cssText=b)}if(y==="input"||y==="textarea"||y==="select"){let b=e.value,S=e.checked;m.type!=="radio"&&m.type!=="checkbox"&&m.type!=="submit"&&m.type!=="button"&&b?m.value=fa({element:e,type:da(e),tagName:y,value:b,maskInputOptions:s,maskInputFn:c}):S&&(m.checked=S)}if(y==="option"&&(e.selected&&!s.select?m.selected=!0:delete m.selected),y==="dialog"&&e.open&&(m.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),y==="canvas"&&h){if(e.__context==="2d")UP(e)||(m.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){let b=e.toDataURL(u.type,u.quality),S=r.createElement("canvas");S.width=e.width,S.height=e.height;let _=S.toDataURL(u.type,u.quality);b!==_&&(m.rr_dataURL=b)}}if(y==="img"&&a){yn||(yn=r.createElement("canvas"),JE=yn.getContext("2d"));let b=e,S=b.currentSrc||b.getAttribute("src")||"<unknown-src>",_=b.crossOrigin,x=()=>{b.removeEventListener("load",x);try{yn.width=b.naturalWidth,yn.height=b.naturalHeight,JE.drawImage(b,0,0),m.rr_dataURL=yn.toDataURL(u.type,u.quality)}catch(I){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?x():b.addEventListener("load",x);return}else console.warn(`Cannot inline img src=${S}! Error: ${I}`)}b.crossOrigin==="anonymous"&&(_?m.crossOrigin=_:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?x():b.addEventListener("load",x)}if(y==="audio"||y==="video"){let b=m;b.rr_mediaState=e.paused?"paused":"played",b.rr_mediaCurrentTime=e.currentTime,b.rr_mediaPlaybackRate=e.playbackRate,b.rr_mediaMuted=e.muted,b.rr_mediaLoop=e.loop,b.rr_mediaVolume=e.volume}if(d||(e.scrollLeft&&(m.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(m.rr_scrollTop=e.scrollTop)),g){let{width:b,height:S}=e.getBoundingClientRect();m={class:m.class,rr_width:`${b}px`,rr_height:`${S}px`,...v?{rr_background_color:zP}:{}}}y==="iframe"&&!f(m.src)&&(e.contentDocument||(m.rr_src=m.src),delete m.src);let w;try{customElements.get(y)&&(w=!0)}catch{}return{type:ze.Element,tagName:y,attributes:m,childNodes:[],isSVG:QP(e)||void 0,needBlock:g,rootId:p,isCustom:w}}function Ne(e){return e==null?"":e.toLowerCase()}function sk(e,t){if(t.comment&&e.type===ze.Comment)return!0;
143if(e.type===ze.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&S_(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Ne(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Ne(e.attributes.name)==="application-name"||Ne(e.attributes.rel)==="icon"||Ne(e.attributes.rel)==="apple-touch-icon"||Ne(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Ne(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Ne(e.attributes.property).match(/^(og|twitter|fb):/)||Ne(e.attributes.name).match(/^(og|twitter):/)||Ne(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Ne(e.attributes.name)==="robots"||Ne(e.attributes.name)==="googlebot"||Ne(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Ne(e.attributes.name)==="author"||Ne(e.attributes.name)==="generator"||Ne(e.attributes.name)==="framework"||Ne(e.attributes.name)==="publisher"||Ne(e.attributes.name)==="progid"||Ne(e.attributes.property).match(/^article:/)||Ne(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Ne(e.attributes.name)==="google-site-verification"||Ne(e.attributes.name)==="yandex-verification"||Ne(e.attributes.name)==="csrf-token"||Ne(e.attributes.name)==="p:domain_verify"||Ne(e.attributes.name)==="verify-v1"||Ne(e.attributes.name)==="verification"||Ne(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function ZE(e,t,r){return Array.from(e).map(n=>{let i=t(n),o=[];if(!r.has(i)){r.add(i);try{o=Array.from(n.cssRules,(s,c)=>({rule:kh(s,n.href),index:c}))}catch(s){if(!(s instanceof DOMException&&s.name==="SecurityError"))throw s}}return{styleId:i,rules:o}})}function wn(e,t){var r,n;let{doc:i,mirror:o,blockClass:s,blockSelector:c,maskTextClass:l,maskTextSelector:u,skipChild:a=!1,inlineStylesheet:h=!0,maskInputOptions:f={},maskTextFn:d,maskInputFn:p,maskAttributeFn:v,slimDOMOptions:g,dataURLOptions:y={},inlineImages:m=!1,recordCanvas:E=!1,onSerialize:w,onAdoptedStyleSheet:b,onIframeLoad:S,iframeLoadTimeout:_=5e3,onStylesheetLoad:x,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:k=!1,cssCaptured:N=!1,applyBackgroundColorToBlockedElements:T=!1}=t,F=t._emittedStyleIds??new Set,{needsMask:D}=t,{preserveWhiteSpace:G=!0}=t;D||(D=x_(e,l,u,D===void 0));let q=rk(e,{doc:i,mirror:o,blockClass:s,blockSelector:c,needsMask:D,inlineStylesheet:h,maskInputOptions:f,maskTextFn:d,maskInputFn:p,maskAttributeFn:v,dataURLOptions:y,inlineImages:m,recordCanvas:E,keepIframeSrcFn:C,newlyAddedElement:k,cssCaptured:N,applyBackgroundColorToBlockedElements:T});if(!q)return console.warn(e,"not serialized"),null;let $;o.hasNode(e)?$=o.getId(e):sk(q,g)||!G&&q.type===ze.Text&&!q.textContent.replace(/^\s+|\s+$/gm,"").length?$=ki:$=E_();let L=Object.assign(q,{id:$});if(o.add(e,L),$===ki)return null;w&&w(e);let W=!a;if(L.type===ze.Element){W=W&&!L.needBlock,delete L.needBlock;let X=rt.shadowRoot(e);X&&Oi(X)&&(L.isShadowHost=!0,b&&((r=X.adoptedStyleSheets)!=null&&r.length)&&(L.adoptedStyleSheets=ZE(X.adoptedStyleSheets,b,F)))}if(L.type===ze.Document&&b){let X=e;(n=X.adoptedStyleSheets)!=null&&n.length&&(L.adoptedStyleSheets=ZE(X.adoptedStyleSheets,b,F))}if((L.type===ze.Document||L.type===ze.Element)&&W){g.headWhitespace&&L.type===ze.Element&&L.tagName==="head"&&(G=!1);let X={doc:i,mirror:o,blockClass:s,blockSelector:c,needsMask:D,maskTextClass:l,maskTextSelector:u,skipChild:a,inlineStylesheet:h,maskInputOptions:f,maskTextFn:d,maskInputFn:p,maskAttributeFn:v,slimDOMOptions:g,dataURLOptions:y,inlineImages:m,recordCanvas:E,preserveWhiteSpace:G,onSerialize:w,onAdoptedStyleSheet:b,_emittedStyleIds:F,onIframeLoad:S,iframeLoadTimeout:_,onStylesheetLoad:x,stylesheetLoadTimeout:I,keepIframeSrcFn:C,cssCaptured:!1,applyBackgroun
vendor: 5,657 bytes, lines 143-153
143dColorToBlockedElements:T};if(!(L.type===ze.Element&&L.tagName==="textarea"&&L.attributes.value!==void 0)){L.type===ze.Element&&L.attributes._cssText!==void 0&&typeof L.attributes._cssText=="string"&&(X.cssCaptured=!0);for(let Q of Array.from(rt.childNodes(e))){let J=wn(Q,X);J&&L.childNodes.push(J)}}let A=null;if(b_(e)&&(A=rt.shadowRoot(e)))for(let Q of Array.from(rt.childNodes(A))){let J=wn(Q,X);J&&(Oi(A)&&(J.isShadow=!0),L.childNodes.push(J))}}let M=rt.parentNode(e);return M&&Ri(M)&&Oi(M)&&(L.isShadow=!0),L.type===ze.Element&&L.tagName==="iframe"&&ek(e,()=>{let X=e.contentDocument;if(X&&S){let A=wn(X,{doc:X,mirror:o,blockClass:s,blockSelector:c,needsMask:D,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskTextFn:d,maskInputFn:p,maskAttributeFn:v,slimDOMOptions:g,dataURLOptions:y,inlineImages:m,recordCanvas:E,preserveWhiteSpace:G,onSerialize:w,onAdoptedStyleSheet:b,onIframeLoad:S,iframeLoadTimeout:_,onStylesheetLoad:x,stylesheetLoadTimeout:I,keepIframeSrcFn:C});A&&S(e,A)}},_),L.type===ze.Element&&L.tagName==="link"&&typeof L.attributes.rel=="string"&&(L.attributes.rel==="stylesheet"||L.attributes.rel==="preload"&&typeof L.attributes.href=="string"&&S_(L.attributes.href)==="css")&&tk(e,()=>{if(x){let X=wn(e,{doc:i,mirror:o,blockClass:s,blockSelector:c,needsMask:D,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskTextFn:d,maskInputFn:p,maskAttributeFn:v,slimDOMOptions:g,dataURLOptions:y,inlineImages:m,recordCanvas:E,preserveWhiteSpace:G,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:_,onStylesheetLoad:x,stylesheetLoadTimeout:I,keepIframeSrcFn:C});X&&x(e,X)}},I),L}function ak(e,t){let{mirror:r=new ca,blockClass:n="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:s=null,inlineStylesheet:c=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:a=!1,maskTextFn:h,maskInputFn:f,maskAttributeFn:d,slimDOM:p=!1,dataURLOptions:v,preserveWhiteSpace:g,onSerialize:y,onAdoptedStyleSheet:m,onIframeLoad:E,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:_=()=>!1,applyBackgroundColorToBlockedElements:x=!1}=t||{};return wn(e,{doc:e,mirror:r,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:a===!0?{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}:a===!1?{password:!0}:a,maskTextFn:h,maskInputFn:f,maskAttributeFn:d,slimDOMOptions:p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:p==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:p===!1?{}:p,dataURLOptions:v,inlineImages:l,recordCanvas:u,preserveWhiteSpace:g,onSerialize:y,onAdoptedStyleSheet:m,onIframeLoad:E,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:S,keepIframeSrcFn:_,newlyAddedElement:!1,applyBackgroundColorToBlockedElements:x})}function lk(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function uk(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}function ck(){if(ew)return ta.exports;ew=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 ta.exports=t(),ta.exports.createColors=t,ta.exports}function Mh(){if(tw)return pd;tw=1;let e=ck(),t=Lt;class r extends Error{constructor(i,o,s,c,l,u){super(i),this.name="CssSyntaxError",this.reason=i,l&&(this.file=l),c&&(this.source=c),u&&(this.plugin=u),typeof o<"u"&&typeof s<"u"&&(typeof o=="number"?(this.line=o,this.column=s):(this.line=o.line,this.column=o.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let o=this.source;i==null&&(i=e.isColorSupported),t&&i&&(o=t(o));let s=o.split(/\r?\n/),c=Math.max(this.line-3,0),l=Math.min(this.line+2,s.length),u=String(l).length,a,h;if(i){let{bold:f,gray:d,red:p}=e.createColors(!0);a=v=>f(p(v)),h=v=>d(v)}else a=h=f=>f;return s.slice(c,l).map((f,d)=>{let p=c+1+d,v=" "+(" "+p).slice(-u)+" | ";if(p===this.line){let g=h(v.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+h(v)+f+` 144 `+g+a("^")}return" "+h(v)+f}).join(` 145`)}toString(){let i=this.showSourceCode();return i&&(i=` 146 147`+i+` 148`),this.name+": "+this.message+i}}return pd=r,r.default=r,pd}function Lh(){return rw||(rw=1,ra.isClean=Symbol("isClean"),ra.my=Symbol("my")),ra}function T_(){if(nw)return vd;nw=1;let e={after:` 149`,beforeClose:` 150`,beforeComment:` 151`,beforeDecl:` 152`,beforeOpen:" ",beforeRule:` 153`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(n){return n[0].toUpperCase()+n.slice(1)}
vendor: 7,929 bytes, lines 153-160
153class r{constructor(i){this.builder=i}atrule(i,o){let s="@"+i.name,c=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName<"u"?s+=i.raws.afterName:c&&(s+=" "),i.nodes)this.block(i,s+c);else{let l=(i.raws.between||"")+(o?";":"");this.builder(s+c+l,i)}}beforeAfter(i,o){let s;i.type==="decl"?s=this.raw(i,null,"beforeDecl"):i.type==="comment"?s=this.raw(i,null,"beforeComment"):o==="before"?s=this.raw(i,null,"beforeRule"):s=this.raw(i,null,"beforeClose");let c=i.parent,l=0;for(;c&&c.type!=="root";)l+=1,c=c.parent;if(s.includes(` 154`)){let u=this.raw(i,null,"indent");if(u.length)for(let a=0;a<l;a++)s+=u}return s}block(i,o){let s=this.raw(i,"between","beforeOpen");this.builder(o+s+"{",i,"start");let c;i.nodes&&i.nodes.length?(this.body(i),c=this.raw(i,"after")):c=this.raw(i,"after","emptyBody"),c&&this.builder(c),this.builder("}",i,"end")}body(i){let o=i.nodes.length-1;for(;o>0&&i.nodes[o].type==="comment";)o-=1;let s=this.raw(i,"semicolon");for(let c=0;c<i.nodes.length;c++){let l=i.nodes[c],u=this.raw(l,"before");u&&this.builder(u),this.stringify(l,o!==c||s)}}comment(i){let o=this.raw(i,"left","commentLeft"),s=this.raw(i,"right","commentRight");this.builder("/*"+o+i.text+s+"*/",i)}decl(i,o){let s=this.raw(i,"between","colon"),c=i.prop+s+this.rawValue(i,"value");i.important&&(c+=i.raws.important||" !important"),o&&(c+=";"),this.builder(c,i)}document(i){this.body(i)}raw(i,o,s){let c;if(s||(s=o),o&&(c=i.raws[o],typeof c<"u"))return c;let l=i.parent;if(s==="before"&&(!l||l.type==="root"&&l.first===i||l&&l.type==="document"))return"";if(!l)return e[s];let u=i.root();if(u.rawCache||(u.rawCache={}),typeof u.rawCache[s]<"u")return u.rawCache[s];if(s==="before"||s==="after")return this.beforeAfter(i,s);{let a="raw"+t(s);this[a]?c=this[a](u,i):u.walk(h=>{if(c=h.raws[o],typeof c<"u")return!1})}return typeof c>"u"&&(c=e[s]),u.rawCache[s]=c,c}rawBeforeClose(i){let o;return i.walk(s=>{if(s.nodes&&s.nodes.length>0&&typeof s.raws.after<"u")return o=s.raws.after,o.includes(` 155`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawBeforeComment(i,o){let s;return i.walkComments(c=>{if(typeof c.raws.before<"u")return s=c.raws.before,s.includes(` 156`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(o,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(i,o){let s;return i.walkDecls(c=>{if(typeof c.raws.before<"u")return s=c.raws.before,s.includes(` 157`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(o,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(i){let o;return i.walk(s=>{if(s.type!=="decl"&&(o=s.raws.between,typeof o<"u"))return!1}),o}rawBeforeRule(i){let o;return i.walk(s=>{if(s.nodes&&(s.parent!==i||i.first!==s)&&typeof s.raws.before<"u")return o=s.raws.before,o.includes(` 158`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawColon(i){let o;return i.walkDecls(s=>{if(typeof s.raws.between<"u")return o=s.raws.between.replace(/[^\s:]/g,""),!1}),o}rawEmptyBody(i){let o;return i.walk(s=>{if(s.nodes&&s.nodes.length===0&&(o=s.raws.after,typeof o<"u"))return!1}),o}rawIndent(i){if(i.raws.indent)return i.raws.indent;let o;return i.walk(s=>{let c=s.parent;if(c&&c!==i&&c.parent&&c.parent===i&&typeof s.raws.before<"u"){let l=s.raws.before.split(` 159`);return o=l[l.length-1],o=o.replace(/\S/g,""),!1}}),o}rawSemicolon(i){let o;return i.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(o=s.raws.semicolon,typeof o<"u"))return!1}),o}rawValue(i,o){let s=i[o],c=i.raws[o];return c&&c.value===s?c.raw:s}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,o){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,o)}}return vd=r,r.default=r,vd}function ba(){if(iw)return gd;iw=1;let e=T_();function t(r,n){new e(n).stringify(r)}return gd=t,t.default=t,gd}function Sa(){if(ow)return md;ow=1;let{isClean:e,my:t}=Lh(),r=Mh(),n=T_(),i=ba();function o(c,l){let u=new c.constructor;for(let a in c){if(!Object.prototype.hasOwnProperty.call(c,a)||a==="proxyCache")continue;let h=c[a],f=typeof h;a==="parent"&&f==="object"?l&&(u[a]=l):a==="source"?u[a]=h:Array.isArray(h)?u[a]=h.map(d=>o(d,u)):(f==="object"&&h!==null&&(h=o(h)),u[a]=h)}return u}class s{constructor(l={}){this.raws={},this[e]=!1,this[t]=!0;for(let u in l)if(u==="nodes"){this.nodes=[];for(let a of l[u])typeof a.clone=="function"?this.append(a.clone()):this.append(a)}else this[u]=l[u]}addToError(l){if(l.postcssNode=this,l.stack&&this.source&&/\n\s{4}at /.test(l.stack)){let u=this.source;l.stack=l.stack.replace(/\n\s{4}at /,`$&${u.input.from}:${u.start.line}:${u.start.column}$&`)}return l}after(l){return this.parent.insertAfter(this,l),this}assign(l={}){for(let u in l)this[u]=l[u];return this}before(l){return this.parent.insertBefore(this,l),this}cleanRaws(l){delete this.raws.before,delete this.raws.after,l||delete this.raws.between}clone(l={}){let u=o(this);for(let a in l)u[a]=l[a];return u}cloneAfter(l={}){let u=this.clone(l);return this.parent.insertAfter(this,u),u}cloneBefore(l={}){let u=this.clone(l);return this.parent.insertBefore(this,u),u}error(l,u={}){if(this.source){let{end:a,start:h}=this.rangeBy(u);return this.source.input.error(l,{column:h.column,line:h.line},{column:a.column,line:a.line},u)}return new r(l)}getProxyProcessor(){return{get(l,u){return u==="proxyOf"?l:u==="root"?()=>l.root().toProxy():l[u]},set(l,u,a){return l[u]===a||(l[u]=a,(u==="prop"||u==="value"||u==="name"||u==="params"||u==="important"||u==="text")&&l.markDirty()),!0}}}markDirty(){if(this[e]){this[e]=!1;let l=this;for(;l=l.parent;)l[e]=!1}}next(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l+1]}positionBy(l,u){let a=this.source.start;if(l.index)a=this.positionInside(l.index,u);else if(l.word){u=this.toString();let h=u.indexOf(l.word);h!==-1&&(a=this.positionInside(h,u))}return a}positionInside(l,u){let a=u||this.toString(),h=this.source.start.column,f=this.source.start.line;for(let d=0;d<l;d++)a[d]===` 160`?(h=1,f+=1):h+=1;return{column:h,line:f}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l){let u={column:this.source.start.column,line:this.source.start.line},a=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:u.column+1,line:u.line};if(l.word){let h=this.toString(),f=h.indexOf(l.word);f!==-1&&(u=this.positionInside(f,h),a=this.positionInside(f+l.word.length,h))}else l.start?u={column:l.start.column,line:l.start.line}:l.index&&(u=this.positionInside(l.index)),l.end?a={column:l.end.column,line:l.end.line}:typeof l.endIndex=="number"?a=this.positionInside(l.endIndex):l.index&&(a=this.positionInside(l.index+1));return(a.line<u.line||a.line===u.line&&a.column<=u.column)&&(a={column:u.column+1,line:u.line}),{end:a,start:u}}raw(l,u){return new n().raw(this,l,u)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...l){if(this.parent){let u=this,a=!1;for(let h of l)h===this?a=!0:a?(this.parent.insertAfter(u,h),u=h):this.parent.insertBefore(u,h);a||this.remove()}return this}root(){let l=this;for(;l.parent&&l.parent.type!=="document";)l=l.parent;return l}toJSON(l,u){let a={},h=u==null;u=u||new Map;let f=0;for(let d in this){if(!Object.prototype.hasOwnProperty.call(this,d)||d==="parent"||d==="proxyCache")continue;let p=this[d];if(Array.isArray(p))a[d]=p.map(v=>typeof v=="object"&&v.toJSON?v.toJSON(null,u):v);else if(typeof p=="object"&&p.toJSON)a[d]=p.toJSON(null,u);else if(d==="source"){let v=u.get(p.input);v==null&&(v=f,u.set(p.input,f),f++),a[d]={end:p.end,inputId:v,start:p.start}}else a[d]=p}return h&&(a.inputs=[...u.keys()].map(d=>d.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}
vendor: 6,522 bytes, lines 160-161
160toString(l=i){l.stringify&&(l=l.stringify);let u="";return l(this,a=>{u+=a}),u}warn(l,u,a){let h={node:this};for(let f in a)h[f]=a[f];return l.warn(u,h)}get proxyOf(){return this}}return md=s,s.default=s,md}function Ea(){if(sw)return yd;sw=1;let e=Sa();class t extends e{constructor(n){n&&typeof n.value<"u"&&typeof n.value!="string"&&(n={...n,value:String(n.value)}),super(n),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return yd=t,t.default=t,yd}function hk(){if(aw)return bd;aw=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return bd={nanoid:(n=21)=>{let i="",o=n;for(;o--;)i+=e[Math.random()*64|0];return i},customAlphabet:(n,i=21)=>(o=i)=>{let s="",c=o;for(;c--;)s+=n[Math.random()*n.length|0];return s}},bd}function C_(){if(lw)return Sd;lw=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Lt,{existsSync:r,readFileSync:n}=Lt,{dirname:i,join:o}=Lt;function s(l){return Buffer?Buffer.from(l,"base64").toString():window.atob(l)}class c{constructor(u,a){if(a.map===!1)return;this.loadAnnotation(u),this.inline=this.startWith(this.annotation,"data:");let h=a.map?a.map.prev:void 0,f=this.loadMap(a.from,h);!this.mapFile&&a.from&&(this.mapFile=a.from),this.mapFile&&(this.root=i(this.mapFile)),f&&(this.text=f)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(u){let a=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,f=/^data:application\/json;charset=utf-?8,/,d=/^data:application\/json,/;if(f.test(u)||d.test(u))return decodeURIComponent(u.substr(RegExp.lastMatch.length));if(a.test(u)||h.test(u))return s(u.substr(RegExp.lastMatch.length));let p=u.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+p)}getAnnotationURL(u){return u.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(u){return typeof u!="object"?!1:typeof u.mappings=="string"||typeof u._mappings=="string"||Array.isArray(u.sections)}loadAnnotation(u){let a=u.match(/\/\*\s*# sourceMappingURL=/gm);if(!a)return;let h=u.lastIndexOf(a.pop()),f=u.indexOf("*/",h);h>-1&&f>-1&&(this.annotation=this.getAnnotationURL(u.substring(h,f)))}loadFile(u){if(this.root=i(u),r(u))return this.mapFile=u,n(u,"utf-8").toString().trim()}loadMap(u,a){if(a===!1)return!1;if(a){if(typeof a=="string")return a;if(typeof a=="function"){let h=a(u);if(h){let f=this.loadFile(h);if(!f)throw new Error("Unable to load previous source map: "+h.toString());return f}}else{if(a instanceof e)return t.fromSourceMap(a).toString();if(a instanceof t)return a.toString();if(this.isMap(a))return JSON.stringify(a);throw new Error("Unsupported previous source map format: "+a.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return u&&(h=o(i(u),h)),this.loadFile(h)}}}startWith(u,a){return u?u.substr(0,a.length)===a:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Sd=c,c.default=c,Sd}function wa(){if(uw)return Ed;uw=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Lt,{fileURLToPath:r,pathToFileURL:n}=Lt,{isAbsolute:i,resolve:o}=Lt,{nanoid:s}=hk(),c=Lt,l=Mh(),u=C_(),a=Symbol("fromOffsetCache"),h=!!(e&&t),f=!!(o&&i);class d{constructor(v,g={}){if(v===null||typeof v>"u"||typeof v=="object"&&!v.toString)throw new Error(`PostCSS received ${v} instead of CSS string`);if(this.css=v.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,g.from&&(!f||/^\w+:\/\//.test(g.from)||i(g.from)?this.file=g.from:this.file=o(g.from)),f&&h){let y=new u(this.css,g);if(y.text){this.map=y;let m=y.consumer().file;!this.file&&m&&(this.file=this.mapResolve(m))}}this.file||(this.id="<input css "+s(6)+">"),this.map&&(this.map.file=this.from)}error(v,g,y,m={}){let E,w,b;if(g&&typeof g=="object"){let _=g,x=y;if(typeof _.offset=="number"){let I=this.fromOffset(_.offset);g=I.line,y=I.col}else g=_.line,y=_.column;if(typeof x.offset=="number"){let I=this.fromOffset(x.offset);w=I.line,b=I.col}else w=x.line,b=x.column}else if(!y){let _=this.fromOffset(g);g=_.line,y=_.col}let S=this.origin(g,y,w,b);return S?E=new l(v,S.endLine===void 0?S.line:{column:S.column,line:S.line},S.endLine===void 0?S.column:{column:S.endColumn,line:S.endLine},S.source,S.file,m.plugin):E=new l(v,w===void 0?g:{column:y,line:g},w===void 0?y:{column:b,line:w},this.css,this.file,m.plugin),E.input={column:y,endColumn:b,endLine:w,line:g,source:this.css},this.file&&(n&&(E.input.url=n(this.file).toString()),E.input.file=this.file),E}fromOffset(v){let g,y;if(this[a])y=this[a];else{let E=this.css.split(` 161`);y=new Array(E.length);let w=0;for(let b=0,S=E.length;b<S;b++)y[b]=w,w+=E[b].length+1;this[a]=y}g=y[y.length-1];let m=0;if(v>=g)m=y.length-1;else{let E=y.length-2,w;for(;m<E;)if(w=m+(E-m>>1),v<y[w])E=w-1;else if(v>=y[w+1])m=w+1;else{m=w;break}}return{col:v-y[m]+1,line:m+1}}mapResolve(v){return/^\w+:\/\//.test(v)?v:o(this.map.consumer().sourceRoot||this.map.root||".",v)}origin(v,g,y,m){if(!this.map)return!1;let E=this.map.consumer(),w=E.originalPositionFor({column:g,line:v});if(!w.source)return!1;let b;typeof y=="number"&&(b=E.originalPositionFor({column:m,line:y}));let S;i(w.source)?S=n(w.source):S=new URL(w.source,this.map.consumer().sourceRoot||n(this.map.mapFile));let _={column:w.column,endColumn:b&&b.column,endLine:b&&b.line,line:w.line,url:S.toString()};if(S.protocol==="file:")if(r)_.file=r(S);else throw new Error("file: protocol is not available in this PostCSS build");let x=E.sourceContentFor(w.source);return x&&(_.source=x),_}toJSON(){let v={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(v[g]=this[g]);return this.map&&(v.map={...this.map},v.map.consumerCache&&(v.map.consumerCache=void 0)),v}get from(){return this.file||this.id}}return Ed=d,d.default=d,c&&c.registerInput&&c.registerInput(d),Ed}function I_(){if(cw)return wd;cw=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Lt,{dirname:r,relative:n,resolve:i,sep:o}=Lt,{pathToFileURL:s}=Lt,c=wa(),l=!!(e&&t),u=!!(r&&i&&n&&o);class a{constructor(f,d,p,v){this.stringify=f,this.mapOpts=p.map||{},this.root=d,this.opts=p,this.css=v,this.originalCSS=v,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let f;this.isInline()?f="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="str
161ing"?f=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?f=this.mapOpts.annotation(this.opts.to,this.root):f=this.outputFile()+".map";let d=` 162`;this.css.includes(`\r 163`)&&(d=`\r 164`),this.css+=d+"/*# sourceMappingURL="+f+" */"}applyPrevMaps(){for(let f of this.previous()){let d=this.toUrl(this.path(f.file)),p=f.root||r(f.file),v;this.mapOpts.sourcesContent===!1?(v=new e(f.text),v.sourcesContent&&(v.sourcesContent=null)):v=f.consumer(),this.map.applySourceMap(v,d,this.toUrl(this.path(p)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let f;for(let d=this.root.nodes.length-1;d>=0;d--)f=this.root.nodes[d],f.type==="comment"&&f.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(d)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&l&&this.isMap())return this.generateMap();{let f="";return this.stringify(this.root,d=>{f+=d}),[f]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let f=this.previous()[0].consumer();f.file=this.outputFile(),this.map=t.fromSourceMap(f,{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]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let f=1,d=1,p="<no source>",v={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,y;this.stringify(this.root,(m,E,w)=>{if(this.css+=m,E&&w!=="end"&&(v.generated.line=f,v.generated.column=d-1,E.source&&E.source.start?(v.source=this.sourcePath(E),v.original.line=E.source.start.line,v.original.column=E.source.start.column-1,this.map.addMapping(v)):(v.source=p,v.original.line=1,v.original.column=0,this.map.addMapping(v))),g=m.match(/\n/g),g?(f+=g.length,y=m.lastIndexOf(` 165`),d=m.length-y):d+=m.length,E&&w!=="start"){let b=E.parent||{raws:{}};(!(E.type==="decl"||E.type==="atrule"&&!E.nodes)||E!==b.last||b.raws.semicolon)&&(E.source&&E.source.end?(v.source=this.sourcePath(E),v.original.line=E.source.end.line,v.original.column=E.source.end.column-1,v.generated.line=f,v.generated.column=d-2,this.map.addMapping(v)):(v.source=p,v.original.line=1,v.original.column=0,v.generated.line=f,v.generated.column=d-1,this.map.addMapping(v)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(f=>f.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let f=this.mapOpts.annotation;return typeof f<"u"&&f!==!0?!1:this.previous().length?this.previous().some(d=>d.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(f=>f.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(f){if(this.mapOpts.absolute||f.charCodeAt(0)===60||/^\w+:\/\//.test(f))return f;let d=this.memoizedPaths.get(f);if(d)return d;let p=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=r(i(p,this.mapOpts.annotation)));let v=n(p,f);return this.memoizedPaths.set(f,v),v}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(f=>{if(f.source&&f.source.input.map){let d=f.source.input.map;this.previousMaps.includes(d)||this.previousMaps.push(d)}});else{let f=new c(this.originalCSS,this.opts);f.map&&this.previousMaps.push(f.map)}return this.previousMaps}setSourcesContent(){let f={};if(this.root)this.root.walk(d=>{if(d.source){let p=d.source.input.from;if(p&&!f[p]){f[p]=!0;let v=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(v,d.source.input.css)}}});else if(this.css){let d=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(d,this.css)}}sourcePath(f){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(f.source.input.from):this.toUrl(this.path(f.source.input.from))}toBase64(f){return Buffer?Buffer.from(f).toString("base64"):window.btoa(unescape(encodeURIComponent(f)))}toFileUrl(f){let d=this.memoizedFileURLs.get(f);if(d)return d;if(s){let p=s(f).toString();return this.memoizedFileURLs.set(f,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(f){let d=this.memoizedURLs.get(f);if(d)return d;o==="\\"&&(f=f.replace(/\\/g,"/"));let p=encodeURI(f).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(f,p),p}}return wd=a,wd}function _a(){if(fw)return _d;fw=1;let e=Sa();class t extends e{constructor(n){super(n),this.type="comment"}}return _d=t,t.default=t,_d}function Dr(){if(dw)return xd;dw=1;let{isClean:e,my:t}
vendor: 5,173 bytes, line 165
165=Lh(),r=Ea(),n=_a(),i=Sa(),o,s,c,l;function u(f){return f.map(d=>(d.nodes&&(d.nodes=u(d.nodes)),delete d.source,d))}function a(f){if(f[e]=!1,f.proxyOf.nodes)for(let d of f.proxyOf.nodes)a(d)}class h extends i{append(...d){for(let p of d){let v=this.normalize(p,this.last);for(let g of v)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(d){if(super.cleanRaws(d),this.nodes)for(let p of this.nodes)p.cleanRaws(d)}each(d){if(!this.proxyOf.nodes)return;let p=this.getIterator(),v,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(v=this.indexes[p],g=d(this.proxyOf.nodes[v],v),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(d){return this.nodes.every(d)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let d=this.lastEach;return this.indexes[d]=0,d}getProxyProcessor(){return{get(d,p){return p==="proxyOf"?d:d[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...v)=>d[p](...v.map(g=>typeof g=="function"?(y,m)=>g(y.toProxy(),m):g)):p==="every"||p==="some"?v=>d[p]((g,...y)=>v(g.toProxy(),...y)):p==="root"?()=>d.root().toProxy():p==="nodes"?d.nodes.map(v=>v.toProxy()):p==="first"||p==="last"?d[p].toProxy():d[p]:d[p]},set(d,p,v){return d[p]===v||(d[p]=v,(p==="name"||p==="params"||p==="selector")&&d.markDirty()),!0}}}index(d){return typeof d=="number"?d:(d.proxyOf&&(d=d.proxyOf),this.proxyOf.nodes.indexOf(d))}insertAfter(d,p){let v=this.index(d),g=this.normalize(p,this.proxyOf.nodes[v]).reverse();v=this.index(d);for(let m of g)this.proxyOf.nodes.splice(v+1,0,m);let y;for(let m in this.indexes)y=this.indexes[m],v<y&&(this.indexes[m]=y+g.length);return this.markDirty(),this}insertBefore(d,p){let v=this.index(d),g=v===0?"prepend":!1,y=this.normalize(p,this.proxyOf.nodes[v],g).reverse();v=this.index(d);for(let E of y)this.proxyOf.nodes.splice(v,0,E);let m;for(let E in this.indexes)m=this.indexes[E],v<=m&&(this.indexes[E]=m+y.length);return this.markDirty(),this}normalize(d,p){if(typeof d=="string")d=u(o(d).nodes);else if(typeof d>"u")d=[];else if(Array.isArray(d)){d=d.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type==="root"&&this.type!=="document"){d=d.nodes.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type)d=[d];else if(d.prop){if(typeof d.value>"u")throw new Error("Value field is missed in node creation");typeof d.value!="string"&&(d.value=String(d.value)),d=[new r(d)]}else if(d.selector)d=[new s(d)];else if(d.name)d=[new c(d)];else if(d.text)d=[new n(d)];else throw new Error("Unknown node type in node creation");return d.map(g=>(g[t]||h.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&a(g),typeof g.raws.before>"u"&&p&&typeof p.raws.before<"u"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...d){d=d.reverse();for(let p of d){let v=this.normalize(p,this.first,"prepend").reverse();for(let g of v)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+v.length}return this.markDirty(),this}push(d){return d.parent=this,this.proxyOf.nodes.push(d),this}removeAll(){for(let d of this.proxyOf.nodes)d.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(d){d=this.index(d),this.proxyOf.nodes[d].parent=void 0,this.proxyOf.nodes.splice(d,1);let p;for(let v in this.indexes)p=this.indexes[v],p>=d&&(this.indexes[v]=p-1);return this.markDirty(),this}replaceValues(d,p,v){return v||(v=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(d,v))}),this.markDirty(),this}some(d){return this.nodes.some(d)}walk(d){return this.each((p,v)=>{let g;try{g=d(p,v)}catch(y){throw p.addToError(y)}return g!==!1&&p.walk&&(g=p.walk(d)),g})}walkAtRules(d,p){return p?d instanceof RegExp?this.walk((v,g)=>{if(v.type==="atrule"&&d.test(v.name))return p(v,g)}):this.walk((v,g)=>{if(v.type==="atrule"&&v.name===d)return p(v,g)}):(p=d,this.walk((v,g)=>{if(v.type==="atrule")return p(v,g)}))}walkComments(d){return this.walk((p,v)=>{if(p.type==="comment")return d(p,v)})}walkDecls(d,p){return p?d instanceof RegExp?this.walk((v,g)=>{if(v.type==="decl"&&d.test(v.prop))return p(v,g)}):this.walk((v,g)=>{if(v.type==="decl"&&v.prop===d)return p(v,g)}):(p=d,this.walk((v,g)=>{if(v.type==="decl")return p(v,g)}))}walkRules(d,p){return p?d instanceof RegExp?this.walk((v,g)=>{if(v.type==="rule"&&d.test(v.selector))return p(v,g)}):this.walk((v,g)=>{if(v.type==="rule"&&v.selector===d)return p(v,g)}):(p=d,this.walk((v,g)=>{if(v.type==="rule")return p(v,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=f=>{o=f},h.registerRule=f=>{s=f},h.registerAtRule=f=>{c=f},h.registerRoot=f=>{l=f},xd=h,h.default=h,h.rebuild=f=>{f.type==="atrule"?Object.setPrototypeOf(f,c.prototype):f.type==="rule"?Object.setPrototypeOf(f,s.prototype):f.type==="decl"?Object.setPrototypeOf(f,r.prototype):f.type==="comment"?Object.setPrototypeOf(f,n.prototype):f.type==="root"&&Object.setPrototypeOf(f,l.prototype),f[t]=!0,f.nodes&&f.nodes.forEac
vendor: 15,315 bytes, lines 165-166
165h(d=>{h.rebuild(d)})},xd}function Dh(){if(hw)return Td;hw=1;let e=Dr(),t,r;class n extends e{constructor(o){super({type:"document",...o}),this.nodes||(this.nodes=[])}toResult(o={}){return new t(new r,this,o).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},Td=n,n.default=n,Td}function A_(){if(pw)return Cd;pw=1;let e={};return Cd=function(r){e[r]||(e[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},Cd}function R_(){if(vw)return Id;vw=1;class e{constructor(r,n={}){if(this.type="warning",this.text=r,n.node&&n.node.source){let i=n.node.rangeBy(n);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in n)this[i]=n[i]}toString(){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}}return Id=e,e.default=e,Id}function Uh(){if(gw)return Ad;gw=1;let e=R_();class t{constructor(n,i,o){this.processor=n,this.messages=[],this.root=i,this.opts=o,this.css=void 0,this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let o=new e(n,i);return this.messages.push(o),o}warnings(){return this.messages.filter(n=>n.type==="warning")}get content(){return this.css}}return Ad=t,t.default=t,Ad}function pk(){if(mw)return Rd;mw=1;let e=39,t=34,r=92,n=47,i=10,o=32,s=12,c=9,l=13,u=91,a=93,h=40,f=41,d=123,p=125,v=59,g=42,y=58,m=64,E=/[\t\n\f\r "#'()/;[\\\]{}]/g,w=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,b=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return Rd=function(x,I={}){let C=x.css.valueOf(),k=I.ignoreErrors,N,T,F,D,G,q,$,L,W,M,X=C.length,A=0,Q=[],J=[];function te(){return A}function se(re){throw x.error("Unclosed "+re,A)}function ce(){return J.length===0&&A>=X}function de(re){if(J.length)return J.pop();if(A>=X)return;let ae=re?re.ignoreUnclosed:!1;switch(N=C.charCodeAt(A),N){case i:case o:case c:case l:case s:{T=A;do T+=1,N=C.charCodeAt(T);while(N===o||N===i||N===c||N===l||N===s);M=["space",C.slice(A,T)],A=T-1;break}case u:case a:case d:case p:case y:case v:case f:{let fe=String.fromCharCode(N);M=[fe,fe,A];break}case h:{if(L=Q.length?Q.pop()[1]:"",W=C.charCodeAt(A+1),L==="url"&&W!==e&&W!==t&&W!==o&&W!==i&&W!==c&&W!==s&&W!==l){T=A;do{if(q=!1,T=C.indexOf(")",T+1),T===-1)if(k||ae){T=A;break}else se("bracket");for($=T;C.charCodeAt($-1)===r;)$-=1,q=!q}while(q);M=["brackets",C.slice(A,T+1),A,T],A=T}else T=C.indexOf(")",A+1),D=C.slice(A,T+1),T===-1||b.test(D)?M=["(","(",A]:(M=["brackets",D,A,T],A=T);break}case e:case t:{F=N===e?"'":'"',T=A;do{if(q=!1,T=C.indexOf(F,T+1),T===-1)if(k||ae){T=A+1;break}else se("string");for($=T;C.charCodeAt($-1)===r;)$-=1,q=!q}while(q);M=["string",C.slice(A,T+1),A,T],A=T;break}case m:{E.lastIndex=A+1,E.test(C),E.lastIndex===0?T=C.length-1:T=E.lastIndex-2,M=["at-word",C.slice(A,T+1),A,T],A=T;break}case r:{for(T=A,G=!0;C.charCodeAt(T+1)===r;)T+=1,G=!G;if(N=C.charCodeAt(T+1),G&&N!==n&&N!==o&&N!==i&&N!==c&&N!==l&&N!==s&&(T+=1,S.test(C.charAt(T)))){for(;S.test(C.charAt(T+1));)T+=1;C.charCodeAt(T+1)===o&&(T+=1)}M=["word",C.slice(A,T+1),A,T],A=T;break}default:{N===n&&C.charCodeAt(A+1)===g?(T=C.indexOf("*/",A+2)+1,T===0&&(k||ae?T=C.length:se("comment")),M=["comment",C.slice(A,T+1),A,T],A=T):(w.lastIndex=A+1,w.test(C),w.lastIndex===0?T=C.length-1:T=w.lastIndex-2,M=["word",C.slice(A,T+1),A,T],Q.push(M),A=T);break}}return A++,M}function V(re){J.push(re)}return{back:V,endOfFile:ce,nextToken:de,position:te}},Rd}function Fh(){if(yw)return Od;yw=1;let e=Dr();class t extends e{constructor(n){super(n),this.type="atrule"}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return Od=t,t.default=t,e.registerAtRule(t),Od}function Mi(){if(bw)return Pd;bw=1;let e=Dr(),t,r;class n extends e{constructor(o){super(o),this.type="root",this.nodes||(this.nodes=[])}normalize(o,s,c){let l=super.normalize(o);if(s){if(c==="prepend")this.nodes.length>1?s.raws.before=this.nodes[1].raws.before:delete s.raws.before;else if(this.first!==s)for(let u of l)u.raws.before=s.raws.before}return l}removeChild(o,s){let c=this.index(o);return!s&&c===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[c].raws.before),super.removeChild(o)}toResult(o={}){return new t(new r,this,o).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},Pd=n,n.default=n,e.registerRoot(n),Pd}function O_(){if(Sw)return kd;Sw=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",` 166`," "];return e.split(t,r)},split(t,r,n){let i=[],o="",s=!1,c=0,l=!1,u="",a=!1;for(let h of t)a?a=!1:h==="\\"?a=!0:l?h===u&&(l=!1):h==='"'||h==="'"?(l=!0,u=h):h==="("?c+=1:h===")"?c>0&&(c-=1):c===0&&r.includes(h)&&(s=!0),s?(o!==""&&i.push(o.trim()),o="",s=!1):o+=h;return(n||o!=="")&&i.push(o.trim()),i}};return kd=e,e.default=e,kd}function Bh(){if(Ew)return Nd;Ew=1;let e=Dr(),t=O_();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let o=this.selector?this.selector.match(/,\s*/):null,s=o?o[0]:","+this.raw("between","beforeOpen");this.selector=i.join(s)}}return Nd=r,r.default=r,e.registerRule(r),Nd}function vk(){if(ww)return Md;ww=1;let e=Ea(),t=pk(),r=_a(),n=Fh(),i=Mi(),o=Bh(),s={empty:!0,space:!0};function c(u){for(let a=u.length-1;a>=0;a--){let h=u[a],f=h[3]||h[2];if(f)return f}}class l{constructor(a){this.input=a,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:a,start:{column:1,line:1,offset:0}}}atrule(a){let h=new n;h.name=a[1].slice(1),h.name===""&&this.unnamedAtrule(h,a),this.init(h,a[2]);let f,d,p,v=!1,g=!1,y=[],m=[];for(;!this.tokenizer.endOfFile();){if(a=this.tokenizer.nextToken(),f=a[0],f==="("||f==="["?m.push(f==="("?")":"]"):f==="{"&&m.length>0?m.push("}"):f===m[m.length-1]&&m.pop(),m.length===0)if(f===";"){h.source.end=this.getPosition(a[2]),h.source.end.offset++,this.semicolon=!0;break}else if(f==="{"){g=!0;break}else if(f==="}"){if(y.length>0){for(p=y.length-1,d=y[p];d&&d[0]==="space";)d=y[--p];d&&(h.source.end=this.getPosition(d[3]||d[2]),h.source.end.offset++)}this.end(a);break}else y.push(a);else y.push(a);if(this.tokenizer.endOfFile()){v=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(h.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(h,"params",y),v&&(a=y[y.length-1],h.source.end=this.getPosition(a[3]||a[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),g&&(h.nodes=[],this.current=h)}checkMissedSemicolon(a){let h=this.colon(a);if(h===!1)return;let f=0,d;for(let p=h-1;p>=0&&(d=a[p],!(d[0]!=="space"&&(f+=1,f===2)));p--);throw this.input.error("Missed semicolon",d[0]==="word"?d[3]+1:d[2])}colon(a){let h=0,f,d,p;for(let[v,g]of a.entries()){if(f=g,d=f[0],d==="("&&(h+=1),d===")"&&(h-=1),h===0&&d===":")if(!p)this.doubleColon(f);else{if(p[0]==="word"&&p[1]==="progid")continue;return v}p=f}return!1}comment(a){let h=new r;this.init(h,a[2]),h.source.end=this.getPosition(a[3]||a[2]),h.source.end.offset++;let f=a[1].slice(2,-2);if(/^\s*$/.test(f))h.text="",h.raws.left=f,h.raws.right="";else{let d=f.match(/^(\s*)([^]*\S)(\s*)$/);h.text=d[2],h.raws.left=d[1],h.raws.right=d[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(a,h){let f=new e;this.init(f,a[0][2]);let d=a[a.length-1];for(d[0]===";"&&(this.semicolon=!0,a.pop()),f.source.end=this.getPosition(d[3]||d[2]||c(a)),f.source.end.offset++;a[0][0]!=="word";)a.length===1&&this.unknownWord(a),f.raws.before+=a.shift()[1];for(f.source.start=this.getPosition(a[0][2]),f.prop="";a.length;){let m=a[0][0];if(m===":"||m==="space"||m==="comment")break;f.prop+=a.shift()[1]}f.raws.between="";let p;for(;a.length;)if(p=a.shift(),p[0]===":"){f.raws.between+=p[1];break}else p[0]==="word"&&/\w/.test(p[1])&&this.unknownWord([p]),f.raws.between+=p[1];(f.prop[0]==="_"||f.prop[0]==="*")&&(f.raws.before+=f.prop[0],f.prop=f.prop.slice(1));let v=[],g;for(;a.length&&(g=a[0][0],!(g!=="space"&&g!=="comment"));)v.push(a.shift());this.precheckMissedSemicolon(a);for(let m=a.length-1;m>=0;m--){if(p=a[m],p[1].toLowerCase()==="!important"){f.important=!0;let E=this.stringFrom(a,m);E=this.spacesFromEnd(a)+E,E!==" !important"&&(f.raws.important=E);break}else if(p[1].toLowerCase()==="important"){let E=a.slice(0),w="";for(let b=m;b>0;b--){let S=E[b][0];if(w.trim().indexOf("!")===0&&S!=="space")break;w=E.pop()[1]+w}w.trim().indexOf("!")===0&&(f.important=!0,f.raws.important=w,a=E)}if(p[0]!=="space"&&p[0]!=="comment")break}a.some(m=>m[0]!=="space"&&m[0]!=="comment")&&(f.raws.between+=v.map(m=>m[1]).join(""),v=[]),this.raw(f,"value",v.concat(a),h),f.value.includes(":")&&!h&&this.checkMissedSemicolon(a)}doubleColon(a){throw this.input.error("Double colon",{offset:a[2]},{offset:a[2]+a[1].length})}emptyRule(a){let h=new o;this.init(h,a[2]),h.selector="",h.raws.between="",this.current=h}end(a){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(a[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(a)}endFile(){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())}freeSemicolon(a){if(this.spaces+=a[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(a){let h=this.input.fromOffset(a);return{column:h.col,line:h.line,offset:a}}init(a,h){this.current.push(a),a.source={input:this.input,start:this.getPosition(h)},a.raws.before=this.spaces,this.spaces="",a.type!=="comment"&&(this.semicolon=!1)}other(a){let h=!1,f=null,d=!1,p=null,v=[],g=a[1].startsWith("--"),y=[],m=a;for(;m;){if(f=m[0],y.push(m),f==="("||f==="[")p||(p=m),v.push(f==="("?")":"]");else if(g&&d&&f==="{")p||(p=m),v.push("}");else if(v.length===0)if(f===";")if(d){this.decl(y,g);return}else break;else if(f==="{"){this.rule(y);return}else if(f==="}"){this.tokenizer.back(y.pop()),h=!0;break}else f===":"&&(d=!0);else f===v[v.length-1]&&(v.pop(),v.length===0&&(p=null));m=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),v.length>0&&this.unclosedBracket(p),h&&d){if(!g)for(;y.length&&(m=y[y.length-1][0],!(m!=="space"&&m!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,g)}else this.unknownWord(y)}parse(){let a;for(;!this.tokenizer.endOfFile();)switch(a=this.tokenizer.nextToken(),a[0]){case"space":this.spaces+=a[1];break;case";":this.freeSemicolon(a);break;case"}":this.end(a);break;case"comment":this.comment(a);break;case"at-word":this.atrule(a);break;case"{":this.emptyRule(a);break;default:this.other(a);break}this.endFile()}precheckMissedSemicolon(){}raw(a,h,f,d){let p,v,g=f.length,y="",m=!0,E,w;for(let b=0;b<g;b+=1)p=f[b],v=p[0],v==="space"&&b===g-1&&!d?m=!1:v==="comment"?(w=f[b-1]?f[b-1][0]:"empty",E=f[b+1]?f[b+1][0]:"empty",!s[w]&&!s[E]?y.slice(-1)===","?m=!1:y+=p[1]:m=!1):y+=p[1];if(!m){let b=f.reduce((S,_)=>S+_[1],"");a.raws[h]={raw:b,value:y}}a[h]=y}rule(a){a.pop();let h=new o;this.init(h,a[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(a),this.raw(h,"selector",a),this.current=h}spacesAndCommentsFromEnd(a){let h,f="";for(;a.length&&(h=a[a.length-1][0],!(h!=="space"&&h!=="comment"));)f=a.pop()[1]+f;return f}spacesAndCommentsFromStart(a){let h,f="";for(;a.length&&(h=a[0][0],!(h!=="space"&&h!=="comment"));)f+=a.shift()[1];return f}spacesFromEnd(a){let h,f="";for(;a.length&&(h=a[a.length-1][0],h==="space");)f=a.pop()[1]+f;return f}stringFrom(a,h){let f="";for(let d=h;d<a.length;d++)f+=a[d][1];return a.splice(h,a.length-h),f}unclosedBlock(){let a=this.current.source.start;throw this.input.error("Unclosed block",a.line,a.column)}unclosedBracket(a){throw this.input.error("Unclosed bracket",{offset:a[2]},{offset:a[2]+1})}unexpectedClose(a){throw this.input.error("Unexpected }",{offset:a[2]},{offset:a[2]+1})}unknownWord(a){throw this.input.error("Unknown word",{offset:a[0][2]},{offset:a[0][2]+a[0][1].length})}unnamedAtrule(a,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return Md=l,Md}function qh(){if(_w)return Ld;_w=1;let e=Dr(),t=vk(),r=wa();function n(i,o){let s=new r(i,o),c=new t(s);try{c.parse()}catch(l){throw l}return c.root}return Ld=n,n.default=n,e.registerParse(n),Ld}function P_(){if(xw)return Dd;xw=1;let{isClean:e,my:t}=Lh(),r=I_(),n=ba(),i=Dr(),o=Dh(),s=A_(),c=Uh(),l=qh(),u=Mi(),a={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},f={Once:!0,postcssPlugin:!0,prepare:!0},d=0;function p(w){return typeof w=="object"&&typeof w.then=="function"}function v(w){let b=!1,S=a[w.type];return w.type==="decl"?b=w.prop.toLowerCase():w.type==="atrule"&&(b=w.name.toLowerCase()),b&&w.append?[S,S+"-"+b,d,S+"Exit",S+"Exit-"+b]:b?[S,S+"-"+b,S+"Exit",S+"Exit-"+b]:w.append?[S,d,S+"Exit"]:[S,S+"Exit"]}function g(w){let b;return w.type==="document"?b=["Document",d,"DocumentExit"]:w.type==="root"?b=["Root",d,"RootExit"]:b=v(w),{eventIndex:0,events:b,iterator:0,node:w,visitorIndex:0,visitors:[]}}function y(w){return w[e]=!1,w.nodes&&w.nodes.forEach(b=>y(b)),w}let m={};class E{constructor(b,S,_){this.stringified=!1,this.processed=!1;let x;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))x=y(S);else if(S instanceof E||S instanceof c)x=y(S.root),S.map&&(typeof _.map>"u"&&(_.map={}),_.map.inline||(_.map.inline=!1),_.map.prev=S.map);else{let I=l;_.syntax&&(I=_.syntax.parse),_.parser&&(I=_.parser),I.parse&&(I=I.parse);try{x=I(S,_)}catch(C){this.processed=!0,this.error=C}x&&!x[t]&&i.rebuild(x)}this.result=new c(b,x,_),this.helpers={...m,postcss:m,result:this.result},this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?{...I,...I.prepare(this.result)}:I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(b){return this.async().catch(b)}finally(b){return this.async().then(b,b)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(b,S){let _=this.result.lastPlugin;try{S&&S.addToError(b),this.error=b,b.name==="CssSyntaxError"&&!b.plugin?(b.plugin=_.postcssPlugin,b.setMessage()):_.postcssVersion}catch(x){console&&console.error&&console.error(x)}return b}prepareVisitors(){this.listeners={};let b=(S,_,x)=>{this.listeners[_]||(this.listeners[_]=[]),this.listeners[_].push([S,x])};for(let S of this.plugins)if(typeof S=="object")for(let _ in S){if(!h[_]&&/^[A-Z]/.test(_))throw new Error(`Unknown event ${_} in ${S.postcssPlugin}
166. Try to update PostCSS (${this.processor.version} now).`);if(!f[_])if(typeof S[_]=="object")for(let x in S[_])x==="*"?b(S,_,S[_][x]):b(S,_+"-"+x.toLowerCase(),S[_][x]);else typeof S[_]=="function"&&b(S,_,S[_])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let b=0;b<this.plugins.length;b++){let S=this.plugins[b],_=this.runOnRoot(S);if(p(_))try{await _}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[e];){b[e]=!0;let S=[g(b)];for(;S.length>0;){let _=this.visitTick(S);if(p(_))try{await _}catch(x){let I=S[S.length-1].node;throw this.handleError(x,I)}}}if(this.listeners.OnceExit)for(let[S,_]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(b.type==="document"){let x=b.nodes.map(I=>_(I,this.helpers));await Promise.all(x)}else await _(b,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(b){this.result.lastPlugin=b;try{if(typeof b=="object"&&b.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(_=>b.Once(_,this.helpers));return p(S[0])?Promise.all(S):S}return b.Once(this.result.root,this.helpers)}else if(typeof b=="function")return b(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let b=this.result.opts,S=n;b.syntax&&(S=b.syntax.stringify),b.stringifier&&(S=b.stringifier),S.stringify&&(S=S.stringify);let x=new r(S,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let b of this.plugins){let S=this.runOnRoot(b);if(p(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[e];)b[e]=!0,this.walkSync(b);if(this.listeners.OnceExit)if(b.type==="document")for(let S of b.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,b)}return this.result}then(b,S){return this.async().then(b,S)}toString(){return this.css}visitSync(b,S){for(let[_,x]of b){this.result.lastPlugin=_;let I;try{I=x(S,this.helpers)}catch(C){throw this.handleError(C,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(p(I))throw this.getAsyncError()}}visitTick(b){let S=b[b.length-1],{node:_,visitors:x}=S;if(_.type!=="root"&&_.type!=="document"&&!_.parent){b.pop();return}if(x.length>0&&S.visitorIndex<x.length){let[C,k]=x[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===x.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=C;try{return k(_.toProxy(),this.helpers)}catch(N){throw this.handleError(N,_)}}if(S.iterator!==0){let C=S.iterator,k;for(;k=_.nodes[_.indexes[C]];)if(_.indexes[C]+=1,!k[e]){k[e]=!0,b.push(g(k));return}S.iterator=0,delete _.indexes[C]}let I=S.events;for(;S.eventIndex<I.length;){let C=I[S.eventIndex];if(S.eventIndex+=1,C===d){_.nodes&&_.nodes.length&&(_[e]=!0,S.iterator=_.getIterator());return}else if(this.listeners[C]){S.visitors=this.listeners[C];return}}b.pop()}walkSync(b){b[e]=!0;let S=v(b);for(let _ of S)if(_===d)b.nodes&&b.each(x=>{x[e]||this.walkSync(x)});else{let x=this.listeners[_];if(x&&this.visitSync(x,b.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return E.registerPostcss=w=>{m=w},Dd=E,E.default=E,u.registerLazyResult(E),o.registerLazyResult(E),Dd}function gk(){if(Tw)return Ud;Tw=1;let e=I_(),t=ba(),r=A_(),n=qh(),i=Uh();class o{constructor(c,l,u){l=l.toString(),this.stringified=!1,this._processor=c,this._css=l,this._opts=u,this._map=void 0;let a,h=t;this.result=new i(this._processor,a,this._opts),this.result.css=l;let f=this;Object.defineProperty(this.result,"root",{get(){return f.root}});let d=new e(h,a,this._opts,l);if(d.isMap()){let[p,v]=d.generate();p&&(this.result.css=p),v&&(this.result.map=v)}else d.clearAnnotation(),this.result.css=d.css}
vendor: 6,021 bytes, lines 166-178
166async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(c){return this.async().catch(c)}finally(c){return this.async().then(c,c)}sync(){if(this.error)throw this.error;return this.result}then(c,l){return this.async().then(c,l)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let c,l=n;try{c=l(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=c,c}get[Symbol.toStringTag](){return"NoWorkResult"}}return Ud=o,o.default=o,Ud}function mk(){if(Cw)return Fd;Cw=1;let e=gk(),t=P_(),r=Dh(),n=Mi();class i{constructor(s=[]){this.version="8.4.38",this.plugins=this.normalize(s)}normalize(s){let c=[];for(let l of s)if(l.postcss===!0?l=l():l.postcss&&(l=l.postcss),typeof l=="object"&&Array.isArray(l.plugins))c=c.concat(l.plugins);else if(typeof l=="object"&&l.postcssPlugin)c.push(l);else if(typeof l=="function")c.push(l);else if(!(typeof l=="object"&&(l.parse||l.stringify)))throw new Error(l+" is not a PostCSS plugin");return c}process(s,c={}){return!this.plugins.length&&!c.parser&&!c.stringifier&&!c.syntax?new e(this,s,c):new t(this,s,c)}use(s){return this.plugins=this.plugins.concat(this.normalize([s])),this}}return Fd=i,i.default=i,n.registerProcessor(i),r.registerProcessor(i),Fd}function yk(){if(Iw)return Bd;Iw=1;let e=Ea(),t=C_(),r=_a(),n=Fh(),i=wa(),o=Mi(),s=Bh();function c(l,u){if(Array.isArray(l))return l.map(f=>c(f));let{inputs:a,...h}=l;if(a){u=[];for(let f of a){let d={...f,__proto__:i.prototype};d.map&&(d.map={...d.map,__proto__:t.prototype}),u.push(d)}}if(h.nodes&&(h.nodes=l.nodes.map(f=>c(f,u))),h.source){let{inputId:f,...d}=h.source;h.source=d,f!=null&&(h.source.input=u[f])}if(h.type==="root")return new o(h);if(h.type==="decl")return new e(h);if(h.type==="rule")return new s(h);if(h.type==="comment")return new r(h);if(h.type==="atrule")return new n(h);throw new Error("Unknown node type: "+l.type)}return Bd=c,c.default=c,Bd}function bk(){if(Aw)return qd;Aw=1;let e=Mh(),t=Ea(),r=P_(),n=Dr(),i=mk(),o=ba(),s=yk(),c=Dh(),l=R_(),u=_a(),a=Fh(),h=Uh(),f=wa(),d=qh(),p=O_(),v=Bh(),g=Mi(),y=Sa();function m(...E){return E.length===1&&Array.isArray(E[0])&&(E=E[0]),new i(E)}return m.plugin=function(w,b){let S=!1;function _(...I){console&&console.warn&&!S&&(S=!0,console.warn(w+`: postcss.plugin was deprecated. Migration guide: 167https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(w+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357: 168https://www.w3ctech.com/topic/2226`));let C=b(...I);return C.postcssPlugin=w,C.postcssVersion=new i().version,C}let x;return Object.defineProperty(_,"postcss",{get(){return x||(x=_()),x}}),_.process=function(I,C,k){return m([_(k)]).process(I,C)},_},m.stringify=o,m.parse=d,m.fromJSON=s,m.list=p,m.comment=E=>new u(E),m.atRule=E=>new a(E),m.decl=E=>new t(E),m.rule=E=>new v(E),m.root=E=>new g(E),m.document=E=>new c(E),m.CssSyntaxError=e,m.Declaration=t,m.Container=n,m.Processor=i,m.Document=c,m.Comment=u,m.Warning=l,m.AtRule=a,m.Result=h,m.Input=f,m.Rule=v,m.Root=g,m.Node=y,r.registerPostcss(m),qd=m,m.default=m,qd}function _k(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xk(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}function Tk(){if(Rw)return na.exports;Rw=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 na.exports=t(),na.exports.createColors=t,na.exports}function Gh(){if(Ow)return Gd;Ow=1;let e=Tk(),t=Dt;class r extends Error{constructor(i,o,s,c,l,u){super(i),this.name="CssSyntaxError",this.reason=i,l&&(this.file=l),c&&(this.source=c),u&&(this.plugin=u),typeof o<"u"&&typeof s<"u"&&(typeof o=="number"?(this.line=o,this.column=s):(this.line=o.line,this.column=o.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let o=this.source;i==null&&(i=e.isColorSupported),t&&i&&(o=t(o));let s=o.split(/\r?\n/),c=Math.max(this.line-3,0),l=Math.min(this.line+2,s.length),u=String(l).length,a,h;if(i){let{bold:f,gray:d,red:p}=e.createColors(!0);a=v=>f(p(v)),h=v=>d(v)}else a=h=f=>f;return s.slice(c,l).map((f,d)=>{let p=c+1+d,v=" "+(" "+p).slice(-u)+" | ";if(p===this.line){let g=h(v.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+h(v)+f+` 169 `+g+a("^")}return" "+h(v)+f}).join(` 170`)}toString(){let i=this.showSourceCode();return i&&(i=` 171 172`+i+` 173`),this.name+": "+this.message+i}}return Gd=r,r.default=r,Gd}function Wh(){return Pw||(Pw=1,ia.isClean=Symbol("isClean"),ia.my=Symbol("my")),ia}function k_(){if(kw)return Wd;kw=1;let e={after:` 174`,beforeClose:` 175`,beforeComment:` 176`,beforeDecl:` 177`,beforeOpen:" ",beforeRule:` 178`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(n){return n[0].toUpperCase()+n.slice(1)}
vendor: 7,929 bytes, lines 178-185
178class r{constructor(i){this.builder=i}atrule(i,o){let s="@"+i.name,c=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName<"u"?s+=i.raws.afterName:c&&(s+=" "),i.nodes)this.block(i,s+c);else{let l=(i.raws.between||"")+(o?";":"");this.builder(s+c+l,i)}}beforeAfter(i,o){let s;i.type==="decl"?s=this.raw(i,null,"beforeDecl"):i.type==="comment"?s=this.raw(i,null,"beforeComment"):o==="before"?s=this.raw(i,null,"beforeRule"):s=this.raw(i,null,"beforeClose");let c=i.parent,l=0;for(;c&&c.type!=="root";)l+=1,c=c.parent;if(s.includes(` 179`)){let u=this.raw(i,null,"indent");if(u.length)for(let a=0;a<l;a++)s+=u}return s}block(i,o){let s=this.raw(i,"between","beforeOpen");this.builder(o+s+"{",i,"start");let c;i.nodes&&i.nodes.length?(this.body(i),c=this.raw(i,"after")):c=this.raw(i,"after","emptyBody"),c&&this.builder(c),this.builder("}",i,"end")}body(i){let o=i.nodes.length-1;for(;o>0&&i.nodes[o].type==="comment";)o-=1;let s=this.raw(i,"semicolon");for(let c=0;c<i.nodes.length;c++){let l=i.nodes[c],u=this.raw(l,"before");u&&this.builder(u),this.stringify(l,o!==c||s)}}comment(i){let o=this.raw(i,"left","commentLeft"),s=this.raw(i,"right","commentRight");this.builder("/*"+o+i.text+s+"*/",i)}decl(i,o){let s=this.raw(i,"between","colon"),c=i.prop+s+this.rawValue(i,"value");i.important&&(c+=i.raws.important||" !important"),o&&(c+=";"),this.builder(c,i)}document(i){this.body(i)}raw(i,o,s){let c;if(s||(s=o),o&&(c=i.raws[o],typeof c<"u"))return c;let l=i.parent;if(s==="before"&&(!l||l.type==="root"&&l.first===i||l&&l.type==="document"))return"";if(!l)return e[s];let u=i.root();if(u.rawCache||(u.rawCache={}),typeof u.rawCache[s]<"u")return u.rawCache[s];if(s==="before"||s==="after")return this.beforeAfter(i,s);{let a="raw"+t(s);this[a]?c=this[a](u,i):u.walk(h=>{if(c=h.raws[o],typeof c<"u")return!1})}return typeof c>"u"&&(c=e[s]),u.rawCache[s]=c,c}rawBeforeClose(i){let o;return i.walk(s=>{if(s.nodes&&s.nodes.length>0&&typeof s.raws.after<"u")return o=s.raws.after,o.includes(` 180`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawBeforeComment(i,o){let s;return i.walkComments(c=>{if(typeof c.raws.before<"u")return s=c.raws.before,s.includes(` 181`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(o,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(i,o){let s;return i.walkDecls(c=>{if(typeof c.raws.before<"u")return s=c.raws.before,s.includes(` 182`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(o,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(i){let o;return i.walk(s=>{if(s.type!=="decl"&&(o=s.raws.between,typeof o<"u"))return!1}),o}rawBeforeRule(i){let o;return i.walk(s=>{if(s.nodes&&(s.parent!==i||i.first!==s)&&typeof s.raws.before<"u")return o=s.raws.before,o.includes(` 183`)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawColon(i){let o;return i.walkDecls(s=>{if(typeof s.raws.between<"u")return o=s.raws.between.replace(/[^\s:]/g,""),!1}),o}rawEmptyBody(i){let o;return i.walk(s=>{if(s.nodes&&s.nodes.length===0&&(o=s.raws.after,typeof o<"u"))return!1}),o}rawIndent(i){if(i.raws.indent)return i.raws.indent;let o;return i.walk(s=>{let c=s.parent;if(c&&c!==i&&c.parent&&c.parent===i&&typeof s.raws.before<"u"){let l=s.raws.before.split(` 184`);return o=l[l.length-1],o=o.replace(/\S/g,""),!1}}),o}rawSemicolon(i){let o;return i.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(o=s.raws.semicolon,typeof o<"u"))return!1}),o}rawValue(i,o){let s=i[o],c=i.raws[o];return c&&c.value===s?c.raw:s}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,o){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,o)}}return Wd=r,r.default=r,Wd}function xa(){if(Nw)return jd;Nw=1;let e=k_();function t(r,n){new e(n).stringify(r)}return jd=t,t.default=t,jd}function Ta(){if(Mw)return Vd;Mw=1;let{isClean:e,my:t}=Wh(),r=Gh(),n=k_(),i=xa();function o(c,l){let u=new c.constructor;for(let a in c){if(!Object.prototype.hasOwnProperty.call(c,a)||a==="proxyCache")continue;let h=c[a],f=typeof h;a==="parent"&&f==="object"?l&&(u[a]=l):a==="source"?u[a]=h:Array.isArray(h)?u[a]=h.map(d=>o(d,u)):(f==="object"&&h!==null&&(h=o(h)),u[a]=h)}return u}class s{constructor(l={}){this.raws={},this[e]=!1,this[t]=!0;for(let u in l)if(u==="nodes"){this.nodes=[];for(let a of l[u])typeof a.clone=="function"?this.append(a.clone()):this.append(a)}else this[u]=l[u]}addToError(l){if(l.postcssNode=this,l.stack&&this.source&&/\n\s{4}at /.test(l.stack)){let u=this.source;l.stack=l.stack.replace(/\n\s{4}at /,`$&${u.input.from}:${u.start.line}:${u.start.column}$&`)}return l}after(l){return this.parent.insertAfter(this,l),this}assign(l={}){for(let u in l)this[u]=l[u];return this}before(l){return this.parent.insertBefore(this,l),this}cleanRaws(l){delete this.raws.before,delete this.raws.after,l||delete this.raws.between}clone(l={}){let u=o(this);for(let a in l)u[a]=l[a];return u}cloneAfter(l={}){let u=this.clone(l);return this.parent.insertAfter(this,u),u}cloneBefore(l={}){let u=this.clone(l);return this.parent.insertBefore(this,u),u}error(l,u={}){if(this.source){let{end:a,start:h}=this.rangeBy(u);return this.source.input.error(l,{column:h.column,line:h.line},{column:a.column,line:a.line},u)}return new r(l)}getProxyProcessor(){return{get(l,u){return u==="proxyOf"?l:u==="root"?()=>l.root().toProxy():l[u]},set(l,u,a){return l[u]===a||(l[u]=a,(u==="prop"||u==="value"||u==="name"||u==="params"||u==="important"||u==="text")&&l.markDirty()),!0}}}markDirty(){if(this[e]){this[e]=!1;let l=this;for(;l=l.parent;)l[e]=!1}}next(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l+1]}positionBy(l,u){let a=this.source.start;if(l.index)a=this.positionInside(l.index,u);else if(l.word){u=this.toString();let h=u.indexOf(l.word);h!==-1&&(a=this.positionInside(h,u))}return a}positionInside(l,u){let a=u||this.toString(),h=this.source.start.column,f=this.source.start.line;for(let d=0;d<l;d++)a[d]===` 185`?(h=1,f+=1):h+=1;return{column:h,line:f}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l){let u={column:this.source.start.column,line:this.source.start.line},a=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:u.column+1,line:u.line};if(l.word){let h=this.toString(),f=h.indexOf(l.word);f!==-1&&(u=this.positionInside(f,h),a=this.positionInside(f+l.word.length,h))}else l.start?u={column:l.start.column,line:l.start.line}:l.index&&(u=this.positionInside(l.index)),l.end?a={column:l.end.column,line:l.end.line}:typeof l.endIndex=="number"?a=this.positionInside(l.endIndex):l.index&&(a=this.positionInside(l.index+1));return(a.line<u.line||a.line===u.line&&a.column<=u.column)&&(a={column:u.column+1,line:u.line}),{end:a,start:u}}raw(l,u){return new n().raw(this,l,u)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...l){if(this.parent){let u=this,a=!1;for(let h of l)h===this?a=!0:a?(this.parent.insertAfter(u,h),u=h):this.parent.insertBefore(u,h);a||this.remove()}return this}root(){let l=this;for(;l.parent&&l.parent.type!=="document";)l=l.parent;return l}toJSON(l,u){let a={},h=u==null;u=u||new Map;let f=0;for(let d in this){if(!Object.prototype.hasOwnProperty.call(this,d)||d==="parent"||d==="proxyCache")continue;let p=this[d];if(Array.isArray(p))a[d]=p.map(v=>typeof v=="object"&&v.toJSON?v.toJSON(null,u):v);else if(typeof p=="object"&&p.toJSON)a[d]=p.toJSON(null,u);else if(d==="source"){let v=u.get(p.input);v==null&&(v=f,u.set(p.input,f),f++),a[d]={end:p.end,inputId:v,start:p.start}}else a[d]=p}return h&&(a.inputs=[...u.keys()].map(d=>d.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}
vendor: 6,522 bytes, lines 185-186
185toString(l=i){l.stringify&&(l=l.stringify);let u="";return l(this,a=>{u+=a}),u}warn(l,u,a){let h={node:this};for(let f in a)h[f]=a[f];return l.warn(u,h)}get proxyOf(){return this}}return Vd=s,s.default=s,Vd}function Ca(){if(Lw)return zd;Lw=1;let e=Ta();class t extends e{constructor(n){n&&typeof n.value<"u"&&typeof n.value!="string"&&(n={...n,value:String(n.value)}),super(n),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return zd=t,t.default=t,zd}function Ak(){if(Dw)return $d;Dw=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return $d={nanoid:(n=21)=>{let i="",o=n;for(;o--;)i+=e[Math.random()*64|0];return i},customAlphabet:(n,i=21)=>(o=i)=>{let s="",c=o;for(;c--;)s+=n[Math.random()*n.length|0];return s}},$d}function N_(){if(Uw)return Hd;Uw=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Dt,{existsSync:r,readFileSync:n}=Dt,{dirname:i,join:o}=Dt;function s(l){return Buffer?Buffer.from(l,"base64").toString():window.atob(l)}class c{constructor(u,a){if(a.map===!1)return;this.loadAnnotation(u),this.inline=this.startWith(this.annotation,"data:");let h=a.map?a.map.prev:void 0,f=this.loadMap(a.from,h);!this.mapFile&&a.from&&(this.mapFile=a.from),this.mapFile&&(this.root=i(this.mapFile)),f&&(this.text=f)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(u){let a=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,f=/^data:application\/json;charset=utf-?8,/,d=/^data:application\/json,/;if(f.test(u)||d.test(u))return decodeURIComponent(u.substr(RegExp.lastMatch.length));if(a.test(u)||h.test(u))return s(u.substr(RegExp.lastMatch.length));let p=u.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+p)}getAnnotationURL(u){return u.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(u){return typeof u!="object"?!1:typeof u.mappings=="string"||typeof u._mappings=="string"||Array.isArray(u.sections)}loadAnnotation(u){let a=u.match(/\/\*\s*# sourceMappingURL=/gm);if(!a)return;let h=u.lastIndexOf(a.pop()),f=u.indexOf("*/",h);h>-1&&f>-1&&(this.annotation=this.getAnnotationURL(u.substring(h,f)))}loadFile(u){if(this.root=i(u),r(u))return this.mapFile=u,n(u,"utf-8").toString().trim()}loadMap(u,a){if(a===!1)return!1;if(a){if(typeof a=="string")return a;if(typeof a=="function"){let h=a(u);if(h){let f=this.loadFile(h);if(!f)throw new Error("Unable to load previous source map: "+h.toString());return f}}else{if(a instanceof e)return t.fromSourceMap(a).toString();if(a instanceof t)return a.toString();if(this.isMap(a))return JSON.stringify(a);throw new Error("Unsupported previous source map format: "+a.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return u&&(h=o(i(u),h)),this.loadFile(h)}}}startWith(u,a){return u?u.substr(0,a.length)===a:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Hd=c,c.default=c,Hd}function Ia(){if(Fw)return Kd;Fw=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Dt,{fileURLToPath:r,pathToFileURL:n}=Dt,{isAbsolute:i,resolve:o}=Dt,{nanoid:s}=Ak(),c=Dt,l=Gh(),u=N_(),a=Symbol("fromOffsetCache"),h=!!(e&&t),f=!!(o&&i);class d{constructor(v,g={}){if(v===null||typeof v>"u"||typeof v=="object"&&!v.toString)throw new Error(`PostCSS received ${v} instead of CSS string`);if(this.css=v.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,g.from&&(!f||/^\w+:\/\//.test(g.from)||i(g.from)?this.file=g.from:this.file=o(g.from)),f&&h){let y=new u(this.css,g);if(y.text){this.map=y;let m=y.consumer().file;!this.file&&m&&(this.file=this.mapResolve(m))}}this.file||(this.id="<input css "+s(6)+">"),this.map&&(this.map.file=this.from)}error(v,g,y,m={}){let E,w,b;if(g&&typeof g=="object"){let _=g,x=y;if(typeof _.offset=="number"){let I=this.fromOffset(_.offset);g=I.line,y=I.col}else g=_.line,y=_.column;if(typeof x.offset=="number"){let I=this.fromOffset(x.offset);w=I.line,b=I.col}else w=x.line,b=x.column}else if(!y){let _=this.fromOffset(g);g=_.line,y=_.col}let S=this.origin(g,y,w,b);return S?E=new l(v,S.endLine===void 0?S.line:{column:S.column,line:S.line},S.endLine===void 0?S.column:{column:S.endColumn,line:S.endLine},S.source,S.file,m.plugin):E=new l(v,w===void 0?g:{column:y,line:g},w===void 0?y:{column:b,line:w},this.css,this.file,m.plugin),E.input={column:y,endColumn:b,endLine:w,line:g,source:this.css},this.file&&(n&&(E.input.url=n(this.file).toString()),E.input.file=this.file),E}fromOffset(v){let g,y;if(this[a])y=this[a];else{let E=this.css.split(` 186`);y=new Array(E.length);let w=0;for(let b=0,S=E.length;b<S;b++)y[b]=w,w+=E[b].length+1;this[a]=y}g=y[y.length-1];let m=0;if(v>=g)m=y.length-1;else{let E=y.length-2,w;for(;m<E;)if(w=m+(E-m>>1),v<y[w])E=w-1;else if(v>=y[w+1])m=w+1;else{m=w;break}}return{col:v-y[m]+1,line:m+1}}mapResolve(v){return/^\w+:\/\//.test(v)?v:o(this.map.consumer().sourceRoot||this.map.root||".",v)}origin(v,g,y,m){if(!this.map)return!1;let E=this.map.consumer(),w=E.originalPositionFor({column:g,line:v});if(!w.source)return!1;let b;typeof y=="number"&&(b=E.originalPositionFor({column:m,line:y}));let S;i(w.source)?S=n(w.source):S=new URL(w.source,this.map.consumer().sourceRoot||n(this.map.mapFile));let _={column:w.column,endColumn:b&&b.column,endLine:b&&b.line,line:w.line,url:S.toString()};if(S.protocol==="file:")if(r)_.file=r(S);else throw new Error("file: protocol is not available in this PostCSS build");let x=E.sourceContentFor(w.source);return x&&(_.source=x),_}toJSON(){let v={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(v[g]=this[g]);return this.map&&(v.map={...this.map},v.map.consumerCache&&(v.map.consumerCache=void 0)),v}get from(){return this.file||this.id}}return Kd=d,d.default=d,c&&c.registerInput&&c.registerInput(d),Kd}function M_(){if(Bw)return Xd;Bw=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Dt,{dirname:r,relative:n,resolve:i,sep:o}=Dt,{pathToFileURL:s}=Dt,c=Ia(),l=!!(e&&t),u=!!(r&&i&&n&&o);class a{constructor(f,d,p,v){this.stringify=f,this.mapOpts=p.map||{},this.root=d,this.opts=p,this.css=v,this.originalCSS=v,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let f;this.isInline()?f="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="str
186ing"?f=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?f=this.mapOpts.annotation(this.opts.to,this.root):f=this.outputFile()+".map";let d=` 187`;this.css.includes(`\r 188`)&&(d=`\r 189`),this.css+=d+"/*# sourceMappingURL="+f+" */"}applyPrevMaps(){for(let f of this.previous()){let d=this.toUrl(this.path(f.file)),p=f.root||r(f.file),v;this.mapOpts.sourcesContent===!1?(v=new e(f.text),v.sourcesContent&&(v.sourcesContent=null)):v=f.consumer(),this.map.applySourceMap(v,d,this.toUrl(this.path(p)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let f;for(let d=this.root.nodes.length-1;d>=0;d--)f=this.root.nodes[d],f.type==="comment"&&f.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(d)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&l&&this.isMap())return this.generateMap();{let f="";return this.stringify(this.root,d=>{f+=d}),[f]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let f=this.previous()[0].consumer();f.file=this.outputFile(),this.map=t.fromSourceMap(f,{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]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let f=1,d=1,p="<no source>",v={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,y;this.stringify(this.root,(m,E,w)=>{if(this.css+=m,E&&w!=="end"&&(v.generated.line=f,v.generated.column=d-1,E.source&&E.source.start?(v.source=this.sourcePath(E),v.original.line=E.source.start.line,v.original.column=E.source.start.column-1,this.map.addMapping(v)):(v.source=p,v.original.line=1,v.original.column=0,this.map.addMapping(v))),g=m.match(/\n/g),g?(f+=g.length,y=m.lastIndexOf(` 190`),d=m.length-y):d+=m.length,E&&w!=="start"){let b=E.parent||{raws:{}};(!(E.type==="decl"||E.type==="atrule"&&!E.nodes)||E!==b.last||b.raws.semicolon)&&(E.source&&E.source.end?(v.source=this.sourcePath(E),v.original.line=E.source.end.line,v.original.column=E.source.end.column-1,v.generated.line=f,v.generated.column=d-2,this.map.addMapping(v)):(v.source=p,v.original.line=1,v.original.column=0,v.generated.line=f,v.generated.column=d-1,this.map.addMapping(v)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(f=>f.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let f=this.mapOpts.annotation;return typeof f<"u"&&f!==!0?!1:this.previous().length?this.previous().some(d=>d.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(f=>f.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(f){if(this.mapOpts.absolute||f.charCodeAt(0)===60||/^\w+:\/\//.test(f))return f;let d=this.memoizedPaths.get(f);if(d)return d;let p=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=r(i(p,this.mapOpts.annotation)));let v=n(p,f);return this.memoizedPaths.set(f,v),v}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(f=>{if(f.source&&f.source.input.map){let d=f.source.input.map;this.previousMaps.includes(d)||this.previousMaps.push(d)}});else{let f=new c(this.originalCSS,this.opts);f.map&&this.previousMaps.push(f.map)}return this.previousMaps}setSourcesContent(){let f={};if(this.root)this.root.walk(d=>{if(d.source){let p=d.source.input.from;if(p&&!f[p]){f[p]=!0;let v=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(v,d.source.input.css)}}});else if(this.css){let d=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(d,this.css)}}sourcePath(f){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(f.source.input.from):this.toUrl(this.path(f.source.input.from))}toBase64(f){return Buffer?Buffer.from(f).toString("base64"):window.btoa(unescape(encodeURIComponent(f)))}toFileUrl(f){let d=this.memoizedFileURLs.get(f);if(d)return d;if(s){let p=s(f).toString();return this.memoizedFileURLs.set(f,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(f){let d=this.memoizedURLs.get(f);if(d)return d;o==="\\"&&(f=f.replace(/\\/g,"/"));let p=encodeURI(f).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(f,p),p}}return Xd=a,Xd}function Aa(){if(qw)return Yd;qw=1;let e=Ta();class t extends e{constructor(n){super(n),this.type="comment"}}return Yd=t,t.default=t,Yd}function Ur(){if(Gw)return Jd;Gw=1;let{isClean:e,my:t}=Wh(),r=Ca(),n=Aa(),i=Ta(),o,s,c,l;function u(f){return f.map(d=>(d.nodes&&(d.nodes=u(d.nodes)),delete d.source,d))}function a(f){if(f[e]=!1,f.proxyOf.nodes)for(let d of f.proxyOf.nodes)a(d)}class h extends i{append(...d){for(let p of d){let v=this.normalize(p,this.last);for(let g of v)this.proxyOf.nodes.push(g)}return this.markDirty(),this}
vendor: 4,830 bytes, line 190
190cleanRaws(d){if(super.cleanRaws(d),this.nodes)for(let p of this.nodes)p.cleanRaws(d)}each(d){if(!this.proxyOf.nodes)return;let p=this.getIterator(),v,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(v=this.indexes[p],g=d(this.proxyOf.nodes[v],v),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(d){return this.nodes.every(d)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let d=this.lastEach;return this.indexes[d]=0,d}getProxyProcessor(){return{get(d,p){return p==="proxyOf"?d:d[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...v)=>d[p](...v.map(g=>typeof g=="function"?(y,m)=>g(y.toProxy(),m):g)):p==="every"||p==="some"?v=>d[p]((g,...y)=>v(g.toProxy(),...y)):p==="root"?()=>d.root().toProxy():p==="nodes"?d.nodes.map(v=>v.toProxy()):p==="first"||p==="last"?d[p].toProxy():d[p]:d[p]},set(d,p,v){return d[p]===v||(d[p]=v,(p==="name"||p==="params"||p==="selector")&&d.markDirty()),!0}}}index(d){return typeof d=="number"?d:(d.proxyOf&&(d=d.proxyOf),this.proxyOf.nodes.indexOf(d))}insertAfter(d,p){let v=this.index(d),g=this.normalize(p,this.proxyOf.nodes[v]).reverse();v=this.index(d);for(let m of g)this.proxyOf.nodes.splice(v+1,0,m);let y;for(let m in this.indexes)y=this.indexes[m],v<y&&(this.indexes[m]=y+g.length);return this.markDirty(),this}insertBefore(d,p){let v=this.index(d),g=v===0?"prepend":!1,y=this.normalize(p,this.proxyOf.nodes[v],g).reverse();v=this.index(d);for(let E of y)this.proxyOf.nodes.splice(v,0,E);let m;for(let E in this.indexes)m=this.indexes[E],v<=m&&(this.indexes[E]=m+y.length);return this.markDirty(),this}normalize(d,p){if(typeof d=="string")d=u(o(d).nodes);else if(typeof d>"u")d=[];else if(Array.isArray(d)){d=d.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type==="root"&&this.type!=="document"){d=d.nodes.slice(0);for(let g of d)g.parent&&g.parent.removeChild(g,"ignore")}else if(d.type)d=[d];else if(d.prop){if(typeof d.value>"u")throw new Error("Value field is missed in node creation");typeof d.value!="string"&&(d.value=String(d.value)),d=[new r(d)]}else if(d.selector)d=[new s(d)];else if(d.name)d=[new c(d)];else if(d.text)d=[new n(d)];else throw new Error("Unknown node type in node creation");return d.map(g=>(g[t]||h.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&a(g),typeof g.raws.before>"u"&&p&&typeof p.raws.before<"u"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...d){d=d.reverse();for(let p of d){let v=this.normalize(p,this.first,"prepend").reverse();for(let g of v)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+v.length}return this.markDirty(),this}push(d){return d.parent=this,this.proxyOf.nodes.push(d),this}removeAll(){for(let d of this.proxyOf.nodes)d.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(d){d=this.index(d),this.proxyOf.nodes[d].parent=void 0,this.proxyOf.nodes.splice(d,1);let p;for(let v in this.indexes)p=this.indexes[v],p>=d&&(this.indexes[v]=p-1);return this.markDirty(),this}replaceValues(d,p,v){return v||(v=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(d,v))}),this.markDirty(),this}some(d){return this.nodes.some(d)}walk(d){return this.each((p,v)=>{let g;try{g=d(p,v)}catch(y){throw p.addToError(y)}return g!==!1&&p.walk&&(g=p.walk(d)),g})}walkAtRules(d,p){return p?d instanceof RegExp?this.walk((v,g)=>{if(v.type==="atrule"&&d.test(v.name))return p(v,g)}):this.walk((v,g)=>{if(v.type==="atrule"&&v.name===d)return p(v,g)}):(p=d,this.walk((v,g)=>{if(v.type==="atrule")return p(v,g)}))}walkComments(d){return this.walk((p,v)=>{if(p.type==="comment")return d(p,v)})}walkDecls(d,p){return p?d instanceof RegExp?this.walk((v,g)=>{if(v.type==="decl"&&d.test(v.prop))return p(v,g)}):this.walk((v,g)=>{if(v.type==="decl"&&v.prop===d)return p(v,g)}):(p=d,this.walk((v,g)=>{if(v.type==="decl")return p(v,g)}))}walkRules(d,p){return p?d instanceof RegExp?this.walk((v,g)=>{if(v.type==="rule"&&d.test(v.selector))return p(v,g)}):this.walk((v,g)=>{if(v.type==="rule"&&v.selector===d)return p(v,g)}):(p=d,this.walk((v,g)=>{if(v.type==="rule")return p(v,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=f=>{o=f},h.registerRule=f=>{s=f},h.registerAtRule=f=>{c=f},h.registerRoot=f=>{l=f},Jd=h,h.default=h,h.rebuild=f=>{f.type==="atrule"?Object.setPrototypeOf(f,c.prototype):f.type==="rule"?Object.setPrototypeOf(f,s.prototype):f.type==="decl"?Object.setPrototypeOf(f,r.prototype):f.type==="comment"?Object.setPrototypeOf(f,n.prototype):f.type==="root"&&Object.setPrototypeOf(f,l.prototype),f[t]=!0,f.nodes&&f.nodes.forEac
vendor: 15,315 bytes, lines 190-191
190h(d=>{h.rebuild(d)})},Jd}function jh(){if(Ww)return Qd;Ww=1;let e=Ur(),t,r;class n extends e{constructor(o){super({type:"document",...o}),this.nodes||(this.nodes=[])}toResult(o={}){return new t(new r,this,o).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},Qd=n,n.default=n,Qd}function L_(){if(jw)return Zd;jw=1;let e={};return Zd=function(r){e[r]||(e[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},Zd}function D_(){if(Vw)return eh;Vw=1;class e{constructor(r,n={}){if(this.type="warning",this.text=r,n.node&&n.node.source){let i=n.node.rangeBy(n);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in n)this[i]=n[i]}toString(){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}}return eh=e,e.default=e,eh}function Vh(){if(zw)return th;zw=1;let e=D_();class t{constructor(n,i,o){this.processor=n,this.messages=[],this.root=i,this.opts=o,this.css=void 0,this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let o=new e(n,i);return this.messages.push(o),o}warnings(){return this.messages.filter(n=>n.type==="warning")}get content(){return this.css}}return th=t,t.default=t,th}function Rk(){if($w)return rh;$w=1;let e=39,t=34,r=92,n=47,i=10,o=32,s=12,c=9,l=13,u=91,a=93,h=40,f=41,d=123,p=125,v=59,g=42,y=58,m=64,E=/[\t\n\f\r "#'()/;[\\\]{}]/g,w=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,b=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return rh=function(x,I={}){let C=x.css.valueOf(),k=I.ignoreErrors,N,T,F,D,G,q,$,L,W,M,X=C.length,A=0,Q=[],J=[];function te(){return A}function se(re){throw x.error("Unclosed "+re,A)}function ce(){return J.length===0&&A>=X}function de(re){if(J.length)return J.pop();if(A>=X)return;let ae=re?re.ignoreUnclosed:!1;switch(N=C.charCodeAt(A),N){case i:case o:case c:case l:case s:{T=A;do T+=1,N=C.charCodeAt(T);while(N===o||N===i||N===c||N===l||N===s);M=["space",C.slice(A,T)],A=T-1;break}case u:case a:case d:case p:case y:case v:case f:{let fe=String.fromCharCode(N);M=[fe,fe,A];break}case h:{if(L=Q.length?Q.pop()[1]:"",W=C.charCodeAt(A+1),L==="url"&&W!==e&&W!==t&&W!==o&&W!==i&&W!==c&&W!==s&&W!==l){T=A;do{if(q=!1,T=C.indexOf(")",T+1),T===-1)if(k||ae){T=A;break}else se("bracket");for($=T;C.charCodeAt($-1)===r;)$-=1,q=!q}while(q);M=["brackets",C.slice(A,T+1),A,T],A=T}else T=C.indexOf(")",A+1),D=C.slice(A,T+1),T===-1||b.test(D)?M=["(","(",A]:(M=["brackets",D,A,T],A=T);break}case e:case t:{F=N===e?"'":'"',T=A;do{if(q=!1,T=C.indexOf(F,T+1),T===-1)if(k||ae){T=A+1;break}else se("string");for($=T;C.charCodeAt($-1)===r;)$-=1,q=!q}while(q);M=["string",C.slice(A,T+1),A,T],A=T;break}case m:{E.lastIndex=A+1,E.test(C),E.lastIndex===0?T=C.length-1:T=E.lastIndex-2,M=["at-word",C.slice(A,T+1),A,T],A=T;break}case r:{for(T=A,G=!0;C.charCodeAt(T+1)===r;)T+=1,G=!G;if(N=C.charCodeAt(T+1),G&&N!==n&&N!==o&&N!==i&&N!==c&&N!==l&&N!==s&&(T+=1,S.test(C.charAt(T)))){for(;S.test(C.charAt(T+1));)T+=1;C.charCodeAt(T+1)===o&&(T+=1)}M=["word",C.slice(A,T+1),A,T],A=T;break}default:{N===n&&C.charCodeAt(A+1)===g?(T=C.indexOf("*/",A+2)+1,T===0&&(k||ae?T=C.length:se("comment")),M=["comment",C.slice(A,T+1),A,T],A=T):(w.lastIndex=A+1,w.test(C),w.lastIndex===0?T=C.length-1:T=w.lastIndex-2,M=["word",C.slice(A,T+1),A,T],Q.push(M),A=T);break}}return A++,M}function V(re){J.push(re)}return{back:V,endOfFile:ce,nextToken:de,position:te}},rh}function zh(){if(Hw)return nh;Hw=1;let e=Ur();class t extends e{constructor(n){super(n),this.type="atrule"}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return nh=t,t.default=t,e.registerAtRule(t),nh}function Li(){if(Kw)return ih;Kw=1;let e=Ur(),t,r;class n extends e{constructor(o){super(o),this.type="root",this.nodes||(this.nodes=[])}normalize(o,s,c){let l=super.normalize(o);if(s){if(c==="prepend")this.nodes.length>1?s.raws.before=this.nodes[1].raws.before:delete s.raws.before;else if(this.first!==s)for(let u of l)u.raws.before=s.raws.before}return l}removeChild(o,s){let c=this.index(o);return!s&&c===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[c].raws.before),super.removeChild(o)}toResult(o={}){return new t(new r,this,o).stringify()}}return n.registerLazyResult=i=>{t=i},n.registerProcessor=i=>{r=i},ih=n,n.default=n,e.registerRoot(n),ih}function U_(){if(Xw)return oh;Xw=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",` 191`," "];return e.split(t,r)},split(t,r,n){let i=[],o="",s=!1,c=0,l=!1,u="",a=!1;for(let h of t)a?a=!1:h==="\\"?a=!0:l?h===u&&(l=!1):h==='"'||h==="'"?(l=!0,u=h):h==="("?c+=1:h===")"?c>0&&(c-=1):c===0&&r.includes(h)&&(s=!0),s?(o!==""&&i.push(o.trim()),o="",s=!1):o+=h;return(n||o!=="")&&i.push(o.trim()),i}};return oh=e,e.default=e,oh}function $h(){if(Yw)return sh;Yw=1;let e=Ur(),t=U_();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let o=this.selector?this.selector.match(/,\s*/):null,s=o?o[0]:","+this.raw("between","beforeOpen");this.selector=i.join(s)}}return sh=r,r.default=r,e.registerRule(r),sh}function Ok(){if(Jw)return ah;Jw=1;let e=Ca(),t=Rk(),r=Aa(),n=zh(),i=Li(),o=$h(),s={empty:!0,space:!0};function c(u){for(let a=u.length-1;a>=0;a--){let h=u[a],f=h[3]||h[2];if(f)return f}}class l{constructor(a){this.input=a,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:a,start:{column:1,line:1,offset:0}}}atrule(a){let h=new n;h.name=a[1].slice(1),h.name===""&&this.unnamedAtrule(h,a),this.init(h,a[2]);let f,d,p,v=!1,g=!1,y=[],m=[];for(;!this.tokenizer.endOfFile();){if(a=this.tokenizer.nextToken(),f=a[0],f==="("||f==="["?m.push(f==="("?")":"]"):f==="{"&&m.length>0?m.push("}"):f===m[m.length-1]&&m.pop(),m.length===0)if(f===";"){h.source.end=this.getPosition(a[2]),h.source.end.offset++,this.semicolon=!0;break}else if(f==="{"){g=!0;break}else if(f==="}"){if(y.length>0){for(p=y.length-1,d=y[p];d&&d[0]==="space";)d=y[--p];d&&(h.source.end=this.getPosition(d[3]||d[2]),h.source.end.offset++)}this.end(a);break}else y.push(a);else y.push(a);if(this.tokenizer.endOfFile()){v=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(h.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(h,"params",y),v&&(a=y[y.length-1],h.source.end=this.getPosition(a[3]||a[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),g&&(h.nodes=[],this.current=h)}checkMissedSemicolon(a){let h=this.colon(a);if(h===!1)return;let f=0,d;for(let p=h-1;p>=0&&(d=a[p],!(d[0]!=="space"&&(f+=1,f===2)));p--);throw this.input.error("Missed semicolon",d[0]==="word"?d[3]+1:d[2])}colon(a){let h=0,f,d,p;for(let[v,g]of a.entries()){if(f=g,d=f[0],d==="("&&(h+=1),d===")"&&(h-=1),h===0&&d===":")if(!p)this.doubleColon(f);else{if(p[0]==="word"&&p[1]==="progid")continue;return v}p=f}return!1}comment(a){let h=new r;this.init(h,a[2]),h.source.end=this.getPosition(a[3]||a[2]),h.source.end.offset++;let f=a[1].slice(2,-2);if(/^\s*$/.test(f))h.text="",h.raws.left=f,h.raws.right="";else{let d=f.match(/^(\s*)([^]*\S)(\s*)$/);h.text=d[2],h.raws.left=d[1],h.raws.right=d[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(a,h){let f=new e;this.init(f,a[0][2]);let d=a[a.length-1];for(d[0]===";"&&(this.semicolon=!0,a.pop()),f.source.end=this.getPosition(d[3]||d[2]||c(a)),f.source.end.offset++;a[0][0]!=="word";)a.length===1&&this.unknownWord(a),f.raws.before+=a.shift()[1];for(f.source.start=this.getPosition(a[0][2]),f.prop="";a.length;){let m=a[0][0];if(m===":"||m==="space"||m==="comment")break;f.prop+=a.shift()[1]}f.raws.between="";let p;for(;a.length;)if(p=a.shift(),p[0]===":"){f.raws.between+=p[1];break}else p[0]==="word"&&/\w/.test(p[1])&&this.unknownWord([p]),f.raws.between+=p[1];(f.prop[0]==="_"||f.prop[0]==="*")&&(f.raws.before+=f.prop[0],f.prop=f.prop.slice(1));let v=[],g;for(;a.length&&(g=a[0][0],!(g!=="space"&&g!=="comment"));)v.push(a.shift());this.precheckMissedSemicolon(a);for(let m=a.length-1;m>=0;m--){if(p=a[m],p[1].toLowerCase()==="!important"){f.important=!0;let E=this.stringFrom(a,m);E=this.spacesFromEnd(a)+E,E!==" !important"&&(f.raws.important=E);break}else if(p[1].toLowerCase()==="important"){let E=a.slice(0),w="";for(let b=m;b>0;b--){let S=E[b][0];if(w.trim().indexOf("!")===0&&S!=="space")break;w=E.pop()[1]+w}w.trim().indexOf("!")===0&&(f.important=!0,f.raws.important=w,a=E)}if(p[0]!=="space"&&p[0]!=="comment")break}a.some(m=>m[0]!=="space"&&m[0]!=="comment")&&(f.raws.between+=v.map(m=>m[1]).join(""),v=[]),this.raw(f,"value",v.concat(a),h),f.value.includes(":")&&!h&&this.checkMissedSemicolon(a)}doubleColon(a){throw this.input.error("Double colon",{offset:a[2]},{offset:a[2]+a[1].length})}emptyRule(a){let h=new o;this.init(h,a[2]),h.selector="",h.raws.between="",this.current=h}end(a){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(a[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(a)}endFile(){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())}freeSemicolon(a){if(this.spaces+=a[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(a){let h=this.input.fromOffset(a);return{column:h.col,line:h.line,offset:a}}init(a,h){this.current.push(a),a.source={input:this.input,start:this.getPosition(h)},a.raws.before=this.spaces,this.spaces="",a.type!=="comment"&&(this.semicolon=!1)}other(a){let h=!1,f=null,d=!1,p=null,v=[],g=a[1].startsWith("--"),y=[],m=a;for(;m;){if(f=m[0],y.push(m),f==="("||f==="[")p||(p=m),v.push(f==="("?")":"]");else if(g&&d&&f==="{")p||(p=m),v.push("}");else if(v.length===0)if(f===";")if(d){this.decl(y,g);return}else break;else if(f==="{"){this.rule(y);return}else if(f==="}"){this.tokenizer.back(y.pop()),h=!0;break}else f===":"&&(d=!0);else f===v[v.length-1]&&(v.pop(),v.length===0&&(p=null));m=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),v.length>0&&this.unclosedBracket(p),h&&d){if(!g)for(;y.length&&(m=y[y.length-1][0],!(m!=="space"&&m!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,g)}else this.unknownWord(y)}parse(){let a;for(;!this.tokenizer.endOfFile();)switch(a=this.tokenizer.nextToken(),a[0]){case"space":this.spaces+=a[1];break;case";":this.freeSemicolon(a);break;case"}":this.end(a);break;case"comment":this.comment(a);break;case"at-word":this.atrule(a);break;case"{":this.emptyRule(a);break;default:this.other(a);break}this.endFile()}precheckMissedSemicolon(){}raw(a,h,f,d){let p,v,g=f.length,y="",m=!0,E,w;for(let b=0;b<g;b+=1)p=f[b],v=p[0],v==="space"&&b===g-1&&!d?m=!1:v==="comment"?(w=f[b-1]?f[b-1][0]:"empty",E=f[b+1]?f[b+1][0]:"empty",!s[w]&&!s[E]?y.slice(-1)===","?m=!1:y+=p[1]:m=!1):y+=p[1];if(!m){let b=f.reduce((S,_)=>S+_[1],"");a.raws[h]={raw:b,value:y}}a[h]=y}rule(a){a.pop();let h=new o;this.init(h,a[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(a),this.raw(h,"selector",a),this.current=h}spacesAndCommentsFromEnd(a){let h,f="";for(;a.length&&(h=a[a.length-1][0],!(h!=="space"&&h!=="comment"));)f=a.pop()[1]+f;return f}spacesAndCommentsFromStart(a){let h,f="";for(;a.length&&(h=a[0][0],!(h!=="space"&&h!=="comment"));)f+=a.shift()[1];return f}spacesFromEnd(a){let h,f="";for(;a.length&&(h=a[a.length-1][0],h==="space");)f=a.pop()[1]+f;return f}stringFrom(a,h){let f="";for(let d=h;d<a.length;d++)f+=a[d][1];return a.splice(h,a.length-h),f}unclosedBlock(){let a=this.current.source.start;throw this.input.error("Unclosed block",a.line,a.column)}unclosedBracket(a){throw this.input.error("Unclosed bracket",{offset:a[2]},{offset:a[2]+1})}unexpectedClose(a){throw this.input.error("Unexpected }",{offset:a[2]},{offset:a[2]+1})}unknownWord(a){throw this.input.error("Unknown word",{offset:a[0][2]},{offset:a[0][2]+a[0][1].length})}unnamedAtrule(a,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return ah=l,ah}function Hh(){if(Qw)return lh;Qw=1;let e=Ur(),t=Ok(),r=Ia();function n(i,o){let s=new r(i,o),c=new t(s);try{c.parse()}catch(l){throw l}return c.root}return lh=n,n.default=n,e.registerParse(n),lh}function F_(){if(Zw)return uh;Zw=1;let{isClean:e,my:t}=Wh(),r=M_(),n=xa(),i=Ur(),o=jh(),s=L_(),c=Vh(),l=Hh(),u=Li(),a={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},f={Once:!0,postcssPlugin:!0,prepare:!0},d=0;function p(w){return typeof w=="object"&&typeof w.then=="function"}function v(w){let b=!1,S=a[w.type];return w.type==="decl"?b=w.prop.toLowerCase():w.type==="atrule"&&(b=w.name.toLowerCase()),b&&w.append?[S,S+"-"+b,d,S+"Exit",S+"Exit-"+b]:b?[S,S+"-"+b,S+"Exit",S+"Exit-"+b]:w.append?[S,d,S+"Exit"]:[S,S+"Exit"]}function g(w){let b;return w.type==="document"?b=["Document",d,"DocumentExit"]:w.type==="root"?b=["Root",d,"RootExit"]:b=v(w),{eventIndex:0,events:b,iterator:0,node:w,visitorIndex:0,visitors:[]}}function y(w){return w[e]=!1,w.nodes&&w.nodes.forEach(b=>y(b)),w}let m={};class E{constructor(b,S,_){this.stringified=!1,this.processed=!1;let x;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))x=y(S);else if(S instanceof E||S instanceof c)x=y(S.root),S.map&&(typeof _.map>"u"&&(_.map={}),_.map.inline||(_.map.inline=!1),_.map.prev=S.map);else{let I=l;_.syntax&&(I=_.syntax.parse),_.parser&&(I=_.parser),I.parse&&(I=I.parse);try{x=I(S,_)}catch(C){this.processed=!0,this.error=C}x&&!x[t]&&i.rebuild(x)}this.result=new c(b,x,_),this.helpers={...m,postcss:m,result:this.result},this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?{...I,...I.prepare(this.result)}:I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(b){return this.async().catch(b)}finally(b){return this.async().then(b,b)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(b,S){let _=this.result.lastPlugin;try{S&&S.addToError(b),this.error=b,b.name==="CssSyntaxError"&&!b.plugin?(b.plugin=_.postcssPlugin,b.setMessage()):_.postcssVersion}catch(x){console&&console.error&&console.error(x)}return b}prepareVisitors(){this.listeners={};let b=(S,_,x)=>{this.listeners[_]||(this.listeners[_]=[]),this.listeners[_].push([S,x])};for(let S of this.plugins)if(typeof S=="object")for(let _ in S){if(!h[_]&&/^[A-Z]/.test(_))throw new Error(`Unknown event ${_} in ${S.postcssPlugin}
191. Try to update PostCSS (${this.processor.version} now).`);if(!f[_])if(typeof S[_]=="object")for(let x in S[_])x==="*"?b(S,_,S[_][x]):b(S,_+"-"+x.toLowerCase(),S[_][x]);else typeof S[_]=="function"&&b(S,_,S[_])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let b=0;b<this.plugins.length;b++){let S=this.plugins[b],_=this.runOnRoot(S);if(p(_))try{await _}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[e];){b[e]=!0;let S=[g(b)];for(;S.length>0;){let _=this.visitTick(S);if(p(_))try{await _}catch(x){let I=S[S.length-1].node;throw this.handleError(x,I)}}}if(this.listeners.OnceExit)for(let[S,_]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(b.type==="document"){let x=b.nodes.map(I=>_(I,this.helpers));await Promise.all(x)}else await _(b,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(b){this.result.lastPlugin=b;try{if(typeof b=="object"&&b.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(_=>b.Once(_,this.helpers));return p(S[0])?Promise.all(S):S}return b.Once(this.result.root,this.helpers)}else if(typeof b=="function")return b(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let b=this.result.opts,S=n;b.syntax&&(S=b.syntax.stringify),b.stringifier&&(S=b.stringifier),S.stringify&&(S=S.stringify);let x=new r(S,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let b of this.plugins){let S=this.runOnRoot(b);if(p(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[e];)b[e]=!0,this.walkSync(b);if(this.listeners.OnceExit)if(b.type==="document")for(let S of b.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,b)}return this.result}then(b,S){return this.async().then(b,S)}toString(){return this.css}visitSync(b,S){for(let[_,x]of b){this.result.lastPlugin=_;let I;try{I=x(S,this.helpers)}catch(C){throw this.handleError(C,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(p(I))throw this.getAsyncError()}}visitTick(b){let S=b[b.length-1],{node:_,visitors:x}=S;if(_.type!=="root"&&_.type!=="document"&&!_.parent){b.pop();return}if(x.length>0&&S.visitorIndex<x.length){let[C,k]=x[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===x.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=C;try{return k(_.toProxy(),this.helpers)}catch(N){throw this.handleError(N,_)}}if(S.iterator!==0){let C=S.iterator,k;for(;k=_.nodes[_.indexes[C]];)if(_.indexes[C]+=1,!k[e]){k[e]=!0,b.push(g(k));return}S.iterator=0,delete _.indexes[C]}let I=S.events;for(;S.eventIndex<I.length;){let C=I[S.eventIndex];if(S.eventIndex+=1,C===d){_.nodes&&_.nodes.length&&(_[e]=!0,S.iterator=_.getIterator());return}else if(this.listeners[C]){S.visitors=this.listeners[C];return}}b.pop()}walkSync(b){b[e]=!0;let S=v(b);for(let _ of S)if(_===d)b.nodes&&b.each(x=>{x[e]||this.walkSync(x)});else{let x=this.listeners[_];if(x&&this.visitSync(x,b.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return E.registerPostcss=w=>{m=w},uh=E,E.default=E,u.registerLazyResult(E),o.registerLazyResult(E),uh}function Pk(){if(e_)return ch;e_=1;let e=M_(),t=xa(),r=L_(),n=Hh(),i=Vh();class o{constructor(c,l,u){l=l.toString(),this.stringified=!1,this._processor=c,this._css=l,this._opts=u,this._map=void 0;let a,h=t;this.result=new i(this._processor,a,this._opts),this.result.css=l;let f=this;Object.defineProperty(this.result,"root",{get(){return f.root}});let d=new e(h,a,this._opts,l);if(d.isMap()){let[p,v]=d.generate();p&&(this.result.css=p),v&&(this.result.map=v)}else d.clearAnnotation(),this.result.css=d.css}
vendor: 40,504 bytes, lines 191-195
191async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(c){return this.async().catch(c)}finally(c){return this.async().then(c,c)}sync(){if(this.error)throw this.error;return this.result}then(c,l){return this.async().then(c,l)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let c,l=n;try{c=l(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=c,c}get[Symbol.toStringTag](){return"NoWorkResult"}}return ch=o,o.default=o,ch}function kk(){if(t_)return fh;t_=1;let e=Pk(),t=F_(),r=jh(),n=Li();class i{constructor(s=[]){this.version="8.4.38",this.plugins=this.normalize(s)}normalize(s){let c=[];for(let l of s)if(l.postcss===!0?l=l():l.postcss&&(l=l.postcss),typeof l=="object"&&Array.isArray(l.plugins))c=c.concat(l.plugins);else if(typeof l=="object"&&l.postcssPlugin)c.push(l);else if(typeof l=="function")c.push(l);else if(!(typeof l=="object"&&(l.parse||l.stringify)))throw new Error(l+" is not a PostCSS plugin");return c}process(s,c={}){return!this.plugins.length&&!c.parser&&!c.stringifier&&!c.syntax?new e(this,s,c):new t(this,s,c)}use(s){return this.plugins=this.plugins.concat(this.normalize([s])),this}}return fh=i,i.default=i,n.registerProcessor(i),r.registerProcessor(i),fh}function Nk(){if(r_)return dh;r_=1;let e=Ca(),t=N_(),r=Aa(),n=zh(),i=Ia(),o=Li(),s=$h();function c(l,u){if(Array.isArray(l))return l.map(f=>c(f));let{inputs:a,...h}=l;if(a){u=[];for(let f of a){let d={...f,__proto__:i.prototype};d.map&&(d.map={...d.map,__proto__:t.prototype}),u.push(d)}}if(h.nodes&&(h.nodes=l.nodes.map(f=>c(f,u))),h.source){let{inputId:f,...d}=h.source;h.source=d,f!=null&&(h.source.input=u[f])}if(h.type==="root")return new o(h);if(h.type==="decl")return new e(h);if(h.type==="rule")return new s(h);if(h.type==="comment")return new r(h);if(h.type==="atrule")return new n(h);throw new Error("Unknown node type: "+l.type)}return dh=c,c.default=c,dh}function Mk(){if(n_)return hh;n_=1;let e=Gh(),t=Ca(),r=F_(),n=Ur(),i=kk(),o=xa(),s=Nk(),c=jh(),l=D_(),u=Aa(),a=zh(),h=Vh(),f=Ia(),d=Hh(),p=U_(),v=$h(),g=Li(),y=Ta();function m(...E){return E.length===1&&Array.isArray(E[0])&&(E=E[0]),new i(E)}return m.plugin=function(w,b){let S=!1;function _(...I){console&&console.warn&&!S&&(S=!0,console.warn(w+`: postcss.plugin was deprecated. Migration guide: 192https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(w+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357: 193https://www.w3ctech.com/topic/2226`));let C=b(...I);return C.postcssPlugin=w,C.postcssVersion=new i().version,C}let x;return Object.defineProperty(_,"postcss",{get(){return x||(x=_()),x}}),_.process=function(I,C,k){return m([_(k)]).process(I,C)},_},m.stringify=o,m.parse=d,m.fromJSON=s,m.list=p,m.comment=E=>new u(E),m.atRule=E=>new a(E),m.decl=E=>new t(E),m.rule=E=>new v(E),m.root=E=>new g(E),m.document=E=>new c(E),m.CssSyntaxError=e,m.Declaration=t,m.Container=n,m.Processor=i,m.Document=c,m.Comment=u,m.Warning=l,m.AtRule=a,m.Result=h,m.Input=f,m.Rule=v,m.Root=g,m.Node=y,r.registerPostcss(m),hh=m,m.default=m,hh}function Dk(e){var t,r;let n=(r=(t=globalThis?.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(n&&globalThis[n])return globalThis[n]}function Kh(e){if(oa[e])return oa[e];let t=Dk(e)||globalThis[e],r=t.prototype,n=e in i_?i_[e]:void 0,i=!!(n&&n.every(c=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(r,c))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=e in o_?o_[e]:void 0,s=!!(o&&o.every(c=>{var l;return typeof r[c]=="function"&&((l=r[c])==null?void 0:l.toString().includes("[native code]"))}));if(i&&s)return oa[e]=t.prototype,t.prototype;try{let c=document.createElement("iframe");document.body.appendChild(c);let l=c.contentWindow;if(!l)return t.prototype;let u=l[e].prototype;return document.body.removeChild(c),u?oa[e]=u:r}catch{return r}}function hr(e,t,r){var n;let i=`${e}.${String(r)}`;if(ph[i])return ph[i].call(t);let o=Kh(e),s=(n=Object.getOwnPropertyDescriptor(o,r))==null?void 0:n.get;return s?(ph[i]=s,s.call(t)):t[r]}function B_(e,t,r){let n=`${e}.${String(r)}`;if(vh[n])return vh[n].bind(t);let o=Kh(e)[r];return typeof o!="function"?t[r]:(vh[n]=o,o.bind(t))}function Uk(e){return hr("Node",e,"childNodes")}function Fk(e){return hr("Node",e,"parentNode")}function Bk(e){return hr("Node",e,"parentElement")}function qk(e){return hr("Node",e,"textContent")}function Gk(e,t){return B_("Node",e,"contains")(t)}function Wk(e){return B_("Node",e,"getRootNode")()}function jk(e){return!e||!("host"in e)?null:hr("ShadowRoot",e,"host")}function Vk(e){return e.styleSheets}function zk(e){return!e||!("shadowRoot"in e)?null:hr("Element",e,"shadowRoot")}function $k(e,t){return hr("Element",e,"querySelector")(t)}function Hk(e,t){return hr("Element",e,"querySelectorAll")(t)}function q_(){return Kh("MutationObserver").constructor}function st(e,t,r=document){let n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function Ni(e,t,r={}){let n=null,i=0;return function(...o){let s=Date.now();!i&&r.leading===!1&&(i=s);let c=t-(s-i),l=this;c<=0||c>t?(n&&(clearTimeout(n),n=null),i=s,e.apply(l,o)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{i=r.leading===!1?0:Date.now(),n=null,e.apply(l,o)},c))}}function Ra(e,t,r,n,i=window){let o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,n?r:{set(s){setTimeout(()=>{r.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>Ra(e,t,o||{},!0)}function Tn(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch{return()=>{}}}function G_(e){var t,r,n,i;let o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:o.documentElement.scrollLeft||o?.body&&((t=Ee.parentElement(o.body))==null?void 0:t.scrollLeft)||((r=o?.body)==null?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:o?.documentElement.scrollTop||o?.body&&((n=Ee.parentElement(o.body))==null?void 0:n.scrollTop)||((i=o?.body)==null?void 0:i.scrollTop)||0}}function W_(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function j_(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function V_(e){return e?e.nodeType===e.ELEMENT_NODE?e:Ee.parentElement(e):null}function at(e,t,r,n){if(!e)return!1;let i=V_(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||n&&i.closest("."+t)!==null)return!0}else if(pa(i,t,n))return!0}catch{}return!!(r&&(i.matches(r)||n&&i.closest(r)!==null))}function Kk(e,t){return t.getId(e)!==-1}function gh(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===ki}function z_(e,t){if(Ri(e))return!1;let r=t.getId(e);if(!t.has(r))return!0;let n=Ee.parentNode(e);return n&&n.nodeType===e.DOCUMENT_NODE?!1:n?z_(n,t):!0}function Sh(e){return!!e.changedTouches}function Xk(e=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)}function $_(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function H_(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Eh(e){return e?e instanceof bh&&"shadowRoot"in e?!!e.shadowRoot:!!Ee.shadowRoot(e):!1}function K_(e){var t;let r=null;return"getRootNode"in e&&((t=Ee.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Ee.host(Ee.getRootNode(e))&&(r=Ee.host(Ee.getRootNode(e))),r}function Yk(e){let t=e,r;for(;r=K_(t);)t=r;return t}function Jk(e){let t=e.ownerDocument;if(!t)return!1;let r=Yk(e);return Ee.contains(t,r)}function X_(e){let t=e.ownerDocument;return t?Ee.contains(t,e)||Jk(e):!1}function a_(e){return"__ln"in e}function Th(e,t){e.delete(t),Ee.childNodes(t).forEach(r=>Th(e,r))}function Qk(e,t){let r=[e];for(;r.length;){let n=r.pop();t.has(n)||(t.add(n),Ee.childNodes(n).forEach(i=>r.push(i)))}}function u_(e,t,r){return e.size===0?!1:Zk(e,t)}function Zk(e,t,r){let n=Ee.parentNode(t);return n?e.has(n):!1}function c_(e,t){return e.size===0?!1:J_(e,t)}function J_(e,t){let r=Ee.parentNode(t);return r?e.has(r)?!0:J_(e,r):!1}function eN(e){Pi=e}function tN(){Pi=void 0}function f_(e){return(...t)=>{try{return e(...t)}catch(r){try{r._external_=!0}catch{}throw r}}}function Di(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Q_(e,t){let r=new xh;Mr.push(r),r.init(e);let n=new(q_())(xe(r.processMutations.bind(r)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n}function rN({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};let i=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,s=[],c,l=Ni(xe(h=>{let f=Date.now()-c;e(s.map(d=>(d.timeOffset-=f,d)),h),s=[],c=null}),o),u=xe(Ni(xe(h=>{let f=Di(h),{clientX:d,clientY:p}=Sh(h)?h.changedTouches[0]:h;c||(c=va()),s.push({x:d,y:p,id:n.getId(f),timeOffset:va()-c}),l(typeof DragEvent<"u"&&h instanceof DragEvent?we.Drag:h instanceof MouseEvent?we.MouseMove:we.TouchMove)}),i,{trailing:!1})),a=[st("mousemove",u,r),st("touchmove",u,r),st("drag",u,r)];return xe(()=>{a.forEach(h=>h())})}function nN({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],l=null,u=a=>h=>{let f=Di(h);if(at(f,n,i,!0))return;let d=null,p=a;if("pointerType"in h){switch(h.pointerType){case"mouse":d=tr.Mouse;break;case"touch":d=tr.Touch;break;case"pen":d=tr.Pen;break}d===tr.Touch?ut[a]===ut.MouseDown?p="TouchStart":ut[a]===ut.MouseUp&&(p="TouchEnd"):tr.Pen}else Sh(h)&&(d=tr.Touch);d!==null?(l=d,(p.startsWith("Touch")&&d===tr.Touch||p.startsWith("Mouse")&&d===tr.Mouse)&&(d=null)):ut[a]===ut.Click&&(d=l,l=null);let v=Sh(h)?h.changedTouches[0]:h;if(!v)return;let g=r.getId(f),{clientX:y,clientY:m}=v;xe(e)({type:ut[p],id:g,x:y,y:m,...d!==null&&{pointerType:d}})};return Object.keys(ut).filter(a=>Number.isNaN(Number(a))&&!a.endsWith("_Departed")&&s[a]!==!1).forEach(a=>{let h=Lr(a),f=u(a);if(window.PointerEvent)switch(ut[a]){case ut.MouseDown:case ut.MouseUp:h=h.replace("mouse","pointer");break;case ut.TouchStart:case ut.TouchEnd:return}c.push(st(h,f,t))}),xe(()=>{c.forEach(a=>a())})}function Z_({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:o}){let s=xe(Ni(xe(c=>{let l=Di(c);if(!l||at(l,n,i,!0))return;let u=r.getId(l);if(l===t&&t.defaultView){let a=G_(t.defaultView);e({id:u,x:a.left,y:a.top})}else e({id:u,x:l.scrollLeft,y:l.scrollTop})}),o.scroll||100));return st("scroll",s,t)}function iN({viewportResizeCb:e},{win:t}){let r=-1,n=-1,i=xe(Ni(xe(()=>{let o=W_(),s=j_();(r!==o||n!==s)&&(e({width:Number(s),height:Number(o)}),r=o,n=s)}),200));return st("resize",i,t)}function sN({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,ignoreClass:o,ignoreSelector:s,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:a}){function h(m){let E=Di(m),w=m.isTrusted,b=E&&E.tagName;if(E&&b==="OPTION"&&(E=Ee.parentElement(E)),!E||!b||oN.indexOf(b)<0||at(E,n,i,!0)||E.classList.contains(o)||s&&E.matches(s))return;let S=E.value,_=!1,x=da(E)||"";x==="radio"||x==="checkbox"?_=E.checked:(c[b.toLowerCase()]||c[x])&&(S=fa({element:E,maskInputOptions:c,tagName:b,type:x,value:S,maskInputFn:l})),f(E,a?{text:S,isChecked:_,userTriggered:w}:{text:S,isChecked:_});let I=E.name;x==="radio"&&I&&_&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(C=>{if(C!==E){let k=C.value;f(C,a?{text:k,isChecked:!_,userTriggered:!1}:{text:k,isChecked:!_})}})}function f(m,E){let w=d_.get(m);if(!w||w.text!==E.text||w.isChecked!==E.isChecked){d_.set(m,E);let b=r.getId(m);xe(e)({...E,id:b})}}let p=(u.input==="last"?["change"]:["input","change"]).map(m=>st(m,xe(h),t)),v=t.defaultView;if(!v)return()=>{p.forEach(m=>m())};let g=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),y=[[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 g&&g.set&&p.push(...y.map(m=>Ra(m[0],m[1],{set(){xe(h)({target:this,isTrusted:!1})}},!1,v))),xe(()=>{p.forEach(m=>m())})}function ga(e){let t=[];function r(n,i){if(sa("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||sa("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||sa("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||sa("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){let s=Array.from(n.parentRule.cssRules).indexOf(n);i.unshift(s)}else if(n.parentStyleSheet){let s=Array.from(n.parentStyleSheet.cssRules).indexOf(n);i.unshift(s)}return i}return r(e,t)}function fr(e,t,r){let n,i;return e?(e.ownerNode?n=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:n}):{}}function aN({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let i=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:xe((a,h,f)=>{let[d,p]=f,{id:v,styleId:g}=fr(h,t,r.styleMirror);return(v&&v!==-1||g&&g!==-1)&&e({id:v,styleId:g,adds:[{rule:d,index:p}]}),f_(()=>a.apply(h,f))()})}),n.CSSStyleSheet.prototype.addRule=function(a,h,f=this.cssRules.length){let d=`${a} { ${h} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[d,f])};let o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:xe((a,h,f)=>{let[d]=f,{id:p,styleId:v}=fr(h,t,r.styleMirror);return(p&&p!==-1||v&&v!==-1)&&e({id:p,styleId:v,removes:[{index:d}]}),f_(()=>a.apply(h,f))()})}),n.CSSStyleSheet.prototype.removeRule=function(a){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[a])};let s;n.CSSStyleSheet.prototype.replace&&(s=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:xe((a,h,f)=>{let[d]=f,{id:p,styleId:v}=fr(h,t,r.styleMirror);return(p&&p!==-1||v&&v!==-1)&&e({id:p,styleId:v,replace:d}),a.apply(h,f)})}));let c;n.CSSStyleSheet.prototype.replaceSync&&(c=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:xe((a,h,f)=>{let[d]=f,{id:p,styleId:v}=fr(h,t,r.styleMirror);return(p&&p!==-1||v&&v!==-1)&&e({id:p,styleId:v,replaceSync:d}),a.apply(h,f)})}));let l={};aa("CSSGroupingRule")?l.CSSGroupingRule=n.CSSGroupingRule:(aa("CSSMediaRule")&&(l.CSSMediaRule=n.CSSMediaRule),aa("CSSConditionRule")&&(l.CSSConditionRule=n.CSSConditionRule),aa("CSSSupportsRule")&&(l.CSSSupportsRule=n.CSSSupportsRule));let u={};return Object.entries(l).forEach(([a,h])=>{u[a]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[a].insertRule,{apply:xe((f,d,p)=>{let[v,g]=p,{id:y,styleId:m}=fr(d.parentStyleSheet,t,r.styleMirror);return(y&&y!==-1||m&&m!==-1)&&e({id:y,styleId:m,adds:[{rule:v,index:[...ga(d),g||0]}]}),f.apply(d,p)})}),h.prototype.deleteRule=new Proxy(u[a].deleteRule,{apply:xe((f,d,p)=>{let[v]=p,{id:g,styleId:y}=fr(d.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||y&&y!==-1)&&e({id:g,styleId:y,removes:[{index:[...ga(d),v]}]}),f.apply(d,p)})})}),xe(()=>{n.CSSStyleSheet.prototype.insertRule=i,n.CSSStyleSheet.prototype.deleteRule=o,s&&(n.CSSStyleSheet.prototype.replace=s),c&&(n.CSSStyleSheet.prototype.replaceSync=c),Object.entries(l).forEach(([a,h])=>{h.prototype.insertRule=u[a].insertRule,h.prototype.deleteRule=u[a].deleteRule})})}function ex({mirror:e,stylesheetManager:t},r){var n,i,o;let s=null;r.nodeName==="#document"?s=e.getId(r):s=e.getId(Ee.host(r));let c=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(o=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,l=c?.prototype?Object.getOwnPropertyDescriptor(c?.prototype,"adoptedStyleSheets"):void 0;return s===null||s===-1||!c||!l?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var u;return(u=l.get)==null?void 0:u.call(this)},set(u){var a;let h=(a=l.set)==null?void 0:a.call(this,u);if(s!==null&&s!==-1)try{t.adoptStyleSheets(u,s)}catch{}return h}}),xe(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function lN({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:i}){let o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:xe((c,l,u)=>{var a;let[h,f,d]=u;if(r.has(h))return o.apply(l,[h,f,d]);let{id:p,styleId:v}=fr((a=l.parentRule)==null?void 0:a.parentStyleSheet,t,n.styleMirror);return(p&&p!==-1||v&&v!==-1)&&e({id:p,styleId:v,set:{property:h,value:f,priority:d},index:ga(l.parentRule)}),c.apply(l,u)})});let s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:xe((c,l,u)=>{var a;let[h]=u;if(r.has(h))return s.apply(l,[h]);let{id:f,styleId:d}=fr((a=l.parentRule)==null?void 0:a.parentStyleSheet,t,n.styleMirror);return(f&&f!==-1||d&&d!==-1)&&e({id:f,styleId:d,remove:{property:h},index:ga(l.parentRule)}),c.apply(l,u)})}),xe(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}function uN({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:i,doc:o}){let s=xe(l=>Ni(xe(u=>{let a=Di(u);if(!a||at(a,t,r,!0))return;let{currentTime:h,volume:f,muted:d,playbackRate:p,loop:v}=a;e({type:l,id:n.getId(a),currentTime:h,volume:f,muted:d,playbackRate:p,loop:v})}),i.media||500)),c=[st("play",s(Sn.Play),o),st("pause",s(Sn.Pause),o),st("seeked",s(Sn.Seeked),o),st("volumechange",s(Sn.VolumeChange),o),st("ratechange",s(Sn.RateChange),o)];return xe(()=>{c.forEach(l=>l())})}function cN({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let n=[],i=new WeakMap,o=r.FontFace;r.FontFace=function(l,u,a){let h=new o(l,u,a);return i.set(h,{family:l,buffer:typeof u!="string",descriptors:a,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};let s=Tn(t.fonts,"add",function(c){return function(l){return setTimeout(xe(()=>{let u=i.get(l);u&&(e(u),i.delete(l))}),0),c.apply(this,[l])}});return n.push(()=>{r.FontFace=o}),n.push(s),xe(()=>{n.forEach(c=>c())})}function fN(e){let{doc:t,mirror:r,blockClass:n,blockSelector:i,selectionCb:o}=e,s=!0,c=xe(()=>{let l=t.getSelection();if(!l||s&&l?.isCollapsed)return;s=l.isCollapsed||!1;let u=[],a=l.rangeCount||0;for(let h=0;h<a;h++){let f=l.getRangeAt(h),{startContainer:d,startOffset:p,endContainer:v,endOffset:g}=f;at(d,n,i,!0)||at(v,n,i,!0)||u.push({start:r.getId(d),startOffset:p,end:r.getId(v),endOffset:g})}o({ranges:u})});return c(),st("selectionchange",c)}function dN({doc:e,customElementCb:t}){let r=e.defaultView;return!r||!r.customElements?()=>{}:Tn(r.customElements,"define",function(i){return function(o,s,c){try{t({define:{name:o}})}catch{console.warn(`Custom element callback failed for ${o}`)}return i.apply(this,[o,s,c])}})}function hN(e,t){let{mutationCb:r,mousemoveCb:n,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:s,inputCb:c,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:a,canvasMutationCb:h,fontCb:f,selectionCb:d,customElementCb:p}=e;e.mutationCb=(...v)=>{t.mutation&&t.mutation(...v),r(...v)},e.mousemoveCb=(...v)=>{t.mousemove&&t.mousemove(...v),n(...v)},e.mouseInteractionCb=(...v)=>{t.mouseInteraction&&t.mouseInteraction(...v),i(...v)},e.scrollCb=(...v)=>{t.scroll&&t.scroll(...v),o(...v)},e.viewportResizeCb=(...v)=>{t.viewportResize&&t.viewportResize(...v),s(...v)},e.inputCb=(...v)=>{t.input&&t.input(...v),c(...v)},e.mediaInteractionCb=(...v)=>{t.mediaInteaction&&t.mediaInteaction(...v),l(...v)},e.styleSheetRuleCb=(...v)=>{t.styleSheetRule&&t.styleSheetRule(...v),u(...v)},e.styleDeclarationCb=(...v)=>{t.styleDeclaration&&t.styleDeclaration(...v),a(...v)},e.canvasMutationCb=(...v)=>{t.canvasMutation&&t.canvasMutation(...v),h(...v)},e.fontCb=(...v)=>{t.font&&t.font(...v),f(...v)},e.selectionCb=(...v)=>{t.selection&&t.selection(...v),d(...v)},e.customElementCb=(...v)=>{t.customElement&&t.customElement(...v),p(...v)}}function pN(e,t={}){let r=e.doc.defaultView;if(!r)return()=>{};hN(e,t);let n;e.recordDOM&&(n=Q_(e,e.doc));let i=rN(e),o=nN(e),s=Z_(e),c=iN(e,{win:r}),l=sN(e),u=uN(e),a=()=>{},h=()=>{},f=()=>{},d=()=>{};e.recordDOM&&(a=aN(e,{win:r}),h=ex(e,e.doc),f=lN(e,{win:r}),e.collectFonts&&(d=cN(e)));let p=fN(e),v=dN(e),g=[];for(let y of e.plugins)g.push(y.observer(y.callback,r,y.options));return xe(()=>{Mr.forEach(y=>y.reset()),n?.disconnect(),i(),o(),s(),c(),l(),u(),a(),h(),f(),d(),p(),v(),g.forEach(y=>y())})}function sa(e){return typeof window[e]<"u"}function aa(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}function mN(e,t){let r=h_.get(e);return r||(r=new Map,h_.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function la(e,t,r){if(e instanceof Array)return e.map(n=>la(n,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){let n=e.constructor.name,i=gN(e);return{rr_type:n,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[la(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let n=e.constructor.name,{src:i}=e;return{rr_type:n,src:i}}else if(e instanceof HTMLCanvasElement){let n="HTMLImageElement",i=e.toDataURL();return{rr_type:n,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[la(e.data,t,r),e.width,e.height]};if(nx(e,t)||typeof e=="object"){let n=e.constructor.name,i=tx(e,t,r);return{rr_type:n,index:i}}}}return e}function yN(e,t,r,n){let i=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let s of o)try{if(typeof t.CanvasRenderingContext2D.prototype[s]!="function")continue;let c=Tn(t.CanvasRenderingContext2D.prototype,s,function(l){return function(...u){return at(this.canvas,r,n,!0)||setTimeout(()=>{let a=rx(u,t,this);e(this.canvas,{type:xn["2D"],property:s,args:a})},0),l.apply(this,u)}});i.push(c)}catch{let c=Ra(t.CanvasRenderingContext2D.prototype,s,{set(l){e(this.canvas,{type:xn["2D"],property:s,args:[l],setter:!0})}});i.push(c)}return()=>{i.forEach(s=>s())}}function bN(e){return e==="experimental-webgl"?"webgl":e}function p_(e,t,r,n){let i=[];try{let o=Tn(e.HTMLCanvasElement.prototype,"getContext",function(s){return function(c,...l){if(!at(this,t,r,!0)){let u=bN(c);if("__context"in this||(this.__context=u),n&&["webgl","webgl2"].includes(u))if(l[0]&&typeof l[0]=="object"){let a=l[0];a.preserveDrawingBuffer||(a.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return s.apply(this,[c,...l])}});i.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function v_(e,t,r,n,i,o){let s=[],c=Object.getOwnPropertyNames(e);for(let l of c)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof e[l]!="function")continue;let u=Tn(e,l,function(a){return function(...h){let f=a.apply(this,h);if(tx(f,o,this),"tagName"in this.canvas&&!at(this.canvas,n,i,!0)){let d=rx(h,o,this),p={type:t,property:l,args:d};r(this.canvas,p)}return f}});s.push(u)}catch{let u=Ra(e,l,{set(a){r(this.canvas,{type:t,property:l,args:[a],setter:!0})}});s.push(u)}return s}function SN(e,t,r,n){let i=[];return i.push(...v_(t.WebGLRenderingContext.prototype,xn.WebGL,e,r,n,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...v_(t.WebGL2RenderingContext.prototype,xn.WebGL2,e,r,n,t)),()=>{i.forEach(o=>o())}}function EN(e){let t;try{if(t=g_&&(self.URL||self.webkitURL).createObjectURL(g_),!t)throw"";let r=new Worker(t,{name:e?.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(ix),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}function pr(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:s="rr-ignore",ignoreSelector:c=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,inlineStylesheet:a=!0,maskAllInputs:h,maskInputOptions:f,slimDOMOptions:d,maskInputFn:p,maskTextFn:v,maskAttributeFn:g,hooks:y,packFn:m,sampling:E={},dataURLOptions:w={},mousemoveWait:b,recordDOM:S=!0,recordCanvas:_=!1,recordCrossOriginIframes:x=!1,recordAfter:I=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:C=!1,collectFonts:k=!1,inlineImages:N=!1,captureAdoptedStyleSheets:T=!0,plugins:F,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:G=new Set([]),errorHandler:q,applyBackgroundColorToBlockedElements:$=!1}=e;eN(q);let L=x?window.parent===window:!0,W=!1;if(!L)try{window.parent.document&&(W=!1)}catch{W=!0}if(L&&!t)throw new Error("emit function is required");if(!L&&!W)return()=>{};b!==void 0&&E.mousemove===void 0&&(E.mousemove=b),Mt.reset();let M=h===!0?{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}:f!==void 0?f:{password:!0},X=d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:d==="all",headMetaDescKeywords:d==="all",headTitleMutations:d==="all"}:d||{};Xk();let A,Q=0,J=ne=>{for(let Oe of F||[])Oe.eventProcessor&&(ne=Oe.eventProcessor(ne));return m&&!W&&(ne=m(ne)),ne};je=(ne,Oe)=>{var ge;let ye=ne;if(ye.timestamp=va(),(ge=Mr[0])!=null&&ge.isFrozen()&&ye.type!==Ce.FullSnapshot&&!(ye.type===Ce.IncrementalSnapshot&&ye.data.source===we.Mutation)&&Mr.forEach(_e=>_e.unfreeze()),L)t?.(J(ye),Oe);else if(W){let _e={type:"rrweb",event:J(ye),origin:window.location.origin,isCheckout:Oe};window.parent.postMessage(_e,"*")}if(ye.type===Ce.FullSnapshot)A=ye,Q=0;else if(ye.type===Ce.IncrementalSnapshot){if(ye.data.source===we.Mutation&&ye.data.isAttachIframe)return;Q++;let _e=n&&Q>=n,pe=r&&ye.timestamp-A.timestamp>r;(_e||pe)&&ua(!0)}};let te=ne=>{je({type:Ce.IncrementalSnapshot,data:{source:we.Mutation,...ne}})},se=ne=>je({type:Ce.IncrementalSnapshot,data:{source:we.Scroll,...ne}}),ce=ne=>je({type:Ce.IncrementalSnapshot,data:{source:we.CanvasMutation,...ne}}),de=ne=>je({type:Ce.IncrementalSnapshot,data:{source:we.AdoptedStyleSheet,...ne}}),V=new Rh({mutationCb:te,adoptedStyleSheetCb:de}),re=new Ch({mirror:Mt,mutationCb:te,stylesheetManager:V,recordCrossOriginIframes:x,wrappedEmit:je});for(let ne of F||[])ne.getMirror&&ne.getMirror({nodeMirror:Mt,crossOriginIframeMirror:re.crossOriginIframeMirror,crossOriginIframeStyleMirror:re.crossOriginIframeStyleMirror});let ae=new Oh;mh=new Ah({recordCanvas:_,mutationCb:ce,win:window,blockClass:i,blockSelector:o,mirror:Mt,sampling:E.canvas,dataURLOptions:w});let fe=new Ih({mutationCb:te,scrollCb:se,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:l,maskTextSelector:u,inlineStylesheet:a,maskInputOptions:M,dataURLOptions:w,maskTextFn:v,maskInputFn:p,maskAttributeFn:g,recordCanvas:_,inlineImages:N,sampling:E,slimDOMOptions:X,iframeManager:re,stylesheetManager:V,canvasManager:mh,keepIframeSrcFn:D,processedNodeManager:ae},mirror:Mt});ua=(ne=!1)=>{if(!S)return;je({type:Ce.Meta,data:{href:window.location.href,width:j_(),height:W_()}},ne),V.reset(),fe.init(),Mr.forEach(ge=>ge.lock());let Oe=ak(document,{mirror:Mt,blockClass:i,blockSelector:o,maskTextClass:l,maskTextSelector:u,inlineStylesheet:a,maskAllInputs:M,maskTextFn:v,maskInputFn:p,maskAttributeFn:g,slimDOM:X,dataURLOptions:w,recordCanvas:_,inlineImages:N,applyBackgroundColorToBlockedElements:$,onSerialize:ge=>{$_(ge,Mt)&&re.addIframe(ge),H_(ge,Mt)&&V.trackLinkElement(ge),Eh(ge)&&fe.addShadowRoot(Ee.shadowRoot(ge),document)},onAdoptedStyleSheet:T?ge=>V.styleMirror.add(ge):void 0,onIframeLoad:(ge,ye)=>{re.attachIframe(ge,ye),fe.observeAttachShadow(ge)},onStylesheetLoad:(ge,ye)=>{V.attachLinkElement(ge,ye)},keepIframeSrcFn:D});if(!Oe)return console.warn("Failed to snapshot the document");je({type:Ce.FullSnapshot,data:{node:Oe,initialOffset:G_(window)}},ne),Mr.forEach(ge=>ge.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,Mt.getId(document))};try{let ne=[],Oe=ye=>{var _e;return xe(pN)({mutationCb:te,mousemoveCb:(pe,Ke)=>je({type:Ce.IncrementalSnapshot,data:{source:Ke,positions:pe}}),mouseInteractionCb:pe=>je({type:Ce.IncrementalSnapshot,data:{source:we.MouseInteraction,...pe}}),scrollCb:se,viewportResizeCb:pe=>je({type:Ce.IncrementalSnapshot,data:{source:we.ViewportResize,...pe}}),inputCb:pe=>je({type:Ce.IncrementalSnapshot,data:{source:we.Input,...pe}}),mediaInteractionCb:pe=>je({type:Ce.IncrementalSnapshot,data:{source:we.MediaInteraction,...pe}}),styleSheetRuleCb:pe=>je({type:Ce.IncrementalSnapshot,data:{source:we.StyleSheetRule,...pe}}),styleDeclarationCb:pe=>je({type:Ce.IncrementalSnapshot,data:{source:we.StyleDeclaration,...pe}}),canvasMutationCb:ce,fontCb:pe=>je({type:Ce.IncrementalSnapshot,data:{source:we.Font,...pe}}),selectionCb:pe=>{je({type:Ce.IncrementalSnapshot,data:{source:we.Selection,...pe}})},customElementCb:pe=>{je({type:Ce.IncrementalSnapshot,data:{source:we.CustomElement,...pe}})},blockClass:i,ignoreClass:s,ignoreSelector:c,maskTextClass:l,maskTextSelector:u,maskInputOptions:M,inlineStylesheet:a,sampling:E,recordDOM:S,recordCanvas:_,inlineImages:N,userTriggeredOnInput:C,collectFonts:k,doc:ye,maskInputFn:p,maskTextFn:v,maskAttributeFn:g,keepIframeSrcFn:D,blockSelector:o,slimDOMOptions:X,dataURLOptions:w,mirror:Mt,iframeManager:re,stylesheetManager:V,shadowDomManager:fe,processedNodeManager:ae,canvasManager:mh,ignoreCSSAttributes:G,plugins:((_e=F?.filter(pe=>pe.observer))==null?void 0:_e.map(pe=>({observer:pe.observer,options:pe.options,callback:Ke=>je({type:Ce.Plugin,data:{plugin:pe.name,payload:Ke}})})))||[]},y)};re.addLoadListener(ye=>{try{ne.push(Oe(ye.contentDocument))}catch(_e){console.warn(_e)}});let ge=()=>{ua(),ne.push(Oe(document)),ya=!0};return document.readyState==="interactive"||document.readyState==="complete"?ge():(ne.push(st("DOMContentLoaded",()=>{je({type:Ce.DomContentLoaded,data:{}}),I==="DOMContentLoaded"&&ge()})),ne.push(st("load",()=>{je({type:Ce.Load,data:{}}),I==="load"&&ge()},window))),()=>{ne.forEach(ye=>ye()),ae.destroy(),ya=!1,tN()}}catch(ne){console.warn(ne)}}var pP,vP,K,$E,gP,mP,HE,ze,KE,XE,Zs,dd,hd,rt,ca,YE,BP,qP,GP,WP,zP,$P,HP,ki,yn,JE,XP,YP,QE,ta,ew,fk,dk,Lt,pd,tw,ra,rw,vd,nw,gd,iw,md,ow,yd,sw,bd,aw,Sd,lw,Ed,uw,wd,cw,_d,fw,xd,dw,Td,hw,Cd,pw,Id,vw,Ad,gw,Rd,mw,Od,yw,Pd,bw,kd,Sw,Nd,Ew,Md,ww,Ld,_w,Dd,xw,Ud,Tw,Fd,Cw,Bd,Iw,qd,Aw,Sk,Be,Ek,wk,It,na,Rw,Ck,Ik,Dt,Gd,Ow,ia,Pw,Wd,kw,jd,Nw,Vd,Mw,zd,Lw,$d,Dw,Hd,Uw,Kd,Fw,Xd,Bw,Yd,qw,Jd,Gw,Qd,Ww,Zd,jw,eh,Vw,th,zw,rh,$w,nh,Hw,ih,Kw,oh,Xw,sh,Yw,ah,Jw,lh,Qw,uh,Zw,ch,e_,fh,t_,dh,r_,hh,n_,Lk,qe,bh,i_,o_,oa,ph,vh,Ee,bn,s_,va,wh,Ce,we,ut,tr,xn,Sn,Y_,_h,l_,xh,Pi,xe,Mr,oN,d_,ma,Ch,Ih,_n,vN,Ai,gN,h_,tx,rx,nx,ix,g_,Ah,Rh,Oh,je,ua,mh,ya,Mt,m_,gV,mV,yV,sx=Y(()=>{pP=Object.defineProperty,vP=(e,t,r)=>t in e?pP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,K=(e,t,r)=>vP(e,typeof t!="symbol"?t+"":t,r),gP=Object.defineProperty,mP=(e,t,r)=>t in e?gP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,HE=(e,t,r)=>mP(e,typeof t!="symbol"?t+"":t,r),ze=(e=>(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))(ze||{}),KE={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},XE={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Zs={};dd={};hd={};rt={childNodes:bP,parentNode:SP,parentElement:EP,textContent:wP,contains:_P,getRootNode:xP,host:TP,styleSheets:CP,shadowRoot:IP,querySelector:AP,querySelectorAll:RP,mutationObserver:OP};ca=class{constructor(){HE(this,"idNodeMap",new Map),HE(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){let n=this.getNode(t);if(n){let i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};YE="__rrweb_original__";BP=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,qP=/^(?:[a-z+]+:)?\/\//i,GP=/^www\..*/i,WP=/^(data:)([^,]*),(.*)/i;zP="lightgrey",$P=1,HP=new RegExp("[^a-z0-9-_:]"),ki=-2;XP=/^[^ \t\n\r\u000c]+/,YP=/^[, \t\n\r\u000c]+/;QE=new WeakMap;ta={exports:{}};fk={},dk=Object.freeze(Object.defineProperty({__proto__:null,default:fk},Symbol.toStringTag,{value:"Module"})),Lt=uk(dk);ra={};Sk=bk(),Be=lk(Sk);Be.stringify;Be.fromJSON;Be.plugin;Be.parse;Be.list;Be.document;Be.comment;Be.atRule;Be.rule;Be.decl;Be.root;Be.CssSyntaxError;Be.Declaration;Be.Container;Be.Processor;Be.Document;Be.Comment;Be.Warning;Be.AtRule;Be.Result;Be.Input;Be.Rule;Be.Root;Be.Node;Ek=Object.defineProperty,wk=(e,t,r)=>t in e?Ek(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,It=(e,t,r)=>wk(e,typeof t!="symbol"?t+"":t,r);na={exports:{}};Ck={},Ik=Object.freeze(Object.defineProperty({__proto__:null,default:Ck},Symbol.toStringTag,{value:"Module"})),Dt=xk(Ik);ia={};Lk=Mk(),qe=_k(Lk);qe.stringify;qe.fromJSON;qe.plugin;qe.parse;qe.list;qe.document;qe.comment;qe.atRule;qe.rule;qe.decl;qe.root;qe.CssSyntaxError;qe.Declaration;qe.Container;qe.Processor;qe.Document;qe.Comment;qe.Warning;qe.AtRule;qe.Result;qe.Input;qe.Rule;qe.Root;qe.Node;bh=class e{constructor(...t){It(this,"parentElement",null),It(this,"parentNode",null),It(this,"ownerDocument"),It(this,"firstChild",null),It(this,"lastChild",null),It(this,"previousSibling",null),It(this,"nextSibling",null),It(this,"ELEMENT_NODE",1),It(this,"TEXT_NODE",3),It(this,"nodeType"),It(this,"nodeName"),It(this,"RRNodeType")}get childNodes(){let t=[],r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof e){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},i_={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},o_={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},oa={};ph={};vh={};Ee={childNodes:Uk,parentNode:Fk,parentElement:Bk,textContent:qk,contains:Gk,getRootNode:Wk,host:jk,styleSheets:Vk,shadowRoot:zk,querySelector:$k,querySelectorAll:Hk,mutationObserver:q_};bn=`Please stop import mirror directly. Instead of that,\r 194now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 195or you can use record.mirror to access the mirror instance during recording.`,s_={map:{},getId(){return console.error(bn),-1},getNode(){return console.error(bn),null},removeNodeFromMap(){console.error(bn)},has(){return console.error(bn),!1},reset(){console.error(bn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(s_=new Proxy(s_,{get(e,t,r){return t==="map"&&console.error(bn),Reflect.get(e,t,r)}}));va=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(va=()=>new Date().getTime());wh=class{constructor(){K(this,"id",1),K(this,"styleIDMap",new WeakMap),K(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};Ce=(e=>(e[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",e))(Ce||{}),we=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(we||{}),ut=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(ut||{}),tr=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(tr||{}),xn=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(xn||{}),Sn=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Sn||{}),Y_=(e=>(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))(Y_||{});_h=class{constructor(){K(this,"length",0),K(this,"head",null),K(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<t;n++)r=r?.next||null;return r}addNode(t){let r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&a_(t.previousSibling)){let n=t.previousSibling.__ln.next;r.next=n,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(t.nextSibling&&a_(t.nextSibling)&&t.nextSibling.__ln.previous){let n=t.nextSibling.__ln.previous;r.previous=n,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,n&&(n.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){let r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}},l_=(e,t)=>
vendor: 6,550 bytes, line 195
195`${e}@${t}`,xh=class{constructor(){K(this,"frozen",!1),K(this,"locked",!1),K(this,"texts",[]),K(this,"attributes",[]),K(this,"attributeMap",new WeakMap),K(this,"removes",[]),K(this,"mapRemoves",[]),K(this,"movedMap",{}),K(this,"addedSet",new Set),K(this,"movedSet",new Set),K(this,"droppedSet",new Set),K(this,"removesSubTreeCache",new Set),K(this,"mutationCb"),K(this,"blockClass"),K(this,"blockSelector"),K(this,"maskTextClass"),K(this,"maskTextSelector"),K(this,"inlineStylesheet"),K(this,"maskInputOptions"),K(this,"maskTextFn"),K(this,"maskInputFn"),K(this,"maskAttributeFn"),K(this,"keepIframeSrcFn"),K(this,"recordCanvas"),K(this,"inlineImages"),K(this,"slimDOMOptions"),K(this,"dataURLOptions"),K(this,"doc"),K(this,"mirror"),K(this,"iframeManager"),K(this,"stylesheetManager"),K(this,"shadowDomManager"),K(this,"canvasManager"),K(this,"processedNodeManager"),K(this,"unattachedDoc"),K(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),K(this,"emit",()=>{if(this.frozen||this.locked)return;let t=[],r=new Set,n=new _h,i=l=>{let u=l,a=ki;for(;a===ki;)u=u&&u.nextSibling,a=u&&this.mirror.getId(u);return a},o=l=>{let u=Ee.parentNode(l);if(!u||!X_(l))return;let a=!1;if(l.nodeType===Node.TEXT_NODE){let p=u.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(u)&&(a=!0)}let h=Ri(u)?this.mirror.getId(K_(l)):this.mirror.getId(u),f=i(l);if(h===-1||f===-1)return n.addNode(l);let d=wn(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{$_(p,this.mirror)&&this.iframeManager.addIframe(p),H_(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Eh(l)&&this.shadowDomManager.addShadowRoot(Ee.shadowRoot(l),this.doc)},onIframeLoad:(p,v)=>{this.iframeManager.attachIframe(p,v),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,v)=>{this.stylesheetManager.attachLinkElement(p,v)},cssCaptured:a});d&&(t.push({parentId:h,nextId:f,node:d}),r.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let l of this.movedSet)u_(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(Ee.parentNode(l))||o(l);for(let l of this.addedSet)!c_(this.droppedSet,l)&&!u_(this.removesSubTreeCache,l,this.mirror)||c_(this.movedSet,l)?o(l):this.droppedSet.add(l);let s=null;for(;n.length;){let l=null;if(s){let u=this.mirror.getId(Ee.parentNode(s.value)),a=i(s.value);u!==-1&&a!==-1&&(l=s)}if(!l){let u=n.tail;for(;u;){let a=u;if(u=u.previous,a){let h=this.mirror.getId(Ee.parentNode(a.value));if(i(a.value)===-1)continue;if(h!==-1){l=a;break}else{let d=a.value,p=Ee.parentNode(d);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let v=Ee.host(p);if(this.mirror.getId(v)!==-1){l=a;break}}}}}}if(!l){for(;n.head;)n.removeNode(n.head.value);break}s=l.previous,n.removeNode(l.value),o(l.value)}let c={texts:this.texts.map(l=>{let u=l.node,a=Ee.parentNode(u);return a&&a.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(a),{id:this.mirror.getId(u),value:l.value}}).filter(l=>!r.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{let{attributes:u}=l;if(typeof u.style=="string"){let a=JSON.stringify(l.styleDiff),h=JSON.stringify(l._unchangedStyles);a.length<u.style.length&&(a+h).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!r.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(c))}),K(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r));let n=Array.from(Ee.childNodes(t),i=>Ee.textContent(i)||"").join("");r.attributes.value=fa({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:da(t),value:n,maskInputFn:this.maskInputFn})}),K(this,"processMutation",t=>{if(!gh(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{let r=Ee.textContent(t.target);!at(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:x_(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,V_(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{let r=t.target,n=t.attributeName,i=t.target.getAttribute(n);if(n==="value"){let s=da(r);i=fa({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:i,maskInputFn:this.maskInputFn})}if(at(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let o=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)n="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),n==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!__(r.tagName,n)){if(o.attributes[n]=w_(this.doc,Lr(r.tagName),Lr(n),i),this.maskAttributeFn&&typeof o.attributes[n]=="string"){let s=this.maskAttributeFn(n,o.attributes[n],r);s!==null?o.attributes[n]=s:delete o.attributes[n]}if(n==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let s=this.unattachedDoc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue);for(let c of Array.from(r.style)){let l=r.style.getPropertyValue(c),u=r.style.getPropertyPriority(c);l!==s.style.getPropertyValue(c)||u!==s.style.getPropertyPriority(c)?u===""?o.styleDiff[c]=l:o.styleDiff[c]=[l,u]:o._unchangedStyles[c]=[l,u]}for(let c of Array.from(s.style))r.style.getPropertyValue(c)===""&&(o.styleDiff[c]=!1)}else n==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal")}break}
vendor: 9,903 bytes, lines 195-197
195case"childList":{if(at(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{let n=this.mirror.getId(r),i=Ri(t.target)?this.mirror.getId(Ee.host(t.target)):this.mirror.getId(t.target);at(t.target,this.blockClass,this.blockSelector,!1)||gh(r,this.mirror,this.slimDOMOptions)||!Kk(r,this.mirror)||(this.addedSet.has(r)?(Th(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||z_(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[l_(n,i)]?Th(this.movedSet,r):(this.removes.push({parentId:i,id:n,isShadow:Ri(t.target)&&Oi(t.target)?!0:void 0}),Qk(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),K(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(gh(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[l_(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);at(t,this.blockClass,this.blockSelector,!1)||(Ee.childNodes(t).forEach(n=>this.genAdds(n)),Eh(t)&&Ee.childNodes(Ee.shadowRoot(t)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","maskAttributeFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};xe=e=>Pi?((...r)=>{try{return e(...r)}catch(n){if(Pi&&Pi(n)===!0)return;throw n}}):e;Mr=[];oN=["INPUT","TEXTAREA","SELECT"],d_=new WeakMap;ma=class{constructor(t){K(this,"iframeIdToRemoteIdMap",new WeakMap),K(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,n,i){let o=n||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t),c=o.get(r);return c||(c=this.generateIdFn(),o.set(r,c),s.set(c,r)),c}getIds(t,r){let n=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return r.map(o=>this.getId(t,o,n,i))}getRemoteId(t,r,n){let i=n||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;let o=i.get(r);return o||-1}getRemoteIds(t,r){let n=this.getRemoteIdToIdMap(t);return r.map(i=>this.getRemoteId(t,i,n))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}},Ch=class{constructor(t){K(this,"iframes",new WeakMap),K(this,"crossOriginIframeMap",new WeakMap),K(this,"crossOriginIframeMirror",new ma(E_)),K(this,"crossOriginIframeStyleMirror"),K(this,"crossOriginIframeRootIdMap",new WeakMap),K(this,"mirror"),K(this,"mutationCb"),K(this,"wrappedEmit"),K(this,"loadListener"),K(this,"stylesheetManager"),K(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ma(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){var n,i;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((n=t.contentWindow)==null||n.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){let r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;let i=this.crossOriginIframeMap.get(t.source);if(!i)return;let o=this.transformCrossOriginEvent(i,r.data.event);o&&this.wrappedEmit(o,r.data.isCheckout)}transformCrossOriginEvent(t,r){var n;switch(r.type){case Ce.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);let i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(r.data.node,i),{timestamp:r.timestamp,type:Ce.IncrementalSnapshot,data:{source:we.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Ce.Meta:case Ce.Load:case Ce.DomContentLoaded:return!1;case Ce.Plugin:return r;case Ce.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case Ce.IncrementalSnapshot:switch(r.data.source){case we.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);let o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(i.node,o)}),r.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case we.Drag:case we.TouchMove:case we.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case we.ViewportResize:return!1;case we.MediaInteraction:case we.MouseInteraction:case we.Scroll:case we.CanvasMutation:case we.Input:return this.replaceIds(r.data,t,["id"]),r;case we.StyleSheetRule:case we.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case we.Font:return r;case we.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),r;case we.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(n=r.data.styles)==null||n.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),r}}return!1}replace(t,r,n,i){for(let o of i)!Array.isArray(r[o])&&typeof r[o]!="number"||(Array.isArray(r[o])?r[o]=t.getIds(n,r[o]):r[o]=t.getId(n,r[o]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(t,r){t.type!==Y_.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}},Ih=class{constructor(t){K(this,"shadowDoms",new WeakSet),K(this,"mutationCb"),K(this,"scrollCb"),K(this,"bypassOptions"),K(this,"mirror"),K(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!Oi(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);let n=Q_({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(Z_({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(Ee.host(t))),this.restoreHandlers.push(ex({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){let n=this;this.restoreHandlers.push(Tn(t.prototype,"attachShadow",function(i){return function(o){let s=i.call(this,o),c=Ee.shadowRoot(this);return c&&X_(this)&&n.addShadowRoot(c,r),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},_n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vN=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Ai=0;Ai<_n.length;Ai++)vN[_n.charCodeAt(Ai)]=Ai;gN=function(e){var t=new Uint8Array(e),r,n=t.length,i="";for(r=0;r<n;r+=3)i+=_n[t[r]>>2],i+=_n[(t[r]&3)<<4|t[r+1]>>4],i+=_n[(t[r+1]&15)<<2|t[r+2]>>6],i+=_n[t[r+2]&63];return n%3===2?i=i.substring(0,i.length-1)+"=":n%3===1&&(i=i.substring(0,i.length-2)+"=="),i},h_=new Map;tx=(e,t,r)=>{if(!e||!(nx(e,t)||typeof e=="object"))return;let n=e.constructor.name,i=mN(r,n),o=i.indexOf(e);return o===-1&&(o=i.length,i.push(e)),o};rx=(e,t,r)=>e.map(n=>la(n,t,r)),nx=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);ix=`(function() { 196 "use strict"; 197 var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
197+/"; 198 var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256); 199 for (var i = 0; i < chars.length; i++) { 200 lookup[chars.charCodeAt(i)] = i; 201 } 202 var encode = function(arraybuffer) { 203 var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = ""; 204 for (i2 = 0; i2 < len; i2 += 3) { 205 base64 += chars[bytes[i2] >> 2]; 206 base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4]; 207 base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6]; 208 base64 += chars[bytes[i2 + 2] & 63]; 209 } 210 if (len % 3 === 2) { 211 base64 = base64.substring(0, base64.length - 1) + "="; 212 } else if (len % 3 === 1) { 213 base64 = base64.substring(0, base64.length - 2) + "=="; 214 } 215 return base64; 216 }; 217 const lastBlobMap = /* @__PURE__ */ new Map(); 218 const transparentBlobMap = /* @__PURE__ */ new Map(); 219 async function getTransparentBlobFor(width, height, dataURLOptions) { 220 const id = \`\${width}-\${height}\`; 221 if ("OffscreenCanvas" in globalThis) { 222 if (transparentBlobMap.has(id)) return transparentBlobMap.get(id); 223 const offscreen = new OffscreenCanvas(width, height); 224 offscreen.getContext("2d"); 225 const blob = await offscreen.convertToBlob(dataURLOptions); 226 const arrayBuffer = await blob.arrayBuffer(); 227 const base64 = encode(arrayBuffer); 228 transparentBlobMap.set(id, base64); 229 return base64; 230 } else { 231 return ""; 232 } 233 } 234 const worker = self; 235 worker.onmessage = async function(e) { 236 if ("OffscreenCanvas" in globalThis) { 237 const { id, bitmap, width, height, dataURLOptions } = e.data; 238 const transparentBase64 = getTransparentBlobFor( 239 width, 240 height, 241 dataURLOptions 242 ); 243 const offscreen = new OffscreenCanvas(width, height); 244 const ctx = offscreen.getContext("2d"); 245 ctx.drawImage(bitmap, 0, 0); 246 bitmap.close(); 247 const blob = await offscreen.convertToBlob(dataURLOptions); 248 const type = blob.type; 249 const arrayBuffer = await blob.arrayBuffer(); 250 const base64 = encode(arrayBuffer); 251 if (!lastBlobMap.has(id) && await transparentBase64 === base64) { 252 lastBlobMap.set(id, base64); 253 return worker.postMessage({ id }); 254 } 255 if (lastBlobMap.get(id) === base64) return worker.postMessage({ id }); 256 worker.postMessage({ 257 id, 258 type, 259 base64, 260 width, 261 height 262 }); 263 lastBlobMap.set(id, base64); 264 } else { 265 return worker.postMessage({ id: e.data.id }); 266 } 267 }; 268})(); 269//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map 270`,g_=typeof self<"u"&&self.Blob&&new Blob([ix],{type:"text/javascript;charset=utf-8"});Ah=class{constructor(t){K(this,"pendingCanvasMutations",new Map),K(this,"rafStamps",{latestId:0,invokeId:null}),K(this,"mirror"),K(this,"mutationCb"),K(this,"resetObservers"),K(this,"frozen",!1),K(this,"locked",!1),K(this,"processMutation",(l,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(u)});let{sampling:r="all",win:n,blockClass:i,blockSelector:o,recordCanvas:s,dataURLOptions:c}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&r==="all"&&this.initCanvasMutationObserver(n,i,o),s&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,i,o,{dataURLOptions:c})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,n,i,o){let s=p_(r,n,i,!0),c=new Map,l=new EN;l.onmessage=p=>{let{id:v}=p.data;if(c.set(v,!1),!("base64"in p.data))return;let{base64:g,type:y,width:m,height:E}=p.data;this.mutationCb({id:v,type:xn["2D"],commands:[{property:"clearRect",args:[0,0,m,E]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:y}]},0,0]}]})};let u=1e3/t,a=0,h,f=()=>{let p=[];return r.document.querySelectorAll("canvas").forEach(v=>{at(v,n,i,!0)||p.push(v)}),p},d=p=>{if(a&&p-a<u){h=requestAnimationFrame(d);return}
270a=p,f().forEach(async v=>{var g;let y=this.mirror.getId(v);if(c.get(y)||v.width===0||v.height===0)return;if(c.set(y,!0),["webgl","webgl2"].includes(v.__context)){let E=v.getContext(v.__context);((g=E?.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&E.clear(E.COLOR_BUFFER_BIT)}let m=await createImageBitmap(v);l.postMessage({id:y,bitmap:m,width:v.width,height:v.height,dataURLOptions:o.dataURLOptions},[m])}),h=requestAnimationFrame(d)};h=requestAnimationFrame(d),this.resetObservers=()=>{s(),cancelAnimationFrame(h)}}initCanvasMutationObserver(t,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=p_(t,r,n,!1),o=yN(this.processMutation.bind(this),t,r,n),s=SN(this.processMutation.bind(this),t,r,n);this.resetObservers=()=>{i(),o(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{let n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(t);if(!n||r===-1)return;let i=n.map(s=>{let{type:c,...l}=s;return l}),{type:o}=n[0];this.mutationCb({id:r,type:o,commands:i}),this.pendingCanvasMutations.delete(t)}},Rh=class{constructor(t){K(this,"trackedLinkElements",new WeakSet),K(this,"mutationCb"),K(this,"adoptedStyleSheetCb"),K(this,"styleMirror",new wh),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;let n={id:r,styleIds:[]},i=[];for(let o of t){let s;if(this.styleMirror.has(o))s=this.styleMirror.getId(o);else{s=this.styleMirror.add(o);let c=[];try{c=Array.from(o.cssRules,(l,u)=>({rule:kh(l,o.href),index:u}))}catch(l){if(!(l instanceof DOMException&&l.name==="SecurityError"))throw l}i.push({styleId:s,rules:c})}n.styleIds.push(s)}i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},Oh=class{constructor(){K(this,"nodeMap",new WeakMap),K(this,"active",!1)}inOtherBuffer(t,r){let n=this.nodeMap.get(t);return n&&Array.from(n).some(i=>i!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}},ya=!1;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=(($E=e.contentWindow)==null?void 0:$E.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}Mt=DP();pr.addCustomEvent=(e,t)=>{if(!ya)throw new Error("please add custom event after start recording");je({type:Ce.Custom,data:{tag:e,payload:t}})};pr.freezePage=()=>{Mr.forEach(e=>e.freeze())};pr.takeFullSnapshot=e=>{if(!ya)throw new Error("please take full snapshot after start recording");ua(e)};pr.mirror=Mt;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(m_||(m_={}));({addCustomEvent:gV}=pr),{freezePage:mV}=pr,{takeFullSnapshot:yV}=pr});var Xh,wN,_N,Yh,ax=Y(()=>{ee();Xh=function(e){return e===void 0?!1:typeof e=="boolean"?e:e.enabled!==!1},wN=function(e){var t;return typeof e=="object"&&e!==null?{allowlist:(t=e.allowlist)!==null&&t!==void 0?t:[],excludelist:e.excludelist||e.blocklist||[]}:{allowlist:[],excludelist:[]}},_N=function(e,t,r){if(t.length===0&&r.length===0)return e;var n=t.length>0?t:["/**"];try{var i=JSON.parse(e);return Kr(i,n,r),JSON.stringify(i)}catch{return e}},Yh=function(e,t,r,n){var i=wN(t),o=i.allowlist,s=i.excludelist,c=_N(e,o,s);return n(c,r)}});var cx={};kn(cx,{NetworkObservers:()=>IN});function TN(e){return e?xN.some(function(t){return e.toLowerCase().startsWith(t)}):!1}function CN(e){if(e!=null){if(typeof e=="string")return e;if(e instanceof URLSearchParams)return e.toString();if(e instanceof FormData){var t=[];return e.forEach(function(r,n){t.push("".concat(n,"=").concat(typeof r=="string"?r:"[File]"))}),t.join("&")}}}function ux(e,t){if(new Blob([e]).size<=t)return{value:e,truncated:!1};for(var r=0,n=Math.min(e.length,t);r<n;){var i=Math.ceil((r+n)/2);new Blob([e.slice(0,i)]).size<=t?r=i:n=i-1}return r>0&&e.charCodeAt(r-1)>=55296&&e.charCodeAt(r-1)<=56319&&(r-=1),{value:e.slice(0,r),truncated:!0}}var lx,xN,IN,fx=Y(()=>{z();ee();ax();lx=10240,xN=["image/","audio/","video/","application/octet-stream","font/"];IN=(function(){function e(){this.fetchObserver=null}return e.prototype.start=function(t,r){this.eventCallback=t,this.networkConfig=r,this.observeFetch()},e.prototype.stop=function(){var t;(t=this.fetchObserver)===null||t===void 0||t.call(this),this.fetchObserver=null,this.eventCallback=void 0,this.networkConfig=void 0},e.prototype.notifyEvent=function(t){var r;(r=this.eventCallback)===null||r===void 0||r.call(this,t)},e.prototype.observeFetch=function(){var t=this,r=j();if(r){var n=r.fetch;n&&(r.fetch=function(i,o){return O(t,void 0,void 0,function(){var s,c,l,u,a,h,g,f,d,p,v,g,y,m=this,E,w;return R(this,function(b){switch(b.label){case 0:s=Date.now(),c={timestamp:s,type:"fetch",method:o?.method||"GET",url:i.toString(),requestHeaders:o?.headers},l=(E=this.networkConfig)===null||E===void 0?void 0:E.body,l&&Xh(l.request)&&(u=CN(o?.body),u!==void 0&&(a=(w=l.maxBodySizeBytes)!==null&&w!==void 0?w:lx,c.requestBody=Yh(u,l.request,a,ux).value)),b.label=1;case 1:return b.trys.push([1,3,,4]),[4,n(i,o)];case 2:return h=b.sent(),g=Date.now(),c.status=h.status,c.duration=g-s,f={}
270,h.headers.forEach(function(S,_){f[_]=S}),c.responseHeaders=f,l&&Xh(l.response)?(d=f["content-type"]||null,TN(d)?(c.responseBodyStatus="skipped_binary",this.notifyEvent(c)):(p=h.clone(),p.text().then(function(S){var _,x=(_=l.maxBodySizeBytes)!==null&&_!==void 0?_:lx,I=Yh(S,l.response,x,ux),C=I.value,k=I.truncated;c.responseBody=C,c.responseBodyStatus=k?"truncated":"captured",m.notifyEvent(c)},function(){c.responseBodyStatus="error",m.notifyEvent(c)}))):this.notifyEvent(c),[2,h];case 3:throw v=b.sent(),g=Date.now(),c.duration=g-s,y=v,c.error={name:y.name||"UnknownError",message:y.message||"An unknown error occurred"},this.notifyEvent(c),v;case 4:return[2]}})})},this.fetchObserver=function(){r.fetch=n})}},e})()});var Qx=zi((qi,Ba)=>{(function(e,t){"use strict";var r="0.7.33",n="",i="?",o="function",s="undefined",c="object",l="string",u="major",a="model",h="name",f="type",d="vendor",p="version",v="architecture",g="console",y="mobile",m="tablet",E="smarttv",w="wearable",b="embedded",S=350,_="Amazon",x="Apple",I="ASUS",C="BlackBerry",k="Browser",N="Chrome",T="Edge",F="Firefox",D="Google",G="Huawei",q="LG",$="Microsoft",L="Motorola",W="Opera",M="Samsung",X="Sharp",A="Sony",Q="Xiaomi",J="Zebra",te="Facebook",se=function(ve,be){var me={};for(var Se in ve)be[Se]&&be[Se].length%2===0?me[Se]=be[Se].concat(ve[Se]):me[Se]=ve[Se];return me},ce=function(ve){for(var be={},me=0;me<ve.length;me++)be[ve[me].toUpperCase()]=ve[me];return be},de=function(ve,be){return typeof ve===l?V(be).indexOf(V(ve))!==-1:!1},V=function(ve){return ve.toLowerCase()},re=function(ve){return typeof ve===l?ve.replace(/[^\d\.]/g,n).split(".")[0]:t},ae=function(ve,be){if(typeof ve===l)return ve=ve.replace(/^\s\s*/,n),typeof be===s?ve:ve.substring(0,S)},fe=function(ve,be){for(var me=0,Se,he,qr,Re,mr,mt;me<be.length&&!mr;){var Vi=be[me],Ep=be[me+1];for(Se=he=0;Se<Vi.length&&!mr;)if(mr=Vi[Se++].exec(ve),mr)for(qr=0;qr<Ep.length;qr++)mt=mr[++he],Re=Ep[qr],typeof Re===c&&Re.length>0?Re.length===2?typeof Re[1]==o?this[Re[0]]=Re[1].call(this,mt):this[Re[0]]=Re[1]:Re.length===3?typeof Re[1]===o&&!(Re[1].exec&&Re[1].test)?this[Re[0]]=mt?Re[1].call(this,mt,Re[2]):t:this[Re[0]]=mt?mt.replace(Re[1],Re[2]):t:Re.length===4&&(this[Re[0]]=mt?Re[3].call(this,mt.replace(Re[1],Re[2])):t):this[Re]=mt||t;me+=2}},ne=function(ve,be){for(var me in be)if(typeof be[me]===c&&be[me].length>0){for(var Se=0;Se<be[me].length;Se++)if(de(be[me][Se],ve))return me===i?t:me}else if(de(be[me],ve))return me===i?t:me;return ve},Oe={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},ge={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"},ye={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,p],[/opios[\/ ]+([\w\.]+)/i],[p,[h,W+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[h,W]],[/(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],[h,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[h,"UC"+k]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[p,[h,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[p,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[h,"IE"]],[/yabrowser\/([\w\.]+)/i],[p,[h,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+k],p],[/\bfocus\/([\w\.]+)/i],[p,[h,F+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[h,W+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[h,W+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[h,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[p,[h,F]],[/\bqihu|(qi?ho?o?|360)browser/i],[[h,"360 "+k]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1 "+k],p],[/(comodo_dragon)\/([\w\.]+)/i],[[h,/_/g," "],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[h,p],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,te],p],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[h,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[h,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[h,N+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,N+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[h,"Android "+k]],[/(chrome|omniweb|arora|[t
vendor: 4,750 bytes, line 270
270izenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[p,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[p,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[p,ne,Oe]],[/(webkit|khtml)\/([\w\.]+)/i],[h,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[h,F+" 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],[h,p],[/(cobalt)\/([\w\.]+)/i],[h,[p,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[v,"amd64"]],[/(ia32(?=;))/i],[[v,V]],[/((?:i[346]|x)86)[;\)]/i],[[v,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[v,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[v,"armhf"]],[/windows (ce|mobile); ppc;/i],[[v,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[v,/ower/,n,V]],[/(sun4\w)[;\)]/i],[[v,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[v,V]]],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],[a,[d,M],[f,m]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[a,[d,M],[f,y]],[/((ipod|iphone)\d+,\d+)/i],[a,[d,x],[f,y]],[/(ipad\d+,\d+)/i],[a,[d,x],[f,m]],[/\((ip(?:hone|od)[\w ]*);/i],[a,[d,x],[f,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[a,[d,x],[f,m]],[/(macintosh);/i],[a,[d,x]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[a,[d,G],[f,m]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[a,[d,G],[f,y]],[/\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],[[a,/_/g," "],[d,Q],[f,y]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[a,/_/g," "],[d,Q],[f,m]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[a,[d,"OPPO"],[f,y]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[a,[d,"Vivo"],[f,y]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[a,[d,"Realme"],[f,y]],[/\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],[a,[d,L],[f,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[a,[d,L],[f,m]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[a,[d,q],[f,m]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[a,[d,q],[f,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[a,[d,"Lenovo"],[f,m]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[a,/_/g," "],[d,"Nokia"],[f,y]],[/(pixel c)\b/i],[a,[d,D],[f,m]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[a,[d,D],[f,y]],[/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],[a,[d,A],[f,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[a,"Xperia Tablet"],[d,A],[f,m]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[a,[d,"OnePlus"],[f,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[a,[d,_],[f,m]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[a,/(.+)/g,"Fire Phone $1"],[d,_],[f,y]],[/(playbook);[-\w\),; ]+(rim)/i],[a,d,[f,m]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[a,[d,C],[f,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[a,[d,I],[f,m]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[a,[d,I],[f,y]],[/(nexus 9)/i],[a,[d,"HTC"],[f,m]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[d,[a,/_/g," "],[f,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[a,[d,"Acer"],[f,m]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[a,[d,"Meizu"],[f,y]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[a,[d,X],[f,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asu
vendor: 6,624 bytes, line 270
270s)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d,a,[f,y]],[/(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,a,[f,m]],[/(surface duo)/i],[a,[d,$],[f,m]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[a,[d,"Fairphone"],[f,y]],[/(u304aa)/i],[a,[d,"AT&T"],[f,y]],[/\bsie-(\w*)/i],[a,[d,"Siemens"],[f,y]],[/\b(rct\w+) b/i],[a,[d,"RCA"],[f,m]],[/\b(venue[\d ]{2,7}) b/i],[a,[d,"Dell"],[f,m]],[/\b(q(?:mv|ta)\w+) b/i],[a,[d,"Verizon"],[f,m]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[a,[d,"Barnes & Noble"],[f,m]],[/\b(tm\d{3}\w+) b/i],[a,[d,"NuVision"],[f,m]],[/\b(k88) b/i],[a,[d,"ZTE"],[f,m]],[/\b(nx\d{3}j) b/i],[a,[d,"ZTE"],[f,y]],[/\b(gen\d{3}) b.+49h/i],[a,[d,"Swiss"],[f,y]],[/\b(zur\d{3}) b/i],[a,[d,"Swiss"],[f,m]],[/\b((zeki)?tb.*\b) b/i],[a,[d,"Zeki"],[f,m]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d,"Dragon Touch"],a,[f,m]],[/\b(ns-?\w{0,9}) b/i],[a,[d,"Insignia"],[f,m]],[/\b((nxa|next)-?\w{0,9}) b/i],[a,[d,"NextBook"],[f,m]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d,"Voice"],a,[f,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[d,"LvTel"],a,[f,y]],[/\b(ph-1) /i],[a,[d,"Essential"],[f,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[a,[d,"Envizen"],[f,m]],[/\b(trio[-\w\. ]+) b/i],[a,[d,"MachSpeed"],[f,m]],[/\btu_(1491) b/i],[a,[d,"Rotor"],[f,m]],[/(shield[\w ]+) b/i],[a,[d,"Nvidia"],[f,m]],[/(sprint) (\w+)/i],[d,a,[f,y]],[/(kin\.[onetw]{3})/i],[[a,/\./g," "],[d,$],[f,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[a,[d,J],[f,m]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[a,[d,J],[f,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d,a,[f,g]],[/droid.+; (shield) bui/i],[a,[d,"Nvidia"],[f,g]],[/(playstation [345portablevi]+)/i],[a,[d,A],[f,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[a,[d,$],[f,g]],[/smart-tv.+(samsung)/i],[d,[f,E]],[/hbbtv.+maple;(\d+)/i],[[a,/^/,"SmartTV"],[d,M],[f,E]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d,q],[f,E]],[/(apple) ?tv/i],[d,[a,x+" TV"],[f,E]],[/crkey/i],[[a,N+"cast"],[d,D],[f,E]],[/droid.+aft(\w)( bui|\))/i],[a,[d,_],[f,E]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[a,[d,X],[f,E]],[/(bravia[\w ]+)( bui|\))/i],[a,[d,A],[f,E]],[/(mitv-\w{5}) bui/i],[a,[d,Q],[f,E]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[d,ae],[a,ae],[f,E]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,E]],[/((pebble))app/i],[d,a,[f,w]],[/droid.+; (glass) \d/i],[a,[d,D],[f,w]],[/droid.+; (wt63?0{2,3})\)/i],[a,[d,J],[f,w]],[/(quest( 2)?)/i],[a,[d,te],[f,w]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d,[f,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[a,[f,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[a,[f,m]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,m]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,y]],[/(android[-\w\. ]{0,9});.+buil/i],[a,[d,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[h,T+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[h,"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],[h,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,p],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[h,[p,ne,ge]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,"Windows"],[p,ne,ge]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,"Mac OS"],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[p,h],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[h,p],[/\(bb(10);/i],[p,[h,C]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[h,F+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[h,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[h,N+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[h,"Chromium OS"],p],[/(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],[h,p],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[h,p]]},_e=function(ve,be){if(typeof ve===c&&(be=ve,ve=t),!(this instanceof _e))return new _e(ve,be).getResult();var me=ve||(typeof e!==s&&e.navigator&&e.navigator.userAgent?e.navigator.userAgent:n),Se=be?se(ye,be):ye;return this.getBrowser=function(){var he={};return he[h]=t,he[p]=t,fe.call(he,me,Se.browser),he.major=re(he.version),he},this.getCPU=function(){var he={};return he[v]=t,fe.call(he,me,Se.cpu),he},this.getDevice=function(){var he={};return he[d]=t,he[a]=t,he[f]=t,fe.call(he,me,Se.device),he},this.getEngine=function(){var he={};return he[h]=t,he[p]=t,fe.call(he,me,Se.engine),he},this.getOS=function(){var he={};return he[h]=t,he[p]=t,fe.call(he,me,Se.os),he},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 me},this.setUA=function(he){return me=typeof he===l&&he.length>S?ae(he,S):he,this},this.setUA(me),this};_e.VERSION=r,_e.BROWSER=ce([h,p,u]),_e.CPU=ce([v]),_e.DEVICE=ce([a,d,f,g,y,E,m,w,b]),_e.ENGINE=_e.OS=ce([h,p]),typeof qi!==s?(typeof Ba!==s&&Ba.exports&&(qi=Ba.exports=_e),qi.UAParser=_e):typeof define===o&&define.amd?define(function(){return _e}
270):typeof e!==s&&(e.UAParser=_e);var pe=typeof e!==s&&(e.jQuery||e.Zepto);if(pe&&!pe.ua){var Ke=new _e;pe.ua=Ke.getResult(),pe.ua.get=function(){return Ke.getUA()},pe.ua.set=function(ve){Ke.setUA(ve);var be=Ke.getResult();for(var me in be)pe.ua[me]=be[me]}}})(typeof window=="object"?window:qi)});z();ee();z();ee();z();ee();var tn=function(e,t){return typeof e=="boolean"?e:e?.[t]===!1?!1:ou()?!!e?.[t]:!0},To=function(e){return tn(e,"attribution")},cg=function(e){return tn(e,"fileDownloads")},lu=function(e){return tn(e,"formInteractions")},uu=function(e){return tn(e,"pageViews")},cu=function(e){return tn(e,"sessions")},fg=function(e){return tn(e,"pageUrlEnrichment")},fu=function(e){return typeof e=="boolean"?e:typeof e=="object"&&(e.networkTracking===!0||typeof e.networkTracking=="object")},du=function(e){return typeof e=="boolean"?e:typeof e=="object"&&(e.elementInteractions===!0||typeof e.elementInteractions=="object")},dg=function(e){return typeof e=="boolean"?e:typeof e=="object"&&e.webVitals===!0},hu=function(e){return typeof e=="boolean"?e:typeof e=="object"&&(e.frustrationInteractions===!0||typeof e.frustrationInteractions=="object")},hg=function(e){return typeof e=="object"&&(e.performanceTracking===!0||typeof e.performanceTracking=="object")},pg=function(e){if(typeof e.autocapture=="object"){var t=e.autocapture.performanceTracking;if(t===!0)return{mainThreadBlock:!0};if(typeof t=="object"&&t!==null)return t}},vg=function(e){return typeof e=="boolean"?e:typeof e=="object"&&e!==null&&e.enabled!==!1},gg=function(e){if(du(e.autocapture)&&typeof e.autocapture=="object"&&typeof e.autocapture.elementInteractions=="object")return e.autocapture.elementInteractions},mg=function(e){if(hu(e.autocapture)&&typeof e.autocapture=="object"&&typeof e.autocapture.frustrationInteractions=="object")return e.autocapture.frustrationInteractions},yg=function(e){if(fu(e.autocapture)){var t=void 0;return typeof e.autocapture=="object"&&typeof e.autocapture.networkTracking=="object"?t=e.autocapture.networkTracking:e.networkTrackingOptions&&(t=e.networkTrackingOptions),P(P({},t),{captureRules:Kl(t?.captureRules,e.loggerProvider)})}},pu=function(e){var t=function(){return!1},r=void 0,n,i=e.pageCounter,o=uu(e.defaultTracking);return o&&(t=void 0,n=void 0,e.defaultTracking&&typeof e.defaultTracking=="object"&&e.defaultTracking.pageViews&&typeof e.defaultTracking.pageViews=="object"&&("trackOn"in e.defaultTracking.pageViews&&(t=e.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in e.defaultTracking.pageViews&&(r=e.defaultTracking.pageViews.trackHistoryChanges),"eventType"in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(n=e.defaultTracking.pageViews.eventType))),{trackOn:t,trackHistoryChanges:r,eventType:n,pageCounter:i}},bg=function(e){return To(e.defaultTracking)&&e.defaultTracking&&typeof e.defaultTracking=="object"&&e.defaultTracking.attribution&&typeof e.defaultTracking.attribution=="object"?P({},e.defaultTracking.attribution):{}},Sg=function(e){if(lu(e.defaultTracking)&&e.defaultTracking&&typeof e.defaultTracking=="object"&&typeof e.defaultTracking.formInteractions=="object")return e.defaultTracking.formInteractions};var Co=function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.name,o=n.args,s=n.resolve,c=e&&e[i];if(typeof c=="function"){var l=c.apply(e,o);typeof s=="function"&&s(l?.promise)}}return e},Io=function(e){var t=e;return t&&t._q!==void 0};ee();var PC=function(e){var t,r;return typeof((r=(t=e.chrome)===null||t===void 0?void 0:t.runtime)===null||r===void 0?void 0:r.id)=="string"},kC=function(e){var t=e.ServiceWorkerGlobalScope;return typeof t=="function"&&e instanceof t},NC=function(e){var t=e.WorkerGlobalScope;return typeof t=="function"&&e instanceof t},MC=function(e){return typeof e.document<"u"},LC=function(e){var t,r;return typeof((r=(t=e.process)===null||t===void 0?void 0:t.versions)===null||r===void 0?void 0:r.node)=="string"};function Eg(){var e=j();if(!e)return"unknown";var t=PC(e);return kC(e)?t?"chrome_extension_service_worker":"service_worker":NC(e)?"web_worker":MC(e)?t?"chrome_extension":"browser":LC(e)?"node":"unknown"}z();ee();
270var rn="2.45.6";var Ao="amplitude-ts";var vu="Web",DC="$remote",wg=(function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat(Ao,"/").concat(rn),typeof navigator<"u"&&(this.userAgent=navigator.userAgent)}return e.prototype.setup=function(t){return this.config=t,Promise.resolve(void 0)},e.prototype.execute=function(t){var r,n;return O(this,void 0,void 0,function(){var i,o,s,c;return R(this,function(l){return i=new Date().getTime(),o=(r=this.config.lastEventId)!==null&&r!==void 0?r:-1,s=(n=t.event_id)!==null&&n!==void 0?n:o+1,this.config.lastEventId=s,t.time||(this.config.lastEventTime=i),c=P(P(P(P(P(P(P(P({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:vu}),this.config.trackingOptions.language&&{language:Cl()}),this.config.trackingOptions.ipAddress&&{ip:DC}),{insert_id:Xe(),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}}),t),{event_id:s,library:this.library,user_agent:this.userAgent}),[2,c]})})},e})();z();ee();z();ee();var Ro=1e3,gu=(function(e){De(t,e);function t(r){var n=this,i,o,s;try{s=(i=j())===null||i===void 0?void 0:i.localStorage}catch(c){(o=r?.loggerProvider)===null||o===void 0||o.debug("Failed to access localStorage. error=".concat(JSON.stringify(c))),s=void 0}return n=e.call(this,s)||this,n.loggerProvider=r?.loggerProvider,n}return t.prototype.set=function(r,n){var i;return O(this,void 0,void 0,function(){var o;return R(this,function(s){switch(s.label){case 0:return Array.isArray(n)&&n.length>Ro?(o=n.length-Ro,[4,e.prototype.set.call(this,r,n.slice(0,Ro))]):[3,2];case 1:return s.sent(),(i=this.loggerProvider)===null||i===void 0||i.error("Failed to save ".concat(o," events because the queue length exceeded ").concat(Ro,".")),[3,4];case 2:return[4,e.prototype.set.call(this,r,n)];case 3:s.sent(),s.label=4;case 4:return[2]}})})},t})(Jt);z();ee();var _g=(function(e){De(t,e);function t(){var r;return e.call(this,(r=j())===null||r===void 0?void 0:r.sessionStorage)||this}return t})(Jt);z();ee();var xg=(function(e){De(t,e);function t(r){r===void 0&&(r={});var n=e.call(this)||this;return n.state={done:4},n.customHeaders=r,n}return t.prototype.send=function(r,n,i){return i===void 0&&(i=!1),O(this,void 0,void 0,function(){var o=this;return R(this,function(s){return[2,new Promise(function(c,l){typeof XMLHttpRequest>"u"&&l(new Error("XHRTransport is not supported."));var u=new XMLHttpRequest;u.open("POST",r,!0),u.onreadystatechange=function(){if(u.readyState===o.state.done){var v=u.responseText;try{c(o.buildResponse(JSON.parse(v)))}catch{c(o.buildResponse({code:u.status}))}}};var a={"Content-Type":"application/json",Accept:"*/*"},h=JSON.stringify(n),f=i&&h.length>=$n&&Hn(),d=function(v){var g,y;a=P(P({},o.customHeaders),a);try{for(var m=U(Object.entries(a)),E=m.next();!E.done;E=m.next()){var w=B(E.value,2),b=w[0],S=w[1];u.setRequestHeader(b,S)}}catch(_){g={error:_}}finally{try{E&&!E.done&&(y=m.return)&&y.call(m)}finally{if(g)throw g.error}}u.send(v)},p=function(){return O(o,void 0,void 0,function(){var v;return R(this,function(g){switch(g.label){case 0:return f?[4,Kn(h)]:[3,2];case 1:return v=g.sent(),v?(a["Content-Encoding"]="gzip",d(v)):d(h),[3,3];case 2:d(h),g.label=3;case 3:return[2]}})})};p().catch(l)})]})})},t})(Ot);z();ee();var UC=16*1024,Tg=(function(e){De(t,e);function t(r,n,i){r===void 0&&(r={});var o=e.call(this)||this;return o.customHeaders=r,o.enableKeepalive=n!==!1,o.referrerPolicy=i,o}return t.prototype.send=function(r,n,i){return i===void 0&&(i=!1),O(this,void 0,void 0,function(){var o,s,c,l,u,a,h,f,d;return R(this,function(p){switch(p.label){case 0:if(typeof fetch>"u")throw new Error("FetchTransport is not supported");return o=JSON.stringify(n),s=i&&o.length>=$n&&Hn(),c=o,l={"Content-Type":"application/json",Accept:"*/*"},s?[4,Kn(o)]:[3,2];case 1:u=p.sent(),u&&(l["Content-Encoding"]="gzip",c=u),p.label=2;case 2:return l=P(P({},this.customHeaders),l),a=typeof c=="string"?c.length:c.byteLength,h={headers:l,body:c,method:"POST",keepalive:this.enableKeepalive&&a<=UC},this.referrerPolicy&&(h.referrerPolicy=this.referrerPolicy),[4,fetch(r,h)];case 3:return f=p.sent(),[4,f.text()];case 4:d=p.sent();try{return[2,this.buildResponse(JSON.parse(d))]}catch{return[2,this.buildResponse({code:f.status})]}return[2]}})})},t})(Ot);z();ee();var Cg=(function(e){De(t,e);function t(){return e.call(this)||this}return t.prototype.send=function(r,n,i){return i===void 0&&(i=!1),O(this,void 0,void 0,function(){var o=this;return R(this,function(s){return[2,new Promise(function(c,l){var u=j();if(!u?.navigator.sendBeacon)throw new Error("SendBeaconTransport is not supported");try{var a=JSON.stringify(n),h=u.navigator.sendBeacon(r,a);return c(h?o.buildResponse({code:200,events_ingested:n.events.length,payload_size_bytes:a.length,server_upload_time:Date.now()}):o.buildResponse({code:500}))}catch(f){l(f)}})]})})},t})(Ot);z();ee();var Ig=function(e,t,r){return r===void 0&&(r=!0),O(void 0,void 0,void 0,function(){var n,i,o,s,c,l,u,a,h;return R(this,function(f){switch(f.label){case 0:return n=Tl(e),[4,t.getRaw(n)];case 1:return i=f.sent(),i?r?[4,t.remove(n)]:[3,3]:[2,{optOut:!1}];case 2:f.sent(),f.label=3;
270case 3:return o=B(i.split("."),6),s=o[0],c=o[1],l=o[2],u=o[3],a=o[4],h=o[5],[2,{deviceId:s,userId:FC(c),sessionId:mu(u),lastEventId:mu(h),lastEventTime:mu(a),optOut:!!l}]}})})},mu=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},FC=function(e){if(!(!atob||!escape||!e))try{return decodeURIComponent(escape(atob(e)))}catch{return}};var wt="[Amplitude]",jF="".concat(wt," Page Viewed"),yu="".concat(wt," Form Started"),Ag="".concat(wt," Form Submitted"),Rg="".concat(wt," File Downloaded"),bu="session_start",Su="session_end",Og="".concat(wt," File Extension"),Pg="".concat(wt," File Name"),kg="".concat(wt," Link ID"),Ng="".concat(wt," Link Text"),Mg="".concat(wt," Link URL"),Oo="".concat(wt," Form ID"),Po="".concat(wt," Form Name"),ko="".concat(wt," Form Destination"),ri="cookie",No="US";z();ee();ee();var Lg=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},qC=function(e){return Object.values(e).every(function(t){return!t})},GC=function(e){var t=P(P({},e),{referring_domain:void 0,referrer:void 0});return Object.values(t).every(function(r){return!r})},Ug=function(e,t,r,n,i,o){i===void 0&&(i=!0);var s=e.referrer,c=e.referring_domain,l=Rt(e,["referrer","referring_domain"]),u=t||{},a=u.referrer,h=u.referring_domain,f=Rt(u,["referrer","referring_domain"]),d=r.excludeInternalReferrers;if(d){var p=VC(d,n);if(!(p instanceof TypeError)&&e.referring_domain&&zC(e.referring_domain,o)){if(p==="always")return Dg(p,e.referring_domain,n),!1;if(p==="ifEmptyCampaign"&&GC(e))return Dg(p,e.referring_domain,n),!1}}if(WC(r.excludeReferrers,e.referring_domain))return n.debug("This is not a new campaign because ".concat(e.referring_domain," is in the exclude referrer list.")),!1;if(!i&&qC(e)&&t)return n.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=Lg(c||"")!==Lg(h||""),y=!t||v||g;return y?n.debug("This is a new campaign. An $identify event will be sent."):n.debug("This is not a new campaign because it's the same as the previous one."),y},WC=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=""),e.some(function(r){return r instanceof RegExp?r.test(t):r===t})},jC=function(e,t){var r=t.startsWith(".")?t:".".concat(t),n=e.startsWith(".")?e:".".concat(e);return!!n.endsWith(r)},Fg=function(e,t){var r=P(P({},Xt),e),n=Object.entries(r).reduce(function(i,o){var s,c=B(o,2),l=c[0],u=c[1];return i.setOnce("initial_".concat(l),(s=u??t.initialEmptyValue)!==null&&s!==void 0?s:"EMPTY"),u?i.set(l,u):i.unset(l)},new dt);return yr(n)},Bg=function(e){var t=e;return t?(t.startsWith(".")&&(t=t.substring(1)),[new RegExp("".concat(t.replace(".","\\."),"$"))]):[]},VC=function(e,t){if(e===!0)return en.always;if(typeof e=="object"){var r=e.condition;if(typeof r=="string"&&Object.keys(en).includes(r))return r;if(typeof r>"u")return en.always}var n="Invalid configuration provided for attribution.excludeInternalReferrers: ".concat(JSON.stringify(e));return t.error(n),new TypeError(n)};function Dg(e,t,r){var n="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");e==="always"?r.debug(n):e==="ifEmptyCampaign"&&r.debug("".concat(n," with empty campaign parameters"))}var Eu=["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"],wu=function(e){var t,r,n=e||((r=(t=j())===null||t===void 0?void 0:t.location)===null||r===void 0?void 0:r.hostname);if(!n)return"";var i=n.split("."),o=i[i.length-1],s=i[i.length-2];return Eu.find(function(c){return n.endsWith(".".concat(c))})&&(o=i[i.length-2]+"."+i[i.length-1],s=i[i.length-3]),s?"".concat(s,".").concat(o):o},zC=function(e,t){var r=j();if(!r)return!1;var n=(t||"").trim()||wu(r.location.hostname);return jC(e,n)};var $C=(function(e){De(t,e);function t(r,n,i,o,s,c,l,u,a,h,f,d,p,v,g,y,m,E,w,b,S,_,x,I,C,k,N,T,F,D,G,q,$,L,W,M,X,A,Q,J,te,se,ce,de){i===void 0&&(i=new zn),o===void 0&&(o={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),u===void 0&&(u=1e3),a===void 0&&(a=5),h===void 0&&(h=30),f===void 0&&(f=ri),y===void 0&&(y=new St),m===void 0&&(m=We.Warn),w===void 0&&(w=!1),b===void 0&&(b=!1),x===void 0&&(x=""),I===void 0&&(I=No),N===void 0&&(N=1800*1e3),T===void 0&&(T=new gu({loggerProvider:y})),F===void 0&&(F={ipAddress:!0,language:!0,platform:!0}),D===void 0&&(D="fetch"),G===void 0&&(G=!1),q===void 0&&(q=!0),A===void 0&&(A=!0),Q===void 0&&(Q=0),ce===void 0&&(ce=!1);var V=this,re;V=e.call(this,{apiKey:r,storageProvider:T,transportProvider:_u(D)})||this,V.apiKey=r,V.appVersion=n,V.cookieOptions=o,V.defaultTracking=s,V.autocapture=c,V.flushIntervalMillis=u,V.flushMaxRetries=a,V.flushQueueSize=h,V.identityStorage=f,V.ingestionMetadata=d,V.instanceName=p,V.loggerProvider=y,V.logLevel=m,V.minIdLength=E,V.offline=w,V.partnerId=S,V.plan=_,V.serverUrl=x,V.serverZone=I,V.sessionTimeout=N,V.storageProvider=T,V.trackingOptions=F,V.transport=D,V.useBatch=G,V.fetchRemoteConfig=q,V.networkTrackingOptions=M,V.identify=X,V.enableDiagnostics=A,V.diagnosticsSampleRate=Q,V.diagnosticsClient=J,V.remoteConfig=te,V.topLevelDomain=se,V.enableRequestBodyCompression=ce,V.customEnrichment=de,V.version=rn,V._optOut=!1,V._cookieStorage=i,V.deviceId=l,V.lastEventId=v,V.lastEventTime=g,V.optOut=b,V.deferredSessionId=k,V.sessionId=C,V.pageCounter=L,V.userId=$,V.debugLogsEnabled=W,V.loggerProvider.enable(W?We.Debug:V.logLevel),V.networkTrackingOptions=M,V.identify=X,V.enableDiagnostics=A,V.diagnosticsSampleRate=Q,V.diagnosticsClient=J;var ae=(re=te?.fetchRemoteConfig)!==null&&re!==void 0?re:q;return V.remoteConfig=V.remoteConfig||{},V.remoteConfig.fetchRemoteConfig=ae,V.fetchRemoteConfig=ae,V.topLevelDomain=se||wu(),V}return Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(r){this._cookieStorage!==r&&(this._cookieStorage=r,this.updateStorage())}
270,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(r){this._deviceId!==r&&(this._deviceId=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(r){this._userId!==r&&(this._userId=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(r){this._sessionId!==r&&(this._sessionId=r,r!==void 0&&this._deferredSessionId!==void 0&&(this._deferredSessionId=void 0),this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deferredSessionId",{get:function(){return this._deferredSessionId},set:function(r){this._deferredSessionId!==r&&r!==this.sessionId&&(this._deferredSessionId=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(r){this._optOut!==r&&(this._optOut=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(r){this._lastEventTime!==r&&(this._lastEventTime=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(r){this._lastEventId!==r&&(this._lastEventId=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageCounter",{get:function(){return this._pageCounter},set:function(r){this._pageCounter!==r&&(this._pageCounter=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugLogsEnabled",{set:function(r){this._debugLogsEnabled!==r&&(this._debugLogsEnabled=r,this.updateStorage())},enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var r={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};this.cookieStorage instanceof Vr&&(r.cookieDomain=this.cookieStorage.options.domain),this.cookieStorage.set(oo(this.apiKey),r)},t})(Un);var qg=function(e,t,r,n,i){return t===void 0&&(t={}),O(void 0,void 0,void 0,function(){var o,s,c,l,u,a,h,f,d,p,v,g,y,m,E,w,b,S,_,x,I,C,k,N,T,F,D,G,q,$,L,W,M,X,A,Q,J,te,se,ce,de,V,re,ae,fe,ne,Oe,ge,ye,_e,pe;return R(this,function(Ke){switch(Ke.label){case 0:return o=t.identityStorage||ri,s="",o===ri&&!(!((C=t.cookieOptions)===null||C===void 0)&&C.domain)&&((k=t.cookieOptions)===null||k===void 0?void 0:k.domain)!==""?[4,KC(void 0,n)]:[3,2];case 1:s=Ke.sent(),Ke.label=2;case 2:return c=P({domain:(T=(N=t.cookieOptions)===null||N===void 0?void 0:N.domain)!==null&&T!==void 0?T:s,expiration:365,sameSite:"Lax",secure:!1,upgrade:!0},t.cookieOptions),l={duplicateResolverFn:function(ve){var be=so(ve);if(!be)return!1;var me=JSON.parse(be);return ao(me.cookieDomain,c.domain)},diagnosticsClient:n},u=HC(t.identityStorage,c,l),[4,Ig(e,u,(D=(F=t.cookieOptions)===null||F===void 0?void 0:F.upgrade)!==null&&D!==void 0?D:!0)];case 3:return a=Ke.sent(),[4,u.get(oo(e))];case 4:return h=Ke.sent(),f=or(),d=f.ampTimestamp?Number(f.ampTimestamp):void 0,p=d?Date.now()<d:!0,v=(W=(L=($=(G=t.deviceId)!==null&&G!==void 0?G:p?(q=f.ampDeviceId)!==null&&q!==void 0?q:f.deviceId:void 0)!==null&&$!==void 0?$:h?.deviceId)!==null&&L!==void 0?L:a.deviceId)!==null&&W!==void 0?W:Xe(),g=(M=h?.lastEventId)!==null&&M!==void 0?M:a.lastEventId,y=(X=h?.lastEventTime)!==null&&X!==void 0?X:a.lastEventTime,m=(Q=(A=t.optOut)!==null&&A!==void 0?A:h?.optOut)!==null&&Q!==void 0?Q:a.optOut,E=(J=h?.sessionId)!==null&&J!==void 0?J:a.sessionId,w=h?.deferredSessionId,b=(se=(te=t.userId)!==null&&te!==void 0?te:h?.userId)!==null&&se!==void 0?se:a.userId,r.previousSessionDeviceId=(ce=h?.deviceId)!==null&&ce!==void 0?ce:a.deviceId,r.previousSessionUserId=(de=h?.userId)!==null&&de!==void 0?de:a.userId,S={ipAddress:(re=(V=t.trackingOptions)===null||V===void 0?void 0:V.ipAddress)!==null&&re!==void 0?re:!0,language:(fe=(ae=t.trackingOptions)===null||ae===void 0?void 0:ae.language)!==null&&fe!==void 0?fe:!0,platform:(Oe=(ne=t.trackingOptions)===null||ne===void 0?void 0:ne.platform)!==null&&Oe!==void 0?Oe:!0}
270,_=h?.pageCounter,x=h?.debugLogsEnabled,t.autocapture!==void 0&&(t.defaultTracking=t.autocapture),I=new $C(e,t.appVersion,u,c,t.defaultTracking,t.autocapture,v,t.flushIntervalMillis,t.flushMaxRetries,t.flushQueueSize,o,t.ingestionMetadata,t.instanceName,g,y,(ge=i?.loggerProvider)!==null&&ge!==void 0?ge:t.loggerProvider,t.logLevel,t.minIdLength,t.offline,m,t.partnerId,t.plan,t.serverUrl,(ye=i?.serverZone)!==null&&ye!==void 0?ye:t.serverZone,E,w,t.sessionTimeout,t.storageProvider,S,t.transport,t.useBatch,t.fetchRemoteConfig,b,_,x,t.networkTrackingOptions,t.identify,(_e=i?.enableDiagnostics)!==null&&_e!==void 0?_e:t.enableDiagnostics,(pe=i?.diagnosticsSampleRate)!==null&&pe!==void 0?pe:r._diagnosticsSampleRate,n,t.remoteConfig,s,t.enableRequestBodyCompression,t.customEnrichment),[4,I.storageProvider.isEnabled()];case 5:return Ke.sent()||(I.loggerProvider.warn("Storage provider ".concat(I.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),I.storageProvider=new zn),[2,I]}})})},HC=function(e,t,r){switch(e===void 0&&(e=ri),t===void 0&&(t={}),e){case"localStorage":return new gu;case"sessionStorage":return new _g;case"none":return new zn;default:return new Vr(P(P({},t),{expirationDays:t.expiration}),r)}},Gg=function(e){var t,r;return e===void 0&&(e={}),((t=e.remoteConfig)===null||t===void 0?void 0:t.fetchRemoteConfig)===!0?!0:!(((r=e.remoteConfig)===null||r===void 0?void 0:r.fetchRemoteConfig)===!1||e.fetchRemoteConfig===!1)},_u=function(e){var t=typeof e=="object"?e.type:e,r=typeof e=="object"?e.headers:void 0,n=typeof e=="object"?e.enableKeepalive:void 0,i=typeof e=="object"?e.referrerPolicy:void 0;return t==="xhr"?new xg(r):t==="beacon"?new Cg:new Tg(r,n,i)},KC=function(e,t){return O(void 0,void 0,void 0,function(){var r,n,i,o,s,s,c,l,u;return R(this,function(a){switch(a.label){case 0:return[4,new Vr(void 0,{diagnosticsClient:t}).isEnabled()];case 1:if(!a.sent()||!e&&(typeof location>"u"||!location.hostname))return[2,""];if(r=e??location.hostname,n=r.split("."),n.length===1)return[2,""];for(i=[],o=1,Eu.find(function(h){return r.endsWith(".".concat(h))})&&(o=2),s=n.length-o-1;s>=0;--s)i.push(n.slice(s).join("."));s=0,a.label=2;case 2:if(!(s<i.length))return[3,7];c=i[s],a.label=3;case 3:return a.trys.push([3,5,,6]),[4,Vr.isDomainWritable(c)];case 4:return l=a.sent(),l?[2,"."+c]:[3,6];case 5:return u=a.sent(),t&&t.recordEvent("cookies.tld.failure",{reason:"Unexpected exception checking domain is writable: ".concat(c),error:u instanceof 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(r)}),[2,""]}})})};z();ee();var XC="[Amplitude] Page Viewed",xu="AMP_PAGE_VIEW",Mo=function(e){e===void 0&&(e={});var t,r=j(),n=void 0,i=!1,o,s,c=e.trackOn,l=e.trackHistoryChanges,u=e.eventType,a=u===void 0?XC:u,h=function(m){var E=m;try{E=decodeURI(m)}catch(w){n?.error("Malformed URI sequence: ",w)}return E},f=function(m){return O(void 0,void 0,void 0,function(){var E,w,b;return R(this,function(S){switch(S.label){case 0:return E=h(typeof location<"u"&&location.href||""),b={event_type:a},w=[{}],[4,YC()];case 1:return[2,(b.event_properties=P.apply(void 0,[P.apply(void 0,w.concat([S.sent()])),{"[Amplitude] Page Domain":typeof location<"u"&&location.hostname||"","[Amplitude] Page Location":E,"[Amplitude] Page Path":typeof location<"u"&&h(location.pathname)||"","[Amplitude] Page Title":_r(wr),"[Amplitude] Page URL":E.split("?")[0],"[Amplitude] Page View ID":m}]),b)]}})})},d=function(){return typeof c>"u"||typeof c=="function"&&c()},p=typeof location<"u"?location.href:null,v=function(){return O(void 0,void 0,void 0,function(){var m,E,w,b,S,_;return R(this,function(x){switch(x.label){case 0:return m=location.href,E=QC(l,m,p||"")&&d(),p=m,E?(w=void 0,s&&(w=Xe(),s.set(xu,{pageViewId:w})),n?.log("Tracking page view event"),t!=null?[3,1]:(b=void 0,[3,3])):[3,4];case 1:return _=(S=t).track,[4,f(w)];case 2:b=_.apply(S,[x.sent()]),x.label=3;case 3:x.label=4;case 4:return[2]}})})},g=function(){v()},y={name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(m,E){return O(void 0,void 0,void 0,function(){var w,b,S;return R(this,function(_){switch(_.label){case 0:if(t=E,o=m,n=m.loggerProvider,n.log("Installing @amplitude/plugin-page-view-tracking-browser"),i=!0,r){try{s=new Jt(r.sessionStorage)}catch{n?.debug("sessionStorage is not available in this environment.")}r.addEventListener("popstate",g),r.history.pushState=new Proxy(r.history.pushState,{apply:function(x,I,C){var k=B(C,3),N=k[0],T=k[1],F=k[2];x.apply(I,[N,T,F]),i&&g()}})}return d()?(n.log("Tracking page view event"),w=void 0,s&&(w=Xe(),s.set(xu,{pageViewId:w}
270)),S=(b=t).track,[4,f(w)]):[3,2];case 1:S.apply(b,[_.sent()]),_.label=2;case 2:return[2]}})})},execute:function(m){return O(void 0,void 0,void 0,function(){var E,w,b;return R(this,function(S){switch(S.label){case 0:return c==="attribution"&&JC(m)?(n?.log("Enriching campaign event to page view event with campaign parameters"),E=void 0,s?[4,s.get(xu)]:[3,2]):[3,4];case 1:w=S.sent(),E=w?.pageViewId,S.label=2;case 2:return[4,f(E)];case 3:b=S.sent(),m.event_type=b.event_type,m.event_properties=P(P({},m.event_properties),b.event_properties),S.label=4;case 4:return o&&m.event_type===a&&(o.pageCounter=o.pageCounter?o.pageCounter+1:1,m.event_properties=P(P({},m.event_properties),{"[Amplitude] Page Counter":o.pageCounter})),[2,m]}})})},teardown:function(){return O(void 0,void 0,void 0,function(){return R(this,function(m){return r&&(r.removeEventListener("popstate",g),i=!1),[2]})})}};return y},YC=function(){return O(void 0,void 0,void 0,function(){var e;return R(this,function(t){switch(t.label){case 0:return e=Vn,[4,new Er().parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},JC=function(e){if(e.event_type==="$identify"&&e.user_properties){var t=e.user_properties,r=t[yt.SET]||{},n=t[yt.UNSET]||{},i=H(H([],B(Object.keys(r)),!1),B(Object.keys(n)),!1);return Object.keys(Xt).every(function(o){return i.includes(o)})}return!1},QC=function(e,t,r){switch(e){case"pathOnly":{if(r=="")return!0;var n=new URL(t),i=new URL(r),o=n.origin+n.pathname,s=i.origin+i.pathname;return o!==s}default:return t!==r}};z();ee();var jg=function(){var e,t=[],r=function(a,h,f){a.addEventListener(h,f),t.push({element:a,type:h,handler:f})},n=function(){t.forEach(function(a){var h=a.element,f=a.type,d=a.handler;h?.removeEventListener(f,d)}),t=[]},i,o="@amplitude/plugin-form-interaction-tracking-browser",s="enrichment",c=function(a,h){return O(void 0,void 0,void 0,function(){var f,d;return R(this,function(p){return i=Sg(a),f=function(){if(!h){a.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.");return}if(!(typeof document>"u")){var v=new WeakSet,g=function(m){if(!v.has(m)){v.add(m);var E=!1;r(m,"change",function(){var w,b=Wg(m);E||h.track(yu,(w={},w[Oo]=nn(m.id),w[Po]=nn(m.name),w[ko]=b,w)),E=!0}),r(m,"submit",function(w){var b,S,_=Wg(m);if(E||h.track(yu,(b={},b[Oo]=nn(m.id),b[Po]=nn(m.name),b[ko]=_,b)),E=!0,i?.shouldTrackSubmit!==void 0)if(typeof i.shouldTrackSubmit=="function"&&typeof SubmitEvent<"u"&&w instanceof SubmitEvent)try{var x=i.shouldTrackSubmit(w);if(!x)return}catch{a.loggerProvider.warn("shouldTrackSubmit callback threw an error, proceeding with tracking.")}else a.loggerProvider.warn("shouldTrackSubmit is ignored because it is not a function or event is not a SubmitEvent.");h.track(Ag,(S={},S[Oo]=nn(m.id),S[Po]=nn(m.name),S[ko]=_,S)),E=!1})}},y=Array.from(document.getElementsByTagName("form"));y.forEach(g),typeof MutationObserver<"u"&&(e=new MutationObserver(function(m){m.forEach(function(E){E.addedNodes.forEach(function(w){w.nodeName==="FORM"&&g(w),"querySelectorAll"in w&&typeof w.querySelectorAll=="function"&&Array.from(w.querySelectorAll("form")).map(g)})})}),e.observe(document.body,{subtree:!0,childList:!0}))}},document.readyState==="complete"?f():(d=j(),d?d.addEventListener("load",f):a.loggerProvider.debug("Form interaction tracking is not installed because global is undefined.")),[2]})})},l=function(a){return O(void 0,void 0,void 0,function(){return R(this,function(h){return[2,a]})})},u=function(){return O(void 0,void 0,void 0,function(){return R(this,function(a){return e?.disconnect(),n(),[2]})})};return{name:o,type:s,setup:c,execute:l,teardown:u}},nn=function(e){if(typeof e=="string")return e},Wg=function(e){var t=e.getAttribute("action");try{t=new URL(encodeURI(t??""),window.location.href).href}catch{}return t};z();ee();var Vg=function(){var e,t=[],r=function(u,a,h){u.addEventListener(a,h),t.push({element:u,type:a,handler:h})},n=function(){t.forEach(function(u){var a=u.element,h=u.type,f=u.handler;a?.removeEventListener(h,f)}),t=[]},i="@amplitude/plugin-file-download-tracking-browser",o="enrichment",s=function(u,a){return O(void 0,void 0,void 0,function(){var h,f;return R(this,function(d){return h=function(){if(!a){u.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.");return}if(!(typeof document>"u")){var p=function(y){var m;try{m=new URL(y.href,window.location.href)}catch{return}var E=v.exec(m.href),w=E?.[1];w&&r(y,"click",function(){var b;w&&a.track(Rg,(b={},b[Og]=w,b[Pg]=m.pathname,b[kg]=y.id,b[Ng]=y.text,b[Mg]=y.href,b))})},v=/\.(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)(\?.+)?$/,g=Array.from(document.getElementsByTagName("a"));g.forEach(p),typeof MutationObserver<"u"&&(e=new MutationObserver(function(y){y.forEac
270h(function(m){m.addedNodes.forEach(function(E){E.nodeName==="A"&&p(E),"querySelectorAll"in E&&typeof E.querySelectorAll=="function"&&Array.from(E.querySelectorAll("a")).map(p)})})}),e.observe(document.body,{subtree:!0,childList:!0}))}},document.readyState==="complete"?h():(f=j(),f?f.addEventListener("load",h):u.loggerProvider.debug("File download tracking is not installed because global is undefined.")),[2]})})},c=function(u){return O(void 0,void 0,void 0,function(){return R(this,function(a){return[2,u]})})},l=function(){return O(void 0,void 0,void 0,function(){return R(this,function(u){return e?.disconnect(),n(),[2]})})};return{name:i,type:o,setup:s,execute:c,teardown:l}};var zg=!1,$g=function(e){if(!(zg||e.defaultTracking!==void 0)){var t=`\`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: 271 272amplitude.init(<YOUR_API_KEY>, { 273 defaultTracking: true, 274}); 275 276Visit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details.`;e.loggerProvider.warn(t),zg=!0}};z();ee();var Hg=function(){var e="@amplitude/plugin-network-checker-browser",t="before",r=j(),n=[],i=function(l,u){r?.addEventListener&&(r?.addEventListener(l,u),n.push({type:l,handler:u}))},o=function(){n.forEach(function(l){var u=l.type,a=l.handler;r?.removeEventListener(u,a)}),n=[]},s=function(l,u){return O(void 0,void 0,void 0,function(){return R(this,function(a){return typeof navigator>"u"?(l.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),l.offline=!1,[2]):(l.offline=!navigator.onLine,i("online",function(){l.offline!==!1&&(l.loggerProvider.debug("Network connectivity changed to online."),l.offline=!1,setTimeout(function(){u.flush()},l.flushIntervalMillis))}),i("offline",function(){l.loggerProvider.debug("Network connectivity changed to offline."),l.offline=!0}),[2])})})},c=function(){return O(void 0,void 0,void 0,function(){return R(this,function(l){return o(),[2]})})};return{name:e,type:t,setup:s,teardown:c}};z();ee();function Kg(e,t){var r,n;if(e){xo(e);try{t.loggerProvider.debug("Update browser config with remote configuration:",Jr(e));var i=e;if(i&&"autocapture"in i){if(typeof i.autocapture=="boolean"&&(t.autocapture=i.autocapture),typeof i.autocapture=="object"&&i.autocapture!==null){var o=P({},i.autocapture);if(t.autocapture===void 0&&(t.autocapture=i.autocapture),typeof i.autocapture.elementInteractions=="object"&&i.autocapture.elementInteractions!==null&&(!((r=i.autocapture.elementInteractions.pageUrlAllowlistRegex)===null||r===void 0)&&r.length)){o.elementInteractions=P({},i.autocapture.elementInteractions);var s=o.elementInteractions,c=(n=s.pageUrlAllowlist)!==null&&n!==void 0?n:[],l=i.autocapture.elementInteractions.pageUrlAllowlistRegex;s.pageUrlAllowlist=_o(c,l,t.loggerProvider),delete s.pageUrlAllowlistRegex}var u=au(i.autocapture.networkTracking,t.loggerProvider);u&&(o.networkTracking=u),typeof t.autocapture=="boolean"&&(t.autocapture=P({attribution:t.autocapture,fileDownloads:t.autocapture,formInteractions:t.autocapture,pageViews:t.autocapture,sessions:t.autocapture,elementInteractions:t.autocapture,webVitals:t.autocapture,frustrationInteractions:t.autocapture},o)),typeof t.autocapture=="object"&&(t.autocapture=P(P({},t.autocapture),o))}t.defaultTracking=t.autocapture}"customEnrichment"in i&&i.customEnrichment!==null&&t.customEnrichment!==!1&&(t.customEnrichment=i.customEnrichment),t.loggerProvider.debug("Browser config after remote config update:",Jr(t))}catch(a){t.loggerProvider.error("Failed to apply remote configuration because of error: ",a)}}}z();ee();var Lo="1.28.11";ee();var Xg="@amplitude/plugin-autocapture-browser",Yg="@amplitude/plugin-frustration-browser",Jg="@amplitude/plugin-performance-browser",Do="[Amplitude] Element Clicked",Qg="[Amplitude] Dead Click",Zg="[Amplitude] Rage Click",em="[Amplitude] Error Click",tm="[Amplitude] Element Changed";var rm="[Amplitude] Thrashed Cursor",nm="[Amplitude] Main Thread Block",im="[Amplitude] Element ID",om="[Amplitude] Element Class",Tu="[Amplitude] Element Tag",Cu="[Amplitude] Element Text",sm="[Amplitude] Element Hierarchy",am="[Amplitude] Element Href",lm="[Amplitude] Element Position Left",um="[Amplitude] Element Position Top",cm="[Amplitude] Element Aria Label",fm="[Amplitude] Element Attributes",dm="[Amplitude] Element Path",hm="[Amplitude] Element Parent Label",ni="[Amplitude] Page URL",pm="[Amplitude] Page Title",Uo="[Amplitude] Viewport Height",Fo="[Amplitude] Viewport Width",vm="[Amplitude] Max Page X",gm="[Amplitude] Max Page Y",Bo="[Amplitude] Page View ID",mm="https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz",ym="amp-visual-tagging-selector-highlight",qo="data-amp-mask-attributes",bm=25,Go=128,Sm="AMP_PAGE_VIEW",Em=18e3;z();ee();var ZC=["input","select","textarea"],wm=function(e,t){var r,n=(r=window?.getComputedStyle)===null||r===void 0?void 0:r.call(window,e);return n?.getPropertyValue("cursor")==="pointer"&&t==="click"},ii=function(e){var t=e.pageUrlAllowlist,r=e.pageUrlExcludelist;return!(r&&r.length>0&&jr(window.location.href,r)||!jr(window.location.href,t))},sr=function(e,t){return function(r,n){var i,o,s=e.shouldTrackEventResolver,c=(o=(i=n?.tagName)===null||i===void 0?void 0:i.toLowerCase)===null||o===void 0?void 0:o.call(i);if(!c)return!1;if(s)return s(r,n);if(!ii(e))return!1;var l=String(n?.getAttribute("type"))||"";if(typeof l=="string")switch(l.toLowerCase()){case"hidden":return!1;case"password":return!1}if(t){var u=t.some(function(a){var h;
276return!!(!((h=n?.matches)===null||h===void 0)&&h.call(n,a))});if(!u)return!1}switch(c){case"input":case"select":case"textarea":return r==="change"||r==="click";default:return r==="click"}}};var _m=function(e){var t,r,n,i=(r=(t=e?.tagName)===null||t===void 0?void 0:t.toLowerCase)===null||r===void 0?void 0:r.call(t),o=e instanceof HTMLElement?((n=e.getAttribute("contenteditable"))===null||n===void 0?void 0:n.toLowerCase())==="true":!1;return!ZC.includes(i)&&!o},xm=function(e){return e?e.split(",").map(function(t){return t.trim()}).filter(function(t){return t.length>0&&t!=="id"&&t!=="class"}):[]},Tm=function(e,t){return Object.entries(e).reduce(function(r,n){var i=B(n,2),o=i[0],s=i[1];if(o.startsWith(t)){var c=o.replace(t,"");c&&(r[c]=s||"")}return r},{})},eI=function(e){return e==null||typeof e=="object"&&Object.keys(e).length===0||typeof e=="string"&&e.trim().length===0},Iu=function(e){return Object.keys(e).reduce(function(t,r){var n=e[r];return eI(n)||(t[r]=n),t},{})},Wo=function(){var e;try{var t=j(),r=(e=t?.sessionStorage)===null||e===void 0?void 0:e.getItem(Sm);if(!r)return;var n=JSON.parse(r);if(typeof n.pageViewId=="string")return n.pageViewId}catch{}};var oi=function(e,t){return e?t.some(function(r){var n;return(n=e?.matches)===null||n===void 0?void 0:n.call(e,r)})?e:oi(e?.parentElement,t):null};var Gt=function(e){return!(e.event.target===null||!e.closestTrackedAncestor)};function Cm(e){return e.type==="click"||e.type==="change"}var on;(function(e){e[e.LEFT_OR_TOUCH_CONTACT=0]="LEFT_OR_TOUCH_CONTACT",e[e.MIDDLE=1]="MIDDLE",e[e.RIGHT=2]="RIGHT"})(on||(on={}));var Im="__AMPLITUDE_VISUAL_TAGGING__";function Am(e,t){var r=e;if(r[Im]!==!0){r[Im]=!0;var n=t.dataExtractor,i=t.isElementSelectable,o=t.cssSelectorAllowlist,s=t.actionClickAllowlist,c=null,l=function(a){e.notify({action:"element-selected",data:a})},u=function(a,h){a==="selector-mode-changed"?e.notify({action:"track-selector-mode-changed",data:h}):a==="selector-moved"&&e.notify({action:"track-selector-moved",data:h})};e.registerActionHandler("initialize-visual-tagging-selector",function(a){e.loadScriptOnce(mm).then(function(){var h;c=(h=window?.amplitudeVisualTaggingSelector)===null||h===void 0?void 0:h.call(window,{getEventTagProps:n.getEventTagProps,isElementSelectable:function(f){return i?i(a?.actionType||"click",f):!0},onTrack:u,onSelect:l,visualHighlightClass:ym,messenger:e,cssSelectorAllowlist:o,actionClickAllowlist:s,extractDataFromDataSource:n.extractDataFromDataSource,dataExtractor:n,diagnostics:{autocapture:{version:Lo}}}),e.notify({action:"selector-loaded"})}).catch(function(){var h;(h=e.logger)===null||h===void 0||h.warn("Failed to initialize visual tagging selector")})}),e.registerActionHandler("close-visual-tagging-selector",function(){var a;(a=c?.close)===null||a===void 0||a.call(c)})}}function Rm(e){var t=e.amplitude,r=e.allObservables,n=e.shouldTrackEvent,i=e.evaluateTriggers,o=r.clickObservable,s=o.filter(Gt).filter(function(l){return n("click",l.closestTrackedAncestor)}).map(function(l){return i(l)}),c=s;return c.subscribe(function(l){t?.track(Do,l.targetElementProperties)})}function Om(e){var t=e.amplitude,r=e.allObservables,n=e.getEventProperties,i=e.shouldTrackEvent,o=e.evaluateTriggers,s=r.changeObservable,c=s.filter(Gt).filter(function(l){return i("change",l.closestTrackedAncestor)}).map(function(l){return o(l)});return c.subscribe(function(l){t?.track(tm,n("change",l.closestTrackedAncestor))})}ee();function Pm(e){var t=e.amplitude,r=e.allObservables,n=e.options,i=e.getEventProperties,o=e.shouldTrackEvent,s=e.shouldTrackActionClick,c=r.clickObservable,l=r.mutationObservable,u=r.navigateObservable,a=c.filter(function(g){return!o("click",g.closestTrackedAncestor)}).map(function(g){var y=oi(g.event.target,n.actionClickAllowlist);return g.closestTrackedAncestor=y,g.closestTrackedAncestor!==null&&(g.targetElementProperties=i(g.type,g.closestTrackedAncestor)),g}).filter(Gt).filter(function(g){return s("click",g.closestTrackedAncestor)}),h=u?Et(l,u):l,f=Et(a,h),d=null,p=null,v=xr(f,function(g){if(d&&(clearTimeout(d),d=null),g.type==="click")return p=g,d=setTimeout(function(){d=null,p=null},500),Promise.resolve(null);if(p){var y=p;return p=null,Promise.resolve(y)}return Promise.resolve(null)});return v.subscribe(function(g){g&&t?.track(Do,i("click",g.closestTrackedAncestor))})}ee();function km(e){var t=e.amplitude,r=e.allObservables,n=r.scrollObservable,i={maxX:0,maxY:0},o=n.subscribe(function(){var s,c,l,u,a=j(),h=Math.floor((c=(s=a?.scrollX)!==null&&s!==void 0?s:a?.pageXOffset)!==null&&c!==void 0?c:0),f=Math.floor((u=(l=a?.scrollY)!==null&&l!==void 0?l:a?.pageYOffset)!==null&&u!==void 0?u:0);
276i.maxX=Math.max(i.maxX,h),i.maxY=Math.max(i.maxY,f)});return{unsubscribe:function(){o.unsubscribe()},getState:function(){return i},reset:function(){i.maxX=0,i.maxY=0}}}z();ee();var sn=j(),jo=function(){return new Me.default(function(e){var t=new MutationObserver(function(r){e.next(r)});return document.body&&t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}})},Vo=function(e){return e===void 0&&(e="click"),new Me.default(function(t){var r,n=function(i){t.next(i)};return(r=j())===null||r===void 0||r.document.addEventListener(e,n,{capture:!0}),function(){var i;(i=j())===null||i===void 0||i.document.removeEventListener(e,n,{capture:!0})}})},Nm=function(){return new Me.default(function(e){var t,r=function(n){e.next(n)};return(t=j())===null||t===void 0||t.addEventListener("scroll",r),function(){var n;(n=j())===null||n===void 0||n.removeEventListener("scroll",r)}})},tI=function(){return new Me.default(function(e){var t=function(r){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=void 0;Array.isArray(n[0])&&typeof n[0][0]=="string"&&(o=n[0][0]),e.next({kind:"console",message:o})};return co.addListener("error",t),function(){co.removeListener(t)}})},Mm=function(e,t){return new Me.default(function(r){var n,i=j();if(!i?.IntersectionObserver)return function(){};var o=new IntersectionObserver(function(u){u.forEach(function(a){r.next(a)})},{root:null,rootMargin:"0px",threshold:1}),s=t.join(","),c=(n=i?.document.querySelectorAll(s))!==null&&n!==void 0?n:[];c.forEach(function(u){o.observe(u)});var l=e.subscribe(function(u){var a=u.event;return a.forEach(function(h){var f=h.addedNodes;return f.forEach(function(d){d instanceof Element&&(d.matches(s)&&o.observe(d),d.querySelectorAll(s).forEach(function(p){o.observe(p)}))})})});return function(){l.unsubscribe(),o.disconnect()}})},rI=function(){return new Me.default(function(e){var t=function(r){if(r instanceof ErrorEvent){var n={kind:"error"};r.error instanceof Error||r.error instanceof DOMException?n=P(P({},n),{message:r.error.message,stack:r.error.stack,filename:r.filename,lineNumber:r.lineno,columnNumber:r.colno}):typeof r.error=="string"&&(n.message=r.error),e.next(n)}};return sn.addEventListener("error",t),function(){sn.removeEventListener("error",t)}})},nI=function(){return new Me.default(function(e){var t=function(r){var n={kind:"unhandledrejection"};r.reason instanceof Error||r.reason instanceof DOMException?(n.message=r.reason.message,n.stack=r.reason.stack):typeof r.reason=="string"&&(n.message=r.reason),e.next(n)};return sn.addEventListener("unhandledrejection",t),function(){sn.removeEventListener("unhandledrejection",t)}})},Lm=function(){var e=Et(rI(),nI());return Et(e,tI())},Dm=function(){return new Me.default(function(e){var t=function(n){e.next(n)},r={capture:!0};return sn.document.addEventListener("mousemove",t,r),function(){sn.document.removeEventListener("mousemove",t,r)}})};z();var Um=function(e,t){try{if(t.subprop_key==="[Amplitude] Element Text")return t.subprop_op==="is"&&t.subprop_value.includes(e.targetElementProperties["[Amplitude] Element Text"]);if(t.subprop_key==="[Amplitude] Element Hierarchy")return t.subprop_op==="autotrack css match"&&!!e.closestTrackedAncestor.closest(t.subprop_value.toString())}catch(r){return console.error("Error matching event to filter",r),!1}return!1};var Fm=function(e,t){try{if(e.sourceType==="DOM_ELEMENT"){var r=document.documentElement;return e.scope&&t&&(r=t.closest(e.scope)),r&&e.selector?r.querySelector(e.selector):r}}catch{return}},Bm=function(e,t,r){e.forEach(function(n){if(typeof n!="string"&&n.actionType==="ATTACH_EVENT_PROPERTY"){var i=r.extractDataFromDataSource(n.dataSource,t.closestTrackedAncestor);t.targetElementProperties[n.destinationKey]=i}})};var Au={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},Ru=function(e){var t,r,n,i,o=Object.values(Au).reduce(function(d,p){return d[p]=new Set,d},{});if(!e)return o;try{for(var s=U(e),c=s.next();!c.done;c=s.next()){var l=c.value;try{try{for(var u=(n=void 0,U(l.definition)),a=u.next();!a.done;a=u.next()){var h=a.value,f=Au[h.event_type];f&&o[f].add(l.id)}}catch(d){n={error:d}}finally{try{a&&!a.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}catch(d){console.warn("Skipping Labeled Event due to malformed definition",l?.id,d)}}}catch(d){t={error:d}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return o},Ou=function(e){var t,r,n,i,o=new Map;try{for(var s=U(e),c=s.next();!c.done;c=s.next()){var l=c.value;try{for(var u=(n=void 0,U(l.conditions)),a=u.next();!a.done;a=u.next()){var h=a.value;if(h.type==="LABELED_EVENT"){var f=h.match.eventId,d=o.get(f);d||(d=[],o.set(f,d)),d.push(l)}}}catch(p){n={error:p}}finally{try{a&&!a.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}}catch(p){t={error:p}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return o},iI=function(e,t){return t.filter(function(r){return r.definition.some(function(n){return Au[n.event_type]===e.type&&n.filters.every(function(i){return Um(e,i)})})})},oI=function(e,t){var r,n,i,o,s=new Set;try{for(var c=U(e),l=c.next();!l.done;l=c.next()){var u=l.value,a=t.get(u.id);if(a)try{for(var h=(i=void 0,U(a)),f=h.next();!f.done;f=h.next()){var d=f.value;s.add(d)}}catch(p){i={error:p}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}}}catch(p){r={error:p}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return Array.from(s)},sI=(function(){function e(t,r,n,i){this.groupedLabeledEvents=t,this.labeledEventToTriggerMap=r,this.dataExtractor=n,this.options=i}return e.prototype.evaluate=function(t){var r,n,i=this.options.pageActions;if(!i)return t;var o=iI(t,Array.from(this.groupedLabeledEvents[t.type]).map(function(a){return i.labeledEvents[a]})),s=oI(o,this.labeledEventToTriggerMap);try{for(var c=U(s),l=c.next();!l.done;l=c.next()){var u=l.value;Bm(u.actions,t,this.dataExtractor)}}catch(a){r={error:a}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return t},e.prototype.update=function(t,r,n){this.groupedLabeledEvents=t,this.labeledEventToTriggerMap=r,this.options=n},e})();var qm=function(e,t,r,n){return new sI(e,t,r,n)};z();ee();z();ee();var aI=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",qo,Qt]),lI=["type"],uI=["svg","path","g"],cI=["password","hidden"];function Gm(e,t){var r,n,i,o,s,c;if(e===null)return null;var l=String(e.tagName).toLowerCase(),u={tag:l},a=Array.from((o=(i=e.parentElement)===null||i===void 0?void 0:i.children)!==null&&o!==void 0?o:[]);a.length&&(u.index=a.indexOf(e),u.indexOfType=a.filter(function(b){return b.tagName===e.tagName}).indexOf(e));var h=(c=(s=e.previousElementSibling)===null||s===void 0?void 0:s.tagName)===null||c===void 0?void 0:c.toLowerCase();h&&(u.prevSib=String(h));var f=e.getAttribute("id");f&&(u.id=String(f));var d=Array.from(e.classList);d.length&&(u.classes=d);var p={},v=Array.from(e.attributes),g=v.filter(function(b){return!aI.has(b.name)}),y=!_m(e);
276if(!cI.includes(String(e.getAttribute("type")))&&!uI.includes(l))try{for(var m=U(g),E=m.next();!E.done;E=m.next()){var w=E.value;if(!(y&&!lI.includes(w.name))){if(t.has(w.name)){p[w.name]=Pt;continue}p[w.name]=String(w.value).substring(0,Go)}}}catch(b){r={error:b}}finally{try{E&&!E.done&&(n=m.return)&&n.call(m)}finally{if(r)throw r.error}}return Object.keys(p).length&&(u.attrs=p),u}function Wm(e){var t=[];if(!e)return t;t.push(e);for(var r=e.parentElement;r&&r.tagName!=="HTML";)t.push(r),r=r.parentElement;return t}z();var jm=[/^:r[0-9a-z]+:$/,/^radix-/,/^headlessui-/,/^mui-/,/^[a-f0-9]{16,}$/i,/-\d{8,}$/,/\d{4,}/];function Vm(e,t){var r,n,i=[];try{for(var o=U(e),s=o.next();!s.done;s=o.next()){var c=s.value;try{i.push(new RegExp(c))}catch(u){var l=u instanceof Error?u.message:String(u);t?.warn('@amplitude/element-selector: ignoring invalid autogenerated-id pattern "'.concat(c,'" (').concat(l,")"))}}}catch(u){r={error:u}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}function zm(e,t){var r,n;if(e==null||e==="")return!1;try{for(var i=U(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(s.test(e))return!1}}catch(c){r={error:c}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!0}z();var $m=[/^(p|m|px|py|mx|my|pt|pb|pl|pr|mt|mb|ml|mr)-\d+$/,/^(w|h|min-w|max-w|min-h|max-h)-/,/^(text|bg|border|ring|fill|stroke)-/,/^(hover|focus|active|disabled|group-hover):/,/^(sm|md|lg|xl|2xl):/,/^z-\d+$/,/^data-\[/,/^\[/,/^css-[a-z0-9]{6,}$/,/^[a-zA-Z]+_[a-zA-Z0-9]{3,}__[a-zA-Z0-9]{5,}$/,/^sc-[a-zA-Z0-9]{6,}$/,/^jsx-\d+$/,/^swiper-slide-(visible|fully-visible|active|prev|next|duplicate)$/,/^is-(active|open|selected|hovered|focused|expanded)$/,/^Mui[A-Z][a-zA-Z]+-(focused|selected|disabled|expanded|focusVisible|active|checked)$/,/^Mui-(selected|focused|disabled|expanded|focusVisible|active|checked)$/,/^data-state-/];function Hm(e,t){var r,n,i=[];try{for(var o=U(e),s=o.next();!s.done;s=o.next()){var c=s.value;try{i.push(new RegExp(c))}catch(u){var l=u instanceof Error?u.message:String(u);t?.warn('@amplitude/element-selector: ignoring invalid unstable-class pattern "'.concat(c,'" (').concat(l,")"))}}}catch(u){r={error:u}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}function zo(e,t){var r=e.getAttribute(t.explicitTrackingAttribute);if(r!==null&&r==="")return null;var n=e.getAttribute("id");return n===null||n===""||!zm(n,t.autogeneratedIdPatterns)?null:n}function Km(e,t){return t.map(fI).join(" > ")}function fI(e){var t=e.tagName.toLowerCase(),r=e.parentElement;if(r===null)return t;var n=dI(e,r);return"".concat(t,":nth-of-type(").concat(n,")")}function dI(e,t){for(var r=0,n=0;n<t.children.length;n++){var i=t.children[n];if(i.tagName===e.tagName&&(r+=1,i===e))return r}return 1}var Xm={name:"explicitTrackingAttribute",try:function(e,t){var r=t.config.explicitTrackingAttribute,n=e.getAttribute(r);return n===null||n===""?null:"[".concat(r,"=").concat(JSON.stringify(n),"]")}};function an(e){var t=globalThis.CSS;if(t&&typeof t.escape=="function")return t.escape(e);for(var r=String(e),n=r.length,i="",o=0;o<n;o++){var s=r.charCodeAt(o);if(s===0){i+="\uFFFD";continue}if(s>=1&&s<=31||s===127||o===0&&s>=48&&s<=57||o===1&&s>=48&&s<=57&&r.charCodeAt(0)===45){i+="\\".concat(s.toString(16)," ");continue}if(o===0&&n===1&&s===45){i+="\\-";continue}if(s>=128||s===45||s===95||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122){i+=r.charAt(o);continue}i+="\\".concat(r.charAt(o))}return i}function $o(e){return an(e)}var Ym={name:"stableId",try:function(e,t){var r=zo(e,t.config);return r===null?null:"".concat(e.tagName.toLowerCase(),"#").concat($o(r))}};z();var hI=[Xm,Ym];function Qm(e,t,r){var n,i,o,s,c;r===void 0&&(r={});var l=(o=r.strategies)!==null&&o!==void 0?o:hI,u=(c=(s=r.scope)!==null&&s!==void 0?s:e.ownerDocument)!==null&&c!==void 0?c:document,a={scope:u,config:t},h=pI(e,t.maxAncestorWalkDepth);try{for(var f=U(l),d=f.next();!d.done;d=f.next())for(var p=d.value,v=0;v<h.length;v++){var g=h[v],y=p.try(g,a);if(y!==null){if(v===0){if(Jm(u,y,e,p.name,r.logger))return y;continue}var m=h.slice(0,v).reverse(),E=Km(g,m),w="".concat(y," > ").concat(E);if(Jm(u,w,e,p.name,r.logger))return w}}}catch(b){n={error:b}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}return null}function pI(e,t){for(var r=[],n=e;n!==null&&(r.push(n),!(t!==void 0&&r.length>t));)n=n.parentElement;return r}function Jm(e,t,r,n,i){var o;try{o=e.querySelectorAll(t)}catch(c){var s=c instanceof Error?c.message:String(c);return i?.debug('@amplitude/element-selector: strategy "'.concat(n,'" emitted a malformed selector "').concat(t,'" (').concat(s,")")),!1}return o.length===1&&o[0]===r}z();function Zm(e,t,r){var n,i;r===void 0&&(r={});for(var o=(i=(n=r.scope)!==null&&n!==void 0?n:e.ownerDocument)!==null&&i!==void 0?i:document,s=[],c=e,l=0;c!==null&&!(t.maxAncestorWalkDepth!==void 0&&l>t.maxAncestorWalkDepth);){var u=zo(c,t);if(u!==null){var a="".concat(c.tagName.toLowerCase(),"#").concat($o(u)),h=H([a],B(s),!1).join(" > ");if(mI(o,h,e))return h}s.unshift(vI(c)),c=c.parentElement,l+=1}return s.join(" > ")}function vI(e){var t=e.tagName.toLowerCase(),r=e.parentElement;if(r===null)return t;var n=gI(e,r);return"".concat(t,":nth-of-type(").concat(n,")")}function gI(e,t){for(var r=0,n=0;n<t.children.length;n++){var i=t.children[n];if(i.tagName===e.tagName&&(r+=1,i===e))return r}return 1}function mI(e,t,r){var n;try{n=e.querySelectorAll(t)}catch{return!1}return n.length===1&&n[0]===r}z();var si=(function(){function e(t,r){this.value=t,this.optimized=r}return e.prototype.toString=function(){return this.value},e})(),yI=function(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return"";for(var r=[],n=e;n;){var i=bI(n,!!t,n===e);if(!i||(r.push(i),i.optimized))break;n=n.parentElement}return r.reverse(),r.join(" > ")},bI=function(e,t,r){var n,i;if(e.nodeType!==Node.ELEMENT_NODE)return null;var o=e.getAttribute("id");if(t){if(o)return new si(ty(o),!0);var s=e.tagName.toLowerCase();if(s==="body"||s==="head"||s==="html")return new si(s,!0)}var c=e.tagName.toLowerCase();if(o)return new si(c+ty(o),!0);var l=e.parentNode;if(!l||l.nodeType===Node.DOCUMENT_NODE)return new si(c,!0);for(var u=ey(e),a=!1,h=!1,f=-1,d=-1,p=l.children,v=0;p&&(f===-1||!h)&&v<p.length;++v){var g=p[v];if(g.nodeType===Node.ELEMENT_NODE){if(d+=1,g===e){f=d;continue}if(!h&&g.tagName.toLowerCase()===c){a=!0;var y=new Set(u);
276if(!y.size){h=!0;continue}for(var m=ey(g),E=0;E<m.length;++E){var w=m[E];if(y.has(w)&&(y.delete(w),!y.size)){h=!0;break}}}}}var b=c;if(r&&c.toLowerCase()==="input"&&e.getAttribute("type")&&!e.getAttribute("id")&&!e.getAttribute("class")&&(b+="[type="+an(e.getAttribute("type")||"")+"]"),h)b+=":nth-child("+String(f+1)+")";else if(a)try{for(var S=U(u),_=S.next();!_.done;_=S.next()){var x=_.value;b+="."+an(x.slice(1))}}catch(I){n={error:I}}finally{try{_&&!_.done&&(i=S.return)&&i.call(S)}finally{if(n)throw n.error}}return new si(b,!1)},ey=function(e){var t=e.getAttribute("class");return t?t.split(/\s+/g).filter(Boolean).map(function(r){return"$"+r}):[]},ty=function(e){return"#"+an(e)};function Pu(e,t){try{return yI(e)}catch(n){var r=n instanceof Error?n.message:String(n);return t?.warn("@amplitude/element-selector: legacyCssPath threw \u2014 emitting empty selector: ".concat(r)),""}}z();var ln=Object.freeze({enabled:!1,explicitTrackingAttribute:"data-amp-track-id",autogeneratedIdPatterns:H([],B(jm),!1),unstableClassPatterns:H([],B($m),!1),maxAncestorWalkDepth:void 0});function Ho(e,t){if(!e)return ry();var r=ry();return typeof e.enabled=="boolean"&&(r.enabled=e.enabled),typeof e.explicitTrackingAttribute=="string"&&e.explicitTrackingAttribute!==""&&(r.explicitTrackingAttribute=e.explicitTrackingAttribute),Array.isArray(e.autogeneratedIdPatterns)&&(r.autogeneratedIdPatterns=Vm(e.autogeneratedIdPatterns,t)),Array.isArray(e.unstableClassPatterns)&&(r.unstableClassPatterns=Hm(e.unstableClassPatterns,t)),r.maxAncestorWalkDepth=SI(e.maxAncestorWalkDepth),r}function SI(e){if(typeof e=="number"&&Number.isFinite(e)&&!(e<=0))return Math.floor(e)}function ry(){return{enabled:ln.enabled,explicitTrackingAttribute:ln.explicitTrackingAttribute,autogeneratedIdPatterns:H([],B(ln.autogeneratedIdPatterns),!1),unstableClassPatterns:H([],B(ln.unstableClassPatterns),!1),maxAncestorWalkDepth:ln.maxAncestorWalkDepth}}z();function ku(e,t){t===void 0&&(t={});var r=e,n=new Set,i=t.logger,o={strategies:t.strategies,scope:t.scope,logger:i};return{generate:function(s){var c,l;if(!r.enabled)return Pu(s,i);try{var u=Qm(s,r,o);return u!==null?u:Zm(s,r,{scope:(l=(c=t.scope)!==null&&c!==void 0?c:s.ownerDocument)!==null&&l!==void 0?l:document})}catch(h){var a=h instanceof Error?h.message:String(h);return i?.warn("@amplitude/element-selector: strategy chain threw \u2014 falling back to legacy cssPath: ".concat(a)),Pu(s,i)}},getConfig:function(){return r},updateConfig:function(s){var c,l;r=s;try{for(var u=U(n),a=u.next();!a.done;a=u.next()){var h=a.value;try{h(s)}catch(d){var f=d instanceof Error?d.message:String(d);i?.warn("@amplitude/element-selector: onConfigChange subscriber threw \u2014 ".concat(f))}}}catch(d){c={error:d}}finally{try{a&&!a.done&&(l=u.return)&&l.call(u)}finally{if(c)throw c.error}}},onConfigChange:function(s){return n.add(s),function(){n.delete(s)}}}}var Nu;function EI(){return Nu||(Nu=ku(Ho())),Nu}var Ko=(function(){function e(t,r){var n,i,o=this,s;this.replaceSensitiveString=function(f){return wr(f,o.additionalMaskTextPatterns)},this.getHierarchy=function(f){var d,p,v,g,y=performance.now(),m=[];if(!f)return[];for(var E=Wm(f),w=new Map,b=E.length-1;b>=0;b--){var S=E[b];if(S){var _=xm(S.getAttribute(qo)),x=b===E.length-1?[]:(v=w.get(E[b+1]))!==null&&v!==void 0?v:new Set,I=new Set(H(H([],B(x),!1),B(_),!1));w.set(S,I)}}m=E.map(function(D){var G;return Gm(D,(G=w.get(D))!==null&&G!==void 0?G:new Set)});var C=function(D){D?.attrs&&Object.entries(D.attrs).forEach(function(G){var q=B(G,2),$=q[0],L=q[1];D.attrs&&(D.attrs[$]=o.replaceSensitiveString(L))})};try{for(var k=U(m),N=k.next();!N.done;N=k.next()){var T=N.value;C(T)}}catch(D){d={error:D}}finally{try{N&&!N.done&&(p=k.return)&&p.call(k)}finally{if(d)throw d.error}}var F=performance.now();return(g=o.diagnosticsClient)===null||g===void 0||g.recordHistogram("autocapturePlugin.getHierarchy",F-y),m},this.getNearestLabel=function(f){var d=f.parentElement;if(!d)return"";var p;try{p=d.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch{p=null}return p?o.getText(p):o.getNearestLabel(d)},this.getElementPath=function(f){var d;if(!f)return"";var p=performance.now(),v=o.selectorEngine.generate(f),g=performance.now();return(d=o.diagnosticsClient)===null||d===void 0||d.recordHistogram("autocapturePlugin.getElementPath",g-p),v},this.updateSelectorConfig=function(f,d){if(f==null||typeof f.enabled!="boolean"){d?.debug("@amplitude/element-selector: ignoring remote-config delivery without an explicit `enabled` flag \u2014 keeping current engine state.");return}var p=o.selectorEngine.getConfig().enabled,v=Ho(f,d);o.selectorEngine.updateConfig(v),!p&&v.enabled?d?.debug("@amplitude/element-selector: engine enabled \u2014 now emitting new element-selector element paths for autocapture events."):p&&!v.enabled&&d?.debug("@amplitude/element-selector: engine disabled \u2014 reverting to legacy cssPath for element paths.")},this.getEventProperties=function(f,d,p){var v,g,y,m,E=(y=(g=d?.tagName)===null||g===void 0?void 0:g.toLowerCase)===null||y===void 0?void 0:y.call(g),w=typeof d.getBoundingClientRect=="function"?d.getBoundingClientRect():{left:null,top:null},b=o.getHierarchy(d),S=(m=b[0])===null||m===void 0?void 0:m.attrs,_=o.getNearestLabel(d),x=Tm(S??{},p),I=(v={},v[sm]=b,v[Tu]=E,v[Cu]=o.getText(d),v[lm]=w.left==null?null:Math.round(w.left),v[um]=w.top==null?null:Math.round(w.top),v[fm]=x,v[dm]=o.getElementPath(d),v[hm]=_,v[ni]=ot(window.location.href.split("?")[0]),v[pm]=_r(o.replaceSensitiveStr
276ing),v[Uo]=window.innerHeight,v[Fo]=window.innerWidth,v),C=Wo();if(C&&(I[Bo]=C),I[im]=d.getAttribute("id")||"",I[om]=d.getAttribute("class"),I[cm]=S?.["aria-label"],E==="a"&&f==="click"&&d instanceof HTMLAnchorElement){var k=d.href.substring(0,Go);I[am]=o.replaceSensitiveString(k)}return Iu(I)},this.addTypeAndTimestamp=function(f,d){return{event:f,timestamp:Date.now(),type:d}},this.addAdditionalEventProperties=function(f,d,p,v,g){g===void 0&&(g=!1);var y=o.addTypeAndTimestamp(f,d);if(Cm(y)&&y.event.target!==null){if(g){var m=wm(y.event.target,y.type);if(m)return y.closestTrackedAncestor=y.event.target,y.targetElementProperties=o.getEventProperties(y.type,y.closestTrackedAncestor,v),y}var E=oi(y.event.target,p);return E&&(y.closestTrackedAncestor=E,y.targetElementProperties=o.getEventProperties(y.type,E,v)),y}return y},this.extractDataFromDataSource=function(f,d){if(f.sourceType==="DOM_ELEMENT"){var p=Fm(f,d);return p?f.elementExtractType==="TEXT"?o.getText(p):f.elementExtractType==="ATTRIBUTE"&&f.attribute?p.getAttribute(f.attribute):void 0:void 0}},this.getTextWithMaskedDescendants=function(f){var d,p,v="[".concat(Qt,"], [contenteditable]");if(!f.querySelector(v))return f.innerText;var g="",y=Array.from(f.childNodes);try{for(var m=U(y),E=m.next();!E.done;E=m.next()){var w=E.value;if(w.nodeType===Node.TEXT_NODE){g+=w.textContent||"";continue}if(w instanceof Element){if(w.hasAttribute(Qt)||w.hasAttribute("contenteditable")){g+=Pt;continue}g+=o.getTextWithMaskedDescendants(w)}}}catch(b){d={error:b}}finally{try{E&&!E.done&&(p=m.return)&&p.call(m)}finally{if(d)throw d.error}}return g},this.getText=function(f){var d=f.closest("[".concat(Qt,"]"))!==null;if(d)return Pt;var p="";return f.querySelector("[".concat(Qt,"], [contenteditable]"))?p=o.getTextWithMaskedDescendants(f):p=f.innerText||"",o.replaceSensitiveString(p.substring(0,255)).replace(/\s+/g," ").trim()},this.getEventTagProps=function(f){var d,p,v;if(!f)return{};var g=(v=(p=f?.tagName)===null||p===void 0?void 0:p.toLowerCase)===null||v===void 0?void 0:v.call(p),y=(d={},d[Tu]=g,d[Cu]=o.getText(f),d[ni]=window.location.href.split("?")[0],d);return Iu(y)},this.diagnosticsClient=r?.diagnosticsClient,this.selectorEngine=EI();var c=(s=t.maskTextRegex)!==null&&s!==void 0?s:[],l=[];try{for(var u=U(c),a=u.next();!a.done;a=u.next()){var h=a.value;if(l.length>=bm)break;if(h instanceof RegExp)l.push(h);else if("pattern"in h&&typeof h.pattern=="string")try{l.push(new RegExp(h.pattern,"i"))}catch{}}}catch(f){n={error:f}}finally{try{a&&!a.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}this.additionalMaskTextPatterns=l}return e})();var wI="configs.analyticsSDK.browserSDK.autocapture.elementSelector";function Xo(e,t){var r=e.remoteConfigClient;if(!(!e.fetchRemoteConfig||!r)){var n=r.subscribe(wI,"all",function(i,o){e.loggerProvider.debug("@amplitude/element-selector: remote-config delivery (source=".concat(String(o),") ").concat(JSON.stringify(i))),t.updateSelectorConfig(i,e.loggerProvider)});return function(){r.unsubscribe(n)}}}ee();ee();function ny(e){var t=e.allObservables,r=e.onExposure,n=e.dataExtractor,i=e.exposureDuration,o=i===void 0?Jn:i,s=new Map,c=new Map,l=t.exposureObservable,u=l.subscribe(function(a){var h=a,f=h.target;if(h.isIntersecting){if(!s.get(f)){var d=setTimeout(function(){s.set(f,!0);var p=n.getElementPath(f);r(p),c.set(f,null)},o);c.set(f,d)}}else if(!h.isIntersecting&&h.intersectionRatio<1){var d=c.get(f);d&&(clearTimeout(d),c.set(f,null))}});return{unsubscribe:function(){u.unsubscribe()},reset:function(){c.forEach(function(a){a&&clearTimeout(a)}),c.clear(),s.clear()}}}ee();function iy(e){var t,r,n,i,o,s,c=e.amplitude,l=e.scrollTracker,u=e.currentElementExposed,a=e.elementExposedForPage,h=e.exposureTracker,f=e.isPageEnd,d=e.lastScroll,p=l.getState(),v=j(),g=(r=v?.innerWidth)!==null&&r!==void 0?r:0,y=(n=v?.innerHeight)!==null&&n!==void 0?n:0,m=(t={},t[ni]=ot((s=(o=(i=v?.location)===null||i===void 0?void 0:i.href)===null||o===void 0?void 0:o.split("?")[0])!==null&&s!==void 0?s:""),t[vm]=p.maxX+g,t[gm]=p.maxY+y,t[Uo]=y,t[Fo]=g,t["[Amplitude] Element Exposed"]=Array.from(u),t),E=Wo();if(E&&(m[Bo]=E),u.size===0&&p.maxX===d.maxX&&p.maxY===d.maxY){f&&(l.reset(),a.clear(),h?.reset());return}c?.track("[Amplitude] Viewport Content Updated",m),d.maxX=p.maxX,d.maxY=p.maxY,u.clear(),f&&(l.reset(),a.clear(),h?.reset())}function oy(e,t,r,n){if(!t.has(e)){t.add(e),r.add(e);var i=Array.from(r),o=JSON.stringify(i);o.length>=Em&&n(!1)}}var tt;(function(e){e.ClickObservable="clickObservable",e.ChangeObservable="changeObservable",e.NavigateObservable="navigateObservable",e.MutationObservable="mutationObservable",e.ScrollObservable="scrollObservable",e.ExposureObservable="exposureObservable",e.BrowserErrorObservable="browserErrorObservable",e.SelectionObservable="selectionObservable",e.MouseMoveObservable="mouseMoveObservable"})(tt||(tt={}));var Yo=function(e,t){var r,n,i,o,s,c,l,u,a,h,f,d;e===void 0&&(e={}),t?.diagnosticsClient.setTag("plugin.autocapture.version",Lo);var p=e.dataAttributePrefix,v=p===void 0?Hr:p,g=e.visualTaggingOptions,y=g===void 0?{enabled:!0}:g;e.cssSelectorAllowlist=(r=e.cssSelectorAllowlist)!==null&&r!==void 0?r:ho,e.actionClickAllowlist=(n=e.actionClickAllowlist)!==null&&n!==void 0?n:po,e.debounceTime=(i=e.debounceTime)!==null&&i!==void 0?i:0;var m=((o=e.viewportContentUpdated)===null||o===void 0?void 0:o.enabled)!==!1,E=(l=(c=(s=e.viewportContentUpdated)===null||s===void 0?void 0:s.exposureDuration)!==null&&c!==void 0?c:e.exposureDuration)!==null&&l!==void 0?l:Jn;e.viewportContentUpdated=P(P({},e.viewportContentUpdated),{exposureDuration:E}),e.pageUrlExcludelist=(u=e.pageUrlExcludelist)===null||u===void 0?void 0:u.reduce(function(L,W){if(typeof W=="string"&&L.push(W),W instanceof RegExp&&L.push(W),typeof W=="object"&&W!==null&&"pattern"in W)try{L.push(new RegExp(W.pattern))}catch(M){return console.warn("Invalid regex pattern: ".concat(W.pattern),M),L}return L},[]);var w=Xg,b="enrichment",S=[],_=new Ko(e,t),x=new Set,I=new Set,C,k=function(){var L,W=pt(Vo().map(function(te){return _.addAdditionalEventProperties(te,"click",e.cssSelectorAllowlist,v)})),M=pt(new Me.default(function(te){var se,ce=function(de){var V=_.addAdditionalEventProperties(de,"change",e.cssSelectorAllowlist,v);te.next(V)};return(se=j())===null||se===void 0||se.document.addEventListener("change",ce,{capture:!0}),function(){var de;return(de=j())===null||de===void 0?void 0:de.document.removeEventListener("change",ce)}})),X;window.navigation&&(X=pt(new Me.default(function(te){var se=function(ce){var de=_.addAdditionalEventProperties(ce,"navigate",e.cssSelectorAllowlist,v);te.next(de)};return window.navigation.addEventListener("navigate",se),function(){window.navigation.removeEventListener("navigate",se)}})));var A=pt(jo().map(function(te){return _.addAdditionalEventProperties(te,"mutation",e.cssSelectorAllowlist,v)})),Q=Nm(),J=Mm(A,e.cssSelectorAllowlist);return L={},L[tt.ChangeObservable]=M,L[tt.ClickObservable]=W,L[tt.MutationObservable]=A,L[tt.NavigateObservable]=X,L[tt.ScrollObservable]=Q,L[tt.ExposureObservable]=J,L},N=Ru(Object.values((h=(a=e.pageActions)===null||a===void 0?void 0:a.labeledEvents)!==null&&h!==void 0?h:{})),T=Ou((d=(f=e.pageActions)===null||f===void 0?void 0:f.triggers)!==null&&d!==void 0?d:[]),F=qm(N,T,_,e),D=function(L){var W,M;L&&(e.pageActions=P(P({},e.pageActions),L),N=Ru(Object.values((W=e.pageActions.labeledEvents)!==null&&W!==void 0?W:{})),T=Ou((M=e.pageActions.triggers)!==null&&M!==void 0?M:[]),F.update(N,T,e))},G=function(L,W){return O(void 0,void 0,void 0,function(){var M,X,A,Q,J,te,se,ce,de,V,re,ae,fe,ne,Oe,ge,ye,_e,pe,Ke,ve,be;return R(this,function(me){return typeof document>"u"?[2]:(M=!1,X={maxX:void 0,maxY:void 0},L.fetchRemoteConfig&&(L.remoteConfigClient?L.remoteConfigClient.subscribe("configs.analyticsSDK.pageActions","all",function(Se){D(Se)}):L.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),A=Xo(L,_),A&&S.push({unsubscribe:A}),Q=sr(e,e.cssSelectorAllowlist),J=sr(e,e.actionClickAllowlist),te=k(),se=Rm({allObservables:te,amplitude:W,shouldTrackEvent:Q,evaluateTriggers:F.evaluate.bind(F)}),S.push(se),ce=Om({allObservables:te,getEventProperties:function(){for(var Se=[],he=0;he<arguments.length;he++)Se[he]=arguments[he];return _.getEventProperties.apply(_,H(H([],B(Se),!1),[v],!1))},amplitude:W,shouldTrackEvent:Q,evaluateTriggers:F.evaluate.bind(F)}),S.push(ce),de=Pm({allObservables:te,options:e,getEventProperties:function(){for(var Se=[],he=0;he<arguments.length;he++)Se[he]=arguments[he];return _.getEventProperties.apply(_,H(H([],B(Se),!1),[v],!1))},amplitude:W,shouldTrackEvent:Q,shouldTrackActionClick:J}),de&&S.push(de),V=km({allObservables:te,amplitude:W}),S.push(V),re={},ae=j(),fe=function(Se){Se&&M||(setTimeout(function(){M=!1},100),M=!0,iy({amplitude:W,scrollTracker:V,currentElementExposed:I,elementExposedForPage:x,exposureTracker:re.exposure,isPageEnd:Se,lastScroll:X}
276))},ne=function(Se){oy(Se,x,I,fe)},m&&(re.exposure=ny({allObservables:te,onExposure:ne,dataExtractor:_,exposureDuration:E}),re.exposure&&S.push(re.exposure),Oe=function(){fe(!0)},ae?.addEventListener("beforeunload",Oe),C=function(){ae?.removeEventListener("beforeunload",Oe)},S.push({unsubscribe:function(){return C()}}),ge=te[tt.NavigateObservable],ge?S.push(ge.subscribe(function(){fe(!0)})):ae&&(ye=function(){fe(!0)},ae.addEventListener("popstate",ye),_e=ae.history.pushState,ae.history&&_e&&(ae.history.pushState=new Proxy(_e,{apply:function(Se,he,qr){var Re=B(qr,3),mr=Re[0],mt=Re[1],Vi=Re[2];Se.apply(he,[mr,mt,Vi]),fe(!0)}})),S.push({unsubscribe:function(){ae.removeEventListener("popstate",ye),ae.history&&_e&&(ae.history.pushState=_e)}}))),(be=L?.loggerProvider)===null||be===void 0||be.log("".concat(w," has been successfully added.")),window.opener&&y.enabled&&(pe=e.cssSelectorAllowlist,Ke=e.actionClickAllowlist,ve=ei(),Am(ve,{dataExtractor:_,isElementSelectable:sr(e,H(H([],B(pe),!1),B(Ke),!1)),cssSelectorAllowlist:pe,actionClickAllowlist:Ke}),ti(ve),ve.setup(P({logger:L?.loggerProvider},L?.serverZone&&{endpoint:Zr[L.serverZone]}))),[2])})})},q=function(L){return O(void 0,void 0,void 0,function(){return R(this,function(W){return[2,L]})})},$=function(){return O(void 0,void 0,void 0,function(){var L,W,M,X,A;return R(this,function(Q){try{for(L=U(S),W=L.next();!W.done;W=L.next())M=W.value,M.unsubscribe()}catch(J){X={error:J}}finally{try{W&&!W.done&&(A=L.return)&&A.call(L)}finally{if(X)throw X.error}}return[2]})})};return{name:w,type:b,setup:G,execute:q,teardown:$}};z();ee();z();ee();var _I=3e3,xI=["mutation","navigate"];function sy(e){var t=e.amplitude,r=e.allObservables,n=e.getEventProperties,i=e.shouldTrackDeadClick,o=r.clickObservable,s=r.mutationObservable,c=r.navigateObservable,l=o.filter(function(d){return Gt(d)&&i("click",d.closestTrackedAncestor)&&d.event.target instanceof Element&&d.event.target.closest('a[target="_blank"]')===null&&d.event.button===on.LEFT_OR_TOUCH_CONTACT}),u=c?Et(s,c):s,a=Et(l,u),h=null,f=xr(a,function(d){return h&&xI.includes(d.type)?(clearTimeout(h),h=null,Promise.resolve(null)):d.type==="click"?h?Promise.resolve(null):new Promise(function(p){h=setTimeout(function(){p(d),h=null},_I)}):Promise.resolve(null)});return f.subscribe(function(d){if(d){var p={"[Amplitude] X":d.event.clientX,"[Amplitude] Y":d.event.clientY};t.track(Qg,P(P({},n("click",d.closestTrackedAncestor)),p),{time:d.timestamp})}})}z();ee();var cy=Wl,fy=Gl,ay=jl;function ly(e,t){var r,n,i,o,s=t.event,c=s.pageX,l=s.pageY;e.yMin=Math.min((r=e.yMin)!==null&&r!==void 0?r:l,l),e.yMax=Math.max((n=e.yMax)!==null&&n!==void 0?n:l,l),e.xMin=Math.min((i=e.xMin)!==null&&i!==void 0?i:c,c),e.xMax=Math.max((o=e.xMax)!==null&&o!==void 0?o:c,c),e.isOutOfBounds=e.yMax-e.yMin>ay||e.xMax-e.xMin>ay}function uy(e){if(e.length===0)return null;var t=e[0],r=e[e.length-1],n=P({"[Amplitude] Begin Time":new Date(t.timestamp).toISOString(),"[Amplitude] End Time":new Date(r.timestamp).toISOString(),"[Amplitude] Duration":r.timestamp-t.timestamp,"[Amplitude] Clicks":e.map(function(i){return{X:i.event.pageX,Y:i.event.pageY,Time:i.timestamp}}),"[Amplitude] Click Count":e.length},t.targetElementProperties);return{rageClickEvent:n,time:t.timestamp}}function TI(e,t){var r=Math.max(0,e.length-cy+1),n=e[r];return t.timestamp-n.timestamp>=fy}function CI(e,t){return e.length>0&&e[e.length-1].closestTrackedAncestor!==t.closestTrackedAncestor}function dy(e){var t=this,r=e.amplitude,n=e.allObservables,i=e.shouldTrackRageClick,o=n.clickObservable,s=n.selectionObservable,c=[],l={},u=null;function a(p){c=[],l={},p&&(ly(l,p),c.push(p))}var h=xr(o.filter(function(p){return i("click",p.closestTrackedAncestor)}),function(p){return O(t,void 0,void 0,function(){var v;return R(this,function(g){return ly(l,p),v=null,c.length===0||CI(c,p)||TI(c,p)||l.isOutOfBounds?(u&&(v=uy(c)),a(p)):c.push(p),u&&(clearTimeout(u.timerId),u.resolve(v),u=null),c.length>=cy?[2,new Promise(function(y){u={resolve:y,timerId:setTimeout(function(){y(uy(c))},fy)}})]:[2,null]})})}),f=s?.subscribe(function(){a()}),d=h.subscribe(function(p){p!==null&&r.track(Zg,p.rageClickEvent,{time:p.time})});return{unsubscribe:function(){d.unsubscribe(),f?.unsubscribe()}}}z();ee();var II=2e3;function hy(e){var t=e.amplitude,r=e.allObservables,n=e.shouldTrackErrorClick,i=r.clickObservable,o=r.browserErrorObservable,s=i.filter(function(a){return Gt(a)&&n("click",a.closestTrackedAncestor)&&a.event.target instanceof Element&&a.event.target.closest('a[target="_blank"]')===null&&a.event.button===on.LEFT_OR_TOUCH_CONTACT}),c=null,l=null,u=function(){c!==null&&(clearTimeout(c),c=null),l=null};return Et(s,o).subscribe(function(a){var h;if(a.type==="click"){u(),l=a,c=setTimeout(u,II);return}a.type==="error"&&l&&(t.track(em,P((h={},h["[Amplitude] Kind"]=a.event.kind,h["[Amplitude] Message"]=a.event.message,h["[Amplitude] Stack"]=a.event.stack,h["[Amplitude] Filename"]=a.event.filename,h["[Amplitude] Line Number"]=a.event.lineNumber,h["[Amplitude] Column Number"]=a.event.columnNumber,h),l.targetElementProperties)),u())})}ee();var Wt;(function(e){e.INCREASING="increasing",e.DECREASING="decreasing"})(Wt||(Wt={}));var Cr;(function(e){e.X="x",e.Y="y"})(Cr||(Cr={}));var AI=function(e){var t=e.allWindowObservables,r=t.mouseMoveObservable;return new Me.default(function(n){var i=null,o=null,s=null;return r.subscribe(function(c){var l={x:c.clientX,y:c.clientY};if(i===null){i=l;return}l.x>i.x?(o===Wt.DECREASING&&n.next(Cr.X),o=Wt.INCREASING):l.x<i.x&&(o===Wt.INCREASING&&n.next(Cr.X),o=Wt.DECREASING),l.y>i.y?(s===Wt.DECREASING&&n.next(Cr.Y),s=Wt.INCREASING):l.y<i.y&&(s===Wt.INCREASING&&n.next(Cr.Y),s=Wt.DECREASING),i=l})})};function RI(e){var t=+Date.now();e.startTime=e.startTime||t;var r=e.changes,n=e.changesThreshold;r.push(t),r.length>n&&r.shift()}function py(e){var t=e.changes,r=e.changesThreshold,n=e.thresholdMs;if(t.length<r)return!1;var i=t[t.length-1]-t[0];return i<n}function vy(e){e.changes=[],e.startTime=void 0}function gy(e){for(var t=e.changes,r=e.thresholdMs,n=0,i=t[t.length-1];n<t.length;n++){var o=i-t[n];if(o<r)break}n!==0&&(e.startTime=t[n],e.changes.splice(0,n))}function OI(e,t){var r=void 0;if(py(e)&&(r=e.startTime),py(t)){var n=t.startTime;n&&(!r||n<r)&&(r=n)}return r}var my=20,yy=2e3,PI=function(e){var t=e.mouseDirectionChangeObservable,r=e.directionChanges,n=r===void 0?my:r,i=e.thresholdMs,o=i===void 0?yy:i;return new Me.default(function(s){var c={changes:[],changesThreshold:n,thresholdMs:o},l={changes:[],changesThreshold:n,thresholdMs:o},u=void 0,a=null;function h(){u!==void 0&&(s.next(u),u=void 0,a!==null&&clearTimeout(a),vy(c),vy(l))}return t.subscribe(function(f){a!==null&&clearTimeout(a),RI(f===Cr.X?c:l);var d=OI(c,l);return d?(u=u||d,a=setTimeout(function(){h(),a=null},o)):h(),gy(c),gy(l),function(){a!==null&&(clearTimeout(a),a=null)}})})},by=function(e){var t=e.amplitude,r=e.options,n=e.allObservables,i=e.directionChanges,o=i===void 0?my:i,s=e.thresholdMs,c=s===void 0?yy:s,l=AI({allWindowObservables:n}),u=PI({mouseDirectionChangeObservable:l,directionChanges:o,thresholdMs:c});return u.subscribe(function(a){ii(r)&&t.track(rm,void 0,{time:a})})};function Mu(e,t,r,n){if(!n)return[];var i=e[t];return typeof i=="object"&&i!==null&&"cssSelectorAllowlist"in i&&Array.isArray(i.cssSelectorAllowlist)?i.cssSelectorAllowlist:r}var Jo=5,Qo=4e3,Lu=function(e){var t;e===void 0&&(e={});var r=Yg,n="enrichment",i=[],o=e.errorClicks!==!1;e.errorClicks||(o=!1);var s=e.deadClicks!==!1&&e.deadClicks!==null,c=e.rageClicks!==!1&&e.rageClicks!==null,l=e.thrashedCursor!==!1&&e.thrashedCursor!==null;e.thrashedCursor||(l=!1);var u=Mu(e,"rageClicks",ql,c),a=Mu(e,"deadClicks",Fl,s),h=Mu(e,"errorClicks",Bl,o),f=(t=e.dataAttributePrefix)!==null&&t!==void 0?t:Hr,d=new Ko(e),p=H([],B(new Set(H(H(H([],B(u),!1),B(a),!1),B(h),!1))),!1),v=function(){var E,w=pt(Vo("pointerdown").map(function(k){return d.addAdditionalEventProperties(k,"click",p,f,!0)})),b=pt(Lm().map(function(k){return d.addTypeAndTimestamp(k,"error")})),S=pt(jo().map(function(k){return d.addAdditionalEventProperties(k,"mutation",p,f)})),_;if(window.navigation){var x=new Me.default(function(k){var N=function(T){k.next(P(P({},T),{type:"navigate"}))};return window.navigation.addEventListener("navigate",N),function(){window.navigation.removeEventListener("navigate",N)}});_=pt(x.map(function(k){return d.addAdditionalEventProperties(k,"n
276avigate",p,f)}))}var I=pt(new Me.default(function(k){var N=function(){var T=document.activeElement;if(T&&(T.tagName==="TEXTAREA"||T.tagName==="INPUT")){var F=void 0,D=void 0;try{if(F=T.selectionStart,D=T.selectionEnd,F===D)return}catch{return}return k.next()}var G=window.getSelection();if(!(!G||G.isCollapsed))return k.next()};return window.document.addEventListener("selectionchange",N),function(){window.document.removeEventListener("selectionchange",N)}})),C=pt(Dm());return E={},E[tt.ClickObservable]=w,E[tt.MutationObservable]=S,E[tt.NavigateObservable]=_,E[tt.BrowserErrorObservable]=b,E[tt.SelectionObservable]=I,E[tt.MouseMoveObservable]=C,E},g=function(E,w){return O(void 0,void 0,void 0,function(){var b,S,_,x,I,C,k,N,T,F,D,G;return R(this,function(q){return typeof document>"u"?[2]:(b=v(),S=Xo(E,d),S&&i.push({unsubscribe:S}),c&&(_=sr(e,u),x=dy({allObservables:b,amplitude:w,shouldTrackRageClick:_}),i.push(x)),s&&(I=sr(e,a),C=sy({amplitude:w,allObservables:b,getEventProperties:function($,L){return d.getEventProperties($,L,f)},shouldTrackDeadClick:I}),i.push(C)),o&&(k=sr(e,h),N=hy({amplitude:w,allObservables:b,shouldTrackErrorClick:k}),i.push(N)),l&&(T=void 0,F=void 0,typeof e.thrashedCursor=="object"&&(T=e.thrashedCursor.directionChanges,F=e.thrashedCursor.threshold,T&&T<Jo&&(E.loggerProvider.warn("'thrashedCursor.directionChanges' of ".concat(T," is below the minimum of ").concat(Jo,", setting to ").concat(Jo)),T=Jo),F&&F>Qo&&(E.loggerProvider.warn("'thrashedCursor.threshold' of ".concat(F," is above the maximum of ").concat(Qo,", setting to ").concat(Qo)),F=Qo)),D=by({amplitude:w,options:e,allObservables:b,directionChanges:T,thresholdMs:F}),i.push(D)),(G=E?.loggerProvider)===null||G===void 0||G.log("".concat(r," has been successfully added.")),[2])})})},y=function(E){return O(void 0,void 0,void 0,function(){return R(this,function(w){return[2,E]})})},m=function(){return O(void 0,void 0,void 0,function(){var E,w,b,S,_;return R(this,function(x){try{for(E=U(i),w=E.next();!w.done;w=E.next())b=w.value,b.unsubscribe()}catch(I){S={error:I}}finally{try{w&&!w.done&&(_=E.return)&&_.call(E)}finally{if(S)throw S.error}}return[2]})})};return{name:r,type:n,setup:g,execute:y,teardown:m}};z();z();var kI=100,NI=1e4;function Sy(e,t){var r=e.startTime+e.duration;return t.filter(function(n){return n.startTime<r&&n.startTime+n.duration>e.startTime}).map(function(n){return n.name})}function MI(e,t){var r,n=Sy(e,t),i=(r=e.scripts)!==null&&r!==void 0?r:[],o=i.map(function(a){return a.sourceURL}).filter(Boolean),s=i.map(function(a){return a.sourceFunctionName}).filter(Boolean),c=i.map(function(a){return a.sourceCharPosition}).filter(function(a){return typeof a=="number"&&a>=0}),l=i.map(function(a){return a.invokerType}).filter(Boolean),u=i.map(function(a){return a.invoker}).filter(Boolean);return P(P(P(P(P(P(P({"[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},n.length>0&&{"[Amplitude] Main Thread Block Measures":n}),{"[Amplitude] Main Thread Block Render Start":e.renderStart,"[Amplitude] Main Thread Block Style And Layout Start":e.styleAndLayoutStart,"[Amplitude] Main Thread Block Script Count":i.length}),o.length>0&&{"[Amplitude] Main Thread Block Script URLs":o}),s.length>0&&{"[Amplitude] Main Thread Block Script Functions":s}),c.length>0&&{"[Amplitude] Main Thread Block Script Positions":c}),l.length>0&&{"[Amplitude] Main Thread Block Invoker Types":l}),u.length>0&&{"[Amplitude] Main Thread Block Invokers":u})}function LI(e,t){var r,n=Sy(e,t),i=(r=e.attribution)!==null&&r!==void 0?r:[];return P(P({"[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},n.length>0&&{"[Amplitude] Main Thread Block Measures":n}),i.length>0&&{"[Amplitude] Main Thread Block Attribution":i.map(function(o){return o.name})})}function DI(){if(typeof PerformanceObserver>"u")return null;try{var e=PerformanceObserver.supportedEntryTypes;if(e.includes("long-animation-frame"))return"long-animation-frame";if(e.includes("longtask"))return"longtask"}catch{}return null}function Ey(e){var t=e.amplitude,r=e.options,n=e.durationThreshold,i=n===void 0?kI:n,o=DI();if(!o)return{unsubscribe:function(){}};var s=[],c=new PerformanceObserver(function(u){var a,h,f=performance.now();try{for(var d=U(u.getEntries()),p=d.next();!p.done;p=d.next()){var v=p.value;s.push(v)}}catch(y){a={error:y}}finally{try{p&&!p.done&&(h=d.return)&&h.call(d)}finally{if(a)throw a.error}}for(var g=f-NI;s.length>0&&s[0].startTime<g;)s.shift()});try{c.observe({entryTypes:["measure"]})}catch{}var l=new PerformanceObserver(function(u){var a,h;try{for(var f=U(u.getEntries()),d=f.next();!d.done;d=f.next()){var p=d.value;if(!ii(r))return;if(!(p.duration<i)){var v=o==="long-animation-frame"?MI(p,s):LI(p,s);t.track(nm,v)}}}catch(g){a={error:g}}finally{try{d&&!d.done&&(h=f.return)&&h.call(f)}finally{if(a)throw a.error}}});try{l.observe({entryTypes:[o]})}catch{return c.disconnect(),{unsubscribe:function(){}}}return{unsubscribe:function(){l.disconnect(),c.disconnect()}}}var UI=100,Du=function(e){e===void 0&&(e={});var t=Jg,r="enrichment",n=[],i=e.mainThreadBlock===!0||typeof e.mainThreadBlock=="object"&&e.mainThreadBlock!==null,o=function(l,u){return O(void 0,void 0,void 0,function(){var a,h,f;return R(this,function(d){return typeof document>"u"?[2]:(i&&(a=UI,typeof e.mainThreadBlock=="object"&&e.mainThreadBlock.durationThreshold!==void 0&&(a=e.mainThreadBlock.durationThreshold),h=Ey({amplitude:u,options:e,durationThreshold:a}),n.push(h)),(f=l?.loggerProvider)===null||f===void 0||f.log("".concat(t," performance tracking has been successfully added.")),[2])})})},s=function(l){return O(void 0,void 0,void 0,function(){return R(this,function(u){return[2,l]})})},c=function(){return O(void 0,void 0,void 0,function(){var l,u,a,h,f;return R(this,function(d){try{for(l=U(n),u=l.next();!u.done;u=l.next())a=u.value,a.unsubscribe()}catch(p){h={error:p}}finally{try{u&&!u.done&&(f=l.return)&&f.call(l)}finally{if(h)throw h.error}}return[2]})})};return{name:t,type:r,setup:o,execute:s,teardown:c}};z();ee();var wy="@amplitude/plugin-network-capture-browser",Uu="[Amplitude] Network Request",_y=!0;ee();z();ee();var Cy="500-599";function Zo(e,t){var r=t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&"),n="^"+r.replace(/\*/g,".*")+"$",i=new RegExp(n);return i.test(e)}function Iy(e,t){var r,n,i=t.split(",");try{for(var o=U(i),s=o.next();!s.done;s=o.next()){var c=s.value,l=B(c.split("-").map(Number),2),u=l[0],a=l[1];if(e===u&&a===void 0||e>=u&&e<=a)return!0}}catch(h){r={error:h}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!1}function BI(e,t,r,n,i){if(!(e.hosts&&!e.hosts.find(function(s){return Zo(t,s)}))&&!(n&&e.urls&&!jr(n,e.urls))&&!(i&&e.methods&&!e.methods.find(function(s){return i.toLowerCase()===s.toLowerCase()||s==="*"}))){if(r||r===0){var o=e.statusCodeRange||Cy;if(!Iy(r,o))return!1}return!0}}function qI(e){var t,r=e.indexOf("#"),n=r>=0?e.slice(r+1):"",i=r>=0?e.slice(0,r):e,o=i.indexOf("?"),s=o>=0?i.slice(o+1):"",c=o>=0?i.slice(0,o):i,l=c.match(/^[a-z][a-z0-9+.-]*:\/\/([^/?#]+)/i),u=(t=l?.[1])!==null&&t!==void 0?t:"";
276return{query:s,fragment:n,href:e,hrefWithoutQueryOrHash:c,host:u}}function Ay(e){var t;if(e)try{var r=(t=j())===null||t===void 0?void 0:t.location.href,n=new URL(e,r),i=n.searchParams.toString(),o=n.hash.replace("#",""),s=n.href,c=n.host;n.hash="",n.search="";var l=n.href;return{query:i,fragment:o,href:s,hrefWithoutQueryOrHash:l,host:c}}catch{try{return qI(e)}catch{return}}}function GI(e,t){if(e.includes("amplitude.com"))try{var r=t.body;if(typeof r!="string")return!1;var n=JSON.parse(r),i=n.events;if(i.find(function(o){return o.event_type===Uu}))return!0}catch{}return!1}function xy(e){if(typeof e!="object"||e===null){if(e)return H([],B(Yt),!1);if(e===void 0){var t=_y?void 0:H([],B(Yt),!1);return t}return}if(e.length!==0)return e}function Ty(e){var t,r,n;return!(!((t=e?.allowlist)===null||t===void 0)&&t.length)&&!(!((r=e?.blocklist)===null||r===void 0)&&r.length)&&!(!((n=e?.excludelist)===null||n===void 0)&&n.length)}function WI(e,t){var r;t===void 0&&(t={});var n=Ay(e.url);if(!n)return!1;var i=n.host;if(t.ignoreAmplitudeRequests!==!1&&(Zo(i,"*.amplitude.com")||Zo(i,"amplitude.com"))||!((r=t.ignoreHosts)===null||r===void 0)&&r.find(function(s){return Zo(i,s)})||!t.captureRules&&e.status!==void 0&&!Iy(e.status,Cy))return!1;if(t.captureRules){var o;if(H([],B(t.captureRules),!1).reverse().find(function(s){if(o=BI(s,i,e.status,e.url,e.method),o){var c=xy(s.responseHeaders);if(e.responseWrapper&&c){var l=e.responseWrapper.headers(c);l&&(e.responseHeaders=l)}var u=xy(s.requestHeaders);if(e.requestWrapper&&u){var a=e.requestWrapper.headers(u);a&&(e.requestHeaders=a)}if(e.responseWrapper&&s.responseBody&&!Ty(s.responseBody)){var h=s.responseBody.excludelist||s.responseBody.blocklist;e.responseBodyJson=e.responseWrapper.json(s.responseBody.allowlist,h)}if(e.requestWrapper&&s.requestBody&&!Ty(s.requestBody)){var h=s.requestBody.excludelist||s.requestBody.blocklist;e.requestBodyJson=e.requestWrapper.json(s.requestBody.allowlist,h)}}return o!==void 0}),!o)return!1}return!(e.requestWrapper&&GI(i,e.requestWrapper))}function jI(e,t,r,n){return O(this,void 0,void 0,function(){var i,o,s;return R(this,function(c){switch(c.label){case 0:return t.requestBodyJson||t.responseBodyJson?[4,Promise.all([t.requestBodyJson,t.responseBodyJson])]:[3,2];case 1:if(i=B.apply(void 0,[c.sent(),2]),o=i[0],s=i[1],o)try{e["[Amplitude] Request Body"]=JSON.stringify(o)}catch(l){n?.debug("Failed to stringify request body",l)}if(s)try{e["[Amplitude] Response Body"]=JSON.stringify(s)}catch{n?.debug("Failed to stringify response body")}c.label=2;case 2:return r?.track(Uu,e),[2]}})})}function Ry(e){var t=e.allObservables,r=e.networkTrackingOptions,n=e.amplitude,i=e.loggerProvider,o=t.networkObservable,s=o.filter(function(c){return WI(c.event,r)});return s.subscribe(function(c){var l,u,a,h=c.event,f=Ay(h.url);if(f){var d=(u=h.responseWrapper)===null||u===void 0?void 0:u.bodySize,p=(a=h.requestWrapper)===null||a===void 0?void 0:a.bodySize,v=(l={},l["[Amplitude] URL"]=f.hrefWithoutQueryOrHash,l["[Amplitude] URL Query"]=f.query,l["[Amplitude] URL Fragment"]=f.fragment,l["[Amplitude] Request Method"]=h.method,l["[Amplitude] Status Code"]=h.status,l["[Amplitude] Start Time"]=h.startTime,l["[Amplitude] Completion Time"]=h.endTime,l["[Amplitude] Duration"]=h.duration,l["[Amplitude] Request Body Size"]=p,l["[Amplitude] Response Body Size"]=d,l["[Amplitude] Request Type"]=h.type,l["[Amplitude] Request Headers"]=h.requestHeaders,l["[Amplitude] Response Headers"]=h.responseHeaders,l);jI(v,h,n,i)}})}var Fu;(function(e){e.NetworkObservable="networkObservable"})(Fu||(Fu={}));var Oy,es=function(e){e===void 0&&(e={});var t=wy,r="enrichment",n,i=function(u,a){var h={event:u,timestamp:Date.now(),type:a};return h},o=function(){var u,a=new Me.default(function(h){var f=new Hl(function(d){var p=i(d,"network");h.next(p)});return go.subscribe(f,n),function(){go.unsubscribe(f)}});return u={},u[Fu.NetworkObservable]=a,u},s=function(u,a){return O(void 0,void 0,void 0,function(){var h;return R(this,function(f){return typeof document>"u"&&!su()?[2]:(h=o(),n=u?.loggerProvider,Oy=Ry({allObservables:h,networkTrackingOptions:e,amplitude:a,loggerProvider:n}),n?.log("".concat(t," has been successfully added.")),[2])})})},c=function(u){return O(void 0,void 0,void 0,function(){return R(this,function(a){return[2,u]})})},l=function(){return O(void 0,void 0,void 0,function(){return R(this,function(u){return Oy.unsubscribe(),[2]})})};return{name:t,type:r,setup:s,execute:c,teardown:l}};z();ee();var Py="web-vitals-browser",ky="[Amplitude] Web Vitals";var Gy=-1,cn=e=>{addEventListener("pageshow",(t=>{t.persisted&&(Gy=t.timeStamp,e(t))}),!0)},jt=(e,t,r,n)=>{let i,o;return s=>{t.value>=0&&(s||n)&&(o=t.value-(i??0),(o||i===void 0)&&(i=t.value,t.delta=o,t.rating=((c,l)=>c>l[1]?"poor":c>l[0]?"needs-improvement":"good")(t.value,r),e(t)))}},Hu=e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))},Ku=()=>{let e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},ai=()=>Ku()?.activationStart??0,Vt=(e,t=-1)=>{let r=Ku(),n="navigate";return Gy>=0?n="back-forward-cache":r&&(document.prerendering||ai()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:n}},Bu=new WeakMap;function Xu(e,t){return Bu.get(e)||Bu.set(e,new t),Bu.get(e)}var Gu=class{t;i=0;o=[];h(t){if(t.hadRecentInput)return;let r=this.o[0],n=this.o.at(-1);this.i&&r&&n&&t.startTime-n.startTime<1e3&&t.startTime-r.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),this.t?.(t)}},li=(e,t,r={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let n=new PerformanceObserver((i=>{Promise.resolve().then((()=>{t(i.getEntries())}))}));return n.observe({type:e,buffered:!0,...r}),n}}catch{}},Yu=e=>{let t=!1;return()=>{t||(e(),t=!0)}}
276,un=-1,Wy=new Set,Ny=()=>document.visibilityState!=="hidden"||document.prerendering?1/0:0,Wu=e=>{if(document.visibilityState==="hidden"){if(e.type==="visibilitychange")for(let t of Wy)t();isFinite(un)||(un=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("prerenderingchange",Wu,!0))}},rs=()=>{if(un<0){let e=ai();un=(document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter((r=>r.name==="hidden"&&r.startTime>e))[0]?.startTime)??Ny(),addEventListener("visibilitychange",Wu,!0),addEventListener("prerenderingchange",Wu,!0),cn((()=>{setTimeout((()=>{un=Ny()}))}))}return{get firstHiddenTime(){return un},onHidden(e){Wy.add(e)}}},ns=e=>{document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},My=[1800,3e3],Ju=(e,t={})=>{ns((()=>{let r=rs(),n,i=Vt("FCP"),o=li("paint",(s=>{for(let c of s)c.name==="first-contentful-paint"&&(o.disconnect(),c.startTime<r.firstHiddenTime&&(i.value=Math.max(c.startTime-ai(),0),i.entries.push(c),n(!0)))}));o&&(n=jt(e,i,My,t.reportAllChanges),cn((s=>{i=Vt("FCP"),n=jt(e,i,My,t.reportAllChanges),Hu((()=>{i.value=performance.now()-s.timeStamp,n(!0)}))})))}))},Ly=[.1,.25],jy=(e,t={})=>{let r=rs();Ju(Yu((()=>{let n,i=Vt("CLS",0),o=Xu(t,Gu),s=l=>{for(let u of l)o.h(u);o.i>i.value&&(i.value=o.i,i.entries=o.o,n())},c=li("layout-shift",s);c&&(n=jt(e,i,Ly,t.reportAllChanges),r.onHidden((()=>{s(c.takeRecords()),n(!0)})),cn((()=>{o.i=0,i=Vt("CLS",0),n=jt(e,i,Ly,t.reportAllChanges),Hu((()=>n()))})),setTimeout(n))})))},Vy=0,qu=1/0,ts=0,VI=e=>{for(let t of e)t.interactionId&&(qu=Math.min(qu,t.interactionId),ts=Math.max(ts,t.interactionId),Vy=ts?(ts-qu)/7+1:0)},ju,Dy=()=>ju?Vy:performance.interactionCount??0,zI=()=>{"interactionCount"in performance||ju||(ju=li("event",VI,{type:"event",buffered:!0,durationThreshold:0}))},Uy=0,Vu=class{u=[];l=new Map;m;p;v(){Uy=Dy(),this.u.length=0,this.l.clear()}L(){let t=Math.min(this.u.length-1,Math.floor((Dy()-Uy)/50));return this.u[t]}h(t){if(this.m?.(t),!t.interactionId&&t.entryType!=="first-input")return;let r=this.u.at(-1),n=this.l.get(t.interactionId);if(n||this.u.length<10||t.duration>r.P){if(n?t.duration>n.P?(n.entries=[t],n.P=t.duration):t.duration===n.P&&t.startTime===n.entries[0].startTime&&n.entries.push(t):(n={id:t.interactionId,entries:[t],P:t.duration},this.l.set(n.id,n),this.u.push(n)),this.u.sort(((i,o)=>o.P-i.P)),this.u.length>10){let i=this.u.splice(10);for(let o of i)this.l.delete(o.id)}this.p?.(n)}}},zy=e=>{let t=globalThis.requestIdleCallback||setTimeout;document.visibilityState==="hidden"?e():(e=Yu(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t((()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})})))},Fy=[200,500],$y=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;let r=rs();ns((()=>{zI();let n,i=Vt("INP"),o=Xu(t,Vu),s=l=>{zy((()=>{for(let a of l)o.h(a);let u=o.L();u&&u.P!==i.value&&(i.value=u.P,i.entries=u.entries,n())}))},c=li("event",s,{durationThreshold:t.durationThreshold??40});n=jt(e,i,Fy,t.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),r.onHidden((()=>{s(c.takeRecords()),n(!0)})),cn((()=>{o.v(),i=Vt("INP"),n=jt(e,i,Fy,t.reportAllChanges)})))}))},zu=class{m;h(t){this.m?.(t)}},By=[2500,4e3],Hy=(e,t={})=>{ns((()=>{let r=rs(),n,i=Vt("LCP"),o=Xu(t,zu),s=l=>{t.reportAllChanges||(l=l.slice(-1));for(let u of l)o.h(u),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-ai(),0),i.entries=[u],n())},c=li("largest-contentful-paint",s);if(c){n=jt(e,i,By,t.reportAllChanges);let l=Yu((()=>{s(c.takeRecords()),c.disconnect(),n(!0)})),u=a=>{a.isTrusted&&(zy(l),removeEventListener(a.type,u,{capture:!0}))};for(let a of["keydown","click","visibilitychange"])addEventListener(a,u,{capture:!0});cn((a=>{i=Vt("LCP"),n=jt(e,i,By,t.reportAllChanges),Hu((()=>{i.value=performance.now()-a.timeStamp,n(!0)}))}))}}))},qy=[800,1800],$u=e=>{document.prerendering?ns((()=>$u(e))):document.readyState!=="complete"?addEventListener("load",(()=>$u(e)),!0):setTimeout(e)},Ky=(e,t={})=>{let r=Vt("TTFB"),n=jt(e,r,qy,t.reportAllChanges);$u((()=>{let i=Ku();i&&(r.value=Math.max(i.responseStart-ai(),0),r.entries=[i],n(!0),cn((()=>{r=Vt("TTFB",0),n=jt(e,r,qy,t.reportAllChanges),n(!0)})))}))};function $I(e){var t,r=((t=e.entries[0])===null||t===void 0?void 0:t.startTime)||0;return performance.timeOrigin+r}function ui(e){return{value:e.value,rating:e.rating,delta:e.delta,navigationType:e.navigationType,id:e.id,timestamp:Math.floor($I(e)),navigationStart:Math.floor(performance.timeOrigin)}}var is=function(){var e=null,t=j(),r=t?.document,n=t?.location,i=function(c,l){return O(void 0,void 0,void 0,function(){var u,a;return R(this,function(h){return r===void 0?[2]:(u=ot(n?.href||"",c.loggerProvider),a={"[Amplitude] Page Domain":n?.hostname||"","[Amplitude] Page Location":u,"[Amplitude] Page Path":ot(n?.pathname||"",c.loggerProvider),"[Amplitude] Page Title":typeof document<"u"&&document.title||"","[Amplitude] Page URL":ot(u.split("?")[0],c.loggerProvider)},Hy(function(f){a["[Amplitude] LCP"]=ui(f)}),Ju(function(f){a["[Amplitude] FCP"]=ui(f)}),$y(function(f){a["[Amplitude] INP"]=ui(f)}),jy(function(f){a["[Amplitude] CLS"]=ui(f)}),Ky(function(f){a["[Amplitude] TTFB"]=ui(f)}),e=function(){r.visibilityState==="hidden"&&e&&(l.track(ky,a),r.removeEventListener("visibilitychange",e),e=null)},r.addEventListener("visibilitychange",e),[2])})})},o=function(c){return O(void 0,void 0,void 0,function(){return R(this,function(l){return[2,c]})})},s=function(){return O(void 0,void 0,void 0,function(){return R(this,function(c){return e&&r?.removeEventListener("visibilitychange",e),[2]})})};return{name:Py,type:"enrichment",setup:i,execute:o,teardown:s}};z();ee();var Qu=(function(){function e(t,r){var n;this.shouldTrackNewCampaign=!1,this.options=P({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:Bg(((n=r.cookieOptions)===null||n===void 0?void 0:n.domain)||r.topLevelDomain),optOut:r.optOut},t),this.storage=r.cookieStorage,this.storageKey=lo(r.apiKey,"MKTG"),this.webExpStorageKey=lo(r.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=Xt,this.sessionTimeout=r.sessionTimeout,this.lastEventTime=r.lastEventTime,this.logger=r.loggerProvider,this.topLevelDomain=r.topLevelDomain,r.loggerProvider.log("Installing web attribution tracking.")}return e.prototype.init=function(){return O(this,void 0,void 0,function(){var t,r;return R(this,function(n){switch(n.label){case 0:return this.options.optOut?[2]:[4,this.fetchCampaign()];case 1:return r=B.apply(void 0,[n.sent(),2]),this.currentCampaign=r[0],this.previousCampaign=r[1],t=this.lastEventTime?Wn(this.sessionTimeout,this.lastEventTime):!0,Ug(this.currentCampaign,this.previousCampaign,this.options,this.logger,t,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 O(this,void 0,void 0,function(){var t;return R(this,function(r){switch(r.label){case 0:return[4,this.storage.get(this.webExpStorageKey)];case 1:return t=r.sent(),t?[4,this.storage.remove(this.webExpStorageKey)]:[3,3];case 2:r.sent(),r.label=3;case 3:return[4,Promise.all([t||new Er().parse(),this.storage.get(this.storageKey)])];case 4:return[2,r.sent()]}})})},e.prototype.generateCampaignEvent=function(t){this.shouldTrackNewCampaign=!1;var r=Fg(this.currentCampaign,this.options);return t&&(r.event_id=t),r},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e})();z();ee();var HI="[Amplitude] Attribution",KI=new Set([Ge.IDENTIFY,Ge.GROUP_IDENTIFY]),XI=function(e){return Vn(e)},Zu=function(e){var t;e===void 0&&(e={});var r=(t=e.fallbackAttributionEvent)!==null&&t!==void 0?t:!1,n=j(),i,o,s={},c=!1,l=!1,u,a,h,f,d=function(){return O(void 0,void 0,void 0,function(){var g;return R(this,function(y){switch(y.label){case 0:return[4,new Er().parse()];case 1:return g=y.sent(),s=XI(g),r&&(o?.log("Tracking attribution fallback event."),i?.track(HI,s)),[2]}})})},p=function(){d()},v=function(g){return new Proxy(g,{apply:function(y,m,E){Reflect.apply(y,m,E),c&&p()}})};return{name:"@amplitude/plugin-event-property-attribution-browser",type:"enrichment",setup:function(g,y){return O(void 0,void 0,void 0,function(){return R(this,function(m){switch(m.label){case 0:return i=y,o=g.loggerProvider,c=!0,o.log("Installing event property attribution tracking."),[4,d()];case 1:if(m.sent(),!n)return[2];if(n.addEventListener("popstate",p),!l){if(u=Reflect.get(n.history,"pushState"),a=Reflect.get(n.history,"replaceState"),!u||!a)return[2];h=v(u),n.history.pushState=h,f=v(a),n.history.replaceState=f,l=!0}return[2]}})})},execute:function(g){return O(void 0,void 0,void 0,function(){return R(this,function(y){return KI.has(g.event_type)?[2,g]:(g.event_properties=P(P({},s),g.event_properties),[2,g])})})},teardown:function(){return O(void 0,void 0,void 0,function(){var g,y;return R(this,function(m){return n&&(n.removeEventListener("popstate",p),g=Reflect.get(n.history,"pushState"),y=Reflect.get(n.history,"replaceState"),l&&g===h&&u&&(n.history.pushState=u),l&&y===f&&a&&(n.history.replaceState=a)),c=!1,l=!1,u=void 0,a=void 0,h=void 0,f=void 0,s={},[2]})})}}};z();ee();var fi="AMP_CURRENT_PAGE",di="AMP_PREVIOUS_PAGE",Ir="AMP_URL_INFO",hi;(function(e){e.Direct="direct",e.Internal="internal",e.External="external"})(hi||(hi={}));var YI=new Set([Ge.IDENTIFY,Ge.GROUP_IDENTIFY,Ge.REVENUE]);var ec=function(e){var t=e===void 0?{}:e,r=t.internalDomains,n=r===void 0?[]:r,i=j(),o=void 0,s=!1,c=void 0,l=!1,u=!1,a=function(v){var g;try{var y=ot(v,c);g=new URL(y).hostname}catch(m){c?.error("Could not parse URL: ",m)}return g},h=function(v){var g=typeof location<"u"&&location.hostname||"",y=v?a(v):void 0;if(!y)return hi.Direct;var m=n.some(function(w){return g.indexOf(w)!==-1}),E=n.some(function(w){return y.indexOf(w)!==-1});return g===y||E&&m?hi.Internal:hi.External},f=function(){return O(void 0,void 0,void 0,function(){var v,g,y,m,E;return R(this,function(w){switch(w.label){case 0:return o&&s?[4,o.get(Ir)]:[3,3];case 1:return v=w.sent(),g=ot(typeof location<"u"&&location.href||""),y=v?.[fi]||"",m=void 0,g===y?m=v?.[di]||"":y?m=y:m=
276document.referrer||"",[4,o.set(Ir,(E={},E[fi]=g,E[di]=m,E))];case 2:w.sent(),w.label=3;case 3:return[2]}})})},d=function(){f()},p={name:"@amplitude/plugin-page-url-enrichment-browser",type:"enrichment",setup:function(v,g){return O(void 0,void 0,void 0,function(){var y,m,E,w,b,S,_,x,I;return R(this,function(C){switch(C.label){case 0:if(c=v.loggerProvider,c.log("Installing @amplitude/plugin-page-url-enrichment-browser"),u=!0,!i)return[3,7];try{o=new Jt(i.sessionStorage)}catch{c?.debug("sessionStorage is not available in this environment.")}return[4,o?.isEnabled()];case 1:return s=(I=C.sent())!==null&&I!==void 0?I:!1,o&&s?(y=typeof document<"u"&&document.referrer||"",m=y?a(y):void 0,E=typeof location<"u"&&location.hostname||"",w=ot(typeof location<"u"&&location.href||""),[4,o.get(Ir)]):[3,6];case 2:return b=C.sent(),S=b?.[fi]||"",_=!!m&&m!==E&&S!==w,_?[4,o.set(Ir,(x={},x[fi]=w,x[di]=y,x))]:[3,4];case 3:return C.sent(),[3,6];case 4:return[4,f()];case 5:C.sent(),C.label=6;case 6:i.addEventListener("popstate",d),l||(i.history.pushState=new Proxy(i.history.pushState,{apply:function(k,N,T){var F=B(T,3),D=F[0],G=F[1],q=F[2];k.apply(N,[D,G,q]),u&&d()}}),i.history.replaceState=new Proxy(i.history.replaceState,{apply:function(k,N,T){var F=B(T,3),D=F[0],G=F[1],q=F[2];k.apply(N,[D,G,q]),u&&d()}}),l=!0),C.label=7;case 7:return[2]}})})},execute:function(v){return O(void 0,void 0,void 0,function(){var g,y,m;return R(this,function(E){switch(E.label){case 0:return g=ot(typeof location<"u"&&location.href||""),o&&s?[4,o.get(Ir)]:[3,2];case 1:if(y=E.sent(),m=y?.[di]||"",YI.has(v.event_type))return[2,v];v.event_properties=P(P({},v.event_properties||{}),{"[Amplitude] Page Domain":ci(v,"[Amplitude] Page Domain",typeof location<"u"&&location.hostname||""),"[Amplitude] Page Location":ci(v,"[Amplitude] Page Location",g),"[Amplitude] Page Path":ci(v,"[Amplitude] Page Path",typeof location<"u"&&ot(location.pathname)||""),"[Amplitude] Page Title":ci(v,"[Amplitude] Page Title",_r(wr)),"[Amplitude] Page URL":ci(v,"[Amplitude] Page URL",g.split("?")[0]),"[Amplitude] Previous Page Location":m,"[Amplitude] Previous Page Type":h(m)}),E.label=2;case 2:return[2,v]}})})},teardown:function(){return O(void 0,void 0,void 0,function(){return R(this,function(v){switch(v.label){case 0:return i&&(i.removeEventListener("popstate",d),u=!1),o&&s?[4,o.set(Ir,{})]:[3,2];case 1:v.sent(),v.label=2;case 2:return[2]}})})}};return p};function ci(e,t,r){return e.event_properties||(e.event_properties={}),e.event_properties[t]===void 0?r:e.event_properties[t]}z();var tc=function(){var e,t,r;function n(s){return typeof s!="object"||s===null?!1:"body"in s&&typeof s.body=="string"}function i(s){if(s)try{var c=new Function("return "+s)();if(typeof c=="function")return c;e?.error("Custom enrichment body did not evaluate to a function")}catch(l){e?.error("Could not create custom enrichment function",l)}return function(l){return l}}var o={name:"@amplitude/plugin-custom-enrichment-browser",type:"enrichment",setup:function(s,c){return O(void 0,void 0,void 0,function(){var l,u;return R(this,function(a){return e=s.loggerProvider,e?.log("Installing @amplitude/plugin-custom-enrichment-browser"),!((u=s.remoteConfig)===null||u===void 0)&&u.fetchRemoteConfig&&(s.remoteConfigClient?(l=s.remoteConfigClient.subscribe("configs.analyticsSDK.browserSDK.customEnrichment","all",function(h){h&&n(h)?r=i(h.body||""):r=i("")}),t=function(){var h;return(h=s.remoteConfigClient)===null||h===void 0?void 0:h.unsubscribe(l)}):e?.debug("Remote config client is not provided, skipping remote config fetch")),[2]})})},execute:function(s){return O(void 0,void 0,void 0,function(){var c;return R(this,function(l){if(r)try{return[2,(c=r(s))!==null&&c!==void 0?c:null]}catch(u){return e?.error("Could not execute custom enrichment function",u),[2,s]}return[2,s]})})},teardown:function(){return O(void 0,void 0,void 0,function(){return R(this,function(s){return t&&t(),[2]})})}};return o};z();var rc="userProperty",nc="eventProperty",JI=function(e){return e===rc||e===nc},QI=[rc,nc],ZI=function(e){var t=H([],B(new Set((Array.isArray(e)?e:[e]).filter(JI))),!1);return t.length>0?t:H([],B(QI),!1)},Xy=function(e,t){return ZI(e.trackingMethod).includes(t)},ic=function(e){return Xy(e,rc)},Yy=function(e){return Xy(e,nc)};var oc=-1,pi=(function(e){De(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._diagnosticsSampleRate=0,r}return t.prototype.init=function(r,n,i){r===void 0&&(r="");var o,s;return arguments.length>2?(o=n,s=i):typeof n=="string"?(o=n,s=void 0):(o=n?.userId,s=n),Ve(this._init(P(P({},s),{userId:o,apiKey:r})))},t.prototype._init=function(r){var n,i,o,s,c,l,u,a;return O(this,void 0,void 0,function(){var h,f,d,p,v,g,y,m,E,w,b,S,_,x,I,C=this;return R(this,function(k){switch(k.label){case 0:return this.initializing?[2]:(this.initializing=!0,h=Gg(r),f=(n=r.loggerProvider)!==null&&n!==void 0?n:new St,r.loggerProvider||f.enable((i=r.logLevel)!==null&&i!==void 0?i:We.Warn),d=(o=r.serverZone)!==null&&o!==void 0?o:No,v=this._diagnosticsSampleRate,g=(s=r.enableDiagnostics)!==null&&s!==void 0?s:!0,h?(p=new Xn(r.apiKey,f,d,(c=r.remoteConfig)===null||c===void 0?void 0:c.serverUrl),[4,new Promise(function(N){p?.subscribe("configs.diagnostics.browserSDK","all",function(T,F,D){if(f.debug("Diagnostics remote configuration received:",JSON.stringify({remoteConfig:T,s
276ource:F,lastFetch:D},null,2)),T){var G=T.sampleRate;typeof G=="number"&&!isNaN(G)&&(v=G);var q=T.enabled;typeof q=="boolean"&&(g=q)}N()})})]):[3,2]);case 1:k.sent(),k.label=2;case 2:return y=new kl(r.apiKey,f,d,{enabled:g,sampleRate:v}),y.setTag("library","".concat(Ao,"/").concat(rn)),y.setTag("platform",vu),y.setTag("web_environment",Eg()),typeof navigator<"u"&&y.setTag("user_agent",navigator.userAgent),[4,qg(r.apiKey,r,this,y,{loggerProvider:f,serverZone:d,enableDiagnostics:g,diagnosticsSampleRate:v})];case 3:return m=k.sent(),h&&p?[4,new Promise(function(N){p?.subscribe("configs.analyticsSDK.browserSDK","all",function(T,F,D){m.loggerProvider.debug("Remote configuration received:",JSON.stringify({remoteConfig:T,source:F,lastFetch:D},null,2)),T&&Kg(T,m),N()})})]:[3,5];case 4:k.sent(),k.label=5;case 5:return[4,e.prototype._init.call(this,m)];case 6:return k.sent(),this.logBrowserOptions(m),this.config.remoteConfigClient=p,E=bg(this.config),To(this.config.defaultTracking)&&ic(E)?(this.config.optOut&&this.timeline.addOptOutListener(function(N){return O(C,void 0,void 0,function(){return R(this,function(T){switch(T.label){case 0:return N?[3,2]:(this.webAttribution=new Qu(E,this.config),[4,this.webAttribution.init()]);case 1:T.sent(),T.label=2;case 2:return[2]}})})}),this.webAttribution=new Qu(E,this.config),[4,this.webAttribution.init()]):[3,8];case 7:k.sent(),k.label=8;case 8:return w=or(),b=w.ampTimestamp?Number(w.ampTimestamp):void 0,S=b?Date.now()<b:!0,_=S&&!Number.isNaN(Number(w.ampSessionId))?Number(w.ampSessionId):void 0,x=this.config.deferredSessionId,x===oc&&!this.config.optOut&&(x=Date.now()),this.setSessionId((a=(u=(l=r.sessionId)!==null&&l!==void 0?l:_)!==null&&u!==void 0?u:x)!==null&&a!==void 0?a:this.config.sessionId),this.config.optOut&&this.timeline.addOptOutListener(function(N){return O(C,void 0,void 0,function(){return R(this,function(T){return!N&&this.config.deferredSessionId&&(this.config.deferredSessionId===oc?this.setSessionId(void 0):this.setSessionId(this.config.deferredSessionId)),[2]})})}),I=qt(r.instanceName),I.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),this.config.offline===fo?[3,10]:[4,this.add(Hg()).promise];case 9:k.sent(),k.label=10;case 10:return[4,this.add(new Sl({diagnosticsClient:y})).promise];case 11:return k.sent(),[4,this.add(new wg).promise];case 12:return k.sent(),[4,this.add(new xl).promise];case 13:return k.sent(),$g(this.config),cg(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(Vg()).promise]):[3,15];case 14:k.sent(),k.label=15;case 15:return lu(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(jg()).promise]):[3,17];case 16:k.sent(),k.label=17;case 17:return uu(this.config.defaultTracking)?this.config.optOut?[3,19]:(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(Mo(pu(this.config))).promise]):[3,20];case 18:return k.sent(),[3,20];case 19:this.timeline.addOptOutListener(function(N){return O(C,void 0,void 0,function(){return R(this,function(T){switch(T.label){case 0:return N?[2]:(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(Mo(pu(this.config))).promise]);case 1:return T.sent(),[2]}})})}),k.label=20;case 20:return To(this.config.defaultTracking)&&Yy(E)?(this.config.loggerProvider.debug("Adding event property attribution plugin"),[4,this.add(Zu(E)).promise]):[3,22];case 21:k.sent(),k.label=22;case 22:return du(this.config.autocapture)?(this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(Yo(gg(this.config),{diagnosticsClient:y})).promise]):[3,24];case 23:k.sent(),k.label=24;case 24:return hu(this.config.autocapture)?(this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(Lu(mg(this.config))).promise]):[3,26];case 25:k.sent(),k.label=26;case 26:return fu(this.config.autocapture)?(this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(es(yg(this.config))).promise]):[3,28];case 27:k.sent(),k.label=28;case 28:return dg(this.config.autocapture)?(this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(is()).promise]):[3,30];case 29:k.sent(),k.label=30;case 30:return hg(this.config.autocapture)?(this.config.loggerProvider.debug("Adding performance tracking plugin"),[4,this.add(Du(pg(this.config))).promise]):[3,32];case 31:k.sent(),k.label=32;case 32:return fg(this.config.autocapture)?(this.config.loggerProvider.debug("Adding referrer page url plugin"),[4,this.add(ec()).promise]):[3,34];case 33:k.sent(),k.label=34;case 34:return vg(this.config.customEnrichment)?(this.config.loggerProvider.debug("Adding custom enrichment plugin"),[4,this.add(tc()).promise]):[3,36];case 35:k.sent(),k.label=36;case 36:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 37:return k.sent(),I.eventBridge.setEventReceiver(function(N){var T=N.eventProperties||{},F=T.time,D=Rt(T,["time"]),G=typeof F=="number"?{time:F}:void 0;C.track(N.eventType,D,G)}),[2]}})})},t.prototype.getUserId=function(){var r;return(r=this.config)===null||r===void 0?void 0:r.userId},t.prototype.setUserId=function(r){if(!this.config){this.q.push(this.setUserId.bind(this,r));return}
276this.config.loggerProvider.debug("function setUserId: ",r),(r!==this.config.userId||r===void 0)&&(this.config.userId=r,this.timeline.onIdentityChanged({userId:r}),El(r,this.config.instanceName))},t.prototype.getDeviceId=function(){var r;return(r=this.config)===null||r===void 0?void 0:r.deviceId},t.prototype.setDeviceId=function(r){if(!this.config){this.q.push(this.setDeviceId.bind(this,r));return}this.config.loggerProvider.debug("function setDeviceId: ",r),r!==this.config.deviceId&&(this.config.deviceId=r,this.timeline.onIdentityChanged({deviceId:r}),wl(r,this.config.instanceName))},t.prototype.reset=function(){this.setDeviceId(Xe()),this.setUserId(void 0),this.timeline.onReset()},t.prototype.getIdentity=function(){var r,n;return{deviceId:(r=this.config)===null||r===void 0?void 0:r.deviceId,userId:(n=this.config)===null||n===void 0?void 0:n.userId,userProperties:this.userProperties}},t.prototype.setIdentity=function(r){var n,i,o;if("userId"in r&&this.setUserId(r.userId),"deviceId"in r&&r.deviceId&&this.setDeviceId(r.deviceId),"userProperties"in r){this.userProperties=r.userProperties;var s=new dt,c=(o=r.userProperties)!==null&&o!==void 0?o:{};try{for(var l=U(Object.entries(c)),u=l.next();!u.done;u=l.next()){var a=B(u.value,2),h=a[0],f=a[1];s.set(h,f)}}catch(d){n={error:d}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}this.identify(s)}},t.prototype.getOptOut=function(){var r;return(r=this.config)===null||r===void 0?void 0:r.optOut},t.prototype.getSessionId=function(){var r;return(r=this.config)===null||r===void 0?void 0:r.sessionId},t.prototype.setSessionId=function(r){var n,i=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,r)),Ve(Promise.resolve());if(this.config.optOut)return this.config.deferredSessionId=r??oc,Ve(Promise.resolve());if(r===void 0&&(r=Date.now()),r===this.config.sessionId)return Ve(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",r);var o=this.getSessionId();o!==r&&this.timeline.onSessionIdChanged(r);var s=this.config.lastEventTime,c=(n=this.config.lastEventId)!==null&&n!==void 0?n:-1;this.config.sessionId=r,this.config.lastEventTime=void 0,this.config.pageCounter=0,cu(this.config.defaultTracking)&&(o&&s&&i.push(this.track(Su,void 0,{device_id:this.previousSessionDeviceId,event_id:++c,session_id:o,time:s+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var l=this.trackCampaignEventIfNeeded(++c,i);return this.config.identify&&i.push(this.track(yr(this.config.identify)).promise),cu(this.config.defaultTracking)&&i.push(this.track(bu,void 0,{event_id:l?++c:c,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,Ve(Promise.all(i))},t.prototype.extendSession=function(){if(!this.config){this.q.push(this.extendSession.bind(this));return}this.config.lastEventTime=Date.now()},t.prototype.setTransport=function(r){if(!this.config){this.q.push(this.setTransport.bind(this,r));return}this.config.transportProvider=_u(r)},t.prototype.identify=function(r,n){if(Io(r)){var i=r._q;r._q=[],r=Co(new dt,i)}return n?.user_id&&this.setUserId(n.user_id),n?.device_id&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,r,n)},t.prototype.groupIdentify=function(r,n,i,o){if(Io(i)){var s=i._q;i._q=[],i=Co(new dt,s)}return e.prototype.groupIdentify.call(this,r,n,i,o)},t.prototype.revenue=function(r,n){if(Io(r)){var i=r._q;r._q=[],r=Co(new Ln,i)}return e.prototype.revenue.call(this,r,n)},t.prototype.trackCampaignEventIfNeeded=function(r,n){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign||!ic(this.webAttribution.options))return!1;var i=this.webAttribution.generateCampaignEvent(r);return n?n.push(this.track(i).promise):this.track(i),this.config.loggerProvider.log("Tracking attribution."),!0},t.prototype.process=function(r){return O(this,void 0,void 0,function(){var n,i,o;return R(this,function(s){return n=Date.now(),i=Wn(this.config.sessionTimeout,this.config.lastEventTime),o=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),r.event_type!==bu&&r.event_type!==Su&&(!r.session_id||r.session_id===this.getSessionId())&&(i||o?(this.setSessionId(n),o&&this.config.loggerProvider.log("Created a new session for new campaign.")):i||this.trackCampaignEventIfNeeded()),[2,e.prototype.process.call(this,r)]})})},t.prototype.logBrowserOptions=function(r){try{var n=P(P({},r),{apiKey:r.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",Jr(n))}catch(i){this.config.loggerProvider.error("Error logging browser config",i)}},t.prototype._setDiagnosticsSampleRate=function(r){if(!(r>1||r<0)&&!this.config){this._diagnosticsSampleRate=r;return}},t})(hl);var eA=function(){var e=new pi;return{init:Z(e.init.bind(e),"init",le(e),ue(e,["config"])),add:Z(e.add.bind(e),"add",le(e),ue(e,["config.apiKey","timeline.plugins"])),remove:Z(e.remove.bind(e),"remove",le(e),ue(e,["config.apiKey","timeline.plugins"])),track:Z(e.track.bind(e),"track",le(e),ue(e,["config.apiKey","timeline.queue.length"])),logEvent:Z(e.logEvent.bind(e),"logEvent",le(e),ue(e,["config.apiKey","timeline.queue.length"])),identify:Z(e.identify.bind(e),"identify",le(e),ue(e,["config.apiKey","timeline.queue.length"])),groupIdentify:Z(e.groupIdentify.bind(e),"groupIdentify",le(e),ue(e,["config.apiKey","timeline.queue.length"])),setGroup:Z(e.setGroup.bind(e),"setGroup",le(e),ue(e,["config.apiKey","timeline.queue.length"])),revenue:Z(e.revenue.bind(e),"revenue",le(e),ue(e,["config.apiKey","timeline.queue.length"])),flush:Z(e.flush.bind(e),"flush",le(e),ue(e,["config.apiKey","timeline.queue.length"])),getUserId:Z(e.getUserId.bind(e),"getUserId",le(e),ue(e,["config","config.userId"])),setUserId:Z(e.setUserId.bind(e),"setUserId",le(e),ue(e,["config","config.userId"])),getDeviceId:Z(e.getDeviceId.bind(e),"getDeviceId",le(e),ue(e,["config","config.deviceId"])),setDeviceId:Z(e.setDeviceId.bind(e),"setDeviceId",le(e),ue(e,["config","config.deviceId"])),reset:Z(e.reset.bind(e),"reset",le(e),ue(e,["config","config.userId","config.deviceId"])),getSessionId:Z(e.getSessionId.bind(e),"getSessionId",le(e),ue(e,["config"])),setSessionId:Z(e.setSessionId.bind(e),"setSessionId",le(e),ue(e,["config"])),extendSession:Z(e.extendSession.bind(e),"extendSession",le(e),ue(e,["config"])),setOptOut:Z(e.setOptOut.bind(e),"setOptOut",le(e),ue(e,["config"])),setTransport:Z(e.setTransport.bind(e),"setTransport",le(e),ue(e,["config"])),getIdentity:Z(e.getIdentity.bind(e),"getIdentity",le(e),ue(e,["config"])),setIdentity:Z(e.setIdentity.bind(e),"setIdentity",le(e),ue(e,["config","config.userId","config.deviceId"])),getOptOut:Z(e.getOptOut.bind(e),"getOptOut",le(e),ue(e,["config"])),_setDiagnosticsSampleRate:Z(e._setDiagnosticsSampleRate.bind(e),"_setDiagnosticsSampleRate",le(e),ue(e,["config"]))}},Le=eA();ee();var TG=Le.add,CG=Le.extendSession,IG=Le.flush,AG=Le.getDeviceId,RG=Le.getIdentity,OG=Le.getOptOut,PG=Le.getSessionId,kG=Le.getUserId,NG=Le.groupIdentify,MG=Le.identify,LG=Le.init,DG=Le.logEvent,UG=Le.remove,FG=Le.reset,BG=Le.revenue,qG=Le.setDeviceId,GG=Le.setGroup,WG=Le.setIdentity,jG=Le.setOptOut,VG=Le.setSessionId,zG=Le.setTransport,$G=Le.setUserId,HG=Le.track,KG=Le._setDiagnosticsSampleRate;z();ee();ee();z();ee();ee();var Jy="[Amplitude]",Qy="".concat(Jy," Session Replay ID");var Zy=0,eb=$r.US,tb={enabled:!0},vi=1e3,rb="".concat(Jy," Session Replay Debug"),nb="amp-block",os="amp-mask",ss="amp-unmask",as="https://api-sr.amplitude.com/sessions/v2/track",ls="https://api-sr.eu.amplitude.com/sessions/v2/track",us="https://api-sr.stag2.amplitude.com/sessions/v2/track",ZG="".concat(Kt,"_replay_unsent"),tA=2e6,ib=6e6,cs=9*1e6,ob=/payload.*exceed/i,sb=3e4,ab=6e4,gi=500,mi=10*1e3,lb=1e3,ub=10*1e3,eW=1e3*60*60*24*3,yi=1024,cb=1e3;var fb=64*1024,db=1e4,sc="X-Session-Replay-Event-Skipped",hb="429",pb="4004",vb="4005",ac=6e4,gb=2*tA,bi="amplitude-sr-iframe",zt;(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"})(zt||(zt={}));var Si=(function(){function e(t){this.logger=t,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(t){var r;if(!this.logger)return(function(){});var n=this.logger[t];if(typeof n=="function"){var i=(r=n.__rrweb_original__)!==null&&r!==void 0?r:n;return i.bind(this.logger)}return(function(){})},e.prototype.enable=function(t){this.logger.enable(t)}
276,e.prototype.disable=function(){this.logger.disable()},e})();z();ee();var fs="medium";function rA(e){return e.toLowerCase()}function mb(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?rA(t):null}function Zt(e,t){return t||(e==="STAGING"?us:e==="EU"?ls:as)}var bb=function(e,t,r){switch(t){case"light":{if(e!=="input")return!1;var n=r?mb(r):"";return n?!!(["password","hidden","email","tel"].includes(n)||r.autocomplete.startsWith("cc-")):!1}case"medium":return e==="input";case"conservative":return!0;default:return bb(e,fs,r)}},lc=function(e,t){var r,n,i;if(e&&t.urlMaskLevels)try{for(var o=U(t.urlMaskLevels),s=o.next();!s.done;s=o.next()){var c=s.value;if(_b(c.match).test(e))return c.maskLevel}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return(i=t.defaultMaskLevel)!==null&&i!==void 0?i:fs},Sb=function(e,t,r,n){var i,o;if(t===void 0&&(t={defaultMaskLevel:fs}),r){if(r.closest("."+os))return!0;var s=((i=t.maskSelector)!==null&&i!==void 0?i:[]).some(function(l){return r.closest(l)});if(s)return!0;if(r.closest("."+ss))return!1;var c=((o=t.unmaskSelector)!==null&&o!==void 0?o:[]).some(function(l){return r.closest(l)});if(c)return!1}return bb(e,lc(n,t),r)},uc=function(e,t,r){return function(n,i){return Sb(e,t,i,r?.())?n.replace(/[^\s]/g,"*"):n}},Eb=function(e,t){return function(r,n,i){var o;if(r==="style"||!((o=e?.maskAttributes)!==null&&o!==void 0?o:[]).includes(r))return n;var s=["INPUT","SELECT","TEXTAREA"].includes(i.tagName)?"input":"text";return Sb(s,e,i,t?.())?n.replace(/[^\s]/g,"*"):n}},Ei=function(){var e=j();return e?.location?e.location.href:""},wb=function(e,t){return"".concat(t,"/").concat(e)},nA=function(e){if(typeof e!="string"||e.trim()==="")return!1;var t=/^\/|^https?:\/\/[^\s]+$/;return!!t.test(e)},yb=new Map,_b=function(e){var t=yb.get(e);if(t)return t;var r="\0TRAIL\0",n="\0MID\0",i="\0DS\0",o="\0ST\0",s="\0QU\0",c=e;c=c.replace(/\/\*\*$/,r),c=c.replace(/\/\*\*\//g,n),c=c.replace(/\*\*/g,i),c=c.replace(/\*/g,o),c=c.replace(/\?/g,s),c=c.replace(/[.+^${}()|[\]\\]/g,"\\$&"),c=c.split(r).join("(/.*)?"),c=c.split(n).join("/(.*\\/)?"),c=c.split(i).join(".*"),c=c.split(o).join(".*"),c=c.split(s).join(".");var l=new RegExp("^".concat(c,"$"));return yb.set(e,l),l},xb=function(e){if(!e.every(function(t){return typeof t.selector=="string"&&typeof t.replacement=="string"}))throw new Error("ugcFilterRules must be an array of objects with selector and replacement properties");if(!e.every(function(t){return nA(t.selector)}))throw new Error("ugcFilterRules must be an array of objects with valid globs")},ar=function(e,t){var r,n;try{for(var i=U(t),o=i.next();!o.done;o=i.next()){var s=o.value,c=_b(s.selector);if(c.test(e))return e.replace(c,s.replacement)}}catch(l){r={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return e},ds=function(){return O(void 0,void 0,void 0,function(){var e,t,r,n,i,o,s,c;return R(this,function(l){switch(l.label){case 0:return l.trys.push([0,3,,4]),e=j(),e?[4,e.navigator.storage.estimate()]:[3,2];case 1:return t=l.sent(),r=t.usage,n=t.quota,i=t.usageDetails,o=r?Math.round(r/yi):0,s=r&&n?Math.round((r/n+Number.EPSILON)*1e3)/1e3:0,[2,{totalStorageSize:o,percentOfQuota:s,usageDetails:JSON.stringify(i)}];case 2:return[3,4];case 3:return c=l.sent(),[3,4];case 4:return[2,{totalStorageSize:0,percentOfQuota:0,usageDetails:""}]}})})},hs=function(e){var t=P({},e),r=t.apiKey;return t.apiKey="****".concat(r.substring(r.length-4)),t};var cc=function(){return{flushMaxRetries:2,logLevel:We.Warn,loggerProvider:new St,transportProvider:new Ml}},Ib=(function(e){De(t,e);function t(r,n){var i=this,o,s,c,l,u,a,h,f,d,p,v,g,y,m,E=cc();i=e.call(this,P(P({transportProvider:E.transportProvider,loggerProvider:new Si(n.loggerProvider||E.loggerProvider)},n),{apiKey:r}))||this,i.flushMaxRetries=n.flushMaxRetries!==void 0&&n.flushMaxRetries<=E.flushMaxRetries?n.flushMaxRetries:E.flushMaxRetries,i.apiKey=r,i.sampleRate=n.sampleRate||Zy,i.serverZone=n.serverZone||eb,i.configServerUrl=n.configServerUrl,i.trackServerUrl=n.trackServerUrl,i.shouldInlineStylesheet=n.shouldInlineStylesheet,i.version=n.version,i.performanceConfig=n.performanceConfig||tb,i.storeType=(o=n.storeType)!==null&&o!==void 0?o:"memory",i.applyBackgroun
276dColorToBlockedElements=(s=n.applyBackgroundColorToBlockedElements)!==null&&s!==void 0?s:!1,i.enableUrlChangePolling=(c=n.enableUrlChangePolling)!==null&&c!==void 0?c:!1,i.urlChangePollingInterval=(l=n.urlChangePollingInterval)!==null&&l!==void 0?l:vi,i.captureDocumentTitle=(u=n.captureDocumentTitle)!==null&&u!==void 0?u:!1,n.fullSnapshotIntervalMs!==void 0&&(i.fullSnapshotIntervalMs=n.fullSnapshotIntervalMs),n.eagerFullSnapshotSend!==void 0&&(i.eagerFullSnapshotSend=n.eagerFullSnapshotSend),i.captureFullSnapshotOnFocus=(a=n.captureFullSnapshotOnFocus)!==null&&a!==void 0?a:!1,n.maxPersistedEventsSizeBytes!==void 0&&(i.maxPersistedEventsSizeBytes=Cb(n.maxPersistedEventsSizeBytes,Tb,iA,"maxPersistedEventsSizeBytes",i.loggerProvider)),n.maxSingleEventSizeBytes!==void 0&&(i.maxSingleEventSizeBytes=Cb(n.maxSingleEventSizeBytes,Tb,oA,"maxSingleEventSizeBytes",i.loggerProvider)),i.privacyConfig=P(P({},(h=n.privacyConfig)!==null&&h!==void 0?h:{}),{unmaskSelector:Array.from(new Set(H([".".concat(ss)],B((d=(f=n.privacyConfig)===null||f===void 0?void 0:f.unmaskSelector)!==null&&d!==void 0?d:[]),!1)))}),n.interactionConfig&&(i.interactionConfig=n.interactionConfig,i.interactionConfig.ugcFilterRules&&xb(i.interactionConfig.ugcFilterRules)),n.debugMode&&(i.debugMode=n.debugMode);var w=n;return i.useWebWorker=(g=(p=n.useWebWorker)!==null&&p!==void 0?p:(v=w.experimental)===null||v===void 0?void 0:v.useWebWorker)!==null&&g!==void 0?g:!0,i.enableTransportCompression=(y=n.enableTransportCompression)!==null&&y!==void 0?y:!0,i.sendTimeoutMs=n.sendTimeoutMs,i.captureAdoptedStyleSheets=(m=n.captureAdoptedStyleSheets)!==null&&m!==void 0?m:!0,n.crossOriginIframes&&(i.crossOriginIframes=n.crossOriginIframes),n.flushIntervalConfig?i.flushIntervalConfig=sA(n.flushIntervalConfig,i.loggerProvider):i.flushIntervalConfig={minIntervalMs:lb,maxIntervalMs:ub},i.handleSendEvents=n.handleSendEvents,i.handleFetchConfig=n.handleFetchConfig,i}return t})(Un);var fn=100,Tb=1e3,iA=8e6,oA=1e7;function Cb(e,t,r,n,i){if(!Number.isFinite(e)){i.warn("".concat(n," value is not a finite number (got ").concat(String(e),"); ignoring."));return}return e<t?(i.warn("".concat(n," ").concat(e," is below floor ").concat(t,"; clamping.")),t):e>r?(i.warn("".concat(n," ").concat(e," exceeds ceiling ").concat(r,"; clamping.")),r):e}function sA(e,t){var r,n,i={};if(e.minIntervalMs!==void 0&&(!Number.isFinite(e.minIntervalMs)||e.minIntervalMs<fn?(t.warn("flushIntervalConfig.minIntervalMs ".concat(e.minIntervalMs," is below floor ").concat(fn,"ms; clamping.")),i.minIntervalMs=fn):i.minIntervalMs=e.minIntervalMs),e.maxIntervalMs!==void 0&&(Number.isNaN(e.maxIntervalMs)||e.maxIntervalMs<fn?(t.warn("flushIntervalConfig.maxIntervalMs ".concat(e.maxIntervalMs," is below floor ").concat(fn,"ms; clamping.")),i.maxIntervalMs=fn):i.maxIntervalMs=e.maxIntervalMs),i.minIntervalMs!==void 0||i.maxIntervalMs!==void 0){var o=(r=i.minIntervalMs)!==null&&r!==void 0?r:gi,s=(n=i.maxIntervalMs)!==null&&n!==void 0?n:mi;s<o&&(i.maxIntervalMs===void 0?(t.warn("flushIntervalConfig.minIntervalMs (".concat(o,") exceeds the default maxIntervalMs (").concat(mi,"); raising max to match min.")),i.maxIntervalMs=o):i.minIntervalMs===void 0?(t.warn("flushIntervalConfig.maxIntervalMs (".concat(s,") is below the default minIntervalMs (").concat(gi,"); 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}z();ee();var Ar=(e=>(e[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",e))(Ar||{}),ps=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(ps||{}),fc=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(fc||{});z();ee();var aA=1500,lA=function(e,t){var r=document.createDocumentFragment(),n=function(i){if(i===void 0&&(i=[]),typeof i=="string"&&(i=[i]),i=i.filter(function(o){try{r.querySelector(o)}catch{return t.warn('[session-replay-browser] omitting selector "'.concat(o,'" because it is invali
276d')),!1}return!0}),i.length!==0)return i};return e.blockSelector=n(e.blockSelector),e.maskSelector=n(e.maskSelector),e.unmaskSelector=n(e.unmaskSelector),e},uA=(function(){function e(t,r){this.localConfig=r,this.remoteConfigClient=t}return e.prototype.generateJoinedConfig=function(){var t,r,n,i,o,s,c;return O(this,void 0,void 0,function(){var l,u,a,h,f,d,p,v,g,y,m,E,w,b,S,_,x,I=this;return R(this,function(C){switch(C.label){case 0:l=P({},this.localConfig),l.optOut=this.localConfig.optOut,l.captureEnabled=!0,C.label=1;case 1:return C.trys.push([1,3,,4]),[4,new Promise(function(k,N){I.remoteConfigClient.subscribe("configs.sessionReplay",{timeout:aA},function(T,F){var D;if(I.localConfig.loggerProvider.debug("Session Replay remote configuration received from ".concat(F,":"),JSON.stringify(T,null,2)),!T){N(new Error("No remote config received"));return}var G=T,q=G.sr_sampling_config,$=G.sr_privacy_config,L=G.sr_targeting_config,W=(D=l.interactionConfig)===null||D===void 0?void 0:D.ugcFilterRules;l.interactionConfig=G.sr_interaction_config,l.interactionConfig&&W&&(l.interactionConfig.ugcFilterRules=W),l.loggingConfig=G.sr_logging_config,(q||$||L)&&(u={},q&&(u.sr_sampling_config=q),$&&(u.sr_privacy_config=$),L&&(u.sr_targeting_config=L)),k()})})];case 2:return C.sent(),[3,4];case 3:return a=C.sent(),this.localConfig.loggerProvider.error("Failed to generate joined config: ",a),l.captureEnabled=!1,[2,{localConfig:this.localConfig,joinedConfig:l,remoteConfig:void 0}];case 4:if(!u)return[2,{localConfig:this.localConfig,joinedConfig:l,remoteConfig:u}];if(h=u.sr_sampling_config,f=u.sr_privacy_config,d=u.sr_targeting_config,h&&Object.keys(h).length>0?(Object.prototype.hasOwnProperty.call(h,"capture_enabled")?l.captureEnabled=h.capture_enabled:l.captureEnabled=!1,Object.prototype.hasOwnProperty.call(h,"sample_rate")&&(l.sampleRate=h.sample_rate),Object.prototype.hasOwnProperty.call(h,"min_session_duration_ms")&&(l.minSessionDurationMs=this.sanitizeMinSessionDurationMs(h.min_session_duration_ms))):(l.captureEnabled=!0,this.localConfig.loggerProvider.debug("Remote config successfully fetched, but no values set for project, Session Replay capture enabled.")),f){p=(t=l.privacyConfig)!==null&&t!==void 0?t:{},v={defaultMaskLevel:(n=(r=f.defaultMaskLevel)!==null&&r!==void 0?r:p.defaultMaskLevel)!==null&&n!==void 0?n:"medium",blockSelector:[],maskSelector:[],unmaskSelector:[],maskAttributes:H([],B(new Set(H(H([],B((i=p.maskAttributes)!==null&&i!==void 0?i:[]),!1),B((o=f.maskAttributes)!==null&&o!==void 0?o:[]),!1))),!1),urlMaskLevels:H(H([],B((s=f.urlMaskLevels)!==null&&s!==void 0?s:[]),!1),B((c=p.urlMaskLevels)!==null&&c!==void 0?c:[]),!1)},g=function(k){var N,T,F,D,G,q,$,L,W,M={};typeof k.blockSelector=="string"&&(k.blockSelector=[k.blockSelector]);try{for(var X=U(($=k.blockSelector)!==null&&$!==void 0?$:[]),A=X.next();!A.done;A=X.next()){var Q=A.value;M[Q]="block"}}catch(de){N={error:de}}finally{try{A&&!A.done&&(T=X.return)&&T.call(X)}finally{if(N)throw N.error}}try{for(var J=U((L=k.maskSelector)!==null&&L!==void 0?L:[]),te=J.next();!te.done;te=J.next()){var Q=te.value;M[Q]="mask"}}catch(de){F={error:de}}finally{try{te&&!te.done&&(D=J.return)&&D.call(J)}finally{if(F)throw F.error}}try{for(var se=U((W=k.unmaskSelector)!==null&&W!==void 0?W:[]),ce=se.next();!ce.done;ce=se.next()){var Q=ce.value;M[Q]="unmask"}}catch(de){G={error:de}}finally{try{ce&&!ce.done&&(q=se.return)&&q.call(se)}finally{if(G)throw G.error}}return M},y=P(P({},g(p)),g(f));try{for(m=U(Object.entries(y)),E=m.next();!E.done;E=m.next())w=B(E.value,2),b=w[0],S=w[1],S==="mask"?v.maskSelector.push(b):S==="block"?v.blockSelector.push(b):S==="unmask"&&v.unmaskSelector.push(b)}catch(k){_={error:k}}finally{try{E&&!E.done&&(x=m.return)&&x.call(m)}finally{if(_)throw _.error}}l.privacyConfig=lA(v,this.localConfig.loggerProvider)}return d&&Object.keys(d).length>0&&(l.targetingConfig=d),this.localConfig.loggerProvider.debug(JSON.stringify({name:"session replay joined config",config:hs(l)},null,2)),[2,{localConfig:this.localConfig,joinedConfig:l,remoteConfig:u}]}})})},e.prototype.sanitizeMinSessionDurationMs=function(t){if(typeof t!="number"||!Number.isFinite(t)){this.localConfig.loggerProvider.warn("min_session_duration_ms remote value is not a finite number (got ".concat(String(t),"); ignoring."));return}if(t<0){this.localConfig.loggerProvider.warn("min_session_duration_ms remote value is negative (".concat(t,"); ignoring."));return}return t>dc?(this.localConfig.loggerProvider.warn("min_session_duration_ms remote value ".concat(t," exceeds ").concat(dc,"ms ceiling; clamping.")),dc):t},e})();var dc=6e4,Ab=function(e,t){return O(void 0,void 0,void 0,function(){var r,n;return R(this,function(i){return r=new Ib(e,t),n=new Xn(e,r.loggerProvider,r.serverZone,t.configServerUrl,t.handleFetchConfig),[2,new uA(n,r)]})})};z();ee();z();function Rb(e){if(e.type!==Ar.IncrementalSnapshot)return!1;var t=e.data;return t.source===ps.Mutation&&!t.isAttachIframe}function cA(e){return typeof e=="object"&&e!==null}function fA(e){var t,r,n,i,o={};try{for(var s=U(e),c=s.next();!c.done;c=s.next()){var l=c.value;try{for(var u=(n=void 0,U(Object.keys(l))),a=u.next();!a.done;a=u.next()){var h=a.value;o[h]=l[h]}}catch(f){n={error:f}}finally{try{a&&!a.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}}catch(f){t={error:f}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return o}function dA(e){var t,r,n=new Map;if(e.forEach(function(f,d){if(f.attributes&&"style"in f.attributes){var p=n.get(f.id);p?p.push(d):n.set(f.id,[d])}}),n.size===0)return e;var i=function(f){return e[f].attributes.style},o=new Set,s=new Map,c=function(f){if(f.length===1)return"continue";var d=-1;f.forEach(function(y,m){cA(i(y))||(d=m)});var p=[];if(f.forEach(function(y,m){m!==d&&(o.add(y),m>d&&p.push(y))}),p.length>0){var v=p[p.length-1],g=fA(p.map(function(y){return i(y)}));o.delete(v),s.set(v,g)}};try{for(var l=U(n.values()),u=l.next();!u.done;u=l.next()){var a=u.value;c(a)}}catch(f){t={error:f}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}if(o.size===0&&s.size===0)return e;var h=[];return e.forEach(function(f,d){var p=s.get(d);if(p!==void 0){h.push(P(P({},f),{attributes:P(P({},f.attributes),{style:p})}));return}if(!o.has(d)){h.push(f);return}var v=P({},f.attributes);delete v.style,Object.keys(v).length>0&&h.push(P(P({},f),{attributes:v}))}),h}function hA(e){var t,r,n,i,o=e[0],s=new Map,c=new Map,l=new Map,u=new Map,a=new Map;e.forEach(function(M,X){var A,Q,J,te,se=M.data;try{for(var ce=U(se.adds),de=ce.next();!de.done;de=ce.next()){var V=de.value;s.has(V.node.id)||s.set(V.node.id,X),c.set(V.node.id,X),a.set(V.node.id,V.parentId)}}catch(ne){A={error:ne}}finally{try{de&&!de.done&&(Q=ce.return)&&Q.call(ce)}finally{if(A)throw A.error}}try{for(var re=U(se.removes),ae=re.next();!ae.done;ae=re.next()){var fe=ae.value;l.has(fe.id)||l.set(fe.id,X),u.set(fe.id,X)}}catch(ne){J={error:ne}}finally{try{ae&&!ae.done&&(te=re.return)&&te.call(re)}finally{if(J)throw J.error}}});var h=new Set,f=new Set;try{for(var d=U(s),p=d.next();!p.done;p=d.next()){var v=B(p.value,2),g=v[0],y=v[1],m=l.get(g);if(m!==void 0){var E=c.get(g),w=u.get(g);E>=w||(y<m?h.add(g):m<y&&f.add(g))}}}catch(M){t={error:M}}finally{try{p&&!p.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}var b=new Set;if(h.size>0||f.size>0)for(var S=!0;S;){S=!1;try{for(var _=(n=void 0,U(a)),x=_.next();!x.done;x=_.next()){var I=B(x.value,2),C=I[0],k=I[1];if(!h.has(C)&&!f.has(C)&&!b.has(C)&&(h.has(k)||f.has(k)||b.has(k))){var N=l.get(C),T=s.get(C);N!==void 0&&T!==void 0&&N<T?f.add(C):N!==void 0&&T!==void 0&&N===T?b.add(C):h.add(C),S=!0}}}catch(M){n={error:M}}finally{try{x&&!x.done&&(i=_.return)&&i.call(_)}finally{if(n)throw n.error}}}var F=h.size>0||f.size>0||b.size>0,D=[];e.forEach(function(M,X){var A,Q;try{for(var J=U(M.data.removes),te=J.next();!te.done;te=J.next()){var se=te.value;h.has(se.id)||f.has(se.id)&&X>=s.get(se.id)||b.has(se.id)&&(h.has(se.parentId)||f.has(se.parentId)||b.has(se.parentId))||D.push(se)}}catch(ce){A={error:ce}}finally{try{te&&!te.done&&(Q=J.return)&&Q.call(J)}finally{if(A)throw A.error}}});var G=e.flatMap(function(M){return M.data.adds}),q=e.flatMap(function(M){return M.data.texts}),$=e.flatMap(function(M){return M.data.attributes}),L=F?$.filter(function(M){return!h.has(M.id)&&!f.has(M.id)&&!b.has(M.id)}):$,W={source:ps.Mutation,removes:D,adds:F?G.filter(function(M){return!h.has(M.node.id)&&!f.has(M.node.id)&&!b.has(M.node.id)}):G,texts:F?q.filter(function(M){return!h.has(M.id)&&!f.has(M.id)&&!b.has(M.id)}):q,attributes:dA(L)};return P(P({},o),{data:W})}function Ob(e){if(e.length<=1)return e;for(var t=[],r=0;r<e.length;){if(!Rb(e[r])){t.push(e[r]),r++;continue}for(var n=r+1;n<e.length&&Rb(e[n]);)n++;t.push(n>r+1?hA(e.slice(r,n)):e[r]),r=n}return t}var pA=2e3,Pb=(function(){function e(t,r,n,i,o){var s=this,c;this.taskQueue=[],this.pendingQueue=[],this.isProcessing=!1,this.compressEvent=function(f){var d=f,p=d.type,v=d.timestamp,g=d.delay,y=d.data;return g!=null?JSON.stringify({type:p,timestamp:v,delay:g,data:y}):JSON.stringify({type:p,timestamp:v,data:y})},this.addCompressedEventToManager=function(f,d){var p,v=new Blob([f]).size;if(v>((p=s.config.maxSingleEventSizeBytes)!==null&&p!==void 0?p:cs)){s.config.loggerProvider.warn("Session replay event dropped: serialized size ".concat(Math.round(v/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."));return}s.eventsManager&&s.deviceId&&s.eventsManager.addEvent({event:{type:"replay",data:f},sessionId:d,deviceId:s.deviceId})},this.addCompressedEvent=function(f,d){if(s.worker)try{s.worker.postMessage({event:f,sessionId:d})}catch(v){v.name==="DataCloneError"?s.worker.postMessage(JSON.stringify({event:f,sessionId:d})):s.config.loggerProvider.warn("Unexpected error while posting message to worker:",v)}else{var p=s.compressEvent(f);s.addCompressedEventToManager(p,d)}},this.flushQueue=function(){var f;for(s.pendingQueue.length>0&&(f=s.taskQueue).push.apply(f,H([],B(s.mergeMutationTasks(s.pendingQueue.splice(0))),!1));s.taskQueue.length>0;){var d=s.taskQueue.shift();if(d){var p=d.event,v=d.sessionId,g=s.compressEvent(p);s.addCompressedEventToManager(g,v)}}s.isProcessing=!1},this.terminate=function(){var f;(f=s.worker)===null||f===void 0||f.terminate()};var l=j();if(this.canUseIdleCallback=l&&"requestIdleCallback"in l,this.eventsManager=t,this.config=r,this.deviceId=n,this.timeout=((c=r.performanceConfig)===null||c===void 0?void 0:c.timeout)||pA,this.onFullSnapshotProcessed=o,i){r.loggerProvider.log("Enabling web worker for compression");try{var u=new Blob([i],{type:"application/javascript"}),a=URL.createObjectURL(u),h=new Worker(a);h.onerror=function(f){f.preventDefault(),r.loggerProvider.error("Worker failed, falling back to non-worker compression: ".concat(f.message," (").concat(f.filename,":").concat(f.lineno,")")),h.terminate(),s.worker=void 0},h.onmessage=function(f){var d=f.data,p=d.compressedEvent,v=d.sessionId;s.addCompressedEventToManager(p,v)},this.worker=h}catch(f){r.loggerProvider.error("Failed to create worker, falling back to non-worker compression:",f)}}}return e.prototype.scheduleIdleProcessing=function(){var t=this;this.isProcessing||(this.isProcessing=!0,requestIdleCallback(function(r){t.processQueue(r)},{timeout:this.timeout}))},e.prototype.enqueueEvent=function(t,r){var n,i,o,s;if(t.type===Ar.FullSnapshot){if(this.config.loggerProvider.debug("Processing full snapshot immediately."),this.taskQueue.length>0||this.pendingQueue.length>0){var c=H(H([],B(this.taskQueue.splice(0)),!1),B(this.mergeMutationTasks(this.pendingQueue.splice(0))),!1);try{for(var l=U(c),u=l.next();!u.done;u=l.next()){var a=u.value,h=this.compressEvent(a.event);this.addCompressedEventToManager(h,a.sessionId)}}catch(d){n={error:d}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}this.isProcessing=!1}var f=this.compressEvent(t);this.addCompressedEventToManager(f,r),(o=this.onFullSnapshotProcessed)===null||o===void 0||o.call(this);return}this.canUseIdleCallback&&(!((s=this.config.performanceConfig)===null||s===void 0)&&s.enabled)?(this.config.loggerProvider.debug("Enqueuing event for processing during idle time."),this.pendingQueue.push({event:t,sessionId:r}),this.scheduleIdleProcessing()):(this.config.loggerProvider.debug("Processing event without idle callback."),this.addCompressedEvent(t,r))},e.prototype.processQueue=function(t){var r,n=this;for(this.pendingQueue.length>0&&(r=this.taskQueue).push.apply(r,H([],B(this.mergeMutationTasks(this.pendingQueue.splice(0))),!1));this.taskQueue.length>0&&(t.timeRemaining()>0||t.didTimeout);){var i=this.taskQueue.shift();if(i){var o=i.event,s=i.sessionId;this.addCompressedEvent(o,s)}}this.taskQueue.length>0||this.pendingQueue.length>0?requestIdleCallback(function(c){n.processQueue(c)},{timeout:this.timeout}):this.isProcessing=!1},e.prototype.mergeMutationTasks=function(t){var r,n,i;if(((i=this.config.performanceConfig)===null||i===void 0?void 0:i.mergeMutations)===!1||t.length<=1)return t;for(var o=[],s=0;s<t.length;){for(var c=t[s].sessionId,l=s+1;l<t.length&&t[l].sessionId===c;)l++;var u=Ob(t.slice(s,l).map(function(d){return d.event}));try{for(var a=(r=void 0,U(u)),h=a.next();!h.done;h=a.next()){var f=h.value;o.push({event:f,sessionId:c})}}catch(d){r={error:d}}finally{try{h&&!h.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}s=l}return o},e})();z();z();ee();var kb="Unexpected error occurred",Nb="Network error occurred, event batch rejected",hc="Session replay event batch rejected due to exceeded retry count",vt="Failed to store session replay events in IndexedDB",Mb="Session replay event batch not sent due to missing device ID",Lb="Session replay event batch not sent due to missing api key",vs="Session replay event batch dropped: server signalled capture disabled or session out of valid range for this session";var dn="1.48.2";z();function Db(e,t){return O(this,void 0,void 0,function(){var r,n,i,o,s,c,l,u,a,h,f,d,p,v,g,y=this;return R(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),r=t.CompressionStream,n=new r("gzip"),i=n.writable.getWriter(),o=n.readable.getReader(),s=[],c=(function(){return O(y,void 0,void 0,function(){var E,w,b;return R(this,function(S){switch(S.label){case 0:return[4,o.read()];case 1:if(E=S.sent(),w=E.done,b=E.value,w)return[3,3];s.push(b),S.label=2;case 2:return[3,0];case 3:return[2]}})})})(),[4,i.write(new TextEncoder().encode(e))];case 1:return m.sent(),[4,i.close()];case 2:return m.sent(),[4,c];case 3:m.sent(),l=s.reduce(function(E,w){return E+w.length},0),u=new Uint8Array(l),a=0;try{for(h=U(s),f=h.next();!f.done;f=h.next())d=f.value,u.set(d,a),a+=d.length}catch(E){v={error:E}}finally{try{f&&!f.done&&(g=h.return)&&g.call(h)}finally{if(v)throw v.error}}return[2,u];case 4:return p=m.sent(),[2,null];case 5:return[2]}})})}var vA=256,gA=256;function mA(e,t){return new Promise(function(r,n){var i=function(){var o=new Error("Custom session replay transport aborted by send timeout");o.name="AbortError",n(o)};t.addEventListener("abort",i,{once:!0}),e.then(function(o){t.removeEventListener("abort",i),r(o)},function(o){t.removeEventListener("abort",i),n(o)})})}var Ub=(function(){function e(t){var r=t.trackServerUrl,n=t.loggerProvider,i=t.payloadBatcher,o=t.workerScript,s=t.enableTransportCompression,c=t.sendTimeoutMs,l=t.handleSendEvents,u=this;if(this.storageKey="",this.retryTimeout=1e3,this.scheduled=null,this.queue=[],this.sendIdCounter=0,this.pendingWorkerRequests=new Map,this.timedOutWorkerRequests=new Map,this.flushPauseUntilMs=0,this.mergeOnNextFlush=!1,this.coalesceNextFlush=!1,this.mergeLogFiredThisPause=!1,this.killedSessions=new Set,this.loggerProvider=n,this.payloadBatcher=i||function(d){return d},this.trackServerUrl=r,this.enableTransportCompression=s??!0,this.sendTimeoutMs=c??db,this.handleSendEvents=l,o)try{var a=new Blob([o],{type:"application/javascript"}),h=URL.createObjectURL(a),f=new Worker(h);f.onerror=function(d){var p,v;d.preventDefault(),n.error("Track destination worker failed, falling back to main-thread sending: ".concat(d.message," (").concat(d.filename,":").concat(d.lineno,")")),f.terminate(),u.worker=void 0;try{for(var g=U(u.pendingWorkerRequests),y=g.next();!y.done
276;y=g.next()){var m=B(y.value,2),E=m[1];E.timeout&&clearTimeout(E.timeout),n.warn("Session replay event send failed due to worker crash: ".concat(d.message)),E.resolve()}}catch(w){p={error:w}}finally{try{y&&!y.done&&(v=g.return)&&v.call(g)}finally{if(p)throw p.error}}u.pendingWorkerRequests.clear(),u.timedOutWorkerRequests.clear()},f.onmessage=function(d){var p=d.data;if(p.type==="log")n.log(p.message);else if(p.type==="warn")n.warn(p.message);else if(p.type==="payload_too_large"){var v=u.pendingWorkerRequests.get(p.id);if(v)v.timeout&&clearTimeout(v.timeout),u.handlePayloadTooLargeResponse(v.context,p.isWaf),v.resolve(),u.pendingWorkerRequests.delete(p.id);else{var g=u.timedOutWorkerRequests.get(p.id);g&&(u.timedOutWorkerRequests.delete(p.id),u.handlePayloadTooLargeResponse(g,p.isWaf))}}else if(p.type==="complete"){var y=u.pendingWorkerRequests.get(p.id);if(y)y.timeout&&clearTimeout(y.timeout),p.skipCode!==void 0&&u.applyServerDirective(y.context.sessionId,p.skipCode),u.completeRequest({context:y.context}),y.resolve(),u.pendingWorkerRequests.delete(p.id);else{var g=u.timedOutWorkerRequests.get(p.id);g&&(u.timedOutWorkerRequests.delete(p.id),p.skipCode!==void 0&&u.applyServerDirective(g.sessionId,p.skipCode),u.completeRequest({context:g}))}}else p.type==="fetch-request"&&u.handleDelegatedFetch(f,p).catch(function(m){n.warn("Failed to handle delegated session replay fetch:",m)})},this.worker=f}catch(d){n.error("Failed to create track destination worker, falling back to main-thread sending:",d)}}return e.prototype.sendEventsList=function(t){this.addToQueue(P(P({},t),{attempts:0,timeout:0}))},e.prototype.markCoalesceNextFlush=function(){this.coalesceNextFlush=!0,this.schedule(0)},e.prototype.sendBeacon=function(t){var r=this,n,i,o=t.events,s=t.sessionId,c=t.deviceId,l=t.apiKey,u=t.serverZone,a=64*1024,h=function(I){return new Blob([I]).size},f=o,d=JSON.stringify({version:2,events:f});if(h(d)>a){for(var p=0,v=f.length;p<v;){var g=Math.floor((p+v+1)/2);h(JSON.stringify({version:2,events:f.slice(0,g)}))<=a?p=g:v=g-1}f=f.slice(0,p),d=JSON.stringify({version:2,events:f}),this.loggerProvider.warn("sendBeacon payload exceeded 64 KB limit, trimmed from ".concat(o.length," to ").concat(f.length," events"))}if(f.length!==0){if(this.handleSendEvents){var y=new URLSearchParams({device_id:c,session_id:String(s),type:"replay"}),m="".concat(Zt(u,this.trackServerUrl),"?").concat(y.toString()),E={"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(l)};this.loggerProvider.debug("Routing session replay exit batch (".concat(f.length," events) through custom transport for session id ").concat(s,"."));try{this.handleSendEvents({url:m,method:"POST",headers:E,body:d,keepalive:!0}).catch(function(I){r.loggerProvider.warn("Custom transport failed to send session replay exit batch:",I)})}catch(I){this.loggerProvider.warn("Custom transport threw while sending session replay exit batch:",I)}return}var w=new URLSearchParams({device_id:c,session_id:String(s),type:"replay",api_key:l}),b="".concat(Zt(u,this.trackServerUrl),"?").concat(w.toString()),S=j();try{var _=new Blob([d],{type:"application/json"}),x=(i=(n=S?.navigator)===null||n===void 0?void 0:n.sendBeacon)===null||i===void 0?void 0:i.call(n,b,_);x===!1&&this.loggerProvider.warn("sendBeacon failed to queue session replay payload")}catch{}}},e.prototype.addToQueue=function(){for(var t=this,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=r.filter(function(o){return t.killedSessions.has(o.sessionId)?(t.completeRequest({context:o,err:vs}),!1):o.attempts<(o.flushMaxRetries||0)?(o.attempts+=1,!0):(t.completeRequest({context:o,err:hc}),!1)});i.forEach(function(o){t.queue=t.queue.concat(o),t.schedule(0)})},e.prototype.schedule=function(t){var r=this;if(!this.scheduled){var n=this.flushPauseUntilMs-Date.now(),i=n>0,o=n>t?n:t;i&&(this.mergeOnNextFlush=!0),this.scheduled=setTimeout(function(){r.flush(!0).then(function(){r.queue.length>0&&r.schedule(t)})},o)}},e.prototype.flush=function(t){return t===void 0&&(t=!1),O(this,void 0,void 0,function(){var r,n,i,o,s,c,l;return R(this,function(u){switch(u.label){case 0:r=this.queue,this.queue=[],this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),this.mergeOnNextFlush?(this.mergeOnNextFlush=!1,this.coalesceNextFlush=!1,r=this.mergeQueueAfterThrottle(r)):this.coalesceNextFlush&&(this.coalesceNextFlush=!1,r=this.mergeDrainBacklog(r)),u.label=1;case 1:u.trys.push([1,6,7,8]),n=U(r),i=n.next(),u.label=2;case 2:return i.done?[3,5]:(o=i.value,[4,this.send(o,t)]);case 3:u.sent(),u.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return s=u.sent(),c={error:s},[3,8];case 7:try{i&&!i.done&&(l=n.return)&&l.call(n)}finally{if(c)throw c.error}
276return[7];case 8:return[2]}})})},e.prototype.mergeQueueAfterThrottle=function(t){var r=this.coalesceByIdentity(t);return r.length<t.length&&!this.mergeLogFiredThisPause&&(this.mergeLogFiredThisPause=!0,this.loggerProvider.log("Session replay throttle pause ended; merged ".concat(t.length," queued batches into ").concat(r.length," request(s)"))),r},e.prototype.mergeDrainBacklog=function(t){var r=this.coalesceByIdentity(t);return r.length<t.length&&this.loggerProvider.log("Session replay coalesced ".concat(t.length," persisted page-load backlog batches into ").concat(r.length," request(s)")),r},e.prototype.coalesceByIdentity=function(t){var r,n,i,o,s=this,c,l,u,a,h,f,d;if(t.length<=1)return t;var p=new Map;try{for(var v=U(t),g=v.next();!g.done;g=v.next()){var y=g.value,m=[y.sessionId,(c=y.deviceId)!==null&&c!==void 0?c:"",(l=y.apiKey)!==null&&l!==void 0?l:"",y.type,(u=y.serverZone)!==null&&u!==void 0?u:"",y.sampleRate,(h=(a=y.version)===null||a===void 0?void 0:a.type)!==null&&h!==void 0?h:"",(d=(f=y.version)===null||f===void 0?void 0:f.version)!==null&&d!==void 0?d:""].join("|"),E=p.get(m);E?E.push(y):p.set(m,[y])}}catch(I){r={error:I}}finally{try{g&&!g.done&&(n=v.return)&&n.call(v)}finally{if(r)throw r.error}}var w=[],b=function(I){var C,k;if(I.length===1)return w.push(I[0]),"continue";var N=null,T=0,F=function(){N&&w.push(N),N=null,T=0},D=function(L){var W=L.events.reduce(function(A,Q){return A+new Blob([Q]).size},0);if(N===null)return N=P(P({},L),{events:H([],B(L.events),!1),attempts:0}),T=W,"continue";if(T+W>gb)return F(),N=P(P({},L),{events:H([],B(L.events),!1),attempts:0}),T=W,"continue";var M=N.onComplete,X=L.onComplete;N.events=N.events.concat(L.events),T+=W,N.onComplete=function(){return O(s,void 0,void 0,function(){return R(this,function(A){switch(A.label){case 0:return[4,Promise.allSettled([M(),X()])];case 1:return A.sent(),[2]}})})}};try{for(var G=(C=void 0,U(I)),q=G.next();!q.done;q=G.next()){var $=q.value;D($)}}catch(L){C={error:L}}finally{try{q&&!q.done&&(k=G.return)&&k.call(G)}finally{if(C)throw C.error}}F()};try{for(var S=U(p.values()),_=S.next();!_.done;_=S.next()){var x=_.value;b(x)}}catch(I){i={error:I}}finally{try{_&&!_.done&&(o=S.return)&&o.call(S)}finally{if(i)throw i.error}}return w},e.prototype.send=function(t,r){return r===void 0&&(r=!0),O(this,void 0,void 0,function(){var n,i,o,s;return R(this,function(c){return this.killedSessions.has(t.sessionId)?[2,this.completeRequest({context:t,err:vs})]:(n=t.apiKey,n?(i=t.deviceId,i?(o=this.payloadBatcher({version:1,events:t.events}),o.events.length===0?(this.completeRequest({context:t}),[2]):(s=this.worker,s?[2,this.sendViaWorker(s,t,o,r)]:[2,this.sendOnMainThread(n,i,t,o,r)])):[2,this.completeRequest({context:t,err:Mb})]):[2,this.completeRequest({context:t,err:Lb})])})})},e.prototype.sendViaWorker=function(t,r,n,i){return O(this,void 0,void 0,function(){var o,s=this;return R(this,function(c){return o="".concat(++this.sendIdCounter),[2,new Promise(function(l){var u,a=s.sendTimeoutMs>0?setTimeout(function(){var h=s.pendingWorkerRequests.get(o);h&&(s.pendingWorkerRequests.delete(o),s.rememberTimedOutRequest(o,h.context),s.loggerProvider.warn("Session replay worker send timed out after ".concat(s.sendTimeoutMs,"ms; leaving events for retry")),h.resolve())},s.sendTimeoutMs):void 0;s.pendingWorkerRequests.set(o,{context:r,resolve:l,timeout:a}),t.postMessage({type:"send",id:o,payload:n,useRetry:i,useCustomTransport:!!s.handleSendEvents,context:{apiKey:r.apiKey,deviceId:r.deviceId,sessionId:r.sessionId,events:r.events,eventType:r.type,flushMaxRetries:(u=r.flushMaxRetries)!==null&&u!==void 0?u:0,sampleRate:r.sampleRate,serverZone:r.serverZone,trackServerUrl:s.trackServerUrl,version:r.version,currentUrl:Ei(),sdkVersion:dn,enableTransportCompression:s.enableTransportCompression,sendTimeoutMs:s.sendTimeoutMs}})})]})})},e.prototype.rememberTimedOutRequest=function(t,r){var n,i;if(this.timedOutWorkerRequests.set(t,r),this.timedOutWorkerRequests.size>gA)try{for(var o=U(this.timedOutWorkerRequests.keys()),s=o.next();!s.done;s=o.next()){var c=s.value;this.timedOutWorkerRequests.delete(c);break}}catch(l){n={error:l}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},e.prototype.handleDelegatedFetch=function(t,r){var n,i,o;return O(this,void 0,void 0,function(){var s,c,l,u,a,h,f,d,p,v,g,y;return R(this,function(m){switch(m.label){case 0:s=r.requestId,c=r.url,l=r.method,u=r.headers,a=r.body,h=r.keepalive,m.label=1;case 1:return m.trys.push([1,10,,11]),f=void 0,this.handleSendEvents?[4,this.handleSendEvents({url:c,method:l,headers:u,body:a,keepalive:h})]:[3,3];case 2:return f=m.sent(),[3,5];case 3:return this.loggerProvider.warn("Delegated session replay fetch received without a custom transport configured; falling back to built-in fetch."),[4,fetch(c,{method:l,headers:u,body:a,keepalive:h})];case 4:f=m.sent(),m.label=5;case 5:if(d=f.status,p=null,v="",d>=200&&d<300&&(p=(o=(i=(n=f.headers)===null||n===void 0?void 0:n.get)===null||i===void 0?void 0:i.call(n,sc))!==null&&o!==void 0?o:null),d!==413)return[3,9];m.label=6;case 6:return m.trys.push([6,8,,9]),[4,f.text()];case 7:return v=m.sent(),[3,9];case 8:return g=m.sent(),[3,9];case 9:return this.loggerProvider.debug("Delegated session replay fetch (request ".concat(s,") returned status ").concat(d,".")),t.postMessage({type:"fetch-response",requestId:s,status:d,skipHeader:p,body:v}),[3,11];case 10:return y=m.sent(),this.loggerProvider.debug("Delegated session replay fetch (request ".concat(s,") failed:"),y),t.postMessage({type:"fetch-response",requestId:s,status:0,skipHeader:null,body:String(y),error:!0}),[3,11];case 11:return[2]}})})},e.prototype.sendOnMainThread=function(t,r,n,i,o){var s,c,l,u,a,h,f;return O(this,void 0,void 0,function(){var d,p,v,g,y,m,E,w,b,S,_,x,I,C,k,N,T,F,D,G,q,q,$,L,W;return R(this,function(M){switch(M.label){case 0:d=Ei(),p=dn,v=n.sampleRate,g=new
276URLSearchParams({device_id:r,session_id:"".concat(n.sessionId),type:"".concat(n.type)}),y="".concat((c=(s=n.version)===null||s===void 0?void 0:s.type)!==null&&c!==void 0?c:"standalone","/").concat((u=(l=n.version)===null||l===void 0?void 0:l.version)!==null&&u!==void 0?u:p),M.label=1;case 1:return M.trys.push([1,19,,23]),m=JSON.stringify(i),E=j(),this.enableTransportCompression&&E&&"CompressionStream"in E?[4,Db(m,E)]:[3,3];case 2:return b=M.sent(),[3,4];case 3:b=null,M.label=4;case 4:if(w=b,S=w?w.byteLength:new Blob([m]).size,_=new AbortController,x=P({"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(t),"X-Client-Version":p,"X-Client-Library":y,"X-Client-Url":d.substring(0,cb),"X-Client-Sample-Rate":"".concat(v),"X-Sampling-Hash-Alg":"xxhash32"},w?{"Content-Encoding":"gzip"}:{}),I=w??m,C=S<=fb,k={headers:x,body:I,method:"POST",keepalive:C,signal:_.signal},N="".concat(Zt(n.serverZone,this.trackServerUrl),"?").concat(g.toString()),i.events.length===0)return this.completeRequest({context:n}),[2];T=this.sendTimeoutMs>0?setTimeout(function(){_.abort()},this.sendTimeoutMs):void 0,F=void 0,M.label=5;case 5:return M.trys.push([5,,10,11]),this.handleSendEvents?[4,mA(this.handleSendEvents({url:N,method:"POST",headers:x,body:I,keepalive:C}),_.signal)]:[3,7];case 6:return D=M.sent(),[3,9];case 7:return[4,fetch(N,k)];case 8:D=M.sent(),M.label=9;case 9:return F=D,[3,11];case 10:return T&&clearTimeout(T),[7];case 11:if(F===null)return this.completeRequest({context:n,err:kb}),[2];if(F.status>=200&&F.status<300&&(G=(f=(h=(a=F.headers)===null||a===void 0?void 0:a.get)===null||h===void 0?void 0:h.call(a,sc))!==null&&f!==void 0?f:null,this.applyServerDirective(n.sessionId,G)),o)return[3,12];q="";try{q=JSON.stringify(F.body,null,2)}catch{}return this.completeRequest({context:n,success:"".concat(F.status,": ").concat(q)}),[3,18];case 12:if(q="",F.status!==413)return[3,16];M.label=13;case 13:return M.trys.push([13,15,,16]),[4,F.text()];case 14:return q=M.sent(),[3,16];case 15:return $=M.sent(),[3,16];case 16:return[4,this.handleReponse(F.status,n,q)];case 17:M.sent(),M.label=18;case 18:return[3,23];case 19:return L=M.sent(),W=!!L&&typeof L=="object"&&L.name==="AbortError",W&&o?[4,this.handleOtherResponse(n)]:[3,21];case 20:return M.sent(),[3,22];case 21:this.completeRequest({context:n,err:L}),M.label=22;case 22:return[3,23];case 23:return[2]}})})},e.prototype.handleReponse=function(t,r,n){return n===void 0&&(n=""),O(this,void 0,void 0,function(){var i,o;return R(this,function(s){switch(s.label){case 0:switch(i=new Ot().buildStatus(t),o=i,o){case Ae.Success:return[3,1];case Ae.Failed:return[3,2];case Ae.Timeout:return[3,2];case Ae.RateLimit:return[3,2];case Ae.PayloadTooLarge:return[3,4]}return[3,5];case 1:return this.handleSuccessResponse(r),[3,8];case 2:return[4,this.handleOtherResponse(r)];case 3:return s.sent(),[3,8];case 4:return this.handlePayloadTooLargeResponse(r,ob.test(n)),[3,8];case 5:return t!==499?[3,7]:[4,this.handleOtherResponse(r)];case 6:return s.sent(),[3,8];case 7:this.completeRequest({context:r,err:Nb}),s.label=8;case 8:return[2]}})})},e.prototype.handlePayloadTooLargeResponse=function(t,r){var n=r?"WAF (compressed payload too large)":"server (event too large)",i=Math.round(t.events.reduce(function(c,l){return c+l.length},0)/yi);if(!r){this.completeRequest({context:t,err:"Session replay event batch dropped: ".concat(n," rejected payload (").concat(t.events.length," events, ").concat(i," KB) \u2014 not retrying non-WAF 413")});return}if(t.events.length===1){this.completeRequest({context:t,err:"Session replay event dropped: single event (".concat(i," KB, 1 event) rejected by ").concat(n," \u2014 cannot split further")});return}this.loggerProvider.warn("Session replay event batch rejected by ".concat(n," (").concat(t.events.length," events, ").concat(i," KB total) \u2014 splitting and retrying")),t.onComplete();var o=function(){return Promise.resolve()},s=Math.floor(t.events.length/2);this.sendEventsList(P(P({},t),{events:t.events.slice(0,s),onComplete:o})),this.sendEventsList(P(P({},t),{events:t.events.slice(s),onComplete:o}))},e.prototype.handleSuccessResponse=function(t){var r=Math.round(new Blob(t.events).size/yi);this.completeRequest({context:t,success:"Session replay event batch tracked successfully for session id ".concat(t.sessionId,", size of events: ").concat(r," KB")})},e.prototype.handleOtherResponse=function(t){return O(this,void 0,void 0,function(){var r;return R(this,function(n){switch(n.label){case 0:return r=Math.random()*t.attempts*this.retryTimeout,t.attempts++,t.attempts>(t.flushMaxRetries||0)?(this.completeRequest({context:t,err:hc}),[2]):[4,new Promise(function(i){return setTimeout(i,r)})];case 1:return n.sent(),[4,this.send(t,!0)];case 2:return n.sent(),[2]}})})},e.prototype.completeRequest=function(t){var r=t.context,n=t.err,i=t.success;r.onComplete(),n?this.loggerProvider.warn(n):i&&this.loggerProvider.log(i)},e.prototype.applyServerDirective=function(t,r){if(r===null){this.flushPauseUntilMs=0,this.mergeLogFiredThisPause=!1;return}if(r===hb){var n=this.flushPauseUntilMs>Date.now();this.flushPauseUntilMs=Date.now()+ac,n||this.loggerProvider.log("Session replay throttled by server; pausing flush schedule for ".concat(ac/1e3,"s"));return}(r===vb||r===pb)&&this.killSession(t,r)},e.prototype.killSession=function(t,r){var n,i,o,s;if(!this.killedSessions.has(t)){if(this.killedSessions.add(t),this.killedSessions.size>vA)try{for(var c=U(this.killedSessions),l=c.next();!l.done;l=c.next()){var u=l.value;this.killedSessions.delete(u);break}}catch(p){n={error:p}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}this.loggerProvider.log("Session replay capture stopped for session ".concat(t," by server directive ").concat(r,"; remaining events will be dropped"));var a=[];try{for(var h=U(this.queue),f=h.next();!f.done;f=h.next()){var d=f.value;d.sessionId===t?this.completeRequest({context:d,err:vs}):a.push(d)}}catch(p){o={error:p}}finally{try{f&&!f.done&&(s=h.return)&&s.call(h)}finally{if(o)throw o.error}}this.queue=a}},e})();z();ms();z();var ys=(function(){function e(t){var r=this,n,i,o;
276this.minInterval=gi,this.maxInterval=mi,this.maxPersistedEventsSize=ib,this._timeAtLastSplit=Date.now(),this.shouldSplitEventsList=function(s,c){var l=r.getStringSize(c),u=r.getEventsArraySize(s);return u+l>=r.maxPersistedEventsSize?!0:Date.now()-r.timeAtLastSplit>r.interval&&s.length?(r.interval=Math.min(r.maxInterval,r.interval+r.minInterval),r._timeAtLastSplit=Date.now(),!0):!1},this.loggerProvider=t.loggerProvider,this.minInterval=(n=t.minInterval)!==null&&n!==void 0?n:this.minInterval,this.maxInterval=(i=t.maxInterval)!==null&&i!==void 0?i:this.maxInterval,this.maxPersistedEventsSize=(o=t.maxPersistedEventsSize)!==null&&o!==void 0?o: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(t){for(var r=0,n=0;n<t.length;n++){var i=t.charCodeAt(n);if(i<=127)r++;else if(i<=2047)r+=2;else if(i>=55296&&i<=56319){var o=n+1<t.length?t.charCodeAt(n+1):NaN;o>=56320&&o<=57343?(r+=4,n++):r+=3}else i>=56320&&i<=57343,r+=3}return r},e.prototype.getEventsArraySize=function(t){var r,n,i=0;try{for(var o=U(t),s=o.next();!s.done;s=o.next()){var c=s.value;i+=this.getStringSize(c)}}catch(u){r={error:u}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}var l=2+Math.max(0,t.length-1)+t.length*2;return i+l},e})();var RA=function(e){return typeof e=="object"&&e!==null&&e.name==="AbortError"},Qe=function(e,t,r){RA(r)?e.debug(t):e.warn(t)};function OA(){try{return crypto.randomUUID()}catch{return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var r=Math.random()*16|0;return(t==="x"?r:r&3|8).toString(16)})}}var _t="sessionCurrentSequence",er="sequencesToSend";var PA=2e3,Ec=5e3;function kA(e,t,r){return r===void 0&&(r="IDB operation timed out"),new Promise(function(n,i){var o=setTimeout(function(){return i(new Error("".concat(r," after ").concat(t,"ms")))},t);e.then(function(s){clearTimeout(o),n(s)},function(s){clearTimeout(o),i(s)})})}function wc(e,t,r){var n=setTimeout(r,t);return e.then(function(){return clearTimeout(n)},function(){return clearTimeout(n)}),function(){return clearTimeout(n)}}var NA=function(e){var t,r;return e.objectStoreNames.contains(_t)||(r=e.createObjectStore(_t,{keyPath:"sessionId"})),e.objectStoreNames.contains(er)||(t=e.createObjectStore(er,{keyPath:"sequenceId",autoIncrement:!0}),t.createIndex("sessionId","sessionId")),{sequencesStore:t,currentSequenceStore:r}},MA=function(e){return O(void 0,void 0,void 0,function(){return R(this,function(t){switch(t.label){case 0:return[4,kA(hn(e,1,{upgrade:NA}),PA,"IDB openDB timed out")];case 1:return[2,t.sent()]}})})},zb=(function(e){De(t,e);function t(r){var n=this,i;return n=e.call(this,r)||this,n.consecutiveFailures=0,n.hasTriggeredFallback=!1,n.emptyFilteredCount=0,n.getSequencesToSend=function(){return O(n,void 0,void 0,function(){var o,s,c,l,u,a,h,f,d,p,v=this;return R(this,function(g){switch(g.label){case 0:o=!1,s=!1,g.label=1;case 1:return g.trys.push([1,9,,10]),c=[],l=this.db.transaction("sequencesToSend","readwrite"),l.done.catch(function(y){!o&&!s&&(Qe(v.loggerProvider,"".concat(vt,": ").concat(y),y),v.recordFailure())}),u=wc(l.done,Ec,function(){!o&&!s&&(s=!0,Qe(v.loggerProvider,"".concat(vt,": transaction timed out")),v.recordFailure())}),[4,l.store.openCursor()];case 2:a=g.sent(),g.label=3;case 3:return a?(h=a.value,f=h.sessionId,d=h.events,d.length!==0?[3,5]:(this.maybeLogEmptyFiltered("getSequencesToSend"),[4,a.delete()])):[3,8];case 4:return g.sent(),[3,6];case 5:c.push({events:d,sequenceId:a.key,sessionId:f}),g.label=6;case 6:return[4,a.continue()];case 7:return a=g.sent(),[3,3];case 8:return this.recordSuccess(),u(),[2,c];case 9:return p=g.sent(),s||(o=!0,Qe(this.loggerProvider,"".concat(vt,": ").concat(p),p),this.recordFailure()),[3,10];case 10:return[2,void 0]}})})},n.storeCurrentSequence=function(o){return O(n,void 0,void 0,function(){var s,c,l,u,a,h,f,d,p,v=this;return R(this,function(g){switch(g.label){case 0:s=!1,c=!1,g.label=1;case 1:return g.trys.push([1,5,,6]),l=this.db.transaction([_t,er],"readwrite"),l.done.catch(function(y){!s&&!c&&(Qe(v.loggerProvider,"".concat(vt,": ").concat(y),y),v.recordFailure())}),u=wc(l.done,Ec,function(){!s&&!c&&(c=!0,Qe(v.loggerProvider,"".concat(vt,": transaction timed out")),v.recordFailure())}),[4,l.objectStore(_t).get(o)];case 2:return a=g.sent(),!a||a.tabId&&a.tabId!==this.tabId?(u(),[2,void 0]):a.events.length===0?(this.maybeLogEmptyFiltered("storeCurrentSequence"),u(),[2,void 0]):[4,l.objectStore(er).put({sessionId:o,events:a.events,tabId:this.tabId})];case 3:return h=g.sent(),[4,l.objectStore(_t).put({sessionId:o,events:[],tabId:this.tabId})];case 4:return g.sent(),this.recordSuccess(),u(),f=a.tabId,d=Rt(a,["tabId"]),[2,P(P({},d),{sessionId:o,sequenceId:h})];case 5:return p=g.sent(),c||(s=!0,Qe(this.loggerProvider,"".concat(vt,": ").concat(p),p),this.recordFailure()),[3,6];case 6:return[2,void 0]}})})},n.addEventToCurrentSequence=function(o,s){return O(n,void 0,void 0,function(){var c,l,u,a,h,f,d,p,v,g=this;return R(this,function(y){switch(y.label){case 0:c=!1,l=!1,y.label=1;case 1:return y.trys.push([1,15,,16]),u=this.db.transaction([_t,er],"readwrite"),u.done.catch(function(m){!c&&!l&&(Qe(g.loggerProvider,"".concat(vt,": ").concat(m),m),g.recordFailure())}),a=wc(u.done,Ec,function(){!c&&!l&&(l=!0,Qe(g.loggerProvider,"".concat(vt,": transaction timed out")),g.recordFailure())}),[4,u.objectStore(_t).get(o)];case 2:return h=y.sent(),h?.tabId&&h.tabId!==this.tabId?h.events.length>0?[4,u.objectStore(er).put({sessionId:o,events:h.events,tabId:h.tabId})]:[3,4]:[3,6];case 3:y.sent(),y.label=4;case 4:return[4,u.objectStore(_t).put({sessionId:o,events:[s],tabId:this.tabId})];case 5:return y.sent(),this.recordSuccess(),a(),[2,void 0];case 6:return f=h,f?[3,8]:[4,u.objectStore(_t).put({sessionId:o,events:[s],tabId:this.tabId})];case 7:return y.sent(),this.recordSuccess(),a(),[2,void 0];case 8:return this.shouldSplitEventsList(f.events,s)?[3,10]:[4,u.objectStore(_t).put({sessionId:o,events:f.events.concat(s),tabId:this.tabId})];case 9:return y.sent(),this.recordSuccess(),a(),[2,void 0];case 10:return d=f.events,d.length!==0?[3,12]:(this.maybeLogEmptyFiltered("addEventToCurrentSequence"),[4,u.objectStore(_t).put({sessionId:o,events:[s],tabId:this.tabId})]);case 11:return y.sent(),this.recordSuccess(),a(),[2,void 0];case 12:return[4,u.objectStore(_t).put({sessionId:o,events:[s],tabId:this.tabId})];case 13:return y.sent(),[4,u.objectStore(er).put({sessionId:o,events:d,tabId:this.tabId})];case 14:return p=y.sent(),this.recordSuccess(),a(),[2,{events:d,sessionId:o,sequenceId:p}];case 15:return v=y.sent(),l||(c=!0,Qe(this.loggerProvider,"".concat(vt,": ").concat(v),v),this.recordFailure()),[3,16];case 16:return[2,void 0]}})})},n.storeSendingEvents=function(o,s){return O(n,void 0,void 0,function(){var c,l;return R(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,this.db.put(er,{sessionId:o,events:s,tabId:this.tabId})];case 1:return c=u.sent(),this.recordSuccess(),[2,c];case 2:return l=u.sent(),Qe(this.loggerProvider,"".concat(vt,": ").concat(l),l),this.recordFailure(),[3,3];case 3:return[2,void 0]}})})},n.cleanUpSessionEventsStore=function(o,s){return O(n,void 0,void 0,function(){var c;return R(this,function(l){switch(l.label){case 0:if(!s)return[2];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,this.db.delete(er,s)];case 2:return l.sent(),this.recordSuccess(),[3,4];case 3:return c=l.sent(),Qe(this.loggerProvider,"".concat(vt,": ").concat(c),c),this.recordFailure(),[3,4];case 4:return[2]}})})},n.db=r.db,n.tabId=r.tabId,n.onPersistentFailure=r.onPersistentFailure,n.consecutiveFailureThreshold=(i=r.consecutiveFailureThreshold)!==null&&i!==void 0?i:1,n}return t.prototype.maybeLogEmptyFiltered=function(r){this.emptyFilteredCount++%100===0&&this.loggerProvider.debug("Filtered empty session replay sequence at ".concat(r," (idb store)"))},t.prototype.recordFailure=function(){var r;this.consecutiveFailures++,!this.hasTriggeredFallback&&this.consecutiveFailures>=this.consecutiveFailureThreshold&&(this.hasTriggeredFallback=!0,(r=this.onPersistentFailure)===null||r===void 0||r.call(this))},t.prototype.recordSuccess=function(){this.consecutiveFailures=0},t.new=function(r,n){var i;return O(this,void 0,void 0,function(){var o,s,c,l,u;return R(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),o=r==="replay"?"":"_".concat(r),s="".concat(n.apiKey.substring(0,10),"_amp_session_replay_events").concat(o),[4,MA(s)];case 1:return c=a.sent(),l=(i=n.tabId)!==null&&i!==void 0?i:OA(),[2,new t(P(P({},n),{db:c,tabId:l}))];case 2:return u=a.sent(),Qe(n.loggerProvider,"".concat(vt,": ").concat(u),u),[3,3];case 3:return[2]}})})},t.prototype.getCurrentSequenceEvents=function(r){return O(this,void 0,void 0,function(){var s,c,l,n,i,o,s,c,l,u,a,h;return R(this,function(f){switch(f.label){case 0:return r?[4,this.db.get("sessionCurrentSequence",r)]:[3,2];case 1:return s=f.sent(),s?s.tabId&&s.tabId!==this.tabId?[2,void 0]:(c=s.tabId,l=Rt(s,["tabId"]),[2,[l]]):[2,void 0];case 2:n=[],f.label=3;case 3:return f.trys.push([3,8,9,10]),[4,this.db.getAll("sessionCurrentSequence")];case 4:i=U.apply(void 0,[f.sent()]),o=i.next(),f.label=5;case 5:if(o.done)return[3,7];if(s=o.value,s.tabId&&s.tabId!==this.tabId)return[3,6];c=s.tabId,l=Rt(s,["tabId"]),n.push(l),f.label=6;case 6:return o=i.next(),[3,5];case 7:return[3,10];case 8:return u=f.sent(),a={error:u},[3,10];case 9:try{o&&!o.done&&(h=i.return)&&h.call(i)}finally{if(a)throw a.error}
276return[7];case 10:return[2,n]}})})},t})(ys);z();var $b=(function(e){De(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.finalizedSequences={},r.sequences={},r.sequenceId=0,r.emptyFilteredCount=0,r}return t.prototype.resetCurrentSequence=function(r){this.sequences[r]=[]},t.prototype.addSequence=function(r){var n=this.sequenceId++,i=H([],B(this.sequences[r]),!1);return this.finalizedSequences[n]={sessionId:r,events:i},this.resetCurrentSequence(r),{sequenceId:n,events:i,sessionId:r}},t.prototype.maybeLogEmptyFiltered=function(r){this.emptyFilteredCount++%100===0&&this.loggerProvider.debug("Filtered empty session replay sequence at ".concat(r," (in-memory store)"))},t.prototype.getSequencesToSend=function(){return O(this,void 0,void 0,function(){var r,n,i,o,s,c,l,u,a,h;return R(this,function(f){r=[];try{for(n=U(Object.entries(this.finalizedSequences)),i=n.next();!i.done;i=n.next()){if(o=B(i.value,2),s=o[0],c=o[1],l=c.sessionId,u=c.events,u.length===0){this.maybeLogEmptyFiltered("getSequencesToSend"),delete this.finalizedSequences[Number(s)];continue}r.push({sequenceId:Number(s),sessionId:l,events:u})}}catch(d){a={error:d}}finally{try{i&&!i.done&&(h=n.return)&&h.call(n)}finally{if(a)throw a.error}}return[2,r]})})},t.prototype.storeCurrentSequence=function(r){return O(this,void 0,void 0,function(){var n;return R(this,function(i){return n=this.sequences[r],n?n.length===0?(this.maybeLogEmptyFiltered("storeCurrentSequence"),[2,void 0]):[2,this.addSequence(r)]:[2,void 0]})})},t.prototype.addEventToCurrentSequence=function(r,n){return O(this,void 0,void 0,function(){var i;return R(this,function(o){return this.sequences[r]||this.resetCurrentSequence(r),this.shouldSplitEventsList(this.sequences[r],n)&&(this.sequences[r].length===0?this.maybeLogEmptyFiltered("addEventToCurrentSequence"):i=this.addSequence(r)),this.sequences[r].push(n),[2,i]})})},t.prototype.storeSendingEvents=function(r,n){return O(this,void 0,void 0,function(){return R(this,function(i){return this.finalizedSequences[this.sequenceId]={sessionId:r,events:n},[2,this.sequenceId++]})})},t.prototype.cleanUpSessionEventsStore=function(r,n){return O(this,void 0,void 0,function(){return R(this,function(i){return n!==void 0&&delete this.finalizedSequences[n],[2]})})},t})(ys);var _c=function(e){var t=e.config,r=e.minInterval,n=e.maxInterval,i=e.maxPersistedEventsSize,o=e.type,s=e.payloadBatcher,c=e.storeType,l=e.trackDestinationWorkerScript,u=e.shouldSend;return O(void 0,void 0,void 0,function(){function a(F){return F===void 0&&(F=!1),O(this,void 0,void 0,function(){return R(this,function(D){return[2,f.flush(F)]})})}var h,f,d,p,v,g,y,m,E,w,b,S,_,x,I,C,k,N,T;return R(this,function(F){switch(F.label){case 0:return h=(T=t.maxSingleEventSizeBytes)!==null&&T!==void 0?T:cs,f=new Ub(P(P({},t),{loggerProvider:t.loggerProvider,payloadBatcher:s,workerScript:l})),d=function(){return new $b({loggerProvider:t.loggerProvider,maxInterval:n,minInterval:r,maxPersistedEventsSize:i})},v=!1,y=function(){return O(void 0,void 0,void 0,function(){var D,G,q;return R(this,function($){switch($.label){case 0:return v?(v=!1,t.loggerProvider.warn("IDB store is experiencing repeated failures; falling back to in-memory event store."),p?[4,g.getSequencesToSend()]:[3,2]):[2];case 1:return G=$.sent(),[3,3];case 2:G=void 0,$.label=3;case 3:return D=G,g=d(),D&&p&&(q=p,D.forEach(function(L){_({sequenceId:L.sequenceId,events:L.events,sessionId:L.sessionId,deviceId:q})})),[2]}})})},m=function(){return O(void 0,void 0,void 0,function(){var D;return R(this,function(G){switch(G.label){case 0:return[4,zb.new(o,{loggerProvider:t.loggerProvider,minInterval:r,maxInterval:n,maxPersistedEventsSize:i,apiKey:t.apiKey,onPersistentFailure:function(){y()}})];case 1:return D=G.sent(),D?(v=!0,[2,D]):(t.loggerProvider.log("Failed to initialize idb store, falling back to memory store."),[2,d()])}})})},c!=="idb"?[3,2]:[4,m()];case 1:return E=F.sent(),[3,3];case 2:E=d(),F.label=3;case 3:return g=E,w=[],b=0,S=function(D){if(!(D<=b)){var G=Math.min(D-b,w.length);G>0&&(w.splice(0,G),b=D)}},_=function(D){var G=D.events,q=D.sessionId,$=D.deviceId,L=D.sequenceId,W=G.map(function(A){return{event:A,bytes:new Blob([A]).size}}
276),M=W.filter(function(A){return A.bytes>h});M.length>0&&t.loggerProvider.warn("Dropping ".concat(M.length," oversized event(s) from session replay sequence before send. Sizes: ").concat(M.map(function(A){return"".concat(Math.round(A.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 X=M.length>0?W.filter(function(A){return A.bytes<=h}).map(function(A){return A.event}):G;if(X.length===0){g.cleanUpSessionEventsStore(q,L).catch(function(A){t.loggerProvider.warn("Failed to clean up session replay events store:",A)});return}t.debugMode&&ds().then(function(A){var Q=A.totalStorageSize,J=A.percentOfQuota,te=A.usageDetails;t.loggerProvider.debug("Total storage size: ".concat(Q," KB, percentage of quota: ").concat(J,"%, usage details: ").concat(te))}).catch(function(){}),f.sendEventsList({events:X,sessionId:q,flushMaxRetries:t.flushMaxRetries,apiKey:t.apiKey,deviceId:$,sampleRate:t.sampleRate,serverZone:t.serverZone,version:t.version,type:o,onComplete:function(){return O(void 0,void 0,void 0,function(){return R(this,function(A){switch(A.label){case 0:return[4,g.cleanUpSessionEventsStore(q,L)];case 1:return A.sent(),[2]}})})}})},x=function(D){var G=D.sessionId,q=D.deviceId;if(p=q,!(u&&!u())){var $=b+w.length;
276g.storeCurrentSequence(G).then(function(L){L&&(S($),_({sequenceId:L.sequenceId,events:L.events,sessionId:L.sessionId,deviceId:q}))}).catch(function(L){t.loggerProvider.warn("Failed to get current sequence of session replay events for session:",L)})}},I=function(D){var G=D.deviceId;return O(void 0,void 0,void 0,function(){var q;return R(this,function($){switch($.label){case 0:return p=G,[4,g.getSequencesToSend()];case 1:return q=$.sent(),q?.length?(t.loggerProvider.log("Draining ".concat(q.length," stored sequence(s) from previous session.")),q.length>1&&f.markCoalesceNextFlush(),q.forEach(function(L){_({sequenceId:L.sequenceId,events:L.events,sessionId:L.sessionId,deviceId:G})}),[2]):[2]}})})},C=function(D){var G=D.event,q=D.sessionId,$=D.deviceId;p=$;var L=!u||u(),W=b+w.length;w.push(G.data),g.addEventToCurrentSequence(q,G.data).then(function(M){if(M){if(!L){g.cleanUpSessionEventsStore(M.sessionId,M.sequenceId).catch(function(X){t.loggerProvider.warn("Failed to clean up dropped session replay sequence:",X)}),S(W);return}S(W),_({sequenceId:M.sequenceId,events:M.events,sessionId:M.sessionId,deviceId:$})}}).catch(function(M){t.loggerProvider.warn("Failed to add event to session replay capture:",M)})},k=function(){return H([],B(w),!1)},N=function(){S(b+w.length)},[2,{sendCurrentSequenceEvents:x,addEvent:C,sendStoredEvents:I,flush:a,getBeaconEvents:k,dropPendingBeaconEvents:N,trackDestination:f}]}})})};z();var xc=(function(){function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=new Map;t.forEach(function(i){n.set(i.name,i.manager)}),this.managers=n}return e.prototype.sendStoredEvents=function(t){return O(this,void 0,void 0,function(){var r;return R(this,function(n){switch(n.label){case 0:return r=[],this.managers.forEach(function(i){r.push(i.sendStoredEvents(t))}),[4,Promise.all(r)];case 1:return n.sent(),[2]}})})},e.prototype.addEvent=function(t){var r,n=t.sessionId,i=t.event,o=t.deviceId;(r=this.managers.get(i.type))===null||r===void 0||r.addEvent({sessionId:n,event:i,deviceId:o})},e.prototype.sendCurrentSequenceEvents=function(t){var r=t.sessionId,n=t.deviceId;this.managers.forEach(function(i){i.sendCurrentSequenceEvents({sessionId:r,deviceId:n})})},e.prototype.flush=function(t){return O(this,void 0,void 0,function(){var r;return R(this,function(n){switch(n.label){case 0:return r=[],this.managers.forEach(function(i){r.push(i.flush(t))}),[4,Promise.all(r)];case 1:return n.sent(),[2]}})})},e})();z();z();var xt,Cc,Yb;function Jb(e,t){if(Yb=new Date,e.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if(e.tagName.toLowerCase()==="html")return"html";var r={root:document.body,idName:function(o){return!0},className:function(o){return!0},tagName:function(o){return!0},attr:function(o,s){return!1},seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};xt=P(P({},r),t),Cc=LA(xt.root,r);var n=bs(e,"all",function(){return bs(e,"two",function(){return bs(e,"one",function(){return bs(e,"none")})})});if(n){var i=e0(t0(n,e));return i.length>0&&(n=i[0]),ws(n)}else throw new Error("Selector was not found.")}function LA(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e}function bs(e,t,r){for(var n=null,i=[],o=e,s=0,c=function(){var u,a,h=new Date().getTime()-Yb.getTime();if(xt.timeoutMs!==void 0&&h>xt.timeoutMs)throw new Error("Timeout: Can't find a unique selector after ".concat(h,"ms"));var f=Es(DA(o))||Es.apply(void 0,H([],B(UA(o)),!1))||Es.apply(void 0,H([],B(FA(o)),!1))||Es(BA(o))||[Xb()],d=qA(o);if(t=="all")d&&(f=f.concat(f.filter(Tc).map(function(m){return Ss(m,d)})));else if(t=="two")f=f.slice(0,1),d&&(f=f.concat(f.filter(Tc).map(function(m){return Ss(m,d)})));else if(t=="one"){var p=B(f=f.slice(0,1),1),v=p[0];d&&Tc(v)&&(f=[Ss(v,d)])}else t=="none"&&(f=[Xb()],d&&(f=[Ss(f[0],d)]));try{for(var g=(u=void 0,U(f)),y=g.next();!y.done;y=g.next()){var v=y.value;v.level=s}}catch(m){u={error:m}}finally{try{y&&!y.done&&(a=g.return)&&a.call(g)}finally{if(u)throw u.error}}if(i.push(f),i.length>=xt.seedMinLength&&(n=Hb(i,r),n))return"break";o=o.parentElement,s++};o;){var l=c();if(l==="break")break}return n||(n=Hb(i,r)),!n&&r?r():n}function Hb(e,t){var r,n,i=e0(Zb(e));if(i.length>xt.threshold)return t?t():null;try{for(var o=U(i),s=o.next();!s.done;s=o.next()){var c=s.value;if(Qb(c))return c}}catch(l){r={error:l}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return null}function ws(e){for(var t=e[0],r=t.name,n=1;n<e.length;n++){var i=e[n].level||0;t.level===i-1?r="".concat(e[n].name," > ").concat(r):r="".concat(e[n].name," ").concat(r),t=e[n]}return r}function Kb(e){return e.map(function(t){return t.penalty}).reduce(function(t,r){return t+r},0)}function Qb(e){var t=ws(e);switch(Cc.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}}function DA(e){var t=e.getAttribute("id");return t&&xt.idName(t)?{name:"#"+CSS.escape(t),penalty:0}:null}function UA(e){var t=Array.from(e.attributes).filter(function(r){return xt.attr(r.name,r.value)});return t.map(function(r){return{name:"[".concat(CSS.escape(r.name),'="').concat(CSS.escape(r.value),'"]'),penalty:.5}})}function FA(e){var t=Array.from(e.classList).filter(xt.className);return t.map(function(r){return{name:"."+CSS.escape(r),penalty:1}})}function BA(e){var t=e.tagName.toLowerCase();return xt.tagName(t)?{name:t,penalty:2}:null}function Xb(){return{name:"*",penalty:3}}function qA(e){var t=e.parentNode;if(!t)return null;var r=t.firstChild;if(!r)return null;for(var n=0;r&&(r.nodeType===Node.ELEMENT_NODE&&n++,r!==e);)r=r.nextSibling;return n}function Ss(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}}function Tc(e){return e.name!=="html"&&!e.name.startsWith("#")}function Es(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.filter(GA);return r.length>0?r:null}function GA(e){return e!=null}function Zb(e,t){var r,n,i,o,s,c;return t===void 0&&(t=[]),R(this,function(l){switch(l.label){case 0:if(!(e.length>0))return[3,9];l.label=1;case 1:l.trys.push([1,6,7,8]),r=U(e[0]),n=r.next(),l.label=2;case 2:return n.done?[3,5]:(i=n.value,[5,U(Zb(e.slice(1,e.length),t.concat(i)))]);case 3:l.sent(),l.label=4;case 4:return n=r.next(),[3,2];case 5:return[3,8];case 6:return o=l.sent(),s={error:o},[3,8];case 7:try{n&&!n.done&&(c=r.return)&&c.call(r)}finally{if(s)throw s.error}
vendor: 2,066 bytes, line 276
276return[7];case 8:return[3,11];case 9:return[4,t];case 10:l.sent(),l.label=11;case 11:return[2]}})}function e0(e){return H([],B(e),!1).sort(function(t,r){return Kb(t)-Kb(r)})}function t0(e,t,r){var n,i,o;return r===void 0&&(r={counter:0,visited:new Map}),R(this,function(s){switch(s.label){case 0:if(!(e.length>2&&e.length>xt.optimizedMinLength))return[3,5];n=1,s.label=1;case 1:return n<e.length-1?r.counter>xt.maxNumberOfTries?[2]:(r.counter+=1,i=H([],B(e),!1),i.splice(n,1),o=ws(i),r.visited.has(o)?[2]:Qb(i)&&WA(i,t)?[4,i]:[3,4]):[3,5];case 2:return s.sent(),r.visited.set(o,!0),[5,U(t0(i,t,r))];case 3:s.sent(),s.label=4;case 4:return n++,[3,1];case 5:return[2]}})}function WA(e,t){return Cc.querySelector(ws(e))===t}ee();var jA=36e5,r0=function(e){var t=e.version,r=e.events,n=[];return r.forEach(function(i){var o=JSON.parse(i);o.count=1,o.type==="click"&&n.push(o)}),{version:t,events:n}},n0=function(e){var t=e.version,r=e.events,n=[];r.forEach(function(o){var s=JSON.parse(o);s.type==="click"&&n.push(s)});var i=n.reduce(function(o,s){var c=s.x,l=s.y,u=s.selector,a=s.timestamp,h=a-a%jA,f="".concat(c,":").concat(l,":").concat(u??"",":").concat(h);return o[f]?o[f].count+=1:o[f]=P(P({},s),{timestamp:h,count:1}),o},{});return{version:t,events:Object.values(i)}},i0=(function(){function e(t,r){var n=this;this.createHook=function(i){var o=i.eventsManager,s=i.sessionId,c=i.deviceIdFn,l=i.mirror,u=i.ugcFilterRules,a=i.performanceOptions;return function(h){if(h.type===fc.Click){var f=j();if(f){var d=f.location,p=f.innerHeight,v=f.innerWidth;if(d){var g=h.x,y=h.y;if(!(g===void 0||y===void 0)){var m=l.getNode(h.id),E;if(m)try{E=Jb(m,a)}catch{n.logger.debug("error resolving selector from finder")}var w=ar(d.href,u),b={x:g+n.scrollWatcher.currentScrollX,y:y+n.scrollWatcher.currentScrollY,selector:E,viewportHeight:p,viewportWidth:v,pageUrl:w,timestamp:Date.now(),type:"click"},S=c();S&&o.addEvent({sessionId:s,event:{type:"interaction",data:JSON.stringify(b)},deviceId:S})}}}}}},this.logger=t,this.scrollWatcher=r}return e})();ee();function _s(){var e=j();
276return e?.innerHeight||document.documentElement&&document.documentElement.clientHeight||0}function xs(){var e=j();return e?.innerWidth||document.documentElement&&document.documentElement.clientWidth||0}ee();var o0=(function(){function e(t,r){var n=j();n&&n.navigator&&typeof n.navigator.sendBeacon=="function"?this.sendBeacon=function(i,o){try{if(n.navigator.sendBeacon(i,JSON.stringify(o)))return!0}catch{}return!1}:this.sendBeacon=function(){return!1},this.sendXhr=function(i,o){var s=new XMLHttpRequest;return s.open("POST",i,!0),s.setRequestHeader("Accept","*/*"),s.send(JSON.stringify(o)),!0},this.basePageUrl=Zt(r.serverZone,r.trackServerUrl),this.apiKey=r.apiKey,this.context=t,this.handleSendEvents=r.handleSendEvents,this.loggerProvider=r.loggerProvider}return e.prototype.send=function(t,r){var n=this,i,o=this.context,s=o.sessionId,c=o.type;if(this.handleSendEvents){var l=new URLSearchParams({device_id:t,session_id:String(s),type:String(c)}),u="".concat(this.basePageUrl,"?").concat(l.toString()),a={"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(this.apiKey)};try{this.handleSendEvents({url:u,method:"POST",headers:a,body:JSON.stringify(r),keepalive:!0}).catch(function(d){var p;(p=n.loggerProvider)===null||p===void 0||p.warn("Custom transport failed to send session replay interaction beacon:",d)})}catch(d){(i=this.loggerProvider)===null||i===void 0||i.warn("Custom transport threw while sending session replay interaction beacon:",d)}return}var h=new URLSearchParams({device_id:t,session_id:String(s),type:String(c),api_key:this.apiKey}),f="".concat(this.basePageUrl,"?").concat(h.toString());this.sendBeacon(f,r)||this.sendXhr(f,r)},e})();ee();var s0=(function(){function e(t,r){var n=this;this.timestamp=Date.now(),this.hook=function(i){n.update(i)},this.send=function(i){return function(o){var s,c,l,u,a=i(),h=j();if(h&&a){var f=(s=h.scrollX)!==null&&s!==void 0?s:0,d=(c=h.scrollY)!==null&&c!==void 0?c:0;(f>0||d>0)&&n.update({id:1,x:f,y:d}),n.transport.send(a,{version:1,events:[{maxScrollX:n._maxScrollX,maxScrollY:n._maxScrollY,maxScrollWidth:n._maxScrollWidth,maxScrollHeight:n._maxScrollHeight,viewportHeight:_s(),viewportWidth:xs(),pageUrl:ar(h.location.href,(u=(l=n.config.interactionConfig)===null||l===void 0?void 0:l.ugcFilterRules)!==null&&u!==void 0?u:[]),timestamp:n.timestamp,type:"scroll"}]})}}},this._maxScrollX=0,this._maxScrollY=0,this._currentScrollX=0,this._currentScrollY=0,this._maxScrollWidth=xs(),this._maxScrollHeight=_s(),this.config=r,this.transport=t}return e.default=function(t,r){return new e(new o0(t,r),r)},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(t){var r=Date.now();if(this._currentScrollX=t.x,this._currentScrollY=t.y,t.x>this._maxScrollX){var n=xs();this._maxScrollX=t.x;var i=t.x+n;i>this._maxScrollWidth&&(this._maxScrollWidth=i),this.timestamp=r}if(t.y>this._maxScrollY){var o=_s();this._maxScrollY=t.y;var s=t.y+o;s>this._maxScrollHeight&&(this._maxScrollHeight=s),this.timestamp=r}},e})();var Ic=(function(){function e(t){var r=t.sessionId,n=t.deviceId;this.deviceId=n,this.sessionId=r,r&&n&&(this.sessionReplayId=wb(r,n))}return e})();z();ee();var VA="AMP_SR_START_",zA=10,a0=1440*60*1e3,l0=function(e){return"".concat(VA).concat(e.substring(0,zA),"_")},Ac=function(e,t){return"".concat(l0(e)).concat(t)},Ts=function(){try{var e=j();return e?.localStorage}catch{return}},u0=function(e,t,r,n){var i=Ts();if(i){var o=Ac(e,t);try{var s=i.getItem(o);if(s!==null){var c=Number(s);if(Number.isFinite(c)&&c>0&&c<=r&&r-c<a0)return c}return i.setItem(o,String(r)),r}catch(l){n?.debug("Failed to read/write replay start time from storage: ".concat(String(l)));return}}},c0=function(e,t,r,n){var i=Ts();if(i)try{i.setItem(Ac(e,t),String(r))}catch(o){n?.debug("Failed to write replay start time to storage: ".concat(String(o)))}},f0=function(e,t,r){var n=Ts();if(n)try{n.removeItem(Ac(e,t))}catch(i){r?.debug("Failed to remove replay start time from storage: ".concat(String(i)))}},d0=function(e,t,r){var n,i,o=Ts();if(o){var s=l0(e);try{for(var c=[],l=0;l<o.length;l++){var u=o.key(l);if(!(!u||!u.startsWith(s))){var a=o.getItem(u);if(a!==null){var h=Number(a);(!Number.isFinite(h)||h<=0||t-h>=a0)&&c.push(u)}}}try{for(var f=U(c),d=f.next();!d.done;d=f.next()){var u=d.value;o.removeItem(u)}}catch(p){n={error:p}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}}catch(p){r?.debug("Failed to prune stale replay start times: ".concat(String(p)))}}};z();z();ms();var $A=1e3*60*60*24*2,HA=(function(){function e(){var t=this;this.dbs={},this.createStore=function(r){return O(t,void 0,void 0,function(){return R(this,function(n){switch(n.label){case 0:return[4,hn(r,1,{upgrade:function(i){i.objectStoreNames.contains("sessionTargetingMatch")||i.createObjectStore("sessionTargetingMatch",{keyPath:"sessionId"})}})];case 1:return[2,n.sent()]}})})},this.openOrCreateDB=function(r){return O(t,void 0,void 0,function(){var n,i;return R(this,function(o){switch(o.label){case 0:return this.dbs&&this.dbs[r]?[2,this.dbs[r]]:(n="".concat(r.substring(0,10),"_amp_session_replay_targeting"),[4,this.createStore(n)]);case 1:return i=o.sent(),this.dbs[r]=i,[2,i]}})})},this.getTargetingMatchForSession=function(r){var n=r.loggerProvider,i=r.apiKey,o=r.sessionId;return O(t,void 0,void 0,function(){var s,c,l,u;return R(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,this.openOrCreateDB(i)];case 1:return s=a.sent(),c=String(o),[4,s.get("sessionTargetingMatch",c)];case 2:return l=a.sent(),[2,l?.targetingMatch];case 3:return u=a.sent(),Qe(n,"Failed to get targeting match for session id ".concat(o,": ").concat(u),u),[3,4];case 4:return[2,void 0]}})})},this.storeTargetingMatchForSession=function(r){var n=r.loggerProvider,i=r.apiKey,o=r.sessionId,s=r.targetingMatch;return O(t,void 0,void 0,function(){var c,l,u,a;return R(this,function(h){switch(h.label){case 0:return h.trys.push([0,3,,4]),[4,this.openOrCreateDB(i)];case 1:return c=h.sent(),l=String(o),[4,c.put("sessionTargetingMatch",{targetingMatch:s,sessionId:l,lastUpdated:Date.now()})];case 2:return u=h.sent(),[2,u];case 3:return a=h.sent(),Qe(n,"Failed to store targeting match for session id ".concat(o,": ").concat(a),a),[3,4];case 4:return[2,void 0]}})})},this.clearStoreOfOldSessions=function(r){var n=r.loggerProvider,i=r.apiKey,o=r.currentSessionId;return O(t,void 0,void 0,function(){var s,c,l,u,a,h,f,d;return R(this,function(p){switch(p.label){case 0:return p.trys.push([0,8,,9]),[4,this.openOrCreateDB(i)];case 1:return s=p.sent(),c=String(o),l=s.transaction("sessionTargetingMatch","readwrite"),[4,l.store.getAll()];case 2:u=p.sent(),a=0,p.label=3;case 3:return a<u.length?(h=u[a],f=Date.now()-h.lastUpdated,h.sessionId!==c&&f>$A?[4,l.store.delete(h.sessionId)]:[3,5]):[3,6];case 4:p.sent(),p.label=5;case 5:return a++,[3,3];case 6:return[4,l.done];case 7:return p.sent(),[3,9];case 8:return d=p.sent(),Qe(n,"Failed to clear old targeting matches for sessions: ".concat(d),d),[3,9];case 9:return[2]}})})}}return e})();
276var Cs=new HA;var $0=function(e){var t=e.sessionId,r=e.targetingConfig,n=e.loggerProvider,i=e.apiKey,o=e.targetingParams,s=e.urlChange,c=s===void 0?!1:s;return O(void 0,void 0,void 0,function(){var l,u,a,h,f,d,p;return R(this,function(v){switch(v.label){case 0:return[4,Cs.clearStoreOfOldSessions({loggerProvider:n,apiKey:i,currentSessionId:t})];case 1:return v.sent(),[4,Cs.getTargetingMatchForSession({loggerProvider:n,apiKey:i,sessionId:t})];case 2:if(l=v.sent(),l===!0&&!c)return[2,!0];u=!0,v.label=3;case 3:return v.trys.push([3,6,,7]),[4,Promise.resolve().then(()=>(z0(),V0))];case 4:return a=v.sent().evaluateTargeting,h=P(P({},o),{flag:r,sessionId:typeof t=="string"?parseInt(t,10):t,apiKey:i,loggerProvider:n}),[4,a(h)];case 5:return f=v.sent(),f&&f.sr_targeting_config&&(u=f.sr_targeting_config.key==="on"),Cs.storeTargetingMatchForSession({loggerProvider:n,apiKey:i,sessionId:t,targetingMatch:u}),[3,7];case 6:return d=v.sent(),p=d,n.warn(p.message),[3,7];case 7:return[2,u]}})})};var Ns=2654435761,Ms=2246822519,H0=3266489917,AR=668265263,K0=374761393;function Pr(e,t){return(e<<t|e>>>32-t)>>>0}function ks(e,t){return e=e+Math.imul(t,Ms)>>>0,e=Pr(e,13),e=Math.imul(e,Ns)>>>0,e}function xi(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function RR(e){for(var t=[],r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n>=55296&&n<=56319&&r+1<e.length){var i=e.charCodeAt(r+1);i>=56320&&i<=57343&&(n=(n-55296<<10)+(i-56320)+65536,r++)}n<128?t.push(n):n<2048?t.push(192|n>>6,128|n&63):n<65536?t.push(224|n>>12,128|n>>6&63,128|n&63):t.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|n&63)}return new Uint8Array(t)}function OR(e,t){t===void 0&&(t=0);var r=RR(e),n=r.length,i,o=0;if(n>=16){for(var s=t+Ns+Ms>>>0,c=t+Ms>>>0,l=t>>>0,u=t-Ns>>>0;o<=n-16;)s=ks(s,xi(r,o)),o+=4,c=ks(c,xi(r,o)),o+=4,l=ks(l,xi(r,o)),o+=4,u=ks(u,xi(r,o)),o+=4;i=Pr(s,1)+Pr(c,7)+Pr(l,12)+Pr(u,18)>>>0}else i=t+K0>>>0;for(i=i+n>>>0;o<=n-4;)i=i+Math.imul(xi(r,o),H0)>>>0,i=Math.imul(Pr(i,17),AR)>>>0,o+=4;for(;o<n;)i=i+Math.imul(r[o],K0)>>>0,i=Math.imul(Pr(i,11),Ns)>>>0,o++;return i^=i>>>15,i=Math.imul(i,Ms)>>>0,i^=i>>>13,i=Math.imul(i,H0)>>>0,i^=i>>>16,i>>>0}function X0(e,t){var r=OR(e.toString()),n=r%1e6;return n/1e6<t}z();var Mc="__amplitude_url_tracking_patched__",Y0=new WeakMap;function Lc(e,t,r){if(r===void 0&&(r={}),!e?.location)return function(){};var n=r.enablePolling,i=n===void 0?!1:n,o=r.pollingInterval,s=o===void 0?vi:o;if(i){var c=function(){var w;return(w=e.location.href)!==null&&w!==void 0?w:""},l=c(),u=e.setInterval(function(){var w=c();w!==l&&(l=w,t(w))},s);return function(){u!=null&&e.clearInterval(u)}}var a=Y0.get(e);if(!a){var h=void 0,f=new Set,d=function(){var w;return(w=e.location.href)!==null&&w!==void 0?w:""},p=function(){var w=d();h!==void 0&&w===h||(h=w,f.forEach(function(b){return b(w)}))},v=function(w){var b=function(){for(var S=[],_=0;_<arguments.length;_++)S[_]=arguments[_];var x=w.apply(this,S);return p(),x};return b[Mc]=!0,b},g=e.history;if(g?.pushState){var y=Reflect.get(g,"pushState");y[Mc]||(g.pushState=v(y))}if(g?.replaceState){var m=Reflect.get(g,"replaceState");m[Mc]||(g.replaceState=v(m))}a={callbacks:f,notify:p,onPopStateOrHashChange:function(){return p()},listenersAttached:!1},Y0.set(e,a)}var E=a;return E.listenersAttached||(e.addEventListener("popstate",E.onPopStateOrHashChange),e.addEventListener("hashchange",E.onPopStateOrHashChange),E.listenersAttached=!0),E.callbacks.add(t),function(){E.callbacks.delete(t),E.callbacks.size===0&&E.listenersAttached&&(e.removeEventListener("popstate",E.onPopStateOrHashChange),e.removeEventListener("hashchange",E.onPopStateOrHashChange),E.listenersAttached=!1)}}function Dc(e){return e===void 0&&(e={}),{name:"amplitude/url-tracking@1",observer:function(t,r,n){var i,o,s,c=P(P({},e),n),l=c.ugcFilterRules||[],u=(i=c.enablePolling)!==null&&i!==void 0?i:!1,a=(o=c.pollingInterval)!==null&&o!==void 0?o:vi,h=(s=c.captureDocumentTitle)!==null&&s!==void 0?s:!1;if(!r)return function(){};var f=void 0,d=function(){return r.location&&r.location.href||""},p=function(){var y=r.innerHeight,m=r.innerWidth,E=r.document,w=d(),b="";h&&(b=E?.title||"");var S=l.length>0?ar(w,l):w;
276return{href:S,title:b,viewportHeight:y,viewportWidth:m,type:"url-change-event"}},v=function(){var y=d();if(f===void 0||y!==f){f=y;var m=p();t(m)}},g=Lc(r,function(){return v()},u?{enablePolling:!0,pollingInterval:a}:{});return v(),function(){return g()}},options:e}}var cV=Dc();z();ee();function J0(){try{var e=j();return e?e.parent!==e:!1}catch{return!0}}var Q0=(function(){function e(){this.pendingLoadListeners=new Map}return e.prototype.start=function(){var t=this,r;(r=this.mutationObserver)===null||r===void 0||r.disconnect();var n=j();n&&(this.sendToAllIframes({type:bi,action:"start"}),this.mutationObserver=new MutationObserver(function(i){var o,s,c,l,u,a;try{for(var h=U(i),f=h.next();!f.done;f=h.next()){var d=f.value;try{for(var p=(c=void 0,U(Array.from(d.addedNodes))),v=p.next();!v.done;v=p.next()){var g=v.value;g instanceof HTMLIFrameElement?t.sendToIframeAfterLoad(g):g instanceof Element&&g.querySelectorAll("iframe").forEach(function(w){t.sendToIframeAfterLoad(w)})}}catch(w){c={error:w}}finally{try{v&&!v.done&&(l=p.return)&&l.call(p)}finally{if(c)throw c.error}}try{for(var y=(u=void 0,U(Array.from(d.removedNodes))),m=y.next();!m.done;m=y.next()){var g=m.value;if(g instanceof HTMLIFrameElement){var E=t.pendingLoadListeners.get(g);E&&(g.removeEventListener("load",E),t.pendingLoadListeners.delete(g))}}}catch(w){u={error:w}}finally{try{m&&!m.done&&(a=y.return)&&a.call(y)}finally{if(u)throw u.error}}}}catch(w){o={error:w}}finally{try{f&&!f.done&&(s=h.return)&&s.call(h)}finally{if(o)throw o.error}}}),this.mutationObserver.observe(document.documentElement,{childList:!0,subtree:!0}))},e.prototype.stop=function(){var t;(t=this.mutationObserver)===null||t===void 0||t.disconnect(),this.mutationObserver=void 0,this.pendingLoadListeners.forEach(function(r,n){n.removeEventListener("load",r)}),this.pendingLoadListeners.clear(),this.sendToAllIframes({type:bi,action:"stop"})},e.prototype.sendToIframeAfterLoad=function(t){var r=this,n=function(){r.pendingLoadListeners.delete(t),r.sendToIframe(t,{type:bi,action:"start"})};this.pendingLoadListeners.set(t,n),t.addEventListener("load",n,{once:!0})},e.prototype.sendToAllIframes=function(t){var r=this,n=document.querySelectorAll("iframe");n.forEach(function(i){return r.sendToIframe(i,t)})},e.prototype.sendToIframe=function(t,r){var n;try{(n=t.contentWindow)===null||n===void 0||n.postMessage(r,"*")}catch{}},e})();function Z0(e){var t=j();if(!t)return function(){};var r=t.parent;function n(i){if(i.source===r){var o=i.data;o?.type===bi&&(o.action==="start"?e.onStart():o.action==="stop"&&e.onStop())}}return t.addEventListener("message",n),function(){return t.removeEventListener("message",n)}}var dx=(function(){function e(){var t=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(r){var n=j();n&&(n.removeEventListener("blur",t.blurListener),n.removeEventListener("focus",t.focusListener),!r&&n.addEventListener("blur",t.blurListener),!r&&n.addEventListener("focus",t.focusListener),n.self&&"onpagehide"in n.self?(n.removeEventListener("pagehide",t.pageLeaveListener),!r&&n.addEventListener("pagehide",t.pageLeaveListener)):(n.removeEventListener("beforeunload",t.pageLeaveListener),!r&&n.addEventListener("beforeunload",t.pageLeaveListener)))},this.blurListener=function(){t.sendEvents()},this.focusListener=function(){var r;if(t.recordCancelCallback&&t.recordFunction){if(((r=t.config)===null||r===void 0?void 0:r.captureFullSnapshotOnFocus)===!1)return;try{t.recordFunction.takeFullSnapshot(!0)}catch(n){t.loggerProvider.warn("Failed to take full snapshot on focus:",n)}}else t.recordEventsInFlight||t.recordEvents(!1)},this.pageLeaveListener=function(r){var n;(n=t.eventCompressor)===null||n===void 0||n.flushQueue(),t.sendEvents(),t.pageLeaveFns.forEach(function(i){i(r)})},this.evaluateTargetingAndCapture=function(r,n,i,o){return n===void 0&&(n=!1),i===void 0&&(i=!1),o===void 0&&(o=!1),O(t,void 0,void 0,function(){var s,c,l,u,a,h,f,d,p,v,g,y,m;return R(this,function(E){switch(E.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)this.loggerProvider.log("Targeting config has not been set yet, cannot evaluate targeting.");else return this.loggerProvider.log("No targeting config set, skipping initialization/recording for event."),[2];return this.lastTargetingParams=r,s=this.config.targetingConfig,c=s&&!this.sessionTargetingMatch,c?(l=o?this.latestUrlChangeTargetingEvaluationId:void 0,u=r.event,u&&Object.values(Ge).includes(u.event_type)&&(u=void 0),a=(y=(p=(d=r.page)===null||d===void 0?void 0:d.url)!==null&&p!==void 0?p:(g=(v=j())===null||v===void 0?void 0:v.location)===null||g===void 0?void 0:g.href)!==null&&y!==void 0?y:"",h=(m=r.page)!==null&&m!==void 0?m:a!==""?{url:a}:void 0,[4,$0({sessionId:this.identifiers.sessionId,targetingConfig:s,loggerProvider:this.loggerProvider,apiKey:this.config.apiKey,targetingParams:{userProperties:r.userProperties,event:u,page:h},urlChange:o})]):[3,2];case 1:if(f=E.sent(),o&&l!==void 0&&l!==this.latestUrlChangeTargetingEvaluationId)return this.loggerProvider.debug("Ignoring stale URL-change targeting result #".concat(l,"; latest is #").concat(this.latestUrlChangeTargetingEvaluationId,".")),[2];this.sessionTargetingMatch=this.sessionTargetingMatch||f,this.loggerProvider.debug(JSON.stringify({name:"targeted replay capture config",sessionTargetingMatch:this.sessionTargetingMatch,event:u,targetingParams:r},null,2)),E.label=2;case 2:return n?(this.initialize(!0),[3,5]):[3,3];case 3:return i||!this.recordCancelCallback?(this.loggerProvider.log("Recording events for session due to forceRestart or no ongoing recording."),[4,this.recordEvents()]):[3,5];case 4:E.sent(),E.label=5;case 5:return[2]}})})},this.addCustomRRWebEvent=function(r,n,i){return n===void 0&&(n={}),i===void 0&&(i=!0),O(t,void 0,void 0,function(){var o,s,c,l;return R(this,function(u){switch(u.label){case 0:return u.trys.push([0,3,,4]),o=void 0,s=this.config,s&&r!==zt.METADATA?(o={config:hs(s),version:dn},i?[4,ds()]:[3,2]):[3,2];case 1:c=u.sent(),o=P(P({},c),o),u.label=2;case 2:return this.recordCancelCallback&&this.recordFunction?this.recordFunction.addCustomEvent(r,P(P({},n),o)):this.loggerProvider.debug("Not able to add custom replay capture event ".concat(r," due to no ongoing recording.")),[3,4];case 3:return l=u.sent(),this.loggerProvider.debug("Error while adding custom replay capture event: ",l),[3,4];case 4:return[2]}})})},this.stopRecordingEvents=function(){var r,n,i;try{t.loggerProvider.log("Session Replay capture stopping."),t.recordCancelCallback&&t.recordCancelCallback(),t.recordCancelCallback=null,(r=t.networkObservers)===null||r===void 0||r.stop(),(n=t.crossOriginIframeC
276oordinator)===null||n===void 0||n.stop(),t.crossOriginIframeCoordinator=null,(i=t.crossOriginParentSignalCleanup)===null||i===void 0||i.call(t),t.crossOriginParentSignalCleanup=null}catch(s){var o=s;t.loggerProvider.warn("Error occurred while stopping replay capture: ".concat(o.toString()))}},this.loggerProvider=new Si(new St)}return e.prototype.init=function(t,r){return Ve(this._init(t,r))},e.prototype.setupUrlChangeListener=function(){var t=this,r,n;(r=this.urlChangeCleanup)===null||r===void 0||r.call(this);var i=j();if(i?.location){var o=!!(!((n=this.config)===null||n===void 0)&&n.targetingConfig),s=function(l){if(t.currentPageUrl=l,o){var u=++t.latestUrlChangeTargetingEvaluationId;t.evaluateTargetingAndCapture({userProperties:{},event:void 0,page:{url:l}},!1,!1,!0),t.loggerProvider.debug("Queued URL-change targeting re-evaluation #".concat(u," for ").concat(l,"."))}},c=Lc(i,s);this.urlChangeCleanup=function(){c(),t.urlChangeCleanup=null}}},e.prototype.isBelowMinSessionDuration=function(){var t,r=(t=this.config)===null||t===void 0?void 0:t.minSessionDurationMs;return r===void 0||this.sessionStartTime===void 0?!1:Date.now()-this.sessionStartTime<r},e.prototype.getCurrentPageForTargeting=function(){var t,r,n=(r=(t=j())===null||t===void 0?void 0:t.location)===null||r===void 0?void 0:r.href;return n!=null?{url:n}:void 0},e.prototype._init=function(t,r){var n,i,o,s,c,l,u,a,h,f,d,p,v,g;return O(this,void 0,void 0,function(){var y,m,E,w,b,S,_,x,I,C,k,N,T,F,D,G,q,M,$,L,W,M,X,A,Q,J,te,se,ce,de,V,re,ae,fe=this;return R(this,function(ne){switch(ne.label){case 0:return(n=this.urlChangeCleanup)===null||n===void 0||n.call(this),this.loggerProvider=new Si(r.loggerProvider||new St),Object.prototype.hasOwnProperty.call(r,"logLevel")&&this.loggerProvider.enable(r.logLevel),this.currentPageUrl=Ei(),this.identifiers=new Ic({sessionId:r.sessionId,deviceId:r.deviceId}),y=Date.now(),d0(t,y,this.loggerProvider),this.sessionStartTime=r.sessionId!==void 0&&(i=u0(t,r.sessionId,y,this.loggerProvider))!==null&&i!==void 0?i:y,m=this,[4,Ab(t,r)];case 1:return m.joinedConfigGenerator=ne.sent(),[4,this.joinedConfigGenerator.generateJoinedConfig()];case 2:return E=ne.sent(),w=E.joinedConfig,b=E.localConfig,S=E.remoteConfig,this.config=w,this.setMetadata(r.sessionId,w,b,S,(o=r.version)===null||o===void 0?void 0:o.version,dn,(s=r.version)===null||s===void 0?void 0:s.type),this.pageLeaveFns=[],r.sessionId&&(!((c=this.config.interactionConfig)===null||c===void 0)&&c.enabled)&&(_=s0.default({sessionId:r.sessionId,type:"interaction"},this.config),this.pageLeaveFns=[_.send(this.getDeviceId.bind(this)).bind(_)],this.scrollHook=_.hook.bind(_),this.clickHandler=new i0(this.loggerProvider,_)),x=[],I=this.config.storeType,I==="idb"&&!(!((l=j())===null||l===void 0)&&l.indexedDB)&&(I="memory",this.loggerProvider.warn("Could not use preferred indexedDB storage, reverting to in memory option.")),this.loggerProvider.log("Using ".concat(I," for event storage.")),N=j(),this.config.useWebWorker&&N&&N.Worker?[4,Promise.resolve().then(()=>(tS(),eS))]:[3,4];case 3:T=ne.sent(),F=T.compressionScript,D=T.trackDestinationScript,C=F,k=D,ne.label=4;case 4:return ne.trys.push([4,6,,7]),[4,_c({config:this.config,type:"replay",minInterval:(u=this.config.flushIntervalConfig)===null||u===void 0?void 0:u.minIntervalMs,maxInterval:(a=this.config.flushIntervalConfig)===null||a===void 0?void 0:a.maxIntervalMs,maxPersistedEventsSize:this.config.maxPersistedEventsSizeBytes,storeType:I,trackDestinationWorkerScript:k,shouldSend:function(){return!fe.isBelowMinSessionDuration()}})];case 5:return G=ne.sent(),this.rrwebEventManager=G,x.push({name:"replay",manager:G}),[3,7];case 6:return q=ne.sent(),M=q,this.loggerProvider.warn("Error occurred while creating replay events manager: ".concat(M.toString())),[3,7];case 7:if(!(!((h=this.config.interactionConfig)===null||h===void 0)&&h.enabled))return[3,11];$=this.config.interactionConfig.batch?n0:r0,ne.label=8;case 8:return ne.trys.push([8,10,,11]),[4,_c({config:this.config,type:"interaction",minInterval:(f=this.config.interactionConfig.trackEveryNms)!==null&&f!==void 0?f:sb,maxInterval:ab,maxPersistedEventsSize:this.config.maxPersistedEventsSizeBytes,payloadBatcher:$,storeType:I,trackDestinationWorkerScript:k})];case 9:return L=ne.sent(),x.push({name:"interaction",manager:L}),[3,11];case 10:return W=ne.sent(),M=W,this.loggerProvider.warn("Error occurred while creating interaction events manager: ".concat(M.toString())),[3,11];case 11:if(this.eventsManager=new(xc.bind.apply(xc,H([void 0],B(x),!1))),this.eventCompressor&&this.eventCompressor.terminate(),X=this.config.eagerFullSnapshotSend===!0?function(){return fe.sendEvents()}:void 0,this.eventCompressor=new Pb(this.eventsManager,this.config,this.getDeviceId(),C,X),this.pendingEmitEvents.length>0){A=this.pendingEmitEvents.splice(0);try{for(Q=U(A),J=Q.next();!J.done;J=Q.next())te=J.value,se=te.event,ce=te.sessionId,this.eventCompressor.enqueueEvent(se,ce)}catch(Oe){re={error:Oe}}finally{try{J&&!J.done&&(ae=Q.return)&&ae.call(Q)}finally{if(re)throw re.error}}}return this.pageLeaveFns=H(H([],B(this.pageLeaveFns),!1),[function(){var Oe;if(!(!fe.config||!(!((Oe=fe.identifiers)===null||Oe===void 0)&&Oe.sessionId)||!G)){var ge=G.getBeaconEvents();if(ge.length){var ye=fe.getDeviceId();ye&&(fe.isBelowMinSessionDuration()||G.trackDestination.sendBeacon({events:ge,sessionId:fe.
276identifiers.sessionId,deviceId:ye,apiKey:fe.config.apiKey,serverZone:fe.config.serverZone}))}}}],!1),[4,this.initializeNetworkObservers()];case 12:return ne.sent(),!((d=j())===null||d===void 0)&&d.opener&&(de=ei(),ti(de),de.setup(P({logger:this.loggerProvider},this.config.serverZone&&{endpoint:Zr[this.config.serverZone]}))),this.loggerProvider.log("Installing @amplitude/session-replay-browser."),this.teardownEventListeners(!1),[4,this.evaluateTargetingAndCapture({userProperties:r.userProperties,page:this.getCurrentPageForTargeting()},!0)];case 13:return ne.sent(),V=this.config.targetingConfig||((g=(v=(p=this.config.privacyConfig)===null||p===void 0?void 0:p.urlMaskLevels)===null||v===void 0?void 0:v.length)!==null&&g!==void 0?g:0)>0,V&&this.setupUrlChangeListener(),[2]}})})},e.prototype.setSessionId=function(t,r){return Ve(this.asyncSetSessionId(t,r))},e.prototype.asyncSetSessionId=function(t,r,n){var i,o,s,c;return O(this,void 0,void 0,function(){var l,u,a,h,f;return R(this,function(d){switch(d.label){case 0:return l=(i=this.identifiers)===null||i===void 0?void 0:i.sessionId,u=this.getDeviceId(),l!==void 0&&l===t&&(r===void 0||r===u)&&(n?.userProperties===void 0||Object.keys(n.userProperties).length===0)?[2]:(this.latestUrlChangeTargetingEvaluationId++,this.sessionTargetingMatch=!1,this.lastShouldRecordDecision=void 0,l&&this.sendEvents(l),a=l!==t,a&&((o=this.rrwebEventManager)===null||o===void 0||o.dropPendingBeaconEvents()),h=r||this.getDeviceId(),this.identifiers=new Ic({sessionId:t,deviceId:h}),a&&(this.sessionStartTime=Date.now(),this.suppressedSendCount=0,this.hasEmittedGateDecision=!1,!((s=this.config)===null||s===void 0)&&s.apiKey&&(c0(this.config.apiKey,t,this.sessionStartTime,this.loggerProvider),l!==void 0&&f0(this.config.apiKey,l,this.loggerProvider))),this.joinedConfigGenerator&&l?[4,this.joinedConfigGenerator.generateJoinedConfig()]:[3,2]);case 1:f=d.sent().joinedConfig,this.config=f,d.label=2;case 2:return!((c=this.config)===null||c===void 0)&&c.targetingConfig?[4,this.evaluateTargetingAndCapture({userProperties:n?.userProperties,page:this.getCurrentPageForTargeting()},!1,!0)]:[3,4];case 3:return d.sent(),[3,6];case 4:return[4,this.recordEvents()];case 5:d.sent(),d.label=6;case 6:return[2]}})})},e.prototype.getSessionReplayProperties=function(){var t,r=this.config,n=this.identifiers;if(!r||!n)return this.loggerProvider.warn("Session replay init has not been called, cannot get session replay properties."),{};var i=this.getShouldRecord(),o={};return i&&(o=(t={},t[Qy]=n.sessionReplayId?n.sessionReplayId:null,t),r.debugMode&&(o[rb]=JSON.stringify({appHash:jn(r.apiKey).toString()}))),this.addCustomRRWebEvent(zt.GET_SR_PROPS,{shouldRecord:i,eventProperties:o},this.eventCount===10),this.eventCount===10&&(this.eventCount=0),this.eventCount++,o},e.prototype.sendEvents=function(t){var r,n,i=t||((r=this.identifiers)===null||r===void 0?void 0:r.sessionId),o=this.getDeviceId();if(this.eventsManager&&i&&o){if(this.isBelowMinSessionDuration()){var s=this.sessionStartTime,c=this.config.minSessionDurationMs;this.loggerProvider.log("Session ".concat(i," not sent: duration ").concat(Date.now()-s,"ms is below minimum ").concat(c,"ms.")),this.suppressedSendCount++;return}if(!this.hasEmittedGateDecision&&((n=this.config)===null||n===void 0?void 0:n.minSessionDurationMs)!==void 0&&this.recordCancelCallback&&this.recordFunction){this.hasEmittedGateDecision=!0;var l=this.sessionStartTime!==void 0?Date.now()-this.sessionStartTime:void 0;this.addCustomRRWebEvent(zt.REPLAY_GATE_DECISION,{sessionId:i,suppressedSendCount:this.suppressedSendCount,elapsedMs:l,minSessionDurationMs:this.config.minSessionDurationMs},!1)}this.eventsManager.sendCurrentSequenceEvents({sessionId:i,deviceId:o})}},e.prototype.initialize=function(t){var r;return t===void 0&&(t=!1),O(this,void 0,void 0,function(){var n;return R(this,function(i){return!((r=this.identifiers)===null||r===void 0)&&r.sessionId?(n=this.getDeviceId(),n?(this.eventsManager&&t&&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 t,r,n;if(!((t=this.config)===null||t===void 0)&&t.instanceName){var i=qt(this.config.instanceName).identityStore;n=i.getIdentity().optOut}return n!==void 0?n:(r=this.config)===null||r===void 0?void 0:r.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 t=!1,r="",n=!1;if(this.config.targetingConfig)this.sessionTargetingMatch?(r="Capturing replays for session ".concat(this.identifiers.sessionId," due to matching targeting conditions."),this.loggerProvider.log(r),t=!0,n=!0):(r="Not capturing replays for session ".concat(this.identifiers.sessionId," due to not matching targeting conditions."),this.loggerProvider.log(r),t=!1,n=!1);else{var i=X0(this.identifiers.sessionId,this.config.sampleRate);i?(t=!0,n=!0):(r="Opting session ".concat(this.identifiers.sessionId," out of recording due to sample rate."),this.loggerProvider.log(r),t=!1,n=!1)}return this.lastShouldRecordDecision!==t&&this.config.targetingConfig&&(this.addCustomRRWebEvent(zt.TARGETING_DECISION,{message:r,sessionId:this.identifiers.sessionId,matched:n,targetingParams:this.lastTargetingParams}),this.lastShouldRecordDecision=t),t},e.prototype.getBlockSelectors=function(){var t,r,n,i=(n=(r=(t=this.config)===null||t===void 0?void 0:t.privacyConfig)===null||r===void 0?void 0:r.blockSelector)!==null&&n!==void 0?n:[];if(i.length!==0)return i},e.prototype.getMaskTextSelectors=function(){var t,r,n=(t=this.config)===null||t===void 0?void 0:t.privacyConfig,i=n?lc(this.currentPageUrl,n):void 0;if(i==="conservative"||!((r=n?.urlMaskLevels)===null||r===void 0)&&r.some(function(c){return c.maskLevel==="conservative"}))return"*";var o=n?.urlMaskLevels;if(n?.defaultMaskLevel==="conservative"&&o&&o.length>0)return"*";var s=n?.maskSelector;if(s)return s},e.prototype.getRecordingPlugins=function(t){var r,n,i,o,s,c;return O(this,void 0,void 0,function(){var l,u,a,h;return R(this,function(f){switch(f.label){case 0:l=[];try{u=Dc({ugcFilterRules:((n=(r=this.config)===null||r===void 0?void 0:r.interactionConfig)===null||n===void 0?void 0:n.ugcFilterRules)||[],enablePolling:((i=this.config)===null||i===void 0?void 0:i.enableUrlChangePolling)||!1,pollingInterval:(o=this.config)===null||o===void 0?void 0:o.urlChangePollingInterval,captureDocumentTitle:(s=this.config)===null||s===void 0?void 0:s.captureDocumentTitle}),l.push(u)}catch(d){this.loggerProvider.warn("Failed to create URL tracking plugin:",d)}if(!(!((c=t?.console)===null||c===void 0)&&c.enabled))return[3,4];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.resolve().then(()=>(zE(),VE))];case 2:return a=f.sent().getRecordConsolePlugin,l.push(a({level:t.console.levels})),[3,4];case 3:return h=f.sent(),this.loggerProvider.warn("Failed to load console plugin:",h),[3,4];case 4:return[2,l.length>0?l:void 0]}})})},e.prototype.getRecordFunction=function(){return O(this,void 0,void 0,function(){var t,r;return R(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(()=>
276(sx(),ox))];case 2:return t=n.sent().record,this.recordFunction=t,[2,t];case 3:return r=n.sent(),this.loggerProvider.warn("Failed to load rrweb-record module:",r),[2,null];case 4:return[2]}})})},e.prototype.recordEvents=function(t){return t===void 0&&(t=!0),O(this,void 0,void 0,function(){var r;return R(this,function(n){switch(n.label){case 0:if(this.recordEventsInFlight)return this.recordEventsPendingShouldLogMetadata=t,[2];this.recordEventsInFlight=!0,n.label=1;case 1:return n.trys.push([1,,6,7]),[4,this._recordEvents(t)];case 2:n.sent(),n.label=3;case 3:return this.recordEventsPendingShouldLogMetadata===null?[3,5]:(r=this.recordEventsPendingShouldLogMetadata,this.recordEventsPendingShouldLogMetadata=null,[4,this._recordEvents(r)]);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(t){var r,n,i,o,s,c,l,u;return t===void 0&&(t=!0),O(this,void 0,void 0,function(){var a,h,f,d,p,v,g,y,m,E,w,b,S,_,x,I,C,k,N,T=this;return R(this,function(F){switch(F.label){case 0:return a=this.config,h=this.getShouldRecord(),f=(r=this.identifiers)===null||r===void 0?void 0:r.sessionId,!h||!f||!a?[2]:(this.stopRecordingEvents(),[4,this.getRecordFunction()]);case 1:return d=F.sent(),d?[4,this.initializeNetworkObservers()]:[2];case 2:F.sent(),p=(n=a.loggingConfig)===null||n===void 0?void 0:n.network,v=Zt(a.serverZone,a.trackServerUrl),g=[as,ls,us,v],(i=this.networkObservers)===null||i===void 0||i.start(function(D){g.some(function(G){return D.url.startsWith(G)})||T.addCustomRRWebEvent(zt.FETCH_REQUEST,D)},p),y=a.interactionConfig,m=a.loggingConfig,E=y?.enabled?{mouseInteraction:this.eventsManager&&((o=this.clickHandler)===null||o===void 0?void 0:o.createHook({eventsManager:this.eventsManager,sessionId:f,deviceIdFn:this.getDeviceId.bind(this),mirror:d.mirror,ugcFilterRules:(s=y.ugcFilterRules)!==null&&s!==void 0?s:[],performanceOptions:(c=a.performanceConfig)===null||c===void 0?void 0:c.interaction})),scroll:this.scrollHook}:{},w=y?.enabled&&y.ugcFilterRules?y.ugcFilterRules:[],this.loggerProvider.log("Session Replay capture beginning for ".concat(f,".")),F.label=3;case 3:return F.trys.push([3,5,,6]),b=!!(!((l=a.crossOriginIframes)===null||l===void 0)&&l.enabled),S=((u=a.crossOriginIframes)===null||u===void 0?void 0:u.coordinateChildren)!==!1,_=b&&J0(),_&&S?(this.crossOriginParentSignalCleanup=Z0({onStart:function(){return T._recordEventsInChildMode(d,f,a,E)},onStop:function(){try{T.recordCancelCallback&&T.recordCancelCallback(),T.recordCancelCallback=null}catch(G){var D=G;T.loggerProvider.warn("Error occurred while stopping child iframe replay capture: ".concat(D.toString()))}}}),[2]):(x=this,I=d,C=[P({},this.buildRRWebRecordOptions(a,E,function(D){if(T.shouldOptOut()){T.loggerProvider.log("Opting session ".concat(f," out of recording due to optOut config.")),T.stopRecordingEvents(),T.sendEvents();return}D.type===Ar.Meta&&(D.data.href=ar(D.data.href,w)),T.eventCompressor?T.eventCompressor.enqueueEvent(D,f):T.pendingEmitEvents.push({event:D,sessionId:f})},"Error while capturing replay: "))],N={},[4,this.getRecordingPlugins(m)]);case 4:return x.recordCancelCallback=I.apply(void 0,[P.apply(void 0,C.concat([(N.plugins=F.sent(),N.recordCrossOriginIframes=b,N)]))]),b&&!_&&S&&(this.crossOriginIframeCoordinator||(this.crossOriginIframeCoordinator=new Q0),this.crossOriginIframeCoordinator.start()),this.addCustomRRWebEvent(zt.DEBUG_INFO),t&&this.addCustomRRWebEvent(zt.METADATA,this.metadata),[3,6];case 5:return k=F.sent(),this.loggerProvider.warn("Failed to initialize session replay:",k),[3,6];case 6:return[2]}})})},e.prototype.buildRRWebRecordOptions=function(t,r,n,i){var o=this,s=t.privacyConfig;return P(P({emit:n,inlineStylesheet:t.shouldInlineStylesheet,hooks:r,maskAllInputs:!0,maskTextClass:os,blockClass:nb,blockSelector:this.getBlockSelectors(),applyBackgroundColorToBlockedElements:t.applyBackgroundColorToBlockedElements,maskInputFn:uc("input",s,function(){return o.currentPageUrl}),maskTextFn:uc("text",s,function(){return o.currentPageUrl}),maskAttributeFn:Eb(s,function(){return o.currentPageUrl}),maskTextSelector:this.getMaskTextSelectors()},t.fullSnapshotIntervalMs!==void 0&&{checkoutEveryNms:t.fullSnapshotIntervalMs}),{recordCanvas:!1,captureAdoptedStyleSheets:t.captureAdoptedStyleSheets,slimDOMOptions:{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}
276,errorHandler:function(c){var l=c;if(l.message.includes("insertRule")&&l.message.includes("CSSStyleSheet")||l._external_)throw l;return o.loggerProvider.warn(i,l.toString()),!0}})},e.prototype._recordEventsInChildMode=function(t,r,n,i){try{this.recordCancelCallback&&this.recordCancelCallback(),this.recordCancelCallback=null,this.recordCancelCallback=t(P(P({},this.buildRRWebRecordOptions(n,i,function(){},"Error while capturing replay (child iframe): ")),{recordCrossOriginIframes:!0})),this.loggerProvider.log("Session Replay child iframe capture beginning for session ".concat(r,"."))}catch(o){this.loggerProvider.warn("Failed to initialize session replay in child iframe mode:",o)}},e.prototype.getDeviceId=function(){var t;return(t=this.identifiers)===null||t===void 0?void 0:t.deviceId},e.prototype.getSessionId=function(){var t;return(t=this.identifiers)===null||t===void 0?void 0:t.sessionId},e.prototype.flush=function(t){var r;return t===void 0&&(t=!1),O(this,void 0,void 0,function(){return R(this,function(n){return[2,(r=this.eventsManager)===null||r===void 0?void 0:r.flush(t)]})})},e.prototype.shutdown=function(){var t,r;(t=this.urlChangeCleanup)===null||t===void 0||t.call(this),(r=this.crossOriginParentSignalCleanup)===null||r===void 0||r.call(this),this.crossOriginParentSignalCleanup=null,this.teardownEventListeners(!0),this.stopRecordingEvents(),this.sendEvents()},e.prototype.mapSDKType=function(t){return t==="plugin"?"@amplitude/plugin-session-replay-browser":t==="segment"?"@amplitude/segment-session-replay-plugin":null},e.prototype.setMetadata=function(t,r,n,i,o,s,c){var l=t?.toString()?jn(t.toString()):void 0;this.metadata={joinedConfig:r,localConfig:n,remoteConfig:i,sessionId:t,hashValue:l,sampleRate:r.sampleRate,replaySDKType:this.mapSDKType(c),replaySDKVersion:o,standaloneSDKType:"@amplitude/session-replay-browser",standaloneSDKVersion:s}},e.prototype.initializeNetworkObservers=function(){var t,r,n;return O(this,void 0,void 0,function(){var i,o;return R(this,function(s){switch(s.label){case 0:if(!(!((n=(r=(t=this.config)===null||t===void 0?void 0:t.loggingConfig)===null||r===void 0?void 0:r.network)===null||n===void 0)&&n.enabled&&!this.networkObservers))return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,Promise.resolve().then(()=>(fx(),cx))];case 2:return i=s.sent().NetworkObservers,this.networkObservers=new i,[3,4];case 3:return o=s.sent(),this.loggerProvider.warn("Failed to import or instantiate NetworkObservers:",o),[3,4];case 4:return[2]}})})},e})();var Fr=function(e){return function(){var t=e.config,r=t||cc(),n=r.loggerProvider,i=r.logLevel;return{logger:n,logLevel:i}}},AN=function(){var e=new dx;return{init:Z(e.init.bind(e),"init",Fr(e)),evaluateTargetingAndCapture:Z(e.evaluateTargetingAndCapture.bind(e),"evaluateTargetingAndRecord",Fr(e)),setSessionId:Z(e.setSessionId.bind(e),"setSessionId",Fr(e)),getSessionId:Z(e.getSessionId.bind(e),"getSessionId",Fr(e)),getSessionReplayProperties:Z(e.getSessionReplayProperties.bind(e),"getSessionReplayProperties",Fr(e)),flush:Z(e.flush.bind(e),"flush",Fr(e)),shutdown:Z(e.shutdown.bind(e),"shutdown",Fr(e))}},vr=AN();var hx=vr.init,px=vr.setSessionId,vx=vr.getSessionId,gx=vr.getSessionReplayProperties,mx=vr.flush,yx=vr.shutdown,bx=vr.evaluateTargetingAndCapture;io();var Jh=function(e){return e===void 0&&(e="$default_instance"),Wr.getInstance(e)};z();var Ht;(function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"})(Ht||(Ht={}));var Qh;(function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue"})(Qh||(Qh={}));var Zh;(function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"})(Zh||(Zh={}));var Sx=[Ht.SET,Ht.SET_ONCE,Ht.ADD,Ht.APPEND,Ht.PREPEND,Ht.POSTINSERT];var Ex=function(e){if(e.user_properties){var t={},r=Object.keys(e.user_properties);return r.forEach(function(n){if(Sx.includes(n)){var i=e.user_properties&&e.user_properties[n];t=P(P({},t),i)}}),t}};var ep="1.33.8";var RN="[Amplitude]",ON="".concat(RN," Session Replay ID"),Ui=(function(){function e(t){this.name=e.pluginName,this.type="enrichment",this.config=null,this.sessionReplay={flush:mx,getSessionId:vx,getSessionReplayProperties:gx,init:hx,setSessionId:px,shutdown:yx,evaluateTargetingAndCapture:bx},this.options=P({forceSessionTracking:!1},t),this.srInitOptions=this.options}return e.prototype.setup=function(t,r){var n,i,o,s,c,l,u,a;return O(this,void 0,void 0,function(){var h,f,d;return R(this,function(p){switch(p.label){case 0:return p.trys.push([0,2,,3]),t?.loggerProvider.log("Installing @amplitude/plugin-session-replay, version ".concat(ep,".")),this.config=t,this.options.forceSessionTracking&&(typeof t.defaultTracking=="boolean"?t.defaultTracking===!1&&(t.defaultTracking={pageViews:!1,formInteractions:!1,fileDownloads:!1,sessions:!0}):t.defaultTracking=P(P({},t.defaultTracking),{sessions:!0})),h=Jh(this.config.instanceName).identityStore,f=h.getIdentity().userProperties,this.srInitOptions={instanceName:this.config.instanceName,deviceId:(n=this.options.deviceId)!==null&&n!==void 0?n: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||((i=this.config.remoteConfig)===null||i===void 0?void 0:i.serverUrl),trackServerUrl:this.options.trackServerUrl,sampleRate:this.options.sampleRate,privacyConfig:{blockSelector:(o=this.options.privacyConfig)===null||o===void 0?void 0:o.blockSelector,maskSelector:(s=this.options.privacyConfig)===null||s===void 0?void 0:s.maskSelector,unmaskSelector:(c=this.options.privacyConfig)===null||c===void 0?void 0:c.unmaskSelector,defaultMaskLevel:(l=this.options.privacyConfig)===null||l===void 0?void 0:l.defaultMaskLevel},debugMode:this.options.debugMode,shouldInlineStylesheet:this.options.shouldInlineStylesheet,version:{type:"plugin",version:ep},performanceConfig:this.options.performanceConfig,storeType:this.options.storeType,useWebWorker:(u=this.options.useWebWorker)!==null&&u!==void 0?u:(a=this.options.experimental)===null||a===void 0?void 0:a.useWebWorker,userProperties:f,applyBackgroun
276dColorToBlockedElements: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,eagerFullSnapshotSend:this.options.eagerFullSnapshotSend,captureFullSnapshotOnFocus:this.options.captureFullSnapshotOnFocus,maxPersistedEventsSizeBytes:this.options.maxPersistedEventsSizeBytes,maxSingleEventSizeBytes:this.options.maxSingleEventSizeBytes,sendTimeoutMs:this.options.sendTimeoutMs,handleSendEvents:this.options.handleSendEvents,handleFetchConfig:this.options.handleFetchConfig},[4,this.sessionReplay.init(t.apiKey,this.srInitOptions).promise];case 1:return p.sent(),[3,3];case 2:return d=p.sent(),t?.loggerProvider.error("Session Replay: Failed to initialize due to ".concat(d.message)),[3,3];case 3:return[2]}})})},e.prototype.onSessionIdChanged=function(t){var r;return O(this,void 0,void 0,function(){return R(this,function(n){switch(n.label){case 0:return(r=this.config)===null||r===void 0||r.loggerProvider.debug("Analytics session id is changed to ".concat(t,", SR session id is ").concat(String(this.sessionReplay.getSessionId()),".")),[4,this.sessionReplay.setSessionId(t).promise];case 1:return n.sent(),[2]}})})},e.prototype.onOptOutChanged=function(t){var r;return O(this,void 0,void 0,function(){var n;return R(this,function(i){switch(i.label){case 0:return(r=this.config)===null||r===void 0||r.loggerProvider.debug("optOut is changed to ".concat(String(t),", calling ").concat(t?"sessionReplay.shutdown()":"sessionReplay.init()",".")),t?(this.sessionReplay.shutdown(),[3,4]):[3,1];case 1:return n=this.config!=null,n?[4,this.sessionReplay.init(this.config.apiKey,this.srInitOptions).promise]:[3,3];case 2:n=i.sent(),i.label=3;case 3:i.label=4;case 4:return[2]}})})},e.prototype.execute=function(t){var r,n,i;return O(this,void 0,void 0,function(){var o,l,o,s,c,l,u;return R(this,function(a){switch(a.label){case 0:return a.trys.push([0,9,,10]),this.options.customSessionId?(o=this.options.customSessionId(t),o?o===this.sessionReplay.getSessionId()?[3,2]:[4,this.sessionReplay.setSessionId(o).promise]:[3,3]):[3,4];case 1:a.sent(),a.label=2;case 2:l=this.sessionReplay.getSessionReplayProperties(),t.event_properties=P(P({},t.event_properties),l),a.label=3;case 3:return[3,8];case 4:return o=(r=this.config)===null||r===void 0?void 0:r.sessionId,o&&o!==this.sessionReplay.getSessionId()?[4,this.sessionReplay.setSessionId(o).promise]:[3,6];case 5:a.sent(),a.label=6;case 6:return o&&o===t.session_id?(s=void 0,t.event_type===Ge.IDENTIFY&&(s=Ex(t)),c=j(),[4,this.sessionReplay.evaluateTargetingAndCapture({event:t,userProperties:s,page:((n=c?.location)===null||n===void 0?void 0:n.href)!=null?{url:c.location.href}:void 0})]):[3,8];case 7:a.sent(),l=this.sessionReplay.getSessionReplayProperties(),t.event_properties=P(P({},t.event_properties),l),a.label=8;case 8:return t.event_type===Ge.IDENTIFY&&t.event_properties&&delete t.event_properties[ON],[2,Promise.resolve(t)];case 9:return u=a.sent(),(i=this.config)===null||i===void 0||i.loggerProvider.error("Session Replay: Failed to enrich event due to ".concat(u.message)),[2,Promise.resolve(t)];case 10:return[2]}})})},e.prototype.teardown=function(){var t;return O(this,void 0,void 0,function(){return R(this,function(r){try{this.sessionReplay.shutdown(),this.config=null}catch(n){(t=this.config)===null||t===void 0||t.loggerProvider.error("Session Replay: teardown failed due to ".concat(n.message))}return[2]})})},e.prototype.getSessionReplayProperties=function(){return this.sessionReplay.getSessionReplayProperties()},e.pluginName="@amplitude/plugin-session-replay-browser",e})();var Oa=function(e){return new Ui(e)};z();var rp=function(e,t){return rp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},rp(e,t)};function Ix(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");rp(e,t);function r(){this.constructor=e}
vendor: 4,260 bytes, line 276
276e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var gt=function(){return gt=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},gt.apply(this,arguments)};function Ax(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function c(a){try{u(n.next(a))}catch(h){s(h)}}function l(a){try{u(n.throw(a))}catch(h){s(h)}}function u(a){a.done?o(a.value):i(a.value).then(c,l)}u((n=n.apply(e,t||[])).next())})}function Rx(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=c(0),s.throw=c(1),s.return=c(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(a){return l([u,a])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(a){u=[6,a],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function nt(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")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.")}function sp(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(c){s={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function ap(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var oe={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"},PN=function(e){for(var t=[],r=0,n=0;n<e.length;n++){var i=e.charCodeAt(n);i<128?t[r++]=i:i<2048?(t[r++]=i>>6|192,t[r++]=i&63|128):(i&64512)==55296&&n+1<e.length&&(e.charCodeAt(n+1)&64512)==56320?(i=65536+((i&1023)<<10)+(e.charCodeAt(++n)&1023),t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=i&63|128):(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=i&63|128)}return Uint8Array.from(t)},ka=-862048943,Na=461845907,Ma=15,kN=13,NN=5,MN=-430675100,LN=function(e,t){t===void 0&&(t=0);for(var r=PN(e),n=r.length,i=n>>2,o=t,s=0;s<i;s++){var c=s<<2,l=FN(r,c);o=DN(l,o)}var u=i<<2,a=0;switch(n-u){case 3:a^=r[u+2]<<16,a^=r[u+1]<<8,a^=r[u],a=Math.imul(a,ka),a=Bi(a,Ma),a=Math.imul(a,Na),o^=a;break;case 2:a^=r[u+1]<<8,a^=r[u],a=Math.imul(a,ka),a=Bi(a,Ma),a=Math.imul(a,Na),o^=a;break;case 1:a^=r[u],a=Math.imul(a,ka),a=Bi(a,Ma),a=Math.imul(a,Na),o^=a;break}return o^=n,UN(o)>>>0},DN=function(e,t){var r=e,n=t;return r=Math.imul(r,ka),r=Bi(r,Ma),r=Math.imul(r,Na),n^=r,n=Bi(n,kN),n=Math.imul(n,NN),n+MN|0},UN=function(e){var t=e;return t^=t>>>16,t=Math.imul(t,-2048144789),t^=t>>>
27613,t=Math.imul(t,-1028477387),t^=t>>>16,t},Bi=function(e,t,r){r===void 0&&(r=32),t>r&&(t=t%r);var n=4294967295<<r-t>>>0,i=(e&n)>>>0>>>r-t>>>0;return(e<<t|i)>>>0},FN=function(e,t){t===void 0&&(t=0);var r=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return BN(r)},BN=function(e){return(e&-16777216)>>>24|(e&16711680)>>>8|(e&65280)<<8|(e&255)<<24},tp=function(e,t){var r,n;if(!(!t||t.length===0)){try{for(var i=nt(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!s||!e||typeof e!="object")return;e=e[s]}}catch(c){r={error:c}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}if(e!=null)return e}},qN="(\\d+)\\.(\\d+)",GN="(\\d+)",WN="(-(([-\\w]+\\.?)*))?",jN="^".concat(qN,"(\\.").concat(GN).concat(WN,")?$"),VN=(function(){function e(t,r,n,i){i===void 0&&(i=void 0),this.major=t,this.minor=r,this.patch=n,this.preRelease=i}return e.parse=function(t){if(t){var r=new RegExp(jN).exec(t);if(r){var n=Number(r[1]),i=Number(r[2]);if(!(isNaN(n)||isNaN(i))){var o=Number(r[4])||0,s=r[5]||void 0;return new e(n,i,o,s)}}}},e.prototype.compareTo=function(t){return this.major>t.major?1:this.major<t.major?-1:this.minor>t.minor?1:this.minor<t.minor?-1:this.patch>t.patch?1:this.patch<t.patch||this.preRelease&&!t.preRelease?-1:!this.preRelease&&t.preRelease?1:this.preRelease&&t.preRelease?this.preRelease>t.preRelease?1:this.preRelease<t.preRelease?-1:0:0},e})(),Ox=(function(){function e(){}return e.prototype.evaluate=function(t,r){var n,i,o={},s={context:t,result:o};try{for(var c=nt(r),l=c.next();!l.done;l=c.next()){var u=l.value,a=this.evaluateFlag(s,u);a&&(o[u.key]=a)}}catch(h){n={error:h}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}return o},e.prototype.evaluateWithTraces=function(t,r){var n,i,o={},s={},c={context:t,result:o};try{for(var l=nt(r),u=l.next();!u.done;u=l.next()){var a=u.value,h=this.evaluateFlagWithTrace(c,a),f=h.variant,d=h.trace;f&&(o[a.key]=f),s[a.key]=d}}catch(p){n={error:p}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return{results:o,traces:s}},e.prototype.evaluateFlag=function(t,r){var n,i,o;try{for(var s=nt(r.segments),c=s.next();!c.done;c=s.next()){var l=c.value;if(o=this.evaluateSegment(t,r,l),o){var u=gt(gt(gt({},r.metadata),l.metadata),o.metadata);o=gt(gt({},o),{metadata:u});break}}}catch(a){n={error:a}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return o},e.prototype.evaluateFlagWithTrace=function(t,r){var n,i,o,s,c,l,u,a,h=[],f,d,p;try{for(var v=nt(r.segments),g=v.next();!g.done;g=v.next()){var y=g.value;if(!y.conditions){var m=this.bucket(t,y),E=m!==void 0;h.push({segmentMetadata:y.metadata,conditionsPassed:!0,bucketed:E,bucketVariant:m,conditionResult:void 0,matched:E}),!f&&m!==void 0&&(f=r.variants[m],d=y,p=(u=y.metadata)===null||u===void 0?void 0:u.segmentName);continue}var w=[],b=!1;try{for(var S=(o=void 0,nt(y.conditions)),_=S.next();!_.done;_=S.next()){var x=_.value,I=!0,C=[];try{for(var k=(c=void 0,nt(x)),N=k.next();!N.done;N=k.next()){var T=N.value,F=tp(t,T.selector),D=this.matchCondition(t,T);if(C.push({propValue:F,condition:T,matched:D}),!D){I=!1;break}}}catch(W){c={error:W}}finally{try{N&&!N.done&&(l=k.return)&&l.call(k)}finally{if(c)throw c.error}}if(w.push(C),I){b=!0;break}}}catch(W){o={error:W}}finally{try{_&&!_.done&&(s=S.return)&&s.call(S)}finally{if(o)throw o.error}}var G=!1,q=void 0;b&&(q=this.bucket(t,y),G=q!==void 0),h.push({segmentMetadata:y.metadata,conditionsPassed:b,bucketed:G,bucketVariant:q,conditionResult:w,matched:b&&G}),b&&q!==void 0&&!f&&(f=r.variants[q],d=y,p=(a=y.metadata)===null||a===void 0?void 0:a.segmentName)}}catch(W){n={error:W}}finally{try{g&&!g.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}if(f&&d){var $=gt(gt(gt({},r.metadata),d.metadata),f.metadata);f=gt(gt({},f),{metadata:$})}var L={flagKey:r.key,matched:f!==void 0,matchedSegment:p,steps:h};return{variant:f,trace:L}},e.prototype.evaluateSegment=function(t,r,n){if(!n.conditions){var i=this.bucket(t,n);return i!==void 0?r.variants[i]:void 0}var o=this.evaluateConditions(t,n.conditions);if(o){var i=this.bucket(t,n);return i!==void 0?r.variants[i]:void 0}},e.prototype.evaluateConditions=function(t,r){var n,i,o,s;try{for(var c=nt(r),l=c.next();!l.done;l=c.next()){var u=l.value,a=!0;try{for(var h=(o=void 0,nt(u)),f=h.next();!f.done;f=h.next()){var d=f.value;if(a=this.matchCondition(t,d),!a)break}}catch(p){o={error:p}}finally{try{f&&!f.done&&(s=h.return)&&s.call(h)}finally{if(o)throw o.error}}if(a)return!0}}catch(p){n={error:p}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}return!1},e.prototype.matchCondition=function(t,r){var n=tp(t,r.selector);if(n==null)return this.matchNull(r.op,r.values);var i=this.coerceStringArray(n);if(this.isSetOperator(r.op))return i?this.matchSet(i,r.op,r.values):!1;if(i)return this.matchStringsNonSet(i,r.op,r.values);var o=this.coerceString(n);return o!==void 0?this.matchString(o,r.op,r.values):!1},e.prototype.getHash=function(t){return LN(t)},e.prototype.bucket=function(t,r){var n,i,o,s;if(!r.bucket)return r.variant;var c=this.coerceString(tp(t,r.bucket.selector));if(!c||c.length===0)return r.variant;var l="".concat(r.bucket.salt,"/").concat(c),u=this.getHash(l),a=u%100,h=Math.floor(u/100);try{for(var f=nt(r.bucket.allocations),d=f.next();!d.done;d=f.next()){var p=d.value,v=p.range[0],g=p.range[1];if(a>=v&&a<g)try{for(var y=(o=void 0,nt(p.distributions)),m=y.next();!m.done;m=y.next()){var E=m.value,w=E.range[0],b=E.range[1];if(h>=w&&h<b)return E.variant}}catch(S){o={error:S}}finally{try{m&&!m.done&&(s=y.return)&&s.call(y)}finally{if(o)throw o.error}}}}catch(S){n={error:S}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}return r.variant},e.prototype.matchNull=function(t,r){var n=this.containsNone(r);switch(t){case oe.IS:case oe.CONTAINS:case oe.LESS_THAN:case oe.LESS_THAN_EQUALS:case oe.GREATER_THAN:case oe.GREATER_THAN_EQUALS:case oe.VERSION_LESS_THAN:case oe.VERSION_LESS_THAN_EQUALS:case oe.VERSION_GREATER_THAN:case oe.VERSION_GREATER_THAN_EQUALS:case oe.SET_IS:case oe.SET_CONTAINS:case oe.SET_CONTAINS_ANY:return n;case oe.IS_NOT:case oe.DOES_NOT_CONTAIN:case oe.SET_DOES_NOT_CONTAIN:case oe.SET_DOES_NOT_CONTAIN_ANY:return!n;default:return!1}},e.prototype.matchSet=function(t,r,n){switch(r){case oe.SET_IS:return this.setEquals(t,n);case oe.SET_IS_NOT:return!this.setEquals(t,n);case oe.SET_CONTAINS:return this.matchesSetContainsAll(t,n);case oe.SET_DOES_NOT_CONTAIN:return!this.matchesSetContainsAll(t,n);case oe.SET_CONTAINS_ANY:return this.matchesSetContainsAny(t,n);case oe.SET_DOES_NOT_CONTAIN_ANY:return!this.matchesSetContainsAny(t,n);default:return!1}},e.prototype.matchString=function(t,r,n){var i=this;switch(r){case oe.IS:return this.matchesIs(t,n);case oe.IS_NOT:return!this.matchesIs(t,n);case oe.CONTAINS:return this.matchesContains(t,n);case oe.DOES_NOT_CONTAIN:return!this.matchesContains(t,n);case oe.LESS_THAN:case oe.LESS_THAN_EQUALS:case oe.GREATER_THAN:case oe.GREATER_THAN_EQUALS:return this.matchesComparable(t,r,n,function(o){return i.parseNumber(o)},function(o,s,c){return i.comparator(o,s,c)});case oe.VERSION_LESS_THAN:case oe.VERSION_LESS_THAN_EQUALS:case oe.VERSION_GREATER_THAN:case oe.VERSION_GREATER_THAN_EQUALS:return this.matchesComparable(t,r,n,function(o){return VN.parse(o)},function(o,s,c){return i.versionComparator(o,s,c)});case oe.REGEX_MATCH:return this.matchesRegex(t,n);case oe.REGEX_DOES_NOT_MATCH:return!this.matchesRegex(t,n);default:return!1}},e.prototype.matchStringsNonSet=function(t,r,n){var i=this;return t.some(function(o){return i.matchString(o,r,n)})},e.prototype.matchesIs=function(t,r){if(this.containsBooleans(r)){var n=t.toLowerCase();if(n==="true"||n==="false")return r.some(function(i){return i.toLowerCase()===n})}return r.some(function(i){return t===i})},e.prototype.matchesContains=function(t,r){var n,i;try{for(var o=nt(r),s=o.next();!s.done;s=o.next()){var c=s.value;if(t.toLowerCase().includes(c.toLowerCase()))return!0}}catch(l){n={error:l}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return!1},e.prototype.matchesComparable=function(t,r,n,i,o){var s=this,c=i(t),l=n.map(function(u){return i(u)}).filter(function(u){return u!==void 0});return c===void 0||l.length===0?n.some(function(u){return s.comparator(t,r,u)}):l.some(function(u){return o(c,r,u)})},e.prototype.comparator=function(t,r,n){switch(r){case oe.LESS_THAN:case oe.VERSION_LESS_THAN:return t<n;case oe.LESS_THAN_EQUALS:case oe.VERSION_LESS_THAN_EQUALS:return t<=n;case oe.GREATER_THAN:case oe.VERSION_GREATER_THAN:return t>n;case oe.GREATER_THAN_EQUALS:case oe.VERSION_GREATER_THAN_EQUALS:return t>=n;default:return!1}},e.prototype.versionComparator=function(t,r,n){var i=t.compareTo(n);switch(r){case oe.LESS_THAN:case oe.VERSION_LESS_THAN:return i<0;case oe.LESS_THAN_EQUALS:case oe.VERSION_LESS_THAN_EQUALS:return i<=0;case oe.GREATER_THAN:case oe.VERSION_GREATER_THAN:return i>0;case oe.GREATER_THAN_EQUALS:case oe.VERSION_GREATER_THAN_EQUALS:return i>=0;default:return!1}},e.prototype.matchesRegex=function(t,r){return r.some(function(n){return!!new RegExp(n).exec(t)})},e.prototype.containsNone=function(t){return t.some(function(r){return r==="(none)"})},e.prototype.containsBooleans=function(t){return t.some(function(r){switch(r.toLowerCase()){case"true":case"false":return!0;default:return!1}})},e.prototype.parseNumber=function(t){var r;return(r=Number(t))!==null&&r!==void 0?r:void 0},e.prototype.coerceString=function(t){if(t!=null)return typeof t=="object"?JSON.stringify(t):String(t)},e.prototype.coerceStringArray=function(t){var r=this;if(Array.isArray(t)){var n=t;return n.map(function(s){return r.coerceString(s)}
vendor: 4,127 bytes, line 276
276).filter(Boolean)}var i=String(t);if(i.startsWith("["))try{var o=JSON.parse(i);return Array.isArray(o)?o.map(function(s){return r.coerceString(s)}).filter(Boolean):void 0}catch{return}},e.prototype.isSetOperator=function(t){switch(t){case oe.SET_IS:case oe.SET_IS_NOT:case oe.SET_CONTAINS:case oe.SET_DOES_NOT_CONTAIN:case oe.SET_CONTAINS_ANY:case oe.SET_DOES_NOT_CONTAIN_ANY:return!0;default:return!1}},e.prototype.setEquals=function(t,r){var n=new Set(t),i=new Set(r);return n.size===i.size&&ap([],sp(i),!1).every(function(o){return n.has(o)})},e.prototype.matchesSetContainsAll=function(t,r){var n,i;if(t.length<r.length)return!1;try{for(var o=nt(r),s=o.next();!s.done;s=o.next()){var c=s.value;if(!this.matchesIs(c,t))return!1}}catch(l){n={error:l}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return!0},e.prototype.matchesSetContainsAny=function(t,r){var n,i;try{for(var o=nt(r),s=o.next();!s.done;s=o.next()){var c=s.value;if(this.matchesIs(c,t))return!0}}catch(l){n={error:l}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return!1},e})(),lp=function(e,t){var r,n,i=gt({},e),o=[],s=t||Object.keys(i);try{for(var c=nt(s),l=c.next();!l.done;l=c.next()){var u=l.value,a=Px(u,i);a&&o.push.apply(o,ap([],sp(a),!1))}}catch(h){r={error:h}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return o},Px=function(e,t,r){var n,i;r===void 0&&(r=[]);var o=t[e];if(o){if(!o.dependencies||o.dependencies.length===0)return delete t[o.key],[o]}else return;r.push(o.key);var s=[],c=function(h){if(r.some(function(d){return d===h}))throw Error("Detected a cycle between flags ".concat(r.join(", ")));var f=Px(h,t,r);f&&s.push.apply(s,ap([],sp(f),!1))};try{for(var l=nt(o.dependencies),u=l.next();!u.done;u=l.next()){var a=u.value;c(a)}}catch(h){n={error:h}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return s.push(o),r.pop(),delete t[o.key],s},kx="3.7.8",zN=kx,In=typeof Buffer=="function",wx=typeof TextDecoder=="function"?new TextDecoder:void 0,_x=typeof TextEncoder=="function"?new TextEncoder:void 0,$N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Fi=Array.prototype.slice.call($N),Pa=(e=>{let t={};return e.forEach((r,n)=>t[r]=n),t})(Fi),HN=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,et=String.fromCharCode.bind(String),xx=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),Nx=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),Mx=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),Lx=e=>{let t,r,n,i,o="",s=e.length%3;for(let c=0;c<e.length;){if((r=e.charCodeAt(c++))>255||(n=e.charCodeAt(c++))>255||(i=e.charCodeAt(c++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|i,o+=Fi[t>>18&63]+Fi[t>>12&63]+Fi[t>>6&63]+Fi[t&63]}return s?o.slice(0,s-3)+"===".substring(s):o},up=typeof btoa=="function"?e=>btoa(e):In?e=>Buffer.from(e,"binary").toString("base64"):Lx,np=In?e=>Buffer.from(e).toString("base64"):e=>{let r=[];for(let n=0,i=e.length;n<i;n+=4096)r.push(et.apply(null,e.subarray(n,n+4096)));return up(r.join(""))},La=(e,t=!1)=>t?Nx(np(e)):np(e),KN=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?et(192|t>>>6)+et(128|t&63):et(224|t>>>12&15)+et(128|t>>>6&63)+et(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return et(240|t>>>18&7)+et(128|t>>>12&63)+et(128|t>>>6&63)+et(128|t&63)}},XN=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Dx=e=>e.replace(XN,KN),Tx=In?e=>Buffer.from(e,"utf8").toString("base64"):_x?e=>np(_x.encode(e)):e=>up(Dx(e)),Cn=(e,t=!1)=>t?Nx(Tx(e)):Tx(e),Cx=e=>Cn(e,!0),YN=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,JN=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),r=t-65536;return et((r>>>10)+55296)+et((r&1023)+56320);case 3:return et((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return et((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},Ux=e=>e.replace(YN,JN),Fx=e=>
276{if(e=e.replace(/\s+/g,""),!HN.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,r,n,i=[];for(let o=0;o<e.length;)t=Pa[e.charAt(o++)]<<18|Pa[e.charAt(o++)]<<12|(r=Pa[e.charAt(o++)])<<6|(n=Pa[e.charAt(o++)]),r===64?i.push(et(t>>16&255)):n===64?i.push(et(t>>16&255,t>>8&255)):i.push(et(t>>16&255,t>>8&255,t&255));return i.join("")},cp=typeof atob=="function"?e=>atob(Mx(e)):In?e=>Buffer.from(e,"base64").toString("binary"):Fx,Bx=In?e=>xx(Buffer.from(e,"base64")):e=>xx(cp(e).split("").map(t=>t.charCodeAt(0))),qx=e=>Bx(Gx(e)),QN=In?e=>Buffer.from(e,"base64").toString("utf8"):wx?e=>wx.decode(Bx(e)):e=>Ux(cp(e)),Gx=e=>Mx(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),ip=e=>QN(Gx(e)),ZN=e=>{if(typeof e!="string")return!1;let t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},Wx=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),jx=function(){let e=(t,r)=>Object.defineProperty(String.prototype,t,Wx(r));e("fromBase64",function(){return ip(this)}),e("toBase64",function(t){return Cn(this,t)}),e("toBase64URI",function(){return Cn(this,!0)}),e("toBase64URL",function(){return Cn(this,!0)}),e("toUint8Array",function(){return qx(this)})},Vx=function(){let e=(t,r)=>Object.defineProperty(Uint8Array.prototype,t,Wx(r));e("toBase64",function(t){return La(this,t)}),e("toBase64URI",function(){return La(this,!0)}),e("toBase64URL",function(){return La(this,!0)})},eM=()=>{jx(),Vx()},op={version:kx,VERSION:zN,atob:cp,atobPolyfill:Fx,btoa:up,btoaPolyfill:Lx,fromBase64:ip,toBase64:Cn,encode:Cn,encodeURI:Cx,encodeURL:Cx,utob:Dx,btou:Ux,decode:ip,isValid:ZN,fromUint8Array:La,toUint8Array:qx,extendString:jx,extendUint8Array:Vx,extendBuiltins:eM},fp=(function(e){Ix(t,e);function t(r,n){var i=e.call(this,n)||this;return i.statusCode=r,Object.setPrototypeOf(i,t.prototype),i}return t})(Error),Da=(function(e){Ix(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return t})(Error),zx=(function(){function e(t,r,n){this.deploymentKey=t,this.serverUrl=r,this.httpClient=n}return e.prototype.getVariants=function(t,r){return Ax(this,void 0,void 0,function(){var n,i,o,s;return Rx(this,function(c){switch(c.label){case 0:return n=op.encodeURL(JSON.stringify(t)),i={Authorization:"Api-Key ".concat(this.deploymentKey),"X-Amp-Exp-User":n},r?.flagKeys&&(i["X-Amp-Exp-Flag-Keys"]=op.encodeURL(JSON.stringify(r.flagKeys))),r?.trackingOption&&(i["X-Amp-Exp-Track"]=r.trackingOption),r?.exposureTrackingOption&&(i["X-Amp-Exp-Exposure-Track"]=r.exposureTrackingOption),o=new URL("".concat(this.serverUrl,"/sdk/v2/vardata?v=0")),r?.evaluationMode&&o.searchParams.append("eval_mode",r?.evaluationMode),r?.deliveryMethod&&o.searchParams.append("delivery_method",r?.deliveryMethod),[4,this.httpClient.request({requestUrl:o.toString(),method:"GET",headers:i,timeoutMillis:r?.timeoutMillis})];case 1:if(s=c.sent(),s.status!=200)throw new fp(s.status,"Fetch error response: status=".concat(s.status));return[2,JSON.parse(s.body)]}})})},e})(),$x=(function(){function e(t,r,n){this.deploymentKey=t,this.serverUrl=r,this.httpClient=n}return e.prototype.getFlags=function(t){return Ax(this,void 0,void 0,function(){var r,n,i;return Rx(this,function(o){switch(o.label){case 0:return r={Authorization:"Api-Key ".concat(this.deploymentKey)},t?.libraryName&&t?.libraryVersion&&(r["X-Amp-Exp-Library"]="".concat(t.libraryName,"/").concat(t.libraryVersion)),t?.user&&(r["X-Amp-Exp-User"]=op.encodeURL(JSON.stringify(t.user))),[4,this.httpClient.request({requestUrl:"".concat(this.serverUrl,"/sdk/v2/flags")+(t?.deliveryMethod?"?delivery_method=".concat(t.deliveryMethod):""),method:"GET",headers:r,timeoutMillis:t?.timeoutMillis})];case 1:if(n=o.sent(),n.status!=200)throw Error("Flags error response: status=".concat(n.status));return i=JSON.parse(n.body),[2,i.reduce(function(s,c){return s[c.key]=c,s},{})]}})})},e})(),Je=function(){if(typeof globalThis<"u"&&globalThis!==null)return globalThis;if(typeof window<"u"&&window!==null)return window;if(typeof self<"u"&&self!==null)return self;if(typeof global<"u"&&global!==null)return global},Sz=Je(),Hx=function(){var e=Je();if(e)try{var t="EXP_test";return e.localStorage.setItem(t,t),e.localStorage.removeItem(t),!0}catch{return!1}return!1},Ua=function(){var e;return(e=Je())===null||e===void 0?void 0:e.localStorage},An=function(){var e;return(e=Je())===null||e===void 0?void 0:e.sessionStorage},Kx=function(){var e;return(e=Je())===null||e===void 0?void 0:e.document},Xx=function(){var e=Je();return e?.fetch?e.fetch.bind(e):void 0},Fa=function(){var e=Je();return e?.setTimeout?e.setTimeout.bind(e):void 0},Yx=function(){var e=Je();return e?.clearTimeout?e.clearTimeout.bind(e):void 0},dp=function(){var e=Je();return e?.setInterval?e.setInterval.bind(e):void 0},hp=function(){var e=Je();return e?.clearInterval?e.clearInterval.bind(e):void 0},Jx=(function(){function e(t,r){this.poller=void 0,this.action=t,this.ms=r}return e.prototype.start=function(){var t=this;if(!this.poller){var r=dp();r&&(this.poller=r(function(){t.action()},this.ms),this.action())}},e.prototype.stop=function(){if(this.poller){var t=hp();t&&t(this.poller),this.poller=void 0}},e})();io();var aT=za(Qx()),xz=(function(){function e(t){this.amplitudeInstance=t}return e.prototype.getUser=function(){var t,r,n,i,o,s,c,l,u,a;return{device_id:(r=(t=this.amplitudeInstance)===null||t===void 0?void 0:t.options)===null||r===void 0?void 0:r.deviceId,user_id:(i=(n=this.amplitudeInstance)===null||n===void 0?void 0:n.options)===null||i===void 0?void 0:i.userId,version:(s=(o=this.amplitudeInstance)===null||o===void 0?void 0:o.options)===null||s===void 0?void 0:s.versionName,language:(l=(c=this.amplitudeInstance)===null||c===void 0?void 0:c.options)===null||l===void 0?void 0:l.language,platform:(a=(u=this.amplitudeInstance)===null||u===void 0?void 0:u.options)===null||a===void 0?void 0:a.platform,os:this.getOs(),device_model:this.getDeviceModel()}},e.prototype.getOs=function(){var t,r,n,i,o,s;return[(n=(r=(t=this.amplitudeInstance)===null||t===void 0?void 0:t._ua)===null||r===void 0?void 0:r.browser)===null||n===void 0?void 0:n.name,(s=(o=(i=this.amplitudeInstance)===null||i===void 0?void 0:i._ua)===null||o===void 0?void 0:o.browser)===null||s===void 0?void 0:s.major].filter(function(c){return c!=null}).join(" ")},e.prototype.getDeviceModel=function(){var t,r,n;return(n=(r=(t=this.amplitudeInstance)===null||t===void 0?void 0:t._ua)===null||r===void 0?void 0:r.os)===null||n===void 0?void 0:n.name},e})(),Tz=(function(){function e(t){this.amplitudeInstance=t}return e.prototype.track=function(t){this.amplitudeInstance.logEvent(t.name,t.properties)},e.prototype.setUserProperty=function(t){var r,n;this.amplitudeInstance.setUserProperties((r={},r[t.userProperty]=(n=t.variant)===null||n===void 0?void 0:n.value,r))},e.prototype.unsetUserProperty=function(t){var r;this.amplitudeInstance._logEvent("$identify",null,null,{$unset:(r={},r[t.userProperty]="-",r)})},e})(),Ie=function(){return Ie=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Ie.apply(this,arguments)};function $e(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function c(a){try{u(n.next(a))}catch(h){s(h)}}function l(a){try{u(n.throw(a))}catch(h){s(h)}}function u(a){a.done?o(a.value):i(a.value).then(c,l)}u((n=n.apply(e,t||[])).next())})}function He(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=c(0),s.throw=c(1),s.return=c(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(u){return function(a){return l([u,a])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(a){u=[6,a],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function nr(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);
276if(e&&typeof e.length=="number")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.")}function it(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(c){s={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function At(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var Zx=function(e,t){var r,n;t===void 0&&(t=!1);var i=gp(e,t),o=void 0,s=Kx();if(s){var c=s.cookie.split("; ");try{for(var l=nr(c),u=l.next();!u.done;u=l.next()){var a=u.value,h=it(a.split("=",2),2),f=h[0],d=h[1];f===i&&(o=decodeURIComponent(d))}}catch(y){r={error:y}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}if(o)try{if(t){var p=atob(o);return JSON.parse(decodeURIComponent(p))}var v=o.split("."),g=void 0;return v.length>=2&&v[1]&&(g=atob(v[1])),{deviceId:v[0],userId:g}}catch{return}}},tM=function(e){var t=gp(e,!0);try{var r=Ua();if(!r)return;var n=r.getItem(t);if(!n)return;var i=JSON.parse(n);return typeof i!="object"?void 0:i}catch{return}},rM=function(e){var t=gp(e,!0);try{var r=An();if(!r)return;var n=r.getItem(t);if(!n)return;var i=JSON.parse(n);return typeof i!="object"?void 0:i}catch{return}},gp=function(e,t){if(t)return e?.length<10?void 0:"AMP_".concat(e.substring(0,10));if(!(e?.length<6))return"amp_".concat(e.substring(0,6))},nM=(function(){function e(t,r,n){this.type="integration",this.apiKey=t,this.identityStore=r.identityStore,this.eventBridge=r.eventBridge,this.contextProvider=r.applicationContextProvider,this.timeoutMillis=n,this.loadPersistedState(),n<=0&&(this.setup=void 0)}return e.prototype.setup=function(t,r){return $e(this,void 0,void 0,function(){return He(this,function(n){return t?.automaticFetchOnAmplitudeIdentityChange&&this.identityStore.addIdentityListener(function(){r?.fetch()}),[2,this.waitForConnectorIdentity(this.timeoutMillis)]})})},e.prototype.getUser=function(){var t=this.identityStore.getIdentity();return{user_id:t.userId,device_id:t.deviceId,user_properties:t.userProperties,version:this.contextProvider.versionName}},e.prototype.track=function(t){return this.eventBridge.receiver?(this.eventBridge.logEvent({eventType:t.eventType,eventProperties:t.eventProperties}),!0):!1},e.prototype.loadPersistedState=function(){if(!this.apiKey||this.apiKey.startsWith("client-"))return!1;var t=Zx(this.apiKey,!0);return t?(this.commitIdentityToConnector(t),!0):(t=Zx(this.apiKey,!1),t?(this.commitIdentityToConnector(t),!0):(t=tM(this.apiKey),t?(this.commitIdentityToConnector(t),!0):(t=rM(this.apiKey),t?(this.commitIdentityToConnector(t),!0):!1)))},e.prototype.commitIdentityToConnector=function(t){var r=this.identityStore.editIdentity();r.setDeviceId(t.deviceId),t.userId&&r.setUserId(t.userId),r.commit()},e.prototype.waitForConnectorIdentity=function(t){return $e(this,void 0,void 0,function(){var r,n=this;return He(this,function(i){return r=this.identityStore.getIdentity(),!r.userId&&!r.deviceId?[2,Promise.race([new Promise(function(o){var s=function(){o(),n.identityStore.removeIdentityListener(s)};n.identityStore.addIdentityListener(s)}),new Promise(function(o,s){var c=Fa();if(!c){s("Timed out waiting for Amplitude Analytics SDK to initialize.");return}c(s,t,"Timed out waiting for Amplitude Analytics SDK to initialize.")})])]:[2]})})},e})();function iM(e,t){return t=t||{},new Promise(function(r,n){var i=new XMLHttpRequest,o=[],s=[],c={},l=function(){return{ok:(i.status/100|0)==2,statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(JSON.parse(i.responseText))},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:l,headers:{keys:function(){return o},entries:function(){return s},get:function(a){return c[a.toLowerCase()]},has:function(a){return a.toLowerCase()in c}}}};for(var u in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(a,h,f){o.push(h=h.toLowerCase()),s.push([h,f]),c[h]=c[h]?c[h]+","+f:f}),r(l())},i.onerror=n,i.withCredentials=t.credentials=="include",t.headers)i.setRequestHeader(u,t.headers[u]);i.send(t.body||null)})}var oM=Xx()||iM,sM=function(e,t){return t==null||t<=0?e:new Promise(function(r,n){var i=Fa();i&&i(function(){n(new Da("Request timeout after ".concat(t," milliseconds")))},t),e.then(r,n)})},aM=function(e,t,r,n,i){var o=function(){return $e(void 0,void 0,void 0,function(){var s,c,l;return He(this,function(u){switch(u.label){case 0:return[4,oM(e,{method:t,headers:r,body:n})];case 1:return s=u.sent(),l={status:s.status},[4,s.text()];case 2:return c=(l.body=u.sent(),l),[2,c]}})})};return sM(o(),i)},lM=(function(){function e(t){this.client=t}return e.prototype.request=function(t){return $e(this,void 0,void 0,function(){return He(this,function(r){switch(r.label){case 0:return[4,this.client.request(t.requestUrl,t.method,t.headers,null,t.timeoutMillis)];case 1:return[2,r.sent()]}})})},e})(),lT={request:aM},Ft;(function(e){e[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"})(Ft||(Ft={}));var rr;(function(e){e.LocalStorage="localStorage",e.InitialVariants="initialVariants"})(rr||(rr={}));var Ye;(function(e){e.LocalStorage="storage",e.InitialVariants="initial",e.SecondaryLocalStorage="secondary-storage",e.SecondaryInitialVariants="secondary-initial",e.FallbackInline="fallback-inline",e.FallbackConfig="fallback-config",e.LocalEvaluation="local-evaluation"})(Ye||(Ye={}));var eT=function(e){return!e||e===Ye.FallbackInline||e===Ye.FallbackConfig||e===Ye.SecondaryInitialVariants},Br={debug:!1,logLevel:Ft.Error,loggerProvider:null,instanceName:"$default_instance",fallbackVariant:{},initialVariants:{},initialFlags:void 0,source:rr.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:lT},tT="1.22.0",uM=512,cM=(function(){function e(t,r){var n=this,i;this.isReady=new Promise(function(s){n.resolve=s}),this.config=t,this.client=r;var o=(i=t.instanceName)!==null&&i!==void 0?i:Br.instanceName;this.queue=new dM(o),this.cache=new fM(o)}return e.prototype.ready=function(){return this.integration?this.isReady:Prom
276ise.resolve()},e.prototype.setIntegration=function(t){var r=this;this.integration&&this.integration.teardown&&this.integration.teardown(),this.integration=t,t.setup?this.integration.setup(this.config,this.client).then(function(){r.queue.setTracker(r.integration.track.bind(t)),r.resolve()},function(){r.queue.setTracker(r.integration.track.bind(t)),r.resolve()}):(this.queue.setTracker(this.integration.track.bind(t)),this.resolve())},e.prototype.getUser=function(){return this.integration?this.integration.getUser():{}},e.prototype.track=function(t,r){if(this.cache.shouldTrack(t,r)){var n=this.getExposureEvent(t);this.queue.push(n)}},e.prototype.getExposureEvent=function(t){var r,n,i,o={eventType:"$exposure",eventProperties:t};return!((r=t.metadata)===null||r===void 0)&&r.exposureEvent?o={eventType:(n=t.metadata)===null||n===void 0?void 0:n.exposureEvent,eventProperties:t}:((i=t.metadata)===null||i===void 0?void 0:i.deliveryMethod)==="web"&&(o={eventType:"$impression",eventProperties:t}),o},e})(),fM=(function(){function e(t){this.isSessionStorageAvailable=hM(),this.inMemoryCache={},this.identity={},this.storageKey="EXP_sent_v3_".concat(t);var r=An();this.isSessionStorageAvailable&&r&&(r.removeItem("EXP_sent_".concat(t)),r.removeItem("EXP_sent_v2_".concat(t)))}return e.prototype.shouldTrack=function(t,r){var n,i;if(((n=t.metadata)===null||n===void 0?void 0:n.deliveryMethod)==="web")return!0;var o={userId:r?.user_id,deviceId:r?.device_id};this.identityEquals(this.identity,o)||this.clearCache(),this.identity=o,this.loadCache();var s=t.flag_key in this.inMemoryCache,c=this.inMemoryCache[t.flag_key],l=(i=t.variant)!==null&&i!==void 0?i:null,u=c??null,a=!1;return(!s||u!==l)&&(a=!0,this.inMemoryCache[t.flag_key]=l),this.storeCache(),a},e.prototype.clearCache=function(){this.inMemoryCache={};var t=An();this.isSessionStorageAvailable&&t&&t.removeItem(this.storageKey)},e.prototype.identityEquals=function(t,r){return t.userId&&r.userId?t.userId===r.userId:!t.userId&&!r.userId?t.deviceId===r.deviceId:!1},e.prototype.loadCache=function(){var t=An();if(this.isSessionStorageAvailable&&t){var r=t.getItem(this.storageKey);this.inMemoryCache=r?JSON.parse(r):{}}},e.prototype.storeCache=function(){var t=An();if(this.isSessionStorageAvailable&&t)try{t.setItem(this.storageKey,JSON.stringify(this.inMemoryCache))}catch{}},e})(),dM=(function(){function e(t,r){r===void 0&&(r=uM),this.isLocalStorageAvailable=Hx(),this.inMemoryQueue=[],this.storageKey="EXP_unsent_".concat(t),this.maxQueueSize=r}return e.prototype.push=function(t){this.loadQueue(),this.inMemoryQueue.push(t),this.flush(),this.storeQueue()},e.prototype.setTracker=function(t){var r=this;this.tracker=t;var n=dp();n&&(this.poller=n(function(){r.loadFlushStore()},1e3)),this.loadFlushStore()},e.prototype.flush=function(){if(this.tracker&&this.inMemoryQueue.length!==0){for(var t=0;t<this.inMemoryQueue.length;t++)try{if(!this.tracker(this.inMemoryQueue[t]))break}catch{break}if(this.inMemoryQueue=this.inMemoryQueue.slice(t),this.inMemoryQueue.length===0&&this.poller){var r=hp();r&&r(this.poller),this.poller=void 0}}},e.prototype.loadQueue=function(){var t=Ua();if(this.isLocalStorageAvailable&&t){var r=t.getItem(this.storageKey);this.inMemoryQueue=r?JSON.parse(r):[]}},e.prototype.storeQueue=function(){var t=Ua();this.isLocalStorageAvailable&&t&&(this.inMemoryQueue.length>this.maxQueueSize&&(this.inMemoryQueue=this.inMemoryQueue.slice(this.inMemoryQueue.length-this.maxQueueSize)),t.setItem(this.storageKey,JSON.stringify(this.inMemoryQueue)))},e.prototype.loadFlushStore=function(){this.loadQueue(),this.flush(),this.storeQueue()},e})(),hM=function(){var e=Je();if(e)try{var t="EXP_test";return e.sessionStorage.setItem(t,t),e.sessionStorage.removeItem(t),!0}catch{return!1}return!1},pM=(function(){function e(t,r){r===void 0&&(r=Ft.Error),this.logger=t,this.logLevel=r}return e.prototype.error=function(t){for(var r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];this.logLevel>=Ft.Error&&(r=this.logger).error.apply(r,At([t],it(n),!1))},e.prototype.warn=function(t){for(var r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];this.logLevel>=Ft.Warn&&(r=this.logger).warn.apply(r,At([t],it(n),!1))},e.prototype.info=function(t){for(var r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];this.logLevel>=Ft.Info&&(r=this.logger).info.apply(r,At([t],it(n),!1))},e.prototype.debug=function(t){for(var r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];this.logLevel>=Ft.Debug&&(r=this.logger).debug.apply(r,At([t],it(n),!1))},e.prototype.verbose=function(t){for(var r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];this.logLevel>=Ft.Verbose&&(r=this.logger).verbose.apply(r,At([t],it(n),!1))},e})(),vM=(function(){function e(){}return e.prototype.error=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];console.error.apply(console,At([t],it(r),!1))},e.prototype.warn=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];console.warn.apply(console,At([t],it(r),!1))},e.prototype.info=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];console.info.apply(console,At([t],it(r),!1))},e.prototype.debug=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];console.debug.apply(console,At([t],it(r),!1))},e.prototype.verbose=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];console.debug.apply(console,At([t],it(r),!1))},e})(),qa=(function(){function e(){this.globalScope=Je()}return e.prototype.get=function(t){var r;return(r=this.globalScope)===null||r===void 0?void 0:r.localStorage.getItem(t)},e.prototype.put=function(t,r){var n;(n=this.globalScope)===null||n===void 0||n.localStorage.setItem(t,r)},e.prototype.delete=function(t){var r;(r=this.globalScope)===null||r===void 0||r.localStorage.removeItem(t)},e})(),gM=function(e,t,r){var n=e.substring(e.length-6),i="amp-exp-".concat(t,"-").concat(n);return new uT(i,r,cT)},mM=function(e,t,r){r===void 0&&(r=new qa);var n=e.substring(e.length-6),i="amp-exp-".concat(t,"-").concat(n,"-flags");return new uT(i,r)},yM=function(e,t,r){r===void 0&&(r=new qa);var n=e.substring(e.length-6),i="amp-exp-".concat(t,"-").concat(n,"-variants-options");return new bM(i,r)},bM=(function(){function e(t,r){this.namespace=t,this.storage=r}return e.prototype.get=function(){return this.value},e.prototype.put=function(t){this.value=t},e.prototype.load=function(){var t=this.storage.get(this.namespace);t&&(this.value=JSON.parse(t))},e.prototype.store=function(){this.value===void 0?this.storage.delete(this.namespace):this.storage.put(this.namespace,JSON.stringify(this.value))},e})(),uT=(function(){function e(t,r,n){this.cache={},this.namespace=t,this.storage=r,this.transformer=n}return e.prototype.get=function(t){return this.cache[t]},e.prototype.getAll=function(){return Ie({},this.cache)},e.prototype.put=function(t,r){this.cache[t]=r},e.prototype.putAll=function(t){var r,n;try{for(var i=nr(Object.keys(t)),o=i.next();!o.done;o=i.next()){var s=o.value;this.cache[s]=t[s]}}catch(c){r={error:c}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e.prototype.remove=function(t){delete this.cache[t]},e.prototype.clear=function(){this.cache={}},e.prototype.load=function(){var t,r,n=this.storage.get(this.namespace),i;try{i=JSON.parse(n)||{}}catch{return}var o={};try{for(var s=nr(Object.keys(i)),c=s.next();!c.done;c=s.next()){var l=c.value;try{var u=void 0;this.transformer?u=this.transformer(i[l]):u=i[l],u&&(o[l]=u)}catch{}}}catch(a){t={error:a}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}this.clear(),this.putAll(o)},e.prototype.store=function(t){t===void 0&&(t=this.cache),this.storage.put(this.namespace,JSON.stringify(t))},e})(),cT=function(e){if(typeof e=="string")return{key:e,value:e};if(typeof e=="object"){var t=e.key,r=e.value,n=e.payload,i=e.metadata,o=e.expKey;i&&i.experimentKey?o=i.experimentKey:o&&(i=i||{},i.experimentKey=o);var s={};return t?s.key=t:r&&(s.key=r),r&&(s.value=r),i&&(s.metadata=i),n&&(s.payload=n),o&&(s.expKey=o),s}},fT=(function(){function e(){this.globalScope=Je()}return e.prototype.get=function(t){var r;return(r=this.globalScope)===null||r===void 0?void 0:r.sessionStorage.getItem(t)},e.prototype.put=function(t,r){var n;(n=this.globalScope)===null||n===void 0||n.sessionStorage.setItem(t,r)},e.prototype.delete=function(t){var r;(r=this.globalScope)===null||r===void 0||r.sessionStorage.removeItem(t)},e})(),SM=function(e,t,r,n){var i,o="[Experiment] Exposure",s=r?.value,c="[Experiment] ".concat(t);return{name:o,user:e,key:t,variant:r,userProperty:c,properties:{key:t,variant:s,source:n},userProperties:(i={},i[c]=s,i)}},Ut=function(e){return e==null},pp=function(e){return Ut(e)?!0:e&&Object.keys(e).length===0},EM=function(e){var t,r;if(!e||typeof e!="object")return{};var n={};try{for(var i=nr(Object.entries(e)),o=i.next();!o.done;o=i.next()){var s=it(o.value,2),c=s[0],l=s[1];Ut(l)||(n[c]=l)}}catch(u){t={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n},rT=function(e){var t;return((t=e?.metadata)===null||t===void 0?void 0:t.evaluationMode)==="local"},wM=(function(){function e(t,r,n,i){this.started=!1,this.done=!1,this.attempts=t,this.min=r,this.max=n,this.scalar=i}return e.prototype.start=function(t){return $e(this,void 0,void 0,function(){return He(this,function(r){switch(r.label){case 0:if(!this.started)this.started=!0;else throw Error("Backoff already started");return[4,this.backoff(t,0,this.min)];case 1:return r.sent(),[2]}})})},e.prototype.cancel=function(){this.done=!0;var t=Yx();t&&t(this.timeoutHandle)},e.prototype.backoff=function(t,r,n){return $e(this,void 0,void 0,function(){var i,o=this;return He(this,function(s){return this.done?[2]:(i=Fa(),i?(this.timeoutHandle=i(function(){(function(){return $e(o,void 0,void 0,function(){var c,l;return He(this,function(u){switch(u.label){case 0:return u.trys.push([0,2,,5]),[4,t()];case 1:return u.sent(),[3,5];case 2:return u.sent(),c=r+1,c<this.attempts?(l=Math.min(n*this.scalar,this.max),[4,this.backoff(t,c,l)]):[3,4];case 3:u.sent(),u.label=4;case 4:return[3,5];case 5:return[2]}})})})()},n),[2]):[2])})})},e})(),nT=function(e){var t,r,n,i;if(!e)return{};var o={user:e},s=Je();s?.location&&(o.page={url:s.location.href});var c={};if(!e.groups)return o;try{for(var l=nr(Object.keys(e.groups)),u=l.next();!u.done;u=l.next()){var a=u.value,h=e.groups[a];if(h.length>0&&h[0]){var f=h[0],d={group_name:f},p=(i=(n=e.group_properties)===null||n===void 0?void 0:n[a])===null||i===void 0?void 0:i[f];p&&Object.keys(p).length>0&&(d.group_properties=p),c[a]=d}}}
vendor: 5,409 bytes, line 276
276catch(v){t={error:v}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}return Object.keys(c).length>0&&(o.groups=c),delete o.user.groups,delete o.user.group_properties,o},lt=function(e){return e==null?{}:typeof e=="string"?{key:e,value:e}:e},iT=function(e){if(!e)return{};var t=void 0;e.metadata&&(t=e.metadata.experimentKey);var r={};return e.key&&(r.key=e.key),e.value&&(r.value=e.value),e.payload&&(r.payload=e.payload),t&&(r.expKey=t),e.metadata&&(r.metadata=e.metadata),r},_M=(function(){function e(t){this.setProperties={},this.unsetProperties={},this.analyticsProvider=t}return e.prototype.track=function(t){this.setProperties[t.key]!=t.variant.value&&(this.setProperties[t.key]=t.variant.value,delete this.unsetProperties[t.key],this.analyticsProvider.track(t))},e.prototype.setUserProperty=function(t){this.setProperties[t.key]!=t.variant.value&&this.analyticsProvider.setUserProperty(t)},e.prototype.unsetUserProperty=function(t){this.unsetProperties[t.key]||(this.unsetProperties[t.key]="unset",delete this.setProperties[t.key],this.analyticsProvider.unsetUserProperty(t))},e})(),xM=(function(){function e(t){this.tracked={},this.identity={},this.exposureTrackingProvider=t}return e.prototype.track=function(t,r){var n={userId:r?.user_id,deviceId:r?.device_id};this.identityEquals(this.identity,n)||(this.tracked={}),this.identity=n;var i=t.flag_key in this.tracked,o=this.tracked[t.flag_key];i&&o===t.variant||(this.tracked[t.flag_key]=t.variant,this.exposureTrackingProvider.track(t))},e.prototype.identityEquals=function(t,r){return t.userId===r.userId&&t.deviceId===r.deviceId},e})(),TM=1e4,CM=8,IM=500,AM=1e4,RM=1.5,oT=6e4,OM="https://api.lab.eu.amplitude.com",PM="https://flag.lab.eu.amplitude.com",kM=(function(){function e(t,r){var n=this,i,o,s,c,l;this.engine=new Ox,this.isRunning=!1,this.apiKey=t,r=EM(r),this.config=Ie(Ie(Ie({},Br),r),{serverUrl:r?.serverUrl||(((i=r?.serverZone)===null||i===void 0?void 0:i.toLowerCase())==="eu"?OM:Br.serverUrl),flagsServerUrl:r?.flagsServerUrl||(((o=r?.serverZone)===null||o===void 0?void 0:o.toLowerCase())==="eu"?PM:Br.flagsServerUrl),flagConfigPollingIntervalMillis:r.flagConfigPollingIntervalMillis<oT?oT:(s=r.flagConfigPollingIntervalMillis)!==null&&s!==void 0?s:Br.flagConfigPollingIntervalMillis}),this.logger=new pM(this.config.loggerProvider||new vM,e.getLogLevel(r));var u=(c=this.config)===null||c===void 0?void 0:c.internalInstanceNameSuffix;if(this.isWebExperiment=u==="web",this.poller=new Jx(function(){return $e(n,void 0,void 0,function(){var v;return He(this,function(g){switch(g.label){case 0:return g.trys.push([0,2,,3]),[4,this.doFlags()];case 1:return g.sent(),[3,3];case 2:return v=g.sent(),this.logger.info(v),[3,3];case 3:return[2]}})})},this.config.flagConfigPollingIntervalMillis),this.config.initialVariants)for(var a in this.config.initialVariants)this.config.initialVariants[a]=cT(this.config.initialVariants[a]);this.config.userProvider&&(this.userProvider=this.config.userProvider),this.config.analyticsProvider&&(this.analyticsProvider=new _M(this.config.analyticsProvider)),this.config.exposureTrackingProvider&&(this.userSessionExposureTracker=new xM(this.config.exposureTrackingProvider)),this.integrationManager=new cM(this.config,this);var h=new lM(this.config.httpClient||lT);this.flagApi=new $x(this.apiKey,this.config.flagsServerUrl,h),this.evaluationApi=new zx(this.apiKey,this.config.serverUrl,h);var f,d=u?"".concat(this.config.instanceName,"-").concat(String(u)):this.config.instanceName;if(this.isWebExperiment){var p=(l=this.config)===null||l===void 0?void 0:l.internalCacheStorage;f=p??new fT}else f=new qa;this.variants=gM(this.apiKey,d,f),this.flags=mM(this.apiKey,d,f),this.fetchVariantsOptions=yM(this.apiKey,d,f);try{this.flags.load(),this.variants.load(),this.fetchVariantsOptions.load()}catch{}this.mergeInitialFlagsWithStorage()}return e.prototype.start=function(t){return $e(this,void 0,void 0,function(){var r,n,i,o;return He(this,function(s){switch(s.label){case 0:if(this.isRunning)return[2];this.isRunning=!0,this.setUser(t),s.label=1;case 1:return s.trys.push([1,6,,7]),r=this.doFlags(),n=(o=this.config.fetchOnStart)!==null&&o!==void 0?o:!0,n?[4,Promise.all([this.fetch(t),r])]:[3,3];case 2:return s.sent(),[3,5];case 3:return[4,r];case 4:s.sent(),s.label=5;case 5:return[3,7];case 6:if(i=s.sent(),this.config.throwOnError)throw i;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 $e(this,arguments,void 0,function(t,r){var n;return t===void 0&&(t=this.user),He(this,function(i){switch(i.label){case 0:this.setUser(t||{}),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.fetchInternal(t,this.config.fetchTimeoutMillis,this.config.retryFetchOnFailure,r)];case 2:return i.sent(),[3,4];case 3:if(n=i.sent(),this.config.throwOnError)throw n;return n instanceof Da?this.logger.debug(n):this.logger.error(n),[3,4];case 4:return[2,this]}})})},e.prototype.variant=function(t,r){var n,i;if(!this.apiKey)return{value:void 0};var o=this.variantAndSource(t,r);return this.config.automaticExposureTracking&&this.exposureInternal(t,o),this.logger.debug("[Experiment] variant for ".concat(t," is ").concat(((n=o.variant)===null||n===void 0?void 0:n.key)||((i=o.variant)===null||i===void 0?void 0:i.value))),o.variant||{}}
vendor: 4,778 bytes, line 276
276,e.prototype.exposure=function(t){var r=this.variantAndSource(t);this.exposureInternal(t,r)},e.prototype.all=function(){if(!this.apiKey)return{};var t=this.evaluate();for(var r in t){var n=this.flags.get(r);rT(n)||delete t[r]}return Ie(Ie(Ie({},this.secondaryVariants()),this.sourceVariants()),t)},e.prototype.clear=function(){this.variants.clear();try{this.variants.store()}catch{}},e.prototype.getUser=function(){var t;if(!this.user)return this.user;if(!((t=this.user)===null||t===void 0)&&t.user_properties){var r=Ie({},this.user.user_properties);return Ie(Ie({},this.user),{user_properties:r})}else return Ie({},this.user)},e.prototype.setUser=function(t){var r;if(!t){this.user=null;return}if(!((r=this.user)===null||r===void 0)&&r.user_properties){var n=Ie({},t.user_properties);this.user=Ie(Ie({},t),{user_properties:n})}else this.user=Ie({},t)},e.prototype.getUserProvider=function(){return this.userProvider},e.prototype.setUserProvider=function(t){return this.userProvider=t,this},e.prototype.mergeInitialFlagsWithStorage=function(){var t=this;if(this.config.initialFlags){var r=JSON.parse(this.config.initialFlags);r.forEach(function(n){t.flags.get(n.key)||t.flags.put(n.key,n)})}},e.prototype.evaluate=function(t){var r,n,i=this.addContext(this.user),o=lp(this.flags.getAll(),t),s=nT(i),c=this.engine.evaluate(s,o),l={};try{for(var u=nr(Object.keys(c)),a=u.next();!a.done;a=u.next()){var h=a.value;l[h]=iT(c[h])}}catch(f){r={error:f}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return l},e.prototype.getEvaluationTraces=function(t){var r=this.addContext(this.user),n=lp(this.flags.getAll(),t),i=nT(r),o=this.engine.evaluateWithTraces(i,n).traces;return o},e.prototype.variantAndSource=function(t,r){var n={};this.config.source===rr.LocalStorage?n=this.localStorageVariantAndSource(t,r):this.config.source===rr.InitialVariants&&(n=this.initialVariantsVariantAndSource(t,r));var i=this.flags.get(t);return(rT(i)||!n.variant&&i)&&(n=this.localEvaluationVariantAndSource(t,i,r)),n},e.prototype.localEvaluationVariantAndSource=function(t,r,n){var i,o={},s=this.evaluate([r.key])[t],c=Ye.LocalEvaluation,l=(i=s?.metadata)===null||i===void 0?void 0:i.default;if(!Ut(s)&&!l)return{variant:lt(s),source:c,hasDefaultVariant:!1};if(l&&(o={variant:lt(s),source:c,hasDefaultVariant:!0}),!Ut(n))return{variant:lt(n),source:Ye.FallbackInline,hasDefaultVariant:o.hasDefaultVariant};var u=this.config.initialVariants[t];if(!Ut(u))return{variant:lt(u),source:Ye.SecondaryInitialVariants,hasDefaultVariant:o.hasDefaultVariant};var a=lt(this.config.fallbackVariant),h={variant:a,source:Ye.FallbackConfig,hasDefaultVariant:o.hasDefaultVariant};return pp(a)?o:h},e.prototype.localStorageVariantAndSource=function(t,r){var n,i={},o=this.variants.get(t),s=(n=o?.metadata)===null||n===void 0?void 0:n.default;if(!Ut(o)&&!s)return{variant:lt(o),source:Ye.LocalStorage,hasDefaultVariant:!1};if(s&&(i={variant:lt(o),source:Ye.LocalStorage,hasDefaultVariant:!0}),!Ut(r))return{variant:lt(r),source:Ye.FallbackInline,hasDefaultVariant:i.hasDefaultVariant};var c=this.config.initialVariants[t];if(!Ut(c))return{variant:lt(c),source:Ye.SecondaryInitialVariants,hasDefaultVariant:i.hasDefaultVariant};var l=lt(this.config.fallbackVariant),u={variant:l,source:Ye.FallbackConfig,hasDefaultVariant:i.hasDefaultVariant};return pp(l)?i:u},e.prototype.initialVariantsVariantAndSource=function(t,r){var n,i={},o=this.config.initialVariants[t];if(!Ut(o))return{variant:lt(o),source:Ye.InitialVariants,hasDefaultVariant:!1};var s=this.variants.get(t),c=(n=s?.metadata)===null||n===void 0?void 0:n.default;if(!Ut(s)&&!c)return{variant:lt(s),source:Ye.LocalStorage,hasDefaultVariant:!1};if(c&&(i={variant:lt(s),source:Ye.LocalStorage,hasDefaultVariant:!0}),!Ut(r))return{variant:lt(r),source:Ye.FallbackInline,hasDefaultVariant:i.hasDefaultVariant};var l=lt(this.config.fallbackVariant),u={variant:l,source:Ye.FallbackConfig,hasDefaultVariant:i.hasDefaultVariant};return pp(l)?i:u},e.prototype.fetchInternal=function(t,r,n,i){return $e(this,void 0,void 0,function(){var o,s,c;return He(this,function(l){switch(l.label){case 0:if(!this.apiKey)throw Error("Experiment API key is empty");this.logger.debug("[Experiment] Fetch all: retry=".concat(String(n))),n&&this.stopRetries(),l.label=1;case 1:return l.trys.push([1,4,,5]),[4,this.doFetch(t,r,Ie({trackingOption:(c=this.fetchVariantsOptions.get())===null||c===void 0?void 0:c.trackingOption},i))];case 2:return o=l.sent(),[4,this.storeVariants(o,i)];case 3:return l.sent(),[2,o];case 4:throw s=l.sent(),n&&this.shouldRetryFetch(s)&&this.startRetries(t,i),s;case 5:return[2]}})})},e.prototype.setTracksAssignment=function(t){return $e(this,void 0,void 0,function(){return He(this,function(r){return this.fetchVariantsOptions.put(
276Ie(Ie({},this.fetchVariantsOptions.get()||{}),{trackingOption:t?"track":"no-track"})),this.fetchVariantsOptions.store(),[2]})})},e.prototype.cleanUserPropsForFetch=function(t){var r=Ie({},t);return delete r.cookie,r},e.prototype.doFetch=function(t,r,n){return $e(this,void 0,void 0,function(){var i,o,s,c,l,u,a;return He(this,function(h){switch(h.label){case 0:return[4,this.addContextOrWait(t)];case 1:return t=h.sent(),t=this.cleanUserPropsForFetch(t),this.logger.debug("[Experiment] Fetch variants for user: ",t),[4,this.evaluationApi.getVariants(t,Ie({timeoutMillis:r},n))];case 2:i=h.sent(),o={};try{for(s=nr(Object.keys(i)),c=s.next();!c.done;c=s.next())l=c.value,o[l]=iT(i[l])}catch(f){u={error:f}}finally{try{c&&!c.done&&(a=s.return)&&a.call(s)}finally{if(u)throw u.error}}return this.logger.debug("[Experiment] Received variants: ",o),[2,o]}})})},e.prototype.doFlags=function(){return $e(this,void 0,void 0,function(){var t,r,n;return He(this,function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),t=void 0,this.isWebExperiment?[4,this.addContextOrWait(this.getUser())]:[3,2];case 1:t=i.sent(),i.label=2;case 2:return[4,this.flagApi.getFlags({libraryName:"experiment-js-client",libraryVersion:tT,timeoutMillis:this.config.fetchTimeoutMillis,deliveryMethod:this.isWebExperiment?"web":void 0,user:t?.user_id||t?.device_id?{user_id:t?.user_id,device_id:t?.device_id}:void 0})];case 3:return r=i.sent(),this.flags.clear(),this.flags.putAll(r),[3,5];case 4:if(n=i.sent(),n instanceof Da){if(this.logger.debug(n),this.config.throwOnError)throw n}else throw n;return[3,5];case 5:try{this.flags.store()}catch{}return this.mergeInitialFlagsWithStorage(),[2]}})})},e.prototype.storeVariants=function(t,r){return $e(this,void 0,void 0,function(){var n,i,o,l,s,c,l,u,a;return He(this,function(h){n=r&&r.flagKeys?r.flagKeys:[],n.length===0&&this.variants.clear(),i=function(f){n=n.filter(function(d){return d!==f}),o.variants.put(f,t[f])},o=this;for(l in t)i(l);try{for(s=nr(n),c=s.next();!c.done;c=s.next())l=c.value,this.variants.remove(l)}catch(f){u={error:f}}finally{try{c&&!c.done&&(a=s.return)&&a.call(s)}finally{if(u)throw u.error}}try{this.variants.store()}catch{}return this.logger.debug("[Experiment] Stored variants: ",t),[2]})})},e.prototype.startRetries=function(t,r){return $e(this,void 0,void 0,function(){var n=this;return He(this,function(i){return this.logger.debug("[Experiment] Retry fetch"),this.retriesBackoff=new wM(CM,IM,AM,RM),this.retriesBackoff.start(function(){return $e(n,void 0,void 0,function(){return He(this,function(o){switch(o.label){case 0:return[4,this.fetchInternal(t,TM,!1,r)];case 1:return o.sent(),[2]}})})}),[2]})})},e.prototype.stopRetries=function(){this.retriesBackoff&&this.retriesBackoff.cancel()},e.prototype.addContext=function(t){var r,n=(r=this.userProvider)===null||r===void 0?void 0:r.getUser(),i=this.integrationManager.getUser(),o=Ie(Ie(Ie({},n?.user_properties),i.user_properties),t?.user_properties);return Ie(Ie(Ie(Ie({library:"experiment-js-client/".concat(tT)},n),i),t),{user_properties:o})},e.prototype.addContextOrWait=function(t){return $e(this,void 0,void 0,function(){return He(this,function(r){switch(r.label){case 0:return[4,this.integrationManager.ready()];case 1:return r.sent(),[2,this.addContext(t)]}})})},e.prototype.sourceVariants=function(){if(this.config.source==rr.LocalStorage)return this.variants.getAll();if(this.config.source==rr.InitialVariants)return this.config.initialVariants},e.prototype.secondaryVariants=function(){if(this.config.source==rr.LocalStorage)return this.config.initialVariants;if(this.config.source==rr.InitialVariants)return this.variants.getAll()},e.prototype.exposureInternal=function(t,r){var n,i,o,s,c,l,u,a,h,f=(o=(i=(n=r.variant)===null||n===void 0?void 0:n.metadata)===null||i===void 0?void 0:i.trackExposure)!==null&&o!==void 0?o:!0;if(f){this.legacyExposureInternal(t,r.variant,r.source);var d={flag_key:t},p=eT(r.source);if(!(p&&!r.hasDefaultVariant)){!((s=r.variant)===null||s===void 0)&&s.expKey&&(d.experiment_key=(c=r.variant)===null||c===void 0?void 0:c.expKey);var v=(l=r.variant)===null||l===void 0?void 0:l.metadata;if(!p&&!v?.default&&(!((u=r.variant)===null||u===void 0)&&u.key?d.variant=r.variant.key:!((a=r.variant)===null||a===void 0)&&a.value&&(d.variant=r.variant.value)),v&&(d.metadata=v),this.isWebExperiment&&(d.time=Date.now()),this.isWebExperiment){var g=Je();if(g?.location)try{var y=g.location.href;d.metadata.url=y.split("?")[0]||""}catch{}}var m=this.addContext(this.getUser());(h=this.userSessionExposureTracker)===null||h===void 0||h.track(d,m),this.integrationManager.track(d,m)}}},e.prototype.legacyExposureInternal=function(t,r,n){var i,o,s,c,l;if(this.analyticsProvider){var u=this.addContext(this.getUser()),a=SM(u,t,r,n);eT(n)||!r?.value?(o=(i=this.analyticsProvider)===null||i===void 0?void 0:i.unsetUserProperty)===null||o===void 0||o.call(i,a):r?.value&&((c=(s=this.analyticsProvider)===null||s===void 0?void 0:s.setUserProperty)===null||c===void 0||c.c
276all(s,a),(l=this.analyticsProvider)===null||l===void 0||l.track(a))}},e.getLogLevel=function(t){var r;return t.debug===!0?Ft.Debug:(r=t.logLevel)!==null&&r!==void 0?r:Ft.Error},e.prototype.shouldRetryFetch=function(t){return t instanceof fp?t.statusCode<400||t.statusCode>=500||t.statusCode===429:!0},e.prototype.addPlugin=function(t){t.type==="integration"&&this.integrationManager.setIntegration(t)},e})(),NM=(function(){function e(t,r){var n,i,o;this.globalScope=Je(),this.userAgent=typeof((n=this.globalScope)===null||n===void 0?void 0:n.navigator)<"u"?(i=this.globalScope)===null||i===void 0?void 0:i.navigator.userAgent:void 0,this.ua=new aT.UAParser(this.userAgent).getResult(),this.localStorage=new qa,this.sessionStorage=new fT,this.userProvider=t,this.apiKey=r,this.storageKey="EXP_".concat((o=this.apiKey)===null||o===void 0?void 0:o.slice(0,10),"_DEFAULT_USER_PROVIDER")}return e.prototype.getUser=function(){var t,r,n,i,o,s=((t=this.userProvider)===null||t===void 0?void 0:t.getUser())||{};return Ie({language:this.getLanguage(),platform:"Web",os:this.getOs(this.ua),device_model:this.getDeviceModel(this.ua),device_category:(n=(r=this.ua.device)===null||r===void 0?void 0:r.type)!==null&&n!==void 0?n:"desktop",referring_url:(o=(i=this.globalScope)===null||i===void 0?void 0:i.document)===null||o===void 0?void 0:o.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},s)},e.prototype.getLanguage=function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},e.prototype.getOs=function(t){var r,n;return[(r=t.browser)===null||r===void 0?void 0:r.name,(n=t.browser)===null||n===void 0?void 0:n.major].filter(function(i){return i!=null}).join(" ")},e.prototype.getDeviceModel=function(t){var r;return(r=t.os)===null||r===void 0?void 0:r.name},e.prototype.getBrowser=function(t){var r,n=(r=t.browser)===null||r===void 0?void 0:r.name;return n?.includes("Chrom")&&(n="Chrome"),n?.includes("Firefox")&&(n="Firefox"),n?.includes("Safari")&&(n="Safari"),n?.includes("Edge")&&(n="Edge"),n?.includes("Opera")&&(n="Opera"),n},e.prototype.getCookie=function(){var t,r,n,i,o;if(!((r=(t=this.globalScope)===null||t===void 0?void 0:t.document)===null||r===void 0)&&r.cookie)return Object.fromEntries((o=(i=(n=this.globalScope)===null||n===void 0?void 0:n.document)===null||i===void 0?void 0:i.cookie)===null||o===void 0?void 0:o.split("; ").map(function(s){return s.split("=")}))},e.prototype.getLandingUrl=function(){var t,r;try{var n=JSON.parse(this.sessionStorage.get(this.storageKey)||"{}");return n.landing_url||(n.landing_url=(r=(t=this.globalScope)===null||t===void 0?void 0:t.location)===null||r===void 0?void 0:r.href.replace(/\/$/,""),this.sessionStorage.put(this.storageKey,JSON.stringify(n))),n.landing_url}catch{return}},e.prototype.getFirstSeen=function(){try{var t=JSON.parse(this.localStorage.get(this.storageKey)||"{}");return t.first_seen||(t.first_seen=(Date.now()/1e3).toString(),this.localStorage.put(this.storageKey,JSON.stringify(t))),t.first_seen}catch{return}},e.prototype.getUrlParam=function(){var t,r,n;if(this.globalScope){var i={};try{var o=new URL(this.globalScope.location.href);try{for(var s=nr(o.searchParams),c=s.next();!c.done;c=s.next()){var l=it(c.value,2),u=l[0],a=l[1];i[u]=At(At([],it((n=i[u])!==null&&n!==void 0?n:[]),!1),it(a.split(",")),!1)}}catch(h){t={error:h}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}}catch{return}return Object.entries(i).reduce(function(h,f){var d=it(f,2),p=d[0],v=d[1];return h[p]=v.length==1?v[0]:v,h},{})}},e})(),vp,Gi=Je();Gi&&(Gi.experimentInstances={});var sT=(vp=Gi?.experimentInstances)!==null&&vp!==void 0?vp:{};var dT=function(e,t){var r=function(){return new nM(e,Wr.getInstance(hT(t)),1e4)};return DM(e,t,r)},hT=function(e){return e?.instanceName||Br.instanceName},MM=function(e,t){var r=hT(t),n=t?.internalInstanceNameSuffix;return n?"".concat(r,".").concat(e,".").concat(String(n)):"".concat(r,".").concat(e)},LM=function(e,t){return new kM(e,Ie(Ie({},t),{userProvider:new NM(t?.userProvider,e)}))},DM=function(e,t,r){var n=MM(e,t),i=sT[n];
276return i||(i=LM(e,t),r&&i.addPlugin(r()),sT[n]=i,i)};var Cz=(function(){function e(){}return e.prototype.getUser=function(){return{}},e.prototype.start=function(t){return $e(this,void 0,void 0,function(){return He(this,function(r){return[2]})})},e.prototype.stop=function(){},e.prototype.setUser=function(t){},e.prototype.fetch=function(t,r){return $e(this,void 0,void 0,function(){return He(this,function(n){return[2,this]})})},e.prototype.getUserProvider=function(){return null},e.prototype.setUserProvider=function(t){return this},e.prototype.variant=function(t,r){return Br.fallbackVariant},e.prototype.all=function(){return{}},e.prototype.clear=function(){},e.prototype.exposure=function(t){},e})(),Iz=(function(){function e(){this.store=new Map}return e.prototype.get=function(t){return this.store.get(t)},e.prototype.put=function(t,r){this.store.set(t,r)},e.prototype.delete=function(t){this.store.delete(t)},e})();var Rn=(function(){function e(t){this.name=e.pluginName,this.config=t}return e.prototype.setup=function(t,r){var n;return O(this,void 0,void 0,function(){return R(this,function(i){return this.experiment=dT(((n=this.config)===null||n===void 0?void 0:n.deploymentKey)||t.apiKey,this.config),[2]})})},e.pluginName="@amplitude/experiment-analytics-plugin",e})();var mp=function(e){return new Rn(e)};var UM=(function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:FM(),platform:"Web",os:void 0,deviceModel:void 0}},e})(),FM=function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},BM=(function(){function e(){this.queue=[]}return e.prototype.logEvent=function(t){this.receiver?this.receiver(t):this.queue.length<512&&this.queue.push(t)},e.prototype.setEventReceiver=function(t){this.receiver=t,this.queue.length>0&&(this.queue.forEach(function(r){t(r)}),this.queue=[])},e})(),gr=function(){return gr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},gr.apply(this,arguments)};function Ga(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")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.")}function pT(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(c){s={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}var Wa=function(e,t){var r,n,i=["string","number","boolean","undefined"],o=typeof e,s=typeof t;if(o!==s)return!1;try{for(var c=Ga(i),l=c.next();!l.done;l=c.next()){var u=l.value;if(u===o)return e===t}}catch(g){r={error:g}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}if(e==null&&t==null)return!0;if(e==null||t==null||e.length!==t.length)return!1;var a=Array.isArray(e),h=Array.isArray(t);if(a!==h)return!1;if(a&&h){for(var f=0;f<e.length;f++)if(!Wa(e[f],t[f]))return!1}else{var d=Object.keys(e).sort(),p=Object.keys(t).sort();if(!Wa(d,p))return!1;var v=!0;return Object.keys(e).forEach(function(g){Wa(e[g],t[g])||(v=!1)}),v}return!0},qM="$set",GM="$unset",WM="$clearAll";Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n});var jM=(function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var t=this,r=gr({},this.identity.userProperties),n=gr(gr({},this.identity),{userProperties:r});return{setUserId:function(i){return n.userId=i,this},setDeviceId:function(i){return n.deviceId=i,this},setUserProperties:function(i){return n.userProperties=i,this},setOptOut:function(i){return n.optOut=i,this},updateUserProperties:function(i){var o,s,c,l,u,a,h=n.userProperties||{};try{for(var f=Ga(Object.entries(i)),d=f.next();!d.done;d=f.next()){var p=pT(d.value,2),v=p[0],g=p[1];switch(v){case qM:try{for(var y=(c=void 0,Ga(Object.entries(g))),m=y.next();!m.done;m=y.next()){var E=pT(m.value,2),w=E[0],b=E[1];h[w]=b}}catch(x){c={error:x}}finally{try{m&&!m.done&&(l=y.return)&&l.call(y)}finally{if(c)throw c.error}}break;case GM:try{for(var S=(u=void 0,Ga(Object.keys(g))),_=S.next();!_.done;_=S.next()){var w=_.value;delete h[w]}}catch(x){u={error:x}}finally{try{_&&!_.done&&(a=S.return)&&a.call(S)}finally{if(u)throw u.error}}break;case WM:h={};break}}}catch(x){o={error:x}}finally{try{d&&!d.done&&(s=f.return)&&s.call(f)}finally{if(o)throw o.error}}return n.userProperties=h,this},commit:function(){return t.setIdentity(n),this}}},e.prototype.getIdentity=function(){return gr({},this.identity)},e.prototype.setIdentity=function(t){var r=gr({},this.identity);this.identity=gr({}
276,t),Wa(r,this.identity)||this.listeners.forEach(function(n){n(t)})},e.prototype.addIdentityListener=function(t){this.listeners.add(t)},e.prototype.removeIdentityListener=function(t){this.listeners.delete(t)},e})(),Wi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:self,VM=(function(){function e(){this.identityStore=new jM,this.eventBridge=new BM,this.applicationContextProvider=new UM}return e.getInstance=function(t){return Wi.analyticsConnectorInstances||(Wi.analyticsConnectorInstances={}),Wi.analyticsConnectorInstances[t]||(Wi.analyticsConnectorInstances[t]=new e),Wi.analyticsConnectorInstances[t]},e})(),vT=["boot"],zM="$default_instance",yp=Symbol.for("amplitude-engagement-plugin-caller");function $M(e){var t,r,n,i,o,s,c,l,u,a,h;let f=typeof window<"u"?window.engagement:void 0,d=!1,p={_q:(t=f?._q)!=null?t:[],_configuration:{apiKey:(n=(r=f?._configuration)==null?void 0:r.apiKey)!=null?n:"",serverUrl:(i=f?._configuration)==null?void 0:i.serverUrl,chatUrl:(o=f?._configuration)==null?void 0:o.chatUrl,mediaUrl:(s=f?._configuration)==null?void 0:s.mediaUrl,serverZone:(l=(c=f?._configuration)==null?void 0:c.serverZone)!=null?l:"US",autoRefreshIntervalSeconds:(u=f?._configuration)==null?void 0:u.autoRefreshIntervalSeconds,integrations:(a=f?._configuration)==null?void 0:a.integrations,options:{...(h=f?._configuration)==null?void 0:h.options}},init(g,y){var m,E,w,b;if(p._configuration.apiKey){console.log("Engagement SDK has already been initialized. Ignoring additional init call.");return}if(y?.skip===!0){console.log("Engagement SDK init skipped via `skip: true`. The SDK bundle will not be loaded."),d=!0;return}if(d&&(p._q.length=0),d=!1,y!=null&&y.useEngagementDomain){let C=((m=y.serverZone)!=null?m:p._configuration.serverZone)==="EU",k="amplitudeengagement.com";y.serverUrl||(y.serverUrl=C?`https://gs.eu.${k}`:`https://gs.${k}`),y.chatUrl||(y.chatUrl=C?`https://houston-chat.eu.${k}`:`https://houston-chat.${k}`),y.mediaUrl||(y.mediaUrl=C?`https://engagement-static.eu.${k}`:`https://engagement-static.${k}`),y.cdnUrl||(y.cdnUrl=C?`https://cdn.eu.${k}`:`https://cdn.${k}`)}p._configuration={...p._configuration,...y,apiKey:g,options:{splitting:!0,...p._configuration.options,...y?.options}},(w=(E=p._configuration)==null?void 0:E.options)!=null&&w.logger&&p._configuration.options.logger.enable((b=p._configuration.options.logLevel)!=null?b:2);let S;if(y!=null&&y.cdnUrl)p._configuration.options.splitting?S=`${y.cdnUrl}/engagement-browser/prod/split/index.js`:S=y.cdnUrl+"/engagement-browser/prod/index.min.js.gz";else{let C=p._configuration.serverZone==="EU"?"https://cdn.eu.amplitude.com":"https://cdn.amplitude.com";p._configuration.options.splitting?S=`${C}/engagement-browser/prod/split/index.js`:S=`${C}/engagement-browser/prod/index.min.js.gz`}let _=null,x=()=>{if(d=!0,_&&(clearTimeout(_),_=null),p._q&&p._q.length>0)for(console.warn(`Engagement SDK failed to load within ${I}ms. Resolving pending calls gracefully.`);p._q.length>0;){let C=p._q.shift();if(!C)continue;let k=C[0],N=vT.includes(k);if(console.warn(`Engagement SDK method '${k}' still in queue (isAsyncMethod=${N}); attempting to resolve as no-op.`),N&&C[1]instanceof Function&&C[2]instanceof Function){let T=C[1];console.warn(`Engagement SDK method '${k}' resolved as no-op due to script loading failure`),T(void 0)}}};e(S,p._configuration.options.splitting?"module":void 0,y?.nonce,x);let I=1e4;_=setTimeout(()=>{x()},I)},plugin(g){let y=p.init,m=g?.token,E=g?.skip===!0,w=(b,S,_)=>{let x=_.getIdentity(),I=typeof m=="function"?m():m;return{user_id:b.getUserId(),device_id:b.getDeviceId(),version:S.appVersion,user_properties:x.userProperties,getSessionId:b.getSessionId,...I?{token:I}:{}}};return{name:"@amplitude/engagement-browser",type:"enrichment",async setup(b,S){var _;if(E){y(b.apiKey,{skip:!0});return}let x=(_=b.instanceName)!=null?_:zM,I=VM.getInstance(x).identityStore;p._configuration._installedViaPlugin=!0,y(b.apiKey,{serverZone:b.serverZone,...g,options:{logLevel:b.logLevel,logger:b.loggerProvider,...g?.options}});let C=[{track:k=>{S.track(k)}}];await window.engagement.boot({user:()=>w(S,b,I),integrations:C},yp),I.addIdentityListener(k=>{var N,T,F,D;if(!((N=window.engagement)!=null&&N._.user)||!((T=window.engagement)!=null&&T._analytics.hasBooted)){console.warn("Engagement SDK not booted. Ignoring identity change.");return}((D=(F=window.engagement)==null?void 0:F._.user)==null?void 0:D.user_id
276)!==k.userId?(window.engagement.shutdown(yp),window.engagement.boot({user:()=>w(S,b,I),integrations:C},yp)):window.engagement._setUserProperties(k.userProperties)})},async execute(b){return E||window.engagement.forwardEvent(b),b}}}},v=p;return new Proxy(p,{get:function(g,y){if(y in v)return v[y];if(y!=="then")return y==="gs"||y==="rc"||y==="assistant"?new Proxy({},{get:function(m,E){return function(){let w=Array.from(arguments),b=`${y}.${E}`;w.unshift(b),p._q.push(w)}}}):vT.includes(y)?function(){let m=Array.prototype.slice.call(arguments);return new Promise((E,w)=>{m.unshift(y,E,w),p._q.push(m),d&&E(void 0)})}:function(){let m=Array.prototype.slice.call(arguments);m.unshift(y),p._q.push(m)}}})}var mT=(e=>(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))(mT||{}),HM=e=>{if(typeof window<"u"&&window.opener)for(let t of Object.values(mT))window.opener.postMessage({message:e},t)};function KM(e,t,r,n){for(let i of e){let o=document.createElement("script");o.src=i,o.id="engagement-sdk-bundle",r&&o.setAttribute("nonce",r),t&&o.setAttribute("type",t),n&&(o.onerror=n);let s=document.getElementsByTagName("head")[0];s&&s.appendChild(o)}}var XM=()=>(HM("ENGAGEMENT_SNIPPET"),$M((e,t,r,n)=>KM([e||"https://cdn.amplitude.com/engagement-browser/prod/index.min.js.gz"],t,r,n))),gT=XM();var yT=e=>(typeof window<"u"&&!window.engagement&&(window.engagement=gT),gT.plugin(e));z();var bT="1.1.29";var YM="amplitude-ts-unified",ST=function(){return{type:"enrichment",name:"@amplitude/unified-library-plugin",execute:function(e){var t;return O(this,void 0,void 0,function(){return R(this,function(r){return e.library="".concat(YM,"/").concat(bT,"-").concat((t=e.library)!==null&&t!==void 0?t:""),[2,e]})})}}};var ET=(function(e){De(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.sessionReplay=function(){return this._sessionReplay},t.prototype.experiment=function(){if(this.config!==void 0){var r=this.plugins(Rn);if(r.length===0){this.config.loggerProvider.debug("".concat(Rn.pluginName," plugin is not found."));return}else{if(r.length===1)return r[0].experiment;this.config.loggerProvider.debug("Multiple instances of ".concat(Rn.pluginName," are found."));return}}},t.prototype.initAll=function(r,n){return O(this,void 0,void 0,function(){var i=this;return R(this,function(o){return this._initAllPromise?[2,this._initAllPromise]:(this._initAllPromise=(function(){return O(i,void 0,void 0,function(){var s,c;return R(this,function(l){switch(l.label){case 0:return s={serverZone:n?.serverZone,instanceName:n?.instanceName},e.prototype.add.call(this,ST()),[4,e.prototype.init.call(this,r,P(P({},n?.analytics),s)).promise];case 1:return l.sent(),[4,e.prototype.add.call(this,Oa(P(P({},n?.sessionReplay),s))).promise];case 2:return l.sent(),[4,e.prototype.add.call(this,mp(P(P({},n?.experiment),s))).promise];case 3:return l.sent(),c=this.plugin(Ui.pluginName),c===void 0?this.config.loggerProvider.debug("".concat(Ui.pluginName," plugin is not found.")):this._sessionReplay=c.sessionReplay,[4,e.prototype.add.call(this,yT(P(P({},n?.engagement),s))).promise];case 4:return l.sent(),[2]}})})})().finally(function(){i._initAllPromise=void 0}),[2,this._initAllPromise])})})},t.prototype.init=function(r,n,i){r===void 0&&(r="");var o=e.prototype.init.call(this,r,n,i);return o},t})(pi);ee();var JM=function(){var e=new ET;return{_setDiagnosticsSampleRate:Z(e._setDiagnosticsSampleRate.bind(e),"_setDiagnosticsSampleRate",le(e),ue(e,["config"])),experiment:Z(e.experiment.bind(e),"experiment",le(e),ue(e,["config"])),sessionReplay:Z(e.sessionReplay.bind(e),"sessionReplay",le(e),ue(e,["config"])),initAll:Z(e.initAll.bind(e),"initAll",le(e),ue(e,["config"])),init:Z(e.init.bind(e),"init",le(e),ue(e,["config"])),add:Z(e.add.bind(e),"add",le(e),ue(e,["config.apiKey","timeline.plugins"])),remove:Z(e.remove.bind(e),"remove",le(e),ue(e,["config.apiKey","timeline.plugins"])),track:Z(e.track.bind(e),"track",le(e),ue(e,["config.apiKey","timeline.queue.length"])),logEvent:Z(e.logEvent.bind(e),"logEvent",le(e),ue(e,["config.apiKey","timeline.queue.length"])),identify:Z(e.identify.bind(e),"identify",le(e),ue(e,["config.apiKey","timeline.queue.length"])),groupIdentify:Z(e.groupIdentify.bind(e),"groupIdentify",le(e),ue(e,["config.apiKey","timeline.queue.length"])),setGroup:Z(e.setGroup.bind(e),"setGroup",le(e),ue(e,["config.apiKey","timeline.queue.length"])),revenue:Z(e.revenue.bind(e),"revenue",le(e),ue(e,["config.apiKey","timeline.queue.length"])),flush:Z(e.flush.bind(e),"flush",le(e),ue(e,["config.apiKey","timeline.queue.length"])),getUserId:Z(e.getUserId.bind(e),"getUserId",le(e),ue(e,["config","config.userId"])),setUserId:Z(e.setUserId.bind(e),"setUserId",le(e),ue(e,["config","config.userId"])),getDeviceId:Z(e.getDeviceId.bind(e),"getDeviceId",le(e),ue(e,["config","config.deviceId"])),setDeviceId:Z(e.setDeviceId.bind(e),"setDeviceId",le(e),ue(e,["config","config.deviceId"])),reset:Z(e.reset.bind(e),"reset",le(e),ue(e,["config","config.userId","config.deviceId"])),getSessionId:Z(e.getSessionId.bind(e),"getSessionId",le(e),ue(e,["config"])),setSessionId:Z(e.setSessionId.bind(e),"setSessionId",le(e),ue(e,["config"])),extendSession:Z(e.extendSession.bind(e),"extendSession",le(e),ue(e,["config"])),setOptOut:Z(e.setOptOut.bind(e),"setOptOut",le(e),ue(e,["config"])),getOptOut:Z(e.getOptOut.bind(e),"getOptOut",le(e),ue(e,["config"])),setTransport:Z(e.setTransport.bind(e),"setTransport",le(e),ue(e,["config"])),getIdentity:Z(e.getIdentity.bind(e),"getIdentity",le(e),ue(e,["config"])),setIdentity:Z(e.setIdentity.bind(e),"setIdentity",le(e),ue(e,["config","config.userId","config.deviceId"]))}},Pe=JM();var Yz=Pe._setDiagnosticsSampleRate,wT=Pe.initAll,Jz=Pe.experiment,Qz=Pe.sessionReplay,Zz=Pe.add,e$=Pe.extendSession,bp=Pe.flush,t$=Pe.getDeviceId,r$=Pe.getIdentity,n$=Pe.getOptOut,i$=Pe.getSessionId,o$=Pe.getUserId,s$=Pe.groupIdentify,_T=Pe.identify,a$=Pe.logEvent,l$=Pe.remove,u$=Pe.reset,c$=Pe.revenue,f$=Pe.setDeviceId,d$=Pe.setGroup,h$=Pe.setIdentity,p$=Pe.setOptOut,v$=Pe.setSessionId,g$=Pe.setTransport,m$=Pe.setUserId,xT=Pe.track;var ZM="60c9c6a241aa453dd5457e0eead44960";
276wT(ZM,{analytics:{autocapture:!0},sessionReplay:{sampleRate:1}});var e1=[[/(^|\.)google\./,"Google"],[/(^|\.)bing\./,"Bing"],[/duckduckgo\./,"DuckDuckGo"],[/(^|\.)search\.yahoo\./,"Yahoo"],[/ecosia\./,"Ecosia"],[/search\.brave\./,"Brave"],[/baidu\./,"Baidu"],[/yandex\./,"Yandex"],[/qwant\./,"Qwant"],[/startpage\./,"Startpage"]],t1=[[/chatgpt\.com|chat\.openai\.com|openai\./,"ChatGPT"],[/perplexity\./,"Perplexity"],[/claude\.ai|anthropic\./,"Claude"],[/gemini\.google\.|bard\.google\./,"Gemini"],[/copilot\.microsoft\./,"Copilot"],[/grok\.com|x\.ai/,"Grok"],[/you\.com/,"You.com"]],r1=/facebook\.|instagram\.|reddit\.|(^|\.)t\.co$|twitter\.|(^|\.)x\.com$|linkedin\.|pinterest\.|tiktok\.|youtube\.|threads\./,n1=/^(cpc|ppc|paid|paidsocial|paid_social|paid-social|display|banner|retargeting)$/i,i1=e=>{try{return new URL(e).hostname.replace(/^www\./,"")}catch{return""}},Sp=(e,t)=>{for(let[r,n]of e)if(r.test(t))return n;return""};function o1(e){let t=e.replace(/\.html$/,"").replace(/\/+$/,"")||"/",r={"/":"home","/advertise":"advertise","/claim":"claim","/own":"own","/play":"play","/faq":"faq","/privacy":"privacy","/guide":"guide_index"};if(r[t])return{page_type:r[t]};let n=/^\/guide\/(.+)$/.exec(t);if(!n)return{page_type:"other"};let i=n[1],o;return(o=/^(i-[\w]+)-(.+)-exit-(.+)$/.exec(i))?{page_type:"guide_exit",highway:o[1].toUpperCase(),state:o[2],exit:o[3]}:(o=/^best-stops-(i-[\w]+)-(.+)$/.exec(i))?{page_type:"guide_best_stops",highway:o[1].toUpperCase(),state:o[2]}:(o=/^rest-areas-(i-[\w]+)-(.+)$/.exec(i))?{page_type:"guide_rest_areas",highway:o[1].toUpperCase(),state:o[2]}:(o=/^(.+)-on-(i-[\w]+)$/.exec(i))?{page_type:"guide_brand",brand:o[1],highway:o[2].toUpperCase()}:(o=/^(i-[\w]+)-(.+)$/.exec(i))?{page_type:"guide_corridor",highway:o[1].toUpperCase(),state:o[2]}:{page_type:"guide_state",state:i}}function s1(){let e=new URLSearchParams(location.search),t=e.get("utm_source")||"",r=e.get("utm_medium")||"",n=e.get("utm_campaign")||"",i=document.referrer||"",o=i1(i),s=location.hostname.replace(/^www\./,"");if(o&&o===s&&!t)return null;let c={referring_domain:o||"(direct)",utm_source:t,utm_medium:r,utm_campaign:n},l=Sp(e1,o),u=Sp(t1,o);return r&&n1.test(r)?c.channel="paid":t?c.channel="campaign":u?(c.channel="ai_assistant",c.search_engine=u):l?(c.channel="seo",c.search_engine=l):e.get("biz")?c.channel="outreach":o&&r1.test(o)?c.channel="social":o?c.channel="referral":c.channel="direct",c}var CT=(e,t)=>{try{return JSON.parse(e.getItem(t)||"null")}catch{return null}},IT=(e,t,r)=>{try{e.setItem(t,JSON.stringify(r))}catch{}},Pn=o1(location.pathname),ct=s1();ct?(ct.landing_page=location.pathname,ct.landing_page_type=Pn.page_type,IT(sessionStorage,"ps-attr",ct)):ct=CT(sessionStorage,"ps-attr")||{channel:"direct",referring_domain:"(direct)"};var ji=CT(localStorage,"ps-attr-first");ji||(ji={first_channel:ct.channel,first_search_engine:ct.search_engine||"",first_landing_page:ct.landing_page||location.pathname,first_landing_page_type:ct.landing_page_type||Pn.page_type},IT(localStorage,"ps-attr-first",ji));var AT=/iPhone|iPad|iPod/i.test(navigator.userAgent)?"ios":/Android/i.test(navigator.userAgent)?"android":"desktop_other",a1=()=>({...ji,...ct,...Pn,page_path:location.pathname,platform:AT}),On=(e,t)=>{xT(e,{...a1(),...t})};window.psTrack=On;var ja=new dt;for(let[e,t]of Object.entries(ji))ja.setOnce(e,t);ja.setOnce("first_seen",new Date().toISOString().slice(0,10));for(let[e,t]of Object.entries({channel:ct.channel,search_engine:ct.search_engine||"",referring_domain:ct.referring_domain,landing_page_type:ct.landing_page_type||Pn.page_type,platform:AT}))t&&ja.set(e,t);_T(ja);On("Site Page Viewed");Pn.page_type==="advertise"&&On("Viewed Advertise Page");var l1=[[/apps\.apple\.com|itunes\.apple\.com/,"ios_app_store"],[/docs\.google\.com\/forms|groups\.google\.com\/g\/pit-stop-android-beta|play\.google\.com/,"android_beta"]];function TT(e){return e.closest(".stickycta")?"sticky_bar":e.closest(".pitch")?"inline_pitch":e.closest("#beta")?"beta_section":e.closest("nav")?"nav":e.closest("footer")?"footer":e.closest(".hero")?"hero":e.closest(".claimbox")?"claimbox":e.closest("#upsell")||e.id==="upsell-btn"?"game_upsell":"body"}if(Pn.page_type==="claim"){let e=new URLSearchParams(location.search),t={hwy:e.get("hwy")||"",exit_state:e.get("state")||"",exit_ref:e.get("exit")||"",from_outreach:!!e.get("biz")},r={},n=(s,c)=>{r[s]||(r[s]=1,On(s,{...t,...c}))};setTimeout(()=>{let s=document.getElementById("takenbox");t.exit_ref&&n("Claim Availability Checked",{exit_available:!s||s.classList.contains("hidden")})},2500);let i=()=>(document.querySelector('input[name="plan"]:checked')||{}).value||"monthly",o=window.fetch.bind(window);window.fetch=function(s,c){let l=o(s,c);try{let u=String(typeof s=="string"?s:s&&s.url||""),a=String(c&&c.body||"");/\/api\/own\?action=checkout/.test(u)?(n("Claim Checkout Started",{plan:i()}),bp()):/\/api\/sponsor\?action=claim\b/.test(u)&&n(/waitlist/.test(a)?"Waitlist Joined":"Claim Lead Captured",{plan:i()})}catch{}return l}}addEventListener("click",e=>{let t=e.target&&e.target.closest&&e.target.closest(".stickycta");if(!t||e.target.closest("a"))return;let r=t.querySelector(".applink");r&&r.click()});addEventListener("click",e=>{let t=e.target&&e.target.closest&&e.target.closest("a[href]");if(!t)return;let r=t.getAttribute("href")||"",n=(t.textContent||"").trim().slice(0,60),i=Sp(l1,r);if(i){On("Store Link Clicked",{store:i,placement:TT(t),link_text:n,destination:r}),bp();return}(/^\/claim(\?|#|$)/.test(r)||/^\/advertise(\?|#|$)/.test(r))&&On("Advertise CTA Clicked",{cta:TT(t),link_text:n,destination:r.split("?")[0]})},!0);})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.