@launchdarkly/session-replay 1.1.22 → 1.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,14 +1,14 @@
1
- (function(Le,Vt){typeof exports=="object"&&typeof module<"u"?Vt(exports):typeof define=="function"&&define.amd?define(["exports"],Vt):(Le=typeof globalThis<"u"?globalThis:Le||self,Vt(Le.SessionReplay={}))})(this,function(Le){"use strict";var Vt=Object.defineProperty,za=(e,t,s)=>t in e?Vt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,ze=(e,t,s)=>za(e,typeof t!="symbol"?t+"":t,s),Ha=(e,t,s)=>new Promise((n,r)=>{var a=h=>{try{f(s.next(h))}catch(m){r(m)}},d=h=>{try{f(s.throw(h))}catch(m){r(m)}},f=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,d);f((s=s.apply(e,t)).next())});const tr=Object.create(null),we=(e,t,...s)=>{const n=`[@launchdarkly plugins]: (${e}): `;console[t].apply(console,[n,...s]),Pa(n,...s)},lt=(e,t,s,...n)=>{tr[`${e}-${t}`]||(tr[`${e}-${t}`]=!0,we(e,s,...n))},Pa=(e,...t)=>Ha(void 0,null,function*(){try{const{LDObserve:s}=yield Promise.resolve().then(()=>vm);s.recordLog(`${e}${t}`,"warn")}catch{}});class sr{constructor(t,s){ze(this,"debug"),ze(this,"name"),this.debug=t,this.name=s}log(...t){if(this.debug){let s=`[${Date.now()}]`;this.name&&(s+=` - ${this.name}`),console.log.apply(console,[s,...t])}}warn(...t){let s=`[${Date.now()}]`;this.name&&(s+=` - ${this.name}`),console.warn.apply(console,[s,...t])}}class Bs{constructor(){ze(this,"_sdk"),ze(this,"_isLoaded",!1),ze(this,"_callBuffer",[]),ze(this,"_capacity",1e5),ze(this,"_droppedEvents",0),ze(this,"_exceededCapacity",!1),ze(this,"_logger",new sr)}_bufferCall(t,s){if(this._isLoaded)try{return this._sdk[t](...s)}catch(n){we(`Error executing buffered call to ${t}:`,"error",n)}else{this._enqueue({method:t,args:s});return}}_enqueue(t){this._callBuffer.length<this._capacity?(this._callBuffer.push(t),this._exceededCapacity=!1):(this._exceededCapacity||(this._exceededCapacity=!0,we("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this._droppedEvents+=1)}load(t){this._sdk=t,this._isLoaded=!0;for(const{method:s,args:n}of this._callBuffer)try{this._sdk[s](...n)}catch(r){we(`Error executing buffered call to ${s}:`,"error",r)}this._callBuffer=[]}}var Da=Object.defineProperty,Ba=Object.defineProperties,Qa=Object.getOwnPropertyDescriptors,Dt=Object.getOwnPropertySymbols,nr=Object.prototype.hasOwnProperty,ir=Object.prototype.propertyIsEnumerable,Qs=(e,t,s)=>t in e?Da(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,ne=(e,t)=>{for(var s in t||(t={}))nr.call(t,s)&&Qs(e,s,t[s]);if(Dt)for(var s of Dt(t))ir.call(t,s)&&Qs(e,s,t[s]);return e},Bt=(e,t)=>Ba(e,Qa(t)),Gt=(e,t)=>{var s={};for(var n in e)nr.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(e!=null&&Dt)for(var n of Dt(e))t.indexOf(n)<0&&ir.call(e,n)&&(s[n]=e[n]);return s},Rt=(e,t,s)=>Qs(e,typeof t!="symbol"?t+"":t,s),at=(e,t,s)=>new Promise((n,r)=>{var a=h=>{try{f(s.next(h))}catch(m){r(m)}},d=h=>{try{f(s.throw(h))}catch(m){r(m)}},f=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,d);f((s=s.apply(e,t)).next())});function Qt(e,t){throw new Error(t)}function ja(e){return typeof e=="object"&&e!==null}function Aa(e,t){throw new Error("Unexpected invariant triggered.")}const _a=/\r\n|[\n\r]/g;function js(e,t){let s=0,n=1;for(const r of e.body.matchAll(_a)){if(typeof r.index=="number"||Aa(),r.index>=t)break;s=r.index+r[0].length,n+=1}return{line:n,column:t+1-s}}function $a(e){return rr(e.source,js(e.source,e.start))}function rr(e,t){const s=e.locationOffset.column-1,n="".padStart(s)+e.body,r=t.line-1,a=e.locationOffset.line-1,d=t.line+a,f=t.line===1?s:0,h=t.column+f,m=`${e.name}:${d}:${h}
2
- `,p=n.split(/\r\n|[\n\r]/g),o=p[r];if(o.length>120){const l=Math.floor(h/80),i=h%80,c=[];for(let u=0;u<o.length;u+=80)c.push(o.slice(u,u+80));return m+or([[`${d} |`,c[0]],...c.slice(1,l+1).map(u=>["|",u]),["|","^".padStart(i)],["|",c[l+1]]])}return m+or([[`${d-1} |`,p[r-1]],[`${d} |`,o],["|","^".padStart(h)],[`${d+1} |`,p[r+1]]])}function or(e){const t=e.filter(([n,r])=>r!==void 0),s=Math.max(...t.map(([n])=>n.length));return t.map(([n,r])=>n.padStart(s)+(r?" "+r:"")).join(`
3
- `)}function qa(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}let ec=class Ea extends Error{constructor(t,...s){var n,r,a;const{nodes:d,source:f,positions:h,path:m,originalError:p,extensions:o}=qa(s);super(t),this.name="GraphQLError",this.path=m??void 0,this.originalError=p??void 0,this.nodes=lr(Array.isArray(d)?d:d?[d]:void 0);const l=lr((n=this.nodes)===null||n===void 0?void 0:n.map(c=>c.loc).filter(c=>c!=null));this.source=f??(l==null||(r=l[0])===null||r===void 0?void 0:r.source),this.positions=h??l?.map(c=>c.start),this.locations=h&&f?h.map(c=>js(f,c)):l?.map(c=>js(c.source,c.start));const i=ja(p?.extensions)?p?.extensions:void 0;this.extensions=(a=o??i)!==null&&a!==void 0?a:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),p!=null&&p.stack?Object.defineProperty(this,"stack",{value:p.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Ea):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const s of this.nodes)s.loc&&(t+=`
1
+ (function(Le,Vt){typeof exports=="object"&&typeof module<"u"?Vt(exports):typeof define=="function"&&define.amd?define(["exports"],Vt):(Le=typeof globalThis<"u"?globalThis:Le||self,Vt(Le.SessionReplay={}))})(this,function(Le){"use strict";var Vt=Object.defineProperty,Pa=(e,t,s)=>t in e?Vt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,ze=(e,t,s)=>Pa(e,typeof t!="symbol"?t+"":t,s),Da=(e,t,s)=>new Promise((n,r)=>{var l=h=>{try{f(s.next(h))}catch(m){r(m)}},d=h=>{try{f(s.throw(h))}catch(m){r(m)}},f=h=>h.done?n(h.value):Promise.resolve(h.value).then(l,d);f((s=s.apply(e,t)).next())});const tr=Object.create(null),we=(e,t,...s)=>{const n=`[@launchdarkly plugins]: (${e}): `;console[t].apply(console,[n,...s]),Ba(n,...s)},lt=(e,t,s,...n)=>{tr[`${e}-${t}`]||(tr[`${e}-${t}`]=!0,we(e,s,...n))},Ba=(e,...t)=>Da(void 0,null,function*(){try{const{LDObserve:s}=yield Promise.resolve().then(()=>wm);s.recordLog(`${e}${t}`,"warn")}catch{}});class sr{constructor(t,s){ze(this,"debug"),ze(this,"name"),this.debug=t,this.name=s}log(...t){if(this.debug){let s=`[${Date.now()}]`;this.name&&(s+=` - ${this.name}`),console.log.apply(console,[s,...t])}}warn(...t){let s=`[${Date.now()}]`;this.name&&(s+=` - ${this.name}`),console.warn.apply(console,[s,...t])}}class Bs{constructor(){ze(this,"_sdk"),ze(this,"_isLoaded",!1),ze(this,"_callBuffer",[]),ze(this,"_capacity",1e5),ze(this,"_droppedEvents",0),ze(this,"_exceededCapacity",!1),ze(this,"_logger",new sr)}_bufferCall(t,s){if(this._isLoaded)try{return this._sdk[t](...s)}catch(n){we(`Error executing buffered call to ${t}:`,"error",n)}else{this._enqueue({method:t,args:s});return}}_enqueue(t){this._callBuffer.length<this._capacity?(this._callBuffer.push(t),this._exceededCapacity=!1):(this._exceededCapacity||(this._exceededCapacity=!0,we("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this._droppedEvents+=1)}load(t){this._sdk=t,this._isLoaded=!0;for(const{method:s,args:n}of this._callBuffer)try{this._sdk[s](...n)}catch(r){we(`Error executing buffered call to ${s}:`,"error",r)}this._callBuffer=[]}}var Qa=Object.defineProperty,ja=Object.defineProperties,Aa=Object.getOwnPropertyDescriptors,Dt=Object.getOwnPropertySymbols,nr=Object.prototype.hasOwnProperty,ir=Object.prototype.propertyIsEnumerable,Qs=(e,t,s)=>t in e?Qa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,ne=(e,t)=>{for(var s in t||(t={}))nr.call(t,s)&&Qs(e,s,t[s]);if(Dt)for(var s of Dt(t))ir.call(t,s)&&Qs(e,s,t[s]);return e},Bt=(e,t)=>ja(e,Aa(t)),Gt=(e,t)=>{var s={};for(var n in e)nr.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(e!=null&&Dt)for(var n of Dt(e))t.indexOf(n)<0&&ir.call(e,n)&&(s[n]=e[n]);return s},Rt=(e,t,s)=>Qs(e,typeof t!="symbol"?t+"":t,s),at=(e,t,s)=>new Promise((n,r)=>{var l=h=>{try{f(s.next(h))}catch(m){r(m)}},d=h=>{try{f(s.throw(h))}catch(m){r(m)}},f=h=>h.done?n(h.value):Promise.resolve(h.value).then(l,d);f((s=s.apply(e,t)).next())});function Qt(e,t){throw new Error(t)}function _a(e){return typeof e=="object"&&e!==null}function $a(e,t){throw new Error("Unexpected invariant triggered.")}const qa=/\r\n|[\n\r]/g;function js(e,t){let s=0,n=1;for(const r of e.body.matchAll(qa)){if(typeof r.index=="number"||$a(),r.index>=t)break;s=r.index+r[0].length,n+=1}return{line:n,column:t+1-s}}function ec(e){return rr(e.source,js(e.source,e.start))}function rr(e,t){const s=e.locationOffset.column-1,n="".padStart(s)+e.body,r=t.line-1,l=e.locationOffset.line-1,d=t.line+l,f=t.line===1?s:0,h=t.column+f,m=`${e.name}:${d}:${h}
2
+ `,p=n.split(/\r\n|[\n\r]/g),o=p[r];if(o.length>120){const a=Math.floor(h/80),i=h%80,c=[];for(let u=0;u<o.length;u+=80)c.push(o.slice(u,u+80));return m+or([[`${d} |`,c[0]],...c.slice(1,a+1).map(u=>["|",u]),["|","^".padStart(i)],["|",c[a+1]]])}return m+or([[`${d-1} |`,p[r-1]],[`${d} |`,o],["|","^".padStart(h)],[`${d+1} |`,p[r+1]]])}function or(e){const t=e.filter(([n,r])=>r!==void 0),s=Math.max(...t.map(([n])=>n.length));return t.map(([n,r])=>n.padStart(s)+(r?" "+r:"")).join(`
3
+ `)}function tc(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}let sc=class Ha extends Error{constructor(t,...s){var n,r,l;const{nodes:d,source:f,positions:h,path:m,originalError:p,extensions:o}=tc(s);super(t),this.name="GraphQLError",this.path=m??void 0,this.originalError=p??void 0,this.nodes=lr(Array.isArray(d)?d:d?[d]:void 0);const a=lr((n=this.nodes)===null||n===void 0?void 0:n.map(c=>c.loc).filter(c=>c!=null));this.source=f??(a==null||(r=a[0])===null||r===void 0?void 0:r.source),this.positions=h??a?.map(c=>c.start),this.locations=h&&f?h.map(c=>js(f,c)):a?.map(c=>js(c.source,c.start));const i=_a(p?.extensions)?p?.extensions:void 0;this.extensions=(l=o??i)!==null&&l!==void 0?l:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),p!=null&&p.stack?Object.defineProperty(this,"stack",{value:p.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Ha):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const s of this.nodes)s.loc&&(t+=`
4
4
 
5
- `+$a(s.loc));else if(this.source&&this.locations)for(const s of this.locations)t+=`
5
+ `+ec(s.loc));else if(this.source&&this.locations)for(const s of this.locations)t+=`
6
6
 
7
- `+rr(this.source,s);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function lr(e){return e===void 0||e.length===0?void 0:e}function ye(e,t,s){return new ec(`Syntax Error: ${s}`,{source:e,positions:[t]})}let tc=class{constructor(t,s,n){this.start=t.start,this.end=s.end,this.startToken=t,this.endToken=s,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},ar=class{constructor(t,s,n,r,a,d){this.kind=t,this.start=s,this.end=n,this.line=r,this.column=a,this.value=d,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}};const cr={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},sc=new Set(Object.keys(cr));function ur(e){const t=e?.kind;return typeof t=="string"&&sc.has(t)}var ct;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(ct||(ct={}));var As;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(As||(As={}));var E;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(E||(E={}));function _s(e){return e===9||e===32}function vt(e){return e>=48&&e<=57}function dr(e){return e>=97&&e<=122||e>=65&&e<=90}function hr(e){return dr(e)||e===95}function nc(e){return dr(e)||vt(e)||e===95}function ic(e){var t;let s=Number.MAX_SAFE_INTEGER,n=null,r=-1;for(let d=0;d<e.length;++d){var a;const f=e[d],h=rc(f);h!==f.length&&(n=(a=n)!==null&&a!==void 0?a:d,r=d,d!==0&&h<s&&(s=h))}return e.map((d,f)=>f===0?d:d.slice(s)).slice((t=n)!==null&&t!==void 0?t:0,r+1)}function rc(e){let t=0;for(;t<e.length&&_s(e.charCodeAt(t));)++t;return t}function oc(e,t){const s=e.replace(/"""/g,'\\"""'),n=s.split(/\r\n|[\n\r]/g),r=n.length===1,a=n.length>1&&n.slice(1).every(i=>i.length===0||_s(i.charCodeAt(0))),d=s.endsWith('\\"""'),f=e.endsWith('"')&&!d,h=e.endsWith("\\"),m=f||h,p=!r||e.length>70||m||a||d;let o="";const l=r&&_s(e.charCodeAt(0));return(p&&!l||a)&&(o+=`
7
+ `+rr(this.source,s);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function lr(e){return e===void 0||e.length===0?void 0:e}function ye(e,t,s){return new sc(`Syntax Error: ${s}`,{source:e,positions:[t]})}let nc=class{constructor(t,s,n){this.start=t.start,this.end=s.end,this.startToken=t,this.endToken=s,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},ar=class{constructor(t,s,n,r,l,d){this.kind=t,this.start=s,this.end=n,this.line=r,this.column=l,this.value=d,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}};const cr={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},ic=new Set(Object.keys(cr));function ur(e){const t=e?.kind;return typeof t=="string"&&ic.has(t)}var ct;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(ct||(ct={}));var As;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(As||(As={}));var E;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(E||(E={}));function _s(e){return e===9||e===32}function vt(e){return e>=48&&e<=57}function dr(e){return e>=97&&e<=122||e>=65&&e<=90}function hr(e){return dr(e)||e===95}function rc(e){return dr(e)||vt(e)||e===95}function oc(e){var t;let s=Number.MAX_SAFE_INTEGER,n=null,r=-1;for(let d=0;d<e.length;++d){var l;const f=e[d],h=lc(f);h!==f.length&&(n=(l=n)!==null&&l!==void 0?l:d,r=d,d!==0&&h<s&&(s=h))}return e.map((d,f)=>f===0?d:d.slice(s)).slice((t=n)!==null&&t!==void 0?t:0,r+1)}function lc(e){let t=0;for(;t<e.length&&_s(e.charCodeAt(t));)++t;return t}function ac(e,t){const s=e.replace(/"""/g,'\\"""'),n=s.split(/\r\n|[\n\r]/g),r=n.length===1,l=n.length>1&&n.slice(1).every(i=>i.length===0||_s(i.charCodeAt(0))),d=s.endsWith('\\"""'),f=e.endsWith('"')&&!d,h=e.endsWith("\\"),m=f||h,p=!r||e.length>70||m||l||d;let o="";const a=r&&_s(e.charCodeAt(0));return(p&&!a||l)&&(o+=`
8
8
  `),o+=s,(p||m)&&(o+=`
9
- `),'"""'+o+'"""'}var x;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(x||(x={}));let lc=class{constructor(t){const s=new ar(x.SOF,0,0,0,0);this.source=t,this.lastToken=s,this.token=s,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==x.EOF)do if(t.next)t=t.next;else{const s=cc(this,t.end);t.next=s,s.prev=t,t=s}while(t.kind===x.COMMENT);return t}};function ac(e){return e===x.BANG||e===x.DOLLAR||e===x.AMP||e===x.PAREN_L||e===x.PAREN_R||e===x.SPREAD||e===x.COLON||e===x.EQUALS||e===x.AT||e===x.BRACKET_L||e===x.BRACKET_R||e===x.BRACE_L||e===x.PIPE||e===x.BRACE_R}function ut(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function jt(e,t){return pr(e.charCodeAt(t))&&mr(e.charCodeAt(t+1))}function pr(e){return e>=55296&&e<=56319}function mr(e){return e>=56320&&e<=57343}function tt(e,t){const s=e.source.body.codePointAt(t);if(s===void 0)return x.EOF;if(s>=32&&s<=126){const n=String.fromCodePoint(s);return n==='"'?`'"'`:`"${n}"`}return"U+"+s.toString(16).toUpperCase().padStart(4,"0")}function fe(e,t,s,n,r){const a=e.line,d=1+s-e.lineStart;return new ar(t,s,n,a,d,r)}function cc(e,t){const s=e.source.body,n=s.length;let r=t;for(;r<n;){const a=s.charCodeAt(r);switch(a){case 65279:case 9:case 32:case 44:++r;continue;case 10:++r,++e.line,e.lineStart=r;continue;case 13:s.charCodeAt(r+1)===10?r+=2:++r,++e.line,e.lineStart=r;continue;case 35:return uc(e,r);case 33:return fe(e,x.BANG,r,r+1);case 36:return fe(e,x.DOLLAR,r,r+1);case 38:return fe(e,x.AMP,r,r+1);case 40:return fe(e,x.PAREN_L,r,r+1);case 41:return fe(e,x.PAREN_R,r,r+1);case 46:if(s.charCodeAt(r+1)===46&&s.charCodeAt(r+2)===46)return fe(e,x.SPREAD,r,r+3);break;case 58:return fe(e,x.COLON,r,r+1);case 61:return fe(e,x.EQUALS,r,r+1);case 64:return fe(e,x.AT,r,r+1);case 91:return fe(e,x.BRACKET_L,r,r+1);case 93:return fe(e,x.BRACKET_R,r,r+1);case 123:return fe(e,x.BRACE_L,r,r+1);case 124:return fe(e,x.PIPE,r,r+1);case 125:return fe(e,x.BRACE_R,r,r+1);case 34:return s.charCodeAt(r+1)===34&&s.charCodeAt(r+2)===34?bc(e,r):hc(e,r)}if(vt(a)||a===45)return dc(e,r,a);if(hr(a))return yc(e,r);throw ye(e.source,r,a===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:ut(a)||jt(s,r)?`Unexpected character: ${tt(e,r)}.`:`Invalid character: ${tt(e,r)}.`)}return fe(e,x.EOF,n,n)}function uc(e,t){const s=e.source.body,n=s.length;let r=t+1;for(;r<n;){const a=s.charCodeAt(r);if(a===10||a===13)break;if(ut(a))++r;else if(jt(s,r))r+=2;else break}return fe(e,x.COMMENT,t,r,s.slice(t+1,r))}function dc(e,t,s){const n=e.source.body;let r=t,a=s,d=!1;if(a===45&&(a=n.charCodeAt(++r)),a===48){if(a=n.charCodeAt(++r),vt(a))throw ye(e.source,r,`Invalid number, unexpected digit after 0: ${tt(e,r)}.`)}else r=$s(e,r,a),a=n.charCodeAt(r);if(a===46&&(d=!0,a=n.charCodeAt(++r),r=$s(e,r,a),a=n.charCodeAt(r)),(a===69||a===101)&&(d=!0,a=n.charCodeAt(++r),(a===43||a===45)&&(a=n.charCodeAt(++r)),r=$s(e,r,a),a=n.charCodeAt(r)),a===46||hr(a))throw ye(e.source,r,`Invalid number, expected digit but got: ${tt(e,r)}.`);return fe(e,d?x.FLOAT:x.INT,t,r,n.slice(t,r))}function $s(e,t,s){if(!vt(s))throw ye(e.source,t,`Invalid number, expected digit but got: ${tt(e,t)}.`);const n=e.source.body;let r=t+1;for(;vt(n.charCodeAt(r));)++r;return r}function hc(e,t){const s=e.source.body,n=s.length;let r=t+1,a=r,d="";for(;r<n;){const f=s.charCodeAt(r);if(f===34)return d+=s.slice(a,r),fe(e,x.STRING,t,r+1,d);if(f===92){d+=s.slice(a,r);const h=s.charCodeAt(r+1)===117?s.charCodeAt(r+2)===123?pc(e,r):mc(e,r):fc(e,r);d+=h.value,r+=h.size,a=r;continue}if(f===10||f===13)break;if(ut(f))++r;else if(jt(s,r))r+=2;else throw ye(e.source,r,`Invalid character within String: ${tt(e,r)}.`)}throw ye(e.source,r,"Unterminated string.")}function pc(e,t){const s=e.source.body;let n=0,r=3;for(;r<12;){const a=s.charCodeAt(t+r++);if(a===125){if(r<5||!ut(n))break;return{value:String.fromCodePoint(n),size:r}}if(n=n<<4|Wt(a),n<0)break}throw ye(e.source,t,`Invalid Unicode escape sequence: "${s.slice(t,t+r)}".`)}function mc(e,t){const s=e.source.body,n=fr(s,t+2);if(ut(n))return{value:String.fromCodePoint(n),size:6};if(pr(n)&&s.charCodeAt(t+6)===92&&s.charCodeAt(t+7)===117){const r=fr(s,t+8);if(mr(r))return{value:String.fromCodePoint(n,r),size:12}}throw ye(e.source,t,`Invalid Unicode escape sequence: "${s.slice(t,t+6)}".`)}function fr(e,t){return Wt(e.charCodeAt(t))<<12|Wt(e.charCodeAt(t+1))<<8|Wt(e.charCodeAt(t+2))<<4|Wt(e.charCodeAt(t+3))}function Wt(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function fc(e,t){const s=e.source.body;switch(s.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
10
- `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw ye(e.source,t,`Invalid character escape sequence: "${s.slice(t,t+2)}".`)}function bc(e,t){const s=e.source.body,n=s.length;let r=e.lineStart,a=t+3,d=a,f="";const h=[];for(;a<n;){const m=s.charCodeAt(a);if(m===34&&s.charCodeAt(a+1)===34&&s.charCodeAt(a+2)===34){f+=s.slice(d,a),h.push(f);const p=fe(e,x.BLOCK_STRING,t,a+3,ic(h).join(`
11
- `));return e.line+=h.length-1,e.lineStart=r,p}if(m===92&&s.charCodeAt(a+1)===34&&s.charCodeAt(a+2)===34&&s.charCodeAt(a+3)===34){f+=s.slice(d,a),d=a+1,a+=4;continue}if(m===10||m===13){f+=s.slice(d,a),h.push(f),m===13&&s.charCodeAt(a+1)===10?a+=2:++a,f="",d=a,r=a;continue}if(ut(m))++a;else if(jt(s,a))a+=2;else throw ye(e.source,a,`Invalid character within String: ${tt(e,a)}.`)}throw ye(e.source,a,"Unterminated string.")}function yc(e,t){const s=e.source.body,n=s.length;let r=t+1;for(;r<n;){const a=s.charCodeAt(r);if(nc(a))++r;else break}return fe(e,x.NAME,t,r,s.slice(t,r))}const gc=10,br=2;function qs(e){return At(e,[])}function At(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Zc(e,t);default:return String(e)}}function Zc(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const s=[...t,e];if(Sc(e)){const n=e.toJSON();if(n!==e)return typeof n=="string"?n:At(n,s)}else if(Array.isArray(e))return Xc(e,s);return Ic(e,s)}function Sc(e){return typeof e.toJSON=="function"}function Ic(e,t){const s=Object.entries(e);return s.length===0?"{}":t.length>br?"["+Vc(e)+"]":"{ "+s.map(([n,r])=>n+": "+At(r,t)).join(", ")+" }"}function Xc(e,t){if(e.length===0)return"[]";if(t.length>br)return"[Array]";const s=Math.min(gc,e.length),n=e.length-s,r=[];for(let a=0;a<s;++a)r.push(At(e[a],t));return n===1?r.push("... 1 more item"):n>1&&r.push(`... ${n} more items`),"["+r.join(", ")+"]"}function Vc(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const s=e.constructor.name;if(typeof s=="string"&&s!=="")return s}return t}const Gc=globalThis.process&&process.env.NODE_ENV==="production",Rc=Gc?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if(typeof e=="object"&&e!==null){var s;const n=t.prototype[Symbol.toStringTag],r=Symbol.toStringTag in e?e[Symbol.toStringTag]:(s=e.constructor)===null||s===void 0?void 0:s.name;if(n===r){const a=qs(e);throw new Error(`Cannot use ${n} "${a}" from another module or realm.
9
+ `),'"""'+o+'"""'}var x;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(x||(x={}));let cc=class{constructor(t){const s=new ar(x.SOF,0,0,0,0);this.source=t,this.lastToken=s,this.token=s,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==x.EOF)do if(t.next)t=t.next;else{const s=dc(this,t.end);t.next=s,s.prev=t,t=s}while(t.kind===x.COMMENT);return t}};function uc(e){return e===x.BANG||e===x.DOLLAR||e===x.AMP||e===x.PAREN_L||e===x.PAREN_R||e===x.SPREAD||e===x.COLON||e===x.EQUALS||e===x.AT||e===x.BRACKET_L||e===x.BRACKET_R||e===x.BRACE_L||e===x.PIPE||e===x.BRACE_R}function ut(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function jt(e,t){return pr(e.charCodeAt(t))&&mr(e.charCodeAt(t+1))}function pr(e){return e>=55296&&e<=56319}function mr(e){return e>=56320&&e<=57343}function tt(e,t){const s=e.source.body.codePointAt(t);if(s===void 0)return x.EOF;if(s>=32&&s<=126){const n=String.fromCodePoint(s);return n==='"'?`'"'`:`"${n}"`}return"U+"+s.toString(16).toUpperCase().padStart(4,"0")}function fe(e,t,s,n,r){const l=e.line,d=1+s-e.lineStart;return new ar(t,s,n,l,d,r)}function dc(e,t){const s=e.source.body,n=s.length;let r=t;for(;r<n;){const l=s.charCodeAt(r);switch(l){case 65279:case 9:case 32:case 44:++r;continue;case 10:++r,++e.line,e.lineStart=r;continue;case 13:s.charCodeAt(r+1)===10?r+=2:++r,++e.line,e.lineStart=r;continue;case 35:return hc(e,r);case 33:return fe(e,x.BANG,r,r+1);case 36:return fe(e,x.DOLLAR,r,r+1);case 38:return fe(e,x.AMP,r,r+1);case 40:return fe(e,x.PAREN_L,r,r+1);case 41:return fe(e,x.PAREN_R,r,r+1);case 46:if(s.charCodeAt(r+1)===46&&s.charCodeAt(r+2)===46)return fe(e,x.SPREAD,r,r+3);break;case 58:return fe(e,x.COLON,r,r+1);case 61:return fe(e,x.EQUALS,r,r+1);case 64:return fe(e,x.AT,r,r+1);case 91:return fe(e,x.BRACKET_L,r,r+1);case 93:return fe(e,x.BRACKET_R,r,r+1);case 123:return fe(e,x.BRACE_L,r,r+1);case 124:return fe(e,x.PIPE,r,r+1);case 125:return fe(e,x.BRACE_R,r,r+1);case 34:return s.charCodeAt(r+1)===34&&s.charCodeAt(r+2)===34?gc(e,r):mc(e,r)}if(vt(l)||l===45)return pc(e,r,l);if(hr(l))return Zc(e,r);throw ye(e.source,r,l===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:ut(l)||jt(s,r)?`Unexpected character: ${tt(e,r)}.`:`Invalid character: ${tt(e,r)}.`)}return fe(e,x.EOF,n,n)}function hc(e,t){const s=e.source.body,n=s.length;let r=t+1;for(;r<n;){const l=s.charCodeAt(r);if(l===10||l===13)break;if(ut(l))++r;else if(jt(s,r))r+=2;else break}return fe(e,x.COMMENT,t,r,s.slice(t+1,r))}function pc(e,t,s){const n=e.source.body;let r=t,l=s,d=!1;if(l===45&&(l=n.charCodeAt(++r)),l===48){if(l=n.charCodeAt(++r),vt(l))throw ye(e.source,r,`Invalid number, unexpected digit after 0: ${tt(e,r)}.`)}else r=$s(e,r,l),l=n.charCodeAt(r);if(l===46&&(d=!0,l=n.charCodeAt(++r),r=$s(e,r,l),l=n.charCodeAt(r)),(l===69||l===101)&&(d=!0,l=n.charCodeAt(++r),(l===43||l===45)&&(l=n.charCodeAt(++r)),r=$s(e,r,l),l=n.charCodeAt(r)),l===46||hr(l))throw ye(e.source,r,`Invalid number, expected digit but got: ${tt(e,r)}.`);return fe(e,d?x.FLOAT:x.INT,t,r,n.slice(t,r))}function $s(e,t,s){if(!vt(s))throw ye(e.source,t,`Invalid number, expected digit but got: ${tt(e,t)}.`);const n=e.source.body;let r=t+1;for(;vt(n.charCodeAt(r));)++r;return r}function mc(e,t){const s=e.source.body,n=s.length;let r=t+1,l=r,d="";for(;r<n;){const f=s.charCodeAt(r);if(f===34)return d+=s.slice(l,r),fe(e,x.STRING,t,r+1,d);if(f===92){d+=s.slice(l,r);const h=s.charCodeAt(r+1)===117?s.charCodeAt(r+2)===123?fc(e,r):bc(e,r):yc(e,r);d+=h.value,r+=h.size,l=r;continue}if(f===10||f===13)break;if(ut(f))++r;else if(jt(s,r))r+=2;else throw ye(e.source,r,`Invalid character within String: ${tt(e,r)}.`)}throw ye(e.source,r,"Unterminated string.")}function fc(e,t){const s=e.source.body;let n=0,r=3;for(;r<12;){const l=s.charCodeAt(t+r++);if(l===125){if(r<5||!ut(n))break;return{value:String.fromCodePoint(n),size:r}}if(n=n<<4|Wt(l),n<0)break}throw ye(e.source,t,`Invalid Unicode escape sequence: "${s.slice(t,t+r)}".`)}function bc(e,t){const s=e.source.body,n=fr(s,t+2);if(ut(n))return{value:String.fromCodePoint(n),size:6};if(pr(n)&&s.charCodeAt(t+6)===92&&s.charCodeAt(t+7)===117){const r=fr(s,t+8);if(mr(r))return{value:String.fromCodePoint(n,r),size:12}}throw ye(e.source,t,`Invalid Unicode escape sequence: "${s.slice(t,t+6)}".`)}function fr(e,t){return Wt(e.charCodeAt(t))<<12|Wt(e.charCodeAt(t+1))<<8|Wt(e.charCodeAt(t+2))<<4|Wt(e.charCodeAt(t+3))}function Wt(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function yc(e,t){const s=e.source.body;switch(s.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
10
+ `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw ye(e.source,t,`Invalid character escape sequence: "${s.slice(t,t+2)}".`)}function gc(e,t){const s=e.source.body,n=s.length;let r=e.lineStart,l=t+3,d=l,f="";const h=[];for(;l<n;){const m=s.charCodeAt(l);if(m===34&&s.charCodeAt(l+1)===34&&s.charCodeAt(l+2)===34){f+=s.slice(d,l),h.push(f);const p=fe(e,x.BLOCK_STRING,t,l+3,oc(h).join(`
11
+ `));return e.line+=h.length-1,e.lineStart=r,p}if(m===92&&s.charCodeAt(l+1)===34&&s.charCodeAt(l+2)===34&&s.charCodeAt(l+3)===34){f+=s.slice(d,l),d=l+1,l+=4;continue}if(m===10||m===13){f+=s.slice(d,l),h.push(f),m===13&&s.charCodeAt(l+1)===10?l+=2:++l,f="",d=l,r=l;continue}if(ut(m))++l;else if(jt(s,l))l+=2;else throw ye(e.source,l,`Invalid character within String: ${tt(e,l)}.`)}throw ye(e.source,l,"Unterminated string.")}function Zc(e,t){const s=e.source.body,n=s.length;let r=t+1;for(;r<n;){const l=s.charCodeAt(r);if(rc(l))++r;else break}return fe(e,x.NAME,t,r,s.slice(t,r))}const Sc=10,br=2;function qs(e){return At(e,[])}function At(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Ic(e,t);default:return String(e)}}function Ic(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const s=[...t,e];if(Xc(e)){const n=e.toJSON();if(n!==e)return typeof n=="string"?n:At(n,s)}else if(Array.isArray(e))return Gc(e,s);return Vc(e,s)}function Xc(e){return typeof e.toJSON=="function"}function Vc(e,t){const s=Object.entries(e);return s.length===0?"{}":t.length>br?"["+Rc(e)+"]":"{ "+s.map(([n,r])=>n+": "+At(r,t)).join(", ")+" }"}function Gc(e,t){if(e.length===0)return"[]";if(t.length>br)return"[Array]";const s=Math.min(Sc,e.length),n=e.length-s,r=[];for(let l=0;l<s;++l)r.push(At(e[l],t));return n===1?r.push("... 1 more item"):n>1&&r.push(`... ${n} more items`),"["+r.join(", ")+"]"}function Rc(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const s=e.constructor.name;if(typeof s=="string"&&s!=="")return s}return t}const vc=globalThis.process&&process.env.NODE_ENV==="production",Wc=vc?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if(typeof e=="object"&&e!==null){var s;const n=t.prototype[Symbol.toStringTag],r=Symbol.toStringTag in e?e[Symbol.toStringTag]:(s=e.constructor)===null||s===void 0?void 0:s.name;if(n===r){const l=qs(e);throw new Error(`Cannot use ${n} "${l}" from another module or realm.
12
12
 
13
13
  Ensure that there is only one instance of "graphql" in the node_modules
14
14
  directory. If different versions of "graphql" are the dependencies of other
@@ -19,12 +19,12 @@ https://yarnpkg.com/en/docs/selective-version-resolutions
19
19
  Duplicate "graphql" modules cannot be used at the same time since different
20
20
  versions may have different capabilities and behavior. The data from one
21
21
  version used in the function from another could produce confusing and
22
- spurious results.`)}}return!1};let yr=class{constructor(t,s="GraphQL request",n={line:1,column:1}){typeof t=="string"||Qt(!1,`Body must be a string. Received: ${qs(t)}.`),this.body=t,this.name=s,this.locationOffset=n,this.locationOffset.line>0||Qt(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Qt(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function vc(e){return Rc(e,yr)}function gr(e,t){const s=new Wc(e,t),n=s.parseDocument();return Object.defineProperty(n,"tokenCount",{enumerable:!1,value:s.tokenCount}),n}let Wc=class{constructor(t,s={}){const n=vc(t)?t:new yr(t);this._lexer=new lc(n),this._options=s,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(x.NAME);return this.node(t,{kind:E.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:E.DOCUMENT,definitions:this.many(x.SOF,this.parseDefinition,x.EOF)})}parseDefinition(){if(this.peek(x.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),s=t?this._lexer.lookahead():this._lexer.token;if(s.kind===x.NAME){switch(s.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw ye(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(s.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(s)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(x.BRACE_L))return this.node(t,{kind:E.OPERATION_DEFINITION,operation:ct.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const s=this.parseOperationType();let n;return this.peek(x.NAME)&&(n=this.parseName()),this.node(t,{kind:E.OPERATION_DEFINITION,operation:s,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(x.NAME);switch(t.value){case"query":return ct.QUERY;case"mutation":return ct.MUTATION;case"subscription":return ct.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(x.PAREN_L,this.parseVariableDefinition,x.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:E.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(x.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(x.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(x.DOLLAR),this.node(t,{kind:E.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:E.SELECTION_SET,selections:this.many(x.BRACE_L,this.parseSelection,x.BRACE_R)})}parseSelection(){return this.peek(x.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,s=this.parseName();let n,r;return this.expectOptionalToken(x.COLON)?(n=s,r=this.parseName()):r=s,this.node(t,{kind:E.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(x.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const s=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(x.PAREN_L,s,x.PAREN_R)}parseArgument(t=!1){const s=this._lexer.token,n=this.parseName();return this.expectToken(x.COLON),this.node(s,{kind:E.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(x.SPREAD);const s=this.expectOptionalKeyword("on");return!s&&this.peek(x.NAME)?this.node(t,{kind:E.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:E.INLINE_FRAGMENT,typeCondition:s?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:E.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:E.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const s=this._lexer.token;switch(s.kind){case x.BRACKET_L:return this.parseList(t);case x.BRACE_L:return this.parseObject(t);case x.INT:return this.advanceLexer(),this.node(s,{kind:E.INT,value:s.value});case x.FLOAT:return this.advanceLexer(),this.node(s,{kind:E.FLOAT,value:s.value});case x.STRING:case x.BLOCK_STRING:return this.parseStringLiteral();case x.NAME:switch(this.advanceLexer(),s.value){case"true":return this.node(s,{kind:E.BOOLEAN,value:!0});case"false":return this.node(s,{kind:E.BOOLEAN,value:!1});case"null":return this.node(s,{kind:E.NULL});default:return this.node(s,{kind:E.ENUM,value:s.value})}case x.DOLLAR:if(t)if(this.expectToken(x.DOLLAR),this._lexer.token.kind===x.NAME){const n=this._lexer.token.value;throw ye(this._lexer.source,s.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(s);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:E.STRING,value:t.value,block:t.kind===x.BLOCK_STRING})}parseList(t){const s=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:E.LIST,values:this.any(x.BRACKET_L,s,x.BRACKET_R)})}parseObject(t){const s=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:E.OBJECT,fields:this.any(x.BRACE_L,s,x.BRACE_R)})}parseObjectField(t){const s=this._lexer.token,n=this.parseName();return this.expectToken(x.COLON),this.node(s,{kind:E.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){const s=[];for(;this.peek(x.AT);)s.push(this.parseDirective(t));return s}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const s=this._lexer.token;return this.expectToken(x.AT),this.node(s,{kind:E.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let s;if(this.expectOptionalToken(x.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(x.BRACKET_R),s=this.node(t,{kind:E.LIST_TYPE,type:n})}else s=this.parseNamedType();return this.expectOptionalToken(x.BANG)?this.node(t,{kind:E.NON_NULL_TYPE,type:s}):s}parseNamedType(){return this.node(this._lexer.token,{kind:E.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(x.STRING)||this.peek(x.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.many(x.BRACE_L,this.parseOperationTypeDefinition,x.BRACE_R);return this.node(t,{kind:E.SCHEMA_DEFINITION,description:s,directives:n,operationTypes:r})}parseOperationTypeDefinition(){const t=this._lexer.token,s=this.parseOperationType();this.expectToken(x.COLON);const n=this.parseNamedType();return this.node(t,{kind:E.OPERATION_TYPE_DEFINITION,operation:s,type:n})}parseScalarTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();return this.node(t,{kind:E.SCALAR_TYPE_DEFINITION,description:s,name:n,directives:r})}parseObjectTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),d=this.parseFieldsDefinition();return this.node(t,{kind:E.OBJECT_TYPE_DEFINITION,description:s,name:n,interfaces:r,directives:a,fields:d})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(x.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(x.BRACE_L,this.parseFieldDefinition,x.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,s=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(x.COLON);const a=this.parseTypeReference(),d=this.parseConstDirectives();return this.node(t,{kind:E.FIELD_DEFINITION,description:s,name:n,arguments:r,type:a,directives:d})}parseArgumentDefs(){return this.optionalMany(x.PAREN_L,this.parseInputValueDef,x.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,s=this.parseDescription(),n=this.parseName();this.expectToken(x.COLON);const r=this.parseTypeReference();let a;this.expectOptionalToken(x.EQUALS)&&(a=this.parseConstValueLiteral());const d=this.parseConstDirectives();return this.node(t,{kind:E.INPUT_VALUE_DEFINITION,description:s,name:n,type:r,defaultValue:a,directives:d})}parseInterfaceTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),d=this.parseFieldsDefinition();return this.node(t,{kind:E.INTERFACE_TYPE_DEFINITION,description:s,name:n,interfaces:r,directives:a,fields:d})}parseUnionTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),a=this.parseUnionMemberTypes();return this.node(t,{kind:E.UNION_TYPE_DEFINITION,description:s,name:n,directives:r,types:a})}parseUnionMemberTypes(){return this.expectOptionalToken(x.EQUALS)?this.delimitedMany(x.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),a=this.parseEnumValuesDefinition();return this.node(t,{kind:E.ENUM_TYPE_DEFINITION,description:s,name:n,directives:r,values:a})}parseEnumValuesDefinition(){return this.optionalMany(x.BRACE_L,this.parseEnumValueDefinition,x.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,s=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(t,{kind:E.ENUM_VALUE_DEFINITION,description:s,name:n,directives:r})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw ye(this._lexer.source,this._lexer.token.start,`${_t(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),a=this.parseInputFieldsDefinition();return this.node(t,{kind:E.INPUT_OBJECT_TYPE_DEFINITION,description:s,name:n,directives:r,fields:a})}parseInputFieldsDefinition(){return this.optionalMany(x.BRACE_L,this.parseInputValueDef,x.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===x.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const s=this.parseConstDirectives(),n=this.optionalMany(x.BRACE_L,this.parseOperationTypeDefinition,x.BRACE_R);if(s.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:E.SCHEMA_EXTENSION,directives:s,operationTypes:n})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const s=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:E.SCALAR_TYPE_EXTENSION,name:s,directives:n})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const s=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:E.OBJECT_TYPE_EXTENSION,name:s,interfaces:n,directives:r,fields:a})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const s=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&a.length===0)throw this.unexpected();return this.node(t,{kind:E.INTERFACE_TYPE_EXTENSION,name:s,interfaces:n,directives:r,fields:a})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const s=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:E.UNION_TYPE_EXTENSION,name:s,directives:n,types:r})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const s=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:E.ENUM_TYPE_EXTENSION,name:s,directives:n,values:r})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const s=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:E.INPUT_OBJECT_TYPE_EXTENSION,name:s,directives:n,fields:r})}parseDirectiveDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("directive"),this.expectToken(x.AT);const n=this.parseName(),r=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const d=this.parseDirectiveLocations();return this.node(t,{kind:E.DIRECTIVE_DEFINITION,description:s,name:n,arguments:r,repeatable:a,locations:d})}parseDirectiveLocations(){return this.delimitedMany(x.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,s=this.parseName();if(Object.prototype.hasOwnProperty.call(As,s.value))return s;throw this.unexpected(t)}node(t,s){return this._options.noLocation!==!0&&(s.loc=new tc(t,this._lexer.lastToken,this._lexer.source)),s}peek(t){return this._lexer.token.kind===t}expectToken(t){const s=this._lexer.token;if(s.kind===t)return this.advanceLexer(),s;throw ye(this._lexer.source,s.start,`Expected ${Zr(t)}, found ${_t(s)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const s=this._lexer.token;if(s.kind===x.NAME&&s.value===t)this.advanceLexer();else throw ye(this._lexer.source,s.start,`Expected "${t}", found ${_t(s)}.`)}expectOptionalKeyword(t){const s=this._lexer.token;return s.kind===x.NAME&&s.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const s=t??this._lexer.token;return ye(this._lexer.source,s.start,`Unexpected ${_t(s)}.`)}any(t,s,n){this.expectToken(t);const r=[];for(;!this.expectOptionalToken(n);)r.push(s.call(this));return r}optionalMany(t,s,n){if(this.expectOptionalToken(t)){const r=[];do r.push(s.call(this));while(!this.expectOptionalToken(n));return r}return[]}many(t,s,n){this.expectToken(t);const r=[];do r.push(s.call(this));while(!this.expectOptionalToken(n));return r}delimitedMany(t,s){this.expectOptionalToken(t);const n=[];do n.push(s.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){const{maxTokens:t}=this._options,s=this._lexer.advance();if(s.kind!==x.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw ye(this._lexer.source,s.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function _t(e){const t=e.value;return Zr(e.kind)+(t!=null?` "${t}"`:"")}function Zr(e){return ac(e)?`"${e}"`:e}function wc(e){return`"${e.replace(kc,Cc)}"`}const kc=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Cc(e){return xc[e.charCodeAt(0)]}const xc=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],Tc=Object.freeze({});function Lc(e,t,s=cr){const n=new Map;for(const S of Object.values(E))n.set(S,Nc(t,S));let r,a=Array.isArray(e),d=[e],f=-1,h=[],m=e,p,o;const l=[],i=[];do{f++;const S=f===d.length,Z=S&&h.length!==0;if(S){if(p=i.length===0?void 0:l[l.length-1],m=o,o=i.pop(),Z)if(a){m=m.slice();let R=0;for(const[y,g]of h){const X=y-R;g===null?(m.splice(X,1),R++):m[X]=g}}else{m=ne({},m);for(const[R,y]of h)m[R]=y}f=r.index,d=r.keys,h=r.edits,a=r.inArray,r=r.prev}else if(o){if(p=a?f:d[f],m=o[p],m==null)continue;l.push(p)}let I;if(!Array.isArray(m)){var c,u;ur(m)||Qt(!1,`Invalid AST Node: ${qs(m)}.`);const R=S?(c=n.get(m.kind))===null||c===void 0?void 0:c.leave:(u=n.get(m.kind))===null||u===void 0?void 0:u.enter;if(I=R?.call(t,m,p,o,l,i),I===Tc)break;if(I===!1){if(!S){l.pop();continue}}else if(I!==void 0&&(h.push([p,I]),!S))if(ur(I))m=I;else{l.pop();continue}}if(I===void 0&&Z&&h.push([p,m]),S)l.pop();else{var b;r={inArray:a,index:f,keys:d,edits:h,prev:r},a=Array.isArray(m),d=a?m:(b=s[m.kind])!==null&&b!==void 0?b:[],f=-1,h=[],o&&i.push(o),o=m}}while(r!==void 0);return h.length!==0?h[h.length-1][1]:e}function Nc(e,t){const s=e[t];return typeof s=="object"?s:typeof s=="function"?{enter:s,leave:void 0}:{enter:e.enter,leave:e.leave}}function Sr(e){return Lc(e,Yc)}const Jc=80,Yc={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>F(e.definitions,`
22
+ spurious results.`)}}return!1};let yr=class{constructor(t,s="GraphQL request",n={line:1,column:1}){typeof t=="string"||Qt(!1,`Body must be a string. Received: ${qs(t)}.`),this.body=t,this.name=s,this.locationOffset=n,this.locationOffset.line>0||Qt(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Qt(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function wc(e){return Wc(e,yr)}function gr(e,t){const s=new kc(e,t),n=s.parseDocument();return Object.defineProperty(n,"tokenCount",{enumerable:!1,value:s.tokenCount}),n}let kc=class{constructor(t,s={}){const n=wc(t)?t:new yr(t);this._lexer=new cc(n),this._options=s,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(x.NAME);return this.node(t,{kind:E.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:E.DOCUMENT,definitions:this.many(x.SOF,this.parseDefinition,x.EOF)})}parseDefinition(){if(this.peek(x.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),s=t?this._lexer.lookahead():this._lexer.token;if(s.kind===x.NAME){switch(s.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw ye(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(s.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(s)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(x.BRACE_L))return this.node(t,{kind:E.OPERATION_DEFINITION,operation:ct.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const s=this.parseOperationType();let n;return this.peek(x.NAME)&&(n=this.parseName()),this.node(t,{kind:E.OPERATION_DEFINITION,operation:s,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(x.NAME);switch(t.value){case"query":return ct.QUERY;case"mutation":return ct.MUTATION;case"subscription":return ct.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(x.PAREN_L,this.parseVariableDefinition,x.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:E.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(x.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(x.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(x.DOLLAR),this.node(t,{kind:E.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:E.SELECTION_SET,selections:this.many(x.BRACE_L,this.parseSelection,x.BRACE_R)})}parseSelection(){return this.peek(x.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,s=this.parseName();let n,r;return this.expectOptionalToken(x.COLON)?(n=s,r=this.parseName()):r=s,this.node(t,{kind:E.FIELD,alias:n,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(x.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const s=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(x.PAREN_L,s,x.PAREN_R)}parseArgument(t=!1){const s=this._lexer.token,n=this.parseName();return this.expectToken(x.COLON),this.node(s,{kind:E.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(x.SPREAD);const s=this.expectOptionalKeyword("on");return!s&&this.peek(x.NAME)?this.node(t,{kind:E.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:E.INLINE_FRAGMENT,typeCondition:s?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:E.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:E.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const s=this._lexer.token;switch(s.kind){case x.BRACKET_L:return this.parseList(t);case x.BRACE_L:return this.parseObject(t);case x.INT:return this.advanceLexer(),this.node(s,{kind:E.INT,value:s.value});case x.FLOAT:return this.advanceLexer(),this.node(s,{kind:E.FLOAT,value:s.value});case x.STRING:case x.BLOCK_STRING:return this.parseStringLiteral();case x.NAME:switch(this.advanceLexer(),s.value){case"true":return this.node(s,{kind:E.BOOLEAN,value:!0});case"false":return this.node(s,{kind:E.BOOLEAN,value:!1});case"null":return this.node(s,{kind:E.NULL});default:return this.node(s,{kind:E.ENUM,value:s.value})}case x.DOLLAR:if(t)if(this.expectToken(x.DOLLAR),this._lexer.token.kind===x.NAME){const n=this._lexer.token.value;throw ye(this._lexer.source,s.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(s);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:E.STRING,value:t.value,block:t.kind===x.BLOCK_STRING})}parseList(t){const s=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:E.LIST,values:this.any(x.BRACKET_L,s,x.BRACKET_R)})}parseObject(t){const s=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:E.OBJECT,fields:this.any(x.BRACE_L,s,x.BRACE_R)})}parseObjectField(t){const s=this._lexer.token,n=this.parseName();return this.expectToken(x.COLON),this.node(s,{kind:E.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){const s=[];for(;this.peek(x.AT);)s.push(this.parseDirective(t));return s}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const s=this._lexer.token;return this.expectToken(x.AT),this.node(s,{kind:E.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let s;if(this.expectOptionalToken(x.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(x.BRACKET_R),s=this.node(t,{kind:E.LIST_TYPE,type:n})}else s=this.parseNamedType();return this.expectOptionalToken(x.BANG)?this.node(t,{kind:E.NON_NULL_TYPE,type:s}):s}parseNamedType(){return this.node(this._lexer.token,{kind:E.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(x.STRING)||this.peek(x.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.many(x.BRACE_L,this.parseOperationTypeDefinition,x.BRACE_R);return this.node(t,{kind:E.SCHEMA_DEFINITION,description:s,directives:n,operationTypes:r})}parseOperationTypeDefinition(){const t=this._lexer.token,s=this.parseOperationType();this.expectToken(x.COLON);const n=this.parseNamedType();return this.node(t,{kind:E.OPERATION_TYPE_DEFINITION,operation:s,type:n})}parseScalarTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();return this.node(t,{kind:E.SCALAR_TYPE_DEFINITION,description:s,name:n,directives:r})}parseObjectTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),l=this.parseConstDirectives(),d=this.parseFieldsDefinition();return this.node(t,{kind:E.OBJECT_TYPE_DEFINITION,description:s,name:n,interfaces:r,directives:l,fields:d})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(x.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(x.BRACE_L,this.parseFieldDefinition,x.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,s=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(x.COLON);const l=this.parseTypeReference(),d=this.parseConstDirectives();return this.node(t,{kind:E.FIELD_DEFINITION,description:s,name:n,arguments:r,type:l,directives:d})}parseArgumentDefs(){return this.optionalMany(x.PAREN_L,this.parseInputValueDef,x.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,s=this.parseDescription(),n=this.parseName();this.expectToken(x.COLON);const r=this.parseTypeReference();let l;this.expectOptionalToken(x.EQUALS)&&(l=this.parseConstValueLiteral());const d=this.parseConstDirectives();return this.node(t,{kind:E.INPUT_VALUE_DEFINITION,description:s,name:n,type:r,defaultValue:l,directives:d})}parseInterfaceTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),l=this.parseConstDirectives(),d=this.parseFieldsDefinition();return this.node(t,{kind:E.INTERFACE_TYPE_DEFINITION,description:s,name:n,interfaces:r,directives:l,fields:d})}parseUnionTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),l=this.parseUnionMemberTypes();return this.node(t,{kind:E.UNION_TYPE_DEFINITION,description:s,name:n,directives:r,types:l})}parseUnionMemberTypes(){return this.expectOptionalToken(x.EQUALS)?this.delimitedMany(x.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),l=this.parseEnumValuesDefinition();return this.node(t,{kind:E.ENUM_TYPE_DEFINITION,description:s,name:n,directives:r,values:l})}parseEnumValuesDefinition(){return this.optionalMany(x.BRACE_L,this.parseEnumValueDefinition,x.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,s=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(t,{kind:E.ENUM_VALUE_DEFINITION,description:s,name:n,directives:r})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw ye(this._lexer.source,this._lexer.token.start,`${_t(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),l=this.parseInputFieldsDefinition();return this.node(t,{kind:E.INPUT_OBJECT_TYPE_DEFINITION,description:s,name:n,directives:r,fields:l})}parseInputFieldsDefinition(){return this.optionalMany(x.BRACE_L,this.parseInputValueDef,x.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===x.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const s=this.parseConstDirectives(),n=this.optionalMany(x.BRACE_L,this.parseOperationTypeDefinition,x.BRACE_R);if(s.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:E.SCHEMA_EXTENSION,directives:s,operationTypes:n})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const s=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:E.SCALAR_TYPE_EXTENSION,name:s,directives:n})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const s=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),l=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&l.length===0)throw this.unexpected();return this.node(t,{kind:E.OBJECT_TYPE_EXTENSION,name:s,interfaces:n,directives:r,fields:l})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const s=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),l=this.parseFieldsDefinition();if(n.length===0&&r.length===0&&l.length===0)throw this.unexpected();return this.node(t,{kind:E.INTERFACE_TYPE_EXTENSION,name:s,interfaces:n,directives:r,fields:l})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const s=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:E.UNION_TYPE_EXTENSION,name:s,directives:n,types:r})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const s=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:E.ENUM_TYPE_EXTENSION,name:s,directives:n,values:r})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const s=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:E.INPUT_OBJECT_TYPE_EXTENSION,name:s,directives:n,fields:r})}parseDirectiveDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("directive"),this.expectToken(x.AT);const n=this.parseName(),r=this.parseArgumentDefs(),l=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const d=this.parseDirectiveLocations();return this.node(t,{kind:E.DIRECTIVE_DEFINITION,description:s,name:n,arguments:r,repeatable:l,locations:d})}parseDirectiveLocations(){return this.delimitedMany(x.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,s=this.parseName();if(Object.prototype.hasOwnProperty.call(As,s.value))return s;throw this.unexpected(t)}node(t,s){return this._options.noLocation!==!0&&(s.loc=new nc(t,this._lexer.lastToken,this._lexer.source)),s}peek(t){return this._lexer.token.kind===t}expectToken(t){const s=this._lexer.token;if(s.kind===t)return this.advanceLexer(),s;throw ye(this._lexer.source,s.start,`Expected ${Zr(t)}, found ${_t(s)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const s=this._lexer.token;if(s.kind===x.NAME&&s.value===t)this.advanceLexer();else throw ye(this._lexer.source,s.start,`Expected "${t}", found ${_t(s)}.`)}expectOptionalKeyword(t){const s=this._lexer.token;return s.kind===x.NAME&&s.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const s=t??this._lexer.token;return ye(this._lexer.source,s.start,`Unexpected ${_t(s)}.`)}any(t,s,n){this.expectToken(t);const r=[];for(;!this.expectOptionalToken(n);)r.push(s.call(this));return r}optionalMany(t,s,n){if(this.expectOptionalToken(t)){const r=[];do r.push(s.call(this));while(!this.expectOptionalToken(n));return r}return[]}many(t,s,n){this.expectToken(t);const r=[];do r.push(s.call(this));while(!this.expectOptionalToken(n));return r}delimitedMany(t,s){this.expectOptionalToken(t);const n=[];do n.push(s.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){const{maxTokens:t}=this._options,s=this._lexer.advance();if(s.kind!==x.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw ye(this._lexer.source,s.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function _t(e){const t=e.value;return Zr(e.kind)+(t!=null?` "${t}"`:"")}function Zr(e){return uc(e)?`"${e}"`:e}function Cc(e){return`"${e.replace(xc,Tc)}"`}const xc=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Tc(e){return Lc[e.charCodeAt(0)]}const Lc=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],Nc=Object.freeze({});function Jc(e,t,s=cr){const n=new Map;for(const S of Object.values(E))n.set(S,Yc(t,S));let r,l=Array.isArray(e),d=[e],f=-1,h=[],m=e,p,o;const a=[],i=[];do{f++;const S=f===d.length,Z=S&&h.length!==0;if(S){if(p=i.length===0?void 0:a[a.length-1],m=o,o=i.pop(),Z)if(l){m=m.slice();let R=0;for(const[y,g]of h){const X=y-R;g===null?(m.splice(X,1),R++):m[X]=g}}else{m=ne({},m);for(const[R,y]of h)m[R]=y}f=r.index,d=r.keys,h=r.edits,l=r.inArray,r=r.prev}else if(o){if(p=l?f:d[f],m=o[p],m==null)continue;a.push(p)}let I;if(!Array.isArray(m)){var c,u;ur(m)||Qt(!1,`Invalid AST Node: ${qs(m)}.`);const R=S?(c=n.get(m.kind))===null||c===void 0?void 0:c.leave:(u=n.get(m.kind))===null||u===void 0?void 0:u.enter;if(I=R?.call(t,m,p,o,a,i),I===Nc)break;if(I===!1){if(!S){a.pop();continue}}else if(I!==void 0&&(h.push([p,I]),!S))if(ur(I))m=I;else{a.pop();continue}}if(I===void 0&&Z&&h.push([p,m]),S)a.pop();else{var b;r={inArray:l,index:f,keys:d,edits:h,prev:r},l=Array.isArray(m),d=l?m:(b=s[m.kind])!==null&&b!==void 0?b:[],f=-1,h=[],o&&i.push(o),o=m}}while(r!==void 0);return h.length!==0?h[h.length-1][1]:e}function Yc(e,t){const s=e[t];return typeof s=="object"?s:typeof s=="function"?{enter:s,leave:void 0}:{enter:e.enter,leave:e.leave}}function Sr(e){return Jc(e,Fc)}const Uc=80,Fc={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>F(e.definitions,`
23
23
 
24
- `)},OperationDefinition:{leave(e){const t=q("(",F(e.variableDefinitions,", "),")"),s=F([e.operation,F([e.name,t]),F(e.directives," ")]," ");return(s==="query"?"":s+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:s,directives:n})=>e+": "+t+q(" = ",s)+q(" ",F(n," "))},SelectionSet:{leave:({selections:e})=>Ye(e)},Field:{leave({alias:e,name:t,arguments:s,directives:n,selectionSet:r}){const a=q("",e,": ")+t;let d=a+q("(",F(s,", "),")");return d.length>Jc&&(d=a+q(`(
24
+ `)},OperationDefinition:{leave(e){const t=q("(",F(e.variableDefinitions,", "),")"),s=F([e.operation,F([e.name,t]),F(e.directives," ")]," ");return(s==="query"?"":s+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:s,directives:n})=>e+": "+t+q(" = ",s)+q(" ",F(n," "))},SelectionSet:{leave:({selections:e})=>Ye(e)},Field:{leave({alias:e,name:t,arguments:s,directives:n,selectionSet:r}){const l=q("",e,": ")+t;let d=l+q("(",F(s,", "),")");return d.length>Uc&&(d=l+q(`(
25
25
  `,$t(F(s,`
26
26
  `)),`
27
- )`)),F([d,F(n," "),r]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+q(" ",F(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:s})=>F(["...",q("on ",e),F(t," "),s]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:s,directives:n,selectionSet:r})=>`fragment ${e}${q("(",F(s,", "),")")} on ${t} ${q("",F(n," ")," ")}`+r},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?oc(e):wc(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+F(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+F(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+q("(",F(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:s})=>q("",e,`
27
+ )`)),F([d,F(n," "),r]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+q(" ",F(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:s})=>F(["...",q("on ",e),F(t," "),s]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:s,directives:n,selectionSet:r})=>`fragment ${e}${q("(",F(s,", "),")")} on ${t} ${q("",F(n," ")," ")}`+r},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?ac(e):Cc(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+F(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+F(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+q("(",F(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:s})=>q("",e,`
28
28
  `)+F(["schema",F(t," "),Ye(s)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:s})=>q("",e,`
29
29
  `)+F(["scalar",t,F(s," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:s,directives:n,fields:r})=>q("",e,`
30
30
  `)+F(["type",t,q("implements ",F(s," & ")),F(n," "),Ye(r)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:s,type:n,directives:r})=>q("",e,`
@@ -46,14 +46,14 @@ spurious results.`)}}return!1};let yr=class{constructor(t,s="GraphQL request",n=
46
46
  `)),`
47
47
  }`)}function q(e,t,s=""){return t!=null&&t!==""?e+t+s:""}function $t(e){return q(" ",e.replace(/\n/g,`
48
48
  `))}function Ir(e){var t;return(t=e?.some(s=>s.includes(`
49
- `)))!==null&&t!==void 0?t:!1}const en=JSON,Uc=e=>e.toUpperCase(),Fc=e=>{const t={};return e.forEach((s,n)=>{t[n]=s}),t},Mc=(e,t,s)=>e.document?e:{document:e,variables:t,requestHeaders:s,signal:void 0},Oc=(e,t,s)=>e.query?e:{query:e,variables:t,requestHeaders:s,signal:void 0},Kc=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},Xr=e=>{var t,s;let n;const r=e.definitions.filter(a=>a.kind==="OperationDefinition");return r.length===1&&(n=(s=(t=r[0])==null?void 0:t.name)==null?void 0:s.value),n},tn=e=>{if(typeof e=="string"){let s;try{const n=gr(e);s=Xr(n)}catch{}return{query:e,operationName:s}}const t=Xr(e);return{query:Sr(e),operationName:t}};class dt extends Error{constructor(t,s){const n=`${dt.extractMessage(t)}: ${JSON.stringify({response:t,request:s})}`;super(n),Object.setPrototypeOf(this,dt.prototype),this.response=t,this.request=s,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,dt)}static extractMessage(t){var s,n,r;return(r=(n=(s=t.errors)==null?void 0:s[0])==null?void 0:n.message)!=null?r:`GraphQL Error (Code: ${t.status})`}}var Ec=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nn={exports:{}};(function(e,t){var s=typeof self<"u"?self:Ec,n=function(){function a(){this.fetch=!1,this.DOMException=s.DOMException}return a.prototype=s,new a}();(function(a){(function(d){var f={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function h(G){return G&&DataView.prototype.isPrototypeOf(G)}if(f.arrayBuffer)var m=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],p=ArrayBuffer.isView||function(G){return G&&m.indexOf(Object.prototype.toString.call(G))>-1};function o(G){if(typeof G!="string"&&(G=String(G)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(G))throw new TypeError("Invalid character in header field name");return G.toLowerCase()}function l(G){return typeof G!="string"&&(G=String(G)),G}function i(G){var w={next:function(){var T=G.shift();return{done:T===void 0,value:T}}};return f.iterable&&(w[Symbol.iterator]=function(){return w}),w}function c(G){this.map={},G instanceof c?G.forEach(function(w,T){this.append(T,w)},this):Array.isArray(G)?G.forEach(function(w){this.append(w[0],w[1])},this):G&&Object.getOwnPropertyNames(G).forEach(function(w){this.append(w,G[w])},this)}c.prototype.append=function(G,w){G=o(G),w=l(w);var T=this.map[G];this.map[G]=T?T+", "+w:w},c.prototype.delete=function(G){delete this.map[o(G)]},c.prototype.get=function(G){return G=o(G),this.has(G)?this.map[G]:null},c.prototype.has=function(G){return this.map.hasOwnProperty(o(G))},c.prototype.set=function(G,w){this.map[o(G)]=l(w)},c.prototype.forEach=function(G,w){for(var T in this.map)this.map.hasOwnProperty(T)&&G.call(w,this.map[T],T,this)},c.prototype.keys=function(){var G=[];return this.forEach(function(w,T){G.push(T)}),i(G)},c.prototype.values=function(){var G=[];return this.forEach(function(w){G.push(w)}),i(G)},c.prototype.entries=function(){var G=[];return this.forEach(function(w,T){G.push([T,w])}),i(G)},f.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);function u(G){if(G.bodyUsed)return Promise.reject(new TypeError("Already read"));G.bodyUsed=!0}function b(G){return new Promise(function(w,T){G.onload=function(){w(G.result)},G.onerror=function(){T(G.error)}})}function S(G){var w=new FileReader,T=b(w);return w.readAsArrayBuffer(G),T}function Z(G){var w=new FileReader,T=b(w);return w.readAsText(G),T}function I(G){for(var w=new Uint8Array(G),T=new Array(w.length),Y=0;Y<w.length;Y++)T[Y]=String.fromCharCode(w[Y]);return T.join("")}function R(G){if(G.slice)return G.slice(0);var w=new Uint8Array(G.byteLength);return w.set(new Uint8Array(G)),w.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(G){this._bodyInit=G,G?typeof G=="string"?this._bodyText=G:f.blob&&Blob.prototype.isPrototypeOf(G)?this._bodyBlob=G:f.formData&&FormData.prototype.isPrototypeOf(G)?this._bodyFormData=G:f.searchParams&&URLSearchParams.prototype.isPrototypeOf(G)?this._bodyText=G.toString():f.arrayBuffer&&f.blob&&h(G)?(this._bodyArrayBuffer=R(G.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):f.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(G)||p(G))?this._bodyArrayBuffer=R(G):this._bodyText=G=Object.prototype.toString.call(G):this._bodyText="",this.headers.get("content-type")||(typeof G=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):f.searchParams&&URLSearchParams.prototype.isPrototypeOf(G)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},f.blob&&(this.blob=function(){var G=u(this);if(G)return G;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?u(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(S)}),this.text=function(){var G=u(this);if(G)return G;if(this._bodyBlob)return Z(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(I(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},f.formData&&(this.formData=function(){return this.text().then(V)}),this.json=function(){return this.text().then(JSON.parse)},this}var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function X(G){var w=G.toUpperCase();return g.indexOf(w)>-1?w:G}function v(G,w){w=w||{};var T=w.body;if(G instanceof v){if(G.bodyUsed)throw new TypeError("Already read");this.url=G.url,this.credentials=G.credentials,w.headers||(this.headers=new c(G.headers)),this.method=G.method,this.mode=G.mode,this.signal=G.signal,!T&&G._bodyInit!=null&&(T=G._bodyInit,G.bodyUsed=!0)}else this.url=String(G);if(this.credentials=w.credentials||this.credentials||"same-origin",(w.headers||!this.headers)&&(this.headers=new c(w.headers)),this.method=X(w.method||this.method||"GET"),this.mode=w.mode||this.mode||null,this.signal=w.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&T)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(T)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})};function V(G){var w=new FormData;return G.trim().split("&").forEach(function(T){if(T){var Y=T.split("="),M=Y.shift().replace(/\+/g," "),U=Y.join("=").replace(/\+/g," ");w.append(decodeURIComponent(M),decodeURIComponent(U))}}),w}function W(G){var w=new c,T=G.replace(/\r?\n[\t ]+/g," ");return T.split(/\r?\n/).forEach(function(Y){var M=Y.split(":"),U=M.shift().trim();if(U){var _=M.join(":").trim();w.append(U,_)}}),w}y.call(v.prototype);function k(G,w){w||(w={}),this.type="default",this.status=w.status===void 0?200:w.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in w?w.statusText:"OK",this.headers=new c(w.headers),this.url=w.url||"",this._initBody(G)}y.call(k.prototype),k.prototype.clone=function(){return new k(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},k.error=function(){var G=new k(null,{status:0,statusText:""});return G.type="error",G};var N=[301,302,303,307,308];k.redirect=function(G,w){if(N.indexOf(w)===-1)throw new RangeError("Invalid status code");return new k(null,{status:w,headers:{location:G}})},d.DOMException=a.DOMException;try{new d.DOMException}catch{d.DOMException=function(w,T){this.message=w,this.name=T;var Y=Error(w);this.stack=Y.stack},d.DOMException.prototype=Object.create(Error.prototype),d.DOMException.prototype.constructor=d.DOMException}function D(G,w){return new Promise(function(T,Y){var M=new v(G,w);if(M.signal&&M.signal.aborted)return Y(new d.DOMException("Aborted","AbortError"));var U=new XMLHttpRequest;function _(){U.abort()}U.onload=function(){var B={status:U.status,statusText:U.statusText,headers:W(U.getAllResponseHeaders()||"")};B.url="responseURL"in U?U.responseURL:B.headers.get("X-Request-URL");var C="response"in U?U.response:U.responseText;T(new k(C,B))},U.onerror=function(){Y(new TypeError("Network request failed"))},U.ontimeout=function(){Y(new TypeError("Network request failed"))},U.onabort=function(){Y(new d.DOMException("Aborted","AbortError"))},U.open(M.method,M.url,!0),M.credentials==="include"?U.withCredentials=!0:M.credentials==="omit"&&(U.withCredentials=!1),"responseType"in U&&f.blob&&(U.responseType="blob"),M.headers.forEach(function(B,C){U.setRequestHeader(C,B)}),M.signal&&(M.signal.addEventListener("abort",_),U.onreadystatechange=function(){U.readyState===4&&M.signal.removeEventListener("abort",_)}),U.send(typeof M._bodyInit>"u"?null:M._bodyInit)})}return D.polyfill=!0,a.fetch||(a.fetch=D,a.Headers=c,a.Request=v,a.Response=k),d.Headers=c,d.Request=v,d.Response=k,d.fetch=D,Object.defineProperty(d,"__esModule",{value:!0}),d})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var r=n;t=r.fetch,t.default=r.fetch,t.fetch=r.fetch,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,e.exports=t})(nn,nn.exports);var rn=nn.exports;const qt=sn(rn),zc=Object.freeze(Object.defineProperty({__proto__:null,default:qt},Symbol.toStringTag,{value:"Module"})),ht=e=>{let t={};return e&&(typeof Headers<"u"&&e instanceof Headers||zc&&rn.Headers&&e instanceof rn.Headers?t=Fc(e):Array.isArray(e)?e.forEach(([s,n])=>{s&&n!==void 0&&(t[s]=n)}):t=e),t},Vr=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Hc=e=>{if(!Array.isArray(e.query)){const n=e,r=[`query=${encodeURIComponent(Vr(n.query))}`];return e.variables&&r.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&r.push(`operationName=${encodeURIComponent(n.operationName)}`),r.join("&")}if(typeof e.variables<"u"&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,s=e.query.reduce((n,r,a)=>(n.push({query:Vr(r),variables:t.variables?t.jsonSerializer.stringify(t.variables[a]):void 0}),n),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(s))}`},Pc=e=>t=>at(void 0,null,function*(){var s;const{url:n,query:r,variables:a,operationName:d,fetch:f,fetchOptions:h,middleware:m}=t,p=ne({},t.headers);let o="",l;e==="POST"?(l=Bc(r,a,d,h.jsonSerializer),typeof l=="string"&&(p["Content-Type"]="application/json")):o=Hc({query:r,variables:a,operationName:d,jsonSerializer:(s=h.jsonSerializer)!=null?s:en});const i=ne({method:e,headers:p,body:l},h);let c=n,u=i;if(m){const b=yield Promise.resolve(m(Bt(ne({},i),{url:n,operationName:d,variables:a}))),{url:S}=b,Z=Gt(b,["url"]);c=S,u=Z}return o&&(c=`${c}?${o}`),yield f(c,u)});let Dc=class{constructor(t,s={}){this.url=t,this.requestConfig=s,this.rawRequest=(...n)=>at(this,null,function*(){const[r,a,d]=n,f=Oc(r,a,d),h=this.requestConfig,{headers:m,fetch:p=qt,method:o="POST",requestMiddleware:l,responseMiddleware:i}=h,c=Gt(h,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:u}=this;f.signal!==void 0&&(c.signal=f.signal);const{operationName:b}=tn(f.query);return on({url:u,query:f.query,variables:f.variables,headers:ne(ne({},ht(ln(m))),ht(f.requestHeaders)),operationName:b,fetch:p,method:o,fetchOptions:c,middleware:l}).then(S=>(i&&i(S),S)).catch(S=>{throw i&&i(S),S})})}request(t,...s){return at(this,null,function*(){const[n,r]=s,a=Mc(t,n,r),d=this.requestConfig,{headers:f,fetch:h=qt,method:m="POST",requestMiddleware:p,responseMiddleware:o}=d,l=Gt(d,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:i}=this;a.signal!==void 0&&(l.signal=a.signal);const{query:c,operationName:u}=tn(a.document);return on({url:i,query:c,variables:a.variables,headers:ne(ne({},ht(ln(f))),ht(a.requestHeaders)),operationName:u,fetch:h,method:m,fetchOptions:l,middleware:p}).then(b=>(o&&o(b),b.data)).catch(b=>{throw o&&o(b),b})})}batchRequests(t,s){var n;const r=Kc(t,s),a=this.requestConfig,{headers:d}=a,f=Gt(a,["headers"]);r.signal!==void 0&&(f.signal=r.signal);const h=r.documents.map(({document:p})=>tn(p).query),m=r.documents.map(({variables:p})=>p);return on({url:this.url,query:h,variables:m,headers:ne(ne({},ht(ln(d))),ht(r.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:qt,method:this.requestConfig.method||"POST",fetchOptions:f,middleware:this.requestConfig.requestMiddleware}).then(p=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(p),p.data)).catch(p=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(p),p})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,s){const{headers:n}=this.requestConfig;return n?n[t]=s:this.requestConfig.headers={[t]:s},this}setEndpoint(t){return this.url=t,this}};const on=e=>at(void 0,null,function*(){var t,s;const{query:n,variables:r,fetchOptions:a}=e,d=Pc(Uc((t=e.method)!=null?t:"post")),f=Array.isArray(e.query),h=yield d(e),m=yield Qc(h,(s=a.jsonSerializer)!=null?s:en),p=Array.isArray(m)?!m.some(({data:l})=>!l):!!m.data,o=Array.isArray(m)||!m.errors||Array.isArray(m.errors)&&!m.errors.length||a.errorPolicy==="all"||a.errorPolicy==="ignore";if(h.ok&&o&&p){const l=m,i=Gt(l,["errors"]),c=a.errorPolicy==="ignore"?i:m;return Bt(ne({},f?{data:c}:c),{headers:h.headers,status:h.status})}else{const l=typeof m=="string"?{error:m}:m;throw new dt(Bt(ne({},l),{status:h.status,headers:h.headers}),{query:n,variables:r})}}),Bc=(e,t,s,n)=>{const r=n??en;if(!Array.isArray(e))return r.stringify({query:e,variables:t,operationName:s});if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const a=e.reduce((d,f,h)=>(d.push({query:f,variables:t?t[h]:void 0}),d),[]);return r.stringify(a)},Qc=(e,t)=>at(void 0,null,function*(){let s;return e.headers.forEach((n,r)=>{r.toLowerCase()==="content-type"&&(s=n)}),s&&(s.toLowerCase().startsWith("application/json")||s.toLowerCase().startsWith("application/graphql+json")||s.toLowerCase().startsWith("application/graphql-response+json"))?t.parse(yield e.text()):e.text()}),ln=e=>typeof e=="function"?e():e;var an={exports:{}};(function(e,t){t=e.exports=s,t.getSerialize=n;function s(r,a,d,f){return JSON.stringify(r,n(a,f),d)}function n(r,a){var d=[],f=[];return a==null&&(a=function(h,m){return d[0]===m?"[Circular ~]":"[Circular ~."+f.slice(0,d.indexOf(m)).join(".")+"]"}),function(h,m){if(d.length>0){var p=d.indexOf(this);~p?d.splice(p+1):d.push(this),~p?f.splice(p,1/0,h):f.push(h),~d.indexOf(m)&&(m=a.call(this,h,m))}else d.push(m);return r==null?m:r.call(this,h,m)}}})(an,an.exports);var jc=an.exports;const Ac=sn(jc);var es=function(){return es=Object.assign||function(e){for(var t,s=1,n=arguments.length;s<n;s++){t=arguments[s];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},es.apply(this,arguments)},ts=new Map,cn=new Map,Gr=!0,ss=!1;function Rr(e){return e.replace(/[\s,]+/g," ").trim()}function _c(e){return Rr(e.source.body.substring(e.start,e.end))}function $c(e){var t=new Set,s=[];return e.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var r=n.name.value,a=_c(n.loc),d=cn.get(r);d&&!d.has(a)?Gr&&console.warn("Warning: fragment with name "+r+` already exists.
49
+ `)))!==null&&t!==void 0?t:!1}const en=JSON,Mc=e=>e.toUpperCase(),Oc=e=>{const t={};return e.forEach((s,n)=>{t[n]=s}),t},Kc=(e,t,s)=>e.document?e:{document:e,variables:t,requestHeaders:s,signal:void 0},Ec=(e,t,s)=>e.query?e:{query:e,variables:t,requestHeaders:s,signal:void 0},zc=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},Xr=e=>{var t,s;let n;const r=e.definitions.filter(l=>l.kind==="OperationDefinition");return r.length===1&&(n=(s=(t=r[0])==null?void 0:t.name)==null?void 0:s.value),n},tn=e=>{if(typeof e=="string"){let s;try{const n=gr(e);s=Xr(n)}catch{}return{query:e,operationName:s}}const t=Xr(e);return{query:Sr(e),operationName:t}};class dt extends Error{constructor(t,s){const n=`${dt.extractMessage(t)}: ${JSON.stringify({response:t,request:s})}`;super(n),Object.setPrototypeOf(this,dt.prototype),this.response=t,this.request=s,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,dt)}static extractMessage(t){var s,n,r;return(r=(n=(s=t.errors)==null?void 0:s[0])==null?void 0:n.message)!=null?r:`GraphQL Error (Code: ${t.status})`}}var Hc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nn={exports:{}};(function(e,t){var s=typeof self<"u"?self:Hc,n=function(){function l(){this.fetch=!1,this.DOMException=s.DOMException}return l.prototype=s,new l}();(function(l){(function(d){var f={searchParams:"URLSearchParams"in l,iterable:"Symbol"in l&&"iterator"in Symbol,blob:"FileReader"in l&&"Blob"in l&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in l,arrayBuffer:"ArrayBuffer"in l};function h(G){return G&&DataView.prototype.isPrototypeOf(G)}if(f.arrayBuffer)var m=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],p=ArrayBuffer.isView||function(G){return G&&m.indexOf(Object.prototype.toString.call(G))>-1};function o(G){if(typeof G!="string"&&(G=String(G)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(G))throw new TypeError("Invalid character in header field name");return G.toLowerCase()}function a(G){return typeof G!="string"&&(G=String(G)),G}function i(G){var w={next:function(){var T=G.shift();return{done:T===void 0,value:T}}};return f.iterable&&(w[Symbol.iterator]=function(){return w}),w}function c(G){this.map={},G instanceof c?G.forEach(function(w,T){this.append(T,w)},this):Array.isArray(G)?G.forEach(function(w){this.append(w[0],w[1])},this):G&&Object.getOwnPropertyNames(G).forEach(function(w){this.append(w,G[w])},this)}c.prototype.append=function(G,w){G=o(G),w=a(w);var T=this.map[G];this.map[G]=T?T+", "+w:w},c.prototype.delete=function(G){delete this.map[o(G)]},c.prototype.get=function(G){return G=o(G),this.has(G)?this.map[G]:null},c.prototype.has=function(G){return this.map.hasOwnProperty(o(G))},c.prototype.set=function(G,w){this.map[o(G)]=a(w)},c.prototype.forEach=function(G,w){for(var T in this.map)this.map.hasOwnProperty(T)&&G.call(w,this.map[T],T,this)},c.prototype.keys=function(){var G=[];return this.forEach(function(w,T){G.push(T)}),i(G)},c.prototype.values=function(){var G=[];return this.forEach(function(w){G.push(w)}),i(G)},c.prototype.entries=function(){var G=[];return this.forEach(function(w,T){G.push([T,w])}),i(G)},f.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);function u(G){if(G.bodyUsed)return Promise.reject(new TypeError("Already read"));G.bodyUsed=!0}function b(G){return new Promise(function(w,T){G.onload=function(){w(G.result)},G.onerror=function(){T(G.error)}})}function S(G){var w=new FileReader,T=b(w);return w.readAsArrayBuffer(G),T}function Z(G){var w=new FileReader,T=b(w);return w.readAsText(G),T}function I(G){for(var w=new Uint8Array(G),T=new Array(w.length),Y=0;Y<w.length;Y++)T[Y]=String.fromCharCode(w[Y]);return T.join("")}function R(G){if(G.slice)return G.slice(0);var w=new Uint8Array(G.byteLength);return w.set(new Uint8Array(G)),w.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(G){this._bodyInit=G,G?typeof G=="string"?this._bodyText=G:f.blob&&Blob.prototype.isPrototypeOf(G)?this._bodyBlob=G:f.formData&&FormData.prototype.isPrototypeOf(G)?this._bodyFormData=G:f.searchParams&&URLSearchParams.prototype.isPrototypeOf(G)?this._bodyText=G.toString():f.arrayBuffer&&f.blob&&h(G)?(this._bodyArrayBuffer=R(G.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):f.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(G)||p(G))?this._bodyArrayBuffer=R(G):this._bodyText=G=Object.prototype.toString.call(G):this._bodyText="",this.headers.get("content-type")||(typeof G=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):f.searchParams&&URLSearchParams.prototype.isPrototypeOf(G)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},f.blob&&(this.blob=function(){var G=u(this);if(G)return G;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?u(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(S)}),this.text=function(){var G=u(this);if(G)return G;if(this._bodyBlob)return Z(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(I(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},f.formData&&(this.formData=function(){return this.text().then(V)}),this.json=function(){return this.text().then(JSON.parse)},this}var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function X(G){var w=G.toUpperCase();return g.indexOf(w)>-1?w:G}function v(G,w){w=w||{};var T=w.body;if(G instanceof v){if(G.bodyUsed)throw new TypeError("Already read");this.url=G.url,this.credentials=G.credentials,w.headers||(this.headers=new c(G.headers)),this.method=G.method,this.mode=G.mode,this.signal=G.signal,!T&&G._bodyInit!=null&&(T=G._bodyInit,G.bodyUsed=!0)}else this.url=String(G);if(this.credentials=w.credentials||this.credentials||"same-origin",(w.headers||!this.headers)&&(this.headers=new c(w.headers)),this.method=X(w.method||this.method||"GET"),this.mode=w.mode||this.mode||null,this.signal=w.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&T)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(T)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})};function V(G){var w=new FormData;return G.trim().split("&").forEach(function(T){if(T){var Y=T.split("="),M=Y.shift().replace(/\+/g," "),U=Y.join("=").replace(/\+/g," ");w.append(decodeURIComponent(M),decodeURIComponent(U))}}),w}function W(G){var w=new c,T=G.replace(/\r?\n[\t ]+/g," ");return T.split(/\r?\n/).forEach(function(Y){var M=Y.split(":"),U=M.shift().trim();if(U){var _=M.join(":").trim();w.append(U,_)}}),w}y.call(v.prototype);function k(G,w){w||(w={}),this.type="default",this.status=w.status===void 0?200:w.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in w?w.statusText:"OK",this.headers=new c(w.headers),this.url=w.url||"",this._initBody(G)}y.call(k.prototype),k.prototype.clone=function(){return new k(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},k.error=function(){var G=new k(null,{status:0,statusText:""});return G.type="error",G};var N=[301,302,303,307,308];k.redirect=function(G,w){if(N.indexOf(w)===-1)throw new RangeError("Invalid status code");return new k(null,{status:w,headers:{location:G}})},d.DOMException=l.DOMException;try{new d.DOMException}catch{d.DOMException=function(w,T){this.message=w,this.name=T;var Y=Error(w);this.stack=Y.stack},d.DOMException.prototype=Object.create(Error.prototype),d.DOMException.prototype.constructor=d.DOMException}function D(G,w){return new Promise(function(T,Y){var M=new v(G,w);if(M.signal&&M.signal.aborted)return Y(new d.DOMException("Aborted","AbortError"));var U=new XMLHttpRequest;function _(){U.abort()}U.onload=function(){var B={status:U.status,statusText:U.statusText,headers:W(U.getAllResponseHeaders()||"")};B.url="responseURL"in U?U.responseURL:B.headers.get("X-Request-URL");var C="response"in U?U.response:U.responseText;T(new k(C,B))},U.onerror=function(){Y(new TypeError("Network request failed"))},U.ontimeout=function(){Y(new TypeError("Network request failed"))},U.onabort=function(){Y(new d.DOMException("Aborted","AbortError"))},U.open(M.method,M.url,!0),M.credentials==="include"?U.withCredentials=!0:M.credentials==="omit"&&(U.withCredentials=!1),"responseType"in U&&f.blob&&(U.responseType="blob"),M.headers.forEach(function(B,C){U.setRequestHeader(C,B)}),M.signal&&(M.signal.addEventListener("abort",_),U.onreadystatechange=function(){U.readyState===4&&M.signal.removeEventListener("abort",_)}),U.send(typeof M._bodyInit>"u"?null:M._bodyInit)})}return D.polyfill=!0,l.fetch||(l.fetch=D,l.Headers=c,l.Request=v,l.Response=k),d.Headers=c,d.Request=v,d.Response=k,d.fetch=D,Object.defineProperty(d,"__esModule",{value:!0}),d})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var r=n;t=r.fetch,t.default=r.fetch,t.fetch=r.fetch,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,e.exports=t})(nn,nn.exports);var rn=nn.exports;const qt=sn(rn),Pc=Object.freeze(Object.defineProperty({__proto__:null,default:qt},Symbol.toStringTag,{value:"Module"})),ht=e=>{let t={};return e&&(typeof Headers<"u"&&e instanceof Headers||Pc&&rn.Headers&&e instanceof rn.Headers?t=Oc(e):Array.isArray(e)?e.forEach(([s,n])=>{s&&n!==void 0&&(t[s]=n)}):t=e),t},Vr=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Dc=e=>{if(!Array.isArray(e.query)){const n=e,r=[`query=${encodeURIComponent(Vr(n.query))}`];return e.variables&&r.push(`variables=${encodeURIComponent(n.jsonSerializer.stringify(n.variables))}`),n.operationName&&r.push(`operationName=${encodeURIComponent(n.operationName)}`),r.join("&")}if(typeof e.variables<"u"&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,s=e.query.reduce((n,r,l)=>(n.push({query:Vr(r),variables:t.variables?t.jsonSerializer.stringify(t.variables[l]):void 0}),n),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(s))}`},Bc=e=>t=>at(void 0,null,function*(){var s;const{url:n,query:r,variables:l,operationName:d,fetch:f,fetchOptions:h,middleware:m}=t,p=ne({},t.headers);let o="",a;e==="POST"?(a=jc(r,l,d,h.jsonSerializer),typeof a=="string"&&(p["Content-Type"]="application/json")):o=Dc({query:r,variables:l,operationName:d,jsonSerializer:(s=h.jsonSerializer)!=null?s:en});const i=ne({method:e,headers:p,body:a},h);let c=n,u=i;if(m){const b=yield Promise.resolve(m(Bt(ne({},i),{url:n,operationName:d,variables:l}))),{url:S}=b,Z=Gt(b,["url"]);c=S,u=Z}return o&&(c=`${c}?${o}`),yield f(c,u)});let Qc=class{constructor(t,s={}){this.url=t,this.requestConfig=s,this.rawRequest=(...n)=>at(this,null,function*(){const[r,l,d]=n,f=Ec(r,l,d),h=this.requestConfig,{headers:m,fetch:p=qt,method:o="POST",requestMiddleware:a,responseMiddleware:i}=h,c=Gt(h,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:u}=this;f.signal!==void 0&&(c.signal=f.signal);const{operationName:b}=tn(f.query);return on({url:u,query:f.query,variables:f.variables,headers:ne(ne({},ht(ln(m))),ht(f.requestHeaders)),operationName:b,fetch:p,method:o,fetchOptions:c,middleware:a}).then(S=>(i&&i(S),S)).catch(S=>{throw i&&i(S),S})})}request(t,...s){return at(this,null,function*(){const[n,r]=s,l=Kc(t,n,r),d=this.requestConfig,{headers:f,fetch:h=qt,method:m="POST",requestMiddleware:p,responseMiddleware:o}=d,a=Gt(d,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:i}=this;l.signal!==void 0&&(a.signal=l.signal);const{query:c,operationName:u}=tn(l.document);return on({url:i,query:c,variables:l.variables,headers:ne(ne({},ht(ln(f))),ht(l.requestHeaders)),operationName:u,fetch:h,method:m,fetchOptions:a,middleware:p}).then(b=>(o&&o(b),b.data)).catch(b=>{throw o&&o(b),b})})}batchRequests(t,s){var n;const r=zc(t,s),l=this.requestConfig,{headers:d}=l,f=Gt(l,["headers"]);r.signal!==void 0&&(f.signal=r.signal);const h=r.documents.map(({document:p})=>tn(p).query),m=r.documents.map(({variables:p})=>p);return on({url:this.url,query:h,variables:m,headers:ne(ne({},ht(ln(d))),ht(r.requestHeaders)),operationName:void 0,fetch:(n=this.requestConfig.fetch)!=null?n:qt,method:this.requestConfig.method||"POST",fetchOptions:f,middleware:this.requestConfig.requestMiddleware}).then(p=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(p),p.data)).catch(p=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(p),p})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,s){const{headers:n}=this.requestConfig;return n?n[t]=s:this.requestConfig.headers={[t]:s},this}setEndpoint(t){return this.url=t,this}};const on=e=>at(void 0,null,function*(){var t,s;const{query:n,variables:r,fetchOptions:l}=e,d=Bc(Mc((t=e.method)!=null?t:"post")),f=Array.isArray(e.query),h=yield d(e),m=yield Ac(h,(s=l.jsonSerializer)!=null?s:en),p=Array.isArray(m)?!m.some(({data:a})=>!a):!!m.data,o=Array.isArray(m)||!m.errors||Array.isArray(m.errors)&&!m.errors.length||l.errorPolicy==="all"||l.errorPolicy==="ignore";if(h.ok&&o&&p){const a=m,i=Gt(a,["errors"]),c=l.errorPolicy==="ignore"?i:m;return Bt(ne({},f?{data:c}:c),{headers:h.headers,status:h.status})}else{const a=typeof m=="string"?{error:m}:m;throw new dt(Bt(ne({},a),{status:h.status,headers:h.headers}),{query:n,variables:r})}}),jc=(e,t,s,n)=>{const r=n??en;if(!Array.isArray(e))return r.stringify({query:e,variables:t,operationName:s});if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const l=e.reduce((d,f,h)=>(d.push({query:f,variables:t?t[h]:void 0}),d),[]);return r.stringify(l)},Ac=(e,t)=>at(void 0,null,function*(){let s;return e.headers.forEach((n,r)=>{r.toLowerCase()==="content-type"&&(s=n)}),s&&(s.toLowerCase().startsWith("application/json")||s.toLowerCase().startsWith("application/graphql+json")||s.toLowerCase().startsWith("application/graphql-response+json"))?t.parse(yield e.text()):e.text()}),ln=e=>typeof e=="function"?e():e;var an={exports:{}};(function(e,t){t=e.exports=s,t.getSerialize=n;function s(r,l,d,f){return JSON.stringify(r,n(l,f),d)}function n(r,l){var d=[],f=[];return l==null&&(l=function(h,m){return d[0]===m?"[Circular ~]":"[Circular ~."+f.slice(0,d.indexOf(m)).join(".")+"]"}),function(h,m){if(d.length>0){var p=d.indexOf(this);~p?d.splice(p+1):d.push(this),~p?f.splice(p,1/0,h):f.push(h),~d.indexOf(m)&&(m=l.call(this,h,m))}else d.push(m);return r==null?m:r.call(this,h,m)}}})(an,an.exports);var _c=an.exports;const $c=sn(_c);var es=function(){return es=Object.assign||function(e){for(var t,s=1,n=arguments.length;s<n;s++){t=arguments[s];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},es.apply(this,arguments)},ts=new Map,cn=new Map,Gr=!0,ss=!1;function Rr(e){return e.replace(/[\s,]+/g," ").trim()}function qc(e){return Rr(e.source.body.substring(e.start,e.end))}function eu(e){var t=new Set,s=[];return e.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var r=n.name.value,l=qc(n.loc),d=cn.get(r);d&&!d.has(l)?Gr&&console.warn("Warning: fragment with name "+r+` already exists.
50
50
  graphql-tag enforces all fragment names across your application to be unique; read more about
51
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):d||cn.set(r,d=new Set),d.add(a),t.has(a)||(t.add(a),s.push(n))}else s.push(n)}),es(es({},e),{definitions:s})}function qc(e){var t=new Set(e.definitions);t.forEach(function(n){n.loc&&delete n.loc,Object.keys(n).forEach(function(r){var a=n[r];a&&typeof a=="object"&&t.add(a)})});var s=e.loc;return s&&(delete s.startToken,delete s.endToken),e}function eu(e){var t=Rr(e);if(!ts.has(t)){var s=gr(e,{experimentalFragmentVariables:ss,allowLegacyFragmentVariables:ss});if(!s||s.kind!=="Document")throw new Error("Not a valid GraphQL document.");ts.set(t,qc($c(s)))}return ts.get(t)}function Ie(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];typeof e=="string"&&(e=[e]);var n=e[0];return t.forEach(function(r,a){r&&r.kind==="Document"?n+=r.loc.source.body:n+=r,n+=e[a+1]}),eu(n)}function tu(){ts.clear(),cn.clear()}function su(){Gr=!1}function nu(){ss=!0}function iu(){ss=!1}var wt={gql:Ie,resetCaches:tu,disableFragmentWarnings:su,enableExperimentalFragmentVariables:nu,disableExperimentalFragmentVariables:iu};(function(e){e.gql=wt.gql,e.resetCaches=wt.resetCaches,e.disableFragmentWarnings=wt.disableFragmentWarnings,e.enableExperimentalFragmentVariables=wt.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=wt.disableExperimentalFragmentVariables})(Ie||(Ie={})),Ie.default=Ie;const vr=Ie`
51
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):d||cn.set(r,d=new Set),d.add(l),t.has(l)||(t.add(l),s.push(n))}else s.push(n)}),es(es({},e),{definitions:s})}function tu(e){var t=new Set(e.definitions);t.forEach(function(n){n.loc&&delete n.loc,Object.keys(n).forEach(function(r){var l=n[r];l&&typeof l=="object"&&t.add(l)})});var s=e.loc;return s&&(delete s.startToken,delete s.endToken),e}function su(e){var t=Rr(e);if(!ts.has(t)){var s=gr(e,{experimentalFragmentVariables:ss,allowLegacyFragmentVariables:ss});if(!s||s.kind!=="Document")throw new Error("Not a valid GraphQL document.");ts.set(t,tu(eu(s)))}return ts.get(t)}function Ie(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];typeof e=="string"&&(e=[e]);var n=e[0];return t.forEach(function(r,l){r&&r.kind==="Document"?n+=r.loc.source.body:n+=r,n+=e[l+1]}),su(n)}function nu(){ts.clear(),cn.clear()}function iu(){Gr=!1}function ru(){ss=!0}function ou(){ss=!1}var wt={gql:Ie,resetCaches:nu,disableFragmentWarnings:iu,enableExperimentalFragmentVariables:ru,disableExperimentalFragmentVariables:ou};(function(e){e.gql=wt.gql,e.resetCaches=wt.resetCaches,e.disableFragmentWarnings=wt.disableFragmentWarnings,e.enableExperimentalFragmentVariables=wt.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=wt.disableExperimentalFragmentVariables})(Ie||(Ie={})),Ie.default=Ie;const vr=Ie`
52
52
  fragment MatchParts on MatchConfig {
53
53
  regexValue
54
54
  matchValue
55
55
  }
56
- `,ru=Ie`
56
+ `,lu=Ie`
57
57
  mutation PushPayload(
58
58
  $session_secure_id: String!
59
59
  $payload_id: ID!
@@ -91,7 +91,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):d
91
91
  data: $data
92
92
  )
93
93
  }
94
- `,ou=Ie`
94
+ `,au=Ie`
95
95
  mutation identifySession(
96
96
  $session_secure_id: String!
97
97
  $user_identifier: String!
@@ -103,7 +103,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):d
103
103
  user_object: $user_object
104
104
  )
105
105
  }
106
- `,lu=Ie`
106
+ `,cu=Ie`
107
107
  mutation addSessionProperties(
108
108
  $session_secure_id: String!
109
109
  $properties_object: Any
@@ -113,11 +113,11 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):d
113
113
  properties_object: $properties_object
114
114
  )
115
115
  }
116
- `,au=Ie`
116
+ `,uu=Ie`
117
117
  mutation pushMetrics($metrics: [MetricInput]!) {
118
118
  pushMetrics(metrics: $metrics)
119
119
  }
120
- `,cu=Ie`
120
+ `,du=Ie`
121
121
  mutation addSessionFeedback(
122
122
  $session_secure_id: String!
123
123
  $user_name: String
@@ -133,7 +133,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):d
133
133
  timestamp: $timestamp
134
134
  )
135
135
  }
136
- `,uu=Ie`
136
+ `,hu=Ie`
137
137
  mutation initializeSession(
138
138
  $session_secure_id: String!
139
139
  $session_key: String
@@ -221,11 +221,11 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):d
221
221
  }
222
222
  }
223
223
  ${vr}
224
- `,du=Ie`
224
+ `,pu=Ie`
225
225
  query Ignore($id: ID!) {
226
226
  ignore(id: $id)
227
227
  }
228
- `,hu=Ie`
228
+ `,mu=Ie`
229
229
  query GetSamplingConfig($organization_verbose_id: String!) {
230
230
  sampling(organization_verbose_id: $organization_verbose_id) {
231
231
  spans {
@@ -275,7 +275,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):d
275
275
  }
276
276
  }
277
277
  ${vr}
278
- `,pu=(e,t,s,n)=>e();function mu(e,t=pu){return{PushPayload(s,n){return t(r=>e.request(ru,s,ne(ne({},n),r)),"PushPayload","mutation",s)},PushSessionEvents(s,n){return t(r=>e.request(Wr,s,ne(ne({},n),r)),"PushSessionEvents","mutation",s)},identifySession(s,n){return t(r=>e.request(ou,s,ne(ne({},n),r)),"identifySession","mutation",s)},addSessionProperties(s,n){return t(r=>e.request(lu,s,ne(ne({},n),r)),"addSessionProperties","mutation",s)},pushMetrics(s,n){return t(r=>e.request(au,s,ne(ne({},n),r)),"pushMetrics","mutation",s)},addSessionFeedback(s,n){return t(r=>e.request(cu,s,ne(ne({},n),r)),"addSessionFeedback","mutation",s)},initializeSession(s,n){return t(r=>e.request(uu,s,ne(ne({},n),r)),"initializeSession","mutation",s)},Ignore(s,n){return t(r=>e.request(du,s,ne(ne({},n),r)),"Ignore","query",s)},GetSamplingConfig(s,n){return t(r=>e.request(hu,s,ne(ne({},n),r)),"GetSamplingConfig","query",s)}}}function fu(){var e=document.createElement("canvas");return e.getContext&&e.getContext("2d")?e.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function bu(){return fu()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}const yu="telemetry.sdk.name",gu="telemetry.sdk.version",wr=1e3,Zu=1e3*2,Su=4*60*60*1e3,un=15*60*1e3,kr={normal:{bytes:1e7,time:4*60*1e3},canvas:{bytes:16e6,time:5e3}},Iu=100,Cr="app.highlight.io",Xu="https://app.launchdarkly.com",Vu={"observability.ld-stg.launchdarkly.com":"ld-stg.launchdarkly.com","observability.app.launchdarkly.com":"app.launchdarkly.com","observability.app.ld.catamorphic.com":"app.ld.catamorphic.com"},Gu="/projects/default",Ru=new RegExp("pub\\.(?<domain>.+)");/*! js-cookie v3.0.8 | MIT */function ns(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)n!=="__proto__"&&(e[n]=s[n])}return e}var vu={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function dn(e,t){function s(r,a,d){if(typeof document<"u"){d=ns({},t,d),typeof d.expires=="number"&&(d.expires=new Date(Date.now()+d.expires*864e5)),d.expires&&(d.expires=d.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var f="";for(var h in d)d[h]&&(f+="; "+h,d[h]!==!0&&(f+="="+d[h].split(";")[0]));return document.cookie=r+"="+e.write(a,r)+f}}function n(r){if(!(typeof document>"u"||arguments.length&&!r)){for(var a=document.cookie?document.cookie.split("; "):[],d={},f=0;f<a.length;f++){var h=a[f].split("="),m=h.slice(1).join("=");try{var p=decodeURIComponent(h[0]);if(p in d||(d[p]=e.read(m,p)),r===p)break}catch{}}return r?d[r]:d}}return Object.create({set:s,get:n,remove:function(r,a){s(r,"",ns({},a,{expires:-1}))},withAttributes:function(r){return dn(this.converter,ns({},this.attributes,r))},withConverter:function(r){return dn(ns({},this.converter,r),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var is=dn(vu,{path:"/"}),hn=(e=>(e.CLIENT_ID="highlightClientID",e))(hn||{});let rs="localStorage",pn=!0,Wu=class{constructor(){Rt(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(t){var s;return(s=Object.keys(this.storage)[t])!=null?s:null}getItem(t){var s;return(s=this.storage[t])!=null?s:""}setItem(t,s){this.storage[t]=s}removeItem(t){delete this.storage[t]}},wu=class{getItem(t){var s;return(s=is.get(t))!=null?s:""}setItem(t,s){if(!pn)return;const n=new Date;n.setTime(n.getTime()+un),is.set(t,s,{expires:n})}removeItem(t){pn&&is.remove(t)}keys(){var t;return Object.keys((t=is.get())!=null?t:{})}};const pt=new Wu,mt=new wu,os=()=>{let e=null;if(typeof window>"u")return pt;try{switch(rs){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(lt("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${rs}; using global storage`),e=pt)}catch(t){lt("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=pt}return e},ku=e=>{rs=e},xr=e=>{pn=e},Ce=e=>{try{return os().getItem(e)}catch(t){return lt("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),pt.getItem(e)}},He=(e,t)=>{mt.setItem(e,t);try{return os().setItem(e,t)}catch(s){return lt("storage","setItem","debug",`failed to set item ${e}; using global storage`,s),pt.setItem(e,t)}},ls=e=>{mt.removeItem(e);try{return os().removeItem(e)}catch(t){return lt("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),pt.removeItem(e)}},Cu=e=>{if(rs==="sessionStorage"){console.warn("highlight.io cannot use local storage; segment integration will not work");return}if(typeof window>"u"){console.warn("highlight.io cannot use local storage (not a window); segment integration will not work");return}const t=window.localStorage.setItem;window.localStorage.setItem=function(){const[s,n]=arguments;e({keyName:s,keyValue:n}),t.apply(this,[s,n])}};var Xe=(e=>(e.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",e.SESSION_ID="sessionID",e.SESSION_DATA="sessionData",e.USER_IDENTIFIER="highlightIdentifier",e.USER_OBJECT="highlightUserObject",e))(Xe||{});const as=e=>`${Xe.SESSION_DATA}_${e}`,xu=()=>{var e;return typeof globalThis<"u"&&(e=globalThis.persistentSessionSecureID)!=null&&e.length?globalThis.persistentSessionSecureID:Tr()},Tu=e=>{typeof globalThis<"u"&&e!=null&&e.length&&(globalThis.persistentSessionSecureID=e)},Tr=()=>{var e;return(e=Ce(Xe.SESSION_ID))!=null?e:""},kt=e=>{He(Xe.SESSION_ID,e)},Lu=e=>{const t=as(e);return JSON.parse(Ce(t)||"{}")},cs=e=>{e||(e=Tr());let t=Lu(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<un)return t;ls(as(e))},st=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;Tu(t);const s=as(t);He(s,JSON.stringify(e)),Ju(s)},Nu=function(){const e=mt.getItem(Xe.SESSION_ID);kt(e);const t=as(e),s=mt.getItem(t);try{st(JSON.parse(s))}catch{}};function Ju(e){var t;const s=`${Xe.SESSION_DATA}_`,n=new Set,r=os();for(let a=r.length-1;a>=0;a--){const d=r.key(a);d&&d.startsWith(s)&&d!==e&&n.add(d)}for(const a of mt.keys())a.startsWith(s)&&a!==e&&n.add(a);for(const a of n){let d=!0;try{const f=Ce(a)||mt.getItem(a)||"{}",h=JSON.parse(f),m=(t=h.lastPushTime)!=null?t:h.sessionStartTime;d=m===void 0||Date.now()-m>=un}catch{}d&&(lt("highlightSession","pruneSessionData","debug",`removing session data for stale key ${a}`),ls(a))}}var Lr=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(Lr||{});const Yu=3,Uu=1e3,Fu=500,Mu=[Lr.BillingQuotaExceeded.toString()],Ou=e=>{var t;return((t=e.response.errors)==null?void 0:t.find(s=>Mu.includes(s.message)))===void 0},Ku=()=>{const e=(t,s,n,r,a=0)=>at(void 0,null,function*(){try{return yield t()}catch(d){if(d instanceof dt&&!Ou(d))throw d;if(a<Yu)return yield new Promise(f=>setTimeout(f,Uu+Fu*Math.pow(2,a))),yield e(t,s,n,r,a+1);throw console.error(`highlight.io: data request failed after ${a} retries`),d}});return e},Nr="feature_flag",Jr="launchdarkly",Eu=`${Nr}.set.id`,zu=`${Nr}.provider.name`,Hu=`${Jr}.application.id`,Pu=`${Jr}.application.version`,Du="$ld:telemetry:session:init",Yr="$ld:telemetry:track";function Ur(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function Fr(e){return e.kind==="multi"}function Mr(e){return Fr(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${Ur(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${Ur(e.key)}`:e.key}function Bu(e){return Fr(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,s)=>ne(ne({},t),s),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}let Qu=class{constructor(t,s){Rt(this,"client"),Rt(this,"metadata"),this.client=t,this.metadata=s}getHooks(t){return[]}init(t){this.client.track(Du,{sessionID:t})}recordGauge(t,s){}identify(t,s,n={},r){}error(t,s){}track(t,s){const n=s.event;this.client.track(n?`${Yr}:${n}`:Yr,Bt(ne({},s),{sessionID:t}))}},ju=class extends Bs{constructor(t,s){super(),Rt(this,"client"),this.client=new Qu(t,s)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(s,n,r)=>(this.load(this.client),n)}]}init(t){return this._bufferCall("init",[t])}recordGauge(t,s){return this._bufferCall("recordGauge",[t,s])}identify(t,s,n={},r){return this._bufferCall("identify",[t,s,n,r])}error(t,s){return this._bufferCall("error",[t,s])}track(t,s){return this._bufferCall("track",[t,s])}};const Au=e=>{e(window.location.href);const t=history.pushState;history.pushState=(a=>function(){var d=a.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),d})(history.pushState);const s=history.replaceState;history.replaceState=(a=>function(){var d=a.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),d})(history.replaceState);const n=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",n);const r=function(){e(window.location.href)};return window.addEventListener("locationchange",r),()=>{window.removeEventListener("popstate",n),window.removeEventListener("locationchange",r),history.pushState=t,history.replaceState=s}},_u="10.7.4",$u={version:_u},qu=$u.version;function Or(e,t){return td(e)}function ed(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(const s of e.classList)t.push(`.${s}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}const td=e=>{let t="";const s=e.getAttribute("class"),n=e.getAttribute("id");return n&&(t=t.concat(Kr(n,"#"))),s&&(t=t.concat(Kr(s,"."))),t===""&&(t=t.concat(e.tagName.toLowerCase())),t},Kr=(e,t)=>`${t}${e.trim().split(" ").join(t)}`,sd=e=>{let t;const s=()=>{clearTimeout(t),t=setTimeout(()=>{var n,r;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(r=(n=window.screen.orientation)==null?void 0:n.angle)!=null?r:0})},500)};return window.addEventListener("resize",s),s(),()=>window.removeEventListener("resize",s)};var Er={exports:{}};/**
278
+ `,fu=(e,t,s,n)=>e();function bu(e,t=fu){return{PushPayload(s,n){return t(r=>e.request(lu,s,ne(ne({},n),r)),"PushPayload","mutation",s)},PushSessionEvents(s,n){return t(r=>e.request(Wr,s,ne(ne({},n),r)),"PushSessionEvents","mutation",s)},identifySession(s,n){return t(r=>e.request(au,s,ne(ne({},n),r)),"identifySession","mutation",s)},addSessionProperties(s,n){return t(r=>e.request(cu,s,ne(ne({},n),r)),"addSessionProperties","mutation",s)},pushMetrics(s,n){return t(r=>e.request(uu,s,ne(ne({},n),r)),"pushMetrics","mutation",s)},addSessionFeedback(s,n){return t(r=>e.request(du,s,ne(ne({},n),r)),"addSessionFeedback","mutation",s)},initializeSession(s,n){return t(r=>e.request(hu,s,ne(ne({},n),r)),"initializeSession","mutation",s)},Ignore(s,n){return t(r=>e.request(pu,s,ne(ne({},n),r)),"Ignore","query",s)},GetSamplingConfig(s,n){return t(r=>e.request(mu,s,ne(ne({},n),r)),"GetSamplingConfig","query",s)}}}function yu(){var e=document.createElement("canvas");return e.getContext&&e.getContext("2d")?e.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function gu(){return yu()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}const Zu="telemetry.sdk.name",Su="telemetry.sdk.version",wr=1e3,Iu=1e3*2,Xu=4*60*60*1e3,un=15*60*1e3,kr={normal:{bytes:1e7,time:4*60*1e3},canvas:{bytes:16e6,time:5e3}},Vu=100,Cr="app.highlight.io",Gu="https://app.launchdarkly.com",Ru={"observability.ld-stg.launchdarkly.com":"ld-stg.launchdarkly.com","observability.app.launchdarkly.com":"app.launchdarkly.com","observability.app.ld.catamorphic.com":"app.ld.catamorphic.com"},vu="/projects/default",Wu=new RegExp("pub\\.(?<domain>.+)");/*! js-cookie v3.0.8 | MIT */function ns(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)n!=="__proto__"&&(e[n]=s[n])}return e}var wu={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function dn(e,t){function s(r,l,d){if(typeof document<"u"){d=ns({},t,d),typeof d.expires=="number"&&(d.expires=new Date(Date.now()+d.expires*864e5)),d.expires&&(d.expires=d.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var f="";for(var h in d)d[h]&&(f+="; "+h,d[h]!==!0&&(f+="="+d[h].split(";")[0]));return document.cookie=r+"="+e.write(l,r)+f}}function n(r){if(!(typeof document>"u"||arguments.length&&!r)){for(var l=document.cookie?document.cookie.split("; "):[],d={},f=0;f<l.length;f++){var h=l[f].split("="),m=h.slice(1).join("=");try{var p=decodeURIComponent(h[0]);if(p in d||(d[p]=e.read(m,p)),r===p)break}catch{}}return r?d[r]:d}}return Object.create({set:s,get:n,remove:function(r,l){s(r,"",ns({},l,{expires:-1}))},withAttributes:function(r){return dn(this.converter,ns({},this.attributes,r))},withConverter:function(r){return dn(ns({},this.converter,r),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var is=dn(wu,{path:"/"}),hn=(e=>(e.CLIENT_ID="highlightClientID",e))(hn||{});let rs="localStorage",pn=!0,ku=class{constructor(){Rt(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(t){var s;return(s=Object.keys(this.storage)[t])!=null?s:null}getItem(t){var s;return(s=this.storage[t])!=null?s:""}setItem(t,s){this.storage[t]=s}removeItem(t){delete this.storage[t]}},Cu=class{getItem(t){var s;return(s=is.get(t))!=null?s:""}setItem(t,s){if(!pn)return;const n=new Date;n.setTime(n.getTime()+un),is.set(t,s,{expires:n})}removeItem(t){pn&&is.remove(t)}keys(){var t;return Object.keys((t=is.get())!=null?t:{})}};const pt=new ku,mt=new Cu,os=()=>{let e=null;if(typeof window>"u")return pt;try{switch(rs){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(lt("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${rs}; using global storage`),e=pt)}catch(t){lt("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=pt}return e},xu=e=>{rs=e},xr=e=>{pn=e},Ce=e=>{try{return os().getItem(e)}catch(t){return lt("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),pt.getItem(e)}},He=(e,t)=>{mt.setItem(e,t);try{return os().setItem(e,t)}catch(s){return lt("storage","setItem","debug",`failed to set item ${e}; using global storage`,s),pt.setItem(e,t)}},ls=e=>{mt.removeItem(e);try{return os().removeItem(e)}catch(t){return lt("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),pt.removeItem(e)}},Tu=e=>{if(rs==="sessionStorage"){console.warn("highlight.io cannot use local storage; segment integration will not work");return}if(typeof window>"u"){console.warn("highlight.io cannot use local storage (not a window); segment integration will not work");return}const t=window.localStorage.setItem;window.localStorage.setItem=function(){const[s,n]=arguments;e({keyName:s,keyValue:n}),t.apply(this,[s,n])}};var Xe=(e=>(e.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",e.SESSION_ID="sessionID",e.SESSION_DATA="sessionData",e.USER_IDENTIFIER="highlightIdentifier",e.USER_OBJECT="highlightUserObject",e))(Xe||{});const as=e=>`${Xe.SESSION_DATA}_${e}`,Lu=()=>{var e;return typeof globalThis<"u"&&(e=globalThis.persistentSessionSecureID)!=null&&e.length?globalThis.persistentSessionSecureID:Tr()},Nu=e=>{typeof globalThis<"u"&&e!=null&&e.length&&(globalThis.persistentSessionSecureID=e)},Tr=()=>{var e;return(e=Ce(Xe.SESSION_ID))!=null?e:""},kt=e=>{He(Xe.SESSION_ID,e)},Ju=e=>{const t=as(e);return JSON.parse(Ce(t)||"{}")},cs=e=>{e||(e=Tr());let t=Ju(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<un)return t;ls(as(e))},st=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;Nu(t);const s=as(t);He(s,JSON.stringify(e)),Uu(s)},Yu=function(){const e=mt.getItem(Xe.SESSION_ID);kt(e);const t=as(e),s=mt.getItem(t);try{st(JSON.parse(s))}catch{}};function Uu(e){var t;const s=`${Xe.SESSION_DATA}_`,n=new Set,r=os();for(let l=r.length-1;l>=0;l--){const d=r.key(l);d&&d.startsWith(s)&&d!==e&&n.add(d)}for(const l of mt.keys())l.startsWith(s)&&l!==e&&n.add(l);for(const l of n){let d=!0;try{const f=Ce(l)||mt.getItem(l)||"{}",h=JSON.parse(f),m=(t=h.lastPushTime)!=null?t:h.sessionStartTime;d=m===void 0||Date.now()-m>=un}catch{}d&&(lt("highlightSession","pruneSessionData","debug",`removing session data for stale key ${l}`),ls(l))}}var Lr=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(Lr||{});const Fu=3,Mu=1e3,Ou=500,Ku=[Lr.BillingQuotaExceeded.toString()],Eu=e=>{var t;return((t=e.response.errors)==null?void 0:t.find(s=>Ku.includes(s.message)))===void 0},zu=()=>{const e=(t,s,n,r,l=0)=>at(void 0,null,function*(){try{return yield t()}catch(d){if(d instanceof dt&&!Eu(d))throw d;if(l<Fu)return yield new Promise(f=>setTimeout(f,Mu+Ou*Math.pow(2,l))),yield e(t,s,n,r,l+1);throw console.error(`highlight.io: data request failed after ${l} retries`),d}});return e},Nr="feature_flag",Jr="launchdarkly",Hu=`${Nr}.set.id`,Pu=`${Nr}.provider.name`,Du=`${Jr}.application.id`,Bu=`${Jr}.application.version`,Qu="$ld:telemetry:session:init",Yr="$ld:telemetry:track";function Ur(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function Fr(e){return e.kind==="multi"}function Mr(e){return Fr(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${Ur(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${Ur(e.key)}`:e.key}function ju(e){return Fr(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,s)=>ne(ne({},t),s),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}let Au=class{constructor(t,s){Rt(this,"client"),Rt(this,"metadata"),this.client=t,this.metadata=s}getHooks(t){return[]}init(t){this.client.track(Qu,{sessionID:t})}recordGauge(t,s){}identify(t,s,n={},r){}error(t,s){}track(t,s){const n=s.event;this.client.track(n?`${Yr}:${n}`:Yr,Bt(ne({},s),{sessionID:t}))}},_u=class extends Bs{constructor(t,s){super(),Rt(this,"client"),this.client=new Au(t,s)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(s,n,r)=>(this.load(this.client),n)}]}init(t){return this._bufferCall("init",[t])}recordGauge(t,s){return this._bufferCall("recordGauge",[t,s])}identify(t,s,n={},r){return this._bufferCall("identify",[t,s,n,r])}error(t,s){return this._bufferCall("error",[t,s])}track(t,s){return this._bufferCall("track",[t,s])}};const $u=e=>{e(window.location.href);const t=history.pushState;history.pushState=(l=>function(){var d=l.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),d})(history.pushState);const s=history.replaceState;history.replaceState=(l=>function(){var d=l.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),d})(history.replaceState);const n=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",n);const r=function(){e(window.location.href)};return window.addEventListener("locationchange",r),()=>{window.removeEventListener("popstate",n),window.removeEventListener("locationchange",r),history.pushState=t,history.replaceState=s}},qu="10.7.5",ed={version:qu},td=ed.version;function Or(e,t){return nd(e)}function sd(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(const s of e.classList)t.push(`.${s}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}const nd=e=>{let t="";const s=e.getAttribute("class"),n=e.getAttribute("id");return n&&(t=t.concat(Kr(n,"#"))),s&&(t=t.concat(Kr(s,"."))),t===""&&(t=t.concat(e.tagName.toLowerCase())),t},Kr=(e,t)=>`${t}${e.trim().split(" ").join(t)}`,id=e=>{let t;const s=()=>{clearTimeout(t),t=setTimeout(()=>{var n,r;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(r=(n=window.screen.orientation)==null?void 0:n.angle)!=null?r:0})},500)};return window.addEventListener("resize",s),s(),()=>window.removeEventListener("resize",s)};var Er={exports:{}};/**
279
279
  * @preserve
280
280
  * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
281
281
  *
@@ -285,7 +285,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):d
285
285
  * @see http://github.com/garycourt/murmurhash-js
286
286
  * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
287
287
  * @see http://sites.google.com/site/murmurhash/
288
- */(function(e){(function(){var t;function s(n,r){var a=this instanceof s?this:t;if(a.reset(r),typeof n=="string"&&n.length>0&&a.hash(n),a!==this)return a}s.prototype.hash=function(n){var r,a,d,f,h;switch(h=n.length,this.len+=h,a=this.k1,d=0,this.rem){case 0:a^=h>d?n.charCodeAt(d++)&65535:0;case 1:a^=h>d?(n.charCodeAt(d++)&65535)<<8:0;case 2:a^=h>d?(n.charCodeAt(d++)&65535)<<16:0;case 3:a^=h>d?(n.charCodeAt(d)&255)<<24:0,a^=h>d?(n.charCodeAt(d++)&65280)>>8:0}if(this.rem=h+this.rem&3,h-=this.rem,h>0){for(r=this.h1;a=a*11601+(a&65535)*3432906752&4294967295,a=a<<15|a>>>17,a=a*13715+(a&65535)*461832192&4294967295,r^=a,r=r<<13|r>>>19,r=r*5+3864292196&4294967295,!(d>=h);)a=n.charCodeAt(d++)&65535^(n.charCodeAt(d++)&65535)<<8^(n.charCodeAt(d++)&65535)<<16,f=n.charCodeAt(d++),a^=(f&255)<<24^(f&65280)>>8;switch(a=0,this.rem){case 3:a^=(n.charCodeAt(d+2)&65535)<<16;case 2:a^=(n.charCodeAt(d+1)&65535)<<8;case 1:a^=n.charCodeAt(d)&65535}this.h1=r}return this.k1=a,this},s.prototype.result=function(){var n,r;return n=this.k1,r=this.h1,n>0&&(n=n*11601+(n&65535)*3432906752&4294967295,n=n<<15|n>>>17,n=n*13715+(n&65535)*461832192&4294967295,r^=n),r^=this.len,r^=r>>>16,r=r*51819+(r&65535)*2246770688&4294967295,r^=r>>>13,r=r*44597+(r&65535)*3266445312&4294967295,r^=r>>>16,r>>>0},s.prototype.reset=function(n){return this.h1=typeof n=="number"?n:0,this.rem=this.k1=this.len=0,this},t=new s,e.exports=s})()})(Er);var nd=Er.exports;const id=sn(nd),mn=28,ft="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",rd=2246822507,Ct=e=>{var t,s="";if(e){const n=id(e).result();for(let r=0;r<mn;r++){const a=((n^r*rd)>>>0)%ft.length;s+=ft.charAt(a)}}else{const n=typeof window<"u"&&((t=window.crypto)==null?void 0:t.getRandomValues),r=new Uint32Array(mn);n&&window.crypto.getRandomValues(r);for(let a=0;a<mn;a++)n?s+=ft.charAt(r[a]%ft.length):s+=ft.charAt(Math.floor(Math.random()*ft.length))}return s};let od=class{constructor(t){Rt(this,"sessionSecureID");try{t!=null&&t.storageMode&&ku(t?.storageMode),xr(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?Nu():xr(!1)}catch(s){we("Error initializing @launchdarkly observability plugin","error",s)}}configureSession(t,s){try{const n=xu();let r=cs(n);r!=null&&r.sessionSecureID?this.sessionSecureID=r.sessionSecureID:(s!=null&&s.sessionKey?this.sessionSecureID=Ct(`${t}-${s.sessionKey}`):this.sessionSecureID=Ct(),kt(this.sessionSecureID),st({sessionSecureID:this.sessionSecureID,sessionKey:s?.sessionKey,projectID:0,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(n){we("Error configuring session in @launchdarkly observability plugin","error",n)}}};var ld=(e,t,s)=>new Promise((n,r)=>{var a=h=>{try{f(s.next(h))}catch(m){r(m)}},d=h=>{try{f(s.throw(h))}catch(m){r(m)}},f=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,d);f((s=s.apply(e,t)).next())});class zr extends Bs{getSession(){return this._isLoaded?this._bufferCall("getSession",[]):null}start(t){return ld(this,null,function*(){return this._sdk.start(t)})}stop(){return this._sdk.stop()}addSessionProperties(t){return this._bufferCall("addSessionProperties",[t])}getRecordingState(){return this._isLoaded?this._bufferCall("getRecordingState",[]):"NotRecording"}snapshot(t){return this._isLoaded?this._bufferCall("snapshot",[t]):Promise.resolve(void 0)}register(t,s){return this._bufferCall("register",[t,s])}}Le.LDRecord=void 0,typeof globalThis<"u"?globalThis.LDRecord?Le.LDRecord=globalThis.LDRecord:(Le.LDRecord=new zr,globalThis.LDRecord=Le.LDRecord):Le.LDRecord=new zr;var ad=Object.defineProperty,cd=Object.defineProperties,ud=Object.getOwnPropertyDescriptors,us=Object.getOwnPropertySymbols,Hr=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,Dr=e=>{throw TypeError(e)},fn=(e,t,s)=>t in e?ad(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,z=(e,t)=>{for(var s in t||(t={}))Hr.call(t,s)&&fn(e,s,t[s]);if(us)for(var s of us(t))Pr.call(t,s)&&fn(e,s,t[s]);return e},ge=(e,t)=>cd(e,ud(t)),ds=(e,t)=>{var s={};for(var n in e)Hr.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(e!=null&&us)for(var n of us(e))t.indexOf(n)<0&&Pr.call(e,n)&&(s[n]=e[n]);return s},Q=(e,t,s)=>fn(e,typeof t!="symbol"?t+"":t,s),Br=(e,t,s)=>t.has(e)||Dr("Cannot "+s),dd=(e,t,s)=>(Br(e,t,"read from private field"),s?s.call(e):t.get(e)),hd=(e,t,s)=>t.has(e)?Dr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),pd=(e,t,s,n)=>(Br(e,t,"write to private field"),t.set(e,s),s),Ve=(e,t,s)=>new Promise((n,r)=>{var a=h=>{try{f(s.next(h))}catch(m){r(m)}},d=h=>{try{f(s.throw(h))}catch(m){r(m)}},f=h=>h.done?n(h.value):Promise.resolve(h.value).then(a,d);f((s=s.apply(e,t)).next())});const md={key:"_sid"},fd="rrweb/sequential-id@1",bd=e=>{const t=md;let s=0;return{name:fd,eventProcessor(n){return Object.assign(n,{[t.key]:++s}),n},options:t}};var yd=Object.defineProperty,gd=(e,t,s)=>t in e?yd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,L=(e,t,s)=>gd(e,typeof t!="symbol"?t+"":t,s),Qr,Zd=Object.defineProperty,Sd=(e,t,s)=>t in e?Zd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,jr=(e,t,s)=>Sd(e,typeof t!="symbol"?t+"":t,s),be=(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))(be||{});const hs=new Map,Ar=new WeakSet;function _r(e){return e!==null&&typeof e=="object"&&"complete"in e&&"naturalWidth"in e&&"naturalHeight"in e&&"src"in e&&"onload"in e}function Id(e){if(Ar.has(e))return;Ar.add(e);const t=e.drawImage.bind(e);e.drawImage=function(s,...n){const r=hs.get(e);r&&(r.cancelled=!0);const a=()=>{n.length===2&&_r(s)&&n.push(s.naturalWidth||s.width,s.naturalHeight||s.height),t(s,...n)};if(_r(s)&&!s.complete){const d={cancelled:!1};hs.set(e,d);const f=()=>{d.cancelled||(hs.delete(e),a())},h=()=>{if(!d.cancelled){hs.delete(e);try{a()}catch{}}};s.onload=f,s.onerror=h}else a()}}const $r={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},qr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ps={},eo={},Xd=()=>!!globalThis.Zone;function bn(e){if(ps[e])return ps[e];const t=globalThis[e],s=t.prototype,n=e in $r?$r[e]:void 0,r=!!(n&&n.every(f=>{var h,m;return!!((m=(h=Object.getOwnPropertyDescriptor(s,f))==null?void 0:h.get)!=null&&m.toString().includes("[native code]"))})),a=e in qr?qr[e]:void 0,d=!!(a&&a.every(f=>{var h;return typeof s[f]=="function"&&((h=s[f])==null?void 0:h.toString().includes("[native code]"))}));if(r&&d&&!Xd())return ps[e]=t.prototype,t.prototype;try{const f=document.createElement("iframe");f.style.display="none",document.body.appendChild(f);const h=f.contentWindow;if(!h)return t.prototype;const m=h[e].prototype;if(!m)return f.remove(),s;const p=navigator.userAgent;return p.includes("Safari")&&!p.includes("Chrome")?(f.classList.add("rr-block"),f.setAttribute("__rrwebUntaintedMutationObserver",""),eo[e]=()=>f.remove()):f.remove(),ps[e]=m}catch{return s}}const yn={};function Pe(e,t,s){var n;const r=`${e}.${String(s)}`;if(yn[r])return yn[r].call(t);const a=bn(e),d=(n=Object.getOwnPropertyDescriptor(a,s))==null?void 0:n.get;return d?(yn[r]=d,d.call(t)):t[s]}const gn={};function to(e,t,s){const n=`${e}.${String(s)}`;if(gn[n])return gn[n].bind(t);const r=bn(e)[s];return typeof r!="function"?t[s]:(gn[n]=r,r.bind(t))}function Vd(e){return Pe("Node",e,"ownerDocument")}function Gd(e){return Pe("Node",e,"childNodes")}function Rd(e){return Pe("Node",e,"parentNode")}function vd(e){return Pe("Node",e,"parentElement")}function Wd(e){return Pe("Node",e,"textContent")}function wd(e,t){return to("Node",e,"contains")(t)}function kd(e){return to("Node",e,"getRootNode")()}function Cd(e){return!e||!("host"in e)?null:Pe("ShadowRoot",e,"host")}function xd(e){return e.styleSheets}function Td(e){return!e||!("shadowRoot"in e)?null:Pe("Element",e,"shadowRoot")}function Ld(e,t){return Pe("Element",e,"querySelector")(t)}function Nd(e,t){return Pe("Element",e,"querySelectorAll")(t)}function Jd(){var e;return[bn("MutationObserver").constructor,(e=eo.MutationObserver)!=null?e:()=>{}]}let so=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(so=()=>new Date().getTime());function Yd(e,t,s){try{if(!(t in e))return()=>{};const n=e[t],r=s(n);return typeof r=="function"&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=r,()=>{e[t]=n}}catch{return()=>{}}}const Ze={ownerDocument:Vd,childNodes:Gd,parentNode:Rd,parentElement:vd,textContent:Wd,contains:wd,getRootNode:kd,host:Cd,styleSheets:xd,shadowRoot:Td,querySelector:Ld,querySelectorAll:Nd,nowTimestamp:so,mutationObserverCtor:Jd,patch:Yd,wrapCanvasContextDrawImage:Id};function no(e){return e.nodeType===e.ELEMENT_NODE}function xt(e){const t=e&&"host"in e&&"mode"in e&&Ze.host(e)||null;return!!(t&&"shadowRoot"in t&&Ze.shadowRoot(t)===e)}function Tt(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Ud(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 Fd(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const s=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?s.push("layer"):e.layerName&&s.push(`layer(${e.layerName})`),e.supportsText&&s.push(`supports(${e.supportsText})`),e.media.length&&s.push(e.media.mediaText),s.join(" ")+";"}function Zn(e){try{const t=e.rules||e.cssRules;if(!t)return null;let s=e.href;!s&&e.ownerNode&&(s=e.ownerNode.baseURI);const n=Array.from(t,r=>io(r,s)).join("");return Ud(n)}catch{return null}}function io(e,t){if(ro(e)){let s;try{s=Zn(e.styleSheet)||Fd(e)}catch{s=e.cssText}return e.styleSheet.href?bs(s,e.styleSheet.href):s}else{let s=e.cssText;return Od(e)&&e.selectorText.includes(":")&&(s=Md(s)),t?bs(s,t):s}}function Md(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function ro(e){return"styleSheet"in e}function Od(e){return"selectorText"in e}class oo{constructor(){jr(this,"idNodeMap",new Map),jr(this,"nodeMetaMap",new WeakMap)}getId(t){var s;if(!t)return-1;const n=(s=this.getMeta(t))==null?void 0:s.id;return n??-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){const s=this.getId(t);this.idNodeMap.delete(s),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,s){const n=s.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,s)}replace(t,s){const n=this.getNode(t);if(n){const r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(s,r)}this.idNodeMap.set(t,s)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Kd(){return new oo}function ms({element:e,maskInputOptions:t,tagName:s,type:n,value:r,overwriteRecord:a,maskInputFn:d}){let f=r||"";return uo({maskInputOptions:t,tagName:s,type:n,overwriteRecord:a})&&(d?f=d(f,e):f="*".repeat(f.length)),f}function nt(e){return e.toLowerCase()}const lo="__rrweb_original__";function Ed(e){const t=e.getContext("2d");if(!t)return!0;const s=50;for(let n=0;n<e.width;n+=s)for(let r=0;r<e.height;r+=s){const a=t.getImageData,d=lo in a?a[lo]:a;if(new Uint32Array(d.call(t,n,r,Math.min(s,e.width-n),Math.min(s,e.height-r)).data.buffer).some(f=>f!==0))return!1}return!0}function fs(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?nt(t):null}function ao(e,t){var s;let n;try{n=new URL(e,window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,a=n.pathname.match(r);return(s=a?.[1])!=null?s:null}function zd(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const Hd=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Pd=/^(?:[a-z+]+:)?\/\//i,Dd=/^www\..*/i,Bd=/^(data:)([^,]*),(.*)/i;function bs(e,t){return(e||"").replace(Hd,(s,n,r,a,d,f)=>{const h=r||d||f,m=n||a||"";if(!h)return s;if(Pd.test(h)||Dd.test(h))return`url(${m}${h}${m})`;if(Bd.test(h))return`url(${m}${h}${m})`;if(h[0]==="/")return`url(${m}${zd(t)+h}${m})`;const p=h.split("#")[0],o=h.substring(p.length),l=t.split("#")[0].split("/"),i=p.split("/");l.pop();for(const c of i)c!=="."&&(c===".."?l.pop():l.push(c));return`url(${m}${l.join("/")}${o}${m})`})}function ys(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Qd(e,t,s=!1){const n=Array.from(t.childNodes),r=[];let a=0;if(n.length>1&&e&&typeof e=="string"){let d=ys(e,s);const f=d.length/e.length;for(let h=1;h<n.length;h++)if(n[h].textContent&&typeof n[h].textContent=="string"){const m=ys(n[h].textContent,s),p=100;let o=3;for(;o<m.length&&(m[o].match(/[a-zA-Z0-9]/)||m.indexOf(m.substring(0,o),1)!==-1);o++);for(;o<m.length;o++){let l=m.substring(0,o),i=d.split(l),c=-1;if(i.length===2)c=i[0].length;else if(i.length>2&&i[0]===""&&n[h-1].textContent!=="")c=d.indexOf(l,1);else if(i.length===1){if(l=l.substring(0,l.length-1),i=d.split(l),i.length<=1)return r.push(e),r;o=p+1}else o===m.length-1&&(c=d.indexOf(l));if(i.length>=2&&o>p){const u=n[h-1].textContent;if(u&&typeof u=="string"){const b=ys(u).length;c=d.indexOf(l,b)}c===-1&&(c=i[0].length)}if(c!==-1){let u=Math.floor(c/f);for(;u>0&&u<e.length;){if(a+=1,a>50*n.length)return r.push(e),r;const b=ys(e.substring(0,u),s);if(b.length===c){r.push(e.substring(0,u)),e=e.substring(u),d=d.substring(c);break}else b.length<c?u+=Math.max(1,Math.floor((c-b.length)/f)):u-=Math.max(1,Math.floor((b.length-c)*f))}break}}}}return r.push(e),r}function jd(e,t){return Qd(e,t).join("/* rr_split */")}function Sn(e){return e=e.replace(/[^ -~]+/g,""),e=e?.split(" ").map(t=>t?Math.random().toString(20).substring(2,t.length+2):"").join(" ")||"",e}function In(e){return e==="img"||e==="video"||e==="audio"||e==="source"}const Ad=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),_d=new RegExp(/[0-9]{9,16}/),$d=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),qd=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),eh=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),th=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),sh=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),nh=[Ad,_d,$d,qd,eh,th,sh];function co(e){return e?nh.some(t=>t.test(e)):!1}const uo=({maskInputOptions:e,tagName:t,type:s,overwriteRecord:n})=>{const r=s&&s.toLowerCase();return n!=="true"&&(!!e[t.toLowerCase()]||!!(r&&e[r]))};let ih=1;const rh=new RegExp("[^a-z0-9-_:]"),Lt=-2;function ho(){return ih++}function oh(e){if(e instanceof HTMLFormElement)return"form";const t=nt(e.tagName);return rh.test(t)?"div":t}let bt,po;const lh=/^[^ \t\n\r\u000c]+/,ah=/^[, \t\n\r\u000c]+/;function ch(e,t){if(t.trim()==="")return t;let s=0;function n(a){let d;const f=a.exec(t.substring(s));return f?(d=f[0],s+=d.length,d):""}const r=[];for(;n(ah),!(s>=t.length);){let a=n(lh);if(a.slice(-1)===",")a=gs(e,a.substring(0,a.length-1)),r.push(a);else{let d="";a=gs(e,a);let f=!1;for(;;){const h=t.charAt(s);if(h===""){r.push((a+d).trim());break}else if(f)h===")"&&(f=!1);else if(h===","){s+=1,r.push((a+d).trim());break}else h==="("&&(f=!0);d+=h,s+=1}}}return r.join(", ")}const mo=new WeakMap;function gs(e,t){return!t||t.trim()===""?t:Xn(e,t)}function uh(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Xn(e,t){let s=mo.get(e);if(s||(s=e.createElement("a"),mo.set(e,s)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return s.setAttribute("href",t),s.href}function fo(e,t,s,n){return n&&(s==="src"||s==="href"&&!(t==="use"&&n[0]==="#")||s==="xlink:href"&&n[0]!=="#"||s==="background"&&["table","td","th"].includes(t)?gs(e,n):s==="srcset"?ch(e,n):s==="style"?bs(n,Xn(e)):t==="object"&&s==="data"?gs(e,n):n)}function bo(e,t,s){return["video","audio"].includes(e)&&t==="autoplay"}function yo(e,t,s){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(s)return e.matches(s)}catch{}return!1}function Zs(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return s?Zs(Ze.parentNode(e),t,s):!1;for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return s?Zs(Ze.parentNode(e),t,s):!1}function go(e,t,s,n){let r;if(no(e)){if(r=e,!Ze.childNodes(r).length)return!1}else{if(Ze.parentElement(e)===null)return!1;r=Ze.parentElement(e)}try{if(typeof t=="string"){if(n){if(r.closest(`.${t}`))return!0}else if(r.classList.contains(t))return!0}else if(Zs(r,t,n))return!0;if(s){if(n){if(r.closest(s))return!0}else if(r.matches(s))return!0}}catch{}return!1}function dh(e,t,s){const n=e.contentWindow;if(!n)return;let r=!1,a;try{a=n.document.readyState}catch{return}if(a!=="complete"){const f=setTimeout(()=>{r||(t(),r=!0)},s);e.addEventListener("load",()=>{clearTimeout(f),r=!0,t()});return}const d="about:blank";if(n.location.href!==d||e.src===d||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function hh(e,t,s){let n=!1,r;try{r=e.sheet}catch{return}if(r)return;const a=setTimeout(()=>{n||(t(),n=!0)},s);e.addEventListener("load",()=>{clearTimeout(a),n=!0,t()})}function ph(e,t){const{doc:s,mirror:n,blockClass:r,blockSelector:a,needsMask:d,inlineStylesheet:f,maskInputOptions:h={},maskTextClass:m,maskTextFn:p,maskInputFn:o,dataURLOptions:l={},inlineImages:i,inlineVideos:c,recordCanvas:u,keepIframeSrcFn:b,newlyAddedElement:S=!1,cssCaptured:Z=!1,privacySetting:I}=t,R=mh(s,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:be.Document,childNodes:[],compatMode:e.compatMode}:{type:be.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:be.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:R};case e.ELEMENT_NODE:return bh(e,{doc:s,blockClass:r,blockSelector:a,inlineStylesheet:f,maskInputOptions:h,maskInputFn:o,maskTextClass:m,dataURLOptions:l,inlineImages:i,inlineVideos:c,recordCanvas:u,keepIframeSrcFn:b,newlyAddedElement:S,privacySetting:I,rootId:R});case e.TEXT_NODE:return fh(e,{doc:s,needsMask:d,maskTextFn:p,privacySetting:I,rootId:R,cssCaptured:Z});case e.CDATA_SECTION_NODE:return{type:be.CDATA,textContent:"",rootId:R};case e.COMMENT_NODE:return{type:be.Comment,textContent:Ze.textContent(e)||"",rootId:R};default:return!1}}function mh(e,t){if(!t.hasNode(e))return;const s=t.getId(e);return s===1?void 0:s}function fh(e,t){var s;const{needsMask:n,maskTextFn:r,privacySetting:a,rootId:d,cssCaptured:f}=t,h=Ze.parentNode(e),m=h&&h.tagName;let p="";const o=m==="STYLE"?!0:void 0,l=m==="SCRIPT"?!0:void 0;l?p="SCRIPT_PLACEHOLDER":f||(p=Ze.textContent(e),o&&p&&(p=bs(p,Xn(t.doc)))),!o&&!l&&p&&n&&(p=r?r(p,Ze.parentElement(e)):p.replace(/[\S]/g,"*"));const i=a==="strict",c=(s=e.parentElement)==null?void 0:s.getAttribute("data-hl-record"),u=a==="default"&&co(p);return(i||u)&&!c&&m&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(m)&&p&&(p=Sn(p)),{type:be.Text,textContent:p||"",rootId:d}}function bh(e,t){const{doc:s,blockClass:n,blockSelector:r,inlineStylesheet:a,maskInputOptions:d={},maskInputFn:f,maskTextClass:h,dataURLOptions:m={},inlineImages:p,inlineVideos:o,recordCanvas:l,keepIframeSrcFn:i,newlyAddedElement:c=!1,privacySetting:u,rootId:b}=t;let S=yo(e,n,r);const Z=yo(e,h,null),I=u==="strict";let R=oh(e),y={};const g=e.attributes.length;for(let V=0;V<g;V++){const W=e.attributes[V];bo(R,W.name)||(y[W.name]=fo(s,R,nt(W.name),W.value))}if(R==="link"&&a){const V=Array.from(s.styleSheets).find(k=>k.href===e.href);let W=null;V&&(W=Zn(V)),W&&(delete y.rel,delete y.href,y._cssText=W)}if(R==="style"&&e.sheet){let V=Zn(e.sheet);V&&(e.childNodes.length>1&&(V=jd(V,e)),y._cssText=V)}if(["input","textarea","select"].includes(R)){const V=e.value,W=e.checked;y.type!=="radio"&&y.type!=="checkbox"&&y.type!=="submit"&&y.type!=="button"&&V?y.value=ms({element:e,type:fs(e),tagName:R,value:V,overwriteRecord:e.getAttribute("data-hl-record"),maskInputOptions:d,maskInputFn:f}):W&&(y.checked=W)}if(R==="option"&&(e.selected&&!d.select?y.selected=!0:delete y.selected),R==="dialog"&&e.open&&(y.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),R==="canvas"&&l){if(e.__context==="2d")Ed(e);else if(!("__context"in e)){const V=e.toDataURL(m.type,m.quality),W=s.createElement("canvas");W.width=e.width,W.height=e.height;const k=W.toDataURL(m.type,m.quality);V!==k&&(y.rr_dataURL=V)}}if(R==="img"&&p&&!S&&!Z&&!I){bt||(bt=s.createElement("canvas"),po=bt.getContext("2d"));const V=e,W=V.currentSrc||V.getAttribute("src")||"<unknown-src>",k=V.crossOrigin,N=()=>{V.removeEventListener("load",N);try{bt.width=V.naturalWidth,bt.height=V.naturalHeight,po.drawImage(V,0,0),y.rr_dataURL=bt.toDataURL(m.type,m.quality)}catch(D){if(V.crossOrigin!=="anonymous"){V.crossOrigin="anonymous",V.complete&&V.naturalWidth!==0?N():V.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${W}! Error: ${D}`)}V.crossOrigin==="anonymous"&&(k?y.crossOrigin=k:V.removeAttribute("crossorigin"))};V.complete&&V.naturalWidth!==0?N():V.addEventListener("load",N)}if(["audio","video"].includes(R)){const V=y;V.rr_mediaState=e.paused?"paused":"played",V.rr_mediaCurrentTime=e.currentTime,V.rr_mediaPlaybackRate=e.playbackRate,V.rr_mediaMuted=e.muted,V.rr_mediaLoop=e.loop,V.rr_mediaVolume=e.volume}if(c||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop)),S||Z||I&&In(R)){const{width:V,height:W}=e.getBoundingClientRect();y={class:y.class,rr_width:`${V}px`,rr_height:`${W}px`}}I&&In(R)&&(S=!0),R==="iframe"&&!i(y.src)&&(e.contentDocument||(y.rr_src=y.src),delete y.src);let X;try{customElements.get(R)&&(X=!0)}catch{}const v=V=>{const{width:W,height:k}=V.getBoundingClientRect();y={width:W,height:k,rr_width:`${W}px`,rr_height:`${k}px`,rr_inlined_video:!0,class:y.class,style:y.style},R="canvas";const N=s.createElement("canvas");N.width=e.width,N.height=e.height,y.rr_dataURL=N.toDataURL(m.type,m.quality)};if(R==="video"){const V=e;p&&(V.src===""||V.src.indexOf("blob:")!==-1)&&v(V),o&&V.src!==""&&V.src.indexOf("blob:")===-1&&v(V)}return{type:be.Element,tagName:R,attributes:y,childNodes:[],isSVG:uh(e)||void 0,needBlock:S,needMask:Z,rootId:b,isCustom:X}}function ue(e){return e==null?"":e.toLowerCase()}function Zo(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function yh(e,t){return!!(t.comment&&e.type===be.Comment||e.type===be.Element&&(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&ao(e.attributes.href)==="js")||t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(ue(e.attributes.name).match(/^msapplication-tile(image|color)$/)||ue(e.attributes.name)==="application-name"||ue(e.attributes.rel)==="icon"||ue(e.attributes.rel)==="apple-touch-icon"||ue(e.attributes.rel)==="shortcut icon"))||e.tagName==="meta"&&(t.headMetaDescKeywords&&ue(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(ue(e.attributes.property).match(/^(og|twitter|fb):/)||ue(e.attributes.name).match(/^(og|twitter):/)||ue(e.attributes.name)==="pinterest")||t.headMetaRobots&&(ue(e.attributes.name)==="robots"||ue(e.attributes.name)==="googlebot"||ue(e.attributes.name)==="bingbot")||t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0||t.headMetaAuthorship&&(ue(e.attributes.name)==="author"||ue(e.attributes.name)==="generator"||ue(e.attributes.name)==="framework"||ue(e.attributes.name)==="publisher"||ue(e.attributes.name)==="progid"||ue(e.attributes.property).match(/^article:/)||ue(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(ue(e.attributes.name)==="google-site-verification"||ue(e.attributes.name)==="yandex-verification"||ue(e.attributes.name)==="csrf-token"||ue(e.attributes.name)==="p:domain_verify"||ue(e.attributes.name)==="verify-v1"||ue(e.attributes.name)==="verification"||ue(e.attributes.name)==="shopify-checkout-api-token"))))}function yt(e,t){const{doc:s,mirror:n,blockClass:r,blockSelector:a,maskTextClass:d,maskTextSelector:f,skipChild:h=!1,inlineStylesheet:m=!0,maskInputOptions:p={},maskTextFn:o,maskInputFn:l,slimDOMOptions:i,dataURLOptions:c={},inlineImages:u=!1,inlineVideos:b=!1,recordCanvas:S=!1,onSerialize:Z,onIframeLoad:I,iframeLoadTimeout:R=5e3,onStylesheetLoad:y,stylesheetLoadTimeout:g=5e3,keepIframeSrcFn:X=()=>!1,newlyAddedElement:v=!1,cssCaptured:V=!1,privacySetting:W}=t;let{needsMask:k}=t,{preserveWhiteSpace:N=!0}=t;k||(k=go(e,d,f,k===void 0));const D=ph(e,{doc:s,mirror:n,blockClass:r,blockSelector:a,needsMask:k,inlineStylesheet:m,maskInputOptions:p,maskTextClass:d,maskTextFn:o,maskInputFn:l,dataURLOptions:c,inlineImages:u,inlineVideos:b,recordCanvas:S,keepIframeSrcFn:X,newlyAddedElement:v,cssCaptured:V,privacySetting:W});if(!D)return console.warn(e,"not serialized"),null;let G;n.hasNode(e)?G=n.getId(e):yh(D,i)||!N&&D.type===be.Text&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?G=Lt:G=ho();const w=Object.assign(D,{id:G});if(n.add(e,w),G===Lt)return null;Z&&Z(e);let T=!h,Y=W,M=W==="strict";if(w.type===be.Element){if(T=T&&!w.needBlock,M||(M=!!w.needBlock||!!w.needMask),Y=M?"strict":Y,M&&In(w.tagName)){const B=e.cloneNode();B.src="",n.add(B,w)}delete w.needBlock,delete w.needMask;const _=Ze.shadowRoot(e);_&&Tt(_)&&(w.isShadowHost=!0)}if((w.type===be.Document||w.type===be.Element)&&T){i.headWhitespace&&w.type===be.Element&&w.tagName==="head"&&(N=!1);const _={doc:s,mirror:n,blockClass:r,blockSelector:a,needsMask:k,maskTextClass:d,maskTextSelector:f,skipChild:h,inlineStylesheet:m,maskInputOptions:p,maskTextFn:o,maskInputFn:l,slimDOMOptions:i,dataURLOptions:c,inlineImages:u,inlineVideos:b,recordCanvas:S,preserveWhiteSpace:N,onSerialize:Z,onIframeLoad:I,iframeLoadTimeout:R,onStylesheetLoad:y,stylesheetLoadTimeout:g,keepIframeSrcFn:X,cssCaptured:!1,privacySetting:Y};if(!(w.type===be.Element&&w.tagName==="textarea"&&w.attributes.value!==void 0)){w.type===be.Element&&w.attributes._cssText!==void 0&&typeof w.attributes._cssText=="string"&&(_.cssCaptured=!0);for(const C of Array.from(Ze.childNodes(e))){const le=yt(C,_);le&&w.childNodes.push(le)}}let B=null;if(no(e)&&(B=Ze.shadowRoot(e)))for(const C of Array.from(Ze.childNodes(B))){const le=yt(C,_);le&&(Tt(B)&&(le.isShadow=!0),w.childNodes.push(le))}}const U=Ze.parentNode(e);return U&&xt(U)&&Tt(U)&&(w.isShadow=!0),w.type===be.Element&&w.tagName==="iframe"&&dh(e,()=>{const _=e.contentDocument;if(_&&I){const B=yt(_,{doc:_,mirror:n,blockClass:r,blockSelector:a,needsMask:k,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:m,maskInputOptions:p,maskTextFn:o,maskInputFn:l,slimDOMOptions:i,dataURLOptions:c,inlineImages:u,inlineVideos:b,recordCanvas:S,preserveWhiteSpace:N,onSerialize:Z,onIframeLoad:I,iframeLoadTimeout:R,onStylesheetLoad:y,stylesheetLoadTimeout:g,keepIframeSrcFn:X,privacySetting:W});B&&I(e,B)}},R),w.type===be.Element&&w.tagName==="link"&&typeof w.attributes.rel=="string"&&(w.attributes.rel==="stylesheet"||w.attributes.rel==="preload"&&typeof w.attributes.href=="string"&&ao(w.attributes.href)==="css")&&hh(e,()=>{if(y){const _=yt(e,{doc:s,mirror:n,blockClass:r,blockSelector:a,needsMask:k,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:m,maskInputOptions:p,maskTextFn:o,maskInputFn:l,slimDOMOptions:i,dataURLOptions:c,inlineImages:u,inlineVideos:b,recordCanvas:S,preserveWhiteSpace:N,onSerialize:Z,onIframeLoad:I,iframeLoadTimeout:R,onStylesheetLoad:y,stylesheetLoadTimeout:g,keepIframeSrcFn:X,privacySetting:W});_&&y(e,_)}},g),w}function gh(e,t){const{mirror:s=new oo,blockClass:n="highlight-block",blockSelector:r=null,maskTextClass:a="highlight-mask",maskTextSelector:d=null,inlineStylesheet:f=!0,inlineImages:h=!1,inlineVideos:m=!1,recordCanvas:p=!1,maskAllInputs:o=!1,maskTextFn:l,maskInputFn:i,slimDOM:c=!1,dataURLOptions:u,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:Z,iframeLoadTimeout:I,onStylesheetLoad:R,stylesheetLoadTimeout:y,keepIframeSrcFn:g=()=>!1,privacySetting:X="default"}=t||{},v=o===!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}:o===!1?{password:!0}:o,V=Zo(c);return yt(e,{doc:e,mirror:s,blockClass:n,blockSelector:r,maskTextClass:a,maskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:v,maskTextFn:l,maskInputFn:i,slimDOMOptions:V,dataURLOptions:u,inlineImages:h,inlineVideos:m,recordCanvas:p,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:Z,iframeLoadTimeout:I,onStylesheetLoad:R,stylesheetLoadTimeout:y,keepIframeSrcFn:g,newlyAddedElement:!1,privacySetting:X})}function Zh(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var s=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(s,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),s}var Ss={exports:{}},So;function Sh(){if(So)return Ss.exports;So=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,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Ss.exports=t(),Ss.exports.createColors=t,Ss.exports}const Ih={},Xh=Object.freeze(Object.defineProperty({__proto__:null,default:Ih},Symbol.toStringTag,{value:"Module"})),Ue=Zh(Xh);var Vn,Io;function Gn(){if(Io)return Vn;Io=1;let e=Sh(),t=Ue;class s extends Error{constructor(r,a,d,f,h,m){super(r),this.name="CssSyntaxError",this.reason=r,h&&(this.file=h),f&&(this.source=f),m&&(this.plugin=m),typeof a<"u"&&typeof d<"u"&&(typeof a=="number"?(this.line=a,this.column=d):(this.line=a.line,this.column=a.column,this.endLine=d.line,this.endColumn=d.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}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(r){if(!this.source)return"";let a=this.source;r==null&&(r=e.isColorSupported);let d=i=>i,f=i=>i,h=i=>i;if(r){let{bold:i,gray:c,red:u}=e.createColors(!0);f=b=>i(u(b)),d=b=>c(b),t&&(h=b=>t(b))}let m=a.split(/\r?\n/),p=Math.max(this.line-3,0),o=Math.min(this.line+2,m.length),l=String(o).length;return m.slice(p,o).map((i,c)=>{let u=p+1+c,b=" "+(" "+u).slice(-l)+" | ";if(u===this.line){if(i.length>160){let Z=20,I=Math.max(0,this.column-Z),R=Math.max(this.column+Z,this.endColumn+Z),y=i.slice(I,R),g=d(b.replace(/\d/g," "))+i.slice(0,Math.min(this.column-1,Z-1)).replace(/[^\t]/g," ");return f(">")+d(b)+h(y)+`
288
+ */(function(e){(function(){var t;function s(n,r){var l=this instanceof s?this:t;if(l.reset(r),typeof n=="string"&&n.length>0&&l.hash(n),l!==this)return l}s.prototype.hash=function(n){var r,l,d,f,h;switch(h=n.length,this.len+=h,l=this.k1,d=0,this.rem){case 0:l^=h>d?n.charCodeAt(d++)&65535:0;case 1:l^=h>d?(n.charCodeAt(d++)&65535)<<8:0;case 2:l^=h>d?(n.charCodeAt(d++)&65535)<<16:0;case 3:l^=h>d?(n.charCodeAt(d)&255)<<24:0,l^=h>d?(n.charCodeAt(d++)&65280)>>8:0}if(this.rem=h+this.rem&3,h-=this.rem,h>0){for(r=this.h1;l=l*11601+(l&65535)*3432906752&4294967295,l=l<<15|l>>>17,l=l*13715+(l&65535)*461832192&4294967295,r^=l,r=r<<13|r>>>19,r=r*5+3864292196&4294967295,!(d>=h);)l=n.charCodeAt(d++)&65535^(n.charCodeAt(d++)&65535)<<8^(n.charCodeAt(d++)&65535)<<16,f=n.charCodeAt(d++),l^=(f&255)<<24^(f&65280)>>8;switch(l=0,this.rem){case 3:l^=(n.charCodeAt(d+2)&65535)<<16;case 2:l^=(n.charCodeAt(d+1)&65535)<<8;case 1:l^=n.charCodeAt(d)&65535}this.h1=r}return this.k1=l,this},s.prototype.result=function(){var n,r;return n=this.k1,r=this.h1,n>0&&(n=n*11601+(n&65535)*3432906752&4294967295,n=n<<15|n>>>17,n=n*13715+(n&65535)*461832192&4294967295,r^=n),r^=this.len,r^=r>>>16,r=r*51819+(r&65535)*2246770688&4294967295,r^=r>>>13,r=r*44597+(r&65535)*3266445312&4294967295,r^=r>>>16,r>>>0},s.prototype.reset=function(n){return this.h1=typeof n=="number"?n:0,this.rem=this.k1=this.len=0,this},t=new s,e.exports=s})()})(Er);var rd=Er.exports;const od=sn(rd),mn=28,ft="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",ld=2246822507,Ct=e=>{var t,s="";if(e){const n=od(e).result();for(let r=0;r<mn;r++){const l=((n^r*ld)>>>0)%ft.length;s+=ft.charAt(l)}}else{const n=typeof window<"u"&&((t=window.crypto)==null?void 0:t.getRandomValues),r=new Uint32Array(mn);n&&window.crypto.getRandomValues(r);for(let l=0;l<mn;l++)n?s+=ft.charAt(r[l]%ft.length):s+=ft.charAt(Math.floor(Math.random()*ft.length))}return s};let ad=class{constructor(t){Rt(this,"sessionSecureID");try{t!=null&&t.storageMode&&xu(t?.storageMode),xr(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?Yu():xr(!1)}catch(s){we("Error initializing @launchdarkly observability plugin","error",s)}}configureSession(t,s){try{const n=Lu();let r=cs(n);r!=null&&r.sessionSecureID?this.sessionSecureID=r.sessionSecureID:(s!=null&&s.sessionKey?this.sessionSecureID=Ct(`${t}-${s.sessionKey}`):this.sessionSecureID=Ct(),kt(this.sessionSecureID),st({sessionSecureID:this.sessionSecureID,sessionKey:s?.sessionKey,projectID:0,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(n){we("Error configuring session in @launchdarkly observability plugin","error",n)}}};var cd=(e,t,s)=>new Promise((n,r)=>{var l=h=>{try{f(s.next(h))}catch(m){r(m)}},d=h=>{try{f(s.throw(h))}catch(m){r(m)}},f=h=>h.done?n(h.value):Promise.resolve(h.value).then(l,d);f((s=s.apply(e,t)).next())});class zr extends Bs{getSession(){return this._isLoaded?this._bufferCall("getSession",[]):null}start(t){return cd(this,null,function*(){return this._sdk.start(t)})}stop(){return this._sdk.stop()}addSessionProperties(t){return this._bufferCall("addSessionProperties",[t])}getRecordingState(){return this._isLoaded?this._bufferCall("getRecordingState",[]):"NotRecording"}snapshot(t){return this._isLoaded?this._bufferCall("snapshot",[t]):Promise.resolve(void 0)}register(t,s){return this._bufferCall("register",[t,s])}}Le.LDRecord=void 0,typeof globalThis<"u"?globalThis.LDRecord?Le.LDRecord=globalThis.LDRecord:(Le.LDRecord=new zr,globalThis.LDRecord=Le.LDRecord):Le.LDRecord=new zr;var ud=Object.defineProperty,dd=Object.defineProperties,hd=Object.getOwnPropertyDescriptors,us=Object.getOwnPropertySymbols,Hr=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,Dr=e=>{throw TypeError(e)},fn=(e,t,s)=>t in e?ud(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,z=(e,t)=>{for(var s in t||(t={}))Hr.call(t,s)&&fn(e,s,t[s]);if(us)for(var s of us(t))Pr.call(t,s)&&fn(e,s,t[s]);return e},ge=(e,t)=>dd(e,hd(t)),ds=(e,t)=>{var s={};for(var n in e)Hr.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(e!=null&&us)for(var n of us(e))t.indexOf(n)<0&&Pr.call(e,n)&&(s[n]=e[n]);return s},Q=(e,t,s)=>fn(e,typeof t!="symbol"?t+"":t,s),Br=(e,t,s)=>t.has(e)||Dr("Cannot "+s),pd=(e,t,s)=>(Br(e,t,"read from private field"),s?s.call(e):t.get(e)),md=(e,t,s)=>t.has(e)?Dr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),fd=(e,t,s,n)=>(Br(e,t,"write to private field"),t.set(e,s),s),Ve=(e,t,s)=>new Promise((n,r)=>{var l=h=>{try{f(s.next(h))}catch(m){r(m)}},d=h=>{try{f(s.throw(h))}catch(m){r(m)}},f=h=>h.done?n(h.value):Promise.resolve(h.value).then(l,d);f((s=s.apply(e,t)).next())});const bd={key:"_sid"},yd="rrweb/sequential-id@1",gd=e=>{const t=bd;let s=0;return{name:yd,eventProcessor(n){return Object.assign(n,{[t.key]:++s}),n},options:t}};var Zd=Object.defineProperty,Sd=(e,t,s)=>t in e?Zd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,L=(e,t,s)=>Sd(e,typeof t!="symbol"?t+"":t,s),Qr,Id=Object.defineProperty,Xd=(e,t,s)=>t in e?Id(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,jr=(e,t,s)=>Xd(e,typeof t!="symbol"?t+"":t,s),be=(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))(be||{});const hs=new Map,Ar=new WeakSet;function _r(e){return e!==null&&typeof e=="object"&&"complete"in e&&"naturalWidth"in e&&"naturalHeight"in e&&"src"in e&&"onload"in e}function Vd(e){if(Ar.has(e))return;Ar.add(e);const t=e.drawImage.bind(e);e.drawImage=function(s,...n){const r=hs.get(e);r&&(r.cancelled=!0);const l=()=>{n.length===2&&_r(s)&&n.push(s.naturalWidth||s.width,s.naturalHeight||s.height),t(s,...n)};if(_r(s)&&!s.complete){const d={cancelled:!1};hs.set(e,d);const f=()=>{d.cancelled||(hs.delete(e),l())},h=()=>{if(!d.cancelled){hs.delete(e);try{l()}catch{}}};s.onload=f,s.onerror=h}else l()}}const $r={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},qr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ps={},eo={},Gd=()=>!!globalThis.Zone;function bn(e){if(ps[e])return ps[e];const t=globalThis[e],s=t.prototype,n=e in $r?$r[e]:void 0,r=!!(n&&n.every(f=>{var h,m;return!!((m=(h=Object.getOwnPropertyDescriptor(s,f))==null?void 0:h.get)!=null&&m.toString().includes("[native code]"))})),l=e in qr?qr[e]:void 0,d=!!(l&&l.every(f=>{var h;return typeof s[f]=="function"&&((h=s[f])==null?void 0:h.toString().includes("[native code]"))}));if(r&&d&&!Gd())return ps[e]=t.prototype,t.prototype;try{const f=document.createElement("iframe");f.style.display="none",document.body.appendChild(f);const h=f.contentWindow;if(!h)return t.prototype;const m=h[e].prototype;if(!m)return f.remove(),s;const p=navigator.userAgent;return p.includes("Safari")&&!p.includes("Chrome")?(f.classList.add("rr-block"),f.setAttribute("__rrwebUntaintedMutationObserver",""),eo[e]=()=>f.remove()):f.remove(),ps[e]=m}catch{return s}}const yn={};function Pe(e,t,s){var n;const r=`${e}.${String(s)}`;if(yn[r])return yn[r].call(t);const l=bn(e),d=(n=Object.getOwnPropertyDescriptor(l,s))==null?void 0:n.get;return d?(yn[r]=d,d.call(t)):t[s]}const gn={};function to(e,t,s){const n=`${e}.${String(s)}`;if(gn[n])return gn[n].bind(t);const r=bn(e)[s];return typeof r!="function"?t[s]:(gn[n]=r,r.bind(t))}function Rd(e){return Pe("Node",e,"ownerDocument")}function vd(e){return Pe("Node",e,"childNodes")}function Wd(e){return Pe("Node",e,"parentNode")}function wd(e){return Pe("Node",e,"parentElement")}function kd(e){return Pe("Node",e,"textContent")}function Cd(e,t){return to("Node",e,"contains")(t)}function xd(e){return to("Node",e,"getRootNode")()}function Td(e){return!e||!("host"in e)?null:Pe("ShadowRoot",e,"host")}function Ld(e){return e.styleSheets}function Nd(e){return!e||!("shadowRoot"in e)?null:Pe("Element",e,"shadowRoot")}function Jd(e,t){return Pe("Element",e,"querySelector")(t)}function Yd(e,t){return Pe("Element",e,"querySelectorAll")(t)}function Ud(){var e;return[bn("MutationObserver").constructor,(e=eo.MutationObserver)!=null?e:()=>{}]}let so=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(so=()=>new Date().getTime());function Fd(e,t,s){try{if(!(t in e))return()=>{};const n=e[t],r=s(n);return typeof r=="function"&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=r,()=>{e[t]=n}}catch{return()=>{}}}const Ze={ownerDocument:Rd,childNodes:vd,parentNode:Wd,parentElement:wd,textContent:kd,contains:Cd,getRootNode:xd,host:Td,styleSheets:Ld,shadowRoot:Nd,querySelector:Jd,querySelectorAll:Yd,nowTimestamp:so,mutationObserverCtor:Ud,patch:Fd,wrapCanvasContextDrawImage:Vd};function no(e){return e.nodeType===e.ELEMENT_NODE}function xt(e){const t=e&&"host"in e&&"mode"in e&&Ze.host(e)||null;return!!(t&&"shadowRoot"in t&&Ze.shadowRoot(t)===e)}function Tt(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Md(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 Od(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const s=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?s.push("layer"):e.layerName&&s.push(`layer(${e.layerName})`),e.supportsText&&s.push(`supports(${e.supportsText})`),e.media.length&&s.push(e.media.mediaText),s.join(" ")+";"}function Zn(e){try{const t=e.rules||e.cssRules;if(!t)return null;let s=e.href;!s&&e.ownerNode&&(s=e.ownerNode.baseURI);const n=Array.from(t,r=>io(r,s)).join("");return Md(n)}catch{return null}}function io(e,t){if(ro(e)){let s;try{s=Zn(e.styleSheet)||Od(e)}catch{s=e.cssText}return e.styleSheet.href?bs(s,e.styleSheet.href):s}else{let s=e.cssText;return Ed(e)&&e.selectorText.includes(":")&&(s=Kd(s)),t?bs(s,t):s}}function Kd(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function ro(e){return"styleSheet"in e}function Ed(e){return"selectorText"in e}class oo{constructor(){jr(this,"idNodeMap",new Map),jr(this,"nodeMetaMap",new WeakMap)}getId(t){var s;if(!t)return-1;const n=(s=this.getMeta(t))==null?void 0:s.id;return n??-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){const s=this.getId(t);this.idNodeMap.delete(s),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,s){const n=s.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,s)}replace(t,s){const n=this.getNode(t);if(n){const r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(s,r)}this.idNodeMap.set(t,s)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function zd(){return new oo}function ms({element:e,maskInputOptions:t,tagName:s,type:n,value:r,overwriteRecord:l,maskInputFn:d}){let f=r||"";return uo({maskInputOptions:t,tagName:s,type:n,overwriteRecord:l})&&(d?f=d(f,e):f="*".repeat(f.length)),f}function nt(e){return e.toLowerCase()}const lo="__rrweb_original__";function Hd(e){const t=e.getContext("2d");if(!t)return!0;const s=50;for(let n=0;n<e.width;n+=s)for(let r=0;r<e.height;r+=s){const l=t.getImageData,d=lo in l?l[lo]:l;if(new Uint32Array(d.call(t,n,r,Math.min(s,e.width-n),Math.min(s,e.height-r)).data.buffer).some(f=>f!==0))return!1}return!0}function fs(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?nt(t):null}function ao(e,t){var s;let n;try{n=new URL(e,window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,l=n.pathname.match(r);return(s=l?.[1])!=null?s:null}function Pd(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const Dd=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Bd=/^(?:[a-z+]+:)?\/\//i,Qd=/^www\..*/i,jd=/^(data:)([^,]*),(.*)/i;function bs(e,t){return(e||"").replace(Dd,(s,n,r,l,d,f)=>{const h=r||d||f,m=n||l||"";if(!h)return s;if(Bd.test(h)||Qd.test(h))return`url(${m}${h}${m})`;if(jd.test(h))return`url(${m}${h}${m})`;if(h[0]==="/")return`url(${m}${Pd(t)+h}${m})`;const p=h.split("#")[0],o=h.substring(p.length),a=t.split("#")[0].split("/"),i=p.split("/");a.pop();for(const c of i)c!=="."&&(c===".."?a.pop():a.push(c));return`url(${m}${a.join("/")}${o}${m})`})}function ys(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Ad(e,t,s=!1){const n=Array.from(t.childNodes),r=[];let l=0;if(n.length>1&&e&&typeof e=="string"){let d=ys(e,s);const f=d.length/e.length;for(let h=1;h<n.length;h++)if(n[h].textContent&&typeof n[h].textContent=="string"){const m=ys(n[h].textContent,s),p=100;let o=3;for(;o<m.length&&(m[o].match(/[a-zA-Z0-9]/)||m.indexOf(m.substring(0,o),1)!==-1);o++);for(;o<m.length;o++){let a=m.substring(0,o),i=d.split(a),c=-1;if(i.length===2)c=i[0].length;else if(i.length>2&&i[0]===""&&n[h-1].textContent!=="")c=d.indexOf(a,1);else if(i.length===1){if(a=a.substring(0,a.length-1),i=d.split(a),i.length<=1)return r.push(e),r;o=p+1}else o===m.length-1&&(c=d.indexOf(a));if(i.length>=2&&o>p){const u=n[h-1].textContent;if(u&&typeof u=="string"){const b=ys(u).length;c=d.indexOf(a,b)}c===-1&&(c=i[0].length)}if(c!==-1){let u=Math.floor(c/f);for(;u>0&&u<e.length;){if(l+=1,l>50*n.length)return r.push(e),r;const b=ys(e.substring(0,u),s);if(b.length===c){r.push(e.substring(0,u)),e=e.substring(u),d=d.substring(c);break}else b.length<c?u+=Math.max(1,Math.floor((c-b.length)/f)):u-=Math.max(1,Math.floor((b.length-c)*f))}break}}}}return r.push(e),r}function _d(e,t){return Ad(e,t).join("/* rr_split */")}function Sn(e){return e=e.replace(/[^ -~]+/g,""),e=e?.split(" ").map(t=>t?Math.random().toString(20).substring(2,t.length+2):"").join(" ")||"",e}function In(e){return e==="img"||e==="video"||e==="audio"||e==="source"}const $d=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),qd=new RegExp(/[0-9]{9,16}/),eh=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),th=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),sh=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),nh=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),ih=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),rh=[$d,qd,eh,th,sh,nh,ih];function co(e){return e?rh.some(t=>t.test(e)):!1}const uo=({maskInputOptions:e,tagName:t,type:s,overwriteRecord:n})=>{const r=s&&s.toLowerCase();return n!=="true"&&(!!e[t.toLowerCase()]||!!(r&&e[r]))};let oh=1;const lh=new RegExp("[^a-z0-9-_:]"),Lt=-2;function ho(){return oh++}function ah(e){if(e instanceof HTMLFormElement)return"form";const t=nt(e.tagName);return lh.test(t)?"div":t}let bt,po;const ch=/^[^ \t\n\r\u000c]+/,uh=/^[, \t\n\r\u000c]+/;function dh(e,t){if(t.trim()==="")return t;let s=0;function n(l){let d;const f=l.exec(t.substring(s));return f?(d=f[0],s+=d.length,d):""}const r=[];for(;n(uh),!(s>=t.length);){let l=n(ch);if(l.slice(-1)===",")l=gs(e,l.substring(0,l.length-1)),r.push(l);else{let d="";l=gs(e,l);let f=!1;for(;;){const h=t.charAt(s);if(h===""){r.push((l+d).trim());break}else if(f)h===")"&&(f=!1);else if(h===","){s+=1,r.push((l+d).trim());break}else h==="("&&(f=!0);d+=h,s+=1}}}return r.join(", ")}const mo=new WeakMap;function gs(e,t){return!t||t.trim()===""?t:Xn(e,t)}function hh(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Xn(e,t){let s=mo.get(e);if(s||(s=e.createElement("a"),mo.set(e,s)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return s.setAttribute("href",t),s.href}function fo(e,t,s,n){return n&&(s==="src"||s==="href"&&!(t==="use"&&n[0]==="#")||s==="xlink:href"&&n[0]!=="#"||s==="background"&&["table","td","th"].includes(t)?gs(e,n):s==="srcset"?dh(e,n):s==="style"?bs(n,Xn(e)):t==="object"&&s==="data"?gs(e,n):n)}function bo(e,t,s){return["video","audio"].includes(e)&&t==="autoplay"}function yo(e,t,s){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(s)return e.matches(s)}catch{}return!1}function Zs(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return s?Zs(Ze.parentNode(e),t,s):!1;for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return s?Zs(Ze.parentNode(e),t,s):!1}function go(e,t,s,n){let r;if(no(e)){if(r=e,!Ze.childNodes(r).length)return!1}else{if(Ze.parentElement(e)===null)return!1;r=Ze.parentElement(e)}try{if(typeof t=="string"){if(n){if(r.closest(`.${t}`))return!0}else if(r.classList.contains(t))return!0}else if(Zs(r,t,n))return!0;if(s){if(n){if(r.closest(s))return!0}else if(r.matches(s))return!0}}catch{}return!1}function ph(e,t,s){const n=e.contentWindow;if(!n)return;let r=!1,l;try{l=n.document.readyState}catch{return}if(l!=="complete"){const f=setTimeout(()=>{r||(t(),r=!0)},s);e.addEventListener("load",()=>{clearTimeout(f),r=!0,t()});return}const d="about:blank";if(n.location.href!==d||e.src===d||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function mh(e,t,s){let n=!1,r;try{r=e.sheet}catch{return}if(r)return;const l=setTimeout(()=>{n||(t(),n=!0)},s);e.addEventListener("load",()=>{clearTimeout(l),n=!0,t()})}function fh(e,t){const{doc:s,mirror:n,blockClass:r,blockSelector:l,needsMask:d,inlineStylesheet:f,maskInputOptions:h={},maskTextClass:m,maskTextFn:p,maskInputFn:o,dataURLOptions:a={},inlineImages:i,inlineVideos:c,recordCanvas:u,keepIframeSrcFn:b,newlyAddedElement:S=!1,cssCaptured:Z=!1,privacySetting:I}=t,R=bh(s,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:be.Document,childNodes:[],compatMode:e.compatMode}:{type:be.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:be.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:R};case e.ELEMENT_NODE:return gh(e,{doc:s,blockClass:r,blockSelector:l,inlineStylesheet:f,maskInputOptions:h,maskInputFn:o,maskTextClass:m,dataURLOptions:a,inlineImages:i,inlineVideos:c,recordCanvas:u,keepIframeSrcFn:b,newlyAddedElement:S,privacySetting:I,rootId:R});case e.TEXT_NODE:return yh(e,{doc:s,needsMask:d,maskTextFn:p,privacySetting:I,rootId:R,cssCaptured:Z});case e.CDATA_SECTION_NODE:return{type:be.CDATA,textContent:"",rootId:R};case e.COMMENT_NODE:return{type:be.Comment,textContent:Ze.textContent(e)||"",rootId:R};default:return!1}}function bh(e,t){if(!t.hasNode(e))return;const s=t.getId(e);return s===1?void 0:s}function yh(e,t){var s;const{needsMask:n,maskTextFn:r,privacySetting:l,rootId:d,cssCaptured:f}=t,h=Ze.parentNode(e),m=h&&h.tagName;let p="";const o=m==="STYLE"?!0:void 0,a=m==="SCRIPT"?!0:void 0;a?p="SCRIPT_PLACEHOLDER":f||(p=Ze.textContent(e),o&&p&&(p=bs(p,Xn(t.doc)))),!o&&!a&&p&&n&&(p=r?r(p,Ze.parentElement(e)):p.replace(/[\S]/g,"*"));const i=l==="strict",c=(s=e.parentElement)==null?void 0:s.getAttribute("data-hl-record"),u=l==="default"&&co(p);return(i||u)&&!c&&m&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(m)&&p&&(p=Sn(p)),{type:be.Text,textContent:p||"",rootId:d}}function gh(e,t){const{doc:s,blockClass:n,blockSelector:r,inlineStylesheet:l,maskInputOptions:d={},maskInputFn:f,maskTextClass:h,dataURLOptions:m={},inlineImages:p,inlineVideos:o,recordCanvas:a,keepIframeSrcFn:i,newlyAddedElement:c=!1,privacySetting:u,rootId:b}=t;let S=yo(e,n,r);const Z=yo(e,h,null),I=u==="strict";let R=ah(e),y={};const g=e.attributes.length;for(let V=0;V<g;V++){const W=e.attributes[V];bo(R,W.name)||(y[W.name]=fo(s,R,nt(W.name),W.value))}if(R==="link"&&l){const V=Array.from(s.styleSheets).find(k=>k.href===e.href);let W=null;V&&(W=Zn(V)),W&&(delete y.rel,delete y.href,y._cssText=W)}if(R==="style"&&e.sheet){let V=Zn(e.sheet);V&&(e.childNodes.length>1&&(V=_d(V,e)),y._cssText=V)}if(["input","textarea","select"].includes(R)){const V=e.value,W=e.checked;y.type!=="radio"&&y.type!=="checkbox"&&y.type!=="submit"&&y.type!=="button"&&V?y.value=ms({element:e,type:fs(e),tagName:R,value:V,overwriteRecord:e.getAttribute("data-hl-record"),maskInputOptions:d,maskInputFn:f}):W&&(y.checked=W)}if(R==="option"&&(e.selected&&!d.select?y.selected=!0:delete y.selected),R==="dialog"&&e.open&&(y.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),R==="canvas"&&a){if(e.__context==="2d")Hd(e);else if(!("__context"in e)){const V=e.toDataURL(m.type,m.quality),W=s.createElement("canvas");W.width=e.width,W.height=e.height;const k=W.toDataURL(m.type,m.quality);V!==k&&(y.rr_dataURL=V)}}if(R==="img"&&p&&!S&&!Z&&!I){bt||(bt=s.createElement("canvas"),po=bt.getContext("2d"));const V=e,W=V.currentSrc||V.getAttribute("src")||"<unknown-src>",k=V.crossOrigin,N=()=>{V.removeEventListener("load",N);try{bt.width=V.naturalWidth,bt.height=V.naturalHeight,po.drawImage(V,0,0),y.rr_dataURL=bt.toDataURL(m.type,m.quality)}catch(D){if(V.crossOrigin!=="anonymous"){V.crossOrigin="anonymous",V.complete&&V.naturalWidth!==0?N():V.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${W}! Error: ${D}`)}V.crossOrigin==="anonymous"&&(k?y.crossOrigin=k:V.removeAttribute("crossorigin"))};V.complete&&V.naturalWidth!==0?N():V.addEventListener("load",N)}if(["audio","video"].includes(R)){const V=y;V.rr_mediaState=e.paused?"paused":"played",V.rr_mediaCurrentTime=e.currentTime,V.rr_mediaPlaybackRate=e.playbackRate,V.rr_mediaMuted=e.muted,V.rr_mediaLoop=e.loop,V.rr_mediaVolume=e.volume}if(c||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop)),S||Z||I&&In(R)){const{width:V,height:W}=e.getBoundingClientRect();y={class:y.class,rr_width:`${V}px`,rr_height:`${W}px`}}I&&In(R)&&(S=!0),R==="iframe"&&!i(y.src)&&(e.contentDocument||(y.rr_src=y.src),delete y.src);let X;try{customElements.get(R)&&(X=!0)}catch{}const v=V=>{const{width:W,height:k}=V.getBoundingClientRect();y={width:W,height:k,rr_width:`${W}px`,rr_height:`${k}px`,rr_inlined_video:!0,class:y.class,style:y.style},R="canvas";const N=s.createElement("canvas");N.width=e.width,N.height=e.height,y.rr_dataURL=N.toDataURL(m.type,m.quality)};if(R==="video"){const V=e;p&&(V.src===""||V.src.indexOf("blob:")!==-1)&&v(V),o&&V.src!==""&&V.src.indexOf("blob:")===-1&&v(V)}return{type:be.Element,tagName:R,attributes:y,childNodes:[],isSVG:hh(e)||void 0,needBlock:S,needMask:Z,rootId:b,isCustom:X}}function ue(e){return e==null?"":e.toLowerCase()}function Zo(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function Zh(e,t){return!!(t.comment&&e.type===be.Comment||e.type===be.Element&&(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&ao(e.attributes.href)==="js")||t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(ue(e.attributes.name).match(/^msapplication-tile(image|color)$/)||ue(e.attributes.name)==="application-name"||ue(e.attributes.rel)==="icon"||ue(e.attributes.rel)==="apple-touch-icon"||ue(e.attributes.rel)==="shortcut icon"))||e.tagName==="meta"&&(t.headMetaDescKeywords&&ue(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(ue(e.attributes.property).match(/^(og|twitter|fb):/)||ue(e.attributes.name).match(/^(og|twitter):/)||ue(e.attributes.name)==="pinterest")||t.headMetaRobots&&(ue(e.attributes.name)==="robots"||ue(e.attributes.name)==="googlebot"||ue(e.attributes.name)==="bingbot")||t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0||t.headMetaAuthorship&&(ue(e.attributes.name)==="author"||ue(e.attributes.name)==="generator"||ue(e.attributes.name)==="framework"||ue(e.attributes.name)==="publisher"||ue(e.attributes.name)==="progid"||ue(e.attributes.property).match(/^article:/)||ue(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(ue(e.attributes.name)==="google-site-verification"||ue(e.attributes.name)==="yandex-verification"||ue(e.attributes.name)==="csrf-token"||ue(e.attributes.name)==="p:domain_verify"||ue(e.attributes.name)==="verify-v1"||ue(e.attributes.name)==="verification"||ue(e.attributes.name)==="shopify-checkout-api-token"))))}function yt(e,t){const{doc:s,mirror:n,blockClass:r,blockSelector:l,maskTextClass:d,maskTextSelector:f,skipChild:h=!1,inlineStylesheet:m=!0,maskInputOptions:p={},maskTextFn:o,maskInputFn:a,slimDOMOptions:i,dataURLOptions:c={},inlineImages:u=!1,inlineVideos:b=!1,recordCanvas:S=!1,onSerialize:Z,onIframeLoad:I,iframeLoadTimeout:R=5e3,onStylesheetLoad:y,stylesheetLoadTimeout:g=5e3,keepIframeSrcFn:X=()=>!1,newlyAddedElement:v=!1,cssCaptured:V=!1,privacySetting:W}=t;let{needsMask:k}=t,{preserveWhiteSpace:N=!0}=t;k||(k=go(e,d,f,k===void 0));const D=fh(e,{doc:s,mirror:n,blockClass:r,blockSelector:l,needsMask:k,inlineStylesheet:m,maskInputOptions:p,maskTextClass:d,maskTextFn:o,maskInputFn:a,dataURLOptions:c,inlineImages:u,inlineVideos:b,recordCanvas:S,keepIframeSrcFn:X,newlyAddedElement:v,cssCaptured:V,privacySetting:W});if(!D)return console.warn(e,"not serialized"),null;let G;n.hasNode(e)?G=n.getId(e):Zh(D,i)||!N&&D.type===be.Text&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?G=Lt:G=ho();const w=Object.assign(D,{id:G});if(n.add(e,w),G===Lt)return null;Z&&Z(e);let T=!h,Y=W,M=W==="strict";if(w.type===be.Element){if(T=T&&!w.needBlock,M||(M=!!w.needBlock||!!w.needMask),Y=M?"strict":Y,M&&In(w.tagName)){const B=e.cloneNode();B.src="",n.add(B,w)}delete w.needBlock,delete w.needMask;const _=Ze.shadowRoot(e);_&&Tt(_)&&(w.isShadowHost=!0)}if((w.type===be.Document||w.type===be.Element)&&T){i.headWhitespace&&w.type===be.Element&&w.tagName==="head"&&(N=!1);const _={doc:s,mirror:n,blockClass:r,blockSelector:l,needsMask:k,maskTextClass:d,maskTextSelector:f,skipChild:h,inlineStylesheet:m,maskInputOptions:p,maskTextFn:o,maskInputFn:a,slimDOMOptions:i,dataURLOptions:c,inlineImages:u,inlineVideos:b,recordCanvas:S,preserveWhiteSpace:N,onSerialize:Z,onIframeLoad:I,iframeLoadTimeout:R,onStylesheetLoad:y,stylesheetLoadTimeout:g,keepIframeSrcFn:X,cssCaptured:!1,privacySetting:Y};if(!(w.type===be.Element&&w.tagName==="textarea"&&w.attributes.value!==void 0)){w.type===be.Element&&w.attributes._cssText!==void 0&&typeof w.attributes._cssText=="string"&&(_.cssCaptured=!0);for(const C of Array.from(Ze.childNodes(e))){const le=yt(C,_);le&&w.childNodes.push(le)}}let B=null;if(no(e)&&(B=Ze.shadowRoot(e)))for(const C of Array.from(Ze.childNodes(B))){const le=yt(C,_);le&&(Tt(B)&&(le.isShadow=!0),w.childNodes.push(le))}}const U=Ze.parentNode(e);return U&&xt(U)&&Tt(U)&&(w.isShadow=!0),w.type===be.Element&&w.tagName==="iframe"&&ph(e,()=>{const _=e.contentDocument;if(_&&I){const B=yt(_,{doc:_,mirror:n,blockClass:r,blockSelector:l,needsMask:k,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:m,maskInputOptions:p,maskTextFn:o,maskInputFn:a,slimDOMOptions:i,dataURLOptions:c,inlineImages:u,inlineVideos:b,recordCanvas:S,preserveWhiteSpace:N,onSerialize:Z,onIframeLoad:I,iframeLoadTimeout:R,onStylesheetLoad:y,stylesheetLoadTimeout:g,keepIframeSrcFn:X,privacySetting:W});B&&I(e,B)}},R),w.type===be.Element&&w.tagName==="link"&&typeof w.attributes.rel=="string"&&(w.attributes.rel==="stylesheet"||w.attributes.rel==="preload"&&typeof w.attributes.href=="string"&&ao(w.attributes.href)==="css")&&mh(e,()=>{if(y){const _=yt(e,{doc:s,mirror:n,blockClass:r,blockSelector:l,needsMask:k,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:m,maskInputOptions:p,maskTextFn:o,maskInputFn:a,slimDOMOptions:i,dataURLOptions:c,inlineImages:u,inlineVideos:b,recordCanvas:S,preserveWhiteSpace:N,onSerialize:Z,onIframeLoad:I,iframeLoadTimeout:R,onStylesheetLoad:y,stylesheetLoadTimeout:g,keepIframeSrcFn:X,privacySetting:W});_&&y(e,_)}},g),w}function Sh(e,t){const{mirror:s=new oo,blockClass:n="highlight-block",blockSelector:r=null,maskTextClass:l="highlight-mask",maskTextSelector:d=null,inlineStylesheet:f=!0,inlineImages:h=!1,inlineVideos:m=!1,recordCanvas:p=!1,maskAllInputs:o=!1,maskTextFn:a,maskInputFn:i,slimDOM:c=!1,dataURLOptions:u,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:Z,iframeLoadTimeout:I,onStylesheetLoad:R,stylesheetLoadTimeout:y,keepIframeSrcFn:g=()=>!1,privacySetting:X="default"}=t||{},v=o===!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}:o===!1?{password:!0}:o,V=Zo(c);return yt(e,{doc:e,mirror:s,blockClass:n,blockSelector:r,maskTextClass:l,maskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:v,maskTextFn:a,maskInputFn:i,slimDOMOptions:V,dataURLOptions:u,inlineImages:h,inlineVideos:m,recordCanvas:p,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:Z,iframeLoadTimeout:I,onStylesheetLoad:R,stylesheetLoadTimeout:y,keepIframeSrcFn:g,newlyAddedElement:!1,privacySetting:X})}function Ih(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var s=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(s,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),s}var Ss={exports:{}},So;function Xh(){if(So)return Ss.exports;So=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,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Ss.exports=t(),Ss.exports.createColors=t,Ss.exports}const Vh={},Gh=Object.freeze(Object.defineProperty({__proto__:null,default:Vh},Symbol.toStringTag,{value:"Module"})),Ue=Ih(Gh);var Vn,Io;function Gn(){if(Io)return Vn;Io=1;let e=Xh(),t=Ue;class s extends Error{constructor(r,l,d,f,h,m){super(r),this.name="CssSyntaxError",this.reason=r,h&&(this.file=h),f&&(this.source=f),m&&(this.plugin=m),typeof l<"u"&&typeof d<"u"&&(typeof l=="number"?(this.line=l,this.column=d):(this.line=l.line,this.column=l.column,this.endLine=d.line,this.endColumn=d.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}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(r){if(!this.source)return"";let l=this.source;r==null&&(r=e.isColorSupported);let d=i=>i,f=i=>i,h=i=>i;if(r){let{bold:i,gray:c,red:u}=e.createColors(!0);f=b=>i(u(b)),d=b=>c(b),t&&(h=b=>t(b))}let m=l.split(/\r?\n/),p=Math.max(this.line-3,0),o=Math.min(this.line+2,m.length),a=String(o).length;return m.slice(p,o).map((i,c)=>{let u=p+1+c,b=" "+(" "+u).slice(-a)+" | ";if(u===this.line){if(i.length>160){let Z=20,I=Math.max(0,this.column-Z),R=Math.max(this.column+Z,this.endColumn+Z),y=i.slice(I,R),g=d(b.replace(/\d/g," "))+i.slice(0,Math.min(this.column-1,Z-1)).replace(/[^\t]/g," ");return f(">")+d(b)+h(y)+`
289
289
  `+g+f("^")}let S=d(b.replace(/\d/g," "))+i.slice(0,this.column-1).replace(/[^\t]/g," ");return f(">")+d(b)+h(i)+`
290
290
  `+S+f("^")}return" "+d(b)+h(i)}).join(`
291
291
  `)}toString(){let r=this.showSourceCode();return r&&(r=`
@@ -296,27 +296,27 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):d
296
296
  `,beforeComment:`
297
297
  `,beforeDecl:`
298
298
  `,beforeOpen:" ",beforeRule:`
299
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function a(p){return p[0].toUpperCase()+p.slice(1)}function d(p,o){let l="@"+o.name,i=o.params?p.rawValue(o,"params"):"",c=o.raws.afterName;return typeof c>"u"?c=i?" ":"":c===""&&i&&!s.test(i[0])&&(c=" "),l+c+i}function f(p,o,l){let i=l.nodes,c=i.length-1;for(;c>0&&i[c].type==="comment";)c-=1;let u=p.raw(l,"semicolon"),b=l.type==="document";for(let S=i.length-1;S>=0;S--){let Z=i[S],I=c!==S||u;!I&&S<i.length-1&&(Z.type==="atrule"&&!Z.nodes||Z.type==="decl"&&Z.prop.startsWith("--"))&&(I=!0),o.push({document:b,node:Z,semicolon:I})}}function h(p,o,l,i){let c=p.raw(l,"between","beforeOpen");p.builder(n(i+c)+"{",l,"start");let u=l.nodes&&l.nodes.length,b=()=>{let S=u?p.raw(l,"after"):p.raw(l,"after","emptyBody");S&&p.builder(n(S)),p.builder("}",l,"end"),l.type==="rule"&&l.raws.ownSemicolon&&p.builder(n(l.raws.ownSemicolon),l,"end")};u?(o.push(b),f(p,o,l)):b()}class m{constructor(o){this.builder=o}atrule(o,l){let i=d(this,o);if(o.nodes)this.block(o,i);else{let c=(o.raws.between||"")+(l?";":"");this.builder(n(i+c),o)}}beforeAfter(o,l){let i;o.type==="decl"?i=this.raw(o,null,"beforeDecl"):o.type==="comment"?i=this.raw(o,null,"beforeComment"):l==="before"?i=this.raw(o,null,"beforeRule"):i=this.raw(o,null,"beforeClose");let c=o.parent,u=0;for(;c&&c.type!=="root";)u+=1,c=c.parent;if(i.includes(`
300
- `)){let b=this.raw(o,null,"indent");if(b.length)for(let S=0;S<u;S++)i+=b}return i}block(o,l){let i=this.raw(o,"between","beforeOpen");this.builder(n(l+i)+"{",o,"start");let c;o.nodes&&o.nodes.length?(this.body(o),c=this.raw(o,"after")):c=this.raw(o,"after","emptyBody"),c&&this.builder(n(c)),this.builder("}",o,"end")}body(o){let l=m.prototype,i=["atrule","block","body","rule","stringify"].every(u=>this[u]===l[u]),c=[];for(f(this,c,o);c.length>0;){let u=c.pop();if(typeof u=="function"){u();continue}let b=u.node,S=this.raw(b,"before");S&&this.builder(u.document?S:n(S)),i&&b.type==="rule"?h(this,c,b,this.rawValue(b,"selector")):i&&b.type==="atrule"&&b.nodes?h(this,c,b,d(this,b)):this.stringify(b,u.semicolon)}}comment(o){let l=this.raw(o,"left","commentLeft"),i=this.raw(o,"right","commentRight");this.builder(n("/*"+l+o.text+i+"*/"),o)}decl(o,l){let i=o.raws,c=this.raw(o,"between","colon"),u=o.prop+c+this.rawValue(o,"value");o.important&&(u+=i.important||" !important"),l&&(u+=";"),this.builder(n(u),o)}document(o){this.body(o)}raw(o,l,i){let c;if(i||(i=l),l&&(c=o.raws[l],typeof c<"u"))return c;let u=o.parent;if(i==="before"&&(!u||u.type==="root"&&u.first===o||u&&u.type==="document"))return"";if(!u)return r[i];let b=o.root(),S=b.rawCache||(b.rawCache={});if(typeof S[i]<"u")return S[i];if(i==="before"||i==="after")return this.beforeAfter(o,i);{let Z="raw"+a(i);this[Z]?c=this[Z](b,o):b.walk(I=>{if(c=I.raws[l],typeof c<"u")return!1})}return typeof c>"u"&&(c=r[i]),S[i]=c,c}rawBeforeClose(o){let l;return o.walk(i=>{if(i.nodes&&i.nodes.length>0&&typeof i.raws.after<"u")return l=i.raws.after,l.includes(`
301
- `)&&(l=l.replace(/[^\n]+$/,"")),!1}),l&&(l=l.replace(/\S/g,"")),l}rawBeforeComment(o,l){let i;return o.walkComments(c=>{if(typeof c.raws.before<"u")return i=c.raws.before,i.includes(`
302
- `)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(l,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(o,l){let i;return o.walkDecls(c=>{if(typeof c.raws.before<"u")return i=c.raws.before,i.includes(`
303
- `)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(l,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(o){let l;return o.walk(i=>{if(i.type!=="decl"&&(l=i.raws.between,typeof l<"u"))return!1}),l}rawBeforeRule(o){let l;return o.walk(i=>{if(i.nodes&&(i.parent!==o||o.first!==i)&&typeof i.raws.before<"u")return l=i.raws.before,l.includes(`
304
- `)&&(l=l.replace(/[^\n]+$/,"")),!1}),l&&(l=l.replace(/\S/g,"")),l}rawColon(o){let l;return o.walkDecls(i=>{if(typeof i.raws.between<"u")return l=i.raws.between.replace(/[^\s:]/g,""),!1}),l}rawEmptyBody(o){let l;return o.walk(i=>{if(i.nodes&&i.nodes.length===0&&(l=i.raws.after,typeof l<"u"))return!1}),l}rawIndent(o){if(o.raws.indent)return o.raws.indent;let l;return o.walk(i=>{let c=i.parent;if(c&&c!==o&&c.parent&&c.parent===o&&typeof i.raws.before<"u"){let u=i.raws.before.split(`
305
- `);return l=u[u.length-1],l=l.replace(/\S/g,""),!1}}),l}rawSemicolon(o){let l;return o.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(l=i.raws.semicolon,typeof l<"u"))return!1}),l}rawValue(o,l){let i=o[l],c=o.raws[l];return c&&c.value===i?c.raw:i}root(o){if(o.source&&o.source.input.hasBOM&&this.builder("\uFEFF",o,"start"),this.body(o),o.raws.after){let l=o.raws.after,i=o.parent&&o.parent.type==="document";this.builder(i?l:n(l))}}rule(o){this.block(o,this.rawValue(o,"selector")),o.raws.ownSemicolon&&this.builder(n(o.raws.ownSemicolon),o,"end")}stringify(o,l){if(!this[o.type])throw new Error("Unknown AST node type "+o.type+". Maybe you need to change PostCSS stringifier.");this[o.type](o,l)}}return Rn=m,m.default=m,Rn}var vn,Go;function Is(){if(Go)return vn;Go=1;let e=Vo();function t(s,n){new e(n).stringify(s)}return vn=t,t.default=t,vn}var Wn={},Ro;function Xs(){return Ro||(Ro=1,Wn.isClean=Symbol("isClean"),Wn.my=Symbol("my")),Wn}var wn,vo;function Vs(){if(vo)return wn;vo=1;let e=Gn(),t=Vo(),s=Is(),{isClean:n,my:r}=Xs();function a(h,m){let p=new h.constructor,o=[[h,p,m]];for(;o.length>0;){let[l,i,c]=o.pop();for(let u in l){if(!Object.prototype.hasOwnProperty.call(l,u)||u==="proxyCache")continue;let b=l[u],S=typeof b;if(u==="parent"&&S==="object")c&&(i[u]=c);else if(u==="source")i[u]=b;else if(Array.isArray(b)){let Z=[];i[u]=Z;for(let I of b){let R=new I.constructor;Z.push(R),o.push([I,R,i])}}else{if(S==="object"&&b!==null){let Z=new b.constructor;o.push([b,Z,void 0]),b=Z}i[u]=b}}}return p}function d(h,m){if(m&&typeof m.offset<"u")return m.offset;let p=1,o=1,l=0;for(let i=0;i<h.length;i++){if(o===m.line&&p===m.column){l=i;break}h[i]===`
306
- `?(p=1,o+=1):p+=1}return l}class f{get proxyOf(){return this}constructor(m={}){this.raws={},this[n]=!1,this[r]=!0;for(let p of Object.keys(m))if(p!=="__proto__")if(p==="nodes"){this.nodes=[];for(let o of m[p])typeof o.clone=="function"&&o.parent?this.append(o.clone()):this.append(o)}else this[p]=m[p]}addToError(m){if(m.postcssNode=this,m.stack&&this.source&&/\n\s{4}at /.test(m.stack)){let p=this.source;m.stack=m.stack.replace(/\n\s{4}at /,`$&${p.input.from}:${p.start.line}:${p.start.column}$&`)}return m}after(m){return this.parent.insertAfter(this,m),this}assign(m={}){for(let p in m)this[p]=m[p];return this}before(m){return this.parent.insertBefore(this,m),this}cleanRaws(m){delete this.raws.before,delete this.raws.after,m||delete this.raws.between}clone(m={}){let p=a(this);for(let o in m)p[o]=m[o];return p}cloneAfter(m={}){let p=this.clone(m);return this.parent.insertAfter(this,p),p}cloneBefore(m={}){let p=this.clone(m);return this.parent.insertBefore(this,p),p}error(m,p={}){if(this.source){let{end:o,start:l}=this.rangeBy(p);return this.source.input.error(m,{column:l.column,line:l.line},{column:o.column,line:o.line},p)}return new e(m)}getProxyProcessor(){return{get(m,p){return p==="proxyOf"?m:p==="root"?()=>m.root().toProxy():m[p]},set(m,p,o){return m[p]===o||(m[p]=o,(p==="prop"||p==="value"||p==="name"||p==="params"||p==="important"||p==="text")&&m.markDirty()),!0}}}markClean(){this[n]=!0}markDirty(){if(this[n]){this[n]=!1;let m=this;for(;m=m.parent;)m[n]=!1}}next(){if(!this.parent)return;let m=this.parent.index(this);return this.parent.nodes[m+1]}positionBy(m={}){let p="document"in this.source.input?this.source.input.document:this.source.input.css,o={column:this.source.start.column,line:this.source.start.line,offset:d(p,this.source.start)};if(m.index)o=this.positionInside(m.index);else if(m.word){let l=p.slice(d(p,this.source.start),d(p,this.source.end)).indexOf(m.word);l!==-1&&(o=this.positionInside(l))}return o}positionInside(m){let p=this.source.start.column,o=this.source.start.line,l="document"in this.source.input?this.source.input.document:this.source.input.css,i=d(l,this.source.start),c=i+m;for(let u=i;u<c;u++)l[u]===`
307
- `?(p=1,o+=1):p+=1;return{column:p,line:o,offset:c}}prev(){if(!this.parent)return;let m=this.parent.index(this);return this.parent.nodes[m-1]}rangeBy(m={}){let p="document"in this.source.input?this.source.input.document:this.source.input.css,o={column:this.source.start.column,line:this.source.start.line,offset:d(p,this.source.start)},l=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:d(p,this.source.end)+1}:{column:o.column+1,line:o.line,offset:o.offset+1};if(m.word){let i=p.slice(d(p,this.source.start),d(p,this.source.end)).indexOf(m.word);i!==-1&&(o=this.positionInside(i),l=this.positionInside(i+m.word.length))}else m.start?o={column:m.start.column,line:m.start.line,offset:d(p,m.start)}:typeof m.index=="number"&&(o=this.positionInside(m.index)),m.end?l={column:m.end.column,line:m.end.line,offset:d(p,m.end)}:typeof m.endIndex=="number"?l=this.positionInside(m.endIndex):typeof m.index=="number"&&(l=this.positionInside(m.index+1));return(l.line<o.line||l.line===o.line&&l.column<=o.column)&&(l={column:o.column+1,line:o.line,offset:o.offset+1}),{end:l,start:o}}raw(m,p){return new t().raw(this,m,p)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...m){if(this.parent){let p=this,o=!1;for(let l of m)l===this?o=!0:o?(this.parent.insertAfter(p,l),p=l):this.parent.insertBefore(p,l);o||this.remove()}return this}root(){let m=this;for(;m.parent&&m.parent.type!=="document";)m=m.parent;return m}toJSON(m,p){let o=p==null;p=p||new Map;let l=[],i=[[this,l,0]];for(let u=0;u<i.length;u++){let[b,S,Z]=i[u],I={};S[Z]=I;for(let R in b){if(!Object.prototype.hasOwnProperty.call(b,R)||R==="parent"||R==="proxyCache")continue;let y=b[R];if(Array.isArray(y)){let g=[];I[R]=g;for(let X=0;X<y.length;X++){let v=y[X];typeof v=="object"&&v.toJSON?v.toJSON===f.prototype.toJSON?i.push([v,g,X]):g[X]=v.toJSON(null,p):g[X]=v}}else if(typeof y=="object"&&y.toJSON)y.toJSON===f.prototype.toJSON?i.push([y,I,R]):I[R]=y.toJSON(null,p);else if(R==="source"){if(y==null)continue;let g=p.get(y.input);g==null&&(g=p.size,p.set(y.input,g)),I[R]={end:y.end,inputId:g,start:y.start}}else I[R]=y}}let c=l[0];return o&&(c.inputs=[...p.keys()].map(u=>u.toJSON())),c}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(m=s){m.stringify&&(m=m.stringify);let p="";return m(this,o=>{p+=o}),p}warn(m,p,o={}){let l={node:this};for(let i in o)l[i]=o[i];return m.warn(p,l)}}return wn=f,f.default=f,wn}var kn,Wo;function Gs(){if(Wo)return kn;Wo=1;let e=Vs();class t extends e{constructor(n){super(n),this.type="comment"}}return kn=t,t.default=t,kn}var Cn,wo;function Rs(){if(wo)return Cn;wo=1;let e=Vs();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(n){n&&typeof n.value<"u"&&typeof n.value!="string"&&(n=ge(z({},n),{value:String(n.value)})),super(n),this.type="decl"}}return Cn=t,t.default=t,Cn}var xn,ko;function je(){if(ko)return xn;ko=1;let e=Gs(),t=Rs(),s=Vs(),{isClean:n,my:r}=Xs(),a,d,f,h;function m(l){let i=l.slice();for(;i.length>0;){let c=i.pop();if(delete c.source,c.nodes){c.nodes=c.nodes.slice();for(let u of c.nodes)i.push(u)}}return l.slice()}function p(l){let i=[l];for(;i.length>0;){let c=i.pop();if(c[n]=!1,c.proxyOf.nodes)for(let u of c.proxyOf.nodes)i.push(u)}}class o extends s{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]}append(...i){for(let c of i){let u=this.normalize(c,this.last);for(let b of u)this.proxyOf.nodes.push(b)}return this.markDirty(),this}cleanRaws(i){let c=[this];for(;c.length>0;){let u=c.pop();if(u!==this&&u.cleanRaws!==o.prototype.cleanRaws){u.cleanRaws(i);continue}if(s.prototype.cleanRaws.call(u,i),u.nodes)for(let b of u.nodes)c.push(b)}}each(i){if(!this.proxyOf.nodes)return;let c=this.getIterator(),u,b;for(;this.indexes[c]<this.proxyOf.nodes.length&&(u=this.indexes[c],b=i(this.proxyOf.nodes[u],u),b!==!1);)this.indexes[c]+=1;return delete this.indexes[c],b}every(i){return this.nodes.every(i)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let i=this.lastEach;return this.indexes[i]=0,i}getProxyProcessor(){return{get(i,c){return c==="proxyOf"?i:i[c]?c==="each"||typeof c=="string"&&c.startsWith("walk")?(...u)=>i[c](...u.map(b=>typeof b=="function"?(S,Z)=>b(S.toProxy(),Z):b)):c==="every"||c==="some"?u=>i[c]((b,...S)=>u(b.toProxy(),...S)):c==="root"?()=>i.root().toProxy():c==="nodes"?i.nodes.map(u=>u.toProxy()):c==="first"||c==="last"?i[c].toProxy():i[c]:i[c]},set(i,c,u){return i[c]===u||(i[c]=u,(c==="name"||c==="params"||c==="selector")&&i.markDirty()),!0}}}index(i){return typeof i=="number"?i:(i.proxyOf&&(i=i.proxyOf),this.proxyOf.nodes.indexOf(i))}insertAfter(i,c){let u=this.index(i),b=this.normalize(c,this.proxyOf.nodes[u]).reverse();u=this.index(i);for(let Z of b)this.proxyOf.nodes.splice(u+1,0,Z);let S;for(let Z in this.indexes)S=this.indexes[Z],u<S&&(this.indexes[Z]=S+b.length);return this.markDirty(),this}insertBefore(i,c){let u=this.index(i),b=u===0?"prepend":!1,S=this.normalize(c,this.proxyOf.nodes[u],b).reverse();u=this.index(i);for(let I of S)this.proxyOf.nodes.splice(u,0,I);let Z;for(let I in this.indexes)Z=this.indexes[I],u<=Z&&(this.indexes[I]=Z+S.length);return this.markDirty(),this}normalize(i,c){if(typeof i=="string")i=m(d(i).nodes);else if(typeof i>"u")i=[];else if(Array.isArray(i)){i=i.slice(0);for(let u of i)u.parent&&u.parent.removeChild(u,"ignore")}else if(i.type==="root"&&this.type!=="document"){i=i.nodes.slice(0);for(let u of i)u.parent&&u.parent.removeChild(u,"ignore")}else if(i.type)i=[i];else if(i.prop){if(typeof i.value>"u")throw new Error("Value field is missed in node creation");typeof i.value!="string"&&(i.value=String(i.value)),i=[new t(i)]}else if(i.selector||i.selectors)i=[new h(i)];else if(i.name)i=[new a(i)];else if(i.text)i=[new e(i)];else throw new Error("Unknown node type in node creation");return i.map(u=>(u[r]||o.rebuild(u),u=u.proxyOf,u.parent&&u.parent.removeChild(u),u[n]&&p(u),u.raws||(u.raws={}),typeof u.raws.before>"u"&&c&&typeof c.raws.before<"u"&&(u.raws.before=c.raws.before.replace(/\S/g,"")),u.parent=this.proxyOf,u))}prepend(...i){i=i.reverse();for(let c of i){let u=this.normalize(c,this.first,"prepend").reverse();for(let b of u)this.proxyOf.nodes.unshift(b);for(let b in this.indexes)this.indexes[b]=this.indexes[b]+u.length}return this.markDirty(),this}push(i){return i.parent=this,this.proxyOf.nodes.push(i),this}removeAll(){for(let i of this.proxyOf.nodes)i.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(i){i=this.index(i),this.proxyOf.nodes[i].parent=void 0,this.proxyOf.nodes.splice(i,1);let c;for(let u in this.indexes)c=this.indexes[u],c>=i&&(this.indexes[u]=c-1);return this.markDirty(),this}replaceValues(i,c,u){return u||(u=c,c={}),this.walkDecls(b=>{c.props&&!c.props.includes(b.prop)||c.fast&&!b.value.includes(c.fast)||(b.value=b.value.replace(i,u))}),this.markDirty(),this}some(i){return this.nodes.some(i)}walk(i){if(!this.proxyOf.nodes)return;let c=[{iterator:this.getIterator(),node:this.proxyOf}];for(;c.length>0;){let{iterator:u,node:b}=c[c.length-1],S=b.indexes[u];if(S>=b.proxyOf.nodes.length){delete b.indexes[u],c.pop();let R=c[c.length-1];R&&(R.node.indexes[R.iterator]+=1);continue}let Z=b.proxyOf.nodes[S],I;try{I=i(Z,S)}catch(R){throw Z.addToError(R)}if(I===!1){for(let R of c)delete R.node.indexes[R.iterator];return!1}Z.walk&&Z.proxyOf.nodes?c.push({iterator:Z.getIterator(),node:Z}):b.indexes[u]+=1}}walkAtRules(i,c){return c?i instanceof RegExp?this.walk((u,b)=>{if(u.type==="atrule"&&i.test(u.name))return c(u,b)}):this.walk((u,b)=>{if(u.type==="atrule"&&u.name===i)return c(u,b)}):(c=i,this.walk((u,b)=>{if(u.type==="atrule")return c(u,b)}))}walkComments(i){return this.walk((c,u)=>{if(c.type==="comment")return i(c,u)})}walkDecls(i,c){return c?i instanceof RegExp?this.walk((u,b)=>{if(u.type==="decl"&&i.test(u.prop))return c(u,b)}):this.walk((u,b)=>{if(u.type==="decl"&&u.prop===i)return c(u,b)}):(c=i,this.walk((u,b)=>{if(u.type==="decl")return c(u,b)}))}walkRules(i,c){return c?i instanceof RegExp?this.walk((u,b)=>{if(u.type==="rule"&&i.test(u.selector))return c(u,b)}):this.walk((u,b)=>{if(u.type==="rule"&&u.selector===i)return c(u,b)}):(c=i,this.walk((u,b)=>{if(u.type==="rule")return c(u,b)}))}}return o.registerParse=l=>{d=l},o.registerRule=l=>{h=l},o.registerAtRule=l=>{a=l},o.registerRoot=l=>{f=l},xn=o,o.default=o,o.rebuild=l=>{let i=[l];for(;i.length>0;){let c=i.pop();if(c.type==="atrule"?Object.setPrototypeOf(c,a.prototype):c.type==="rule"?Object.setPrototypeOf(c,h.prototype):c.type==="decl"?Object.setPrototypeOf(c,t.prototype):c.type==="comment"?Object.setPrototypeOf(c,e.prototype):c.type==="root"&&Object.setPrototypeOf(c,f.prototype),c[r]=!0,c.nodes)for(let u of c.nodes)i.push(u)}},xn}var Tn,Co;function Ln(){if(Co)return Tn;Co=1;let e=je();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 Tn=t,t.default=t,e.registerAtRule(t),Tn}var Nn,xo;function Jn(){if(xo)return Nn;xo=1;let e=je(),t,s;class n extends e{constructor(a){super(z({type:"document"},a)),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new s,this,a).stringify()}}return n.registerLazyResult=r=>{t=r},n.registerProcessor=r=>{s=r},Nn=n,n.default=n,Nn}var Yn,To;function Vh(){if(To)return Yn;To=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Yn={nanoid:(t=21)=>{let s="",n=t|0;for(;n-- >0;)s+=e[Math.random()*64|0];return s},customAlphabet:(t,s=21)=>(n=s)=>{let r="",a=n|0;for(;a-- >0;)r+=t[Math.random()*t.length|0];return r}},Yn}var Un,Lo;function No(){if(Lo)return Un;Lo=1;let{existsSync:e,readFileSync:t,realpathSync:s}=Ue,{dirname:n,isAbsolute:r,join:a,relative:d,sep:f}=Ue,{SourceMapConsumer:h,SourceMapGenerator:m}=Ue;function p(i){try{return s(i)}catch{return i}}function o(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}class l{constructor(c,u){if(u.map===!1)return;u.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(c),this.inline=this.startWith(this.annotation,"data:");let b=u.map?u.map.prev:void 0,S=this.loadMap(u.from,b);!this.mapFile&&u.from&&(this.mapFile=u.from),this.mapFile&&(this.root=n(this.mapFile)),S&&(this.text=S)}consumer(){return this.consumerCache||(this.consumerCache=new h(this.json||this.text)),this.consumerCache}decodeInline(c){let u=/^data:application\/json;charset=utf-?8;base64,/,b=/^data:application\/json;base64,/,S=/^data:application\/json;charset=utf-?8,/,Z=/^data:application\/json,/,I=c.match(S)||c.match(Z);if(I)return decodeURIComponent(c.substr(I[0].length));let R=c.match(u)||c.match(b);if(R)return o(c.substr(R[0].length));let y=c.slice(22);throw y=y.slice(0,y.indexOf(",")),new Error("Unsupported source map encoding "+y)}getAnnotationURL(c){return c.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(c){return typeof c!="object"?!1:typeof c.mappings=="string"||typeof c._mappings=="string"||Array.isArray(c.sections)}loadAnnotation(c){let u=c.match(/\/\*\s*# sourceMappingURL=/g);if(!u)return;let b=c.lastIndexOf(u.pop()),S=c.indexOf("*/",b);b>-1&&S>-1&&(this.annotation=this.getAnnotationURL(c.substring(b,S)))}loadFile(c,u,b){if(!b&&!this.unsafeMap){if(!/\.map$/i.test(c)||!u)return;let S=d(p(n(u)),p(c));if(S===".."||S.startsWith(".."+f)||r(S))return}if(this.root=n(c),e(c))return this.mapFile=c,t(c,"utf-8").toString().trim()}loadMap(c,u){if(u===!1)return!1;if(u){if(typeof u=="string")return u;if(typeof u=="function"){let b=u(c);if(b){let S=this.loadFile(b,c,!0);if(!S)throw new Error("Unable to load previous source map: "+b.toString());return S}}else{if(u instanceof h)return m.fromSourceMap(u).toString();if(u instanceof m)return u.toString();if(this.isMap(u))return JSON.stringify(u);throw new Error("Unsupported previous source map format: "+u.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let b=this.annotation;c&&(b=a(n(c),b));let S=this.loadFile(b,c,!1);if(S)try{this.json=JSON.parse(S.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return S}}}startWith(c,u){return c?c.substr(0,u.length)===u:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Un=l,l.default=l,Un}var Fn,Jo;function vs(){if(Jo)return Fn;Jo=1;let{nanoid:e}=Vh(),{isAbsolute:t,resolve:s}=Ue,{SourceMapConsumer:n,SourceMapGenerator:r}=Ue,{fileURLToPath:a,pathToFileURL:d}=Ue,f=Gn(),h=No(),m=Ue,p=Symbol("lineToIndexCache"),o=!!(n&&r),l=!!(s&&t);function i(u){if(u[p])return u[p];let b=u.css.split(`
308
- `),S=new Array(b.length),Z=0;for(let I=0,R=b.length;I<R;I++)S[I]=Z,Z+=b[I].length+1;return u[p]=S,S}class c{get from(){return this.file||this.id}constructor(b,S={}){if(b===null||typeof b>"u"||typeof b=="object"&&!b.toString)throw new Error(`PostCSS received ${b} instead of CSS string`);if(this.css=b.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,S.document&&(this.document=S.document.toString()),S.from&&(!l||/^\w+:\/\//.test(S.from)||t(S.from)?this.file=S.from:this.file=s(S.from)),l&&o){let Z=new h(this.css,S);if(Z.text){this.map=Z;let I=Z.consumer().file;!this.file&&I&&(this.file=this.mapResolve(I))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(b,S,Z,I={}){let R,y,g,X,v;if(S&&typeof S=="object"){let W=S,k=Z;if(typeof W.offset=="number"){X=W.offset;let N=this.fromOffset(X);S=N.line,Z=N.col}else S=W.line,Z=W.column,X=this.fromLineAndColumn(S,Z);if(typeof k.offset=="number"){g=k.offset;let N=this.fromOffset(g);y=N.line,R=N.col}else y=k.line,R=k.column,g=this.fromLineAndColumn(k.line,k.column)}else if(Z)X=this.fromLineAndColumn(S,Z);else{X=S;let W=this.fromOffset(X);S=W.line,Z=W.col}let V=this.origin(S,Z,y,R);return V?v=new f(b,V.endLine===void 0?V.line:{column:V.column,line:V.line},V.endLine===void 0?V.column:{column:V.endColumn,line:V.endLine},V.source,V.file,I.plugin):v=new f(b,y===void 0?S:{column:Z,line:S},y===void 0?Z:{column:R,line:y},this.css,this.file,I.plugin),v.input={column:Z,endColumn:R,endLine:y,endOffset:g,line:S,offset:X,source:this.css},this.file&&(d&&(v.input.url=d(this.file).toString()),v.input.file=this.file),v}fromLineAndColumn(b,S){return i(this)[b-1]+S-1}fromOffset(b){let S=i(this),Z=S[S.length-1],I=0;if(b>=Z)I=S.length-1;else{let R=S.length-2,y;for(;I<R;)if(y=I+(R-I>>1),b<S[y])R=y-1;else if(b>=S[y+1])I=y+1;else{I=y;break}}return{col:b-S[I]+1,line:I+1}}mapResolve(b){return/^\w+:\/\//.test(b)?b:s(this.map.consumer().sourceRoot||this.map.root||".",b)}origin(b,S,Z,I){if(!this.map)return!1;let R=this.map.consumer(),y=R.originalPositionFor({column:S-1,line:b});if(!y.source)return!1;let g;if(typeof Z=="number"){let W=R.originalPositionFor({column:I-1,line:Z});W.source&&(g=W)}let X;t(y.source)?X=d(y.source):X=new URL(y.source,this.map.consumer().sourceRoot||d(this.map.mapFile));let v={column:y.column+1,endColumn:g&&g.column+1,endLine:g&&g.line,line:y.line,url:X.toString()};if(X.protocol==="file:")if(a)v.file=a(X);else throw new Error("file: protocol is not available in this PostCSS build");let V=R.sourceContentFor(y.source);return V&&(v.source=V),v}toJSON(){let b={};for(let S of["hasBOM","css","file","id"])this[S]!=null&&(b[S]=this[S]);return this.map&&(b.map=z({},this.map),b.map.consumerCache&&(b.map.consumerCache=void 0)),b}}return Fn=c,c.default=c,m&&m.registerInput&&m.registerInput(c),Fn}var Mn,Yo;function Nt(){if(Yo)return Mn;Yo=1;let e=je(),t,s;class n extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,d,f){let h=new Set;for(let p of Array.isArray(a)?a:[a])p&&typeof p=="object"&&!p.parent&&p.raws&&typeof p.raws.before<"u"&&h.add(p.raws);let m=super.normalize(a);if(d){if(f==="prepend")this.nodes.length>1?d.raws.before=this.nodes[1].raws.before:delete d.raws.before;else if(this.first!==d)for(let p of m)h.has(p.raws)||(p.raws.before=d.raws.before)}return m}removeChild(a,d){let f=this.index(a);return!d&&f===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[f].raws.before),super.removeChild(a)}toResult(a={}){return new t(new s,this,a).stringify()}}return n.registerLazyResult=r=>{t=r},n.registerProcessor=r=>{s=r},Mn=n,n.default=n,e.registerRoot(n),Mn}var On,Uo;function Fo(){if(Uo)return On;Uo=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let s=[" ",`
309
- `," "];return e.split(t,s)},split(t,s,n){if(typeof t!="string")return[];let r=[],a="",d=!1,f=0,h=!1,m="",p=!1;for(let o of t)p?p=!1:o==="\\"?p=!0:h?o===m&&(h=!1):o==='"'||o==="'"?(h=!0,m=o):o==="("?f+=1:o===")"?f>0&&(f-=1):f===0&&s.includes(o)&&(d=!0),d?(a!==""&&r.push(a.trim()),a="",d=!1):a+=o;return(n||a!=="")&&r.push(a.trim()),r}};return On=e,e.default=e,On}var Kn,Mo;function En(){if(Mo)return Kn;Mo=1;let e=je(),t=Fo();class s extends e{get selectors(){return t.comma(this.selector)}set selectors(r){let a=this.selector?this.selector.match(/,\s*/):null,d=a?a[0]:","+this.raw("between","beforeOpen");this.selector=r.join(d)}constructor(r){super(r),this.type="rule",this.nodes||(this.nodes=[])}}return Kn=s,s.default=s,e.registerRule(s),Kn}var zn,Oo;function Gh(){if(Oo)return zn;Oo=1;let e=Ln(),t=Gs(),s=Rs(),n=vs(),r=No(),a=Nt(),d=En();function f(p,o){return p.inputs?p.inputs.map(l=>{let i=ge(z({},l),{__proto__:n.prototype});return i.map&&(i.map=ge(z({},i.map),{__proto__:r.prototype})),i}):o}function h(p,o,l){let i=z({},p);if(delete i.inputs,delete i.nodes,i.source){let u=i.source,{inputId:b}=u,S=ds(u,["inputId"]);i.source=S,b!=null&&(i.source.input=o[b])}let c;if(i.type==="root")c=new a(i);else if(i.type==="decl")c=new s(i);else if(i.type==="rule")c=new d(i);else if(i.type==="comment")c=new t(i);else if(i.type==="atrule")c=new e(i);else throw new Error("Unknown node type: "+p.type);if(l){c.nodes=l;for(let u of l)u.parent=c}return c}function m(p,o){if(Array.isArray(p))return p.map(c=>m(c));let l,i=[{childIndex:0,children:[],inputs:f(p,o),json:p}];for(;i.length>0;){let c=i[i.length-1],u=c.json.nodes;if(u&&c.childIndex<u.length){let S=u[c.childIndex];c.childIndex+=1,i.push({childIndex:0,children:[],inputs:f(S,c.inputs),json:S});continue}i.pop();let b=h(c.json,c.inputs,u?c.children:void 0);i.length>0?i[i.length-1].children.push(b):l=b}return l}return zn=m,m.default=m,zn}var Hn,Ko;function Eo(){if(Ko)return Hn;Ko=1;let{dirname:e,relative:t,resolve:s,sep:n}=Ue,{SourceMapConsumer:r,SourceMapGenerator:a}=Ue,{pathToFileURL:d}=Ue,f=vs(),h=!!(r&&a),m=!!(e&&s&&t&&n);class p{constructor(l,i,c,u){this.stringify=l,this.mapOpts=c.map||{},this.root=i,this.opts=c,this.css=u,this.originalCSS=u,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let l;this.isInline()?l="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?l=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?l=this.mapOpts.annotation(this.opts.to,this.root):l=this.outputFile()+".map";let i=`
299
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function l(p){return p[0].toUpperCase()+p.slice(1)}function d(p,o){let a="@"+o.name,i=o.params?p.rawValue(o,"params"):"",c=o.raws.afterName;return typeof c>"u"?c=i?" ":"":c===""&&i&&!s.test(i[0])&&(c=" "),a+c+i}function f(p,o,a){let i=a.nodes,c=i.length-1;for(;c>0&&i[c].type==="comment";)c-=1;let u=p.raw(a,"semicolon"),b=a.type==="document";for(let S=i.length-1;S>=0;S--){let Z=i[S],I=c!==S||u;!I&&S<i.length-1&&(Z.type==="atrule"&&!Z.nodes||Z.type==="decl"&&Z.prop.startsWith("--"))&&(I=!0),o.push({document:b,node:Z,semicolon:I})}}function h(p,o,a,i){let c=p.raw(a,"between","beforeOpen");p.builder(n(i+c)+"{",a,"start");let u=a.nodes&&a.nodes.length,b=()=>{let S=u?p.raw(a,"after"):p.raw(a,"after","emptyBody");S&&p.builder(n(S)),p.builder("}",a,"end"),a.type==="rule"&&a.raws.ownSemicolon&&p.builder(n(a.raws.ownSemicolon),a,"end")};u?(o.push(b),f(p,o,a)):b()}class m{constructor(o){this.builder=o}atrule(o,a){let i=d(this,o);if(o.nodes)this.block(o,i);else{let c=(o.raws.between||"")+(a?";":"");this.builder(n(i+c),o)}}beforeAfter(o,a){let i;o.type==="decl"?i=this.raw(o,null,"beforeDecl"):o.type==="comment"?i=this.raw(o,null,"beforeComment"):a==="before"?i=this.raw(o,null,"beforeRule"):i=this.raw(o,null,"beforeClose");let c=o.parent,u=0;for(;c&&c.type!=="root";)u+=1,c=c.parent;if(i.includes(`
300
+ `)){let b=this.raw(o,null,"indent");if(b.length)for(let S=0;S<u;S++)i+=b}return i}block(o,a){let i=this.raw(o,"between","beforeOpen");this.builder(n(a+i)+"{",o,"start");let c;o.nodes&&o.nodes.length?(this.body(o),c=this.raw(o,"after")):c=this.raw(o,"after","emptyBody"),c&&this.builder(n(c)),this.builder("}",o,"end")}body(o){let a=m.prototype,i=["atrule","block","body","rule","stringify"].every(u=>this[u]===a[u]),c=[];for(f(this,c,o);c.length>0;){let u=c.pop();if(typeof u=="function"){u();continue}let b=u.node,S=this.raw(b,"before");S&&this.builder(u.document?S:n(S)),i&&b.type==="rule"?h(this,c,b,this.rawValue(b,"selector")):i&&b.type==="atrule"&&b.nodes?h(this,c,b,d(this,b)):this.stringify(b,u.semicolon)}}comment(o){let a=this.raw(o,"left","commentLeft"),i=this.raw(o,"right","commentRight");this.builder(n("/*"+a+o.text+i+"*/"),o)}decl(o,a){let i=o.raws,c=this.raw(o,"between","colon"),u=o.prop+c+this.rawValue(o,"value");o.important&&(u+=i.important||" !important"),a&&(u+=";"),this.builder(n(u),o)}document(o){this.body(o)}raw(o,a,i){let c;if(i||(i=a),a&&(c=o.raws[a],typeof c<"u"))return c;let u=o.parent;if(i==="before"&&(!u||u.type==="root"&&u.first===o||u&&u.type==="document"))return"";if(!u)return r[i];let b=o.root(),S=b.rawCache||(b.rawCache={});if(typeof S[i]<"u")return S[i];if(i==="before"||i==="after")return this.beforeAfter(o,i);{let Z="raw"+l(i);this[Z]?c=this[Z](b,o):b.walk(I=>{if(c=I.raws[a],typeof c<"u")return!1})}return typeof c>"u"&&(c=r[i]),S[i]=c,c}rawBeforeClose(o){let a;return o.walk(i=>{if(i.nodes&&i.nodes.length>0&&typeof i.raws.after<"u")return a=i.raws.after,a.includes(`
301
+ `)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(o,a){let i;return o.walkComments(c=>{if(typeof c.raws.before<"u")return i=c.raws.before,i.includes(`
302
+ `)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(a,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(o,a){let i;return o.walkDecls(c=>{if(typeof c.raws.before<"u")return i=c.raws.before,i.includes(`
303
+ `)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(a,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(o){let a;return o.walk(i=>{if(i.type!=="decl"&&(a=i.raws.between,typeof a<"u"))return!1}),a}rawBeforeRule(o){let a;return o.walk(i=>{if(i.nodes&&(i.parent!==o||o.first!==i)&&typeof i.raws.before<"u")return a=i.raws.before,a.includes(`
304
+ `)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(o){let a;return o.walkDecls(i=>{if(typeof i.raws.between<"u")return a=i.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(o){let a;return o.walk(i=>{if(i.nodes&&i.nodes.length===0&&(a=i.raws.after,typeof a<"u"))return!1}),a}rawIndent(o){if(o.raws.indent)return o.raws.indent;let a;return o.walk(i=>{let c=i.parent;if(c&&c!==o&&c.parent&&c.parent===o&&typeof i.raws.before<"u"){let u=i.raws.before.split(`
305
+ `);return a=u[u.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(o){let a;return o.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(a=i.raws.semicolon,typeof a<"u"))return!1}),a}rawValue(o,a){let i=o[a],c=o.raws[a];return c&&c.value===i?c.raw:i}root(o){if(o.source&&o.source.input.hasBOM&&this.builder("\uFEFF",o,"start"),this.body(o),o.raws.after){let a=o.raws.after,i=o.parent&&o.parent.type==="document";this.builder(i?a:n(a))}}rule(o){this.block(o,this.rawValue(o,"selector")),o.raws.ownSemicolon&&this.builder(n(o.raws.ownSemicolon),o,"end")}stringify(o,a){if(!this[o.type])throw new Error("Unknown AST node type "+o.type+". Maybe you need to change PostCSS stringifier.");this[o.type](o,a)}}return Rn=m,m.default=m,Rn}var vn,Go;function Is(){if(Go)return vn;Go=1;let e=Vo();function t(s,n){new e(n).stringify(s)}return vn=t,t.default=t,vn}var Wn={},Ro;function Xs(){return Ro||(Ro=1,Wn.isClean=Symbol("isClean"),Wn.my=Symbol("my")),Wn}var wn,vo;function Vs(){if(vo)return wn;vo=1;let e=Gn(),t=Vo(),s=Is(),{isClean:n,my:r}=Xs();function l(h,m){let p=new h.constructor,o=[[h,p,m]];for(;o.length>0;){let[a,i,c]=o.pop();for(let u in a){if(!Object.prototype.hasOwnProperty.call(a,u)||u==="proxyCache")continue;let b=a[u],S=typeof b;if(u==="parent"&&S==="object")c&&(i[u]=c);else if(u==="source")i[u]=b;else if(Array.isArray(b)){let Z=[];i[u]=Z;for(let I of b){let R=new I.constructor;Z.push(R),o.push([I,R,i])}}else{if(S==="object"&&b!==null){let Z=new b.constructor;o.push([b,Z,void 0]),b=Z}i[u]=b}}}return p}function d(h,m){if(m&&typeof m.offset<"u")return m.offset;let p=1,o=1,a=0;for(let i=0;i<h.length;i++){if(o===m.line&&p===m.column){a=i;break}h[i]===`
306
+ `?(p=1,o+=1):p+=1}return a}class f{get proxyOf(){return this}constructor(m={}){this.raws={},this[n]=!1,this[r]=!0;for(let p of Object.keys(m))if(p!=="__proto__")if(p==="nodes"){this.nodes=[];for(let o of m[p])typeof o.clone=="function"&&o.parent?this.append(o.clone()):this.append(o)}else this[p]=m[p]}addToError(m){if(m.postcssNode=this,m.stack&&this.source&&/\n\s{4}at /.test(m.stack)){let p=this.source;m.stack=m.stack.replace(/\n\s{4}at /,`$&${p.input.from}:${p.start.line}:${p.start.column}$&`)}return m}after(m){return this.parent.insertAfter(this,m),this}assign(m={}){for(let p in m)this[p]=m[p];return this}before(m){return this.parent.insertBefore(this,m),this}cleanRaws(m){delete this.raws.before,delete this.raws.after,m||delete this.raws.between}clone(m={}){let p=l(this);for(let o in m)p[o]=m[o];return p}cloneAfter(m={}){let p=this.clone(m);return this.parent.insertAfter(this,p),p}cloneBefore(m={}){let p=this.clone(m);return this.parent.insertBefore(this,p),p}error(m,p={}){if(this.source){let{end:o,start:a}=this.rangeBy(p);return this.source.input.error(m,{column:a.column,line:a.line},{column:o.column,line:o.line},p)}return new e(m)}getProxyProcessor(){return{get(m,p){return p==="proxyOf"?m:p==="root"?()=>m.root().toProxy():m[p]},set(m,p,o){return m[p]===o||(m[p]=o,(p==="prop"||p==="value"||p==="name"||p==="params"||p==="important"||p==="text")&&m.markDirty()),!0}}}markClean(){this[n]=!0}markDirty(){if(this[n]){this[n]=!1;let m=this;for(;m=m.parent;)m[n]=!1}}next(){if(!this.parent)return;let m=this.parent.index(this);return this.parent.nodes[m+1]}positionBy(m={}){let p="document"in this.source.input?this.source.input.document:this.source.input.css,o={column:this.source.start.column,line:this.source.start.line,offset:d(p,this.source.start)};if(m.index)o=this.positionInside(m.index);else if(m.word){let a=p.slice(d(p,this.source.start),d(p,this.source.end)).indexOf(m.word);a!==-1&&(o=this.positionInside(a))}return o}positionInside(m){let p=this.source.start.column,o=this.source.start.line,a="document"in this.source.input?this.source.input.document:this.source.input.css,i=d(a,this.source.start),c=i+m;for(let u=i;u<c;u++)a[u]===`
307
+ `?(p=1,o+=1):p+=1;return{column:p,line:o,offset:c}}prev(){if(!this.parent)return;let m=this.parent.index(this);return this.parent.nodes[m-1]}rangeBy(m={}){let p="document"in this.source.input?this.source.input.document:this.source.input.css,o={column:this.source.start.column,line:this.source.start.line,offset:d(p,this.source.start)},a=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:d(p,this.source.end)+1}:{column:o.column+1,line:o.line,offset:o.offset+1};if(m.word){let i=p.slice(d(p,this.source.start),d(p,this.source.end)).indexOf(m.word);i!==-1&&(o=this.positionInside(i),a=this.positionInside(i+m.word.length))}else m.start?o={column:m.start.column,line:m.start.line,offset:d(p,m.start)}:typeof m.index=="number"&&(o=this.positionInside(m.index)),m.end?a={column:m.end.column,line:m.end.line,offset:d(p,m.end)}:typeof m.endIndex=="number"?a=this.positionInside(m.endIndex):typeof m.index=="number"&&(a=this.positionInside(m.index+1));return(a.line<o.line||a.line===o.line&&a.column<=o.column)&&(a={column:o.column+1,line:o.line,offset:o.offset+1}),{end:a,start:o}}raw(m,p){return new t().raw(this,m,p)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...m){if(this.parent){let p=this,o=!1;for(let a of m)a===this?o=!0:o?(this.parent.insertAfter(p,a),p=a):this.parent.insertBefore(p,a);o||this.remove()}return this}root(){let m=this;for(;m.parent&&m.parent.type!=="document";)m=m.parent;return m}toJSON(m,p){let o=p==null;p=p||new Map;let a=[],i=[[this,a,0]];for(let u=0;u<i.length;u++){let[b,S,Z]=i[u],I={};S[Z]=I;for(let R in b){if(!Object.prototype.hasOwnProperty.call(b,R)||R==="parent"||R==="proxyCache")continue;let y=b[R];if(Array.isArray(y)){let g=[];I[R]=g;for(let X=0;X<y.length;X++){let v=y[X];typeof v=="object"&&v.toJSON?v.toJSON===f.prototype.toJSON?i.push([v,g,X]):g[X]=v.toJSON(null,p):g[X]=v}}else if(typeof y=="object"&&y.toJSON)y.toJSON===f.prototype.toJSON?i.push([y,I,R]):I[R]=y.toJSON(null,p);else if(R==="source"){if(y==null)continue;let g=p.get(y.input);g==null&&(g=p.size,p.set(y.input,g)),I[R]={end:y.end,inputId:g,start:y.start}}else I[R]=y}}let c=a[0];return o&&(c.inputs=[...p.keys()].map(u=>u.toJSON())),c}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(m=s){m.stringify&&(m=m.stringify);let p="";return m(this,o=>{p+=o}),p}warn(m,p,o={}){let a={node:this};for(let i in o)a[i]=o[i];return m.warn(p,a)}}return wn=f,f.default=f,wn}var kn,Wo;function Gs(){if(Wo)return kn;Wo=1;let e=Vs();class t extends e{constructor(n){super(n),this.type="comment"}}return kn=t,t.default=t,kn}var Cn,wo;function Rs(){if(wo)return Cn;wo=1;let e=Vs();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(n){n&&typeof n.value<"u"&&typeof n.value!="string"&&(n=ge(z({},n),{value:String(n.value)})),super(n),this.type="decl"}}return Cn=t,t.default=t,Cn}var xn,ko;function je(){if(ko)return xn;ko=1;let e=Gs(),t=Rs(),s=Vs(),{isClean:n,my:r}=Xs(),l,d,f,h;function m(a){let i=a.slice();for(;i.length>0;){let c=i.pop();if(delete c.source,c.nodes){c.nodes=c.nodes.slice();for(let u of c.nodes)i.push(u)}}return a.slice()}function p(a){let i=[a];for(;i.length>0;){let c=i.pop();if(c[n]=!1,c.proxyOf.nodes)for(let u of c.proxyOf.nodes)i.push(u)}}class o extends s{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]}append(...i){for(let c of i){let u=this.normalize(c,this.last);for(let b of u)this.proxyOf.nodes.push(b)}return this.markDirty(),this}cleanRaws(i){let c=[this];for(;c.length>0;){let u=c.pop();if(u!==this&&u.cleanRaws!==o.prototype.cleanRaws){u.cleanRaws(i);continue}if(s.prototype.cleanRaws.call(u,i),u.nodes)for(let b of u.nodes)c.push(b)}}each(i){if(!this.proxyOf.nodes)return;let c=this.getIterator(),u,b;for(;this.indexes[c]<this.proxyOf.nodes.length&&(u=this.indexes[c],b=i(this.proxyOf.nodes[u],u),b!==!1);)this.indexes[c]+=1;return delete this.indexes[c],b}every(i){return this.nodes.every(i)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let i=this.lastEach;return this.indexes[i]=0,i}getProxyProcessor(){return{get(i,c){return c==="proxyOf"?i:i[c]?c==="each"||typeof c=="string"&&c.startsWith("walk")?(...u)=>i[c](...u.map(b=>typeof b=="function"?(S,Z)=>b(S.toProxy(),Z):b)):c==="every"||c==="some"?u=>i[c]((b,...S)=>u(b.toProxy(),...S)):c==="root"?()=>i.root().toProxy():c==="nodes"?i.nodes.map(u=>u.toProxy()):c==="first"||c==="last"?i[c].toProxy():i[c]:i[c]},set(i,c,u){return i[c]===u||(i[c]=u,(c==="name"||c==="params"||c==="selector")&&i.markDirty()),!0}}}index(i){return typeof i=="number"?i:(i.proxyOf&&(i=i.proxyOf),this.proxyOf.nodes.indexOf(i))}insertAfter(i,c){let u=this.index(i),b=this.normalize(c,this.proxyOf.nodes[u]).reverse();u=this.index(i);for(let Z of b)this.proxyOf.nodes.splice(u+1,0,Z);let S;for(let Z in this.indexes)S=this.indexes[Z],u<S&&(this.indexes[Z]=S+b.length);return this.markDirty(),this}insertBefore(i,c){let u=this.index(i),b=u===0?"prepend":!1,S=this.normalize(c,this.proxyOf.nodes[u],b).reverse();u=this.index(i);for(let I of S)this.proxyOf.nodes.splice(u,0,I);let Z;for(let I in this.indexes)Z=this.indexes[I],u<=Z&&(this.indexes[I]=Z+S.length);return this.markDirty(),this}normalize(i,c){if(typeof i=="string")i=m(d(i).nodes);else if(typeof i>"u")i=[];else if(Array.isArray(i)){i=i.slice(0);for(let u of i)u.parent&&u.parent.removeChild(u,"ignore")}else if(i.type==="root"&&this.type!=="document"){i=i.nodes.slice(0);for(let u of i)u.parent&&u.parent.removeChild(u,"ignore")}else if(i.type)i=[i];else if(i.prop){if(typeof i.value>"u")throw new Error("Value field is missed in node creation");typeof i.value!="string"&&(i.value=String(i.value)),i=[new t(i)]}else if(i.selector||i.selectors)i=[new h(i)];else if(i.name)i=[new l(i)];else if(i.text)i=[new e(i)];else throw new Error("Unknown node type in node creation");return i.map(u=>(u[r]||o.rebuild(u),u=u.proxyOf,u.parent&&u.parent.removeChild(u),u[n]&&p(u),u.raws||(u.raws={}),typeof u.raws.before>"u"&&c&&typeof c.raws.before<"u"&&(u.raws.before=c.raws.before.replace(/\S/g,"")),u.parent=this.proxyOf,u))}prepend(...i){i=i.reverse();for(let c of i){let u=this.normalize(c,this.first,"prepend").reverse();for(let b of u)this.proxyOf.nodes.unshift(b);for(let b in this.indexes)this.indexes[b]=this.indexes[b]+u.length}return this.markDirty(),this}push(i){return i.parent=this,this.proxyOf.nodes.push(i),this}removeAll(){for(let i of this.proxyOf.nodes)i.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(i){i=this.index(i),this.proxyOf.nodes[i].parent=void 0,this.proxyOf.nodes.splice(i,1);let c;for(let u in this.indexes)c=this.indexes[u],c>=i&&(this.indexes[u]=c-1);return this.markDirty(),this}replaceValues(i,c,u){return u||(u=c,c={}),this.walkDecls(b=>{c.props&&!c.props.includes(b.prop)||c.fast&&!b.value.includes(c.fast)||(b.value=b.value.replace(i,u))}),this.markDirty(),this}some(i){return this.nodes.some(i)}walk(i){if(!this.proxyOf.nodes)return;let c=[{iterator:this.getIterator(),node:this.proxyOf}];for(;c.length>0;){let{iterator:u,node:b}=c[c.length-1],S=b.indexes[u];if(S>=b.proxyOf.nodes.length){delete b.indexes[u],c.pop();let R=c[c.length-1];R&&(R.node.indexes[R.iterator]+=1);continue}let Z=b.proxyOf.nodes[S],I;try{I=i(Z,S)}catch(R){throw Z.addToError(R)}if(I===!1){for(let R of c)delete R.node.indexes[R.iterator];return!1}Z.walk&&Z.proxyOf.nodes?c.push({iterator:Z.getIterator(),node:Z}):b.indexes[u]+=1}}walkAtRules(i,c){return c?i instanceof RegExp?this.walk((u,b)=>{if(u.type==="atrule"&&i.test(u.name))return c(u,b)}):this.walk((u,b)=>{if(u.type==="atrule"&&u.name===i)return c(u,b)}):(c=i,this.walk((u,b)=>{if(u.type==="atrule")return c(u,b)}))}walkComments(i){return this.walk((c,u)=>{if(c.type==="comment")return i(c,u)})}walkDecls(i,c){return c?i instanceof RegExp?this.walk((u,b)=>{if(u.type==="decl"&&i.test(u.prop))return c(u,b)}):this.walk((u,b)=>{if(u.type==="decl"&&u.prop===i)return c(u,b)}):(c=i,this.walk((u,b)=>{if(u.type==="decl")return c(u,b)}))}walkRules(i,c){return c?i instanceof RegExp?this.walk((u,b)=>{if(u.type==="rule"&&i.test(u.selector))return c(u,b)}):this.walk((u,b)=>{if(u.type==="rule"&&u.selector===i)return c(u,b)}):(c=i,this.walk((u,b)=>{if(u.type==="rule")return c(u,b)}))}}return o.registerParse=a=>{d=a},o.registerRule=a=>{h=a},o.registerAtRule=a=>{l=a},o.registerRoot=a=>{f=a},xn=o,o.default=o,o.rebuild=a=>{let i=[a];for(;i.length>0;){let c=i.pop();if(c.type==="atrule"?Object.setPrototypeOf(c,l.prototype):c.type==="rule"?Object.setPrototypeOf(c,h.prototype):c.type==="decl"?Object.setPrototypeOf(c,t.prototype):c.type==="comment"?Object.setPrototypeOf(c,e.prototype):c.type==="root"&&Object.setPrototypeOf(c,f.prototype),c[r]=!0,c.nodes)for(let u of c.nodes)i.push(u)}},xn}var Tn,Co;function Ln(){if(Co)return Tn;Co=1;let e=je();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 Tn=t,t.default=t,e.registerAtRule(t),Tn}var Nn,xo;function Jn(){if(xo)return Nn;xo=1;let e=je(),t,s;class n extends e{constructor(l){super(z({type:"document"},l)),this.nodes||(this.nodes=[])}toResult(l={}){return new t(new s,this,l).stringify()}}return n.registerLazyResult=r=>{t=r},n.registerProcessor=r=>{s=r},Nn=n,n.default=n,Nn}var Yn,To;function Rh(){if(To)return Yn;To=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Yn={nanoid:(t=21)=>{let s="",n=t|0;for(;n-- >0;)s+=e[Math.random()*64|0];return s},customAlphabet:(t,s=21)=>(n=s)=>{let r="",l=n|0;for(;l-- >0;)r+=t[Math.random()*t.length|0];return r}},Yn}var Un,Lo;function No(){if(Lo)return Un;Lo=1;let{existsSync:e,readFileSync:t,realpathSync:s}=Ue,{dirname:n,isAbsolute:r,join:l,relative:d,sep:f}=Ue,{SourceMapConsumer:h,SourceMapGenerator:m}=Ue;function p(i){try{return s(i)}catch{return i}}function o(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}class a{constructor(c,u){if(u.map===!1)return;u.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(c),this.inline=this.startWith(this.annotation,"data:");let b=u.map?u.map.prev:void 0,S=this.loadMap(u.from,b);!this.mapFile&&u.from&&(this.mapFile=u.from),this.mapFile&&(this.root=n(this.mapFile)),S&&(this.text=S)}consumer(){return this.consumerCache||(this.consumerCache=new h(this.json||this.text)),this.consumerCache}decodeInline(c){let u=/^data:application\/json;charset=utf-?8;base64,/,b=/^data:application\/json;base64,/,S=/^data:application\/json;charset=utf-?8,/,Z=/^data:application\/json,/,I=c.match(S)||c.match(Z);if(I)return decodeURIComponent(c.substr(I[0].length));let R=c.match(u)||c.match(b);if(R)return o(c.substr(R[0].length));let y=c.slice(22);throw y=y.slice(0,y.indexOf(",")),new Error("Unsupported source map encoding "+y)}getAnnotationURL(c){return c.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(c){return typeof c!="object"?!1:typeof c.mappings=="string"||typeof c._mappings=="string"||Array.isArray(c.sections)}loadAnnotation(c){let u=c.match(/\/\*\s*# sourceMappingURL=/g);if(!u)return;let b=c.lastIndexOf(u.pop()),S=c.indexOf("*/",b);b>-1&&S>-1&&(this.annotation=this.getAnnotationURL(c.substring(b,S)))}loadFile(c,u,b){if(!b&&!this.unsafeMap){if(!/\.map$/i.test(c)||!u)return;let S=d(p(n(u)),p(c));if(S===".."||S.startsWith(".."+f)||r(S))return}if(this.root=n(c),e(c))return this.mapFile=c,t(c,"utf-8").toString().trim()}loadMap(c,u){if(u===!1)return!1;if(u){if(typeof u=="string")return u;if(typeof u=="function"){let b=u(c);if(b){let S=this.loadFile(b,c,!0);if(!S)throw new Error("Unable to load previous source map: "+b.toString());return S}}else{if(u instanceof h)return m.fromSourceMap(u).toString();if(u instanceof m)return u.toString();if(this.isMap(u))return JSON.stringify(u);throw new Error("Unsupported previous source map format: "+u.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let b=this.annotation;c&&(b=l(n(c),b));let S=this.loadFile(b,c,!1);if(S)try{this.json=JSON.parse(S.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return S}}}startWith(c,u){return c?c.substr(0,u.length)===u:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Un=a,a.default=a,Un}var Fn,Jo;function vs(){if(Jo)return Fn;Jo=1;let{nanoid:e}=Rh(),{isAbsolute:t,resolve:s}=Ue,{SourceMapConsumer:n,SourceMapGenerator:r}=Ue,{fileURLToPath:l,pathToFileURL:d}=Ue,f=Gn(),h=No(),m=Ue,p=Symbol("lineToIndexCache"),o=!!(n&&r),a=!!(s&&t);function i(u){if(u[p])return u[p];let b=u.css.split(`
308
+ `),S=new Array(b.length),Z=0;for(let I=0,R=b.length;I<R;I++)S[I]=Z,Z+=b[I].length+1;return u[p]=S,S}class c{get from(){return this.file||this.id}constructor(b,S={}){if(b===null||typeof b>"u"||typeof b=="object"&&!b.toString)throw new Error(`PostCSS received ${b} instead of CSS string`);if(this.css=b.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,S.document&&(this.document=S.document.toString()),S.from&&(!a||/^\w+:\/\//.test(S.from)||t(S.from)?this.file=S.from:this.file=s(S.from)),a&&o){let Z=new h(this.css,S);if(Z.text){this.map=Z;let I=Z.consumer().file;!this.file&&I&&(this.file=this.mapResolve(I))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(b,S,Z,I={}){let R,y,g,X,v;if(S&&typeof S=="object"){let W=S,k=Z;if(typeof W.offset=="number"){X=W.offset;let N=this.fromOffset(X);S=N.line,Z=N.col}else S=W.line,Z=W.column,X=this.fromLineAndColumn(S,Z);if(typeof k.offset=="number"){g=k.offset;let N=this.fromOffset(g);y=N.line,R=N.col}else y=k.line,R=k.column,g=this.fromLineAndColumn(k.line,k.column)}else if(Z)X=this.fromLineAndColumn(S,Z);else{X=S;let W=this.fromOffset(X);S=W.line,Z=W.col}let V=this.origin(S,Z,y,R);return V?v=new f(b,V.endLine===void 0?V.line:{column:V.column,line:V.line},V.endLine===void 0?V.column:{column:V.endColumn,line:V.endLine},V.source,V.file,I.plugin):v=new f(b,y===void 0?S:{column:Z,line:S},y===void 0?Z:{column:R,line:y},this.css,this.file,I.plugin),v.input={column:Z,endColumn:R,endLine:y,endOffset:g,line:S,offset:X,source:this.css},this.file&&(d&&(v.input.url=d(this.file).toString()),v.input.file=this.file),v}fromLineAndColumn(b,S){return i(this)[b-1]+S-1}fromOffset(b){let S=i(this),Z=S[S.length-1],I=0;if(b>=Z)I=S.length-1;else{let R=S.length-2,y;for(;I<R;)if(y=I+(R-I>>1),b<S[y])R=y-1;else if(b>=S[y+1])I=y+1;else{I=y;break}}return{col:b-S[I]+1,line:I+1}}mapResolve(b){return/^\w+:\/\//.test(b)?b:s(this.map.consumer().sourceRoot||this.map.root||".",b)}origin(b,S,Z,I){if(!this.map)return!1;let R=this.map.consumer(),y=R.originalPositionFor({column:S-1,line:b});if(!y.source)return!1;let g;if(typeof Z=="number"){let W=R.originalPositionFor({column:I-1,line:Z});W.source&&(g=W)}let X;t(y.source)?X=d(y.source):X=new URL(y.source,this.map.consumer().sourceRoot||d(this.map.mapFile));let v={column:y.column+1,endColumn:g&&g.column+1,endLine:g&&g.line,line:y.line,url:X.toString()};if(X.protocol==="file:")if(l)v.file=l(X);else throw new Error("file: protocol is not available in this PostCSS build");let V=R.sourceContentFor(y.source);return V&&(v.source=V),v}toJSON(){let b={};for(let S of["hasBOM","css","file","id"])this[S]!=null&&(b[S]=this[S]);return this.map&&(b.map=z({},this.map),b.map.consumerCache&&(b.map.consumerCache=void 0)),b}}return Fn=c,c.default=c,m&&m.registerInput&&m.registerInput(c),Fn}var Mn,Yo;function Nt(){if(Yo)return Mn;Yo=1;let e=je(),t,s;class n extends e{constructor(l){super(l),this.type="root",this.nodes||(this.nodes=[])}normalize(l,d,f){let h=new Set;for(let p of Array.isArray(l)?l:[l])p&&typeof p=="object"&&!p.parent&&p.raws&&typeof p.raws.before<"u"&&h.add(p.raws);let m=super.normalize(l);if(d){if(f==="prepend")this.nodes.length>1?d.raws.before=this.nodes[1].raws.before:delete d.raws.before;else if(this.first!==d)for(let p of m)h.has(p.raws)||(p.raws.before=d.raws.before)}return m}removeChild(l,d){let f=this.index(l);return!d&&f===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[f].raws.before),super.removeChild(l)}toResult(l={}){return new t(new s,this,l).stringify()}}return n.registerLazyResult=r=>{t=r},n.registerProcessor=r=>{s=r},Mn=n,n.default=n,e.registerRoot(n),Mn}var On,Uo;function Fo(){if(Uo)return On;Uo=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let s=[" ",`
309
+ `," "];return e.split(t,s)},split(t,s,n){if(typeof t!="string")return[];let r=[],l="",d=!1,f=0,h=!1,m="",p=!1;for(let o of t)p?p=!1:o==="\\"?p=!0:h?o===m&&(h=!1):o==='"'||o==="'"?(h=!0,m=o):o==="("?f+=1:o===")"?f>0&&(f-=1):f===0&&s.includes(o)&&(d=!0),d?(l!==""&&r.push(l.trim()),l="",d=!1):l+=o;return(n||l!=="")&&r.push(l.trim()),r}};return On=e,e.default=e,On}var Kn,Mo;function En(){if(Mo)return Kn;Mo=1;let e=je(),t=Fo();class s extends e{get selectors(){return t.comma(this.selector)}set selectors(r){let l=this.selector?this.selector.match(/,\s*/):null,d=l?l[0]:","+this.raw("between","beforeOpen");this.selector=r.join(d)}constructor(r){super(r),this.type="rule",this.nodes||(this.nodes=[])}}return Kn=s,s.default=s,e.registerRule(s),Kn}var zn,Oo;function vh(){if(Oo)return zn;Oo=1;let e=Ln(),t=Gs(),s=Rs(),n=vs(),r=No(),l=Nt(),d=En();function f(p,o){return p.inputs?p.inputs.map(a=>{let i=ge(z({},a),{__proto__:n.prototype});return i.map&&(i.map=ge(z({},i.map),{__proto__:r.prototype})),i}):o}function h(p,o,a){let i=z({},p);if(delete i.inputs,delete i.nodes,i.source){let u=i.source,{inputId:b}=u,S=ds(u,["inputId"]);i.source=S,b!=null&&(i.source.input=o[b])}let c;if(i.type==="root")c=new l(i);else if(i.type==="decl")c=new s(i);else if(i.type==="rule")c=new d(i);else if(i.type==="comment")c=new t(i);else if(i.type==="atrule")c=new e(i);else throw new Error("Unknown node type: "+p.type);if(a){c.nodes=a;for(let u of a)u.parent=c}return c}function m(p,o){if(Array.isArray(p))return p.map(c=>m(c));let a,i=[{childIndex:0,children:[],inputs:f(p,o),json:p}];for(;i.length>0;){let c=i[i.length-1],u=c.json.nodes;if(u&&c.childIndex<u.length){let S=u[c.childIndex];c.childIndex+=1,i.push({childIndex:0,children:[],inputs:f(S,c.inputs),json:S});continue}i.pop();let b=h(c.json,c.inputs,u?c.children:void 0);i.length>0?i[i.length-1].children.push(b):a=b}return a}return zn=m,m.default=m,zn}var Hn,Ko;function Eo(){if(Ko)return Hn;Ko=1;let{dirname:e,relative:t,resolve:s,sep:n}=Ue,{SourceMapConsumer:r,SourceMapGenerator:l}=Ue,{pathToFileURL:d}=Ue,f=vs(),h=!!(r&&l),m=!!(e&&s&&t&&n);class p{constructor(a,i,c,u){this.stringify=a,this.mapOpts=c.map||{},this.root=i,this.opts=c,this.css=u,this.originalCSS=u,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let a;this.isInline()?a="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?a=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?a=this.mapOpts.annotation(this.opts.to,this.root):a=this.outputFile()+".map";let i=`
310
310
  `;this.css.includes(`\r
311
311
  `)&&(i=`\r
312
- `),this.css+=i+"/*# sourceMappingURL="+l+" */"}applyPrevMaps(){for(let l of this.previous()){let i=this.toUrl(this.path(l.file)),c=l.root||e(l.file),u;this.mapOpts.sourcesContent===!1?(u=new r(l.text),u.sourcesContent&&(u.sourcesContent=null)):u=l.consumer(),this.map.applySourceMap(u,i,this.toUrl(this.path(c)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let l;for(let i=this.root.nodes.length-1;i>=0;i--)l=this.root.nodes[i],l.type==="comment"&&l.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(i)}else if(this.css){let l;for(;(l=this.css.lastIndexOf("/*#"))!==-1;){let i=this.css.indexOf("*/",l+3);if(i===-1)break;for(;l>0&&this.css[l-1]===`
313
- `;)l--;this.css=this.css.slice(0,l)+this.css.slice(i+2)}}}}generate(){if(this.clearAnnotation(),m&&h&&this.isMap())return this.generateMap();{let l="";return this.stringify(this.root,i=>{l+=i}),[l]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let l=this.previous()[0].consumer();l.file=this.outputFile(),this.map=a.fromSourceMap(l,{ignoreInvalidMapping:!0})}else this.map=new a({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 a({file:this.outputFile(),ignoreInvalidMapping:!0});let l=1,i=1,c="<no source>",u={generated:{column:0,line:0},original:{column:0,line:0},source:""},b,S;this.stringify(this.root,(Z,I,R)=>{if(this.css+=Z,I&&R!=="end"&&(u.generated.line=l,u.generated.column=i-1,I.source&&I.source.start?(u.source=this.sourcePath(I),u.original.line=I.source.start.line,u.original.column=I.source.start.column-1,this.map.addMapping(u)):(u.source=c,u.original.line=1,u.original.column=0,this.map.addMapping(u))),S=Z.match(/\n/g),S?(l+=S.length,b=Z.lastIndexOf(`
314
- `),i=Z.length-b):i+=Z.length,I&&R!=="start"){let y=I.parent||{raws:{}};(!(I.type==="decl"||I.type==="atrule"&&!I.nodes)||I!==y.last||y.raws.semicolon)&&(I.source&&I.source.end?(u.source=this.sourcePath(I),u.original.line=I.source.end.line,u.original.column=I.source.end.column-1,u.generated.line=l,u.generated.column=i-2,this.map.addMapping(u)):(u.source=c,u.original.line=1,u.original.column=0,u.generated.line=l,u.generated.column=i-1,this.map.addMapping(u)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==!0?!1:this.previous().length?this.previous().some(i=>i.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(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let i=this.memoizedPaths.get(l);if(i)return i;let c=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(c=e(s(c,this.mapOpts.annotation)));let u=t(c,l);return this.memoizedPaths.set(l,u),u}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let i=l.source.input.map;this.previousMaps.includes(i)||this.previousMaps.push(i)}});else{let l=new f(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(i=>{if(i.source){let c=i.source.input.from;if(c&&!l[c]){l[c]=!0;let u=this.usesFileUrls?this.toFileUrl(c):this.toUrl(this.path(c));this.map.setSourceContent(u,i.source.input.css)}}});else if(this.css){let i=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(i,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let i=this.memoizedFileURLs.get(l);if(i)return i;if(d){let c=d(l).toString();return this.memoizedFileURLs.set(l,c),c}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let i=this.memoizedURLs.get(l);if(i)return i;n==="\\"&&(l=l.replace(/\\/g,"/"));let c=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,c),c}}return Hn=p,Hn}var Pn,zo;function Rh(){if(zo)return Pn;zo=1;const e=39,t=34,s=92,n=47,r=10,a=32,d=12,f=9,h=13,m=91,p=93,o=40,l=41,i=123,c=125,u=59,b=42,S=58,Z=64,I=/[\t\n\f\r "#'()/;[\\\]{}]/g,R=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,g=/[\da-f]/i;return Pn=function(X,v={}){let V=X.css.valueOf(),W=v.ignoreErrors,k,N,D,G,w,T,Y,M,U,_,B=V.length,C=0,le=[],ae=[],J=-1;function K(){return C}function O(A){throw X.error("Unclosed "+A,C)}function H(){return ae.length===0&&C>=B}function j(A){if(ae.length)return ae.pop();if(C>=B)return;let P=A?A.ignoreUnclosed:!1;switch(k=V.charCodeAt(C),k){case r:case a:case f:case h:case d:{G=C;do G+=1,k=V.charCodeAt(G);while(k===a||k===r||k===f||k===h||k===d);T=["space",V.slice(C,G)],C=G-1;break}case m:case p:case i:case c:case S:case u:case l:{let re=String.fromCharCode(k);T=[re,re,C];break}case o:{if(_=le.length?le.pop()[1]:"",U=V.charCodeAt(C+1),_==="url"&&U!==e&&U!==t&&U!==a&&U!==r&&U!==f&&U!==d&&U!==h){G=C;do{if(Y=!1,G=V.indexOf(")",G+1),G===-1)if(W||P){G=C;break}else O("bracket");for(M=G;V.charCodeAt(M-1)===s;)M-=1,Y=!Y}while(Y);T=["brackets",V.slice(C,G+1),C,G],C=G}else C<=J?T=["(","(",C]:(G=V.indexOf(")",C+1),N=V.slice(C,G+1),G===-1||y.test(N)?(J=G===-1?B:G,T=["(","(",C]):(T=["brackets",N,C,G],C=G));break}case e:case t:{w=k===e?"'":'"',G=C;do{if(Y=!1,G=V.indexOf(w,G+1),G===-1)if(W||P){G=C+1;break}else O("string");for(M=G;V.charCodeAt(M-1)===s;)M-=1,Y=!Y}while(Y);T=["string",V.slice(C,G+1),C,G],C=G;break}case Z:{I.lastIndex=C+1,I.test(V),I.lastIndex===0?G=V.length-1:G=I.lastIndex-2,T=["at-word",V.slice(C,G+1),C,G],C=G;break}case s:{for(G=C,D=!0;V.charCodeAt(G+1)===s;)G+=1,D=!D;if(k=V.charCodeAt(G+1),D&&k!==n&&k!==a&&k!==r&&k!==f&&k!==h&&k!==d&&(G+=1,g.test(V.charAt(G)))){for(;g.test(V.charAt(G+1));)G+=1;V.charCodeAt(G+1)===a&&(G+=1)}T=["word",V.slice(C,G+1),C,G],C=G;break}default:{k===n&&V.charCodeAt(C+1)===b?(G=V.indexOf("*/",C+2)+1,G===0&&(W||P?G=V.length:O("comment")),T=["comment",V.slice(C,G+1),C,G],C=G):(R.lastIndex=C+1,R.test(V),R.lastIndex===0?G=V.length-1:G=R.lastIndex-2,T=["word",V.slice(C,G+1),C,G],le.push(T),C=G);break}}return C++,T}function ee(A){ae.push(A)}return{back:ee,endOfFile:H,nextToken:j,position:K}},Pn}var Dn,Ho;function vh(){if(Ho)return Dn;Ho=1;let e=Ln(),t=Gs(),s=Rs(),n=Nt(),r=En(),a=Rh();const d={empty:!0,space:!0};function f(p){for(let o=p.length-1;o>=0;o--){let l=p[o],i=l[3]||l[2];if(i)return i}}function h(p,o,l){let i="";for(let c=o;c<l;c++)i+=p[c][1];return i}class m{constructor(o){this.input=o,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}}}atrule(o){let l=new e;l.name=o[1].slice(1),l.name===""&&this.unnamedAtrule(l,o),this.init(l,o[2]);let i,c,u,b=!1,S=!1,Z=[],I=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),i=o[0],i==="("||i==="["?I.push(i==="("?")":"]"):i==="{"&&I.length>0?I.push("}"):i===I[I.length-1]&&I.pop(),I.length===0)if(i===";"){l.source.end=this.getPosition(o[2]),l.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){S=!0;break}else if(i==="}"){if(Z.length>0){for(u=Z.length-1,c=Z[u];c&&c[0]==="space";)c=Z[--u];c&&(l.source.end=this.getPosition(c[3]||c[2]),l.source.end.offset++)}this.end(o);break}else Z.push(o);else Z.push(o);if(this.tokenizer.endOfFile()){b=!0;break}}l.raws.between=this.spacesAndCommentsFromEnd(Z),Z.length?(l.raws.afterName=this.spacesAndCommentsFromStart(Z),this.raw(l,"params",Z),b&&(o=Z[Z.length-1],l.source.end=this.getPosition(o[3]||o[2]),l.source.end.offset++,this.spaces=l.raws.between,l.raws.between="")):(l.raws.afterName="",l.params=""),S&&(l.nodes=[],this.current=l)}checkMissedSemicolon(o){let l=this.colon(o);if(l===!1)return;let i=0,c;for(let u=l-1;u>=0&&(c=o[u],!(c[0]!=="space"&&(i+=1,i===2)));u--);throw this.input.error("Missed semicolon",c[0]==="word"?c[3]+1:c[2])}colon(o){let l=0,i,c,u;for(let[b,S]of o.entries()){if(c=S,u=c[0],u==="("&&(l+=1),u===")"&&(l-=1),l===0&&u===":")if(!i)this.doubleColon(c);else{if(i[0]==="word"&&i[1]==="progid")continue;return b}i=c}return!1}comment(o){let l=new t;this.init(l,o[2]),l.source.end=this.getPosition(o[3]||o[2]),l.source.end.offset++;let i=o[1].slice(2,-2);if(!i.trim())l.text="",l.raws.left=i,l.raws.right="";else{let c=i.match(/^(\s*)([^]*\S)(\s*)$/);l.text=c[2],l.raws.left=c[1],l.raws.right=c[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(o,l){let i=new s;this.init(i,o[0][2]);let c=o[o.length-1];c[0]===";"&&(this.semicolon=!0,o.pop()),i.source.end=this.getPosition(c[3]||c[2]||f(o)),i.source.end.offset++;let u=0;for(;o[u][0]!=="word";)u===o.length-1&&this.unknownWord([o[u]]),u++;i.raws.before+=h(o,0,u),i.source.start=this.getPosition(o[u][2]);let b=u;for(;u<o.length;){let y=o[u][0];if(y===":"||y==="space"||y==="comment")break;u++}i.prop=h(o,b,u);let S=u,Z;for(;u<o.length&&(Z=o[u],u++,Z[0]!==":");)Z[0]==="word"&&/\w/.test(Z[1])&&this.unknownWord([Z]);i.raws.between=h(o,S,u),(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let I=u;for(;u<o.length;){let y=o[u][0];if(y!=="space"&&y!=="comment")break;u++}let R=o.slice(I,u);o=o.slice(u),this.precheckMissedSemicolon(o);for(let y=o.length-1;y>=0;y--){if(Z=o[y],Z[1].toLowerCase()==="!important"){i.important=!0;let g=this.stringFrom(o,y);g=this.spacesFromEnd(o)+g,g!==" !important"&&(i.raws.important=g);break}else if(Z[1].toLowerCase()==="important"){let g=o.slice(0),X="";for(let v=y;v>0;v--){let V=g[v][0];if(X.trim().startsWith("!")&&V!=="space")break;X=g.pop()[1]+X}X.trim().startsWith("!")&&(i.important=!0,i.raws.important=X,o=g)}if(Z[0]!=="space"&&Z[0]!=="comment")break}o.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(i.raws.between+=R.map(y=>y[1]).join(""),R=[]),this.raw(i,"value",R.concat(o),l),i.value.includes(":")&&!l&&this.checkMissedSemicolon(o)}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let l=new r;this.init(l,o[2]),l.selector="",l.raws.between="",this.current=l}end(o){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(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o)}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(o){if(this.spaces+=o[1],this.current.nodes){let l=this.current.nodes[this.current.nodes.length-1];l&&l.type==="rule"&&!l.raws.ownSemicolon&&(l.raws.ownSemicolon=this.spaces,this.spaces="",l.source.end=this.getPosition(o[2]),l.source.end.offset+=l.raws.ownSemicolon.length)}}getPosition(o){let l=this.input.fromOffset(o);return{column:l.col,line:l.line,offset:o}}init(o,l){this.current.push(o),o.source={input:this.input,start:this.getPosition(l)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=!1)}other(o){let l=!1,i=null,c=!1,u=null,b=[],S=o[1].startsWith("--"),Z=[],I=o;for(;I;){if(i=I[0],Z.push(I),i==="("||i==="[")u||(u=I),b.push(i==="("?")":"]");else if(S&&c&&i==="{")u||(u=I),b.push("}");else if(b.length===0)if(i===";")if(c){this.decl(Z,S);return}else break;else if(i==="{"){this.rule(Z);return}else if(i==="}"){this.tokenizer.back(Z.pop()),l=!0;break}else i===":"&&(c=!0);else i===b[b.length-1]&&(b.pop(),b.length===0&&(u=null));I=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(l=!0),b.length>0&&this.unclosedBracket(u),l&&c){if(!S)for(;Z.length&&(I=Z[Z.length-1][0],!(I!=="space"&&I!=="comment"));)this.tokenizer.back(Z.pop());this.decl(Z,S)}else this.unknownWord(Z)}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case"space":this.spaces+=o[1];break;case";":this.freeSemicolon(o);break;case"}":this.end(o);break;case"comment":this.comment(o);break;case"at-word":this.atrule(o);break;case"{":this.emptyRule(o);break;default:this.other(o);break}this.endFile()}precheckMissedSemicolon(){}raw(o,l,i,c){let u,b,S=i.length,Z="",I=!0,R,y;for(let g=0;g<S;g+=1)u=i[g],b=u[0],b==="space"&&g===S-1&&!c?I=!1:b==="comment"?(y=i[g-1]?i[g-1][0]:"empty",R=i[g+1]?i[g+1][0]:"empty",!d[y]&&!d[R]?Z.slice(-1)===","?I=!1:Z+=u[1]:I=!1):Z+=u[1];if(!I){let g=i.reduce((X,v)=>X+v[1],"");o.raws[l]={raw:g,value:Z}}o[l]=Z}rule(o){o.pop();let l=new r;this.init(l,o[0][2]),l.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(l,"selector",o),this.current=l}spacesAndCommentsFromEnd(o){let l,i="";for(;o.length&&(l=o[o.length-1][0],!(l!=="space"&&l!=="comment"));)i=o.pop()[1]+i;return i}spacesAndCommentsFromStart(o){let l,i="";for(;o.length&&(l=o[0][0],!(l!=="space"&&l!=="comment"));)i+=o.shift()[1];return i}spacesFromEnd(o){let l,i="";for(;o.length&&(l=o[o.length-1][0],l==="space");)i=o.pop()[1]+i;return i}stringFrom(o,l){let i="";for(let c=l;c<o.length;c++)i+=o[c][1];return o.splice(l,o.length-l),i}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word "+o[0][1],{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,l){throw this.input.error("At-rule without name",{offset:l[2]},{offset:l[2]+l[1].length})}}return Dn=m,Dn}var Bn,Po;function Qn(){if(Po)return Bn;Po=1;let e=je(),t=vs(),s=vh();function n(r,a){let d=new t(r,a),f=new s(d);try{f.parse()}catch(h){throw process.env.NODE_ENV!=="production"&&h.name==="CssSyntaxError"&&a&&a.from&&(/\.scss$/i.test(a.from)?h.message+=`
315
- You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(a.from)?h.message+=`
316
- You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(a.from)&&(h.message+=`
317
- You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),h}return f.root}return Bn=n,n.default=n,e.registerParse(n),Bn}var jn,Do;function Bo(){if(Do)return jn;Do=1;let e=je(),{my:t}=Xs();class s{constructor(r,a={}){if(this.type="warning",this.text=r,a.node&&a.node.source){a.node[t]||e.rebuild(a.node);let d=a.node.rangeBy(a);this.line=d.start.line,this.column=d.start.column,this.endLine=d.end.line,this.endColumn=d.end.column}for(let d in a)this[d]=a[d]}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 jn=s,s.default=s,jn}var An,Qo;function _n(){if(Qo)return An;Qo=1;let e=Bo();class t{get content(){return this.css}constructor(n,r,a){this.processor=n,this.messages=[],this.root=r,this.opts=a,this.css="",this.map=void 0}toString(){return this.css}warn(n,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let a=new e(n,r);return this.messages.push(a),a}warnings(){return this.messages.filter(n=>n.type==="warning")}}return An=t,t.default=t,An}var $n,jo;function Ao(){if(jo)return $n;jo=1;let e={};return $n=function(t){e[t]||(e[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},$n}var qn,_o;function $o(){if(_o)return qn;_o=1;let e=je(),t=Jn(),s=Eo(),n=Qn(),r=_n(),a=Nt(),d=Is(),{isClean:f,my:h}=Xs(),m=Ao();const p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},o={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},l={Once:!0,postcssPlugin:!0,prepare:!0},i=0;function c(R){return typeof R=="object"&&typeof R.then=="function"}function u(R){let y=!1,g=p[R.type];return R.type==="decl"?y=R.prop.toLowerCase():R.type==="atrule"&&(y=R.name.toLowerCase()),y&&R.append?[g,g+"-"+y,i,g+"Exit",g+"Exit-"+y]:y?[g,g+"-"+y,g+"Exit",g+"Exit-"+y]:R.append?[g,i,g+"Exit"]:[g,g+"Exit"]}function b(R){let y;return R.type==="document"?y=["Document",i,"DocumentExit"]:R.type==="root"?y=["Root",i,"RootExit"]:y=u(R),{eventIndex:0,events:y,iterator:0,node:R,visitorIndex:0,visitors:[]}}function S(R){let y=[R];for(;y.length>0;){let g=y.pop();if(g[f]=!1,g.nodes)for(let X of g.nodes)y.push(X)}return R}let Z={};class I{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"}constructor(y,g,X){this.stringified=!1,this.processed=!1;let v;if(typeof g=="object"&&g!==null&&(g.type==="root"||g.type==="document"))v=S(g);else if(g instanceof I||g instanceof r)v=S(g.root),g.map&&(typeof X.map>"u"&&(X.map={}),X.map.inline||(X.map.inline=!1),X.map.prev=g.map);else{let V=n;X.syntax&&(V=X.syntax.parse),X.parser&&(V=X.parser),V.parse&&(V=V.parse);try{v=V(g,X)}catch(W){this.processed=!0,this.error=W}v&&!v[h]&&e.rebuild(v)}this.result=new r(y,v,X),this.helpers=ge(z({},Z),{postcss:Z,result:this.result}),this.plugins=this.processor.plugins.map(V=>typeof V=="object"&&V.prepare?z(z({},V),V.prepare(this.result)):V)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,g){let X=this.result.lastPlugin;try{if(g&&g.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin)y.plugin=X.postcssPlugin,y.setMessage();else if(X.postcssVersion&&process.env.NODE_ENV!=="production"){let v=X.postcssPlugin,V=X.postcssVersion,W=this.result.processor.version,k=V.split("."),N=W.split(".");(k[0]!==N[0]||parseInt(k[1])>parseInt(N[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+W+", but "+v+" uses "+V+". Perhaps this is the source of the error below.")}}catch(v){console&&console.error&&console.error(v)}return y}prepareVisitors(){this.listeners={};let y=(g,X,v)=>{this.listeners[X]||(this.listeners[X]=[]),this.listeners[X].push([g,v])};for(let g of this.plugins)if(typeof g=="object")for(let X in g){if(!o[X]&&/^[A-Z]/.test(X))throw new Error(`Unknown event ${X} in ${g.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[X])if(typeof g[X]=="object")for(let v in g[X])v==="*"?y(g,X,g[X][v]):y(g,X+"-"+v.toLowerCase(),g[X][v]);else typeof g[X]=="function"&&y(g,X,g[X])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return Ve(this,null,function*(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let g=this.plugins[y],X=this.runOnRoot(g);if(c(X))try{yield X}catch(v){throw this.handleError(v)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[f];){y[f]=!0;let g=[b(y)];for(;g.length>0;){let X=this.visitTick(g);if(c(X))try{yield X}catch(v){let V=g[g.length-1].node;throw this.handleError(v,V)}}}if(this.listeners.OnceExit)for(let[g,X]of this.listeners.OnceExit){this.result.lastPlugin=g;try{if(y.type==="document"){let v=y.nodes.map(V=>X(V,this.helpers));yield Promise.all(v)}else yield X(y,this.helpers)}catch(v){throw this.handleError(v)}}}return this.processed=!0,this.stringify()})}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let g=this.result.root.nodes.map(X=>y.Once(X,this.helpers));return c(g[0])?Promise.all(g):g}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(g){throw this.handleError(g)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,g=d;y.syntax&&(g=y.syntax.stringify),y.stringifier&&(g=y.stringifier),g.stringify&&(g=g.stringify);let X=this.result.root.source;if(y.map===void 0&&!(X&&X.input&&X.input.map)){let V="";return g(this.result.root,W=>{V+=W}),this.result.css=V,this.result}let v=new s(g,this.result.root,this.result.opts).generate();return this.result.css=v[0],this.result.map=v[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 y of this.plugins){let g=this.runOnRoot(y);if(c(g))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[f];)y[f]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let g of y.nodes)this.visitSync(this.listeners.OnceExit,g);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,g){return process.env.NODE_ENV!=="production"&&("from"in this.opts||m("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(y,g)}toString(){return this.css}visitSync(y,g){for(let[X,v]of y){this.result.lastPlugin=X;let V;try{V=v(g,this.helpers)}catch(W){throw this.handleError(W,g.proxyOf)}if(g.type!=="root"&&g.type!=="document"&&!g.parent)return!0;if(c(V))throw this.getAsyncError()}}visitTick(y){let g=y[y.length-1],{node:X,visitors:v}=g;if(X.type!=="root"&&X.type!=="document"&&!X.parent){y.pop();return}if(v.length>0&&g.visitorIndex<v.length){let[W,k]=v[g.visitorIndex];g.visitorIndex+=1,g.visitorIndex===v.length&&(g.visitors=[],g.visitorIndex=0),this.result.lastPlugin=W;try{return k(X.toProxy(),this.helpers)}catch(N){throw this.handleError(N,X)}}if(g.iterator!==0){let W=g.iterator;g.descending&&(g.descending=!1,X.indexes[W]+=1);let k;for(;k=X.nodes[X.indexes[W]];){if(!k[f]){k[f]=!0,g.descending=!0,y.push(b(k));return}X.indexes[W]+=1}g.iterator=0,delete X.indexes[W]}let V=g.events;for(;g.eventIndex<V.length;){let W=V[g.eventIndex];if(g.eventIndex+=1,W===i){X.nodes&&X.nodes.length&&(X[f]=!0,g.iterator=X.getIterator());return}else if(this.listeners[W]){g.visitors=this.listeners[W];return}}y.pop()}walkSync(y){y[f]=!0;let g=[{eventIndex:0,events:u(y),iterator:0,node:y}];for(;g.length>0;){let X=g[g.length-1],v=X.node;if(X.iterator!==0){let V=X.iterator;X.descending&&(X.descending=!1,v.indexes[V]+=1);let W,k=!1;for(;W=v.nodes[v.indexes[V]];){if(!W[f]){W[f]=!0,X.descending=!0,g.push({eventIndex:0,events:u(W),iterator:0,node:W}),k=!0;break}v.indexes[V]+=1}if(k)continue;X.iterator=0,delete v.indexes[V]}if(X.eventIndex<X.events.length){let V=X.events[X.eventIndex];if(X.eventIndex+=1,V===i)v.nodes&&v.nodes.length&&(X.iterator=v.getIterator());else{let W=this.listeners[V];W&&this.visitSync(W,v.toProxy())&&g.pop()}continue}g.pop()}}warnings(){return this.sync().warnings()}}return I.registerPostcss=R=>{Z=R},qn=I,I.default=I,a.registerLazyResult(I),t.registerLazyResult(I),qn}var ei,qo;function Wh(){if(qo)return ei;qo=1;let e=Eo(),t=Qn(),s=_n(),n=Is(),r=Ao();class a{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 f,h=t;try{f=h(this._css,this._opts)}catch(m){this.error=m}if(this.error)throw this.error;return this._root=f,f}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(f,h,m){h=h.toString(),this.stringified=!1,this._processor=f,this._css=h,this._opts=m,this._map=void 0;let p=n;this.result=new s(this._processor,void 0,this._opts),this.result.css=h;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new e(p,void 0,this._opts,h);if(l.isMap()){let[i,c]=l.generate();i&&(this.result.css=i),c&&(this.result.map=c)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(f){return this.async().catch(f)}finally(f){return this.async().then(f,f)}sync(){if(this.error)throw this.error;return this.result}then(f,h){return process.env.NODE_ENV!=="production"&&("from"in this._opts||r("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(f,h)}toString(){return this._css}warnings(){return[]}}return ei=a,a.default=a,ei}var ti,el;function wh(){if(el)return ti;el=1;let e=Jn(),t=$o(),s=Wh(),n=Nt();class r{constructor(d=[]){this.version="8.5.26",this.plugins=this.normalize(d)}normalize(d){let f=[];for(let h of d)if(h.postcss===!0?h=h():h.postcss&&(h=h.postcss),typeof h=="object"&&Array.isArray(h.plugins))f=f.concat(h.plugins);else if(typeof h=="object"&&h.postcssPlugin)f.push(h);else if(typeof h=="function")f.push(h);else if(typeof h=="object"&&(h.parse||h.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(h+" is not a PostCSS plugin");return f}process(d,f={}){return!this.plugins.length&&!f.parser&&!f.stringifier&&!f.syntax?new s(this,d,f):new t(this,d,f)}use(d){return this.plugins=this.plugins.concat(this.normalize([d])),this}}return ti=r,r.default=r,n.registerProcessor(r),e.registerProcessor(r),ti}var si,tl;function kh(){if(tl)return si;tl=1;let e=Ln(),t=Gs(),s=je(),n=Gn(),r=Rs(),a=Jn(),d=Gh(),f=vs(),h=$o(),m=Fo(),p=Vs(),o=Qn(),l=wh(),i=_n(),c=Nt(),u=En(),b=Is(),S=Bo();function Z(...I){return I.length===1&&Array.isArray(I[0])&&(I=I[0]),new l(I)}return Z.plugin=function(I,R){let y=!1;function g(...v){console&&console.warn&&!y&&(y=!0,console.warn(I+`: postcss.plugin was deprecated. Migration guide:
312
+ `),this.css+=i+"/*# sourceMappingURL="+a+" */"}applyPrevMaps(){for(let a of this.previous()){let i=this.toUrl(this.path(a.file)),c=a.root||e(a.file),u;this.mapOpts.sourcesContent===!1?(u=new r(a.text),u.sourcesContent&&(u.sourcesContent=null)):u=a.consumer(),this.map.applySourceMap(u,i,this.toUrl(this.path(c)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let a;for(let i=this.root.nodes.length-1;i>=0;i--)a=this.root.nodes[i],a.type==="comment"&&a.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(i)}else if(this.css){let a;for(;(a=this.css.lastIndexOf("/*#"))!==-1;){let i=this.css.indexOf("*/",a+3);if(i===-1)break;for(;a>0&&this.css[a-1]===`
313
+ `;)a--;this.css=this.css.slice(0,a)+this.css.slice(i+2)}}}}generate(){if(this.clearAnnotation(),m&&h&&this.isMap())return this.generateMap();{let a="";return this.stringify(this.root,i=>{a+=i}),[a]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let a=this.previous()[0].consumer();a.file=this.outputFile(),this.map=l.fromSourceMap(a,{ignoreInvalidMapping:!0})}else this.map=new l({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 l({file:this.outputFile(),ignoreInvalidMapping:!0});let a=1,i=1,c="<no source>",u={generated:{column:0,line:0},original:{column:0,line:0},source:""},b,S;this.stringify(this.root,(Z,I,R)=>{if(this.css+=Z,I&&R!=="end"&&(u.generated.line=a,u.generated.column=i-1,I.source&&I.source.start?(u.source=this.sourcePath(I),u.original.line=I.source.start.line,u.original.column=I.source.start.column-1,this.map.addMapping(u)):(u.source=c,u.original.line=1,u.original.column=0,this.map.addMapping(u))),S=Z.match(/\n/g),S?(a+=S.length,b=Z.lastIndexOf(`
314
+ `),i=Z.length-b):i+=Z.length,I&&R!=="start"){let y=I.parent||{raws:{}};(!(I.type==="decl"||I.type==="atrule"&&!I.nodes)||I!==y.last||y.raws.semicolon)&&(I.source&&I.source.end?(u.source=this.sourcePath(I),u.original.line=I.source.end.line,u.original.column=I.source.end.column-1,u.generated.line=a,u.generated.column=i-2,this.map.addMapping(u)):(u.source=c,u.original.line=1,u.original.column=0,u.generated.line=a,u.generated.column=i-1,this.map.addMapping(u)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(a=>a.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let a=this.mapOpts.annotation;return typeof a<"u"&&a!==!0?!1:this.previous().length?this.previous().some(i=>i.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(a=>a.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(a){if(this.mapOpts.absolute||a.charCodeAt(0)===60||/^\w+:\/\//.test(a))return a;let i=this.memoizedPaths.get(a);if(i)return i;let c=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(c=e(s(c,this.mapOpts.annotation)));let u=t(c,a);return this.memoizedPaths.set(a,u),u}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(a=>{if(a.source&&a.source.input.map){let i=a.source.input.map;this.previousMaps.includes(i)||this.previousMaps.push(i)}});else{let a=new f(this.originalCSS,this.opts);a.map&&this.previousMaps.push(a.map)}return this.previousMaps}setSourcesContent(){let a={};if(this.root)this.root.walk(i=>{if(i.source){let c=i.source.input.from;if(c&&!a[c]){a[c]=!0;let u=this.usesFileUrls?this.toFileUrl(c):this.toUrl(this.path(c));this.map.setSourceContent(u,i.source.input.css)}}});else if(this.css){let i=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(i,this.css)}}sourcePath(a){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(a.source.input.from):this.toUrl(this.path(a.source.input.from))}toBase64(a){return Buffer?Buffer.from(a).toString("base64"):window.btoa(unescape(encodeURIComponent(a)))}toFileUrl(a){let i=this.memoizedFileURLs.get(a);if(i)return i;if(d){let c=d(a).toString();return this.memoizedFileURLs.set(a,c),c}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(a){let i=this.memoizedURLs.get(a);if(i)return i;n==="\\"&&(a=a.replace(/\\/g,"/"));let c=encodeURI(a).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(a,c),c}}return Hn=p,Hn}var Pn,zo;function Wh(){if(zo)return Pn;zo=1;const e=39,t=34,s=92,n=47,r=10,l=32,d=12,f=9,h=13,m=91,p=93,o=40,a=41,i=123,c=125,u=59,b=42,S=58,Z=64,I=/[\t\n\f\r "#'()/;[\\\]{}]/g,R=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,g=/[\da-f]/i;return Pn=function(X,v={}){let V=X.css.valueOf(),W=v.ignoreErrors,k,N,D,G,w,T,Y,M,U,_,B=V.length,C=0,le=[],ae=[],J=-1;function K(){return C}function O(A){throw X.error("Unclosed "+A,C)}function H(){return ae.length===0&&C>=B}function j(A){if(ae.length)return ae.pop();if(C>=B)return;let P=A?A.ignoreUnclosed:!1;switch(k=V.charCodeAt(C),k){case r:case l:case f:case h:case d:{G=C;do G+=1,k=V.charCodeAt(G);while(k===l||k===r||k===f||k===h||k===d);T=["space",V.slice(C,G)],C=G-1;break}case m:case p:case i:case c:case S:case u:case a:{let re=String.fromCharCode(k);T=[re,re,C];break}case o:{if(_=le.length?le.pop()[1]:"",U=V.charCodeAt(C+1),_==="url"&&U!==e&&U!==t&&U!==l&&U!==r&&U!==f&&U!==d&&U!==h){G=C;do{if(Y=!1,G=V.indexOf(")",G+1),G===-1)if(W||P){G=C;break}else O("bracket");for(M=G;V.charCodeAt(M-1)===s;)M-=1,Y=!Y}while(Y);T=["brackets",V.slice(C,G+1),C,G],C=G}else C<=J?T=["(","(",C]:(G=V.indexOf(")",C+1),N=V.slice(C,G+1),G===-1||y.test(N)?(J=G===-1?B:G,T=["(","(",C]):(T=["brackets",N,C,G],C=G));break}case e:case t:{w=k===e?"'":'"',G=C;do{if(Y=!1,G=V.indexOf(w,G+1),G===-1)if(W||P){G=C+1;break}else O("string");for(M=G;V.charCodeAt(M-1)===s;)M-=1,Y=!Y}while(Y);T=["string",V.slice(C,G+1),C,G],C=G;break}case Z:{I.lastIndex=C+1,I.test(V),I.lastIndex===0?G=V.length-1:G=I.lastIndex-2,T=["at-word",V.slice(C,G+1),C,G],C=G;break}case s:{for(G=C,D=!0;V.charCodeAt(G+1)===s;)G+=1,D=!D;if(k=V.charCodeAt(G+1),D&&k!==n&&k!==l&&k!==r&&k!==f&&k!==h&&k!==d&&(G+=1,g.test(V.charAt(G)))){for(;g.test(V.charAt(G+1));)G+=1;V.charCodeAt(G+1)===l&&(G+=1)}T=["word",V.slice(C,G+1),C,G],C=G;break}default:{k===n&&V.charCodeAt(C+1)===b?(G=V.indexOf("*/",C+2)+1,G===0&&(W||P?G=V.length:O("comment")),T=["comment",V.slice(C,G+1),C,G],C=G):(R.lastIndex=C+1,R.test(V),R.lastIndex===0?G=V.length-1:G=R.lastIndex-2,T=["word",V.slice(C,G+1),C,G],le.push(T),C=G);break}}return C++,T}function ee(A){ae.push(A)}return{back:ee,endOfFile:H,nextToken:j,position:K}},Pn}var Dn,Ho;function wh(){if(Ho)return Dn;Ho=1;let e=Ln(),t=Gs(),s=Rs(),n=Nt(),r=En(),l=Wh();const d={empty:!0,space:!0};function f(p){for(let o=p.length-1;o>=0;o--){let a=p[o],i=a[3]||a[2];if(i)return i}}function h(p,o,a){let i="";for(let c=o;c<a;c++)i+=p[c][1];return i}class m{constructor(o){this.input=o,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}}}atrule(o){let a=new e;a.name=o[1].slice(1),a.name===""&&this.unnamedAtrule(a,o),this.init(a,o[2]);let i,c,u,b=!1,S=!1,Z=[],I=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),i=o[0],i==="("||i==="["?I.push(i==="("?")":"]"):i==="{"&&I.length>0?I.push("}"):i===I[I.length-1]&&I.pop(),I.length===0)if(i===";"){a.source.end=this.getPosition(o[2]),a.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){S=!0;break}else if(i==="}"){if(Z.length>0){for(u=Z.length-1,c=Z[u];c&&c[0]==="space";)c=Z[--u];c&&(a.source.end=this.getPosition(c[3]||c[2]),a.source.end.offset++)}this.end(o);break}else Z.push(o);else Z.push(o);if(this.tokenizer.endOfFile()){b=!0;break}}a.raws.between=this.spacesAndCommentsFromEnd(Z),Z.length?(a.raws.afterName=this.spacesAndCommentsFromStart(Z),this.raw(a,"params",Z),b&&(o=Z[Z.length-1],a.source.end=this.getPosition(o[3]||o[2]),a.source.end.offset++,this.spaces=a.raws.between,a.raws.between="")):(a.raws.afterName="",a.params=""),S&&(a.nodes=[],this.current=a)}checkMissedSemicolon(o){let a=this.colon(o);if(a===!1)return;let i=0,c;for(let u=a-1;u>=0&&(c=o[u],!(c[0]!=="space"&&(i+=1,i===2)));u--);throw this.input.error("Missed semicolon",c[0]==="word"?c[3]+1:c[2])}colon(o){let a=0,i,c,u;for(let[b,S]of o.entries()){if(c=S,u=c[0],u==="("&&(a+=1),u===")"&&(a-=1),a===0&&u===":")if(!i)this.doubleColon(c);else{if(i[0]==="word"&&i[1]==="progid")continue;return b}i=c}return!1}comment(o){let a=new t;this.init(a,o[2]),a.source.end=this.getPosition(o[3]||o[2]),a.source.end.offset++;let i=o[1].slice(2,-2);if(!i.trim())a.text="",a.raws.left=i,a.raws.right="";else{let c=i.match(/^(\s*)([^]*\S)(\s*)$/);a.text=c[2],a.raws.left=c[1],a.raws.right=c[3]}}createTokenizer(){this.tokenizer=l(this.input)}decl(o,a){let i=new s;this.init(i,o[0][2]);let c=o[o.length-1];c[0]===";"&&(this.semicolon=!0,o.pop()),i.source.end=this.getPosition(c[3]||c[2]||f(o)),i.source.end.offset++;let u=0;for(;o[u][0]!=="word";)u===o.length-1&&this.unknownWord([o[u]]),u++;i.raws.before+=h(o,0,u),i.source.start=this.getPosition(o[u][2]);let b=u;for(;u<o.length;){let y=o[u][0];if(y===":"||y==="space"||y==="comment")break;u++}i.prop=h(o,b,u);let S=u,Z;for(;u<o.length&&(Z=o[u],u++,Z[0]!==":");)Z[0]==="word"&&/\w/.test(Z[1])&&this.unknownWord([Z]);i.raws.between=h(o,S,u),(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let I=u;for(;u<o.length;){let y=o[u][0];if(y!=="space"&&y!=="comment")break;u++}let R=o.slice(I,u);o=o.slice(u),this.precheckMissedSemicolon(o);for(let y=o.length-1;y>=0;y--){if(Z=o[y],Z[1].toLowerCase()==="!important"){i.important=!0;let g=this.stringFrom(o,y);g=this.spacesFromEnd(o)+g,g!==" !important"&&(i.raws.important=g);break}else if(Z[1].toLowerCase()==="important"){let g=o.slice(0),X="";for(let v=y;v>0;v--){let V=g[v][0];if(X.trim().startsWith("!")&&V!=="space")break;X=g.pop()[1]+X}X.trim().startsWith("!")&&(i.important=!0,i.raws.important=X,o=g)}if(Z[0]!=="space"&&Z[0]!=="comment")break}o.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(i.raws.between+=R.map(y=>y[1]).join(""),R=[]),this.raw(i,"value",R.concat(o),a),i.value.includes(":")&&!a&&this.checkMissedSemicolon(o)}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let a=new r;this.init(a,o[2]),a.selector="",a.raws.between="",this.current=a}end(o){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(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o)}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(o){if(this.spaces+=o[1],this.current.nodes){let a=this.current.nodes[this.current.nodes.length-1];a&&a.type==="rule"&&!a.raws.ownSemicolon&&(a.raws.ownSemicolon=this.spaces,this.spaces="",a.source.end=this.getPosition(o[2]),a.source.end.offset+=a.raws.ownSemicolon.length)}}getPosition(o){let a=this.input.fromOffset(o);return{column:a.col,line:a.line,offset:o}}init(o,a){this.current.push(o),o.source={input:this.input,start:this.getPosition(a)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=!1)}other(o){let a=!1,i=null,c=!1,u=null,b=[],S=o[1].startsWith("--"),Z=[],I=o;for(;I;){if(i=I[0],Z.push(I),i==="("||i==="[")u||(u=I),b.push(i==="("?")":"]");else if(S&&c&&i==="{")u||(u=I),b.push("}");else if(b.length===0)if(i===";")if(c){this.decl(Z,S);return}else break;else if(i==="{"){this.rule(Z);return}else if(i==="}"){this.tokenizer.back(Z.pop()),a=!0;break}else i===":"&&(c=!0);else i===b[b.length-1]&&(b.pop(),b.length===0&&(u=null));I=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(a=!0),b.length>0&&this.unclosedBracket(u),a&&c){if(!S)for(;Z.length&&(I=Z[Z.length-1][0],!(I!=="space"&&I!=="comment"));)this.tokenizer.back(Z.pop());this.decl(Z,S)}else this.unknownWord(Z)}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case"space":this.spaces+=o[1];break;case";":this.freeSemicolon(o);break;case"}":this.end(o);break;case"comment":this.comment(o);break;case"at-word":this.atrule(o);break;case"{":this.emptyRule(o);break;default:this.other(o);break}this.endFile()}precheckMissedSemicolon(){}raw(o,a,i,c){let u,b,S=i.length,Z="",I=!0,R,y;for(let g=0;g<S;g+=1)u=i[g],b=u[0],b==="space"&&g===S-1&&!c?I=!1:b==="comment"?(y=i[g-1]?i[g-1][0]:"empty",R=i[g+1]?i[g+1][0]:"empty",!d[y]&&!d[R]?Z.slice(-1)===","?I=!1:Z+=u[1]:I=!1):Z+=u[1];if(!I){let g=i.reduce((X,v)=>X+v[1],"");o.raws[a]={raw:g,value:Z}}o[a]=Z}rule(o){o.pop();let a=new r;this.init(a,o[0][2]),a.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(a,"selector",o),this.current=a}spacesAndCommentsFromEnd(o){let a,i="";for(;o.length&&(a=o[o.length-1][0],!(a!=="space"&&a!=="comment"));)i=o.pop()[1]+i;return i}spacesAndCommentsFromStart(o){let a,i="";for(;o.length&&(a=o[0][0],!(a!=="space"&&a!=="comment"));)i+=o.shift()[1];return i}spacesFromEnd(o){let a,i="";for(;o.length&&(a=o[o.length-1][0],a==="space");)i=o.pop()[1]+i;return i}stringFrom(o,a){let i="";for(let c=a;c<o.length;c++)i+=o[c][1];return o.splice(a,o.length-a),i}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word "+o[0][1],{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,a){throw this.input.error("At-rule without name",{offset:a[2]},{offset:a[2]+a[1].length})}}return Dn=m,Dn}var Bn,Po;function Qn(){if(Po)return Bn;Po=1;let e=je(),t=vs(),s=wh();function n(r,l){let d=new t(r,l),f=new s(d);try{f.parse()}catch(h){throw process.env.NODE_ENV!=="production"&&h.name==="CssSyntaxError"&&l&&l.from&&(/\.scss$/i.test(l.from)?h.message+=`
315
+ You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(l.from)?h.message+=`
316
+ You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(l.from)&&(h.message+=`
317
+ You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),h}return f.root}return Bn=n,n.default=n,e.registerParse(n),Bn}var jn,Do;function Bo(){if(Do)return jn;Do=1;let e=je(),{my:t}=Xs();class s{constructor(r,l={}){if(this.type="warning",this.text=r,l.node&&l.node.source){l.node[t]||e.rebuild(l.node);let d=l.node.rangeBy(l);this.line=d.start.line,this.column=d.start.column,this.endLine=d.end.line,this.endColumn=d.end.column}for(let d in l)this[d]=l[d]}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 jn=s,s.default=s,jn}var An,Qo;function _n(){if(Qo)return An;Qo=1;let e=Bo();class t{get content(){return this.css}constructor(n,r,l){this.processor=n,this.messages=[],this.root=r,this.opts=l,this.css="",this.map=void 0}toString(){return this.css}warn(n,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let l=new e(n,r);return this.messages.push(l),l}warnings(){return this.messages.filter(n=>n.type==="warning")}}return An=t,t.default=t,An}var $n,jo;function Ao(){if(jo)return $n;jo=1;let e={};return $n=function(t){e[t]||(e[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},$n}var qn,_o;function $o(){if(_o)return qn;_o=1;let e=je(),t=Jn(),s=Eo(),n=Qn(),r=_n(),l=Nt(),d=Is(),{isClean:f,my:h}=Xs(),m=Ao();const p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},o={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},a={Once:!0,postcssPlugin:!0,prepare:!0},i=0;function c(R){return typeof R=="object"&&typeof R.then=="function"}function u(R){let y=!1,g=p[R.type];return R.type==="decl"?y=R.prop.toLowerCase():R.type==="atrule"&&(y=R.name.toLowerCase()),y&&R.append?[g,g+"-"+y,i,g+"Exit",g+"Exit-"+y]:y?[g,g+"-"+y,g+"Exit",g+"Exit-"+y]:R.append?[g,i,g+"Exit"]:[g,g+"Exit"]}function b(R){let y;return R.type==="document"?y=["Document",i,"DocumentExit"]:R.type==="root"?y=["Root",i,"RootExit"]:y=u(R),{eventIndex:0,events:y,iterator:0,node:R,visitorIndex:0,visitors:[]}}function S(R){let y=[R];for(;y.length>0;){let g=y.pop();if(g[f]=!1,g.nodes)for(let X of g.nodes)y.push(X)}return R}let Z={};class I{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"}constructor(y,g,X){this.stringified=!1,this.processed=!1;let v;if(typeof g=="object"&&g!==null&&(g.type==="root"||g.type==="document"))v=S(g);else if(g instanceof I||g instanceof r)v=S(g.root),g.map&&(typeof X.map>"u"&&(X.map={}),X.map.inline||(X.map.inline=!1),X.map.prev=g.map);else{let V=n;X.syntax&&(V=X.syntax.parse),X.parser&&(V=X.parser),V.parse&&(V=V.parse);try{v=V(g,X)}catch(W){this.processed=!0,this.error=W}v&&!v[h]&&e.rebuild(v)}this.result=new r(y,v,X),this.helpers=ge(z({},Z),{postcss:Z,result:this.result}),this.plugins=this.processor.plugins.map(V=>typeof V=="object"&&V.prepare?z(z({},V),V.prepare(this.result)):V)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,g){let X=this.result.lastPlugin;try{if(g&&g.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin)y.plugin=X.postcssPlugin,y.setMessage();else if(X.postcssVersion&&process.env.NODE_ENV!=="production"){let v=X.postcssPlugin,V=X.postcssVersion,W=this.result.processor.version,k=V.split("."),N=W.split(".");(k[0]!==N[0]||parseInt(k[1])>parseInt(N[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+W+", but "+v+" uses "+V+". Perhaps this is the source of the error below.")}}catch(v){console&&console.error&&console.error(v)}return y}prepareVisitors(){this.listeners={};let y=(g,X,v)=>{this.listeners[X]||(this.listeners[X]=[]),this.listeners[X].push([g,v])};for(let g of this.plugins)if(typeof g=="object")for(let X in g){if(!o[X]&&/^[A-Z]/.test(X))throw new Error(`Unknown event ${X} in ${g.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!a[X])if(typeof g[X]=="object")for(let v in g[X])v==="*"?y(g,X,g[X][v]):y(g,X+"-"+v.toLowerCase(),g[X][v]);else typeof g[X]=="function"&&y(g,X,g[X])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return Ve(this,null,function*(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let g=this.plugins[y],X=this.runOnRoot(g);if(c(X))try{yield X}catch(v){throw this.handleError(v)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[f];){y[f]=!0;let g=[b(y)];for(;g.length>0;){let X=this.visitTick(g);if(c(X))try{yield X}catch(v){let V=g[g.length-1].node;throw this.handleError(v,V)}}}if(this.listeners.OnceExit)for(let[g,X]of this.listeners.OnceExit){this.result.lastPlugin=g;try{if(y.type==="document"){let v=y.nodes.map(V=>X(V,this.helpers));yield Promise.all(v)}else yield X(y,this.helpers)}catch(v){throw this.handleError(v)}}}return this.processed=!0,this.stringify()})}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let g=this.result.root.nodes.map(X=>y.Once(X,this.helpers));return c(g[0])?Promise.all(g):g}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(g){throw this.handleError(g)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,g=d;y.syntax&&(g=y.syntax.stringify),y.stringifier&&(g=y.stringifier),g.stringify&&(g=g.stringify);let X=this.result.root.source;if(y.map===void 0&&!(X&&X.input&&X.input.map)){let V="";return g(this.result.root,W=>{V+=W}),this.result.css=V,this.result}let v=new s(g,this.result.root,this.result.opts).generate();return this.result.css=v[0],this.result.map=v[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 y of this.plugins){let g=this.runOnRoot(y);if(c(g))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[f];)y[f]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let g of y.nodes)this.visitSync(this.listeners.OnceExit,g);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,g){return process.env.NODE_ENV!=="production"&&("from"in this.opts||m("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(y,g)}toString(){return this.css}visitSync(y,g){for(let[X,v]of y){this.result.lastPlugin=X;let V;try{V=v(g,this.helpers)}catch(W){throw this.handleError(W,g.proxyOf)}if(g.type!=="root"&&g.type!=="document"&&!g.parent)return!0;if(c(V))throw this.getAsyncError()}}visitTick(y){let g=y[y.length-1],{node:X,visitors:v}=g;if(X.type!=="root"&&X.type!=="document"&&!X.parent){y.pop();return}if(v.length>0&&g.visitorIndex<v.length){let[W,k]=v[g.visitorIndex];g.visitorIndex+=1,g.visitorIndex===v.length&&(g.visitors=[],g.visitorIndex=0),this.result.lastPlugin=W;try{return k(X.toProxy(),this.helpers)}catch(N){throw this.handleError(N,X)}}if(g.iterator!==0){let W=g.iterator;g.descending&&(g.descending=!1,X.indexes[W]+=1);let k;for(;k=X.nodes[X.indexes[W]];){if(!k[f]){k[f]=!0,g.descending=!0,y.push(b(k));return}X.indexes[W]+=1}g.iterator=0,delete X.indexes[W]}let V=g.events;for(;g.eventIndex<V.length;){let W=V[g.eventIndex];if(g.eventIndex+=1,W===i){X.nodes&&X.nodes.length&&(X[f]=!0,g.iterator=X.getIterator());return}else if(this.listeners[W]){g.visitors=this.listeners[W];return}}y.pop()}walkSync(y){y[f]=!0;let g=[{eventIndex:0,events:u(y),iterator:0,node:y}];for(;g.length>0;){let X=g[g.length-1],v=X.node;if(X.iterator!==0){let V=X.iterator;X.descending&&(X.descending=!1,v.indexes[V]+=1);let W,k=!1;for(;W=v.nodes[v.indexes[V]];){if(!W[f]){W[f]=!0,X.descending=!0,g.push({eventIndex:0,events:u(W),iterator:0,node:W}),k=!0;break}v.indexes[V]+=1}if(k)continue;X.iterator=0,delete v.indexes[V]}if(X.eventIndex<X.events.length){let V=X.events[X.eventIndex];if(X.eventIndex+=1,V===i)v.nodes&&v.nodes.length&&(X.iterator=v.getIterator());else{let W=this.listeners[V];W&&this.visitSync(W,v.toProxy())&&g.pop()}continue}g.pop()}}warnings(){return this.sync().warnings()}}return I.registerPostcss=R=>{Z=R},qn=I,I.default=I,l.registerLazyResult(I),t.registerLazyResult(I),qn}var ei,qo;function kh(){if(qo)return ei;qo=1;let e=Eo(),t=Qn(),s=_n(),n=Is(),r=Ao();class l{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 f,h=t;try{f=h(this._css,this._opts)}catch(m){this.error=m}if(this.error)throw this.error;return this._root=f,f}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(f,h,m){h=h.toString(),this.stringified=!1,this._processor=f,this._css=h,this._opts=m,this._map=void 0;let p=n;this.result=new s(this._processor,void 0,this._opts),this.result.css=h;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new e(p,void 0,this._opts,h);if(a.isMap()){let[i,c]=a.generate();i&&(this.result.css=i),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(f){return this.async().catch(f)}finally(f){return this.async().then(f,f)}sync(){if(this.error)throw this.error;return this.result}then(f,h){return process.env.NODE_ENV!=="production"&&("from"in this._opts||r("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(f,h)}toString(){return this._css}warnings(){return[]}}return ei=l,l.default=l,ei}var ti,el;function Ch(){if(el)return ti;el=1;let e=Jn(),t=$o(),s=kh(),n=Nt();class r{constructor(d=[]){this.version="8.5.26",this.plugins=this.normalize(d)}normalize(d){let f=[];for(let h of d)if(h.postcss===!0?h=h():h.postcss&&(h=h.postcss),typeof h=="object"&&Array.isArray(h.plugins))f=f.concat(h.plugins);else if(typeof h=="object"&&h.postcssPlugin)f.push(h);else if(typeof h=="function")f.push(h);else if(typeof h=="object"&&(h.parse||h.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(h+" is not a PostCSS plugin");return f}process(d,f={}){return!this.plugins.length&&!f.parser&&!f.stringifier&&!f.syntax?new s(this,d,f):new t(this,d,f)}use(d){return this.plugins=this.plugins.concat(this.normalize([d])),this}}return ti=r,r.default=r,n.registerProcessor(r),e.registerProcessor(r),ti}var si,tl;function xh(){if(tl)return si;tl=1;let e=Ln(),t=Gs(),s=je(),n=Gn(),r=Rs(),l=Jn(),d=vh(),f=vs(),h=$o(),m=Fo(),p=Vs(),o=Qn(),a=Ch(),i=_n(),c=Nt(),u=En(),b=Is(),S=Bo();function Z(...I){return I.length===1&&Array.isArray(I[0])&&(I=I[0]),new a(I)}return Z.plugin=function(I,R){let y=!1;function g(...v){console&&console.warn&&!y&&(y=!0,console.warn(I+`: postcss.plugin was deprecated. Migration guide:
318
318
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(I+`: 里面 postcss.plugin 被弃用. 迁移指南:
319
- https://www.w3ctech.com/topic/2226`));let V=R(...v);return V.postcssPlugin=I,V.postcssVersion=new l().version,V}let X;return Object.defineProperty(g,"postcss",{get(){return X||(X=g()),X}}),g.process=function(v,V,W){return Z([g(W)]).process(v,V)},g},Z.stringify=b,Z.parse=o,Z.fromJSON=d,Z.list=m,Z.comment=I=>new t(I),Z.atRule=I=>new e(I),Z.decl=I=>new r(I),Z.rule=I=>new u(I),Z.root=I=>new c(I),Z.document=I=>new a(I),Z.CssSyntaxError=n,Z.Declaration=r,Z.Container=s,Z.Processor=l,Z.Document=a,Z.Comment=t,Z.Warning=S,Z.AtRule=e,Z.Result=i,Z.Input=f,Z.Rule=u,Z.Root=c,Z.Node=p,h.registerPostcss(Z),si=Z,Z.default=Z,si}kh();var Ch=Object.defineProperty,xh=(e,t,s)=>t in e?Ch(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ne=(e,t,s)=>xh(e,typeof t!="symbol"?t+"":t,s);Date.now().toString();function Th(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var s=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(s,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),s}var Ws={exports:{}},sl;function Lh(){if(sl)return Ws.exports;sl=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,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Ws.exports=t(),Ws.exports.createColors=t,Ws.exports}const Nh={},Jh=Object.freeze(Object.defineProperty({__proto__:null,default:Nh},Symbol.toStringTag,{value:"Module"})),Fe=Th(Jh);var ni,nl;function ii(){if(nl)return ni;nl=1;let e=Lh(),t=Fe;class s extends Error{constructor(r,a,d,f,h,m){super(r),this.name="CssSyntaxError",this.reason=r,h&&(this.file=h),f&&(this.source=f),m&&(this.plugin=m),typeof a<"u"&&typeof d<"u"&&(typeof a=="number"?(this.line=a,this.column=d):(this.line=a.line,this.column=a.column,this.endLine=d.line,this.endColumn=d.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}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(r){if(!this.source)return"";let a=this.source;r==null&&(r=e.isColorSupported);let d=i=>i,f=i=>i,h=i=>i;if(r){let{bold:i,gray:c,red:u}=e.createColors(!0);f=b=>i(u(b)),d=b=>c(b),t&&(h=b=>t(b))}let m=a.split(/\r?\n/),p=Math.max(this.line-3,0),o=Math.min(this.line+2,m.length),l=String(o).length;return m.slice(p,o).map((i,c)=>{let u=p+1+c,b=" "+(" "+u).slice(-l)+" | ";if(u===this.line){if(i.length>160){let Z=20,I=Math.max(0,this.column-Z),R=Math.max(this.column+Z,this.endColumn+Z),y=i.slice(I,R),g=d(b.replace(/\d/g," "))+i.slice(0,Math.min(this.column-1,Z-1)).replace(/[^\t]/g," ");return f(">")+d(b)+h(y)+`
319
+ https://www.w3ctech.com/topic/2226`));let V=R(...v);return V.postcssPlugin=I,V.postcssVersion=new a().version,V}let X;return Object.defineProperty(g,"postcss",{get(){return X||(X=g()),X}}),g.process=function(v,V,W){return Z([g(W)]).process(v,V)},g},Z.stringify=b,Z.parse=o,Z.fromJSON=d,Z.list=m,Z.comment=I=>new t(I),Z.atRule=I=>new e(I),Z.decl=I=>new r(I),Z.rule=I=>new u(I),Z.root=I=>new c(I),Z.document=I=>new l(I),Z.CssSyntaxError=n,Z.Declaration=r,Z.Container=s,Z.Processor=a,Z.Document=l,Z.Comment=t,Z.Warning=S,Z.AtRule=e,Z.Result=i,Z.Input=f,Z.Rule=u,Z.Root=c,Z.Node=p,h.registerPostcss(Z),si=Z,Z.default=Z,si}xh();var Th=Object.defineProperty,Lh=(e,t,s)=>t in e?Th(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ne=(e,t,s)=>Lh(e,typeof t!="symbol"?t+"":t,s);Date.now().toString();function Nh(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var s=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(s,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),s}var Ws={exports:{}},sl;function Jh(){if(sl)return Ws.exports;sl=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,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Ws.exports=t(),Ws.exports.createColors=t,Ws.exports}const Yh={},Uh=Object.freeze(Object.defineProperty({__proto__:null,default:Yh},Symbol.toStringTag,{value:"Module"})),Fe=Nh(Uh);var ni,nl;function ii(){if(nl)return ni;nl=1;let e=Jh(),t=Fe;class s extends Error{constructor(r,l,d,f,h,m){super(r),this.name="CssSyntaxError",this.reason=r,h&&(this.file=h),f&&(this.source=f),m&&(this.plugin=m),typeof l<"u"&&typeof d<"u"&&(typeof l=="number"?(this.line=l,this.column=d):(this.line=l.line,this.column=l.column,this.endLine=d.line,this.endColumn=d.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}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(r){if(!this.source)return"";let l=this.source;r==null&&(r=e.isColorSupported);let d=i=>i,f=i=>i,h=i=>i;if(r){let{bold:i,gray:c,red:u}=e.createColors(!0);f=b=>i(u(b)),d=b=>c(b),t&&(h=b=>t(b))}let m=l.split(/\r?\n/),p=Math.max(this.line-3,0),o=Math.min(this.line+2,m.length),a=String(o).length;return m.slice(p,o).map((i,c)=>{let u=p+1+c,b=" "+(" "+u).slice(-a)+" | ";if(u===this.line){if(i.length>160){let Z=20,I=Math.max(0,this.column-Z),R=Math.max(this.column+Z,this.endColumn+Z),y=i.slice(I,R),g=d(b.replace(/\d/g," "))+i.slice(0,Math.min(this.column-1,Z-1)).replace(/[^\t]/g," ");return f(">")+d(b)+h(y)+`
320
320
  `+g+f("^")}let S=d(b.replace(/\d/g," "))+i.slice(0,this.column-1).replace(/[^\t]/g," ");return f(">")+d(b)+h(i)+`
321
321
  `+S+f("^")}return" "+d(b)+h(i)}).join(`
322
322
  `)}toString(){let r=this.showSourceCode();return r&&(r=`
@@ -327,29 +327,29 @@ https://www.w3ctech.com/topic/2226`));let V=R(...v);return V.postcssPlugin=I,V.p
327
327
  `,beforeComment:`
328
328
  `,beforeDecl:`
329
329
  `,beforeOpen:" ",beforeRule:`
330
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function a(p){return p[0].toUpperCase()+p.slice(1)}function d(p,o){let l="@"+o.name,i=o.params?p.rawValue(o,"params"):"",c=o.raws.afterName;return typeof c>"u"?c=i?" ":"":c===""&&i&&!s.test(i[0])&&(c=" "),l+c+i}function f(p,o,l){let i=l.nodes,c=i.length-1;for(;c>0&&i[c].type==="comment";)c-=1;let u=p.raw(l,"semicolon"),b=l.type==="document";for(let S=i.length-1;S>=0;S--){let Z=i[S],I=c!==S||u;!I&&S<i.length-1&&(Z.type==="atrule"&&!Z.nodes||Z.type==="decl"&&Z.prop.startsWith("--"))&&(I=!0),o.push({document:b,node:Z,semicolon:I})}}function h(p,o,l,i){let c=p.raw(l,"between","beforeOpen");p.builder(n(i+c)+"{",l,"start");let u=l.nodes&&l.nodes.length,b=()=>{let S=u?p.raw(l,"after"):p.raw(l,"after","emptyBody");S&&p.builder(n(S)),p.builder("}",l,"end"),l.type==="rule"&&l.raws.ownSemicolon&&p.builder(n(l.raws.ownSemicolon),l,"end")};u?(o.push(b),f(p,o,l)):b()}class m{constructor(o){this.builder=o}atrule(o,l){let i=d(this,o);if(o.nodes)this.block(o,i);else{let c=(o.raws.between||"")+(l?";":"");this.builder(n(i+c),o)}}beforeAfter(o,l){let i;o.type==="decl"?i=this.raw(o,null,"beforeDecl"):o.type==="comment"?i=this.raw(o,null,"beforeComment"):l==="before"?i=this.raw(o,null,"beforeRule"):i=this.raw(o,null,"beforeClose");let c=o.parent,u=0;for(;c&&c.type!=="root";)u+=1,c=c.parent;if(i.includes(`
331
- `)){let b=this.raw(o,null,"indent");if(b.length)for(let S=0;S<u;S++)i+=b}return i}block(o,l){let i=this.raw(o,"between","beforeOpen");this.builder(n(l+i)+"{",o,"start");let c;o.nodes&&o.nodes.length?(this.body(o),c=this.raw(o,"after")):c=this.raw(o,"after","emptyBody"),c&&this.builder(n(c)),this.builder("}",o,"end")}body(o){let l=m.prototype,i=["atrule","block","body","rule","stringify"].every(u=>this[u]===l[u]),c=[];for(f(this,c,o);c.length>0;){let u=c.pop();if(typeof u=="function"){u();continue}let b=u.node,S=this.raw(b,"before");S&&this.builder(u.document?S:n(S)),i&&b.type==="rule"?h(this,c,b,this.rawValue(b,"selector")):i&&b.type==="atrule"&&b.nodes?h(this,c,b,d(this,b)):this.stringify(b,u.semicolon)}}comment(o){let l=this.raw(o,"left","commentLeft"),i=this.raw(o,"right","commentRight");this.builder(n("/*"+l+o.text+i+"*/"),o)}decl(o,l){let i=o.raws,c=this.raw(o,"between","colon"),u=o.prop+c+this.rawValue(o,"value");o.important&&(u+=i.important||" !important"),l&&(u+=";"),this.builder(n(u),o)}document(o){this.body(o)}raw(o,l,i){let c;if(i||(i=l),l&&(c=o.raws[l],typeof c<"u"))return c;let u=o.parent;if(i==="before"&&(!u||u.type==="root"&&u.first===o||u&&u.type==="document"))return"";if(!u)return r[i];let b=o.root(),S=b.rawCache||(b.rawCache={});if(typeof S[i]<"u")return S[i];if(i==="before"||i==="after")return this.beforeAfter(o,i);{let Z="raw"+a(i);this[Z]?c=this[Z](b,o):b.walk(I=>{if(c=I.raws[l],typeof c<"u")return!1})}return typeof c>"u"&&(c=r[i]),S[i]=c,c}rawBeforeClose(o){let l;return o.walk(i=>{if(i.nodes&&i.nodes.length>0&&typeof i.raws.after<"u")return l=i.raws.after,l.includes(`
332
- `)&&(l=l.replace(/[^\n]+$/,"")),!1}),l&&(l=l.replace(/\S/g,"")),l}rawBeforeComment(o,l){let i;return o.walkComments(c=>{if(typeof c.raws.before<"u")return i=c.raws.before,i.includes(`
333
- `)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(l,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(o,l){let i;return o.walkDecls(c=>{if(typeof c.raws.before<"u")return i=c.raws.before,i.includes(`
334
- `)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(l,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(o){let l;return o.walk(i=>{if(i.type!=="decl"&&(l=i.raws.between,typeof l<"u"))return!1}),l}rawBeforeRule(o){let l;return o.walk(i=>{if(i.nodes&&(i.parent!==o||o.first!==i)&&typeof i.raws.before<"u")return l=i.raws.before,l.includes(`
335
- `)&&(l=l.replace(/[^\n]+$/,"")),!1}),l&&(l=l.replace(/\S/g,"")),l}rawColon(o){let l;return o.walkDecls(i=>{if(typeof i.raws.between<"u")return l=i.raws.between.replace(/[^\s:]/g,""),!1}),l}rawEmptyBody(o){let l;return o.walk(i=>{if(i.nodes&&i.nodes.length===0&&(l=i.raws.after,typeof l<"u"))return!1}),l}rawIndent(o){if(o.raws.indent)return o.raws.indent;let l;return o.walk(i=>{let c=i.parent;if(c&&c!==o&&c.parent&&c.parent===o&&typeof i.raws.before<"u"){let u=i.raws.before.split(`
336
- `);return l=u[u.length-1],l=l.replace(/\S/g,""),!1}}),l}rawSemicolon(o){let l;return o.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(l=i.raws.semicolon,typeof l<"u"))return!1}),l}rawValue(o,l){let i=o[l],c=o.raws[l];return c&&c.value===i?c.raw:i}root(o){if(o.source&&o.source.input.hasBOM&&this.builder("\uFEFF",o,"start"),this.body(o),o.raws.after){let l=o.raws.after,i=o.parent&&o.parent.type==="document";this.builder(i?l:n(l))}}rule(o){this.block(o,this.rawValue(o,"selector")),o.raws.ownSemicolon&&this.builder(n(o.raws.ownSemicolon),o,"end")}stringify(o,l){if(!this[o.type])throw new Error("Unknown AST node type "+o.type+". Maybe you need to change PostCSS stringifier.");this[o.type](o,l)}}return ri=m,m.default=m,ri}var oi,ol;function ws(){if(ol)return oi;ol=1;let e=rl();function t(s,n){new e(n).stringify(s)}return oi=t,t.default=t,oi}var li={},ll;function ks(){return ll||(ll=1,li.isClean=Symbol("isClean"),li.my=Symbol("my")),li}var ai,al;function Cs(){if(al)return ai;al=1;let e=ii(),t=rl(),s=ws(),{isClean:n,my:r}=ks();function a(h,m){let p=new h.constructor,o=[[h,p,m]];for(;o.length>0;){let[l,i,c]=o.pop();for(let u in l){if(!Object.prototype.hasOwnProperty.call(l,u)||u==="proxyCache")continue;let b=l[u],S=typeof b;if(u==="parent"&&S==="object")c&&(i[u]=c);else if(u==="source")i[u]=b;else if(Array.isArray(b)){let Z=[];i[u]=Z;for(let I of b){let R=new I.constructor;Z.push(R),o.push([I,R,i])}}else{if(S==="object"&&b!==null){let Z=new b.constructor;o.push([b,Z,void 0]),b=Z}i[u]=b}}}return p}function d(h,m){if(m&&typeof m.offset<"u")return m.offset;let p=1,o=1,l=0;for(let i=0;i<h.length;i++){if(o===m.line&&p===m.column){l=i;break}h[i]===`
337
- `?(p=1,o+=1):p+=1}return l}class f{get proxyOf(){return this}constructor(m={}){this.raws={},this[n]=!1,this[r]=!0;for(let p of Object.keys(m))if(p!=="__proto__")if(p==="nodes"){this.nodes=[];for(let o of m[p])typeof o.clone=="function"&&o.parent?this.append(o.clone()):this.append(o)}else this[p]=m[p]}addToError(m){if(m.postcssNode=this,m.stack&&this.source&&/\n\s{4}at /.test(m.stack)){let p=this.source;m.stack=m.stack.replace(/\n\s{4}at /,`$&${p.input.from}:${p.start.line}:${p.start.column}$&`)}return m}after(m){return this.parent.insertAfter(this,m),this}assign(m={}){for(let p in m)this[p]=m[p];return this}before(m){return this.parent.insertBefore(this,m),this}cleanRaws(m){delete this.raws.before,delete this.raws.after,m||delete this.raws.between}clone(m={}){let p=a(this);for(let o in m)p[o]=m[o];return p}cloneAfter(m={}){let p=this.clone(m);return this.parent.insertAfter(this,p),p}cloneBefore(m={}){let p=this.clone(m);return this.parent.insertBefore(this,p),p}error(m,p={}){if(this.source){let{end:o,start:l}=this.rangeBy(p);return this.source.input.error(m,{column:l.column,line:l.line},{column:o.column,line:o.line},p)}return new e(m)}getProxyProcessor(){return{get(m,p){return p==="proxyOf"?m:p==="root"?()=>m.root().toProxy():m[p]},set(m,p,o){return m[p]===o||(m[p]=o,(p==="prop"||p==="value"||p==="name"||p==="params"||p==="important"||p==="text")&&m.markDirty()),!0}}}markClean(){this[n]=!0}markDirty(){if(this[n]){this[n]=!1;let m=this;for(;m=m.parent;)m[n]=!1}}next(){if(!this.parent)return;let m=this.parent.index(this);return this.parent.nodes[m+1]}positionBy(m={}){let p="document"in this.source.input?this.source.input.document:this.source.input.css,o={column:this.source.start.column,line:this.source.start.line,offset:d(p,this.source.start)};if(m.index)o=this.positionInside(m.index);else if(m.word){let l=p.slice(d(p,this.source.start),d(p,this.source.end)).indexOf(m.word);l!==-1&&(o=this.positionInside(l))}return o}positionInside(m){let p=this.source.start.column,o=this.source.start.line,l="document"in this.source.input?this.source.input.document:this.source.input.css,i=d(l,this.source.start),c=i+m;for(let u=i;u<c;u++)l[u]===`
338
- `?(p=1,o+=1):p+=1;return{column:p,line:o,offset:c}}prev(){if(!this.parent)return;let m=this.parent.index(this);return this.parent.nodes[m-1]}rangeBy(m={}){let p="document"in this.source.input?this.source.input.document:this.source.input.css,o={column:this.source.start.column,line:this.source.start.line,offset:d(p,this.source.start)},l=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:d(p,this.source.end)+1}:{column:o.column+1,line:o.line,offset:o.offset+1};if(m.word){let i=p.slice(d(p,this.source.start),d(p,this.source.end)).indexOf(m.word);i!==-1&&(o=this.positionInside(i),l=this.positionInside(i+m.word.length))}else m.start?o={column:m.start.column,line:m.start.line,offset:d(p,m.start)}:typeof m.index=="number"&&(o=this.positionInside(m.index)),m.end?l={column:m.end.column,line:m.end.line,offset:d(p,m.end)}:typeof m.endIndex=="number"?l=this.positionInside(m.endIndex):typeof m.index=="number"&&(l=this.positionInside(m.index+1));return(l.line<o.line||l.line===o.line&&l.column<=o.column)&&(l={column:o.column+1,line:o.line,offset:o.offset+1}),{end:l,start:o}}raw(m,p){return new t().raw(this,m,p)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...m){if(this.parent){let p=this,o=!1;for(let l of m)l===this?o=!0:o?(this.parent.insertAfter(p,l),p=l):this.parent.insertBefore(p,l);o||this.remove()}return this}root(){let m=this;for(;m.parent&&m.parent.type!=="document";)m=m.parent;return m}toJSON(m,p){let o=p==null;p=p||new Map;let l=[],i=[[this,l,0]];for(let u=0;u<i.length;u++){let[b,S,Z]=i[u],I={};S[Z]=I;for(let R in b){if(!Object.prototype.hasOwnProperty.call(b,R)||R==="parent"||R==="proxyCache")continue;let y=b[R];if(Array.isArray(y)){let g=[];I[R]=g;for(let X=0;X<y.length;X++){let v=y[X];typeof v=="object"&&v.toJSON?v.toJSON===f.prototype.toJSON?i.push([v,g,X]):g[X]=v.toJSON(null,p):g[X]=v}}else if(typeof y=="object"&&y.toJSON)y.toJSON===f.prototype.toJSON?i.push([y,I,R]):I[R]=y.toJSON(null,p);else if(R==="source"){if(y==null)continue;let g=p.get(y.input);g==null&&(g=p.size,p.set(y.input,g)),I[R]={end:y.end,inputId:g,start:y.start}}else I[R]=y}}let c=l[0];return o&&(c.inputs=[...p.keys()].map(u=>u.toJSON())),c}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(m=s){m.stringify&&(m=m.stringify);let p="";return m(this,o=>{p+=o}),p}warn(m,p,o={}){let l={node:this};for(let i in o)l[i]=o[i];return m.warn(p,l)}}return ai=f,f.default=f,ai}var ci,cl;function xs(){if(cl)return ci;cl=1;let e=Cs();class t extends e{constructor(n){super(n),this.type="comment"}}return ci=t,t.default=t,ci}var ui,ul;function Ts(){if(ul)return ui;ul=1;let e=Cs();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(n){n&&typeof n.value<"u"&&typeof n.value!="string"&&(n=ge(z({},n),{value:String(n.value)})),super(n),this.type="decl"}}return ui=t,t.default=t,ui}var di,dl;function Ae(){if(dl)return di;dl=1;let e=xs(),t=Ts(),s=Cs(),{isClean:n,my:r}=ks(),a,d,f,h;function m(l){let i=l.slice();for(;i.length>0;){let c=i.pop();if(delete c.source,c.nodes){c.nodes=c.nodes.slice();for(let u of c.nodes)i.push(u)}}return l.slice()}function p(l){let i=[l];for(;i.length>0;){let c=i.pop();if(c[n]=!1,c.proxyOf.nodes)for(let u of c.proxyOf.nodes)i.push(u)}}class o extends s{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]}append(...i){for(let c of i){let u=this.normalize(c,this.last);for(let b of u)this.proxyOf.nodes.push(b)}return this.markDirty(),this}cleanRaws(i){let c=[this];for(;c.length>0;){let u=c.pop();if(u!==this&&u.cleanRaws!==o.prototype.cleanRaws){u.cleanRaws(i);continue}if(s.prototype.cleanRaws.call(u,i),u.nodes)for(let b of u.nodes)c.push(b)}}each(i){if(!this.proxyOf.nodes)return;let c=this.getIterator(),u,b;for(;this.indexes[c]<this.proxyOf.nodes.length&&(u=this.indexes[c],b=i(this.proxyOf.nodes[u],u),b!==!1);)this.indexes[c]+=1;return delete this.indexes[c],b}every(i){return this.nodes.every(i)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let i=this.lastEach;return this.indexes[i]=0,i}getProxyProcessor(){return{get(i,c){return c==="proxyOf"?i:i[c]?c==="each"||typeof c=="string"&&c.startsWith("walk")?(...u)=>i[c](...u.map(b=>typeof b=="function"?(S,Z)=>b(S.toProxy(),Z):b)):c==="every"||c==="some"?u=>i[c]((b,...S)=>u(b.toProxy(),...S)):c==="root"?()=>i.root().toProxy():c==="nodes"?i.nodes.map(u=>u.toProxy()):c==="first"||c==="last"?i[c].toProxy():i[c]:i[c]},set(i,c,u){return i[c]===u||(i[c]=u,(c==="name"||c==="params"||c==="selector")&&i.markDirty()),!0}}}index(i){return typeof i=="number"?i:(i.proxyOf&&(i=i.proxyOf),this.proxyOf.nodes.indexOf(i))}insertAfter(i,c){let u=this.index(i),b=this.normalize(c,this.proxyOf.nodes[u]).reverse();u=this.index(i);for(let Z of b)this.proxyOf.nodes.splice(u+1,0,Z);let S;for(let Z in this.indexes)S=this.indexes[Z],u<S&&(this.indexes[Z]=S+b.length);return this.markDirty(),this}insertBefore(i,c){let u=this.index(i),b=u===0?"prepend":!1,S=this.normalize(c,this.proxyOf.nodes[u],b).reverse();u=this.index(i);for(let I of S)this.proxyOf.nodes.splice(u,0,I);let Z;for(let I in this.indexes)Z=this.indexes[I],u<=Z&&(this.indexes[I]=Z+S.length);return this.markDirty(),this}normalize(i,c){if(typeof i=="string")i=m(d(i).nodes);else if(typeof i>"u")i=[];else if(Array.isArray(i)){i=i.slice(0);for(let u of i)u.parent&&u.parent.removeChild(u,"ignore")}else if(i.type==="root"&&this.type!=="document"){i=i.nodes.slice(0);for(let u of i)u.parent&&u.parent.removeChild(u,"ignore")}else if(i.type)i=[i];else if(i.prop){if(typeof i.value>"u")throw new Error("Value field is missed in node creation");typeof i.value!="string"&&(i.value=String(i.value)),i=[new t(i)]}else if(i.selector||i.selectors)i=[new h(i)];else if(i.name)i=[new a(i)];else if(i.text)i=[new e(i)];else throw new Error("Unknown node type in node creation");return i.map(u=>(u[r]||o.rebuild(u),u=u.proxyOf,u.parent&&u.parent.removeChild(u),u[n]&&p(u),u.raws||(u.raws={}),typeof u.raws.before>"u"&&c&&typeof c.raws.before<"u"&&(u.raws.before=c.raws.before.replace(/\S/g,"")),u.parent=this.proxyOf,u))}prepend(...i){i=i.reverse();for(let c of i){let u=this.normalize(c,this.first,"prepend").reverse();for(let b of u)this.proxyOf.nodes.unshift(b);for(let b in this.indexes)this.indexes[b]=this.indexes[b]+u.length}return this.markDirty(),this}push(i){return i.parent=this,this.proxyOf.nodes.push(i),this}removeAll(){for(let i of this.proxyOf.nodes)i.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(i){i=this.index(i),this.proxyOf.nodes[i].parent=void 0,this.proxyOf.nodes.splice(i,1);let c;for(let u in this.indexes)c=this.indexes[u],c>=i&&(this.indexes[u]=c-1);return this.markDirty(),this}replaceValues(i,c,u){return u||(u=c,c={}),this.walkDecls(b=>{c.props&&!c.props.includes(b.prop)||c.fast&&!b.value.includes(c.fast)||(b.value=b.value.replace(i,u))}),this.markDirty(),this}some(i){return this.nodes.some(i)}walk(i){if(!this.proxyOf.nodes)return;let c=[{iterator:this.getIterator(),node:this.proxyOf}];for(;c.length>0;){let{iterator:u,node:b}=c[c.length-1],S=b.indexes[u];if(S>=b.proxyOf.nodes.length){delete b.indexes[u],c.pop();let R=c[c.length-1];R&&(R.node.indexes[R.iterator]+=1);continue}let Z=b.proxyOf.nodes[S],I;try{I=i(Z,S)}catch(R){throw Z.addToError(R)}if(I===!1){for(let R of c)delete R.node.indexes[R.iterator];return!1}Z.walk&&Z.proxyOf.nodes?c.push({iterator:Z.getIterator(),node:Z}):b.indexes[u]+=1}}walkAtRules(i,c){return c?i instanceof RegExp?this.walk((u,b)=>{if(u.type==="atrule"&&i.test(u.name))return c(u,b)}):this.walk((u,b)=>{if(u.type==="atrule"&&u.name===i)return c(u,b)}):(c=i,this.walk((u,b)=>{if(u.type==="atrule")return c(u,b)}))}walkComments(i){return this.walk((c,u)=>{if(c.type==="comment")return i(c,u)})}walkDecls(i,c){return c?i instanceof RegExp?this.walk((u,b)=>{if(u.type==="decl"&&i.test(u.prop))return c(u,b)}):this.walk((u,b)=>{if(u.type==="decl"&&u.prop===i)return c(u,b)}):(c=i,this.walk((u,b)=>{if(u.type==="decl")return c(u,b)}))}walkRules(i,c){return c?i instanceof RegExp?this.walk((u,b)=>{if(u.type==="rule"&&i.test(u.selector))return c(u,b)}):this.walk((u,b)=>{if(u.type==="rule"&&u.selector===i)return c(u,b)}):(c=i,this.walk((u,b)=>{if(u.type==="rule")return c(u,b)}))}}return o.registerParse=l=>{d=l},o.registerRule=l=>{h=l},o.registerAtRule=l=>{a=l},o.registerRoot=l=>{f=l},di=o,o.default=o,o.rebuild=l=>{let i=[l];for(;i.length>0;){let c=i.pop();if(c.type==="atrule"?Object.setPrototypeOf(c,a.prototype):c.type==="rule"?Object.setPrototypeOf(c,h.prototype):c.type==="decl"?Object.setPrototypeOf(c,t.prototype):c.type==="comment"?Object.setPrototypeOf(c,e.prototype):c.type==="root"&&Object.setPrototypeOf(c,f.prototype),c[r]=!0,c.nodes)for(let u of c.nodes)i.push(u)}},di}var hi,hl;function pi(){if(hl)return hi;hl=1;let e=Ae();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 hi=t,t.default=t,e.registerAtRule(t),hi}var mi,pl;function fi(){if(pl)return mi;pl=1;let e=Ae(),t,s;class n extends e{constructor(a){super(z({type:"document"},a)),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new s,this,a).stringify()}}return n.registerLazyResult=r=>{t=r},n.registerProcessor=r=>{s=r},mi=n,n.default=n,mi}var bi,ml;function Yh(){if(ml)return bi;ml=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return bi={nanoid:(t=21)=>{let s="",n=t|0;for(;n-- >0;)s+=e[Math.random()*64|0];return s},customAlphabet:(t,s=21)=>(n=s)=>{let r="",a=n|0;for(;a-- >0;)r+=t[Math.random()*t.length|0];return r}},bi}var yi,fl;function bl(){if(fl)return yi;fl=1;let{existsSync:e,readFileSync:t,realpathSync:s}=Fe,{dirname:n,isAbsolute:r,join:a,relative:d,sep:f}=Fe,{SourceMapConsumer:h,SourceMapGenerator:m}=Fe;function p(i){try{return s(i)}catch{return i}}function o(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}class l{constructor(c,u){if(u.map===!1)return;u.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(c),this.inline=this.startWith(this.annotation,"data:");let b=u.map?u.map.prev:void 0,S=this.loadMap(u.from,b);!this.mapFile&&u.from&&(this.mapFile=u.from),this.mapFile&&(this.root=n(this.mapFile)),S&&(this.text=S)}consumer(){return this.consumerCache||(this.consumerCache=new h(this.json||this.text)),this.consumerCache}decodeInline(c){let u=/^data:application\/json;charset=utf-?8;base64,/,b=/^data:application\/json;base64,/,S=/^data:application\/json;charset=utf-?8,/,Z=/^data:application\/json,/,I=c.match(S)||c.match(Z);if(I)return decodeURIComponent(c.substr(I[0].length));let R=c.match(u)||c.match(b);if(R)return o(c.substr(R[0].length));let y=c.slice(22);throw y=y.slice(0,y.indexOf(",")),new Error("Unsupported source map encoding "+y)}getAnnotationURL(c){return c.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(c){return typeof c!="object"?!1:typeof c.mappings=="string"||typeof c._mappings=="string"||Array.isArray(c.sections)}loadAnnotation(c){let u=c.match(/\/\*\s*# sourceMappingURL=/g);if(!u)return;let b=c.lastIndexOf(u.pop()),S=c.indexOf("*/",b);b>-1&&S>-1&&(this.annotation=this.getAnnotationURL(c.substring(b,S)))}loadFile(c,u,b){if(!b&&!this.unsafeMap){if(!/\.map$/i.test(c)||!u)return;let S=d(p(n(u)),p(c));if(S===".."||S.startsWith(".."+f)||r(S))return}if(this.root=n(c),e(c))return this.mapFile=c,t(c,"utf-8").toString().trim()}loadMap(c,u){if(u===!1)return!1;if(u){if(typeof u=="string")return u;if(typeof u=="function"){let b=u(c);if(b){let S=this.loadFile(b,c,!0);if(!S)throw new Error("Unable to load previous source map: "+b.toString());return S}}else{if(u instanceof h)return m.fromSourceMap(u).toString();if(u instanceof m)return u.toString();if(this.isMap(u))return JSON.stringify(u);throw new Error("Unsupported previous source map format: "+u.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let b=this.annotation;c&&(b=a(n(c),b));let S=this.loadFile(b,c,!1);if(S)try{this.json=JSON.parse(S.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return S}}}startWith(c,u){return c?c.substr(0,u.length)===u:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return yi=l,l.default=l,yi}var gi,yl;function Ls(){if(yl)return gi;yl=1;let{nanoid:e}=Yh(),{isAbsolute:t,resolve:s}=Fe,{SourceMapConsumer:n,SourceMapGenerator:r}=Fe,{fileURLToPath:a,pathToFileURL:d}=Fe,f=ii(),h=bl(),m=Fe,p=Symbol("lineToIndexCache"),o=!!(n&&r),l=!!(s&&t);function i(u){if(u[p])return u[p];let b=u.css.split(`
339
- `),S=new Array(b.length),Z=0;for(let I=0,R=b.length;I<R;I++)S[I]=Z,Z+=b[I].length+1;return u[p]=S,S}class c{get from(){return this.file||this.id}constructor(b,S={}){if(b===null||typeof b>"u"||typeof b=="object"&&!b.toString)throw new Error(`PostCSS received ${b} instead of CSS string`);if(this.css=b.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,S.document&&(this.document=S.document.toString()),S.from&&(!l||/^\w+:\/\//.test(S.from)||t(S.from)?this.file=S.from:this.file=s(S.from)),l&&o){let Z=new h(this.css,S);if(Z.text){this.map=Z;let I=Z.consumer().file;!this.file&&I&&(this.file=this.mapResolve(I))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(b,S,Z,I={}){let R,y,g,X,v;if(S&&typeof S=="object"){let W=S,k=Z;if(typeof W.offset=="number"){X=W.offset;let N=this.fromOffset(X);S=N.line,Z=N.col}else S=W.line,Z=W.column,X=this.fromLineAndColumn(S,Z);if(typeof k.offset=="number"){g=k.offset;let N=this.fromOffset(g);y=N.line,R=N.col}else y=k.line,R=k.column,g=this.fromLineAndColumn(k.line,k.column)}else if(Z)X=this.fromLineAndColumn(S,Z);else{X=S;let W=this.fromOffset(X);S=W.line,Z=W.col}let V=this.origin(S,Z,y,R);return V?v=new f(b,V.endLine===void 0?V.line:{column:V.column,line:V.line},V.endLine===void 0?V.column:{column:V.endColumn,line:V.endLine},V.source,V.file,I.plugin):v=new f(b,y===void 0?S:{column:Z,line:S},y===void 0?Z:{column:R,line:y},this.css,this.file,I.plugin),v.input={column:Z,endColumn:R,endLine:y,endOffset:g,line:S,offset:X,source:this.css},this.file&&(d&&(v.input.url=d(this.file).toString()),v.input.file=this.file),v}fromLineAndColumn(b,S){return i(this)[b-1]+S-1}fromOffset(b){let S=i(this),Z=S[S.length-1],I=0;if(b>=Z)I=S.length-1;else{let R=S.length-2,y;for(;I<R;)if(y=I+(R-I>>1),b<S[y])R=y-1;else if(b>=S[y+1])I=y+1;else{I=y;break}}return{col:b-S[I]+1,line:I+1}}mapResolve(b){return/^\w+:\/\//.test(b)?b:s(this.map.consumer().sourceRoot||this.map.root||".",b)}origin(b,S,Z,I){if(!this.map)return!1;let R=this.map.consumer(),y=R.originalPositionFor({column:S-1,line:b});if(!y.source)return!1;let g;if(typeof Z=="number"){let W=R.originalPositionFor({column:I-1,line:Z});W.source&&(g=W)}let X;t(y.source)?X=d(y.source):X=new URL(y.source,this.map.consumer().sourceRoot||d(this.map.mapFile));let v={column:y.column+1,endColumn:g&&g.column+1,endLine:g&&g.line,line:y.line,url:X.toString()};if(X.protocol==="file:")if(a)v.file=a(X);else throw new Error("file: protocol is not available in this PostCSS build");let V=R.sourceContentFor(y.source);return V&&(v.source=V),v}toJSON(){let b={};for(let S of["hasBOM","css","file","id"])this[S]!=null&&(b[S]=this[S]);return this.map&&(b.map=z({},this.map),b.map.consumerCache&&(b.map.consumerCache=void 0)),b}}return gi=c,c.default=c,m&&m.registerInput&&m.registerInput(c),gi}var Zi,gl;function Jt(){if(gl)return Zi;gl=1;let e=Ae(),t,s;class n extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,d,f){let h=new Set;for(let p of Array.isArray(a)?a:[a])p&&typeof p=="object"&&!p.parent&&p.raws&&typeof p.raws.before<"u"&&h.add(p.raws);let m=super.normalize(a);if(d){if(f==="prepend")this.nodes.length>1?d.raws.before=this.nodes[1].raws.before:delete d.raws.before;else if(this.first!==d)for(let p of m)h.has(p.raws)||(p.raws.before=d.raws.before)}return m}removeChild(a,d){let f=this.index(a);return!d&&f===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[f].raws.before),super.removeChild(a)}toResult(a={}){return new t(new s,this,a).stringify()}}return n.registerLazyResult=r=>{t=r},n.registerProcessor=r=>{s=r},Zi=n,n.default=n,e.registerRoot(n),Zi}var Si,Zl;function Sl(){if(Zl)return Si;Zl=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let s=[" ",`
340
- `," "];return e.split(t,s)},split(t,s,n){if(typeof t!="string")return[];let r=[],a="",d=!1,f=0,h=!1,m="",p=!1;for(let o of t)p?p=!1:o==="\\"?p=!0:h?o===m&&(h=!1):o==='"'||o==="'"?(h=!0,m=o):o==="("?f+=1:o===")"?f>0&&(f-=1):f===0&&s.includes(o)&&(d=!0),d?(a!==""&&r.push(a.trim()),a="",d=!1):a+=o;return(n||a!=="")&&r.push(a.trim()),r}};return Si=e,e.default=e,Si}var Ii,Il;function Xi(){if(Il)return Ii;Il=1;let e=Ae(),t=Sl();class s extends e{get selectors(){return t.comma(this.selector)}set selectors(r){let a=this.selector?this.selector.match(/,\s*/):null,d=a?a[0]:","+this.raw("between","beforeOpen");this.selector=r.join(d)}constructor(r){super(r),this.type="rule",this.nodes||(this.nodes=[])}}return Ii=s,s.default=s,e.registerRule(s),Ii}var Vi,Xl;function Uh(){if(Xl)return Vi;Xl=1;let e=pi(),t=xs(),s=Ts(),n=Ls(),r=bl(),a=Jt(),d=Xi();function f(p,o){return p.inputs?p.inputs.map(l=>{let i=ge(z({},l),{__proto__:n.prototype});return i.map&&(i.map=ge(z({},i.map),{__proto__:r.prototype})),i}):o}function h(p,o,l){let i=z({},p);if(delete i.inputs,delete i.nodes,i.source){let u=i.source,{inputId:b}=u,S=ds(u,["inputId"]);i.source=S,b!=null&&(i.source.input=o[b])}let c;if(i.type==="root")c=new a(i);else if(i.type==="decl")c=new s(i);else if(i.type==="rule")c=new d(i);else if(i.type==="comment")c=new t(i);else if(i.type==="atrule")c=new e(i);else throw new Error("Unknown node type: "+p.type);if(l){c.nodes=l;for(let u of l)u.parent=c}return c}function m(p,o){if(Array.isArray(p))return p.map(c=>m(c));let l,i=[{childIndex:0,children:[],inputs:f(p,o),json:p}];for(;i.length>0;){let c=i[i.length-1],u=c.json.nodes;if(u&&c.childIndex<u.length){let S=u[c.childIndex];c.childIndex+=1,i.push({childIndex:0,children:[],inputs:f(S,c.inputs),json:S});continue}i.pop();let b=h(c.json,c.inputs,u?c.children:void 0);i.length>0?i[i.length-1].children.push(b):l=b}return l}return Vi=m,m.default=m,Vi}var Gi,Vl;function Gl(){if(Vl)return Gi;Vl=1;let{dirname:e,relative:t,resolve:s,sep:n}=Fe,{SourceMapConsumer:r,SourceMapGenerator:a}=Fe,{pathToFileURL:d}=Fe,f=Ls(),h=!!(r&&a),m=!!(e&&s&&t&&n);class p{constructor(l,i,c,u){this.stringify=l,this.mapOpts=c.map||{},this.root=i,this.opts=c,this.css=u,this.originalCSS=u,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let l;this.isInline()?l="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?l=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?l=this.mapOpts.annotation(this.opts.to,this.root):l=this.outputFile()+".map";let i=`
330
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function l(p){return p[0].toUpperCase()+p.slice(1)}function d(p,o){let a="@"+o.name,i=o.params?p.rawValue(o,"params"):"",c=o.raws.afterName;return typeof c>"u"?c=i?" ":"":c===""&&i&&!s.test(i[0])&&(c=" "),a+c+i}function f(p,o,a){let i=a.nodes,c=i.length-1;for(;c>0&&i[c].type==="comment";)c-=1;let u=p.raw(a,"semicolon"),b=a.type==="document";for(let S=i.length-1;S>=0;S--){let Z=i[S],I=c!==S||u;!I&&S<i.length-1&&(Z.type==="atrule"&&!Z.nodes||Z.type==="decl"&&Z.prop.startsWith("--"))&&(I=!0),o.push({document:b,node:Z,semicolon:I})}}function h(p,o,a,i){let c=p.raw(a,"between","beforeOpen");p.builder(n(i+c)+"{",a,"start");let u=a.nodes&&a.nodes.length,b=()=>{let S=u?p.raw(a,"after"):p.raw(a,"after","emptyBody");S&&p.builder(n(S)),p.builder("}",a,"end"),a.type==="rule"&&a.raws.ownSemicolon&&p.builder(n(a.raws.ownSemicolon),a,"end")};u?(o.push(b),f(p,o,a)):b()}class m{constructor(o){this.builder=o}atrule(o,a){let i=d(this,o);if(o.nodes)this.block(o,i);else{let c=(o.raws.between||"")+(a?";":"");this.builder(n(i+c),o)}}beforeAfter(o,a){let i;o.type==="decl"?i=this.raw(o,null,"beforeDecl"):o.type==="comment"?i=this.raw(o,null,"beforeComment"):a==="before"?i=this.raw(o,null,"beforeRule"):i=this.raw(o,null,"beforeClose");let c=o.parent,u=0;for(;c&&c.type!=="root";)u+=1,c=c.parent;if(i.includes(`
331
+ `)){let b=this.raw(o,null,"indent");if(b.length)for(let S=0;S<u;S++)i+=b}return i}block(o,a){let i=this.raw(o,"between","beforeOpen");this.builder(n(a+i)+"{",o,"start");let c;o.nodes&&o.nodes.length?(this.body(o),c=this.raw(o,"after")):c=this.raw(o,"after","emptyBody"),c&&this.builder(n(c)),this.builder("}",o,"end")}body(o){let a=m.prototype,i=["atrule","block","body","rule","stringify"].every(u=>this[u]===a[u]),c=[];for(f(this,c,o);c.length>0;){let u=c.pop();if(typeof u=="function"){u();continue}let b=u.node,S=this.raw(b,"before");S&&this.builder(u.document?S:n(S)),i&&b.type==="rule"?h(this,c,b,this.rawValue(b,"selector")):i&&b.type==="atrule"&&b.nodes?h(this,c,b,d(this,b)):this.stringify(b,u.semicolon)}}comment(o){let a=this.raw(o,"left","commentLeft"),i=this.raw(o,"right","commentRight");this.builder(n("/*"+a+o.text+i+"*/"),o)}decl(o,a){let i=o.raws,c=this.raw(o,"between","colon"),u=o.prop+c+this.rawValue(o,"value");o.important&&(u+=i.important||" !important"),a&&(u+=";"),this.builder(n(u),o)}document(o){this.body(o)}raw(o,a,i){let c;if(i||(i=a),a&&(c=o.raws[a],typeof c<"u"))return c;let u=o.parent;if(i==="before"&&(!u||u.type==="root"&&u.first===o||u&&u.type==="document"))return"";if(!u)return r[i];let b=o.root(),S=b.rawCache||(b.rawCache={});if(typeof S[i]<"u")return S[i];if(i==="before"||i==="after")return this.beforeAfter(o,i);{let Z="raw"+l(i);this[Z]?c=this[Z](b,o):b.walk(I=>{if(c=I.raws[a],typeof c<"u")return!1})}return typeof c>"u"&&(c=r[i]),S[i]=c,c}rawBeforeClose(o){let a;return o.walk(i=>{if(i.nodes&&i.nodes.length>0&&typeof i.raws.after<"u")return a=i.raws.after,a.includes(`
332
+ `)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(o,a){let i;return o.walkComments(c=>{if(typeof c.raws.before<"u")return i=c.raws.before,i.includes(`
333
+ `)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(a,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(o,a){let i;return o.walkDecls(c=>{if(typeof c.raws.before<"u")return i=c.raws.before,i.includes(`
334
+ `)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(a,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(o){let a;return o.walk(i=>{if(i.type!=="decl"&&(a=i.raws.between,typeof a<"u"))return!1}),a}rawBeforeRule(o){let a;return o.walk(i=>{if(i.nodes&&(i.parent!==o||o.first!==i)&&typeof i.raws.before<"u")return a=i.raws.before,a.includes(`
335
+ `)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(o){let a;return o.walkDecls(i=>{if(typeof i.raws.between<"u")return a=i.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(o){let a;return o.walk(i=>{if(i.nodes&&i.nodes.length===0&&(a=i.raws.after,typeof a<"u"))return!1}),a}rawIndent(o){if(o.raws.indent)return o.raws.indent;let a;return o.walk(i=>{let c=i.parent;if(c&&c!==o&&c.parent&&c.parent===o&&typeof i.raws.before<"u"){let u=i.raws.before.split(`
336
+ `);return a=u[u.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(o){let a;return o.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(a=i.raws.semicolon,typeof a<"u"))return!1}),a}rawValue(o,a){let i=o[a],c=o.raws[a];return c&&c.value===i?c.raw:i}root(o){if(o.source&&o.source.input.hasBOM&&this.builder("\uFEFF",o,"start"),this.body(o),o.raws.after){let a=o.raws.after,i=o.parent&&o.parent.type==="document";this.builder(i?a:n(a))}}rule(o){this.block(o,this.rawValue(o,"selector")),o.raws.ownSemicolon&&this.builder(n(o.raws.ownSemicolon),o,"end")}stringify(o,a){if(!this[o.type])throw new Error("Unknown AST node type "+o.type+". Maybe you need to change PostCSS stringifier.");this[o.type](o,a)}}return ri=m,m.default=m,ri}var oi,ol;function ws(){if(ol)return oi;ol=1;let e=rl();function t(s,n){new e(n).stringify(s)}return oi=t,t.default=t,oi}var li={},ll;function ks(){return ll||(ll=1,li.isClean=Symbol("isClean"),li.my=Symbol("my")),li}var ai,al;function Cs(){if(al)return ai;al=1;let e=ii(),t=rl(),s=ws(),{isClean:n,my:r}=ks();function l(h,m){let p=new h.constructor,o=[[h,p,m]];for(;o.length>0;){let[a,i,c]=o.pop();for(let u in a){if(!Object.prototype.hasOwnProperty.call(a,u)||u==="proxyCache")continue;let b=a[u],S=typeof b;if(u==="parent"&&S==="object")c&&(i[u]=c);else if(u==="source")i[u]=b;else if(Array.isArray(b)){let Z=[];i[u]=Z;for(let I of b){let R=new I.constructor;Z.push(R),o.push([I,R,i])}}else{if(S==="object"&&b!==null){let Z=new b.constructor;o.push([b,Z,void 0]),b=Z}i[u]=b}}}return p}function d(h,m){if(m&&typeof m.offset<"u")return m.offset;let p=1,o=1,a=0;for(let i=0;i<h.length;i++){if(o===m.line&&p===m.column){a=i;break}h[i]===`
337
+ `?(p=1,o+=1):p+=1}return a}class f{get proxyOf(){return this}constructor(m={}){this.raws={},this[n]=!1,this[r]=!0;for(let p of Object.keys(m))if(p!=="__proto__")if(p==="nodes"){this.nodes=[];for(let o of m[p])typeof o.clone=="function"&&o.parent?this.append(o.clone()):this.append(o)}else this[p]=m[p]}addToError(m){if(m.postcssNode=this,m.stack&&this.source&&/\n\s{4}at /.test(m.stack)){let p=this.source;m.stack=m.stack.replace(/\n\s{4}at /,`$&${p.input.from}:${p.start.line}:${p.start.column}$&`)}return m}after(m){return this.parent.insertAfter(this,m),this}assign(m={}){for(let p in m)this[p]=m[p];return this}before(m){return this.parent.insertBefore(this,m),this}cleanRaws(m){delete this.raws.before,delete this.raws.after,m||delete this.raws.between}clone(m={}){let p=l(this);for(let o in m)p[o]=m[o];return p}cloneAfter(m={}){let p=this.clone(m);return this.parent.insertAfter(this,p),p}cloneBefore(m={}){let p=this.clone(m);return this.parent.insertBefore(this,p),p}error(m,p={}){if(this.source){let{end:o,start:a}=this.rangeBy(p);return this.source.input.error(m,{column:a.column,line:a.line},{column:o.column,line:o.line},p)}return new e(m)}getProxyProcessor(){return{get(m,p){return p==="proxyOf"?m:p==="root"?()=>m.root().toProxy():m[p]},set(m,p,o){return m[p]===o||(m[p]=o,(p==="prop"||p==="value"||p==="name"||p==="params"||p==="important"||p==="text")&&m.markDirty()),!0}}}markClean(){this[n]=!0}markDirty(){if(this[n]){this[n]=!1;let m=this;for(;m=m.parent;)m[n]=!1}}next(){if(!this.parent)return;let m=this.parent.index(this);return this.parent.nodes[m+1]}positionBy(m={}){let p="document"in this.source.input?this.source.input.document:this.source.input.css,o={column:this.source.start.column,line:this.source.start.line,offset:d(p,this.source.start)};if(m.index)o=this.positionInside(m.index);else if(m.word){let a=p.slice(d(p,this.source.start),d(p,this.source.end)).indexOf(m.word);a!==-1&&(o=this.positionInside(a))}return o}positionInside(m){let p=this.source.start.column,o=this.source.start.line,a="document"in this.source.input?this.source.input.document:this.source.input.css,i=d(a,this.source.start),c=i+m;for(let u=i;u<c;u++)a[u]===`
338
+ `?(p=1,o+=1):p+=1;return{column:p,line:o,offset:c}}prev(){if(!this.parent)return;let m=this.parent.index(this);return this.parent.nodes[m-1]}rangeBy(m={}){let p="document"in this.source.input?this.source.input.document:this.source.input.css,o={column:this.source.start.column,line:this.source.start.line,offset:d(p,this.source.start)},a=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:d(p,this.source.end)+1}:{column:o.column+1,line:o.line,offset:o.offset+1};if(m.word){let i=p.slice(d(p,this.source.start),d(p,this.source.end)).indexOf(m.word);i!==-1&&(o=this.positionInside(i),a=this.positionInside(i+m.word.length))}else m.start?o={column:m.start.column,line:m.start.line,offset:d(p,m.start)}:typeof m.index=="number"&&(o=this.positionInside(m.index)),m.end?a={column:m.end.column,line:m.end.line,offset:d(p,m.end)}:typeof m.endIndex=="number"?a=this.positionInside(m.endIndex):typeof m.index=="number"&&(a=this.positionInside(m.index+1));return(a.line<o.line||a.line===o.line&&a.column<=o.column)&&(a={column:o.column+1,line:o.line,offset:o.offset+1}),{end:a,start:o}}raw(m,p){return new t().raw(this,m,p)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...m){if(this.parent){let p=this,o=!1;for(let a of m)a===this?o=!0:o?(this.parent.insertAfter(p,a),p=a):this.parent.insertBefore(p,a);o||this.remove()}return this}root(){let m=this;for(;m.parent&&m.parent.type!=="document";)m=m.parent;return m}toJSON(m,p){let o=p==null;p=p||new Map;let a=[],i=[[this,a,0]];for(let u=0;u<i.length;u++){let[b,S,Z]=i[u],I={};S[Z]=I;for(let R in b){if(!Object.prototype.hasOwnProperty.call(b,R)||R==="parent"||R==="proxyCache")continue;let y=b[R];if(Array.isArray(y)){let g=[];I[R]=g;for(let X=0;X<y.length;X++){let v=y[X];typeof v=="object"&&v.toJSON?v.toJSON===f.prototype.toJSON?i.push([v,g,X]):g[X]=v.toJSON(null,p):g[X]=v}}else if(typeof y=="object"&&y.toJSON)y.toJSON===f.prototype.toJSON?i.push([y,I,R]):I[R]=y.toJSON(null,p);else if(R==="source"){if(y==null)continue;let g=p.get(y.input);g==null&&(g=p.size,p.set(y.input,g)),I[R]={end:y.end,inputId:g,start:y.start}}else I[R]=y}}let c=a[0];return o&&(c.inputs=[...p.keys()].map(u=>u.toJSON())),c}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(m=s){m.stringify&&(m=m.stringify);let p="";return m(this,o=>{p+=o}),p}warn(m,p,o={}){let a={node:this};for(let i in o)a[i]=o[i];return m.warn(p,a)}}return ai=f,f.default=f,ai}var ci,cl;function xs(){if(cl)return ci;cl=1;let e=Cs();class t extends e{constructor(n){super(n),this.type="comment"}}return ci=t,t.default=t,ci}var ui,ul;function Ts(){if(ul)return ui;ul=1;let e=Cs();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(n){n&&typeof n.value<"u"&&typeof n.value!="string"&&(n=ge(z({},n),{value:String(n.value)})),super(n),this.type="decl"}}return ui=t,t.default=t,ui}var di,dl;function Ae(){if(dl)return di;dl=1;let e=xs(),t=Ts(),s=Cs(),{isClean:n,my:r}=ks(),l,d,f,h;function m(a){let i=a.slice();for(;i.length>0;){let c=i.pop();if(delete c.source,c.nodes){c.nodes=c.nodes.slice();for(let u of c.nodes)i.push(u)}}return a.slice()}function p(a){let i=[a];for(;i.length>0;){let c=i.pop();if(c[n]=!1,c.proxyOf.nodes)for(let u of c.proxyOf.nodes)i.push(u)}}class o extends s{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]}append(...i){for(let c of i){let u=this.normalize(c,this.last);for(let b of u)this.proxyOf.nodes.push(b)}return this.markDirty(),this}cleanRaws(i){let c=[this];for(;c.length>0;){let u=c.pop();if(u!==this&&u.cleanRaws!==o.prototype.cleanRaws){u.cleanRaws(i);continue}if(s.prototype.cleanRaws.call(u,i),u.nodes)for(let b of u.nodes)c.push(b)}}each(i){if(!this.proxyOf.nodes)return;let c=this.getIterator(),u,b;for(;this.indexes[c]<this.proxyOf.nodes.length&&(u=this.indexes[c],b=i(this.proxyOf.nodes[u],u),b!==!1);)this.indexes[c]+=1;return delete this.indexes[c],b}every(i){return this.nodes.every(i)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let i=this.lastEach;return this.indexes[i]=0,i}getProxyProcessor(){return{get(i,c){return c==="proxyOf"?i:i[c]?c==="each"||typeof c=="string"&&c.startsWith("walk")?(...u)=>i[c](...u.map(b=>typeof b=="function"?(S,Z)=>b(S.toProxy(),Z):b)):c==="every"||c==="some"?u=>i[c]((b,...S)=>u(b.toProxy(),...S)):c==="root"?()=>i.root().toProxy():c==="nodes"?i.nodes.map(u=>u.toProxy()):c==="first"||c==="last"?i[c].toProxy():i[c]:i[c]},set(i,c,u){return i[c]===u||(i[c]=u,(c==="name"||c==="params"||c==="selector")&&i.markDirty()),!0}}}index(i){return typeof i=="number"?i:(i.proxyOf&&(i=i.proxyOf),this.proxyOf.nodes.indexOf(i))}insertAfter(i,c){let u=this.index(i),b=this.normalize(c,this.proxyOf.nodes[u]).reverse();u=this.index(i);for(let Z of b)this.proxyOf.nodes.splice(u+1,0,Z);let S;for(let Z in this.indexes)S=this.indexes[Z],u<S&&(this.indexes[Z]=S+b.length);return this.markDirty(),this}insertBefore(i,c){let u=this.index(i),b=u===0?"prepend":!1,S=this.normalize(c,this.proxyOf.nodes[u],b).reverse();u=this.index(i);for(let I of S)this.proxyOf.nodes.splice(u,0,I);let Z;for(let I in this.indexes)Z=this.indexes[I],u<=Z&&(this.indexes[I]=Z+S.length);return this.markDirty(),this}normalize(i,c){if(typeof i=="string")i=m(d(i).nodes);else if(typeof i>"u")i=[];else if(Array.isArray(i)){i=i.slice(0);for(let u of i)u.parent&&u.parent.removeChild(u,"ignore")}else if(i.type==="root"&&this.type!=="document"){i=i.nodes.slice(0);for(let u of i)u.parent&&u.parent.removeChild(u,"ignore")}else if(i.type)i=[i];else if(i.prop){if(typeof i.value>"u")throw new Error("Value field is missed in node creation");typeof i.value!="string"&&(i.value=String(i.value)),i=[new t(i)]}else if(i.selector||i.selectors)i=[new h(i)];else if(i.name)i=[new l(i)];else if(i.text)i=[new e(i)];else throw new Error("Unknown node type in node creation");return i.map(u=>(u[r]||o.rebuild(u),u=u.proxyOf,u.parent&&u.parent.removeChild(u),u[n]&&p(u),u.raws||(u.raws={}),typeof u.raws.before>"u"&&c&&typeof c.raws.before<"u"&&(u.raws.before=c.raws.before.replace(/\S/g,"")),u.parent=this.proxyOf,u))}prepend(...i){i=i.reverse();for(let c of i){let u=this.normalize(c,this.first,"prepend").reverse();for(let b of u)this.proxyOf.nodes.unshift(b);for(let b in this.indexes)this.indexes[b]=this.indexes[b]+u.length}return this.markDirty(),this}push(i){return i.parent=this,this.proxyOf.nodes.push(i),this}removeAll(){for(let i of this.proxyOf.nodes)i.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(i){i=this.index(i),this.proxyOf.nodes[i].parent=void 0,this.proxyOf.nodes.splice(i,1);let c;for(let u in this.indexes)c=this.indexes[u],c>=i&&(this.indexes[u]=c-1);return this.markDirty(),this}replaceValues(i,c,u){return u||(u=c,c={}),this.walkDecls(b=>{c.props&&!c.props.includes(b.prop)||c.fast&&!b.value.includes(c.fast)||(b.value=b.value.replace(i,u))}),this.markDirty(),this}some(i){return this.nodes.some(i)}walk(i){if(!this.proxyOf.nodes)return;let c=[{iterator:this.getIterator(),node:this.proxyOf}];for(;c.length>0;){let{iterator:u,node:b}=c[c.length-1],S=b.indexes[u];if(S>=b.proxyOf.nodes.length){delete b.indexes[u],c.pop();let R=c[c.length-1];R&&(R.node.indexes[R.iterator]+=1);continue}let Z=b.proxyOf.nodes[S],I;try{I=i(Z,S)}catch(R){throw Z.addToError(R)}if(I===!1){for(let R of c)delete R.node.indexes[R.iterator];return!1}Z.walk&&Z.proxyOf.nodes?c.push({iterator:Z.getIterator(),node:Z}):b.indexes[u]+=1}}walkAtRules(i,c){return c?i instanceof RegExp?this.walk((u,b)=>{if(u.type==="atrule"&&i.test(u.name))return c(u,b)}):this.walk((u,b)=>{if(u.type==="atrule"&&u.name===i)return c(u,b)}):(c=i,this.walk((u,b)=>{if(u.type==="atrule")return c(u,b)}))}walkComments(i){return this.walk((c,u)=>{if(c.type==="comment")return i(c,u)})}walkDecls(i,c){return c?i instanceof RegExp?this.walk((u,b)=>{if(u.type==="decl"&&i.test(u.prop))return c(u,b)}):this.walk((u,b)=>{if(u.type==="decl"&&u.prop===i)return c(u,b)}):(c=i,this.walk((u,b)=>{if(u.type==="decl")return c(u,b)}))}walkRules(i,c){return c?i instanceof RegExp?this.walk((u,b)=>{if(u.type==="rule"&&i.test(u.selector))return c(u,b)}):this.walk((u,b)=>{if(u.type==="rule"&&u.selector===i)return c(u,b)}):(c=i,this.walk((u,b)=>{if(u.type==="rule")return c(u,b)}))}}return o.registerParse=a=>{d=a},o.registerRule=a=>{h=a},o.registerAtRule=a=>{l=a},o.registerRoot=a=>{f=a},di=o,o.default=o,o.rebuild=a=>{let i=[a];for(;i.length>0;){let c=i.pop();if(c.type==="atrule"?Object.setPrototypeOf(c,l.prototype):c.type==="rule"?Object.setPrototypeOf(c,h.prototype):c.type==="decl"?Object.setPrototypeOf(c,t.prototype):c.type==="comment"?Object.setPrototypeOf(c,e.prototype):c.type==="root"&&Object.setPrototypeOf(c,f.prototype),c[r]=!0,c.nodes)for(let u of c.nodes)i.push(u)}},di}var hi,hl;function pi(){if(hl)return hi;hl=1;let e=Ae();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 hi=t,t.default=t,e.registerAtRule(t),hi}var mi,pl;function fi(){if(pl)return mi;pl=1;let e=Ae(),t,s;class n extends e{constructor(l){super(z({type:"document"},l)),this.nodes||(this.nodes=[])}toResult(l={}){return new t(new s,this,l).stringify()}}return n.registerLazyResult=r=>{t=r},n.registerProcessor=r=>{s=r},mi=n,n.default=n,mi}var bi,ml;function Fh(){if(ml)return bi;ml=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return bi={nanoid:(t=21)=>{let s="",n=t|0;for(;n-- >0;)s+=e[Math.random()*64|0];return s},customAlphabet:(t,s=21)=>(n=s)=>{let r="",l=n|0;for(;l-- >0;)r+=t[Math.random()*t.length|0];return r}},bi}var yi,fl;function bl(){if(fl)return yi;fl=1;let{existsSync:e,readFileSync:t,realpathSync:s}=Fe,{dirname:n,isAbsolute:r,join:l,relative:d,sep:f}=Fe,{SourceMapConsumer:h,SourceMapGenerator:m}=Fe;function p(i){try{return s(i)}catch{return i}}function o(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}class a{constructor(c,u){if(u.map===!1)return;u.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(c),this.inline=this.startWith(this.annotation,"data:");let b=u.map?u.map.prev:void 0,S=this.loadMap(u.from,b);!this.mapFile&&u.from&&(this.mapFile=u.from),this.mapFile&&(this.root=n(this.mapFile)),S&&(this.text=S)}consumer(){return this.consumerCache||(this.consumerCache=new h(this.json||this.text)),this.consumerCache}decodeInline(c){let u=/^data:application\/json;charset=utf-?8;base64,/,b=/^data:application\/json;base64,/,S=/^data:application\/json;charset=utf-?8,/,Z=/^data:application\/json,/,I=c.match(S)||c.match(Z);if(I)return decodeURIComponent(c.substr(I[0].length));let R=c.match(u)||c.match(b);if(R)return o(c.substr(R[0].length));let y=c.slice(22);throw y=y.slice(0,y.indexOf(",")),new Error("Unsupported source map encoding "+y)}getAnnotationURL(c){return c.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(c){return typeof c!="object"?!1:typeof c.mappings=="string"||typeof c._mappings=="string"||Array.isArray(c.sections)}loadAnnotation(c){let u=c.match(/\/\*\s*# sourceMappingURL=/g);if(!u)return;let b=c.lastIndexOf(u.pop()),S=c.indexOf("*/",b);b>-1&&S>-1&&(this.annotation=this.getAnnotationURL(c.substring(b,S)))}loadFile(c,u,b){if(!b&&!this.unsafeMap){if(!/\.map$/i.test(c)||!u)return;let S=d(p(n(u)),p(c));if(S===".."||S.startsWith(".."+f)||r(S))return}if(this.root=n(c),e(c))return this.mapFile=c,t(c,"utf-8").toString().trim()}loadMap(c,u){if(u===!1)return!1;if(u){if(typeof u=="string")return u;if(typeof u=="function"){let b=u(c);if(b){let S=this.loadFile(b,c,!0);if(!S)throw new Error("Unable to load previous source map: "+b.toString());return S}}else{if(u instanceof h)return m.fromSourceMap(u).toString();if(u instanceof m)return u.toString();if(this.isMap(u))return JSON.stringify(u);throw new Error("Unsupported previous source map format: "+u.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let b=this.annotation;c&&(b=l(n(c),b));let S=this.loadFile(b,c,!1);if(S)try{this.json=JSON.parse(S.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return S}}}startWith(c,u){return c?c.substr(0,u.length)===u:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return yi=a,a.default=a,yi}var gi,yl;function Ls(){if(yl)return gi;yl=1;let{nanoid:e}=Fh(),{isAbsolute:t,resolve:s}=Fe,{SourceMapConsumer:n,SourceMapGenerator:r}=Fe,{fileURLToPath:l,pathToFileURL:d}=Fe,f=ii(),h=bl(),m=Fe,p=Symbol("lineToIndexCache"),o=!!(n&&r),a=!!(s&&t);function i(u){if(u[p])return u[p];let b=u.css.split(`
339
+ `),S=new Array(b.length),Z=0;for(let I=0,R=b.length;I<R;I++)S[I]=Z,Z+=b[I].length+1;return u[p]=S,S}class c{get from(){return this.file||this.id}constructor(b,S={}){if(b===null||typeof b>"u"||typeof b=="object"&&!b.toString)throw new Error(`PostCSS received ${b} instead of CSS string`);if(this.css=b.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,S.document&&(this.document=S.document.toString()),S.from&&(!a||/^\w+:\/\//.test(S.from)||t(S.from)?this.file=S.from:this.file=s(S.from)),a&&o){let Z=new h(this.css,S);if(Z.text){this.map=Z;let I=Z.consumer().file;!this.file&&I&&(this.file=this.mapResolve(I))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(b,S,Z,I={}){let R,y,g,X,v;if(S&&typeof S=="object"){let W=S,k=Z;if(typeof W.offset=="number"){X=W.offset;let N=this.fromOffset(X);S=N.line,Z=N.col}else S=W.line,Z=W.column,X=this.fromLineAndColumn(S,Z);if(typeof k.offset=="number"){g=k.offset;let N=this.fromOffset(g);y=N.line,R=N.col}else y=k.line,R=k.column,g=this.fromLineAndColumn(k.line,k.column)}else if(Z)X=this.fromLineAndColumn(S,Z);else{X=S;let W=this.fromOffset(X);S=W.line,Z=W.col}let V=this.origin(S,Z,y,R);return V?v=new f(b,V.endLine===void 0?V.line:{column:V.column,line:V.line},V.endLine===void 0?V.column:{column:V.endColumn,line:V.endLine},V.source,V.file,I.plugin):v=new f(b,y===void 0?S:{column:Z,line:S},y===void 0?Z:{column:R,line:y},this.css,this.file,I.plugin),v.input={column:Z,endColumn:R,endLine:y,endOffset:g,line:S,offset:X,source:this.css},this.file&&(d&&(v.input.url=d(this.file).toString()),v.input.file=this.file),v}fromLineAndColumn(b,S){return i(this)[b-1]+S-1}fromOffset(b){let S=i(this),Z=S[S.length-1],I=0;if(b>=Z)I=S.length-1;else{let R=S.length-2,y;for(;I<R;)if(y=I+(R-I>>1),b<S[y])R=y-1;else if(b>=S[y+1])I=y+1;else{I=y;break}}return{col:b-S[I]+1,line:I+1}}mapResolve(b){return/^\w+:\/\//.test(b)?b:s(this.map.consumer().sourceRoot||this.map.root||".",b)}origin(b,S,Z,I){if(!this.map)return!1;let R=this.map.consumer(),y=R.originalPositionFor({column:S-1,line:b});if(!y.source)return!1;let g;if(typeof Z=="number"){let W=R.originalPositionFor({column:I-1,line:Z});W.source&&(g=W)}let X;t(y.source)?X=d(y.source):X=new URL(y.source,this.map.consumer().sourceRoot||d(this.map.mapFile));let v={column:y.column+1,endColumn:g&&g.column+1,endLine:g&&g.line,line:y.line,url:X.toString()};if(X.protocol==="file:")if(l)v.file=l(X);else throw new Error("file: protocol is not available in this PostCSS build");let V=R.sourceContentFor(y.source);return V&&(v.source=V),v}toJSON(){let b={};for(let S of["hasBOM","css","file","id"])this[S]!=null&&(b[S]=this[S]);return this.map&&(b.map=z({},this.map),b.map.consumerCache&&(b.map.consumerCache=void 0)),b}}return gi=c,c.default=c,m&&m.registerInput&&m.registerInput(c),gi}var Zi,gl;function Jt(){if(gl)return Zi;gl=1;let e=Ae(),t,s;class n extends e{constructor(l){super(l),this.type="root",this.nodes||(this.nodes=[])}normalize(l,d,f){let h=new Set;for(let p of Array.isArray(l)?l:[l])p&&typeof p=="object"&&!p.parent&&p.raws&&typeof p.raws.before<"u"&&h.add(p.raws);let m=super.normalize(l);if(d){if(f==="prepend")this.nodes.length>1?d.raws.before=this.nodes[1].raws.before:delete d.raws.before;else if(this.first!==d)for(let p of m)h.has(p.raws)||(p.raws.before=d.raws.before)}return m}removeChild(l,d){let f=this.index(l);return!d&&f===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[f].raws.before),super.removeChild(l)}toResult(l={}){return new t(new s,this,l).stringify()}}return n.registerLazyResult=r=>{t=r},n.registerProcessor=r=>{s=r},Zi=n,n.default=n,e.registerRoot(n),Zi}var Si,Zl;function Sl(){if(Zl)return Si;Zl=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let s=[" ",`
340
+ `," "];return e.split(t,s)},split(t,s,n){if(typeof t!="string")return[];let r=[],l="",d=!1,f=0,h=!1,m="",p=!1;for(let o of t)p?p=!1:o==="\\"?p=!0:h?o===m&&(h=!1):o==='"'||o==="'"?(h=!0,m=o):o==="("?f+=1:o===")"?f>0&&(f-=1):f===0&&s.includes(o)&&(d=!0),d?(l!==""&&r.push(l.trim()),l="",d=!1):l+=o;return(n||l!=="")&&r.push(l.trim()),r}};return Si=e,e.default=e,Si}var Ii,Il;function Xi(){if(Il)return Ii;Il=1;let e=Ae(),t=Sl();class s extends e{get selectors(){return t.comma(this.selector)}set selectors(r){let l=this.selector?this.selector.match(/,\s*/):null,d=l?l[0]:","+this.raw("between","beforeOpen");this.selector=r.join(d)}constructor(r){super(r),this.type="rule",this.nodes||(this.nodes=[])}}return Ii=s,s.default=s,e.registerRule(s),Ii}var Vi,Xl;function Mh(){if(Xl)return Vi;Xl=1;let e=pi(),t=xs(),s=Ts(),n=Ls(),r=bl(),l=Jt(),d=Xi();function f(p,o){return p.inputs?p.inputs.map(a=>{let i=ge(z({},a),{__proto__:n.prototype});return i.map&&(i.map=ge(z({},i.map),{__proto__:r.prototype})),i}):o}function h(p,o,a){let i=z({},p);if(delete i.inputs,delete i.nodes,i.source){let u=i.source,{inputId:b}=u,S=ds(u,["inputId"]);i.source=S,b!=null&&(i.source.input=o[b])}let c;if(i.type==="root")c=new l(i);else if(i.type==="decl")c=new s(i);else if(i.type==="rule")c=new d(i);else if(i.type==="comment")c=new t(i);else if(i.type==="atrule")c=new e(i);else throw new Error("Unknown node type: "+p.type);if(a){c.nodes=a;for(let u of a)u.parent=c}return c}function m(p,o){if(Array.isArray(p))return p.map(c=>m(c));let a,i=[{childIndex:0,children:[],inputs:f(p,o),json:p}];for(;i.length>0;){let c=i[i.length-1],u=c.json.nodes;if(u&&c.childIndex<u.length){let S=u[c.childIndex];c.childIndex+=1,i.push({childIndex:0,children:[],inputs:f(S,c.inputs),json:S});continue}i.pop();let b=h(c.json,c.inputs,u?c.children:void 0);i.length>0?i[i.length-1].children.push(b):a=b}return a}return Vi=m,m.default=m,Vi}var Gi,Vl;function Gl(){if(Vl)return Gi;Vl=1;let{dirname:e,relative:t,resolve:s,sep:n}=Fe,{SourceMapConsumer:r,SourceMapGenerator:l}=Fe,{pathToFileURL:d}=Fe,f=Ls(),h=!!(r&&l),m=!!(e&&s&&t&&n);class p{constructor(a,i,c,u){this.stringify=a,this.mapOpts=c.map||{},this.root=i,this.opts=c,this.css=u,this.originalCSS=u,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let a;this.isInline()?a="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?a=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?a=this.mapOpts.annotation(this.opts.to,this.root):a=this.outputFile()+".map";let i=`
341
341
  `;this.css.includes(`\r
342
342
  `)&&(i=`\r
343
- `),this.css+=i+"/*# sourceMappingURL="+l+" */"}applyPrevMaps(){for(let l of this.previous()){let i=this.toUrl(this.path(l.file)),c=l.root||e(l.file),u;this.mapOpts.sourcesContent===!1?(u=new r(l.text),u.sourcesContent&&(u.sourcesContent=null)):u=l.consumer(),this.map.applySourceMap(u,i,this.toUrl(this.path(c)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let l;for(let i=this.root.nodes.length-1;i>=0;i--)l=this.root.nodes[i],l.type==="comment"&&l.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(i)}else if(this.css){let l;for(;(l=this.css.lastIndexOf("/*#"))!==-1;){let i=this.css.indexOf("*/",l+3);if(i===-1)break;for(;l>0&&this.css[l-1]===`
344
- `;)l--;this.css=this.css.slice(0,l)+this.css.slice(i+2)}}}}generate(){if(this.clearAnnotation(),m&&h&&this.isMap())return this.generateMap();{let l="";return this.stringify(this.root,i=>{l+=i}),[l]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let l=this.previous()[0].consumer();l.file=this.outputFile(),this.map=a.fromSourceMap(l,{ignoreInvalidMapping:!0})}else this.map=new a({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 a({file:this.outputFile(),ignoreInvalidMapping:!0});let l=1,i=1,c="<no source>",u={generated:{column:0,line:0},original:{column:0,line:0},source:""},b,S;this.stringify(this.root,(Z,I,R)=>{if(this.css+=Z,I&&R!=="end"&&(u.generated.line=l,u.generated.column=i-1,I.source&&I.source.start?(u.source=this.sourcePath(I),u.original.line=I.source.start.line,u.original.column=I.source.start.column-1,this.map.addMapping(u)):(u.source=c,u.original.line=1,u.original.column=0,this.map.addMapping(u))),S=Z.match(/\n/g),S?(l+=S.length,b=Z.lastIndexOf(`
345
- `),i=Z.length-b):i+=Z.length,I&&R!=="start"){let y=I.parent||{raws:{}};(!(I.type==="decl"||I.type==="atrule"&&!I.nodes)||I!==y.last||y.raws.semicolon)&&(I.source&&I.source.end?(u.source=this.sourcePath(I),u.original.line=I.source.end.line,u.original.column=I.source.end.column-1,u.generated.line=l,u.generated.column=i-2,this.map.addMapping(u)):(u.source=c,u.original.line=1,u.original.column=0,u.generated.line=l,u.generated.column=i-1,this.map.addMapping(u)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==!0?!1:this.previous().length?this.previous().some(i=>i.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(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let i=this.memoizedPaths.get(l);if(i)return i;let c=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(c=e(s(c,this.mapOpts.annotation)));let u=t(c,l);return this.memoizedPaths.set(l,u),u}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let i=l.source.input.map;this.previousMaps.includes(i)||this.previousMaps.push(i)}});else{let l=new f(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(i=>{if(i.source){let c=i.source.input.from;if(c&&!l[c]){l[c]=!0;let u=this.usesFileUrls?this.toFileUrl(c):this.toUrl(this.path(c));this.map.setSourceContent(u,i.source.input.css)}}});else if(this.css){let i=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(i,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let i=this.memoizedFileURLs.get(l);if(i)return i;if(d){let c=d(l).toString();return this.memoizedFileURLs.set(l,c),c}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let i=this.memoizedURLs.get(l);if(i)return i;n==="\\"&&(l=l.replace(/\\/g,"/"));let c=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,c),c}}return Gi=p,Gi}var Ri,Rl;function Fh(){if(Rl)return Ri;Rl=1;const e=39,t=34,s=92,n=47,r=10,a=32,d=12,f=9,h=13,m=91,p=93,o=40,l=41,i=123,c=125,u=59,b=42,S=58,Z=64,I=/[\t\n\f\r "#'()/;[\\\]{}]/g,R=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,g=/[\da-f]/i;return Ri=function(X,v={}){let V=X.css.valueOf(),W=v.ignoreErrors,k,N,D,G,w,T,Y,M,U,_,B=V.length,C=0,le=[],ae=[],J=-1;function K(){return C}function O(A){throw X.error("Unclosed "+A,C)}function H(){return ae.length===0&&C>=B}function j(A){if(ae.length)return ae.pop();if(C>=B)return;let P=A?A.ignoreUnclosed:!1;switch(k=V.charCodeAt(C),k){case r:case a:case f:case h:case d:{G=C;do G+=1,k=V.charCodeAt(G);while(k===a||k===r||k===f||k===h||k===d);T=["space",V.slice(C,G)],C=G-1;break}case m:case p:case i:case c:case S:case u:case l:{let re=String.fromCharCode(k);T=[re,re,C];break}case o:{if(_=le.length?le.pop()[1]:"",U=V.charCodeAt(C+1),_==="url"&&U!==e&&U!==t&&U!==a&&U!==r&&U!==f&&U!==d&&U!==h){G=C;do{if(Y=!1,G=V.indexOf(")",G+1),G===-1)if(W||P){G=C;break}else O("bracket");for(M=G;V.charCodeAt(M-1)===s;)M-=1,Y=!Y}while(Y);T=["brackets",V.slice(C,G+1),C,G],C=G}else C<=J?T=["(","(",C]:(G=V.indexOf(")",C+1),N=V.slice(C,G+1),G===-1||y.test(N)?(J=G===-1?B:G,T=["(","(",C]):(T=["brackets",N,C,G],C=G));break}case e:case t:{w=k===e?"'":'"',G=C;do{if(Y=!1,G=V.indexOf(w,G+1),G===-1)if(W||P){G=C+1;break}else O("string");for(M=G;V.charCodeAt(M-1)===s;)M-=1,Y=!Y}while(Y);T=["string",V.slice(C,G+1),C,G],C=G;break}case Z:{I.lastIndex=C+1,I.test(V),I.lastIndex===0?G=V.length-1:G=I.lastIndex-2,T=["at-word",V.slice(C,G+1),C,G],C=G;break}case s:{for(G=C,D=!0;V.charCodeAt(G+1)===s;)G+=1,D=!D;if(k=V.charCodeAt(G+1),D&&k!==n&&k!==a&&k!==r&&k!==f&&k!==h&&k!==d&&(G+=1,g.test(V.charAt(G)))){for(;g.test(V.charAt(G+1));)G+=1;V.charCodeAt(G+1)===a&&(G+=1)}T=["word",V.slice(C,G+1),C,G],C=G;break}default:{k===n&&V.charCodeAt(C+1)===b?(G=V.indexOf("*/",C+2)+1,G===0&&(W||P?G=V.length:O("comment")),T=["comment",V.slice(C,G+1),C,G],C=G):(R.lastIndex=C+1,R.test(V),R.lastIndex===0?G=V.length-1:G=R.lastIndex-2,T=["word",V.slice(C,G+1),C,G],le.push(T),C=G);break}}return C++,T}function ee(A){ae.push(A)}return{back:ee,endOfFile:H,nextToken:j,position:K}},Ri}var vi,vl;function Mh(){if(vl)return vi;vl=1;let e=pi(),t=xs(),s=Ts(),n=Jt(),r=Xi(),a=Fh();const d={empty:!0,space:!0};function f(p){for(let o=p.length-1;o>=0;o--){let l=p[o],i=l[3]||l[2];if(i)return i}}function h(p,o,l){let i="";for(let c=o;c<l;c++)i+=p[c][1];return i}class m{constructor(o){this.input=o,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}}}atrule(o){let l=new e;l.name=o[1].slice(1),l.name===""&&this.unnamedAtrule(l,o),this.init(l,o[2]);let i,c,u,b=!1,S=!1,Z=[],I=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),i=o[0],i==="("||i==="["?I.push(i==="("?")":"]"):i==="{"&&I.length>0?I.push("}"):i===I[I.length-1]&&I.pop(),I.length===0)if(i===";"){l.source.end=this.getPosition(o[2]),l.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){S=!0;break}else if(i==="}"){if(Z.length>0){for(u=Z.length-1,c=Z[u];c&&c[0]==="space";)c=Z[--u];c&&(l.source.end=this.getPosition(c[3]||c[2]),l.source.end.offset++)}this.end(o);break}else Z.push(o);else Z.push(o);if(this.tokenizer.endOfFile()){b=!0;break}}l.raws.between=this.spacesAndCommentsFromEnd(Z),Z.length?(l.raws.afterName=this.spacesAndCommentsFromStart(Z),this.raw(l,"params",Z),b&&(o=Z[Z.length-1],l.source.end=this.getPosition(o[3]||o[2]),l.source.end.offset++,this.spaces=l.raws.between,l.raws.between="")):(l.raws.afterName="",l.params=""),S&&(l.nodes=[],this.current=l)}checkMissedSemicolon(o){let l=this.colon(o);if(l===!1)return;let i=0,c;for(let u=l-1;u>=0&&(c=o[u],!(c[0]!=="space"&&(i+=1,i===2)));u--);throw this.input.error("Missed semicolon",c[0]==="word"?c[3]+1:c[2])}colon(o){let l=0,i,c,u;for(let[b,S]of o.entries()){if(c=S,u=c[0],u==="("&&(l+=1),u===")"&&(l-=1),l===0&&u===":")if(!i)this.doubleColon(c);else{if(i[0]==="word"&&i[1]==="progid")continue;return b}i=c}return!1}comment(o){let l=new t;this.init(l,o[2]),l.source.end=this.getPosition(o[3]||o[2]),l.source.end.offset++;let i=o[1].slice(2,-2);if(!i.trim())l.text="",l.raws.left=i,l.raws.right="";else{let c=i.match(/^(\s*)([^]*\S)(\s*)$/);l.text=c[2],l.raws.left=c[1],l.raws.right=c[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(o,l){let i=new s;this.init(i,o[0][2]);let c=o[o.length-1];c[0]===";"&&(this.semicolon=!0,o.pop()),i.source.end=this.getPosition(c[3]||c[2]||f(o)),i.source.end.offset++;let u=0;for(;o[u][0]!=="word";)u===o.length-1&&this.unknownWord([o[u]]),u++;i.raws.before+=h(o,0,u),i.source.start=this.getPosition(o[u][2]);let b=u;for(;u<o.length;){let y=o[u][0];if(y===":"||y==="space"||y==="comment")break;u++}i.prop=h(o,b,u);let S=u,Z;for(;u<o.length&&(Z=o[u],u++,Z[0]!==":");)Z[0]==="word"&&/\w/.test(Z[1])&&this.unknownWord([Z]);i.raws.between=h(o,S,u),(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let I=u;for(;u<o.length;){let y=o[u][0];if(y!=="space"&&y!=="comment")break;u++}let R=o.slice(I,u);o=o.slice(u),this.precheckMissedSemicolon(o);for(let y=o.length-1;y>=0;y--){if(Z=o[y],Z[1].toLowerCase()==="!important"){i.important=!0;let g=this.stringFrom(o,y);g=this.spacesFromEnd(o)+g,g!==" !important"&&(i.raws.important=g);break}else if(Z[1].toLowerCase()==="important"){let g=o.slice(0),X="";for(let v=y;v>0;v--){let V=g[v][0];if(X.trim().startsWith("!")&&V!=="space")break;X=g.pop()[1]+X}X.trim().startsWith("!")&&(i.important=!0,i.raws.important=X,o=g)}if(Z[0]!=="space"&&Z[0]!=="comment")break}o.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(i.raws.between+=R.map(y=>y[1]).join(""),R=[]),this.raw(i,"value",R.concat(o),l),i.value.includes(":")&&!l&&this.checkMissedSemicolon(o)}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let l=new r;this.init(l,o[2]),l.selector="",l.raws.between="",this.current=l}end(o){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(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o)}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(o){if(this.spaces+=o[1],this.current.nodes){let l=this.current.nodes[this.current.nodes.length-1];l&&l.type==="rule"&&!l.raws.ownSemicolon&&(l.raws.ownSemicolon=this.spaces,this.spaces="",l.source.end=this.getPosition(o[2]),l.source.end.offset+=l.raws.ownSemicolon.length)}}getPosition(o){let l=this.input.fromOffset(o);return{column:l.col,line:l.line,offset:o}}init(o,l){this.current.push(o),o.source={input:this.input,start:this.getPosition(l)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=!1)}other(o){let l=!1,i=null,c=!1,u=null,b=[],S=o[1].startsWith("--"),Z=[],I=o;for(;I;){if(i=I[0],Z.push(I),i==="("||i==="[")u||(u=I),b.push(i==="("?")":"]");else if(S&&c&&i==="{")u||(u=I),b.push("}");else if(b.length===0)if(i===";")if(c){this.decl(Z,S);return}else break;else if(i==="{"){this.rule(Z);return}else if(i==="}"){this.tokenizer.back(Z.pop()),l=!0;break}else i===":"&&(c=!0);else i===b[b.length-1]&&(b.pop(),b.length===0&&(u=null));I=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(l=!0),b.length>0&&this.unclosedBracket(u),l&&c){if(!S)for(;Z.length&&(I=Z[Z.length-1][0],!(I!=="space"&&I!=="comment"));)this.tokenizer.back(Z.pop());this.decl(Z,S)}else this.unknownWord(Z)}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case"space":this.spaces+=o[1];break;case";":this.freeSemicolon(o);break;case"}":this.end(o);break;case"comment":this.comment(o);break;case"at-word":this.atrule(o);break;case"{":this.emptyRule(o);break;default:this.other(o);break}this.endFile()}precheckMissedSemicolon(){}raw(o,l,i,c){let u,b,S=i.length,Z="",I=!0,R,y;for(let g=0;g<S;g+=1)u=i[g],b=u[0],b==="space"&&g===S-1&&!c?I=!1:b==="comment"?(y=i[g-1]?i[g-1][0]:"empty",R=i[g+1]?i[g+1][0]:"empty",!d[y]&&!d[R]?Z.slice(-1)===","?I=!1:Z+=u[1]:I=!1):Z+=u[1];if(!I){let g=i.reduce((X,v)=>X+v[1],"");o.raws[l]={raw:g,value:Z}}o[l]=Z}rule(o){o.pop();let l=new r;this.init(l,o[0][2]),l.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(l,"selector",o),this.current=l}spacesAndCommentsFromEnd(o){let l,i="";for(;o.length&&(l=o[o.length-1][0],!(l!=="space"&&l!=="comment"));)i=o.pop()[1]+i;return i}spacesAndCommentsFromStart(o){let l,i="";for(;o.length&&(l=o[0][0],!(l!=="space"&&l!=="comment"));)i+=o.shift()[1];return i}spacesFromEnd(o){let l,i="";for(;o.length&&(l=o[o.length-1][0],l==="space");)i=o.pop()[1]+i;return i}stringFrom(o,l){let i="";for(let c=l;c<o.length;c++)i+=o[c][1];return o.splice(l,o.length-l),i}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word "+o[0][1],{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,l){throw this.input.error("At-rule without name",{offset:l[2]},{offset:l[2]+l[1].length})}}return vi=m,vi}var Wi,Wl;function wi(){if(Wl)return Wi;Wl=1;let e=Ae(),t=Ls(),s=Mh();function n(r,a){let d=new t(r,a),f=new s(d);try{f.parse()}catch(h){throw process.env.NODE_ENV!=="production"&&h.name==="CssSyntaxError"&&a&&a.from&&(/\.scss$/i.test(a.from)?h.message+=`
346
- You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(a.from)?h.message+=`
347
- You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(a.from)&&(h.message+=`
348
- You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),h}return f.root}return Wi=n,n.default=n,e.registerParse(n),Wi}var ki,wl;function kl(){if(wl)return ki;wl=1;let e=Ae(),{my:t}=ks();class s{constructor(r,a={}){if(this.type="warning",this.text=r,a.node&&a.node.source){a.node[t]||e.rebuild(a.node);let d=a.node.rangeBy(a);this.line=d.start.line,this.column=d.start.column,this.endLine=d.end.line,this.endColumn=d.end.column}for(let d in a)this[d]=a[d]}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 ki=s,s.default=s,ki}var Ci,Cl;function xi(){if(Cl)return Ci;Cl=1;let e=kl();class t{get content(){return this.css}constructor(n,r,a){this.processor=n,this.messages=[],this.root=r,this.opts=a,this.css="",this.map=void 0}toString(){return this.css}warn(n,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let a=new e(n,r);return this.messages.push(a),a}warnings(){return this.messages.filter(n=>n.type==="warning")}}return Ci=t,t.default=t,Ci}var Ti,xl;function Tl(){if(xl)return Ti;xl=1;let e={};return Ti=function(t){e[t]||(e[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},Ti}var Li,Ll;function Nl(){if(Ll)return Li;Ll=1;let e=Ae(),t=fi(),s=Gl(),n=wi(),r=xi(),a=Jt(),d=ws(),{isClean:f,my:h}=ks(),m=Tl();const p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},o={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},l={Once:!0,postcssPlugin:!0,prepare:!0},i=0;function c(R){return typeof R=="object"&&typeof R.then=="function"}function u(R){let y=!1,g=p[R.type];return R.type==="decl"?y=R.prop.toLowerCase():R.type==="atrule"&&(y=R.name.toLowerCase()),y&&R.append?[g,g+"-"+y,i,g+"Exit",g+"Exit-"+y]:y?[g,g+"-"+y,g+"Exit",g+"Exit-"+y]:R.append?[g,i,g+"Exit"]:[g,g+"Exit"]}function b(R){let y;return R.type==="document"?y=["Document",i,"DocumentExit"]:R.type==="root"?y=["Root",i,"RootExit"]:y=u(R),{eventIndex:0,events:y,iterator:0,node:R,visitorIndex:0,visitors:[]}}function S(R){let y=[R];for(;y.length>0;){let g=y.pop();if(g[f]=!1,g.nodes)for(let X of g.nodes)y.push(X)}return R}let Z={};class I{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"}constructor(y,g,X){this.stringified=!1,this.processed=!1;let v;if(typeof g=="object"&&g!==null&&(g.type==="root"||g.type==="document"))v=S(g);else if(g instanceof I||g instanceof r)v=S(g.root),g.map&&(typeof X.map>"u"&&(X.map={}),X.map.inline||(X.map.inline=!1),X.map.prev=g.map);else{let V=n;X.syntax&&(V=X.syntax.parse),X.parser&&(V=X.parser),V.parse&&(V=V.parse);try{v=V(g,X)}catch(W){this.processed=!0,this.error=W}v&&!v[h]&&e.rebuild(v)}this.result=new r(y,v,X),this.helpers=ge(z({},Z),{postcss:Z,result:this.result}),this.plugins=this.processor.plugins.map(V=>typeof V=="object"&&V.prepare?z(z({},V),V.prepare(this.result)):V)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,g){let X=this.result.lastPlugin;try{if(g&&g.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin)y.plugin=X.postcssPlugin,y.setMessage();else if(X.postcssVersion&&process.env.NODE_ENV!=="production"){let v=X.postcssPlugin,V=X.postcssVersion,W=this.result.processor.version,k=V.split("."),N=W.split(".");(k[0]!==N[0]||parseInt(k[1])>parseInt(N[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+W+", but "+v+" uses "+V+". Perhaps this is the source of the error below.")}}catch(v){console&&console.error&&console.error(v)}return y}prepareVisitors(){this.listeners={};let y=(g,X,v)=>{this.listeners[X]||(this.listeners[X]=[]),this.listeners[X].push([g,v])};for(let g of this.plugins)if(typeof g=="object")for(let X in g){if(!o[X]&&/^[A-Z]/.test(X))throw new Error(`Unknown event ${X} in ${g.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[X])if(typeof g[X]=="object")for(let v in g[X])v==="*"?y(g,X,g[X][v]):y(g,X+"-"+v.toLowerCase(),g[X][v]);else typeof g[X]=="function"&&y(g,X,g[X])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return Ve(this,null,function*(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let g=this.plugins[y],X=this.runOnRoot(g);if(c(X))try{yield X}catch(v){throw this.handleError(v)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[f];){y[f]=!0;let g=[b(y)];for(;g.length>0;){let X=this.visitTick(g);if(c(X))try{yield X}catch(v){let V=g[g.length-1].node;throw this.handleError(v,V)}}}if(this.listeners.OnceExit)for(let[g,X]of this.listeners.OnceExit){this.result.lastPlugin=g;try{if(y.type==="document"){let v=y.nodes.map(V=>X(V,this.helpers));yield Promise.all(v)}else yield X(y,this.helpers)}catch(v){throw this.handleError(v)}}}return this.processed=!0,this.stringify()})}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let g=this.result.root.nodes.map(X=>y.Once(X,this.helpers));return c(g[0])?Promise.all(g):g}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(g){throw this.handleError(g)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,g=d;y.syntax&&(g=y.syntax.stringify),y.stringifier&&(g=y.stringifier),g.stringify&&(g=g.stringify);let X=this.result.root.source;if(y.map===void 0&&!(X&&X.input&&X.input.map)){let V="";return g(this.result.root,W=>{V+=W}),this.result.css=V,this.result}let v=new s(g,this.result.root,this.result.opts).generate();return this.result.css=v[0],this.result.map=v[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 y of this.plugins){let g=this.runOnRoot(y);if(c(g))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[f];)y[f]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let g of y.nodes)this.visitSync(this.listeners.OnceExit,g);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,g){return process.env.NODE_ENV!=="production"&&("from"in this.opts||m("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(y,g)}toString(){return this.css}visitSync(y,g){for(let[X,v]of y){this.result.lastPlugin=X;let V;try{V=v(g,this.helpers)}catch(W){throw this.handleError(W,g.proxyOf)}if(g.type!=="root"&&g.type!=="document"&&!g.parent)return!0;if(c(V))throw this.getAsyncError()}}visitTick(y){let g=y[y.length-1],{node:X,visitors:v}=g;if(X.type!=="root"&&X.type!=="document"&&!X.parent){y.pop();return}if(v.length>0&&g.visitorIndex<v.length){let[W,k]=v[g.visitorIndex];g.visitorIndex+=1,g.visitorIndex===v.length&&(g.visitors=[],g.visitorIndex=0),this.result.lastPlugin=W;try{return k(X.toProxy(),this.helpers)}catch(N){throw this.handleError(N,X)}}if(g.iterator!==0){let W=g.iterator;g.descending&&(g.descending=!1,X.indexes[W]+=1);let k;for(;k=X.nodes[X.indexes[W]];){if(!k[f]){k[f]=!0,g.descending=!0,y.push(b(k));return}X.indexes[W]+=1}g.iterator=0,delete X.indexes[W]}let V=g.events;for(;g.eventIndex<V.length;){let W=V[g.eventIndex];if(g.eventIndex+=1,W===i){X.nodes&&X.nodes.length&&(X[f]=!0,g.iterator=X.getIterator());return}else if(this.listeners[W]){g.visitors=this.listeners[W];return}}y.pop()}walkSync(y){y[f]=!0;let g=[{eventIndex:0,events:u(y),iterator:0,node:y}];for(;g.length>0;){let X=g[g.length-1],v=X.node;if(X.iterator!==0){let V=X.iterator;X.descending&&(X.descending=!1,v.indexes[V]+=1);let W,k=!1;for(;W=v.nodes[v.indexes[V]];){if(!W[f]){W[f]=!0,X.descending=!0,g.push({eventIndex:0,events:u(W),iterator:0,node:W}),k=!0;break}v.indexes[V]+=1}if(k)continue;X.iterator=0,delete v.indexes[V]}if(X.eventIndex<X.events.length){let V=X.events[X.eventIndex];if(X.eventIndex+=1,V===i)v.nodes&&v.nodes.length&&(X.iterator=v.getIterator());else{let W=this.listeners[V];W&&this.visitSync(W,v.toProxy())&&g.pop()}continue}g.pop()}}warnings(){return this.sync().warnings()}}return I.registerPostcss=R=>{Z=R},Li=I,I.default=I,a.registerLazyResult(I),t.registerLazyResult(I),Li}var Ni,Jl;function Oh(){if(Jl)return Ni;Jl=1;let e=Gl(),t=wi(),s=xi(),n=ws(),r=Tl();class a{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 f,h=t;try{f=h(this._css,this._opts)}catch(m){this.error=m}if(this.error)throw this.error;return this._root=f,f}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(f,h,m){h=h.toString(),this.stringified=!1,this._processor=f,this._css=h,this._opts=m,this._map=void 0;let p=n;this.result=new s(this._processor,void 0,this._opts),this.result.css=h;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new e(p,void 0,this._opts,h);if(l.isMap()){let[i,c]=l.generate();i&&(this.result.css=i),c&&(this.result.map=c)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(f){return this.async().catch(f)}finally(f){return this.async().then(f,f)}sync(){if(this.error)throw this.error;return this.result}then(f,h){return process.env.NODE_ENV!=="production"&&("from"in this._opts||r("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(f,h)}toString(){return this._css}warnings(){return[]}}return Ni=a,a.default=a,Ni}var Ji,Yl;function Kh(){if(Yl)return Ji;Yl=1;let e=fi(),t=Nl(),s=Oh(),n=Jt();class r{constructor(d=[]){this.version="8.5.26",this.plugins=this.normalize(d)}normalize(d){let f=[];for(let h of d)if(h.postcss===!0?h=h():h.postcss&&(h=h.postcss),typeof h=="object"&&Array.isArray(h.plugins))f=f.concat(h.plugins);else if(typeof h=="object"&&h.postcssPlugin)f.push(h);else if(typeof h=="function")f.push(h);else if(typeof h=="object"&&(h.parse||h.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(h+" is not a PostCSS plugin");return f}process(d,f={}){return!this.plugins.length&&!f.parser&&!f.stringifier&&!f.syntax?new s(this,d,f):new t(this,d,f)}use(d){return this.plugins=this.plugins.concat(this.normalize([d])),this}}return Ji=r,r.default=r,n.registerProcessor(r),e.registerProcessor(r),Ji}var Yi,Ul;function Eh(){if(Ul)return Yi;Ul=1;let e=pi(),t=xs(),s=Ae(),n=ii(),r=Ts(),a=fi(),d=Uh(),f=Ls(),h=Nl(),m=Sl(),p=Cs(),o=wi(),l=Kh(),i=xi(),c=Jt(),u=Xi(),b=ws(),S=kl();function Z(...I){return I.length===1&&Array.isArray(I[0])&&(I=I[0]),new l(I)}return Z.plugin=function(I,R){let y=!1;function g(...v){console&&console.warn&&!y&&(y=!0,console.warn(I+`: postcss.plugin was deprecated. Migration guide:
343
+ `),this.css+=i+"/*# sourceMappingURL="+a+" */"}applyPrevMaps(){for(let a of this.previous()){let i=this.toUrl(this.path(a.file)),c=a.root||e(a.file),u;this.mapOpts.sourcesContent===!1?(u=new r(a.text),u.sourcesContent&&(u.sourcesContent=null)):u=a.consumer(),this.map.applySourceMap(u,i,this.toUrl(this.path(c)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let a;for(let i=this.root.nodes.length-1;i>=0;i--)a=this.root.nodes[i],a.type==="comment"&&a.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(i)}else if(this.css){let a;for(;(a=this.css.lastIndexOf("/*#"))!==-1;){let i=this.css.indexOf("*/",a+3);if(i===-1)break;for(;a>0&&this.css[a-1]===`
344
+ `;)a--;this.css=this.css.slice(0,a)+this.css.slice(i+2)}}}}generate(){if(this.clearAnnotation(),m&&h&&this.isMap())return this.generateMap();{let a="";return this.stringify(this.root,i=>{a+=i}),[a]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let a=this.previous()[0].consumer();a.file=this.outputFile(),this.map=l.fromSourceMap(a,{ignoreInvalidMapping:!0})}else this.map=new l({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 l({file:this.outputFile(),ignoreInvalidMapping:!0});let a=1,i=1,c="<no source>",u={generated:{column:0,line:0},original:{column:0,line:0},source:""},b,S;this.stringify(this.root,(Z,I,R)=>{if(this.css+=Z,I&&R!=="end"&&(u.generated.line=a,u.generated.column=i-1,I.source&&I.source.start?(u.source=this.sourcePath(I),u.original.line=I.source.start.line,u.original.column=I.source.start.column-1,this.map.addMapping(u)):(u.source=c,u.original.line=1,u.original.column=0,this.map.addMapping(u))),S=Z.match(/\n/g),S?(a+=S.length,b=Z.lastIndexOf(`
345
+ `),i=Z.length-b):i+=Z.length,I&&R!=="start"){let y=I.parent||{raws:{}};(!(I.type==="decl"||I.type==="atrule"&&!I.nodes)||I!==y.last||y.raws.semicolon)&&(I.source&&I.source.end?(u.source=this.sourcePath(I),u.original.line=I.source.end.line,u.original.column=I.source.end.column-1,u.generated.line=a,u.generated.column=i-2,this.map.addMapping(u)):(u.source=c,u.original.line=1,u.original.column=0,u.generated.line=a,u.generated.column=i-1,this.map.addMapping(u)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(a=>a.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let a=this.mapOpts.annotation;return typeof a<"u"&&a!==!0?!1:this.previous().length?this.previous().some(i=>i.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(a=>a.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(a){if(this.mapOpts.absolute||a.charCodeAt(0)===60||/^\w+:\/\//.test(a))return a;let i=this.memoizedPaths.get(a);if(i)return i;let c=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(c=e(s(c,this.mapOpts.annotation)));let u=t(c,a);return this.memoizedPaths.set(a,u),u}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(a=>{if(a.source&&a.source.input.map){let i=a.source.input.map;this.previousMaps.includes(i)||this.previousMaps.push(i)}});else{let a=new f(this.originalCSS,this.opts);a.map&&this.previousMaps.push(a.map)}return this.previousMaps}setSourcesContent(){let a={};if(this.root)this.root.walk(i=>{if(i.source){let c=i.source.input.from;if(c&&!a[c]){a[c]=!0;let u=this.usesFileUrls?this.toFileUrl(c):this.toUrl(this.path(c));this.map.setSourceContent(u,i.source.input.css)}}});else if(this.css){let i=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(i,this.css)}}sourcePath(a){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(a.source.input.from):this.toUrl(this.path(a.source.input.from))}toBase64(a){return Buffer?Buffer.from(a).toString("base64"):window.btoa(unescape(encodeURIComponent(a)))}toFileUrl(a){let i=this.memoizedFileURLs.get(a);if(i)return i;if(d){let c=d(a).toString();return this.memoizedFileURLs.set(a,c),c}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(a){let i=this.memoizedURLs.get(a);if(i)return i;n==="\\"&&(a=a.replace(/\\/g,"/"));let c=encodeURI(a).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(a,c),c}}return Gi=p,Gi}var Ri,Rl;function Oh(){if(Rl)return Ri;Rl=1;const e=39,t=34,s=92,n=47,r=10,l=32,d=12,f=9,h=13,m=91,p=93,o=40,a=41,i=123,c=125,u=59,b=42,S=58,Z=64,I=/[\t\n\f\r "#'()/;[\\\]{}]/g,R=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,g=/[\da-f]/i;return Ri=function(X,v={}){let V=X.css.valueOf(),W=v.ignoreErrors,k,N,D,G,w,T,Y,M,U,_,B=V.length,C=0,le=[],ae=[],J=-1;function K(){return C}function O(A){throw X.error("Unclosed "+A,C)}function H(){return ae.length===0&&C>=B}function j(A){if(ae.length)return ae.pop();if(C>=B)return;let P=A?A.ignoreUnclosed:!1;switch(k=V.charCodeAt(C),k){case r:case l:case f:case h:case d:{G=C;do G+=1,k=V.charCodeAt(G);while(k===l||k===r||k===f||k===h||k===d);T=["space",V.slice(C,G)],C=G-1;break}case m:case p:case i:case c:case S:case u:case a:{let re=String.fromCharCode(k);T=[re,re,C];break}case o:{if(_=le.length?le.pop()[1]:"",U=V.charCodeAt(C+1),_==="url"&&U!==e&&U!==t&&U!==l&&U!==r&&U!==f&&U!==d&&U!==h){G=C;do{if(Y=!1,G=V.indexOf(")",G+1),G===-1)if(W||P){G=C;break}else O("bracket");for(M=G;V.charCodeAt(M-1)===s;)M-=1,Y=!Y}while(Y);T=["brackets",V.slice(C,G+1),C,G],C=G}else C<=J?T=["(","(",C]:(G=V.indexOf(")",C+1),N=V.slice(C,G+1),G===-1||y.test(N)?(J=G===-1?B:G,T=["(","(",C]):(T=["brackets",N,C,G],C=G));break}case e:case t:{w=k===e?"'":'"',G=C;do{if(Y=!1,G=V.indexOf(w,G+1),G===-1)if(W||P){G=C+1;break}else O("string");for(M=G;V.charCodeAt(M-1)===s;)M-=1,Y=!Y}while(Y);T=["string",V.slice(C,G+1),C,G],C=G;break}case Z:{I.lastIndex=C+1,I.test(V),I.lastIndex===0?G=V.length-1:G=I.lastIndex-2,T=["at-word",V.slice(C,G+1),C,G],C=G;break}case s:{for(G=C,D=!0;V.charCodeAt(G+1)===s;)G+=1,D=!D;if(k=V.charCodeAt(G+1),D&&k!==n&&k!==l&&k!==r&&k!==f&&k!==h&&k!==d&&(G+=1,g.test(V.charAt(G)))){for(;g.test(V.charAt(G+1));)G+=1;V.charCodeAt(G+1)===l&&(G+=1)}T=["word",V.slice(C,G+1),C,G],C=G;break}default:{k===n&&V.charCodeAt(C+1)===b?(G=V.indexOf("*/",C+2)+1,G===0&&(W||P?G=V.length:O("comment")),T=["comment",V.slice(C,G+1),C,G],C=G):(R.lastIndex=C+1,R.test(V),R.lastIndex===0?G=V.length-1:G=R.lastIndex-2,T=["word",V.slice(C,G+1),C,G],le.push(T),C=G);break}}return C++,T}function ee(A){ae.push(A)}return{back:ee,endOfFile:H,nextToken:j,position:K}},Ri}var vi,vl;function Kh(){if(vl)return vi;vl=1;let e=pi(),t=xs(),s=Ts(),n=Jt(),r=Xi(),l=Oh();const d={empty:!0,space:!0};function f(p){for(let o=p.length-1;o>=0;o--){let a=p[o],i=a[3]||a[2];if(i)return i}}function h(p,o,a){let i="";for(let c=o;c<a;c++)i+=p[c][1];return i}class m{constructor(o){this.input=o,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:o,start:{column:1,line:1,offset:0}}}atrule(o){let a=new e;a.name=o[1].slice(1),a.name===""&&this.unnamedAtrule(a,o),this.init(a,o[2]);let i,c,u,b=!1,S=!1,Z=[],I=[];for(;!this.tokenizer.endOfFile();){if(o=this.tokenizer.nextToken(),i=o[0],i==="("||i==="["?I.push(i==="("?")":"]"):i==="{"&&I.length>0?I.push("}"):i===I[I.length-1]&&I.pop(),I.length===0)if(i===";"){a.source.end=this.getPosition(o[2]),a.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){S=!0;break}else if(i==="}"){if(Z.length>0){for(u=Z.length-1,c=Z[u];c&&c[0]==="space";)c=Z[--u];c&&(a.source.end=this.getPosition(c[3]||c[2]),a.source.end.offset++)}this.end(o);break}else Z.push(o);else Z.push(o);if(this.tokenizer.endOfFile()){b=!0;break}}a.raws.between=this.spacesAndCommentsFromEnd(Z),Z.length?(a.raws.afterName=this.spacesAndCommentsFromStart(Z),this.raw(a,"params",Z),b&&(o=Z[Z.length-1],a.source.end=this.getPosition(o[3]||o[2]),a.source.end.offset++,this.spaces=a.raws.between,a.raws.between="")):(a.raws.afterName="",a.params=""),S&&(a.nodes=[],this.current=a)}checkMissedSemicolon(o){let a=this.colon(o);if(a===!1)return;let i=0,c;for(let u=a-1;u>=0&&(c=o[u],!(c[0]!=="space"&&(i+=1,i===2)));u--);throw this.input.error("Missed semicolon",c[0]==="word"?c[3]+1:c[2])}colon(o){let a=0,i,c,u;for(let[b,S]of o.entries()){if(c=S,u=c[0],u==="("&&(a+=1),u===")"&&(a-=1),a===0&&u===":")if(!i)this.doubleColon(c);else{if(i[0]==="word"&&i[1]==="progid")continue;return b}i=c}return!1}comment(o){let a=new t;this.init(a,o[2]),a.source.end=this.getPosition(o[3]||o[2]),a.source.end.offset++;let i=o[1].slice(2,-2);if(!i.trim())a.text="",a.raws.left=i,a.raws.right="";else{let c=i.match(/^(\s*)([^]*\S)(\s*)$/);a.text=c[2],a.raws.left=c[1],a.raws.right=c[3]}}createTokenizer(){this.tokenizer=l(this.input)}decl(o,a){let i=new s;this.init(i,o[0][2]);let c=o[o.length-1];c[0]===";"&&(this.semicolon=!0,o.pop()),i.source.end=this.getPosition(c[3]||c[2]||f(o)),i.source.end.offset++;let u=0;for(;o[u][0]!=="word";)u===o.length-1&&this.unknownWord([o[u]]),u++;i.raws.before+=h(o,0,u),i.source.start=this.getPosition(o[u][2]);let b=u;for(;u<o.length;){let y=o[u][0];if(y===":"||y==="space"||y==="comment")break;u++}i.prop=h(o,b,u);let S=u,Z;for(;u<o.length&&(Z=o[u],u++,Z[0]!==":");)Z[0]==="word"&&/\w/.test(Z[1])&&this.unknownWord([Z]);i.raws.between=h(o,S,u),(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let I=u;for(;u<o.length;){let y=o[u][0];if(y!=="space"&&y!=="comment")break;u++}let R=o.slice(I,u);o=o.slice(u),this.precheckMissedSemicolon(o);for(let y=o.length-1;y>=0;y--){if(Z=o[y],Z[1].toLowerCase()==="!important"){i.important=!0;let g=this.stringFrom(o,y);g=this.spacesFromEnd(o)+g,g!==" !important"&&(i.raws.important=g);break}else if(Z[1].toLowerCase()==="important"){let g=o.slice(0),X="";for(let v=y;v>0;v--){let V=g[v][0];if(X.trim().startsWith("!")&&V!=="space")break;X=g.pop()[1]+X}X.trim().startsWith("!")&&(i.important=!0,i.raws.important=X,o=g)}if(Z[0]!=="space"&&Z[0]!=="comment")break}o.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(i.raws.between+=R.map(y=>y[1]).join(""),R=[]),this.raw(i,"value",R.concat(o),a),i.value.includes(":")&&!a&&this.checkMissedSemicolon(o)}doubleColon(o){throw this.input.error("Double colon",{offset:o[2]},{offset:o[2]+o[1].length})}emptyRule(o){let a=new r;this.init(a,o[2]),a.selector="",a.raws.between="",this.current=a}end(o){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(o[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(o)}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(o){if(this.spaces+=o[1],this.current.nodes){let a=this.current.nodes[this.current.nodes.length-1];a&&a.type==="rule"&&!a.raws.ownSemicolon&&(a.raws.ownSemicolon=this.spaces,this.spaces="",a.source.end=this.getPosition(o[2]),a.source.end.offset+=a.raws.ownSemicolon.length)}}getPosition(o){let a=this.input.fromOffset(o);return{column:a.col,line:a.line,offset:o}}init(o,a){this.current.push(o),o.source={input:this.input,start:this.getPosition(a)},o.raws.before=this.spaces,this.spaces="",o.type!=="comment"&&(this.semicolon=!1)}other(o){let a=!1,i=null,c=!1,u=null,b=[],S=o[1].startsWith("--"),Z=[],I=o;for(;I;){if(i=I[0],Z.push(I),i==="("||i==="[")u||(u=I),b.push(i==="("?")":"]");else if(S&&c&&i==="{")u||(u=I),b.push("}");else if(b.length===0)if(i===";")if(c){this.decl(Z,S);return}else break;else if(i==="{"){this.rule(Z);return}else if(i==="}"){this.tokenizer.back(Z.pop()),a=!0;break}else i===":"&&(c=!0);else i===b[b.length-1]&&(b.pop(),b.length===0&&(u=null));I=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(a=!0),b.length>0&&this.unclosedBracket(u),a&&c){if(!S)for(;Z.length&&(I=Z[Z.length-1][0],!(I!=="space"&&I!=="comment"));)this.tokenizer.back(Z.pop());this.decl(Z,S)}else this.unknownWord(Z)}parse(){let o;for(;!this.tokenizer.endOfFile();)switch(o=this.tokenizer.nextToken(),o[0]){case"space":this.spaces+=o[1];break;case";":this.freeSemicolon(o);break;case"}":this.end(o);break;case"comment":this.comment(o);break;case"at-word":this.atrule(o);break;case"{":this.emptyRule(o);break;default:this.other(o);break}this.endFile()}precheckMissedSemicolon(){}raw(o,a,i,c){let u,b,S=i.length,Z="",I=!0,R,y;for(let g=0;g<S;g+=1)u=i[g],b=u[0],b==="space"&&g===S-1&&!c?I=!1:b==="comment"?(y=i[g-1]?i[g-1][0]:"empty",R=i[g+1]?i[g+1][0]:"empty",!d[y]&&!d[R]?Z.slice(-1)===","?I=!1:Z+=u[1]:I=!1):Z+=u[1];if(!I){let g=i.reduce((X,v)=>X+v[1],"");o.raws[a]={raw:g,value:Z}}o[a]=Z}rule(o){o.pop();let a=new r;this.init(a,o[0][2]),a.raws.between=this.spacesAndCommentsFromEnd(o),this.raw(a,"selector",o),this.current=a}spacesAndCommentsFromEnd(o){let a,i="";for(;o.length&&(a=o[o.length-1][0],!(a!=="space"&&a!=="comment"));)i=o.pop()[1]+i;return i}spacesAndCommentsFromStart(o){let a,i="";for(;o.length&&(a=o[0][0],!(a!=="space"&&a!=="comment"));)i+=o.shift()[1];return i}spacesFromEnd(o){let a,i="";for(;o.length&&(a=o[o.length-1][0],a==="space");)i=o.pop()[1]+i;return i}stringFrom(o,a){let i="";for(let c=a;c<o.length;c++)i+=o[c][1];return o.splice(a,o.length-a),i}unclosedBlock(){let o=this.current.source.start;throw this.input.error("Unclosed block",o.line,o.column)}unclosedBracket(o){throw this.input.error("Unclosed bracket",{offset:o[2]},{offset:o[2]+1})}unexpectedClose(o){throw this.input.error("Unexpected }",{offset:o[2]},{offset:o[2]+1})}unknownWord(o){throw this.input.error("Unknown word "+o[0][1],{offset:o[0][2]},{offset:o[0][2]+o[0][1].length})}unnamedAtrule(o,a){throw this.input.error("At-rule without name",{offset:a[2]},{offset:a[2]+a[1].length})}}return vi=m,vi}var Wi,Wl;function wi(){if(Wl)return Wi;Wl=1;let e=Ae(),t=Ls(),s=Kh();function n(r,l){let d=new t(r,l),f=new s(d);try{f.parse()}catch(h){throw process.env.NODE_ENV!=="production"&&h.name==="CssSyntaxError"&&l&&l.from&&(/\.scss$/i.test(l.from)?h.message+=`
346
+ You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(l.from)?h.message+=`
347
+ You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(l.from)&&(h.message+=`
348
+ You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),h}return f.root}return Wi=n,n.default=n,e.registerParse(n),Wi}var ki,wl;function kl(){if(wl)return ki;wl=1;let e=Ae(),{my:t}=ks();class s{constructor(r,l={}){if(this.type="warning",this.text=r,l.node&&l.node.source){l.node[t]||e.rebuild(l.node);let d=l.node.rangeBy(l);this.line=d.start.line,this.column=d.start.column,this.endLine=d.end.line,this.endColumn=d.end.column}for(let d in l)this[d]=l[d]}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 ki=s,s.default=s,ki}var Ci,Cl;function xi(){if(Cl)return Ci;Cl=1;let e=kl();class t{get content(){return this.css}constructor(n,r,l){this.processor=n,this.messages=[],this.root=r,this.opts=l,this.css="",this.map=void 0}toString(){return this.css}warn(n,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let l=new e(n,r);return this.messages.push(l),l}warnings(){return this.messages.filter(n=>n.type==="warning")}}return Ci=t,t.default=t,Ci}var Ti,xl;function Tl(){if(xl)return Ti;xl=1;let e={};return Ti=function(t){e[t]||(e[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},Ti}var Li,Ll;function Nl(){if(Ll)return Li;Ll=1;let e=Ae(),t=fi(),s=Gl(),n=wi(),r=xi(),l=Jt(),d=ws(),{isClean:f,my:h}=ks(),m=Tl();const p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},o={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},a={Once:!0,postcssPlugin:!0,prepare:!0},i=0;function c(R){return typeof R=="object"&&typeof R.then=="function"}function u(R){let y=!1,g=p[R.type];return R.type==="decl"?y=R.prop.toLowerCase():R.type==="atrule"&&(y=R.name.toLowerCase()),y&&R.append?[g,g+"-"+y,i,g+"Exit",g+"Exit-"+y]:y?[g,g+"-"+y,g+"Exit",g+"Exit-"+y]:R.append?[g,i,g+"Exit"]:[g,g+"Exit"]}function b(R){let y;return R.type==="document"?y=["Document",i,"DocumentExit"]:R.type==="root"?y=["Root",i,"RootExit"]:y=u(R),{eventIndex:0,events:y,iterator:0,node:R,visitorIndex:0,visitors:[]}}function S(R){let y=[R];for(;y.length>0;){let g=y.pop();if(g[f]=!1,g.nodes)for(let X of g.nodes)y.push(X)}return R}let Z={};class I{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"}constructor(y,g,X){this.stringified=!1,this.processed=!1;let v;if(typeof g=="object"&&g!==null&&(g.type==="root"||g.type==="document"))v=S(g);else if(g instanceof I||g instanceof r)v=S(g.root),g.map&&(typeof X.map>"u"&&(X.map={}),X.map.inline||(X.map.inline=!1),X.map.prev=g.map);else{let V=n;X.syntax&&(V=X.syntax.parse),X.parser&&(V=X.parser),V.parse&&(V=V.parse);try{v=V(g,X)}catch(W){this.processed=!0,this.error=W}v&&!v[h]&&e.rebuild(v)}this.result=new r(y,v,X),this.helpers=ge(z({},Z),{postcss:Z,result:this.result}),this.plugins=this.processor.plugins.map(V=>typeof V=="object"&&V.prepare?z(z({},V),V.prepare(this.result)):V)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,g){let X=this.result.lastPlugin;try{if(g&&g.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin)y.plugin=X.postcssPlugin,y.setMessage();else if(X.postcssVersion&&process.env.NODE_ENV!=="production"){let v=X.postcssPlugin,V=X.postcssVersion,W=this.result.processor.version,k=V.split("."),N=W.split(".");(k[0]!==N[0]||parseInt(k[1])>parseInt(N[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+W+", but "+v+" uses "+V+". Perhaps this is the source of the error below.")}}catch(v){console&&console.error&&console.error(v)}return y}prepareVisitors(){this.listeners={};let y=(g,X,v)=>{this.listeners[X]||(this.listeners[X]=[]),this.listeners[X].push([g,v])};for(let g of this.plugins)if(typeof g=="object")for(let X in g){if(!o[X]&&/^[A-Z]/.test(X))throw new Error(`Unknown event ${X} in ${g.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!a[X])if(typeof g[X]=="object")for(let v in g[X])v==="*"?y(g,X,g[X][v]):y(g,X+"-"+v.toLowerCase(),g[X][v]);else typeof g[X]=="function"&&y(g,X,g[X])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return Ve(this,null,function*(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let g=this.plugins[y],X=this.runOnRoot(g);if(c(X))try{yield X}catch(v){throw this.handleError(v)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[f];){y[f]=!0;let g=[b(y)];for(;g.length>0;){let X=this.visitTick(g);if(c(X))try{yield X}catch(v){let V=g[g.length-1].node;throw this.handleError(v,V)}}}if(this.listeners.OnceExit)for(let[g,X]of this.listeners.OnceExit){this.result.lastPlugin=g;try{if(y.type==="document"){let v=y.nodes.map(V=>X(V,this.helpers));yield Promise.all(v)}else yield X(y,this.helpers)}catch(v){throw this.handleError(v)}}}return this.processed=!0,this.stringify()})}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let g=this.result.root.nodes.map(X=>y.Once(X,this.helpers));return c(g[0])?Promise.all(g):g}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(g){throw this.handleError(g)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,g=d;y.syntax&&(g=y.syntax.stringify),y.stringifier&&(g=y.stringifier),g.stringify&&(g=g.stringify);let X=this.result.root.source;if(y.map===void 0&&!(X&&X.input&&X.input.map)){let V="";return g(this.result.root,W=>{V+=W}),this.result.css=V,this.result}let v=new s(g,this.result.root,this.result.opts).generate();return this.result.css=v[0],this.result.map=v[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 y of this.plugins){let g=this.runOnRoot(y);if(c(g))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[f];)y[f]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let g of y.nodes)this.visitSync(this.listeners.OnceExit,g);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,g){return process.env.NODE_ENV!=="production"&&("from"in this.opts||m("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(y,g)}toString(){return this.css}visitSync(y,g){for(let[X,v]of y){this.result.lastPlugin=X;let V;try{V=v(g,this.helpers)}catch(W){throw this.handleError(W,g.proxyOf)}if(g.type!=="root"&&g.type!=="document"&&!g.parent)return!0;if(c(V))throw this.getAsyncError()}}visitTick(y){let g=y[y.length-1],{node:X,visitors:v}=g;if(X.type!=="root"&&X.type!=="document"&&!X.parent){y.pop();return}if(v.length>0&&g.visitorIndex<v.length){let[W,k]=v[g.visitorIndex];g.visitorIndex+=1,g.visitorIndex===v.length&&(g.visitors=[],g.visitorIndex=0),this.result.lastPlugin=W;try{return k(X.toProxy(),this.helpers)}catch(N){throw this.handleError(N,X)}}if(g.iterator!==0){let W=g.iterator;g.descending&&(g.descending=!1,X.indexes[W]+=1);let k;for(;k=X.nodes[X.indexes[W]];){if(!k[f]){k[f]=!0,g.descending=!0,y.push(b(k));return}X.indexes[W]+=1}g.iterator=0,delete X.indexes[W]}let V=g.events;for(;g.eventIndex<V.length;){let W=V[g.eventIndex];if(g.eventIndex+=1,W===i){X.nodes&&X.nodes.length&&(X[f]=!0,g.iterator=X.getIterator());return}else if(this.listeners[W]){g.visitors=this.listeners[W];return}}y.pop()}walkSync(y){y[f]=!0;let g=[{eventIndex:0,events:u(y),iterator:0,node:y}];for(;g.length>0;){let X=g[g.length-1],v=X.node;if(X.iterator!==0){let V=X.iterator;X.descending&&(X.descending=!1,v.indexes[V]+=1);let W,k=!1;for(;W=v.nodes[v.indexes[V]];){if(!W[f]){W[f]=!0,X.descending=!0,g.push({eventIndex:0,events:u(W),iterator:0,node:W}),k=!0;break}v.indexes[V]+=1}if(k)continue;X.iterator=0,delete v.indexes[V]}if(X.eventIndex<X.events.length){let V=X.events[X.eventIndex];if(X.eventIndex+=1,V===i)v.nodes&&v.nodes.length&&(X.iterator=v.getIterator());else{let W=this.listeners[V];W&&this.visitSync(W,v.toProxy())&&g.pop()}continue}g.pop()}}warnings(){return this.sync().warnings()}}return I.registerPostcss=R=>{Z=R},Li=I,I.default=I,l.registerLazyResult(I),t.registerLazyResult(I),Li}var Ni,Jl;function Eh(){if(Jl)return Ni;Jl=1;let e=Gl(),t=wi(),s=xi(),n=ws(),r=Tl();class l{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 f,h=t;try{f=h(this._css,this._opts)}catch(m){this.error=m}if(this.error)throw this.error;return this._root=f,f}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(f,h,m){h=h.toString(),this.stringified=!1,this._processor=f,this._css=h,this._opts=m,this._map=void 0;let p=n;this.result=new s(this._processor,void 0,this._opts),this.result.css=h;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new e(p,void 0,this._opts,h);if(a.isMap()){let[i,c]=a.generate();i&&(this.result.css=i),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(f){return this.async().catch(f)}finally(f){return this.async().then(f,f)}sync(){if(this.error)throw this.error;return this.result}then(f,h){return process.env.NODE_ENV!=="production"&&("from"in this._opts||r("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(f,h)}toString(){return this._css}warnings(){return[]}}return Ni=l,l.default=l,Ni}var Ji,Yl;function zh(){if(Yl)return Ji;Yl=1;let e=fi(),t=Nl(),s=Eh(),n=Jt();class r{constructor(d=[]){this.version="8.5.26",this.plugins=this.normalize(d)}normalize(d){let f=[];for(let h of d)if(h.postcss===!0?h=h():h.postcss&&(h=h.postcss),typeof h=="object"&&Array.isArray(h.plugins))f=f.concat(h.plugins);else if(typeof h=="object"&&h.postcssPlugin)f.push(h);else if(typeof h=="function")f.push(h);else if(typeof h=="object"&&(h.parse||h.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(h+" is not a PostCSS plugin");return f}process(d,f={}){return!this.plugins.length&&!f.parser&&!f.stringifier&&!f.syntax?new s(this,d,f):new t(this,d,f)}use(d){return this.plugins=this.plugins.concat(this.normalize([d])),this}}return Ji=r,r.default=r,n.registerProcessor(r),e.registerProcessor(r),Ji}var Yi,Ul;function Hh(){if(Ul)return Yi;Ul=1;let e=pi(),t=xs(),s=Ae(),n=ii(),r=Ts(),l=fi(),d=Mh(),f=Ls(),h=Nl(),m=Sl(),p=Cs(),o=wi(),a=zh(),i=xi(),c=Jt(),u=Xi(),b=ws(),S=kl();function Z(...I){return I.length===1&&Array.isArray(I[0])&&(I=I[0]),new a(I)}return Z.plugin=function(I,R){let y=!1;function g(...v){console&&console.warn&&!y&&(y=!0,console.warn(I+`: postcss.plugin was deprecated. Migration guide:
349
349
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(I+`: 里面 postcss.plugin 被弃用. 迁移指南:
350
- https://www.w3ctech.com/topic/2226`));let V=R(...v);return V.postcssPlugin=I,V.postcssVersion=new l().version,V}let X;return Object.defineProperty(g,"postcss",{get(){return X||(X=g()),X}}),g.process=function(v,V,W){return Z([g(W)]).process(v,V)},g},Z.stringify=b,Z.parse=o,Z.fromJSON=d,Z.list=m,Z.comment=I=>new t(I),Z.atRule=I=>new e(I),Z.decl=I=>new r(I),Z.rule=I=>new u(I),Z.root=I=>new c(I),Z.document=I=>new a(I),Z.CssSyntaxError=n,Z.Declaration=r,Z.Container=s,Z.Processor=l,Z.Document=a,Z.Comment=t,Z.Warning=S,Z.AtRule=e,Z.Result=i,Z.Input=f,Z.Rule=u,Z.Root=c,Z.Node=p,h.registerPostcss(Z),Yi=Z,Z.default=Z,Yi}Eh();class Ui{constructor(...t){Ne(this,"parentElement",null),Ne(this,"parentNode",null),Ne(this,"ownerDocument"),Ne(this,"firstChild",null),Ne(this,"lastChild",null),Ne(this,"previousSibling",null),Ne(this,"nextSibling",null),Ne(this,"ELEMENT_NODE",1),Ne(this,"TEXT_NODE",3),Ne(this,"nodeType"),Ne(this,"nodeName"),Ne(this,"RRNodeType")}get childNodes(){const t=[];let s=this.firstChild;for(;s;)t.push(s),s=s.nextSibling;return t}contains(t){if(t instanceof Ui){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,s){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"}}Date.now().toString();const Ns=new Map,Fl=new WeakSet;function Ml(e){return e!==null&&typeof e=="object"&&"complete"in e&&"naturalWidth"in e&&"naturalHeight"in e&&"src"in e&&"onload"in e}function zh(e){if(Fl.has(e))return;Fl.add(e);const t=e.drawImage.bind(e);e.drawImage=function(s,...n){const r=Ns.get(e);r&&(r.cancelled=!0);const a=()=>{n.length===2&&Ml(s)&&n.push(s.naturalWidth||s.width,s.naturalHeight||s.height),t(s,...n)};if(Ml(s)&&!s.complete){const d={cancelled:!1};Ns.set(e,d);const f=()=>{d.cancelled||(Ns.delete(e),a())},h=()=>{if(!d.cancelled){Ns.delete(e);try{a()}catch{}}};s.onload=f,s.onerror=h}else a()}}const Ol={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Kl={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Js={},El={},Hh=()=>!!globalThis.Zone;function Fi(e){if(Js[e])return Js[e];const t=globalThis[e],s=t.prototype,n=e in Ol?Ol[e]:void 0,r=!!(n&&n.every(f=>{var h,m;return!!((m=(h=Object.getOwnPropertyDescriptor(s,f))==null?void 0:h.get)!=null&&m.toString().includes("[native code]"))})),a=e in Kl?Kl[e]:void 0,d=!!(a&&a.every(f=>{var h;return typeof s[f]=="function"&&((h=s[f])==null?void 0:h.toString().includes("[native code]"))}));if(r&&d&&!Hh())return Js[e]=t.prototype,t.prototype;try{const f=document.createElement("iframe");f.style.display="none",document.body.appendChild(f);const h=f.contentWindow;if(!h)return t.prototype;const m=h[e].prototype;if(!m)return f.remove(),s;const p=navigator.userAgent;return p.includes("Safari")&&!p.includes("Chrome")?(f.classList.add("rr-block"),f.setAttribute("__rrwebUntaintedMutationObserver",""),El[e]=()=>f.remove()):f.remove(),Js[e]=m}catch{return s}}const Mi={};function De(e,t,s){var n;const r=`${e}.${String(s)}`;if(Mi[r])return Mi[r].call(t);const a=Fi(e),d=(n=Object.getOwnPropertyDescriptor(a,s))==null?void 0:n.get;return d?(Mi[r]=d,d.call(t)):t[s]}const Oi={};function zl(e,t,s){const n=`${e}.${String(s)}`;if(Oi[n])return Oi[n].bind(t);const r=Fi(e)[s];return typeof r!="function"?t[s]:(Oi[n]=r,r.bind(t))}function Ph(e){return De("Node",e,"ownerDocument")}function Dh(e){return De("Node",e,"childNodes")}function Bh(e){return De("Node",e,"parentNode")}function Qh(e){return De("Node",e,"parentElement")}function jh(e){return De("Node",e,"textContent")}function Ah(e,t){return zl("Node",e,"contains")(t)}function _h(e){return zl("Node",e,"getRootNode")()}function $h(e){return!e||!("host"in e)?null:De("ShadowRoot",e,"host")}function qh(e){return e.styleSheets}function ep(e){return!e||!("shadowRoot"in e)?null:De("Element",e,"shadowRoot")}function tp(e,t){return De("Element",e,"querySelector")(t)}function sp(e,t){return De("Element",e,"querySelectorAll")(t)}function Hl(){var e;return[Fi("MutationObserver").constructor,(e=El.MutationObserver)!=null?e:()=>{}]}let Yt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Yt=()=>new Date().getTime());function it(e,t,s){try{if(!(t in e))return()=>{};const n=e[t],r=s(n);return typeof r=="function"&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=r,()=>{e[t]=n}}catch{return()=>{}}}const $={ownerDocument:Ph,childNodes:Dh,parentNode:Bh,parentElement:Qh,textContent:jh,contains:Ah,getRootNode:_h,host:$h,styleSheets:qh,shadowRoot:ep,querySelector:tp,querySelectorAll:sp,nowTimestamp:Yt,mutationObserverCtor:Hl,patch:it,wrapCanvasContextDrawImage:zh};function Ge(e,t,s=document){const n={capture:!0};return s.addEventListener(e,t,n),()=>s.removeEventListener(e,t,n)}const gt=`Please stop import mirror directly. Instead of that,\r
350
+ https://www.w3ctech.com/topic/2226`));let V=R(...v);return V.postcssPlugin=I,V.postcssVersion=new a().version,V}let X;return Object.defineProperty(g,"postcss",{get(){return X||(X=g()),X}}),g.process=function(v,V,W){return Z([g(W)]).process(v,V)},g},Z.stringify=b,Z.parse=o,Z.fromJSON=d,Z.list=m,Z.comment=I=>new t(I),Z.atRule=I=>new e(I),Z.decl=I=>new r(I),Z.rule=I=>new u(I),Z.root=I=>new c(I),Z.document=I=>new l(I),Z.CssSyntaxError=n,Z.Declaration=r,Z.Container=s,Z.Processor=a,Z.Document=l,Z.Comment=t,Z.Warning=S,Z.AtRule=e,Z.Result=i,Z.Input=f,Z.Rule=u,Z.Root=c,Z.Node=p,h.registerPostcss(Z),Yi=Z,Z.default=Z,Yi}Hh();class Ui{constructor(...t){Ne(this,"parentElement",null),Ne(this,"parentNode",null),Ne(this,"ownerDocument"),Ne(this,"firstChild",null),Ne(this,"lastChild",null),Ne(this,"previousSibling",null),Ne(this,"nextSibling",null),Ne(this,"ELEMENT_NODE",1),Ne(this,"TEXT_NODE",3),Ne(this,"nodeType"),Ne(this,"nodeName"),Ne(this,"RRNodeType")}get childNodes(){const t=[];let s=this.firstChild;for(;s;)t.push(s),s=s.nextSibling;return t}contains(t){if(t instanceof Ui){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,s){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"}}Date.now().toString();const Ns=new Map,Fl=new WeakSet;function Ml(e){return e!==null&&typeof e=="object"&&"complete"in e&&"naturalWidth"in e&&"naturalHeight"in e&&"src"in e&&"onload"in e}function Ph(e){if(Fl.has(e))return;Fl.add(e);const t=e.drawImage.bind(e);e.drawImage=function(s,...n){const r=Ns.get(e);r&&(r.cancelled=!0);const l=()=>{n.length===2&&Ml(s)&&n.push(s.naturalWidth||s.width,s.naturalHeight||s.height),t(s,...n)};if(Ml(s)&&!s.complete){const d={cancelled:!1};Ns.set(e,d);const f=()=>{d.cancelled||(Ns.delete(e),l())},h=()=>{if(!d.cancelled){Ns.delete(e);try{l()}catch{}}};s.onload=f,s.onerror=h}else l()}}const Ol={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Kl={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Js={},El={},Dh=()=>!!globalThis.Zone;function Fi(e){if(Js[e])return Js[e];const t=globalThis[e],s=t.prototype,n=e in Ol?Ol[e]:void 0,r=!!(n&&n.every(f=>{var h,m;return!!((m=(h=Object.getOwnPropertyDescriptor(s,f))==null?void 0:h.get)!=null&&m.toString().includes("[native code]"))})),l=e in Kl?Kl[e]:void 0,d=!!(l&&l.every(f=>{var h;return typeof s[f]=="function"&&((h=s[f])==null?void 0:h.toString().includes("[native code]"))}));if(r&&d&&!Dh())return Js[e]=t.prototype,t.prototype;try{const f=document.createElement("iframe");f.style.display="none",document.body.appendChild(f);const h=f.contentWindow;if(!h)return t.prototype;const m=h[e].prototype;if(!m)return f.remove(),s;const p=navigator.userAgent;return p.includes("Safari")&&!p.includes("Chrome")?(f.classList.add("rr-block"),f.setAttribute("__rrwebUntaintedMutationObserver",""),El[e]=()=>f.remove()):f.remove(),Js[e]=m}catch{return s}}const Mi={};function De(e,t,s){var n;const r=`${e}.${String(s)}`;if(Mi[r])return Mi[r].call(t);const l=Fi(e),d=(n=Object.getOwnPropertyDescriptor(l,s))==null?void 0:n.get;return d?(Mi[r]=d,d.call(t)):t[s]}const Oi={};function zl(e,t,s){const n=`${e}.${String(s)}`;if(Oi[n])return Oi[n].bind(t);const r=Fi(e)[s];return typeof r!="function"?t[s]:(Oi[n]=r,r.bind(t))}function Bh(e){return De("Node",e,"ownerDocument")}function Qh(e){return De("Node",e,"childNodes")}function jh(e){return De("Node",e,"parentNode")}function Ah(e){return De("Node",e,"parentElement")}function _h(e){return De("Node",e,"textContent")}function $h(e,t){return zl("Node",e,"contains")(t)}function qh(e){return zl("Node",e,"getRootNode")()}function ep(e){return!e||!("host"in e)?null:De("ShadowRoot",e,"host")}function tp(e){return e.styleSheets}function sp(e){return!e||!("shadowRoot"in e)?null:De("Element",e,"shadowRoot")}function np(e,t){return De("Element",e,"querySelector")(t)}function ip(e,t){return De("Element",e,"querySelectorAll")(t)}function Hl(){var e;return[Fi("MutationObserver").constructor,(e=El.MutationObserver)!=null?e:()=>{}]}let Yt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Yt=()=>new Date().getTime());function it(e,t,s){try{if(!(t in e))return()=>{};const n=e[t],r=s(n);return typeof r=="function"&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=r,()=>{e[t]=n}}catch{return()=>{}}}const $={ownerDocument:Bh,childNodes:Qh,parentNode:jh,parentElement:Ah,textContent:_h,contains:$h,getRootNode:qh,host:ep,styleSheets:tp,shadowRoot:sp,querySelector:np,querySelectorAll:ip,nowTimestamp:Yt,mutationObserverCtor:Hl,patch:it,wrapCanvasContextDrawImage:Ph};function Ge(e,t,s=document){const n={capture:!0};return s.addEventListener(e,t,n),()=>s.removeEventListener(e,t,n)}const gt=`Please stop import mirror directly. Instead of that,\r
351
351
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
352
- or you can use record.mirror to access the mirror instance during recording.`;let Pl={map:{},getId(){return console.error(gt),-1},getNode(){return console.error(gt),null},removeNodeFromMap(){console.error(gt)},has(){return console.error(gt),!1},reset(){console.error(gt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Pl=new Proxy(Pl,{get(e,t,s){return t==="map"&&console.error(gt),Reflect.get(e,t,s)}}));function Ut(e,t,s={}){let n=null,r=0;return function(...a){const d=Date.now();!r&&s.leading===!1&&(r=d);const f=t-(d-r),h=this;f<=0||f>t?(n&&(clearTimeout(n),n=null),r=d,e.apply(h,a)):!n&&s.trailing!==!1&&(n=setTimeout(()=>{r=s.leading===!1?0:Date.now(),n=null,e.apply(h,a)},f))}}function Ys(e,t,s,n,r=window){const a=r.Object.getOwnPropertyDescriptor(e,t);return r.Object.defineProperty(e,t,n?s:{set(d){setTimeout(()=>{s.set.call(this,d)},0),a&&a.set&&a.set.call(this,d)}}),()=>Ys(e,t,a||{},!0)}function Dl(e){var t,s,n,r;const a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:a.documentElement.scrollLeft||a?.body&&((t=$.parentElement(a.body))==null?void 0:t.scrollLeft)||((s=a?.body)==null?void 0:s.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:a?.documentElement.scrollTop||a?.body&&((n=$.parentElement(a.body))==null?void 0:n.scrollTop)||((r=a?.body)==null?void 0:r.scrollTop)||0}}function Bl(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ql(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function jl(e){return e?e.nodeType===e.ELEMENT_NODE?e:$.parentElement(e):null}const np=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch{return!1}return!1};function Se(e,t,s,n){if(!e)return!1;const r=jl(e);if(!r)return!1;try{if(typeof t=="string"){if(r.classList.contains(t)||n&&r.closest("."+t)!==null)return!0}else if(Zs(r,t,n))return!0}catch{}return!!(s&&(r.matches(s)||n&&r.closest(s)!==null))}function ip(e,t){return t.getId(e)!==-1}function Ki(e,t,s){return e.tagName==="TITLE"&&s.headTitleMutations?!0:t.getId(e)===Lt}function Al(e,t){if(xt(e))return!1;const s=t.getId(e);if(!t.has(s))return!0;const n=$.parentNode(e);return n&&n.nodeType===e.DOCUMENT_NODE?!1:n?Al(n,t):!0}function Ei(e){return!!e.changedTouches}function rp(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 _l(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function $l(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function zi(e){return e?e instanceof Ui&&"shadowRoot"in e?!!e.shadowRoot:!!$.shadowRoot(e):!1}class op{constructor(){L(this,"id",1),L(this,"styleIDMap",new WeakMap),L(this,"idStyleMap",new Map)}getId(t){var s;return(s=this.styleIDMap.get(t))!=null?s:-1}has(t){return this.styleIDMap.has(t)}add(t,s){if(this.has(t))return this.getId(t);let n;return s===void 0?n=this.id++:n=s,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++}}function ql(e){var t;let s=null;return"getRootNode"in e&&((t=$.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&$.host($.getRootNode(e))&&(s=$.host($.getRootNode(e))),s}function lp(e){let t=e,s;for(;s=ql(t);)t=s;return t}function ap(e){const t=$.ownerDocument(e);if(!t)return!1;const s=lp(e);return $.contains(t,s)}function ea(e){const t=$.ownerDocument(e);return t?$.contains(t,e)||ap(e):!1}var ie=(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[e.Asset=7]="Asset",e))(ie||{}),te=(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))(te||{}),ke=(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))(ke||{}),_e=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(_e||{}),Zt=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Zt||{}),St=(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))(St||{}),ta=(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))(ta||{});function sa(e){return"__ln"in e}class cp{constructor(){L(this,"length",0),L(this,"head",null),L(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let s=this.head;for(let n=0;n<t;n++)s=s?.next||null;return s}addNode(t){const s={value:t,previous:null,next:null};if(t.__ln=s,t.previousSibling&&sa(t.previousSibling)){const n=t.previousSibling.__ln.next;s.next=n,s.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=s,n&&(n.previous=s)}else if(t.nextSibling&&sa(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;s.previous=n,s.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=s,n&&(n.next=s)}else this.head&&(this.head.previous=s),s.next=this.head,this.head=s;s.next===null&&(this.tail=s),this.length++}removeNode(t){const s=t.__ln;this.head&&(s.previous?(s.previous.next=s.next,s.next?s.next.previous=s.previous:this.tail=s.previous):(this.head=s.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const na=(e,t)=>`${e}@${t}`;class up{constructor(){L(this,"frozen",!1),L(this,"locked",!1),L(this,"texts",[]),L(this,"attributes",[]),L(this,"attributeMap",new WeakMap),L(this,"removes",[]),L(this,"mapRemoves",[]),L(this,"movedMap",{}),L(this,"addedSet",new Set),L(this,"movedSet",new Set),L(this,"droppedSet",new Set),L(this,"removesSubTreeCache",new Set),L(this,"mutationCb"),L(this,"blockClass"),L(this,"blockSelector"),L(this,"maskTextClass"),L(this,"maskTextSelector"),L(this,"inlineStylesheet"),L(this,"maskInputOptions"),L(this,"maskTextFn"),L(this,"maskInputFn"),L(this,"keepIframeSrcFn"),L(this,"recordCanvas"),L(this,"inlineImages"),L(this,"inlineVideos"),L(this,"privacySetting"),L(this,"slimDOMOptions"),L(this,"dataURLOptions"),L(this,"doc"),L(this,"mirror"),L(this,"iframeManager"),L(this,"stylesheetManager"),L(this,"shadowDomManager"),L(this,"canvasManager"),L(this,"processedNodeManager"),L(this,"unattachedDoc"),L(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),L(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],s=new Set,n=new cp,r=h=>{let m=h,p=Lt;for(;p===Lt;)m=m&&m.nextSibling,p=m&&this.mirror.getId(m);return p},a=h=>{const m=$.parentNode(h);if(!m||!ea(h))return;let p=!1;if(h.nodeType===Node.TEXT_NODE){const c=m.tagName;if(c==="TEXTAREA")return;c==="STYLE"&&this.addedSet.has(m)&&(p=!0)}const o=xt(m)?this.mirror.getId(ql(h)):this.mirror.getId(m),l=r(h);if(o===-1||l===-1)return n.addNode(h);const i=yt(h,{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,inlineVideos:this.inlineVideos,privacySetting:this.privacySetting,onSerialize:c=>{_l(c,this.mirror)&&this.iframeManager.addIframe(c),$l(c,this.mirror)&&this.stylesheetManager.trackLinkElement(c),zi(h)&&this.shadowDomManager.addShadowRoot($.shadowRoot(h),this.doc)},onIframeLoad:(c,u)=>{this.iframeManager.attachIframe(c,u),this.shadowDomManager.observeAttachShadow(c)},onStylesheetLoad:(c,u)=>{this.stylesheetManager.attachLinkElement(c,u)},cssCaptured:p});i&&(t.push({parentId:o,nextId:l,node:i}),s.add(i.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const h of this.movedSet)ia(this.removesSubTreeCache,h)&&!this.movedSet.has($.parentNode(h))||a(h);for(const h of this.addedSet)!ra(this.droppedSet,h)&&!ia(this.removesSubTreeCache,h)||ra(this.movedSet,h)?a(h):this.droppedSet.add(h);let d=null;for(;n.length;){let h=null;if(d){const m=this.mirror.getId($.parentNode(d.value)),p=r(d.value);m!==-1&&p!==-1&&(h=d)}if(!h){let m=n.tail;for(;m;){const p=m;if(m=m.previous,p){const o=this.mirror.getId($.parentNode(p.value));if(r(p.value)===-1)continue;if(o!==-1){h=p;break}else{const l=p.value,i=$.parentNode(l);if(i&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const c=$.host(i);if(this.mirror.getId(c)!==-1){h=p;break}}}}}}if(!h){for(;n.head;)n.removeNode(n.head.value);break}d=h.previous,n.removeNode(h.value),a(h.value)}const f={texts:this.texts.map(h=>{var m,p;const o=h.node,l=$.parentNode(o);l&&l.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(l);let i=h.value;const c=this.privacySetting==="strict",u=this.privacySetting==="default"&&co(i),b=(p=(m=h.node)==null?void 0:m.parentElement)==null?void 0:p.getAttribute("data-hl-record");return(c||u)&&!b&&i&&(i=Sn(i)),{id:this.mirror.getId(o),value:i}}).filter(h=>!s.has(h.id)).filter(h=>this.mirror.has(h.id)),attributes:this.attributes.map(h=>{const{attributes:m}=h;if(typeof m.style=="string"){const p=JSON.stringify(h.styleDiff),o=JSON.stringify(h._unchangedStyles);p.length<m.style.length&&(p+o).split("var(").length===m.style.split("var(").length&&(m.style=h.styleDiff)}return{id:this.mirror.getId(h.node),attributes:m}}).filter(h=>!s.has(h.id)).filter(h=>this.mirror.has(h.id)),removes:this.removes,adds:t};!f.texts.length&&!f.attributes.length&&!f.removes.length&&!f.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(f))}),L(this,"genTextAreaValueMutation",t=>{let s=this.attributeMap.get(t);s||(s={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t,s));const n=Array.from($.childNodes(t),r=>$.textContent(r)||"").join("");s.attributes.value=ms({overwriteRecord:null,element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:fs(t),value:n,maskInputFn:this.maskInputFn})}),L(this,"processMutation",t=>{if(!Ki(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const s=$.textContent(t.target);!Se(t.target,this.blockClass,this.blockSelector,!1)&&s!==t.oldValue&&this.texts.push({value:go(t.target,this.maskTextClass,this.maskTextSelector,!0)&&s?this.maskTextFn?this.maskTextFn(s,jl(t.target)):s.replace(/[\S]/g,"*"):s,node:t.target});break}case"attributes":{const s=t.target;let n=t.attributeName,r=t.target.getAttribute(n);if(n==="value"){const d=fs(s);r=ms({element:s,maskInputOptions:this.maskInputOptions,tagName:s.tagName,type:d,value:r,overwriteRecord:s.getAttribute("data-hl-record"),maskInputFn:this.maskInputFn})}if(Se(t.target,this.blockClass,this.blockSelector,!1)||r===t.oldValue)return;let a=this.attributeMap.get(t.target);if(s.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(r))if(!s.contentDocument)n="rr_src";else return;if(a||(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(t.target,a)),n==="type"&&s.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&s.setAttribute("data-rr-is-password","true"),!bo(s.tagName,n)){if(t.target.tagName==="INPUT"){const d=t.target;if(d.type==="password"){a.attributes.value="*".repeat(d.value.length);break}}if(a.attributes[n]=fo(this.doc,nt(s.tagName),nt(n),r),n==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const d=this.unattachedDoc.createElement("span");t.oldValue&&d.setAttribute("style",t.oldValue);for(const f of Array.from(s.style)){const h=s.style.getPropertyValue(f),m=s.style.getPropertyPriority(f);h!==d.style.getPropertyValue(f)||m!==d.style.getPropertyPriority(f)?m===""?a.styleDiff[f]=h:a.styleDiff[f]=[h,m]:a._unchangedStyles[f]=[h,m]}for(const f of Array.from(d.style))s.style.getPropertyValue(f)===""&&(a.styleDiff[f]=!1)}else n==="open"&&s.tagName==="DIALOG"&&(s.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal")}break}case"childList":{if(Se(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(s=>this.genAdds(s,t.target)),t.removedNodes.forEach(s=>{const n=this.mirror.getId(s),r=xt(t.target)?this.mirror.getId($.host(t.target)):this.mirror.getId(t.target);Se(t.target,this.blockClass,this.blockSelector,!1)||Ki(s,this.mirror,this.slimDOMOptions)||!ip(s,this.mirror)||(this.addedSet.has(s)?(Hi(this.addedSet,s),this.droppedSet.add(s)):this.addedSet.has(t.target)&&n===-1||Al(t.target,this.mirror)||(this.movedSet.has(s)&&this.movedMap[na(n,r)]?Hi(this.movedSet,s):(this.removes.push({parentId:r,id:n,isShadow:xt(t.target)&&Tt(t.target)?!0:void 0}),dp(s,this.removesSubTreeCache))),this.mapRemoves.push(s))});break}}}),L(this,"genAdds",(t,s)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Ki(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let n=null;s&&this.mirror.hasNode(s)&&(n=this.mirror.getId(s)),n&&n!==-1&&(this.movedMap[na(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Se(t,this.blockClass,this.blockSelector,!1)||($.childNodes(t).forEach(n=>this.genAdds(n)),zi(t)&&$.childNodes($.shadowRoot(t)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","inlineVideos","privacySetting","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(s=>{this[s]=t[s]})}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()}}function Hi(e,t){e.delete(t),$.childNodes(t).forEach(s=>Hi(e,s))}function dp(e,t){const s=[e];for(;s.length;){const n=s.pop();t.has(n)||(t.add(n),$.childNodes(n).forEach(r=>s.push(r)))}}function ia(e,t,s){return e.size===0?!1:hp(e,t)}function hp(e,t,s){const n=$.parentNode(t);return n?e.has(n):!1}function ra(e,t){return e.size===0?!1:oa(e,t)}function oa(e,t){const s=$.parentNode(t);return s?e.has(s)?!0:oa(e,s):!1}let Ft;function pp(e){Ft=e}function mp(){Ft=void 0}const se=e=>Ft?(...t)=>{try{return e(...t)}catch(s){if(Ft&&Ft(s)===!0)return;throw s}}:e,rt=[];function Mt(e){try{if("composedPath"in e){const 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 la(e,t){const s=new up;rt.push(s),s.init(e);const[n,r]=Hl(),a=new n(se(s.processMutations.bind(s)));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[a,r]}function fp({mousemoveCb:e,sampling:t,doc:s,mirror:n}){if(t.mousemove===!1)return()=>{};const r=typeof t.mousemove=="number"?t.mousemove:50,a=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let d=[],f;const h=Ut(se(o=>{const l=Date.now()-f;e(d.map(i=>(i.timeOffset-=l,i)),o),d=[],f=null}),a),m=se(Ut(se(o=>{const l=Mt(o),{clientX:i,clientY:c}=Ei(o)?o.changedTouches[0]:o;f||(f=Yt()),d.push({x:i,y:c,id:n.getId(l),timeOffset:Yt()-f}),h(typeof DragEvent<"u"&&o instanceof DragEvent?te.Drag:o instanceof MouseEvent?te.MouseMove:te.TouchMove)}),r,{trailing:!1})),p=[Ge("mousemove",m,s),Ge("touchmove",m,s),Ge("drag",m,s)];return se(()=>{p.forEach(o=>o())})}function bp({mouseInteractionCb:e,doc:t,mirror:s,blockClass:n,blockSelector:r,sampling:a}){if(a.mouseInteraction===!1)return()=>{};const d=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,f=[];let h=null;const m=p=>o=>{const l=Mt(o);if(Se(l,n,r,!0)||np(l))return;let i=null,c=p;if("pointerType"in o){switch(o.pointerType){case"mouse":i=_e.Mouse;break;case"touch":i=_e.Touch;break;case"pen":i=_e.Pen;break}i===_e.Touch&&(ke[p]===ke.MouseDown?c="TouchStart":ke[p]===ke.MouseUp&&(c="TouchEnd"))}else Ei(o)&&(i=_e.Touch);i!==null?(h=i,(c.startsWith("Touch")&&i===_e.Touch||c.startsWith("Mouse")&&i===_e.Mouse)&&(i=null)):ke[p]===ke.Click&&(i=h,h=null);const u=Ei(o)?o.changedTouches[0]:o;if(!u)return;const b=s.getId(l),{clientX:S,clientY:Z}=u;se(e)(z({type:ke[c],id:b,x:S,y:Z},i!==null&&{pointerType:i}))};return Object.keys(ke).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&d[p]!==!1).forEach(p=>{let o=nt(p);const l=m(p);if(window.PointerEvent)switch(ke[p]){case ke.MouseDown:case ke.MouseUp:o=o.replace("mouse","pointer");break;case ke.TouchStart:case ke.TouchEnd:return}f.push(Ge(o,l,t))}),se(()=>{f.forEach(p=>p())})}function aa({scrollCb:e,doc:t,mirror:s,blockClass:n,blockSelector:r,sampling:a}){const d=se(Ut(se(f=>{const h=Mt(f);if(!h||Se(h,n,r,!0))return;const m=s.getId(h);if(h===t&&t.defaultView){const p=Dl(t.defaultView);e({id:m,x:p.left,y:p.top})}else e({id:m,x:h.scrollLeft,y:h.scrollTop})}),a.scroll||100));return Ge("scroll",d,t)}function yp({viewportResizeCb:e},{win:t}){let s=-1,n=-1;const r=se(Ut(se(()=>{const a=Bl(),d=Ql();(s!==a||n!==d)&&(e({width:Number(d),height:Number(a)}),s=a,n=d)}),200));return Ge("resize",r,t)}const gp=["INPUT","TEXTAREA","SELECT"],ca=new WeakMap;function Zp({inputCb:e,doc:t,mirror:s,blockClass:n,blockSelector:r,ignoreClass:a,ignoreSelector:d,maskInputOptions:f,maskInputFn:h,sampling:m,userTriggeredOnInput:p}){function o(S){let Z=Mt(S);const I=S.isTrusted,R=Z&&Z.tagName;if(Z&&R==="OPTION"&&(Z=$.parentElement(Z)),!Z||!R||gp.indexOf(R)<0||Se(Z,n,r,!0)||Z.classList.contains(a)||d&&Z.matches(d))return;let y=Z.value,g=!1;const X=fs(Z)||"",v=Z.getAttribute("data-hl-record");X==="radio"||X==="checkbox"?g=Z.checked:uo({maskInputOptions:f,type:X,tagName:R,overwriteRecord:v})&&(y=ms({element:Z,maskInputOptions:f,tagName:R,type:X,value:y,overwriteRecord:v,maskInputFn:h})),l(Z,p?{text:y,isChecked:g,userTriggered:I}:{text:y,isChecked:g});const V=Z.name;X==="radio"&&V&&g&&t.querySelectorAll(`input[type="radio"][name="${V}"]`).forEach(W=>{if(W!==Z){const k=W.value;l(W,p?{text:k,isChecked:!g,userTriggered:!1}:{text:k,isChecked:!g})}})}function l(S,Z){const I=ca.get(S);if(!I||I.text!==Z.text||I.isChecked!==Z.isChecked){ca.set(S,Z);const R=s.getId(S);se(e)(ge(z({},Z),{id:R}))}}const i=(m.input==="last"?["change"]:["input","change"]).map(S=>Ge(S,se(o),t)),c=t.defaultView;if(!c)return()=>{i.forEach(S=>S())};const u=c.Object.getOwnPropertyDescriptor(c.HTMLInputElement.prototype,"value"),b=[[c.HTMLInputElement.prototype,"value"],[c.HTMLInputElement.prototype,"checked"],[c.HTMLSelectElement.prototype,"value"],[c.HTMLTextAreaElement.prototype,"value"],[c.HTMLSelectElement.prototype,"selectedIndex"],[c.HTMLOptionElement.prototype,"selected"]];return u&&u.set&&i.push(...b.map(S=>Ys(S[0],S[1],{set(){se(o)({target:this,isTrusted:!1})}},!1,c))),se(()=>{i.forEach(S=>S())})}function Us(e){const t=[];function s(n,r){if(Fs("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||Fs("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||Fs("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||Fs("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){const a=Array.from(n.parentRule.cssRules).indexOf(n);return r.unshift(a),s(n.parentRule,r)}else if(n.parentStyleSheet){const a=Array.from(n.parentStyleSheet.cssRules).indexOf(n);r.unshift(a)}return r}return s(e,t)}function $e(e,t,s){let n,r;return e?(e.ownerNode?n=t.getId(e.ownerNode):r=s.getId(e),{styleId:r,id:n}):{}}function qe(e,t,s,n){e[t]===s&&(e[t]=n)}const Sp=5;function Ip({styleSheetRuleCb:e,mirror:t,stylesheetManager:s,doc:n,styleSheetResyncInterval:r},{win:a}){if(!a.CSSStyleSheet||!a.CSSStyleSheet.prototype)return()=>{};const d=new WeakMap,f=new WeakSet;let h=!1,m=!1,p=!1,o,l=!1,i=!1,c=!1;const u=(J,K)=>{const O=d.get(J);O&&(O.reported=Math.max(0,O.reported+K),O.everSeen=Math.max(O.everSeen,O.reported))},b=J=>new Proxy(J,{apply:se((K,O,H)=>{if(h)return m=!0,K.apply(O,H);if(l||i)return K.apply(O,H);const[j,ee]=H,{id:A,styleId:P}=$e(O,t,s.styleMirror),re=A&&A!==-1||P&&P!==-1;re&&e({id:A,styleId:P,adds:[{rule:j,index:ee}]}),i=!0;let We;try{We=K.apply(O,H)}finally{i=!1}return re&&u(O,1),We})}),S=J=>new Proxy(J,{apply:se((K,O,H)=>{if(h)return p=!0,K.apply(O,H);if(l||c)return K.apply(O,H);const[j]=H,{id:ee,styleId:A}=$e(O,t,s.styleMirror),P=ee&&ee!==-1||A&&A!==-1;P&&e({id:ee,styleId:A,removes:[{index:j}]}),c=!0;let re;try{re=K.apply(O,H)}finally{c=!1}return P&&u(O,-1),re})}),Z=a.CSSStyleSheet.prototype.insertRule;let I=b(Z),R=Z;a.CSSStyleSheet.prototype.insertRule=I;const y=a.CSSStyleSheet.prototype.addRule,g=function(J,K,O=this.cssRules.length){const H=`${J} { ${K} }`;return a.CSSStyleSheet.prototype.insertRule.apply(this,[H,O])};a.CSSStyleSheet.prototype.addRule=g;const X=a.CSSStyleSheet.prototype.deleteRule;let v=S(X),V=X;a.CSSStyleSheet.prototype.deleteRule=v;const W=a.CSSStyleSheet.prototype.removeRule,k=function(J){return a.CSSStyleSheet.prototype.deleteRule.apply(this,[J])};a.CSSStyleSheet.prototype.removeRule=k;let N,D;a.CSSStyleSheet.prototype.replace&&(N=a.CSSStyleSheet.prototype.replace,D=new Proxy(N,{apply:se((J,K,O)=>{if(l)return J.apply(K,O);const[H]=O,{id:j,styleId:ee}=$e(K,t,s.styleMirror);return(j&&j!==-1||ee&&ee!==-1)&&e({id:j,styleId:ee,replace:H}),J.apply(K,O)})}),a.CSSStyleSheet.prototype.replace=D);let G,w;a.CSSStyleSheet.prototype.replaceSync&&(G=a.CSSStyleSheet.prototype.replaceSync,w=new Proxy(G,{apply:se((J,K,O)=>{if(l)return J.apply(K,O);const[H]=O,{id:j,styleId:ee}=$e(K,t,s.styleMirror);return(j&&j!==-1||ee&&ee!==-1)&&e({id:j,styleId:ee,replaceSync:H}),J.apply(K,O)})}),a.CSSStyleSheet.prototype.replaceSync=w);const T={};Ms("CSSGroupingRule")?T.CSSGroupingRule=a.CSSGroupingRule:(Ms("CSSMediaRule")&&(T.CSSMediaRule=a.CSSMediaRule),Ms("CSSConditionRule")&&(T.CSSConditionRule=a.CSSConditionRule),Ms("CSSSupportsRule")&&(T.CSSSupportsRule=a.CSSSupportsRule));const Y={},M={};Object.entries(T).forEach(([J,K])=>{Y[J]={insertRule:K.prototype.insertRule,deleteRule:K.prototype.deleteRule},M[J]={},M[J].insertRule=new Proxy(Y[J].insertRule,{apply:se((O,H,j)=>{if(l)return O.apply(H,j);const[ee,A]=j,{id:P,styleId:re}=$e(H.parentStyleSheet,t,s.styleMirror);return(P&&P!==-1||re&&re!==-1)&&e({id:P,styleId:re,adds:[{rule:ee,index:[...Us(H),A||0]}]}),O.apply(H,j)})}),M[J].deleteRule=new Proxy(Y[J].deleteRule,{apply:se((O,H,j)=>{if(l)return O.apply(H,j);const[ee]=j,{id:A,styleId:P}=$e(H.parentStyleSheet,t,s.styleMirror);return(A&&A!==-1||P&&P!==-1)&&e({id:A,styleId:P,removes:[{index:[...Us(H),ee]}]}),O.apply(H,j)})}),K.prototype.insertRule=M[J].insertRule,K.prototype.deleteRule=M[J].deleteRule});const U=()=>{h=!0,m=!1,p=!1;try{const J=o??(o=new a.CSSStyleSheet);J.insertRule(":root {}",0),J.deleteRule(0)}catch{return{insertRule:a.CSSStyleSheet.prototype.insertRule===I,deleteRule:a.CSSStyleSheet.prototype.deleteRule===v}}finally{h=!1}return{insertRule:m,deleteRule:p}};let _=0;const B=J=>{_>=Sp||(_+=1,J.insertRule||(R=a.CSSStyleSheet.prototype.insertRule,I=b(R),a.CSSStyleSheet.prototype.insertRule=I),J.deleteRule||(V=a.CSSStyleSheet.prototype.deleteRule,v=S(V),a.CSSStyleSheet.prototype.deleteRule=v))},C=J=>{for(let K=0;K<n.styleSheets.length;K++){const O=n.styleSheets[K];if(f.has(O))continue;const H=O.ownerNode;if(!H||nt(H.nodeName)!=="style"||(H.textContent||"").trim().length)continue;const j=t.getId(H);if(!j||j===-1)continue;let ee;try{ee=O.cssRules}catch{continue}const A=ee.length;let P=d.get(O);if(!P){if(Array.from(ee).some(re=>ro(re))){f.add(O);continue}if(P={reported:A,everSeen:A},d.set(O,P),J)continue;le(j,P,ee);continue}if(P.everSeen=Math.max(P.everSeen,A),A!==P.reported)if(A>P.reported){const re=[];for(let We=P.reported;We<A;We++)re.push({rule:ee[We].cssText,index:We});e({id:j,adds:re}),P.reported=A}else le(j,P,ee)}};function le(J,K,O){const H=[];for(let j=K.everSeen-1;j>=0;j--)H.push({index:j});H.length&&e({id:J,removes:H}),e({id:J,adds:Array.from(O,(j,ee)=>({rule:j.cssText,index:ee}))}),K.reported=O.length,K.everSeen=O.length}let ae;return r>0&&(ae=a.setInterval(se(()=>{const J=U(),K=J.insertRule&&J.deleteRule;K||B(J),C(K)}),r)),se(()=>{ae!==void 0&&a.clearInterval(ae),l=!0;const J=a.CSSStyleSheet.prototype;qe(J,"insertRule",I,R),qe(J,"deleteRule",v,V),qe(J,"addRule",g,y),qe(J,"removeRule",k,W),D&&qe(J,"replace",D,N),w&&qe(J,"replaceSync",w,G),Object.entries(T).forEach(([K,O])=>{qe(O.prototype,"insertRule",M[K].insertRule,Y[K].insertRule),qe(O.prototype,"deleteRule",M[K].deleteRule,Y[K].deleteRule)})})}function ua({mirror:e,stylesheetManager:t},s){var n,r,a;let d=null;s.nodeName==="#document"?d=e.getId(s):d=e.getId($.host(s));const f=s.nodeName==="#document"?(n=s.defaultView)==null?void 0:n.Document:(a=(r=s.ownerDocument)==null?void 0:r.defaultView)==null?void 0:a.ShadowRoot,h=f!=null&&f.prototype?Object.getOwnPropertyDescriptor(f?.prototype,"adoptedStyleSheets"):void 0;return d===null||d===-1||!f||!h?()=>{}:(Object.defineProperty(s,"adoptedStyleSheets",{configurable:h.configurable,enumerable:h.enumerable,get(){var m;return(m=h.get)==null?void 0:m.call(this)},set(m){var p;const o=(p=h.set)==null?void 0:p.call(this,m);if(d!==null&&d!==-1)try{t.adoptStyleSheets(m,d)}catch{}return o}}),se(()=>{Object.defineProperty(s,"adoptedStyleSheets",{configurable:h.configurable,enumerable:h.enumerable,get:h.get,set:h.set})}))}function Xp({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:s,stylesheetManager:n},{win:r}){const a=r.CSSStyleDeclaration.prototype.setProperty;r.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:se((f,h,m)=>{var p;const[o,l,i]=m;if(s.has(o))return a.apply(h,[o,l,i]);const{id:c,styleId:u}=$e((p=h.parentRule)==null?void 0:p.parentStyleSheet,t,n.styleMirror);return(c&&c!==-1||u&&u!==-1)&&e({id:c,styleId:u,set:{property:o,value:l,priority:i},index:Us(h.parentRule)}),f.apply(h,m)})});const d=r.CSSStyleDeclaration.prototype.removeProperty;return r.CSSStyleDeclaration.prototype.removeProperty=new Proxy(d,{apply:se((f,h,m)=>{var p;const[o]=m;if(s.has(o))return d.apply(h,[o]);const{id:l,styleId:i}=$e((p=h.parentRule)==null?void 0:p.parentStyleSheet,t,n.styleMirror);return(l&&l!==-1||i&&i!==-1)&&e({id:l,styleId:i,remove:{property:o},index:Us(h.parentRule)}),f.apply(h,m)})}),se(()=>{r.CSSStyleDeclaration.prototype.setProperty=a,r.CSSStyleDeclaration.prototype.removeProperty=d})}function Vp({mediaInteractionCb:e,blockClass:t,blockSelector:s,mirror:n,sampling:r,doc:a}){const d=se(h=>Ut(se(m=>{const p=Mt(m);if(!p||Se(p,t,s,!0))return;const{currentTime:o,volume:l,muted:i,playbackRate:c,loop:u}=p;e({type:h,id:n.getId(p),currentTime:o,volume:l,muted:i,playbackRate:c,loop:u})}),r.media||500)),f=[Ge("play",d(St.Play),a),Ge("pause",d(St.Pause),a),Ge("seeked",d(St.Seeked),a),Ge("volumechange",d(St.VolumeChange),a),Ge("ratechange",d(St.RateChange),a)];return se(()=>{f.forEach(h=>h())})}function Gp({fontCb:e,doc:t}){const s=t.defaultView;if(!s)return()=>{};const n=[],r=new WeakMap,a=s.FontFace;s.FontFace=function(f,h,m){const p=new a(f,h,m);return r.set(p,{family:f,buffer:typeof h!="string",descriptors:m,fontSource:typeof h=="string"?h:JSON.stringify(Array.from(new Uint8Array(h)))}),p};const d=it(t.fonts,"add",function(f){return function(h){return setTimeout(se(()=>{const m=r.get(h);m&&(e(m),r.delete(h))}),0),f.apply(this,[h])}});return n.push(()=>{s.FontFace=a}),n.push(d),se(()=>{n.forEach(f=>f())})}function Rp(e){const{doc:t,mirror:s,blockClass:n,blockSelector:r,selectionCb:a}=e;let d=!0;const f=se(()=>{const h=t.getSelection();if(!h||d&&h!=null&&h.isCollapsed)return;d=h.isCollapsed||!1;const m=[],p=h.rangeCount||0;for(let o=0;o<p;o++){const l=h.getRangeAt(o),{startContainer:i,startOffset:c,endContainer:u,endOffset:b}=l;Se(i,n,r,!0)||Se(u,n,r,!0)||m.push({start:s.getId(i),startOffset:c,end:s.getId(u),endOffset:b})}a({ranges:m})});return f(),Ge("selectionchange",f)}function vp({doc:e,customElementCb:t}){const s=e.defaultView;return!s||!s.customElements?()=>{}:it(s.customElements,"define",function(n){return function(r,a,d){try{t({define:{name:r}})}catch{console.warn(`Custom element callback failed for ${r}`)}return n.apply(this,[r,a,d])}})}function Wp(e,t){const{mutationCb:s,mousemoveCb:n,mouseInteractionCb:r,scrollCb:a,viewportResizeCb:d,inputCb:f,mediaInteractionCb:h,styleSheetRuleCb:m,styleDeclarationCb:p,canvasMutationCb:o,fontCb:l,selectionCb:i,customElementCb:c}=e;e.mutationCb=(...u)=>{t.mutation&&t.mutation(...u),s(...u)},e.mousemoveCb=(...u)=>{t.mousemove&&t.mousemove(...u),n(...u)},e.mouseInteractionCb=(...u)=>{t.mouseInteraction&&t.mouseInteraction(...u),r(...u)},e.scrollCb=(...u)=>{t.scroll&&t.scroll(...u),a(...u)},e.viewportResizeCb=(...u)=>{t.viewportResize&&t.viewportResize(...u),d(...u)},e.inputCb=(...u)=>{t.input&&t.input(...u),f(...u)},e.mediaInteractionCb=(...u)=>{t.mediaInteaction&&t.mediaInteaction(...u),h(...u)},e.styleSheetRuleCb=(...u)=>{t.styleSheetRule&&t.styleSheetRule(...u),m(...u)},e.styleDeclarationCb=(...u)=>{t.styleDeclaration&&t.styleDeclaration(...u),p(...u)},e.canvasMutationCb=(...u)=>{t.canvasMutation&&t.canvasMutation(...u),o(...u)},e.fontCb=(...u)=>{t.font&&t.font(...u),l(...u)},e.selectionCb=(...u)=>{t.selection&&t.selection(...u),i(...u)},e.customElementCb=(...u)=>{t.customElement&&t.customElement(...u),c(...u)}}function wp(e,t={}){const s=e.doc.defaultView;if(!s)return()=>{};Wp(e,t);let n,r=()=>{};e.recordDOM&&([n,r]=la(e,e.doc));const a=fp(e),d=bp(e),f=aa(e),h=yp(e,{win:s}),m=Zp(e),p=Vp(e);let o=()=>{},l=()=>{},i=()=>{},c=()=>{};e.recordDOM&&(o=Ip(e,{win:s}),l=ua(e,e.doc),i=Xp(e,{win:s}),e.collectFonts&&(c=Gp(e)));const u=Rp(e),b=vp(e),S=[];for(const Z of e.plugins)S.push(Z.observer(Z.callback,s,Z.options));return se(()=>{rt.forEach(Z=>Z.reset()),n?.disconnect(),r(),a(),d(),f(),h(),m(),p(),o(),l(),i(),c(),u(),b(),S.forEach(Z=>Z())})}function Fs(e){return typeof window[e]<"u"}function Ms(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class da{constructor(t){L(this,"iframeIdToRemoteIdMap",new WeakMap),L(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,s,n,r){const a=n||this.getIdToRemoteIdMap(t),d=r||this.getRemoteIdToIdMap(t);let f=a.get(s);return f||(f=this.generateIdFn(),a.set(s,f),d.set(f,s)),f}getIds(t,s){const n=this.getIdToRemoteIdMap(t),r=this.getRemoteIdToIdMap(t);return s.map(a=>this.getId(t,a,n,r))}getRemoteId(t,s,n){const r=n||this.getRemoteIdToIdMap(t);return typeof s!="number"?s:r.get(s)||-1}getRemoteIds(t,s){const n=this.getRemoteIdToIdMap(t);return s.map(r=>this.getRemoteId(t,r,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 s=this.iframeIdToRemoteIdMap.get(t);return s||(s=new Map,this.iframeIdToRemoteIdMap.set(t,s)),s}getRemoteIdToIdMap(t){let s=this.iframeRemoteIdToIdMap.get(t);return s||(s=new Map,this.iframeRemoteIdToIdMap.set(t,s)),s}}class kp{constructor(t){L(this,"iframes",new WeakMap),L(this,"crossOriginIframeMap",new WeakMap),L(this,"crossOriginIframeMirror",new da(ho)),L(this,"crossOriginIframeStyleMirror"),L(this,"crossOriginIframeRootIdMap",new WeakMap),L(this,"mirror"),L(this,"mutationCb"),L(this,"wrappedEmit"),L(this,"loadListener"),L(this,"stylesheetManager"),L(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new da(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,s){var n,r;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:s}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((n=t.contentWindow)==null||n.addEventListener("message",this.handleMessage.bind(this))),(r=this.loadListener)==null||r.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){const s=t;if(s.data.type!=="rrweb"||s.origin!==s.data.origin)return;const n=t.source;if(!n)return;const r=this.crossOriginIframeMap.get(n);if(!r)return;const a=this.transformCrossOriginEvent(r,s.data.event);a&&this.wrappedEmit(a,s.data.isCheckout)}transformCrossOriginEvent(t,s){var n;switch(s.type){case ie.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(s.data.node,t);const r=s.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(s.data.node,r),{timestamp:s.timestamp,type:ie.IncrementalSnapshot,data:{source:te.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:s.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ie.Meta:case ie.Load:case ie.DomContentLoaded:return!1;case ie.Plugin:return s;case ie.Custom:return this.replaceIds(s.data.payload,t,["id","parentId","previousId","nextId"]),s;case ie.IncrementalSnapshot:switch(s.data.source){case te.Mutation:return s.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const a=this.crossOriginIframeRootIdMap.get(t);a&&this.patchRootIdOnNode(r.node,a)}),s.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),s.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),s.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),s;case te.Drag:case te.TouchMove:case te.MouseMove:return s.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),s;case te.ViewportResize:return!1;case te.MediaInteraction:case te.MouseInteraction:case te.Scroll:case te.CanvasMutation:case te.Input:return this.replaceIds(s.data,t,["id"]),s;case te.StyleSheetRule:case te.StyleDeclaration:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleId"]),s;case te.Font:return s;case te.Selection:return s.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),s;case te.AdoptedStyleSheet:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleIds"]),(n=s.data.styles)==null||n.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),s}}return!1}replace(t,s,n,r){for(const a of r)!Array.isArray(s[a])&&typeof s[a]!="number"||(Array.isArray(s[a])?s[a]=t.getIds(n,s[a]):s[a]=t.getId(n,s[a]));return s}replaceIds(t,s,n){return this.replace(this.crossOriginIframeMirror,t,s,n)}replaceStyleIds(t,s,n){return this.replace(this.crossOriginIframeStyleMirror,t,s,n)}replaceIdOnNode(t,s){this.replaceIds(t,s,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,s)})}patchRootIdOnNode(t,s){t.type!==ta.Document&&!t.rootId&&(t.rootId=s),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,s)})}}class Cp{constructor(t){L(this,"shadowDoms",new WeakSet),L(this,"mutationCb"),L(this,"scrollCb"),L(this,"bypassOptions"),L(this,"mirror"),L(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,s){if(!Tt(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const[n]=la(ge(z({},this.bypassOptions),{doc:s,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(aa(ge(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($.host(t))),this.restoreHandlers.push(ua({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,s){const n=this;this.restoreHandlers.push(it(t.prototype,"attachShadow",function(r){return function(a){const d=r.call(this,a),f=$.shadowRoot(this);return f&&ea(this)&&n.addShadowRoot(f,s),d}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var It="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xp=typeof Uint8Array>"u"?[]:new Uint8Array(256),Os=0;Os<It.length;Os++)xp[It.charCodeAt(Os)]=Os;var Tp=function(e){var t=new Uint8Array(e),s,n=t.length,r="";for(s=0;s<n;s+=3)r+=It[t[s]>>2],r+=It[(t[s]&3)<<4|t[s+1]>>4],r+=It[(t[s+1]&15)<<2|t[s+2]>>6],r+=It[t[s+2]&63];return n%3===2?r=r.substring(0,r.length-1)+"=":n%3===1&&(r=r.substring(0,r.length-2)+"=="),r};const ha=new Map;function Lp(e,t){let s=ha.get(e);return s||(s=new Map,ha.set(e,s)),s.has(t)||s.set(t,[]),s.get(t)}const pa=(e,t,s)=>{if(!e||!(fa(e,t)||typeof e=="object"))return;const n=e.constructor.name,r=Lp(s,n);let a=r.indexOf(e);return a===-1&&(a=r.length,r.push(e)),a};function Ks(e,t,s){if(e instanceof Array)return e.map(n=>Ks(n,t,s));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){const n=e.constructor.name,r=Tp(e);return{rr_type:n,base64:r}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Ks(e.buffer,t,s),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const n=e.constructor.name,{src:r}=e;return{rr_type:n,src:r}}else if(e instanceof HTMLCanvasElement){const n="HTMLImageElement",r=e.toDataURL();return{rr_type:n,src:r}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Ks(e.data,t,s),e.width,e.height]};if(fa(e,t)||typeof e=="object"){const n=e.constructor.name,r=pa(e,t,s);return{rr_type:n,index:r}}}}return e}const ma=(e,t,s)=>e.map(n=>Ks(n,t,s)),fa=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof t[s]=="function").find(s=>e instanceof t[s]);function Np(e,t,s,n){const r=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const d of a)try{if(typeof t.CanvasRenderingContext2D.prototype[d]!="function")continue;const f=it(t.CanvasRenderingContext2D.prototype,d,function(h){return function(...m){return Se(this.canvas,s,n,!0)||setTimeout(()=>{const p=ma(m,t,this);e(this.canvas,{type:Zt["2D"],property:d,args:p})},0),h.apply(this,m)}});r.push(f)}catch{const h=Ys(t.CanvasRenderingContext2D.prototype,d,{set(m){e(this.canvas,{type:Zt["2D"],property:d,args:[m],setter:!0})}});r.push(h)}return()=>{r.forEach(d=>d())}}function Jp(e){return e==="experimental-webgl"?"webgl":e}function ba(e,t,s,n){const r=[];try{const a=it(e.HTMLCanvasElement.prototype,"getContext",function(d){return function(f,...h){if(!Se(this,t,s,!0)){const m=Jp(f);if("__context"in this||(this.__context=m),n&&["webgl","webgl2"].includes(m))if(h[0]&&typeof h[0]=="object"){const p=h[0];p.preserveDrawingBuffer||(p.preserveDrawingBuffer=!0)}else h.splice(0,1,{preserveDrawingBuffer:!0})}return d.apply(this,[f,...h])}});r.push(a)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach(a=>a())}}function ya(e,t,s,n,r,a){const d=[],f=Object.getOwnPropertyNames(e);for(const h of f)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))try{if(typeof e[h]!="function")continue;const m=it(e,h,function(p){return function(...o){const l=p.apply(this,o);if(pa(l,a,this),"tagName"in this.canvas&&!Se(this.canvas,n,r,!0)){const i=ma(o,a,this),c={type:t,property:h,args:i};s(this.canvas,c)}return l}});d.push(m)}catch{const p=Ys(e,h,{set(o){s(this.canvas,{type:t,property:h,args:[o],setter:!0})}});d.push(p)}return d}function Yp(e,t,s,n){const r=[];return typeof t.WebGLRenderingContext<"u"&&r.push(...ya(t.WebGLRenderingContext.prototype,Zt.WebGL,e,s,n,t)),typeof t.WebGL2RenderingContext<"u"&&r.push(...ya(t.WebGL2RenderingContext.prototype,Zt.WebGL2,e,s,n,t)),()=>{r.forEach(a=>a())}}const ga=`(function() {
352
+ or you can use record.mirror to access the mirror instance during recording.`;let Pl={map:{},getId(){return console.error(gt),-1},getNode(){return console.error(gt),null},removeNodeFromMap(){console.error(gt)},has(){return console.error(gt),!1},reset(){console.error(gt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Pl=new Proxy(Pl,{get(e,t,s){return t==="map"&&console.error(gt),Reflect.get(e,t,s)}}));function Ut(e,t,s={}){let n=null,r=0;return function(...l){const d=Date.now();!r&&s.leading===!1&&(r=d);const f=t-(d-r),h=this;f<=0||f>t?(n&&(clearTimeout(n),n=null),r=d,e.apply(h,l)):!n&&s.trailing!==!1&&(n=setTimeout(()=>{r=s.leading===!1?0:Date.now(),n=null,e.apply(h,l)},f))}}function Ys(e,t,s,n,r=window){const l=r.Object.getOwnPropertyDescriptor(e,t);return r.Object.defineProperty(e,t,n?s:{set(d){setTimeout(()=>{s.set.call(this,d)},0),l&&l.set&&l.set.call(this,d)}}),()=>Ys(e,t,l||{},!0)}function Dl(e){var t,s,n,r;const l=e.document;return{left:l.scrollingElement?l.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:l.documentElement.scrollLeft||l?.body&&((t=$.parentElement(l.body))==null?void 0:t.scrollLeft)||((s=l?.body)==null?void 0:s.scrollLeft)||0,top:l.scrollingElement?l.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:l?.documentElement.scrollTop||l?.body&&((n=$.parentElement(l.body))==null?void 0:n.scrollTop)||((r=l?.body)==null?void 0:r.scrollTop)||0}}function Bl(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ql(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function jl(e){return e?e.nodeType===e.ELEMENT_NODE?e:$.parentElement(e):null}const rp=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch{return!1}return!1};function Se(e,t,s,n){if(!e)return!1;const r=jl(e);if(!r)return!1;try{if(typeof t=="string"){if(r.classList.contains(t)||n&&r.closest("."+t)!==null)return!0}else if(Zs(r,t,n))return!0}catch{}return!!(s&&(r.matches(s)||n&&r.closest(s)!==null))}function op(e,t){return t.getId(e)!==-1}function Ki(e,t,s){return e.tagName==="TITLE"&&s.headTitleMutations?!0:t.getId(e)===Lt}function Al(e,t){if(xt(e))return!1;const s=t.getId(e);if(!t.has(s))return!0;const n=$.parentNode(e);return n&&n.nodeType===e.DOCUMENT_NODE?!1:n?Al(n,t):!0}function Ei(e){return!!e.changedTouches}function lp(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 _l(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function $l(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function zi(e){return e?e instanceof Ui&&"shadowRoot"in e?!!e.shadowRoot:!!$.shadowRoot(e):!1}class ap{constructor(){L(this,"id",1),L(this,"styleIDMap",new WeakMap),L(this,"idStyleMap",new Map)}getId(t){var s;return(s=this.styleIDMap.get(t))!=null?s:-1}has(t){return this.styleIDMap.has(t)}add(t,s){if(this.has(t))return this.getId(t);let n;return s===void 0?n=this.id++:n=s,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++}}function ql(e){var t;let s=null;return"getRootNode"in e&&((t=$.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&$.host($.getRootNode(e))&&(s=$.host($.getRootNode(e))),s}function cp(e){let t=e,s;for(;s=ql(t);)t=s;return t}function up(e){const t=$.ownerDocument(e);if(!t)return!1;const s=cp(e);return $.contains(t,s)}function ea(e){const t=$.ownerDocument(e);return t?$.contains(t,e)||up(e):!1}var ie=(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[e.Asset=7]="Asset",e))(ie||{}),te=(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))(te||{}),ke=(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))(ke||{}),_e=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(_e||{}),Zt=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Zt||{}),St=(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))(St||{}),ta=(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))(ta||{});function sa(e){return"__ln"in e}class dp{constructor(){L(this,"length",0),L(this,"head",null),L(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let s=this.head;for(let n=0;n<t;n++)s=s?.next||null;return s}addNode(t){const s={value:t,previous:null,next:null};if(t.__ln=s,t.previousSibling&&sa(t.previousSibling)){const n=t.previousSibling.__ln.next;s.next=n,s.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=s,n&&(n.previous=s)}else if(t.nextSibling&&sa(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;s.previous=n,s.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=s,n&&(n.next=s)}else this.head&&(this.head.previous=s),s.next=this.head,this.head=s;s.next===null&&(this.tail=s),this.length++}removeNode(t){const s=t.__ln;this.head&&(s.previous?(s.previous.next=s.next,s.next?s.next.previous=s.previous:this.tail=s.previous):(this.head=s.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const na=(e,t)=>`${e}@${t}`;class hp{constructor(){L(this,"frozen",!1),L(this,"locked",!1),L(this,"texts",[]),L(this,"attributes",[]),L(this,"attributeMap",new WeakMap),L(this,"removes",[]),L(this,"mapRemoves",[]),L(this,"movedMap",{}),L(this,"addedSet",new Set),L(this,"movedSet",new Set),L(this,"droppedSet",new Set),L(this,"removesSubTreeCache",new Set),L(this,"mutationCb"),L(this,"blockClass"),L(this,"blockSelector"),L(this,"maskTextClass"),L(this,"maskTextSelector"),L(this,"inlineStylesheet"),L(this,"maskInputOptions"),L(this,"maskTextFn"),L(this,"maskInputFn"),L(this,"keepIframeSrcFn"),L(this,"recordCanvas"),L(this,"inlineImages"),L(this,"inlineVideos"),L(this,"privacySetting"),L(this,"slimDOMOptions"),L(this,"dataURLOptions"),L(this,"doc"),L(this,"mirror"),L(this,"iframeManager"),L(this,"stylesheetManager"),L(this,"shadowDomManager"),L(this,"canvasManager"),L(this,"processedNodeManager"),L(this,"unattachedDoc"),L(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),L(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],s=new Set,n=new dp,r=h=>{let m=h,p=Lt;for(;p===Lt;)m=m&&m.nextSibling,p=m&&this.mirror.getId(m);return p},l=h=>{const m=$.parentNode(h);if(!m||!ea(h))return;let p=!1;if(h.nodeType===Node.TEXT_NODE){const c=m.tagName;if(c==="TEXTAREA")return;c==="STYLE"&&this.addedSet.has(m)&&(p=!0)}const o=xt(m)?this.mirror.getId(ql(h)):this.mirror.getId(m),a=r(h);if(o===-1||a===-1)return n.addNode(h);const i=yt(h,{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,inlineVideos:this.inlineVideos,privacySetting:this.privacySetting,onSerialize:c=>{_l(c,this.mirror)&&this.iframeManager.addIframe(c),$l(c,this.mirror)&&this.stylesheetManager.trackLinkElement(c),zi(h)&&this.shadowDomManager.addShadowRoot($.shadowRoot(h),this.doc)},onIframeLoad:(c,u)=>{this.iframeManager.attachIframe(c,u),this.shadowDomManager.observeAttachShadow(c)},onStylesheetLoad:(c,u)=>{this.stylesheetManager.attachLinkElement(c,u)},cssCaptured:p});i&&(t.push({parentId:o,nextId:a,node:i}),s.add(i.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const h of this.movedSet)ia(this.removesSubTreeCache,h)&&!this.movedSet.has($.parentNode(h))||l(h);for(const h of this.addedSet)!ra(this.droppedSet,h)&&!ia(this.removesSubTreeCache,h)||ra(this.movedSet,h)?l(h):this.droppedSet.add(h);let d=null;for(;n.length;){let h=null;if(d){const m=this.mirror.getId($.parentNode(d.value)),p=r(d.value);m!==-1&&p!==-1&&(h=d)}if(!h){let m=n.tail;for(;m;){const p=m;if(m=m.previous,p){const o=this.mirror.getId($.parentNode(p.value));if(r(p.value)===-1)continue;if(o!==-1){h=p;break}else{const a=p.value,i=$.parentNode(a);if(i&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const c=$.host(i);if(this.mirror.getId(c)!==-1){h=p;break}}}}}}if(!h){for(;n.head;)n.removeNode(n.head.value);break}d=h.previous,n.removeNode(h.value),l(h.value)}const f={texts:this.texts.map(h=>{var m,p;const o=h.node,a=$.parentNode(o);a&&a.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(a);let i=h.value;const c=this.privacySetting==="strict",u=this.privacySetting==="default"&&co(i),b=(p=(m=h.node)==null?void 0:m.parentElement)==null?void 0:p.getAttribute("data-hl-record");return(c||u)&&!b&&i&&(i=Sn(i)),{id:this.mirror.getId(o),value:i}}).filter(h=>!s.has(h.id)).filter(h=>this.mirror.has(h.id)),attributes:this.attributes.map(h=>{const{attributes:m}=h;if(typeof m.style=="string"){const p=JSON.stringify(h.styleDiff),o=JSON.stringify(h._unchangedStyles);p.length<m.style.length&&(p+o).split("var(").length===m.style.split("var(").length&&(m.style=h.styleDiff)}return{id:this.mirror.getId(h.node),attributes:m}}).filter(h=>!s.has(h.id)).filter(h=>this.mirror.has(h.id)),removes:this.removes,adds:t};!f.texts.length&&!f.attributes.length&&!f.removes.length&&!f.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(f))}),L(this,"genTextAreaValueMutation",t=>{let s=this.attributeMap.get(t);s||(s={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t,s));const n=Array.from($.childNodes(t),r=>$.textContent(r)||"").join("");s.attributes.value=ms({overwriteRecord:null,element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:fs(t),value:n,maskInputFn:this.maskInputFn})}),L(this,"processMutation",t=>{if(!Ki(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const s=$.textContent(t.target);!Se(t.target,this.blockClass,this.blockSelector,!1)&&s!==t.oldValue&&this.texts.push({value:go(t.target,this.maskTextClass,this.maskTextSelector,!0)&&s?this.maskTextFn?this.maskTextFn(s,jl(t.target)):s.replace(/[\S]/g,"*"):s,node:t.target});break}case"attributes":{const s=t.target;let n=t.attributeName,r=t.target.getAttribute(n);if(n==="value"){const d=fs(s);r=ms({element:s,maskInputOptions:this.maskInputOptions,tagName:s.tagName,type:d,value:r,overwriteRecord:s.getAttribute("data-hl-record"),maskInputFn:this.maskInputFn})}if(Se(t.target,this.blockClass,this.blockSelector,!1)||r===t.oldValue)return;let l=this.attributeMap.get(t.target);if(s.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(r))if(!s.contentDocument)n="rr_src";else return;if(l||(l={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(l),this.attributeMap.set(t.target,l)),n==="type"&&s.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&s.setAttribute("data-rr-is-password","true"),!bo(s.tagName,n)){if(t.target.tagName==="INPUT"){const d=t.target;if(d.type==="password"){l.attributes.value="*".repeat(d.value.length);break}}if(l.attributes[n]=fo(this.doc,nt(s.tagName),nt(n),r),n==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const d=this.unattachedDoc.createElement("span");t.oldValue&&d.setAttribute("style",t.oldValue);for(const f of Array.from(s.style)){const h=s.style.getPropertyValue(f),m=s.style.getPropertyPriority(f);h!==d.style.getPropertyValue(f)||m!==d.style.getPropertyPriority(f)?m===""?l.styleDiff[f]=h:l.styleDiff[f]=[h,m]:l._unchangedStyles[f]=[h,m]}for(const f of Array.from(d.style))s.style.getPropertyValue(f)===""&&(l.styleDiff[f]=!1)}else n==="open"&&s.tagName==="DIALOG"&&(s.matches("dialog:modal")?l.attributes.rr_open_mode="modal":l.attributes.rr_open_mode="non-modal")}break}case"childList":{if(Se(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(s=>this.genAdds(s,t.target)),t.removedNodes.forEach(s=>{const n=this.mirror.getId(s),r=xt(t.target)?this.mirror.getId($.host(t.target)):this.mirror.getId(t.target);Se(t.target,this.blockClass,this.blockSelector,!1)||Ki(s,this.mirror,this.slimDOMOptions)||!op(s,this.mirror)||(this.addedSet.has(s)?(Hi(this.addedSet,s),this.droppedSet.add(s)):this.addedSet.has(t.target)&&n===-1||Al(t.target,this.mirror)||(this.movedSet.has(s)&&this.movedMap[na(n,r)]?Hi(this.movedSet,s):(this.removes.push({parentId:r,id:n,isShadow:xt(t.target)&&Tt(t.target)?!0:void 0}),pp(s,this.removesSubTreeCache))),this.mapRemoves.push(s))});break}}}),L(this,"genAdds",(t,s)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Ki(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let n=null;s&&this.mirror.hasNode(s)&&(n=this.mirror.getId(s)),n&&n!==-1&&(this.movedMap[na(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Se(t,this.blockClass,this.blockSelector,!1)||($.childNodes(t).forEach(n=>this.genAdds(n)),zi(t)&&$.childNodes($.shadowRoot(t)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","inlineVideos","privacySetting","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(s=>{this[s]=t[s]})}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()}}function Hi(e,t){e.delete(t),$.childNodes(t).forEach(s=>Hi(e,s))}function pp(e,t){const s=[e];for(;s.length;){const n=s.pop();t.has(n)||(t.add(n),$.childNodes(n).forEach(r=>s.push(r)))}}function ia(e,t,s){return e.size===0?!1:mp(e,t)}function mp(e,t,s){const n=$.parentNode(t);return n?e.has(n):!1}function ra(e,t){return e.size===0?!1:oa(e,t)}function oa(e,t){const s=$.parentNode(t);return s?e.has(s)?!0:oa(e,s):!1}let Ft;function fp(e){Ft=e}function bp(){Ft=void 0}const se=e=>Ft?(...t)=>{try{return e(...t)}catch(s){if(Ft&&Ft(s)===!0)return;throw s}}:e,rt=[];function Mt(e){try{if("composedPath"in e){const 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 la(e,t){const s=new hp;rt.push(s),s.init(e);const[n,r]=Hl(),l=new n(se(s.processMutations.bind(s)));return l.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[l,r]}function yp({mousemoveCb:e,sampling:t,doc:s,mirror:n}){if(t.mousemove===!1)return()=>{};const r=typeof t.mousemove=="number"?t.mousemove:50,l=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let d=[],f;const h=Ut(se(o=>{const a=Date.now()-f;e(d.map(i=>(i.timeOffset-=a,i)),o),d=[],f=null}),l),m=se(Ut(se(o=>{const a=Mt(o),{clientX:i,clientY:c}=Ei(o)?o.changedTouches[0]:o;f||(f=Yt()),d.push({x:i,y:c,id:n.getId(a),timeOffset:Yt()-f}),h(typeof DragEvent<"u"&&o instanceof DragEvent?te.Drag:o instanceof MouseEvent?te.MouseMove:te.TouchMove)}),r,{trailing:!1})),p=[Ge("mousemove",m,s),Ge("touchmove",m,s),Ge("drag",m,s)];return se(()=>{p.forEach(o=>o())})}function gp({mouseInteractionCb:e,doc:t,mirror:s,blockClass:n,blockSelector:r,sampling:l}){if(l.mouseInteraction===!1)return()=>{};const d=l.mouseInteraction===!0||l.mouseInteraction===void 0?{}:l.mouseInteraction,f=[];let h=null;const m=p=>o=>{const a=Mt(o);if(Se(a,n,r,!0)||rp(a))return;let i=null,c=p;if("pointerType"in o){switch(o.pointerType){case"mouse":i=_e.Mouse;break;case"touch":i=_e.Touch;break;case"pen":i=_e.Pen;break}i===_e.Touch&&(ke[p]===ke.MouseDown?c="TouchStart":ke[p]===ke.MouseUp&&(c="TouchEnd"))}else Ei(o)&&(i=_e.Touch);i!==null?(h=i,(c.startsWith("Touch")&&i===_e.Touch||c.startsWith("Mouse")&&i===_e.Mouse)&&(i=null)):ke[p]===ke.Click&&(i=h,h=null);const u=Ei(o)?o.changedTouches[0]:o;if(!u)return;const b=s.getId(a),{clientX:S,clientY:Z}=u;se(e)(z({type:ke[c],id:b,x:S,y:Z},i!==null&&{pointerType:i}))};return Object.keys(ke).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&d[p]!==!1).forEach(p=>{let o=nt(p);const a=m(p);if(window.PointerEvent)switch(ke[p]){case ke.MouseDown:case ke.MouseUp:o=o.replace("mouse","pointer");break;case ke.TouchStart:case ke.TouchEnd:return}f.push(Ge(o,a,t))}),se(()=>{f.forEach(p=>p())})}function aa({scrollCb:e,doc:t,mirror:s,blockClass:n,blockSelector:r,sampling:l}){const d=se(Ut(se(f=>{const h=Mt(f);if(!h||Se(h,n,r,!0))return;const m=s.getId(h);if(h===t&&t.defaultView){const p=Dl(t.defaultView);e({id:m,x:p.left,y:p.top})}else e({id:m,x:h.scrollLeft,y:h.scrollTop})}),l.scroll||100));return Ge("scroll",d,t)}function Zp({viewportResizeCb:e},{win:t}){let s=-1,n=-1;const r=se(Ut(se(()=>{const l=Bl(),d=Ql();(s!==l||n!==d)&&(e({width:Number(d),height:Number(l)}),s=l,n=d)}),200));return Ge("resize",r,t)}const Sp=["INPUT","TEXTAREA","SELECT"],ca=new WeakMap;function Ip({inputCb:e,doc:t,mirror:s,blockClass:n,blockSelector:r,ignoreClass:l,ignoreSelector:d,maskInputOptions:f,maskInputFn:h,sampling:m,userTriggeredOnInput:p}){function o(S){let Z=Mt(S);const I=S.isTrusted,R=Z&&Z.tagName;if(Z&&R==="OPTION"&&(Z=$.parentElement(Z)),!Z||!R||Sp.indexOf(R)<0||Se(Z,n,r,!0)||Z.classList.contains(l)||d&&Z.matches(d))return;let y=Z.value,g=!1;const X=fs(Z)||"",v=Z.getAttribute("data-hl-record");X==="radio"||X==="checkbox"?g=Z.checked:uo({maskInputOptions:f,type:X,tagName:R,overwriteRecord:v})&&(y=ms({element:Z,maskInputOptions:f,tagName:R,type:X,value:y,overwriteRecord:v,maskInputFn:h})),a(Z,p?{text:y,isChecked:g,userTriggered:I}:{text:y,isChecked:g});const V=Z.name;X==="radio"&&V&&g&&t.querySelectorAll(`input[type="radio"][name="${V}"]`).forEach(W=>{if(W!==Z){const k=W.value;a(W,p?{text:k,isChecked:!g,userTriggered:!1}:{text:k,isChecked:!g})}})}function a(S,Z){const I=ca.get(S);if(!I||I.text!==Z.text||I.isChecked!==Z.isChecked){ca.set(S,Z);const R=s.getId(S);se(e)(ge(z({},Z),{id:R}))}}const i=(m.input==="last"?["change"]:["input","change"]).map(S=>Ge(S,se(o),t)),c=t.defaultView;if(!c)return()=>{i.forEach(S=>S())};const u=c.Object.getOwnPropertyDescriptor(c.HTMLInputElement.prototype,"value"),b=[[c.HTMLInputElement.prototype,"value"],[c.HTMLInputElement.prototype,"checked"],[c.HTMLSelectElement.prototype,"value"],[c.HTMLTextAreaElement.prototype,"value"],[c.HTMLSelectElement.prototype,"selectedIndex"],[c.HTMLOptionElement.prototype,"selected"]];return u&&u.set&&i.push(...b.map(S=>Ys(S[0],S[1],{set(){se(o)({target:this,isTrusted:!1})}},!1,c))),se(()=>{i.forEach(S=>S())})}function Us(e){const t=[];function s(n,r){if(Fs("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||Fs("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||Fs("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||Fs("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){const l=Array.from(n.parentRule.cssRules).indexOf(n);return r.unshift(l),s(n.parentRule,r)}else if(n.parentStyleSheet){const l=Array.from(n.parentStyleSheet.cssRules).indexOf(n);r.unshift(l)}return r}return s(e,t)}function $e(e,t,s){let n,r;return e?(e.ownerNode?n=t.getId(e.ownerNode):r=s.getId(e),{styleId:r,id:n}):{}}function qe(e,t,s,n){e[t]===s&&(e[t]=n)}const Xp=5;function Vp({styleSheetRuleCb:e,mirror:t,stylesheetManager:s,doc:n,styleSheetResyncInterval:r},{win:l}){if(!l.CSSStyleSheet||!l.CSSStyleSheet.prototype)return()=>{};const d=new WeakMap,f=new WeakSet;let h=!1,m=!1,p=!1,o,a=!1,i=!1,c=!1;const u=(J,K)=>{const O=d.get(J);O&&(O.reported=Math.max(0,O.reported+K),O.everSeen=Math.max(O.everSeen,O.reported))},b=J=>new Proxy(J,{apply:se((K,O,H)=>{if(h)return m=!0,K.apply(O,H);if(a||i)return K.apply(O,H);const[j,ee]=H,{id:A,styleId:P}=$e(O,t,s.styleMirror),re=A&&A!==-1||P&&P!==-1;re&&e({id:A,styleId:P,adds:[{rule:j,index:ee}]}),i=!0;let We;try{We=K.apply(O,H)}finally{i=!1}return re&&u(O,1),We})}),S=J=>new Proxy(J,{apply:se((K,O,H)=>{if(h)return p=!0,K.apply(O,H);if(a||c)return K.apply(O,H);const[j]=H,{id:ee,styleId:A}=$e(O,t,s.styleMirror),P=ee&&ee!==-1||A&&A!==-1;P&&e({id:ee,styleId:A,removes:[{index:j}]}),c=!0;let re;try{re=K.apply(O,H)}finally{c=!1}return P&&u(O,-1),re})}),Z=l.CSSStyleSheet.prototype.insertRule;let I=b(Z),R=Z;l.CSSStyleSheet.prototype.insertRule=I;const y=l.CSSStyleSheet.prototype.addRule,g=function(J,K,O=this.cssRules.length){const H=`${J} { ${K} }`;return l.CSSStyleSheet.prototype.insertRule.apply(this,[H,O])};l.CSSStyleSheet.prototype.addRule=g;const X=l.CSSStyleSheet.prototype.deleteRule;let v=S(X),V=X;l.CSSStyleSheet.prototype.deleteRule=v;const W=l.CSSStyleSheet.prototype.removeRule,k=function(J){return l.CSSStyleSheet.prototype.deleteRule.apply(this,[J])};l.CSSStyleSheet.prototype.removeRule=k;let N,D;l.CSSStyleSheet.prototype.replace&&(N=l.CSSStyleSheet.prototype.replace,D=new Proxy(N,{apply:se((J,K,O)=>{if(a)return J.apply(K,O);const[H]=O,{id:j,styleId:ee}=$e(K,t,s.styleMirror);return(j&&j!==-1||ee&&ee!==-1)&&e({id:j,styleId:ee,replace:H}),J.apply(K,O)})}),l.CSSStyleSheet.prototype.replace=D);let G,w;l.CSSStyleSheet.prototype.replaceSync&&(G=l.CSSStyleSheet.prototype.replaceSync,w=new Proxy(G,{apply:se((J,K,O)=>{if(a)return J.apply(K,O);const[H]=O,{id:j,styleId:ee}=$e(K,t,s.styleMirror);return(j&&j!==-1||ee&&ee!==-1)&&e({id:j,styleId:ee,replaceSync:H}),J.apply(K,O)})}),l.CSSStyleSheet.prototype.replaceSync=w);const T={};Ms("CSSGroupingRule")?T.CSSGroupingRule=l.CSSGroupingRule:(Ms("CSSMediaRule")&&(T.CSSMediaRule=l.CSSMediaRule),Ms("CSSConditionRule")&&(T.CSSConditionRule=l.CSSConditionRule),Ms("CSSSupportsRule")&&(T.CSSSupportsRule=l.CSSSupportsRule));const Y={},M={};Object.entries(T).forEach(([J,K])=>{Y[J]={insertRule:K.prototype.insertRule,deleteRule:K.prototype.deleteRule},M[J]={},M[J].insertRule=new Proxy(Y[J].insertRule,{apply:se((O,H,j)=>{if(a)return O.apply(H,j);const[ee,A]=j,{id:P,styleId:re}=$e(H.parentStyleSheet,t,s.styleMirror);return(P&&P!==-1||re&&re!==-1)&&e({id:P,styleId:re,adds:[{rule:ee,index:[...Us(H),A||0]}]}),O.apply(H,j)})}),M[J].deleteRule=new Proxy(Y[J].deleteRule,{apply:se((O,H,j)=>{if(a)return O.apply(H,j);const[ee]=j,{id:A,styleId:P}=$e(H.parentStyleSheet,t,s.styleMirror);return(A&&A!==-1||P&&P!==-1)&&e({id:A,styleId:P,removes:[{index:[...Us(H),ee]}]}),O.apply(H,j)})}),K.prototype.insertRule=M[J].insertRule,K.prototype.deleteRule=M[J].deleteRule});const U=()=>{h=!0,m=!1,p=!1;try{const J=o??(o=new l.CSSStyleSheet);J.insertRule(":root {}",0),J.deleteRule(0)}catch{return{insertRule:l.CSSStyleSheet.prototype.insertRule===I,deleteRule:l.CSSStyleSheet.prototype.deleteRule===v}}finally{h=!1}return{insertRule:m,deleteRule:p}};let _=0;const B=J=>{_>=Xp||(_+=1,J.insertRule||(R=l.CSSStyleSheet.prototype.insertRule,I=b(R),l.CSSStyleSheet.prototype.insertRule=I),J.deleteRule||(V=l.CSSStyleSheet.prototype.deleteRule,v=S(V),l.CSSStyleSheet.prototype.deleteRule=v))},C=J=>{for(let K=0;K<n.styleSheets.length;K++){const O=n.styleSheets[K];if(f.has(O))continue;const H=O.ownerNode;if(!H||nt(H.nodeName)!=="style"||(H.textContent||"").trim().length)continue;const j=t.getId(H);if(!j||j===-1)continue;let ee;try{ee=O.cssRules}catch{continue}const A=ee.length;let P=d.get(O);if(!P){if(Array.from(ee).some(re=>ro(re))){f.add(O);continue}if(P={reported:A,everSeen:A},d.set(O,P),J)continue;le(j,P,ee);continue}if(P.everSeen=Math.max(P.everSeen,A),A!==P.reported)if(A>P.reported){const re=[];for(let We=P.reported;We<A;We++)re.push({rule:ee[We].cssText,index:We});e({id:j,adds:re}),P.reported=A}else le(j,P,ee)}};function le(J,K,O){const H=[];for(let j=K.everSeen-1;j>=0;j--)H.push({index:j});H.length&&e({id:J,removes:H}),e({id:J,adds:Array.from(O,(j,ee)=>({rule:j.cssText,index:ee}))}),K.reported=O.length,K.everSeen=O.length}let ae;return r>0&&(ae=l.setInterval(se(()=>{const J=U(),K=J.insertRule&&J.deleteRule;K||B(J),C(K)}),r)),se(()=>{ae!==void 0&&l.clearInterval(ae),a=!0;const J=l.CSSStyleSheet.prototype;qe(J,"insertRule",I,R),qe(J,"deleteRule",v,V),qe(J,"addRule",g,y),qe(J,"removeRule",k,W),D&&qe(J,"replace",D,N),w&&qe(J,"replaceSync",w,G),Object.entries(T).forEach(([K,O])=>{qe(O.prototype,"insertRule",M[K].insertRule,Y[K].insertRule),qe(O.prototype,"deleteRule",M[K].deleteRule,Y[K].deleteRule)})})}function ua({mirror:e,stylesheetManager:t},s){var n,r,l;let d=null;s.nodeName==="#document"?d=e.getId(s):d=e.getId($.host(s));const f=s.nodeName==="#document"?(n=s.defaultView)==null?void 0:n.Document:(l=(r=s.ownerDocument)==null?void 0:r.defaultView)==null?void 0:l.ShadowRoot,h=f!=null&&f.prototype?Object.getOwnPropertyDescriptor(f?.prototype,"adoptedStyleSheets"):void 0;return d===null||d===-1||!f||!h?()=>{}:(Object.defineProperty(s,"adoptedStyleSheets",{configurable:h.configurable,enumerable:h.enumerable,get(){var m;return(m=h.get)==null?void 0:m.call(this)},set(m){var p;const o=(p=h.set)==null?void 0:p.call(this,m);if(d!==null&&d!==-1)try{t.adoptStyleSheets(m,d)}catch{}return o}}),se(()=>{Object.defineProperty(s,"adoptedStyleSheets",{configurable:h.configurable,enumerable:h.enumerable,get:h.get,set:h.set})}))}function Gp({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:s,stylesheetManager:n},{win:r}){const l=r.CSSStyleDeclaration.prototype.setProperty;r.CSSStyleDeclaration.prototype.setProperty=new Proxy(l,{apply:se((f,h,m)=>{var p;const[o,a,i]=m;if(s.has(o))return l.apply(h,[o,a,i]);const{id:c,styleId:u}=$e((p=h.parentRule)==null?void 0:p.parentStyleSheet,t,n.styleMirror);return(c&&c!==-1||u&&u!==-1)&&e({id:c,styleId:u,set:{property:o,value:a,priority:i},index:Us(h.parentRule)}),f.apply(h,m)})});const d=r.CSSStyleDeclaration.prototype.removeProperty;return r.CSSStyleDeclaration.prototype.removeProperty=new Proxy(d,{apply:se((f,h,m)=>{var p;const[o]=m;if(s.has(o))return d.apply(h,[o]);const{id:a,styleId:i}=$e((p=h.parentRule)==null?void 0:p.parentStyleSheet,t,n.styleMirror);return(a&&a!==-1||i&&i!==-1)&&e({id:a,styleId:i,remove:{property:o},index:Us(h.parentRule)}),f.apply(h,m)})}),se(()=>{r.CSSStyleDeclaration.prototype.setProperty=l,r.CSSStyleDeclaration.prototype.removeProperty=d})}function Rp({mediaInteractionCb:e,blockClass:t,blockSelector:s,mirror:n,sampling:r,doc:l}){const d=se(h=>Ut(se(m=>{const p=Mt(m);if(!p||Se(p,t,s,!0))return;const{currentTime:o,volume:a,muted:i,playbackRate:c,loop:u}=p;e({type:h,id:n.getId(p),currentTime:o,volume:a,muted:i,playbackRate:c,loop:u})}),r.media||500)),f=[Ge("play",d(St.Play),l),Ge("pause",d(St.Pause),l),Ge("seeked",d(St.Seeked),l),Ge("volumechange",d(St.VolumeChange),l),Ge("ratechange",d(St.RateChange),l)];return se(()=>{f.forEach(h=>h())})}function vp({fontCb:e,doc:t}){const s=t.defaultView;if(!s)return()=>{};const n=[],r=new WeakMap,l=s.FontFace;s.FontFace=function(f,h,m){const p=new l(f,h,m);return r.set(p,{family:f,buffer:typeof h!="string",descriptors:m,fontSource:typeof h=="string"?h:JSON.stringify(Array.from(new Uint8Array(h)))}),p};const d=it(t.fonts,"add",function(f){return function(h){return setTimeout(se(()=>{const m=r.get(h);m&&(e(m),r.delete(h))}),0),f.apply(this,[h])}});return n.push(()=>{s.FontFace=l}),n.push(d),se(()=>{n.forEach(f=>f())})}function Wp(e){const{doc:t,mirror:s,blockClass:n,blockSelector:r,selectionCb:l}=e;let d=!0;const f=se(()=>{const h=t.getSelection();if(!h||d&&h!=null&&h.isCollapsed)return;d=h.isCollapsed||!1;const m=[],p=h.rangeCount||0;for(let o=0;o<p;o++){const a=h.getRangeAt(o),{startContainer:i,startOffset:c,endContainer:u,endOffset:b}=a;Se(i,n,r,!0)||Se(u,n,r,!0)||m.push({start:s.getId(i),startOffset:c,end:s.getId(u),endOffset:b})}l({ranges:m})});return f(),Ge("selectionchange",f)}function wp({doc:e,customElementCb:t}){const s=e.defaultView;return!s||!s.customElements?()=>{}:it(s.customElements,"define",function(n){return function(r,l,d){try{t({define:{name:r}})}catch{console.warn(`Custom element callback failed for ${r}`)}return n.apply(this,[r,l,d])}})}function kp(e,t){const{mutationCb:s,mousemoveCb:n,mouseInteractionCb:r,scrollCb:l,viewportResizeCb:d,inputCb:f,mediaInteractionCb:h,styleSheetRuleCb:m,styleDeclarationCb:p,canvasMutationCb:o,fontCb:a,selectionCb:i,customElementCb:c}=e;e.mutationCb=(...u)=>{t.mutation&&t.mutation(...u),s(...u)},e.mousemoveCb=(...u)=>{t.mousemove&&t.mousemove(...u),n(...u)},e.mouseInteractionCb=(...u)=>{t.mouseInteraction&&t.mouseInteraction(...u),r(...u)},e.scrollCb=(...u)=>{t.scroll&&t.scroll(...u),l(...u)},e.viewportResizeCb=(...u)=>{t.viewportResize&&t.viewportResize(...u),d(...u)},e.inputCb=(...u)=>{t.input&&t.input(...u),f(...u)},e.mediaInteractionCb=(...u)=>{t.mediaInteaction&&t.mediaInteaction(...u),h(...u)},e.styleSheetRuleCb=(...u)=>{t.styleSheetRule&&t.styleSheetRule(...u),m(...u)},e.styleDeclarationCb=(...u)=>{t.styleDeclaration&&t.styleDeclaration(...u),p(...u)},e.canvasMutationCb=(...u)=>{t.canvasMutation&&t.canvasMutation(...u),o(...u)},e.fontCb=(...u)=>{t.font&&t.font(...u),a(...u)},e.selectionCb=(...u)=>{t.selection&&t.selection(...u),i(...u)},e.customElementCb=(...u)=>{t.customElement&&t.customElement(...u),c(...u)}}function Cp(e,t={}){const s=e.doc.defaultView;if(!s)return()=>{};kp(e,t);let n,r=()=>{};e.recordDOM&&([n,r]=la(e,e.doc));const l=yp(e),d=gp(e),f=aa(e),h=Zp(e,{win:s}),m=Ip(e),p=Rp(e);let o=()=>{},a=()=>{},i=()=>{},c=()=>{};e.recordDOM&&(o=Vp(e,{win:s}),a=ua(e,e.doc),i=Gp(e,{win:s}),e.collectFonts&&(c=vp(e)));const u=Wp(e),b=wp(e),S=[];for(const Z of e.plugins)S.push(Z.observer(Z.callback,s,Z.options));return se(()=>{rt.forEach(Z=>Z.reset()),n?.disconnect(),r(),l(),d(),f(),h(),m(),p(),o(),a(),i(),c(),u(),b(),S.forEach(Z=>Z())})}function Fs(e){return typeof window[e]<"u"}function Ms(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class da{constructor(t){L(this,"iframeIdToRemoteIdMap",new WeakMap),L(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,s,n,r){const l=n||this.getIdToRemoteIdMap(t),d=r||this.getRemoteIdToIdMap(t);let f=l.get(s);return f||(f=this.generateIdFn(),l.set(s,f),d.set(f,s)),f}getIds(t,s){const n=this.getIdToRemoteIdMap(t),r=this.getRemoteIdToIdMap(t);return s.map(l=>this.getId(t,l,n,r))}getRemoteId(t,s,n){const r=n||this.getRemoteIdToIdMap(t);return typeof s!="number"?s:r.get(s)||-1}getRemoteIds(t,s){const n=this.getRemoteIdToIdMap(t);return s.map(r=>this.getRemoteId(t,r,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 s=this.iframeIdToRemoteIdMap.get(t);return s||(s=new Map,this.iframeIdToRemoteIdMap.set(t,s)),s}getRemoteIdToIdMap(t){let s=this.iframeRemoteIdToIdMap.get(t);return s||(s=new Map,this.iframeRemoteIdToIdMap.set(t,s)),s}}class xp{constructor(t){L(this,"iframes",new WeakMap),L(this,"crossOriginIframeMap",new WeakMap),L(this,"crossOriginIframeMirror",new da(ho)),L(this,"crossOriginIframeStyleMirror"),L(this,"crossOriginIframeRootIdMap",new WeakMap),L(this,"mirror"),L(this,"mutationCb"),L(this,"wrappedEmit"),L(this,"loadListener"),L(this,"stylesheetManager"),L(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new da(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,s){var n,r;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:s}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((n=t.contentWindow)==null||n.addEventListener("message",this.handleMessage.bind(this))),(r=this.loadListener)==null||r.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){const s=t;if(s.data.type!=="rrweb"||s.origin!==s.data.origin)return;const n=t.source;if(!n)return;const r=this.crossOriginIframeMap.get(n);if(!r)return;const l=this.transformCrossOriginEvent(r,s.data.event);l&&this.wrappedEmit(l,s.data.isCheckout)}transformCrossOriginEvent(t,s){var n;switch(s.type){case ie.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(s.data.node,t);const r=s.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(s.data.node,r),{timestamp:s.timestamp,type:ie.IncrementalSnapshot,data:{source:te.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:s.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ie.Meta:case ie.Load:case ie.DomContentLoaded:return!1;case ie.Plugin:return s;case ie.Custom:return this.replaceIds(s.data.payload,t,["id","parentId","previousId","nextId"]),s;case ie.IncrementalSnapshot:switch(s.data.source){case te.Mutation:return s.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const l=this.crossOriginIframeRootIdMap.get(t);l&&this.patchRootIdOnNode(r.node,l)}),s.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),s.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),s.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),s;case te.Drag:case te.TouchMove:case te.MouseMove:return s.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),s;case te.ViewportResize:return!1;case te.MediaInteraction:case te.MouseInteraction:case te.Scroll:case te.CanvasMutation:case te.Input:return this.replaceIds(s.data,t,["id"]),s;case te.StyleSheetRule:case te.StyleDeclaration:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleId"]),s;case te.Font:return s;case te.Selection:return s.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),s;case te.AdoptedStyleSheet:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleIds"]),(n=s.data.styles)==null||n.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),s}}return!1}replace(t,s,n,r){for(const l of r)!Array.isArray(s[l])&&typeof s[l]!="number"||(Array.isArray(s[l])?s[l]=t.getIds(n,s[l]):s[l]=t.getId(n,s[l]));return s}replaceIds(t,s,n){return this.replace(this.crossOriginIframeMirror,t,s,n)}replaceStyleIds(t,s,n){return this.replace(this.crossOriginIframeStyleMirror,t,s,n)}replaceIdOnNode(t,s){this.replaceIds(t,s,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,s)})}patchRootIdOnNode(t,s){t.type!==ta.Document&&!t.rootId&&(t.rootId=s),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,s)})}}class Tp{constructor(t){L(this,"shadowDoms",new WeakSet),L(this,"mutationCb"),L(this,"scrollCb"),L(this,"bypassOptions"),L(this,"mirror"),L(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,s){if(!Tt(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const[n]=la(ge(z({},this.bypassOptions),{doc:s,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(aa(ge(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($.host(t))),this.restoreHandlers.push(ua({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,s){const n=this;this.restoreHandlers.push(it(t.prototype,"attachShadow",function(r){return function(l){const d=r.call(this,l),f=$.shadowRoot(this);return f&&ea(this)&&n.addShadowRoot(f,s),d}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var It="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lp=typeof Uint8Array>"u"?[]:new Uint8Array(256),Os=0;Os<It.length;Os++)Lp[It.charCodeAt(Os)]=Os;var Np=function(e){var t=new Uint8Array(e),s,n=t.length,r="";for(s=0;s<n;s+=3)r+=It[t[s]>>2],r+=It[(t[s]&3)<<4|t[s+1]>>4],r+=It[(t[s+1]&15)<<2|t[s+2]>>6],r+=It[t[s+2]&63];return n%3===2?r=r.substring(0,r.length-1)+"=":n%3===1&&(r=r.substring(0,r.length-2)+"=="),r};const ha=new Map;function Jp(e,t){let s=ha.get(e);return s||(s=new Map,ha.set(e,s)),s.has(t)||s.set(t,[]),s.get(t)}const pa=(e,t,s)=>{if(!e||!(fa(e,t)||typeof e=="object"))return;const n=e.constructor.name,r=Jp(s,n);let l=r.indexOf(e);return l===-1&&(l=r.length,r.push(e)),l};function Ks(e,t,s){if(e instanceof Array)return e.map(n=>Ks(n,t,s));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){const n=e.constructor.name,r=Np(e);return{rr_type:n,base64:r}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Ks(e.buffer,t,s),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const n=e.constructor.name,{src:r}=e;return{rr_type:n,src:r}}else if(e instanceof HTMLCanvasElement){const n="HTMLImageElement",r=e.toDataURL();return{rr_type:n,src:r}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Ks(e.data,t,s),e.width,e.height]};if(fa(e,t)||typeof e=="object"){const n=e.constructor.name,r=pa(e,t,s);return{rr_type:n,index:r}}}}return e}const ma=(e,t,s)=>e.map(n=>Ks(n,t,s)),fa=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof t[s]=="function").find(s=>e instanceof t[s]);function Yp(e,t,s,n){const r=[],l=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const d of l)try{if(typeof t.CanvasRenderingContext2D.prototype[d]!="function")continue;const f=it(t.CanvasRenderingContext2D.prototype,d,function(h){return function(...m){return Se(this.canvas,s,n,!0)||setTimeout(()=>{const p=ma(m,t,this);e(this.canvas,{type:Zt["2D"],property:d,args:p})},0),h.apply(this,m)}});r.push(f)}catch{const h=Ys(t.CanvasRenderingContext2D.prototype,d,{set(m){e(this.canvas,{type:Zt["2D"],property:d,args:[m],setter:!0})}});r.push(h)}return()=>{r.forEach(d=>d())}}function Up(e){return e==="experimental-webgl"?"webgl":e}function ba(e,t,s,n){const r=[];try{const l=it(e.HTMLCanvasElement.prototype,"getContext",function(d){return function(f,...h){if(!Se(this,t,s,!0)){const m=Up(f);if("__context"in this||(this.__context=m),n&&["webgl","webgl2"].includes(m))if(h[0]&&typeof h[0]=="object"){const p=h[0];p.preserveDrawingBuffer||(p.preserveDrawingBuffer=!0)}else h.splice(0,1,{preserveDrawingBuffer:!0})}return d.apply(this,[f,...h])}});r.push(l)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach(l=>l())}}function ya(e,t,s,n,r,l){const d=[],f=Object.getOwnPropertyNames(e);for(const h of f)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))try{if(typeof e[h]!="function")continue;const m=it(e,h,function(p){return function(...o){const a=p.apply(this,o);if(pa(a,l,this),"tagName"in this.canvas&&!Se(this.canvas,n,r,!0)){const i=ma(o,l,this),c={type:t,property:h,args:i};s(this.canvas,c)}return a}});d.push(m)}catch{const p=Ys(e,h,{set(o){s(this.canvas,{type:t,property:h,args:[o],setter:!0})}});d.push(p)}return d}function Fp(e,t,s,n){const r=[];return typeof t.WebGLRenderingContext<"u"&&r.push(...ya(t.WebGLRenderingContext.prototype,Zt.WebGL,e,s,n,t)),typeof t.WebGL2RenderingContext<"u"&&r.push(...ya(t.WebGL2RenderingContext.prototype,Zt.WebGL2,e,s,n,t)),()=>{r.forEach(l=>l())}}const ga=`(function() {
353
353
  "use strict";
354
354
  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
355
355
  var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
@@ -449,15 +449,15 @@ or you can use record.mirror to access the mirror instance during recording.`;le
449
449
  };
450
450
  })();
451
451
  //# sourceMappingURL=image-bitmap-data-url-worker-DwtK8A0z.js.map
452
- `,Za=typeof self<"u"&&self.Blob&&new Blob([ga],{type:"text/javascript;charset=utf-8"});function Up(e){let t;try{if(t=Za&&(self.URL||self.webkitURL).createObjectURL(Za),!t)throw"";const s=new Worker(t,{name:e?.name});return s.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),s}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(ga),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class Fp{constructor(t){L(this,"pendingCanvasMutations",new Map),L(this,"rafStamps",{latestId:0,invokeId:null}),L(this,"mirror"),L(this,"logger"),L(this,"worker"),L(this,"snapshotInProgressMap",new Map),L(this,"lastSnapshotTime",new Map),L(this,"options"),L(this,"mutationCb"),L(this,"resetObservers"),L(this,"frozen",!1),L(this,"locked",!1),L(this,"processMutation",(o,l)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(l)});const{sampling:s,win:n,blockClass:r,blockSelector:a,recordCanvas:d,recordLocalVideos:f,recordRemoteVideos:h,initialSnapshotDelay:m,dataURLOptions:p}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.logger=t.logger,this.worker=new Up,this.worker.onmessage=o=>{const{id:l}=o.data;if(this.snapshotInProgressMap.set(l,!1),!("base64"in o.data)){this.debug(null,"canvas worker received empty message",{id:l,data:o.data,status:o.data.status});return}const{base64:i,type:c,dx:u,dy:b,dw:S,dh:Z}=o.data,I={id:l,type:Zt["2D"],commands:[{property:"clearRect",args:[u,b,S,Z]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:i}],type:c}]},u,b,S,Z]}]};this.debug(null,"canvas worker recording mutation",I),this.mutationCb(I)},this.options=t,d&&s==="all"?(this.debug(null,"initializing canvas mutation observer",{sampling:s}),this.initCanvasMutationObserver(n,r,a)):d&&typeof s=="number"&&(this.debug(null,"initializing canvas fps observer",{sampling:s}),this.initCanvasFPSObserver(f,h,s,n,r,a,{initialSnapshotDelay:m,dataURLOptions:p},t.resizeFactor,t.maxSnapshotDimension))}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}debug(t,...s){if(!this.logger)return;const n=this.mirror.getId(t);let r="[highlight-canvas-manager]";t&&(r=`[highlight-canvas] [id:${n}]`,t.tagName.toLowerCase()==="canvas"&&(r+=` [ctx:${t.__context}]`)),this.logger.debug(r,t,...s)}snapshot(t){return Ve(this,null,function*(){var s;const n=this.mirror.getId(t);if(this.snapshotInProgressMap.get(n)){this.debug(t,"snapshotting already in progress for",n);return}const r=1e3/(typeof this.options.samplingManual=="number"?this.options.samplingManual:1),a=this.lastSnapshotTime.get(n);if(!(a&&new Date().getTime()-a<r)){if(this.debug(t,"starting snapshotting"),t.width===0||t.height===0){this.debug(t,"not yet ready",{width:t.width,height:t.height});return}this.lastSnapshotTime.set(n,new Date().getTime()),this.snapshotInProgressMap.set(n,!0);try{if(this.options.clearWebGLBuffer!==!1&&["webgl","webgl2"].includes(t.__context)){const p=t.getContext(t.__context);((s=p?.getContextAttributes())==null?void 0:s.preserveDrawingBuffer)===!1&&(p.clear(p.COLOR_BUFFER_BIT),this.debug(t,"cleared webgl canvas to load it into memory",{attributes:p?.getContextAttributes()}))}if(t.width===0||t.height===0){this.debug(t,"not yet ready",{width:t.width,height:t.height});return}let d=this.options.resizeFactor||1;if(this.options.maxSnapshotDimension){const p=Math.max(t.width,t.height);d=Math.min(d,this.options.maxSnapshotDimension/p)}const f=t.width*d,h=t.height*d,m=yield createImageBitmap(t,{resizeWidth:f,resizeHeight:h});this.debug(t,"created image bitmap",{width:m.width,height:m.height}),this.worker.postMessage({id:n,bitmap:m,width:f,height:h,dx:0,dy:0,dw:t.width,dh:t.height,dataURLOptions:this.options.dataURLOptions,logDebug:!!this.logger},[m]),this.debug(t,"sent message")}catch(d){this.debug(t,"failed to snapshot",d)}finally{this.snapshotInProgressMap.set(n,!1)}}})}initCanvasFPSObserver(t,s,n,r,a,d,f,h,m){const p=ba(r,a,d,!0),o=1e3/n;let l=0,i;const c=new Map,u=(I,R)=>{const y=[];I.querySelectorAll(R).forEach(v=>y.push(v));const g=document.createNodeIterator(I,Node.ELEMENT_NODE);let X;for(;X=g.nextNode();)X!=null&&X.shadowRoot&&y.push(...u(X.shadowRoot,R));return y},b=I=>{const R=[];return u(r.document,"canvas").forEach(y=>{if(!Se(y,a,d,!0)){this.debug(y,"discovered canvas"),R.push(y);const g=this.mirror.getId(y);c.has(g)||c.set(g,I)}}),R},S=I=>{const R=[];return(t||s)&&u(r.document,"video").forEach(y=>{if(!(!s&&y.src!==""&&y.src.indexOf("blob:")===-1)&&!(!t&&(y.src===""||y.src.indexOf("blob:")!==-1))&&!Se(y,a,d,!0)){R.push(y);const g=this.mirror.getId(y);c.has(g)||c.set(g,I)}}),R},Z=I=>Ve(this,null,function*(){if(l&&I-l<o){i=requestAnimationFrame(g=>void Z(g));return}l=I;const R=g=>{const X=this.mirror.getId(g),v=c.get(X),V=!f.initialSnapshotDelay||I-v>f.initialSnapshotDelay;return this.debug(g,{delay:f.initialSnapshotDelay,delta:I-v,hadLoadingTime:V}),V},y=[];y.push(...b(I).filter(R).map(g=>this.snapshot(g))),y.push(...S(I).filter(R).map(g=>Ve(this,null,function*(){this.debug(g,"starting video snapshotting");const X=this.mirror.getId(g);if(this.snapshotInProgressMap.get(X)){this.debug(g,"video snapshotting already in progress for",X);return}this.snapshotInProgressMap.set(X,!0);try{const{width:v,height:V}=g.getBoundingClientRect(),{actualWidth:W,actualHeight:k}={actualWidth:g.videoWidth,actualHeight:g.videoHeight},N=Math.max(W,k);if(N===0){this.debug(g,"not yet ready",{width:g.width,height:g.height,actualWidth:W,actualHeight:k,boxWidth:v,boxHeight:V});return}let D=h||1;m&&(D=Math.min(D,m/N));const G=W*D,w=k*D,T=yield createImageBitmap(g,{resizeWidth:G,resizeHeight:w}),Y=Math.max(v,V)/N,M=W*Y,U=k*Y,_=(v-M)/2,B=(V-U)/2;this.debug(g,"created image bitmap",{actualWidth:W,actualHeight:k,boxWidth:v,boxHeight:V,outputWidth:M,outputHeight:U,resizeWidth:G,resizeHeight:w,scale:D,outputScale:Y,offsetX:_,offsetY:B}),this.worker.postMessage({id:X,bitmap:T,width:G,height:w,dx:_,dy:B,dw:M,dh:U,dataURLOptions:f.dataURLOptions,logDebug:!!this.logger},[T]),this.debug(g,"send message")}catch(v){this.debug(g,"failed to snapshot",v)}finally{this.snapshotInProgressMap.set(X,!1)}}))),yield Promise.all(y).catch(console.error),i=requestAnimationFrame(g=>void Z(g))});i=requestAnimationFrame(I=>void Z(I)),this.resetObservers=()=>{p(),i&&cancelAnimationFrame(i)}}initCanvasMutationObserver(t,s,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=ba(t,s,n,!1),a=Np(this.processMutation.bind(this),t,s,n),d=Yp(this.processMutation.bind(this),t,s,n);this.resetObservers=()=>{r(),a(),d()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=s=>{this.rafStamps.latestId=s,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,s)=>{const n=this.mirror.getId(s);this.flushPendingCanvasMutationFor(s,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,s){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||s===-1)return;const r=n.map(d=>ds(d,["type"])),{type:a}=n[0];this.mutationCb({id:s,type:a,commands:r}),this.pendingCanvasMutations.delete(t)}}class Mp{constructor(t){L(this,"trackedLinkElements",new WeakSet),L(this,"mutationCb"),L(this,"adoptedStyleSheetCb"),L(this,"styleMirror",new op),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,s){"_cssText"in s.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:s.id,attributes:s.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,s){if(t.length===0)return;const n={id:s,styleIds:[]},r=[];for(const a of t){let d;this.styleMirror.has(a)?d=this.styleMirror.getId(a):(d=this.styleMirror.add(a),r.push({styleId:d,rules:Array.from(a.rules||CSSRule,(f,h)=>({rule:io(f,a.href),index:h}))})),n.styleIds.push(d)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Op{constructor(){L(this,"nodeMap",new WeakMap),L(this,"active",!1)}inOtherBuffer(t,s){const n=this.nodeMap.get(t);return n&&Array.from(n).some(r=>r!==s)}add(t,s){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(s))}destroy(){}}let he,Es,Ot,zs=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Qr=e.contentWindow)==null?void 0:Qr.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Me=Kd();function Be(e={}){var t;const{emit:s,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:a="highlight-block",blockSelector:d=null,ignoreClass:f="highlight-ignore",ignoreSelector:h=null,maskTextClass:m="highlight-mask",maskTextSelector:p=null,inlineStylesheet:o=!0,maskAllInputs:l,maskInputOptions:i,slimDOMOptions:c,maskInputFn:u,maskTextFn:b=Sn,hooks:S,packFn:Z,sampling:I={},mousemoveWait:R,recordDOM:y=!0,recordCanvas:g=!1,recordCrossOriginIframes:X=!1,recordAfter:v=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:W=!1,inlineImages:k=!1,inlineVideos:N=!1,plugins:D,keepIframeSrcFn:G=()=>!1,privacySetting:w="default",ignoreCSSAttributes:T=new Set([]),styleSheetResyncInterval:Y=2e3,errorHandler:M,logger:U}=e,_=z(z({},e.dataURLOptions),typeof((t=e.sampling)==null?void 0:t.canvas)=="object"?e.sampling.canvas.dataURLOptions:void 0);pp(M);const B=X?window.parent===window:!0;let C=!1;if(!B)try{window.parent.document&&(C=!1)}catch{C=!0}if(B&&!s)throw new Error("emit function is required");if(!B&&!C)return()=>{};R!==void 0&&I.mousemove===void 0&&(I.mousemove=R),Me.reset();const le=l===!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}:i!==void 0?i:{password:!0},ae=Zo(c);rp();let J,K=0;const O=oe=>{for(const Oe of D||[])Oe.eventProcessor&&(oe=Oe.eventProcessor(oe));return Z&&!C&&(oe=Z(oe)),oe};he=(oe,Oe)=>{var pe;const me=oe;if(me.timestamp=Yt(),(pe=rt[0])!=null&&pe.isFrozen()&&me.type!==ie.FullSnapshot&&!(me.type===ie.IncrementalSnapshot&&me.data.source===te.Mutation)&&rt.forEach(Te=>Te.unfreeze()),B)s?.(O(me),Oe);else if(C){const Te={type:"rrweb",event:O(me),origin:window.location.origin,isCheckout:Oe};window.parent.postMessage(Te,"*")}if(me.type===ie.FullSnapshot)J=me,K=0;else if(me.type===ie.IncrementalSnapshot){if(me.data.source===te.Mutation&&me.data.isAttachIframe)return;K++;const Te=r&&K>=r,ce=n&&me.timestamp-J.timestamp>n;(Te||ce)&&Es(!0)}};const H=oe=>{he({type:ie.IncrementalSnapshot,data:z({source:te.Mutation},oe)})},j=oe=>he({type:ie.IncrementalSnapshot,data:z({source:te.Scroll},oe)}),ee=oe=>he({type:ie.IncrementalSnapshot,data:z({source:te.CanvasMutation},oe)}),A=oe=>he({type:ie.IncrementalSnapshot,data:z({source:te.AdoptedStyleSheet},oe)}),P=new Mp({mutationCb:H,adoptedStyleSheetCb:A}),re=new kp({mirror:Me,mutationCb:H,stylesheetManager:P,recordCrossOriginIframes:X,wrappedEmit:he});for(const oe of D||[])oe.getMirror&&oe.getMirror({nodeMirror:Me,crossOriginIframeMirror:re.crossOriginIframeMirror,crossOriginIframeStyleMirror:re.crossOriginIframeStyleMirror});const We=new Op,Xt=typeof I?.canvas=="object"?I.canvas:{fps:I?.canvas};Ot=new Fp({recordCanvas:g,recordLocalVideos:k,recordRemoteVideos:N,mutationCb:ee,win:window,blockClass:a,blockSelector:d,mirror:Me,sampling:Xt.fps,samplingManual:Xt.fpsManual,clearWebGLBuffer:Xt.clearWebGLBuffer,initialSnapshotDelay:Xt.initialSnapshotDelay,dataURLOptions:_,resizeFactor:Xt.resizeFactor,maxSnapshotDimension:Xt.maxSnapshotDimension,logger:U});const Ds=new Cp({mutationCb:H,scrollCb:j,bypassOptions:{blockClass:a,blockSelector:d,maskTextClass:m,maskTextSelector:p,inlineStylesheet:o,maskInputOptions:le,dataURLOptions:_,maskTextFn:b,maskInputFn:u,recordCanvas:g,inlineImages:k,inlineVideos:N,privacySetting:w,sampling:I,slimDOMOptions:ae,iframeManager:re,stylesheetManager:P,canvasManager:Ot,keepIframeSrcFn:G,processedNodeManager:We},mirror:Me});Es=(oe=!1)=>{if(!y)return;he({type:ie.Meta,data:{href:window.location.href,width:Ql(),height:Bl()}},oe),P.reset(),Ds.init(),rt.forEach(pe=>pe.lock());const Oe=gh(document,{mirror:Me,blockClass:a,blockSelector:d,maskTextClass:m,maskTextSelector:p,inlineStylesheet:o,maskAllInputs:le,maskTextFn:b,maskInputFn:u,slimDOM:ae,dataURLOptions:_,recordCanvas:g,inlineImages:k,inlineVideos:N,privacySetting:w,onSerialize:pe=>{_l(pe,Me)&&re.addIframe(pe),$l(pe,Me)&&P.trackLinkElement(pe),zi(pe)&&Ds.addShadowRoot($.shadowRoot(pe),document)},onIframeLoad:(pe,me)=>{re.attachIframe(pe,me),Ds.observeAttachShadow(pe)},onStylesheetLoad:(pe,me)=>{P.attachLinkElement(pe,me)},keepIframeSrcFn:G});if(!Oe)return console.warn("Failed to snapshot the document");he({type:ie.FullSnapshot,data:{node:Oe,initialOffset:Dl(window)}},oe),rt.forEach(pe=>pe.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&P.adoptStyleSheets(document.adoptedStyleSheets,Me.getId(document))};try{const oe=[],Oe=me=>{var Te;return se(wp)({mutationCb:H,mousemoveCb:(ce,er)=>he({type:ie.IncrementalSnapshot,data:{source:er,positions:ce}}),mouseInteractionCb:ce=>he({type:ie.IncrementalSnapshot,data:z({source:te.MouseInteraction},ce)}),scrollCb:j,viewportResizeCb:ce=>he({type:ie.IncrementalSnapshot,data:z({source:te.ViewportResize},ce)}),inputCb:ce=>he({type:ie.IncrementalSnapshot,data:z({source:te.Input},ce)}),mediaInteractionCb:ce=>he({type:ie.IncrementalSnapshot,data:z({source:te.MediaInteraction},ce)}),styleSheetRuleCb:ce=>he({type:ie.IncrementalSnapshot,data:z({source:te.StyleSheetRule},ce)}),styleDeclarationCb:ce=>he({type:ie.IncrementalSnapshot,data:z({source:te.StyleDeclaration},ce)}),canvasMutationCb:ee,fontCb:ce=>he({type:ie.IncrementalSnapshot,data:z({source:te.Font},ce)}),selectionCb:ce=>{he({type:ie.IncrementalSnapshot,data:z({source:te.Selection},ce)})},customElementCb:ce=>{he({type:ie.IncrementalSnapshot,data:z({source:te.CustomElement},ce)})},blockClass:a,ignoreClass:f,ignoreSelector:h,maskTextClass:m,maskTextSelector:p,maskInputOptions:le,inlineStylesheet:o,sampling:I,recordDOM:y,recordCanvas:g,inlineImages:k,inlineVideos:N,userTriggeredOnInput:V,collectFonts:W,doc:me,maskInputFn:u,maskTextFn:b,keepIframeSrcFn:G,blockSelector:d,slimDOMOptions:ae,dataURLOptions:_,mirror:Me,iframeManager:re,stylesheetManager:P,shadowDomManager:Ds,processedNodeManager:We,canvasManager:Ot,ignoreCSSAttributes:T,styleSheetResyncInterval:Y,privacySetting:w,plugins:((Te=D?.filter(ce=>ce.observer))==null?void 0:Te.map(ce=>({observer:ce.observer,options:ce.options,callback:er=>he({type:ie.Plugin,data:{plugin:ce.name,payload:er}})})))||[]},S)};re.addLoadListener(me=>{try{oe.push(Oe(me.contentDocument))}catch(Te){console.warn(Te)}});const pe=()=>{Es(),oe.push(Oe(document)),zs=!0};return["interactive","complete"].includes(document.readyState)?pe():(oe.push(Ge("DOMContentLoaded",()=>{he({type:ie.DomContentLoaded,data:{}}),v==="DOMContentLoaded"&&pe()})),oe.push(Ge("load",()=>{he({type:ie.Load,data:{}}),v==="load"&&pe()},window))),()=>{oe.forEach(me=>{try{me()}catch(Te){String(Te).toLowerCase().includes("cross-origin")||console.warn(Te)}}),We.destroy(),zs=!1,mp()}}catch(oe){console.warn(oe)}}Be.addCustomEvent=(e,t)=>{zs&&he({type:ie.Custom,data:{tag:e,payload:t}})},Be.freezePage=()=>{rt.forEach(e=>e.freeze())},Be.takeFullSnapshot=e=>{if(!zs)throw new Error("please take full snapshot after start recording");Es(e)},Be.snapshotCanvas=e=>Ve(void 0,null,function*(){if(!Ot)throw new Error("canvas manager is not initialized");yield Ot.snapshot(e)}),Be.mirror=Me;var Sa;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Sa||(Sa={}));const{addCustomEvent:Ia}=Be,Kp=(e,t,s)=>{switch(e){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!!t,ge(z({},s),{password:!0})]}},Ep=e=>{const t=n=>{if(n.target){const r=n.target,a=Or(r);e(a,n)}},s={capture:!0};return window.addEventListener("click",t,s),()=>window.removeEventListener("click",t,s)},zp=e=>{const t=s=>{if(s.target){const n=Or(s.target);e(n)}};return window.addEventListener("focusin",t),()=>window.removeEventListener("focusin",t)},Hp=e=>{let t,s;if(typeof document.hidden<"u"?(t="hidden",s="visibilitychange"):typeof document.msHidden<"u"?(t="msHidden",s="msvisibilitychange"):typeof document.webkitHidden<"u"&&(t="webkitHidden",s="webkitvisibilitychange"),s===void 0)return()=>{};if(t===void 0)return()=>{};const n=t,r=()=>{const d=document[n];e(!!d)};document.addEventListener(s,r);const a=s;return()=>document.removeEventListener(a,r)},Pp=e=>{e(window.location.href);var t=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(a){setTimeout(()=>{var d,f;try{f=JSON.parse((d=a?.toString())!=null?d:"")}catch{return}(f.type==="track"||f.type==="identify")&&Pi(f)&&e(f)},100),t.call(this,a)};const s=a=>{if(a.key==="ajs_user_id"||a.key==="ajs_anonymous_id"||a.key==="ajs_user_traits"){const{userId:d,userTraits:f}=Xa();if(d){let h={};f&&(h=JSON.parse(f));const m={type:"identify",userId:d.toString(),traits:h};Pi(m)&&e(m)}}},{userId:n,userTraits:r}=Xa();if(n){let a={};r&&(a=JSON.parse(r));const d={type:"identify",userId:n.toString(),traits:a};Pi(d)&&e(d)}return window.addEventListener("storage",s),Cu(({keyName:a})=>{s({key:a})}),()=>{window.removeEventListener("storage",s),XMLHttpRequest.prototype.send=t}},Xa=()=>{const e=Ce("ajs_user_id"),t=Ce("ajs_user_traits"),s=Ce("ajs_anonymous_id");return{userId:e,userTraits:t,anonymousId:s}},Pi=e=>{if(!e)return!1;let t="";try{t=JSON.stringify(e)}catch{return!1}const s=Dp(t),n=Ce(Xe.SEGMENT_LAST_SENT_HASH_KEY);return n===void 0||s!==n?(He(Xe.SEGMENT_LAST_SENT_HASH_KEY,s),!0):!1},Dp=e=>{var t=0,s=e.length,n=0;if(s>0)for(;n<s;)t=(t<<5)-t+e.charCodeAt(n++)|0;return t.toString()},Bp=(e,t)=>{const s=Qp(e);let n=[];const r=!1,a=!0;for(let d=0;d<s.length;d++){let f=s[d].split("+");n=[],f.length>1&&(n=_p(Ga,f)),f=f[f.length-1],f=f==="*"?"*":Ap(f),f in Ke||(Ke[f]=[]),Ke[f].push({mods:n,shortcut:s[d],key:s[d],method:t,keyup:r,keydown:a,scope:"all",splitKey:"+"})}$p(document,"keydown",d=>{em(d)})};let Re=[];function Qp(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");const t=e.split(",");let s=t.lastIndexOf("");for(;s>=0;)t[s-1]+=",",t.splice(s,1),s=t.lastIndexOf("");return t}const Ke={},Di=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,jp={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":Di?173:189,"=":Di?61:187,";":Di?59:186,"'":222,"[":219,"]":221,"\\":220},Va={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},ve={16:!1,18:!1,17:!1,91:!1},Ga={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Ap=e=>jp[e.toLowerCase()]||Ga[e.toLowerCase()]||e.toUpperCase().charCodeAt(0);function _p(e,t){const s=t.slice(0,t.length-1);for(let n=0;n<s.length;n++)s[n]=e[s[n].toLowerCase()];return s}function $p(e,t,s){e.addEventListener?e.addEventListener(t,s,!1):e.attachEvent&&e.attachEvent(`on${t}`,()=>{s(window.event)})}function qp(e,t,s){let n;if(t.scope===s||t.scope==="all"){n=t.mods.length>0;for(const r in ve)Object.prototype.hasOwnProperty.call(ve,r)&&(!ve[r]&&t.mods.indexOf(+r)>-1||ve[r]&&t.mods.indexOf(+r)===-1)&&(n=!1);(t.mods.length===0&&!ve[16]&&!ve[18]&&!ve[17]&&!ve[91]||n||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function em(e){const t=Ke["*"];let s=e.keyCode||e.which||e.charCode;if((s===93||s===224)&&(s=91),Re.indexOf(s)===-1&&s!==229&&Re.push(s),["ctrlKey","altKey","shiftKey","metaKey"].forEach(n=>{const r=Va[n];e[n]&&Re.indexOf(r)===-1?Re.push(r):!e[n]&&Re.indexOf(r)>-1?Re.splice(Re.indexOf(r),1):n==="metaKey"&&e[n]&&Re.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Re=Re.slice(Re.indexOf(r))))}),!(s in ve&&(ve[s]=!0,!t))){for(const n in ve)Object.prototype.hasOwnProperty.call(ve,n)&&(ve[n]=e[Va[n]]);if(e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Re.indexOf(17)===-1&&Re.push(17),Re.indexOf(18)===-1&&Re.push(18),ve[17]=!0,ve[18]=!0),s in Ke){for(let n=0;n<Ke[s].length;n++)if((e.type==="keydown"&&Ke[s][n].keydown||e.type==="keyup"&&Ke[s][n].keyup)&&Ke[s][n].key){const r=Ke[s][n];qp(e,r,"all")}}}}const Ra="iframe parent ready",va="iframe ok",Kt="highlightLogs",tm=e=>{let t=Ce(Kt)||"";t=t+"["+new Date().getTime()+"] "+e+`
453
- `,He(Kt,t)},sm=()=>Ce(Kt)||"",nm=e=>{if(!e)return;let t=Ce(Kt)||"";t&&(t.startsWith(e)?(t=t.slice(e.length),He(Kt,t)):tm("Unable to clear logs "+e.replace(`
452
+ `,Za=typeof self<"u"&&self.Blob&&new Blob([ga],{type:"text/javascript;charset=utf-8"});function Mp(e){let t;try{if(t=Za&&(self.URL||self.webkitURL).createObjectURL(Za),!t)throw"";const s=new Worker(t,{name:e?.name});return s.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),s}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(ga),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class Op{constructor(t){L(this,"pendingCanvasMutations",new Map),L(this,"rafStamps",{latestId:0,invokeId:null}),L(this,"mirror"),L(this,"logger"),L(this,"worker"),L(this,"snapshotInProgressMap",new Map),L(this,"lastSnapshotTime",new Map),L(this,"options"),L(this,"mutationCb"),L(this,"resetObservers"),L(this,"frozen",!1),L(this,"locked",!1),L(this,"processMutation",(o,a)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(a)});const{sampling:s,win:n,blockClass:r,blockSelector:l,recordCanvas:d,recordLocalVideos:f,recordRemoteVideos:h,initialSnapshotDelay:m,dataURLOptions:p}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.logger=t.logger,this.worker=new Mp,this.worker.onmessage=o=>{const{id:a}=o.data;if(this.snapshotInProgressMap.set(a,!1),!("base64"in o.data)){this.debug(null,"canvas worker received empty message",{id:a,data:o.data,status:o.data.status});return}const{base64:i,type:c,dx:u,dy:b,dw:S,dh:Z}=o.data,I={id:a,type:Zt["2D"],commands:[{property:"clearRect",args:[u,b,S,Z]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:i}],type:c}]},u,b,S,Z]}]};this.debug(null,"canvas worker recording mutation",I),this.mutationCb(I)},this.options=t,d&&s==="all"?(this.debug(null,"initializing canvas mutation observer",{sampling:s}),this.initCanvasMutationObserver(n,r,l)):d&&typeof s=="number"&&(this.debug(null,"initializing canvas fps observer",{sampling:s}),this.initCanvasFPSObserver(f,h,s,n,r,l,{initialSnapshotDelay:m,dataURLOptions:p},t.resizeFactor,t.maxSnapshotDimension))}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}debug(t,...s){if(!this.logger)return;const n=this.mirror.getId(t);let r="[highlight-canvas-manager]";t&&(r=`[highlight-canvas] [id:${n}]`,t.tagName.toLowerCase()==="canvas"&&(r+=` [ctx:${t.__context}]`)),this.logger.debug(r,t,...s)}snapshot(t){return Ve(this,null,function*(){var s;const n=this.mirror.getId(t);if(this.snapshotInProgressMap.get(n)){this.debug(t,"snapshotting already in progress for",n);return}const r=1e3/(typeof this.options.samplingManual=="number"?this.options.samplingManual:1),l=this.lastSnapshotTime.get(n);if(!(l&&new Date().getTime()-l<r)){if(this.debug(t,"starting snapshotting"),t.width===0||t.height===0){this.debug(t,"not yet ready",{width:t.width,height:t.height});return}this.lastSnapshotTime.set(n,new Date().getTime()),this.snapshotInProgressMap.set(n,!0);try{if(this.options.clearWebGLBuffer!==!1&&["webgl","webgl2"].includes(t.__context)){const p=t.getContext(t.__context);((s=p?.getContextAttributes())==null?void 0:s.preserveDrawingBuffer)===!1&&(p.clear(p.COLOR_BUFFER_BIT),this.debug(t,"cleared webgl canvas to load it into memory",{attributes:p?.getContextAttributes()}))}if(t.width===0||t.height===0){this.debug(t,"not yet ready",{width:t.width,height:t.height});return}let d=this.options.resizeFactor||1;if(this.options.maxSnapshotDimension){const p=Math.max(t.width,t.height);d=Math.min(d,this.options.maxSnapshotDimension/p)}const f=t.width*d,h=t.height*d,m=yield createImageBitmap(t,{resizeWidth:f,resizeHeight:h});this.debug(t,"created image bitmap",{width:m.width,height:m.height}),this.worker.postMessage({id:n,bitmap:m,width:f,height:h,dx:0,dy:0,dw:t.width,dh:t.height,dataURLOptions:this.options.dataURLOptions,logDebug:!!this.logger},[m]),this.debug(t,"sent message")}catch(d){this.debug(t,"failed to snapshot",d)}finally{this.snapshotInProgressMap.set(n,!1)}}})}initCanvasFPSObserver(t,s,n,r,l,d,f,h,m){const p=ba(r,l,d,!0),o=1e3/n;let a=0,i;const c=new Map,u=(I,R)=>{const y=[];I.querySelectorAll(R).forEach(v=>y.push(v));const g=document.createNodeIterator(I,Node.ELEMENT_NODE);let X;for(;X=g.nextNode();)X!=null&&X.shadowRoot&&y.push(...u(X.shadowRoot,R));return y},b=I=>{const R=[];return u(r.document,"canvas").forEach(y=>{if(!Se(y,l,d,!0)){this.debug(y,"discovered canvas"),R.push(y);const g=this.mirror.getId(y);c.has(g)||c.set(g,I)}}),R},S=I=>{const R=[];return(t||s)&&u(r.document,"video").forEach(y=>{if(!(!s&&y.src!==""&&y.src.indexOf("blob:")===-1)&&!(!t&&(y.src===""||y.src.indexOf("blob:")!==-1))&&!Se(y,l,d,!0)){R.push(y);const g=this.mirror.getId(y);c.has(g)||c.set(g,I)}}),R},Z=I=>Ve(this,null,function*(){if(a&&I-a<o){i=requestAnimationFrame(g=>void Z(g));return}a=I;const R=g=>{const X=this.mirror.getId(g),v=c.get(X),V=!f.initialSnapshotDelay||I-v>f.initialSnapshotDelay;return this.debug(g,{delay:f.initialSnapshotDelay,delta:I-v,hadLoadingTime:V}),V},y=[];y.push(...b(I).filter(R).map(g=>this.snapshot(g))),y.push(...S(I).filter(R).map(g=>Ve(this,null,function*(){this.debug(g,"starting video snapshotting");const X=this.mirror.getId(g);if(this.snapshotInProgressMap.get(X)){this.debug(g,"video snapshotting already in progress for",X);return}this.snapshotInProgressMap.set(X,!0);try{const{width:v,height:V}=g.getBoundingClientRect(),{actualWidth:W,actualHeight:k}={actualWidth:g.videoWidth,actualHeight:g.videoHeight},N=Math.max(W,k);if(N===0){this.debug(g,"not yet ready",{width:g.width,height:g.height,actualWidth:W,actualHeight:k,boxWidth:v,boxHeight:V});return}let D=h||1;m&&(D=Math.min(D,m/N));const G=W*D,w=k*D,T=yield createImageBitmap(g,{resizeWidth:G,resizeHeight:w}),Y=Math.max(v,V)/N,M=W*Y,U=k*Y,_=(v-M)/2,B=(V-U)/2;this.debug(g,"created image bitmap",{actualWidth:W,actualHeight:k,boxWidth:v,boxHeight:V,outputWidth:M,outputHeight:U,resizeWidth:G,resizeHeight:w,scale:D,outputScale:Y,offsetX:_,offsetY:B}),this.worker.postMessage({id:X,bitmap:T,width:G,height:w,dx:_,dy:B,dw:M,dh:U,dataURLOptions:f.dataURLOptions,logDebug:!!this.logger},[T]),this.debug(g,"send message")}catch(v){this.debug(g,"failed to snapshot",v)}finally{this.snapshotInProgressMap.set(X,!1)}}))),yield Promise.all(y).catch(console.error),i=requestAnimationFrame(g=>void Z(g))});i=requestAnimationFrame(I=>void Z(I)),this.resetObservers=()=>{p(),i&&cancelAnimationFrame(i)}}initCanvasMutationObserver(t,s,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=ba(t,s,n,!1),l=Yp(this.processMutation.bind(this),t,s,n),d=Fp(this.processMutation.bind(this),t,s,n);this.resetObservers=()=>{r(),l(),d()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=s=>{this.rafStamps.latestId=s,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,s)=>{const n=this.mirror.getId(s);this.flushPendingCanvasMutationFor(s,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,s){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||s===-1)return;const r=n.map(d=>ds(d,["type"])),{type:l}=n[0];this.mutationCb({id:s,type:l,commands:r}),this.pendingCanvasMutations.delete(t)}}class Kp{constructor(t){L(this,"trackedLinkElements",new WeakSet),L(this,"mutationCb"),L(this,"adoptedStyleSheetCb"),L(this,"styleMirror",new ap),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,s){"_cssText"in s.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:s.id,attributes:s.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,s){if(t.length===0)return;const n={id:s,styleIds:[]},r=[];for(const l of t){let d;this.styleMirror.has(l)?d=this.styleMirror.getId(l):(d=this.styleMirror.add(l),r.push({styleId:d,rules:Array.from(l.rules||CSSRule,(f,h)=>({rule:io(f,l.href),index:h}))})),n.styleIds.push(d)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Ep{constructor(){L(this,"nodeMap",new WeakMap),L(this,"active",!1)}inOtherBuffer(t,s){const n=this.nodeMap.get(t);return n&&Array.from(n).some(r=>r!==s)}add(t,s){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(s))}destroy(){}}let he,Es,Ot,zs=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Qr=e.contentWindow)==null?void 0:Qr.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Me=zd();function Be(e={}){var t;const{emit:s,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:l="highlight-block",blockSelector:d=null,ignoreClass:f="highlight-ignore",ignoreSelector:h=null,maskTextClass:m="highlight-mask",maskTextSelector:p=null,inlineStylesheet:o=!0,maskAllInputs:a,maskInputOptions:i,slimDOMOptions:c,maskInputFn:u,maskTextFn:b=Sn,hooks:S,packFn:Z,sampling:I={},mousemoveWait:R,recordDOM:y=!0,recordCanvas:g=!1,recordCrossOriginIframes:X=!1,recordAfter:v=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:W=!1,inlineImages:k=!1,inlineVideos:N=!1,plugins:D,keepIframeSrcFn:G=()=>!1,privacySetting:w="default",ignoreCSSAttributes:T=new Set([]),styleSheetResyncInterval:Y=2e3,errorHandler:M,logger:U}=e,_=z(z({},e.dataURLOptions),typeof((t=e.sampling)==null?void 0:t.canvas)=="object"?e.sampling.canvas.dataURLOptions:void 0);fp(M);const B=X?window.parent===window:!0;let C=!1;if(!B)try{window.parent.document&&(C=!1)}catch{C=!0}if(B&&!s)throw new Error("emit function is required");if(!B&&!C)return()=>{};R!==void 0&&I.mousemove===void 0&&(I.mousemove=R),Me.reset();const le=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}:i!==void 0?i:{password:!0},ae=Zo(c);lp();let J,K=0;const O=oe=>{for(const Oe of D||[])Oe.eventProcessor&&(oe=Oe.eventProcessor(oe));return Z&&!C&&(oe=Z(oe)),oe};he=(oe,Oe)=>{var pe;const me=oe;if(me.timestamp=Yt(),(pe=rt[0])!=null&&pe.isFrozen()&&me.type!==ie.FullSnapshot&&!(me.type===ie.IncrementalSnapshot&&me.data.source===te.Mutation)&&rt.forEach(Te=>Te.unfreeze()),B)s?.(O(me),Oe);else if(C){const Te={type:"rrweb",event:O(me),origin:window.location.origin,isCheckout:Oe};window.parent.postMessage(Te,"*")}if(me.type===ie.FullSnapshot)J=me,K=0;else if(me.type===ie.IncrementalSnapshot){if(me.data.source===te.Mutation&&me.data.isAttachIframe)return;K++;const Te=r&&K>=r,ce=n&&me.timestamp-J.timestamp>n;(Te||ce)&&Es(!0)}};const H=oe=>{he({type:ie.IncrementalSnapshot,data:z({source:te.Mutation},oe)})},j=oe=>he({type:ie.IncrementalSnapshot,data:z({source:te.Scroll},oe)}),ee=oe=>he({type:ie.IncrementalSnapshot,data:z({source:te.CanvasMutation},oe)}),A=oe=>he({type:ie.IncrementalSnapshot,data:z({source:te.AdoptedStyleSheet},oe)}),P=new Kp({mutationCb:H,adoptedStyleSheetCb:A}),re=new xp({mirror:Me,mutationCb:H,stylesheetManager:P,recordCrossOriginIframes:X,wrappedEmit:he});for(const oe of D||[])oe.getMirror&&oe.getMirror({nodeMirror:Me,crossOriginIframeMirror:re.crossOriginIframeMirror,crossOriginIframeStyleMirror:re.crossOriginIframeStyleMirror});const We=new Ep,Xt=typeof I?.canvas=="object"?I.canvas:{fps:I?.canvas};Ot=new Op({recordCanvas:g,recordLocalVideos:k,recordRemoteVideos:N,mutationCb:ee,win:window,blockClass:l,blockSelector:d,mirror:Me,sampling:Xt.fps,samplingManual:Xt.fpsManual,clearWebGLBuffer:Xt.clearWebGLBuffer,initialSnapshotDelay:Xt.initialSnapshotDelay,dataURLOptions:_,resizeFactor:Xt.resizeFactor,maxSnapshotDimension:Xt.maxSnapshotDimension,logger:U});const Ds=new Tp({mutationCb:H,scrollCb:j,bypassOptions:{blockClass:l,blockSelector:d,maskTextClass:m,maskTextSelector:p,inlineStylesheet:o,maskInputOptions:le,dataURLOptions:_,maskTextFn:b,maskInputFn:u,recordCanvas:g,inlineImages:k,inlineVideos:N,privacySetting:w,sampling:I,slimDOMOptions:ae,iframeManager:re,stylesheetManager:P,canvasManager:Ot,keepIframeSrcFn:G,processedNodeManager:We},mirror:Me});Es=(oe=!1)=>{if(!y)return;he({type:ie.Meta,data:{href:window.location.href,width:Ql(),height:Bl()}},oe),P.reset(),Ds.init(),rt.forEach(pe=>pe.lock());const Oe=Sh(document,{mirror:Me,blockClass:l,blockSelector:d,maskTextClass:m,maskTextSelector:p,inlineStylesheet:o,maskAllInputs:le,maskTextFn:b,maskInputFn:u,slimDOM:ae,dataURLOptions:_,recordCanvas:g,inlineImages:k,inlineVideos:N,privacySetting:w,onSerialize:pe=>{_l(pe,Me)&&re.addIframe(pe),$l(pe,Me)&&P.trackLinkElement(pe),zi(pe)&&Ds.addShadowRoot($.shadowRoot(pe),document)},onIframeLoad:(pe,me)=>{re.attachIframe(pe,me),Ds.observeAttachShadow(pe)},onStylesheetLoad:(pe,me)=>{P.attachLinkElement(pe,me)},keepIframeSrcFn:G});if(!Oe)return console.warn("Failed to snapshot the document");he({type:ie.FullSnapshot,data:{node:Oe,initialOffset:Dl(window)}},oe),rt.forEach(pe=>pe.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&P.adoptStyleSheets(document.adoptedStyleSheets,Me.getId(document))};try{const oe=[],Oe=me=>{var Te;return se(Cp)({mutationCb:H,mousemoveCb:(ce,er)=>he({type:ie.IncrementalSnapshot,data:{source:er,positions:ce}}),mouseInteractionCb:ce=>he({type:ie.IncrementalSnapshot,data:z({source:te.MouseInteraction},ce)}),scrollCb:j,viewportResizeCb:ce=>he({type:ie.IncrementalSnapshot,data:z({source:te.ViewportResize},ce)}),inputCb:ce=>he({type:ie.IncrementalSnapshot,data:z({source:te.Input},ce)}),mediaInteractionCb:ce=>he({type:ie.IncrementalSnapshot,data:z({source:te.MediaInteraction},ce)}),styleSheetRuleCb:ce=>he({type:ie.IncrementalSnapshot,data:z({source:te.StyleSheetRule},ce)}),styleDeclarationCb:ce=>he({type:ie.IncrementalSnapshot,data:z({source:te.StyleDeclaration},ce)}),canvasMutationCb:ee,fontCb:ce=>he({type:ie.IncrementalSnapshot,data:z({source:te.Font},ce)}),selectionCb:ce=>{he({type:ie.IncrementalSnapshot,data:z({source:te.Selection},ce)})},customElementCb:ce=>{he({type:ie.IncrementalSnapshot,data:z({source:te.CustomElement},ce)})},blockClass:l,ignoreClass:f,ignoreSelector:h,maskTextClass:m,maskTextSelector:p,maskInputOptions:le,inlineStylesheet:o,sampling:I,recordDOM:y,recordCanvas:g,inlineImages:k,inlineVideos:N,userTriggeredOnInput:V,collectFonts:W,doc:me,maskInputFn:u,maskTextFn:b,keepIframeSrcFn:G,blockSelector:d,slimDOMOptions:ae,dataURLOptions:_,mirror:Me,iframeManager:re,stylesheetManager:P,shadowDomManager:Ds,processedNodeManager:We,canvasManager:Ot,ignoreCSSAttributes:T,styleSheetResyncInterval:Y,privacySetting:w,plugins:((Te=D?.filter(ce=>ce.observer))==null?void 0:Te.map(ce=>({observer:ce.observer,options:ce.options,callback:er=>he({type:ie.Plugin,data:{plugin:ce.name,payload:er}})})))||[]},S)};re.addLoadListener(me=>{try{oe.push(Oe(me.contentDocument))}catch(Te){console.warn(Te)}});const pe=()=>{Es(),oe.push(Oe(document)),zs=!0};return["interactive","complete"].includes(document.readyState)?pe():(oe.push(Ge("DOMContentLoaded",()=>{he({type:ie.DomContentLoaded,data:{}}),v==="DOMContentLoaded"&&pe()})),oe.push(Ge("load",()=>{he({type:ie.Load,data:{}}),v==="load"&&pe()},window))),()=>{oe.forEach(me=>{try{me()}catch(Te){String(Te).toLowerCase().includes("cross-origin")||console.warn(Te)}}),We.destroy(),zs=!1,bp()}}catch(oe){console.warn(oe)}}Be.addCustomEvent=(e,t)=>{zs&&he({type:ie.Custom,data:{tag:e,payload:t}})},Be.freezePage=()=>{rt.forEach(e=>e.freeze())},Be.takeFullSnapshot=e=>{if(!zs)throw new Error("please take full snapshot after start recording");Es(e)},Be.snapshotCanvas=e=>Ve(void 0,null,function*(){if(!Ot)throw new Error("canvas manager is not initialized");yield Ot.snapshot(e)}),Be.mirror=Me;var Sa;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Sa||(Sa={}));const{addCustomEvent:Ia}=Be,zp=(e,t,s)=>{switch(e){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!!t,ge(z({},s),{password:!0})]}},Hp=e=>{const t=n=>{if(n.target){const r=n.target,l=Or(r);e(l,n)}},s={capture:!0};return window.addEventListener("click",t,s),()=>window.removeEventListener("click",t,s)},Pp=e=>{const t=s=>{if(s.target){const n=Or(s.target);e(n)}};return window.addEventListener("focusin",t),()=>window.removeEventListener("focusin",t)},Dp=e=>{let t,s;if(typeof document.hidden<"u"?(t="hidden",s="visibilitychange"):typeof document.msHidden<"u"?(t="msHidden",s="msvisibilitychange"):typeof document.webkitHidden<"u"&&(t="webkitHidden",s="webkitvisibilitychange"),s===void 0)return()=>{};if(t===void 0)return()=>{};const n=t,r=()=>{const d=document[n];e(!!d)};document.addEventListener(s,r);const l=s;return()=>document.removeEventListener(l,r)},Bp=e=>{e(window.location.href);var t=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(l){setTimeout(()=>{var d,f;try{f=JSON.parse((d=l?.toString())!=null?d:"")}catch{return}(f.type==="track"||f.type==="identify")&&Pi(f)&&e(f)},100),t.call(this,l)};const s=l=>{if(l.key==="ajs_user_id"||l.key==="ajs_anonymous_id"||l.key==="ajs_user_traits"){const{userId:d,userTraits:f}=Xa();if(d){let h={};f&&(h=JSON.parse(f));const m={type:"identify",userId:d.toString(),traits:h};Pi(m)&&e(m)}}},{userId:n,userTraits:r}=Xa();if(n){let l={};r&&(l=JSON.parse(r));const d={type:"identify",userId:n.toString(),traits:l};Pi(d)&&e(d)}return window.addEventListener("storage",s),Tu(({keyName:l})=>{s({key:l})}),()=>{window.removeEventListener("storage",s),XMLHttpRequest.prototype.send=t}},Xa=()=>{const e=Ce("ajs_user_id"),t=Ce("ajs_user_traits"),s=Ce("ajs_anonymous_id");return{userId:e,userTraits:t,anonymousId:s}},Pi=e=>{if(!e)return!1;let t="";try{t=JSON.stringify(e)}catch{return!1}const s=Qp(t),n=Ce(Xe.SEGMENT_LAST_SENT_HASH_KEY);return n===void 0||s!==n?(He(Xe.SEGMENT_LAST_SENT_HASH_KEY,s),!0):!1},Qp=e=>{var t=0,s=e.length,n=0;if(s>0)for(;n<s;)t=(t<<5)-t+e.charCodeAt(n++)|0;return t.toString()},jp=(e,t)=>{const s=Ap(e);let n=[];const r=!1,l=!0;for(let d=0;d<s.length;d++){let f=s[d].split("+");n=[],f.length>1&&(n=qp(Ga,f)),f=f[f.length-1],f=f==="*"?"*":$p(f),f in Ke||(Ke[f]=[]),Ke[f].push({mods:n,shortcut:s[d],key:s[d],method:t,keyup:r,keydown:l,scope:"all",splitKey:"+"})}em(document,"keydown",d=>{sm(d)})};let Re=[];function Ap(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");const t=e.split(",");let s=t.lastIndexOf("");for(;s>=0;)t[s-1]+=",",t.splice(s,1),s=t.lastIndexOf("");return t}const Ke={},Di=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,_p={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":Di?173:189,"=":Di?61:187,";":Di?59:186,"'":222,"[":219,"]":221,"\\":220},Va={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},ve={16:!1,18:!1,17:!1,91:!1},Ga={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},$p=e=>_p[e.toLowerCase()]||Ga[e.toLowerCase()]||e.toUpperCase().charCodeAt(0);function qp(e,t){const s=t.slice(0,t.length-1);for(let n=0;n<s.length;n++)s[n]=e[s[n].toLowerCase()];return s}function em(e,t,s){e.addEventListener?e.addEventListener(t,s,!1):e.attachEvent&&e.attachEvent(`on${t}`,()=>{s(window.event)})}function tm(e,t,s){let n;if(t.scope===s||t.scope==="all"){n=t.mods.length>0;for(const r in ve)Object.prototype.hasOwnProperty.call(ve,r)&&(!ve[r]&&t.mods.indexOf(+r)>-1||ve[r]&&t.mods.indexOf(+r)===-1)&&(n=!1);(t.mods.length===0&&!ve[16]&&!ve[18]&&!ve[17]&&!ve[91]||n||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function sm(e){const t=Ke["*"];let s=e.keyCode||e.which||e.charCode;if((s===93||s===224)&&(s=91),Re.indexOf(s)===-1&&s!==229&&Re.push(s),["ctrlKey","altKey","shiftKey","metaKey"].forEach(n=>{const r=Va[n];e[n]&&Re.indexOf(r)===-1?Re.push(r):!e[n]&&Re.indexOf(r)>-1?Re.splice(Re.indexOf(r),1):n==="metaKey"&&e[n]&&Re.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Re=Re.slice(Re.indexOf(r))))}),!(s in ve&&(ve[s]=!0,!t))){for(const n in ve)Object.prototype.hasOwnProperty.call(ve,n)&&(ve[n]=e[Va[n]]);if(e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Re.indexOf(17)===-1&&Re.push(17),Re.indexOf(18)===-1&&Re.push(18),ve[17]=!0,ve[18]=!0),s in Ke){for(let n=0;n<Ke[s].length;n++)if((e.type==="keydown"&&Ke[s][n].keydown||e.type==="keyup"&&Ke[s][n].keyup)&&Ke[s][n].key){const r=Ke[s][n];tm(e,r,"all")}}}}const Ra="iframe parent ready",va="iframe ok",Kt="highlightLogs",nm=e=>{let t=Ce(Kt)||"";t=t+"["+new Date().getTime()+"] "+e+`
453
+ `,He(Kt,t)},im=()=>Ce(Kt)||"",rm=e=>{if(!e)return;let t=Ce(Kt)||"";t&&(t.startsWith(e)?(t=t.slice(e.length),He(Kt,t)):nm("Unable to clear logs "+e.replace(`
454
454
  `," ")+" from "+t.replace(`
455
- `," ")))};var xe=Uint8Array,Je=Uint16Array,Bi=Int32Array,Qi=new xe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ji=new xe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Wa=new xe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),wa=function(e,t){for(var s=new Je(31),n=0;n<31;++n)s[n]=t+=1<<e[n-1];for(var r=new Bi(s[30]),n=1;n<30;++n)for(var a=s[n];a<s[n+1];++a)r[a]=a-s[n]<<5|n;return{b:s,r}},ka=wa(Qi,2),im=ka.b,Ai=ka.r;im[28]=258,Ai[258]=28;for(var rm=wa(ji,0),Ca=rm.r,xa=new Je(32768),de=0;de<32768;++de){var et=(de&43690)>>1|(de&21845)<<1;et=(et&52428)>>2|(et&13107)<<2,et=(et&61680)>>4|(et&3855)<<4,xa[de]=((et&65280)>>8|(et&255)<<8)>>1}for(var Et=function(e,t,s){for(var n=e.length,r=0,a=new Je(t);r<n;++r)e[r]&&++a[e[r]-1];var d=new Je(t);for(r=1;r<t;++r)d[r]=d[r-1]+a[r-1]<<1;var f;for(f=new Je(n),r=0;r<n;++r)e[r]&&(f[r]=xa[d[e[r]-1]++]>>15-e[r]);return f},ot=new xe(288),de=0;de<144;++de)ot[de]=8;for(var de=144;de<256;++de)ot[de]=9;for(var de=256;de<280;++de)ot[de]=7;for(var de=280;de<288;++de)ot[de]=8;for(var Hs=new xe(32),de=0;de<32;++de)Hs[de]=5;var om=Et(ot,9),lm=Et(Hs,5),Ta=function(e){return(e+7)/8|0},La=function(e,t,s){return(s==null||s>e.length)&&(s=e.length),new xe(e.subarray(t,s))},Qe=function(e,t,s){s<<=t&7;var n=t/8|0;e[n]|=s,e[n+1]|=s>>8},zt=function(e,t,s){s<<=t&7;var n=t/8|0;e[n]|=s,e[n+1]|=s>>8,e[n+2]|=s>>16},_i=function(e,t){for(var s=[],n=0;n<e.length;++n)e[n]&&s.push({s:n,f:e[n]});var r=s.length,a=s.slice();if(!r)return{t:Ua,l:0};if(r==1){var d=new xe(s[0].s+1);return d[s[0].s]=1,{t:d,l:1}}s.sort(function(y,g){return y.f-g.f}),s.push({s:-1,f:25001});var f=s[0],h=s[1],m=0,p=1,o=2;for(s[0]={s:-1,f:f.f+h.f,l:f,r:h};p!=r-1;)f=s[s[m].f<s[o].f?m++:o++],h=s[m!=p&&s[m].f<s[o].f?m++:o++],s[p++]={s:-1,f:f.f+h.f,l:f,r:h};for(var l=a[0].s,n=1;n<r;++n)a[n].s>l&&(l=a[n].s);var i=new Je(l+1),c=$i(s[p-1],i,0);if(c>t){var n=0,u=0,b=c-t,S=1<<b;for(a.sort(function(g,X){return i[X.s]-i[g.s]||g.f-X.f});n<r;++n){var Z=a[n].s;if(i[Z]>t)u+=S-(1<<c-i[Z]),i[Z]=t;else break}for(u>>=b;u>0;){var I=a[n].s;i[I]<t?u-=1<<t-i[I]++-1:++n}for(;n>=0&&u;--n){var R=a[n].s;i[R]==t&&(--i[R],++u)}c=t}return{t:new xe(i),l:c}},$i=function(e,t,s){return e.s==-1?Math.max($i(e.l,t,s+1),$i(e.r,t,s+1)):t[e.s]=s},Na=function(e){for(var t=e.length;t&&!e[--t];);for(var s=new Je(++t),n=0,r=e[0],a=1,d=function(h){s[n++]=h},f=1;f<=t;++f)if(e[f]==r&&f!=t)++a;else{if(!r&&a>2){for(;a>138;a-=138)d(32754);a>2&&(d(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(d(r),--a;a>6;a-=6)d(8304);a>2&&(d(a-3<<5|8208),a=0)}for(;a--;)d(r);a=1,r=e[f]}return{c:s.subarray(0,n),n:t}},Ht=function(e,t){for(var s=0,n=0;n<t.length;++n)s+=e[n]*t[n];return s},Ja=function(e,t,s){var n=s.length,r=Ta(t+2);e[r]=n&255,e[r+1]=n>>8,e[r+2]=e[r]^255,e[r+3]=e[r+1]^255;for(var a=0;a<n;++a)e[r+a+4]=s[a];return(r+4+n)*8},Ya=function(e,t,s,n,r,a,d,f,h,m,p){Qe(t,p++,s),++r[256];for(var o=_i(r,15),l=o.t,i=o.l,c=_i(a,15),u=c.t,b=c.l,S=Na(l),Z=S.c,I=S.n,R=Na(u),y=R.c,g=R.n,X=new Je(19),v=0;v<Z.length;++v)++X[Z[v]&31];for(var v=0;v<y.length;++v)++X[y[v]&31];for(var V=_i(X,7),W=V.t,k=V.l,N=19;N>4&&!W[Wa[N-1]];--N);var D=m+5<<3,G=Ht(r,ot)+Ht(a,Hs)+d,w=Ht(r,l)+Ht(a,u)+d+14+3*N+Ht(X,W)+2*X[16]+3*X[17]+7*X[18];if(h>=0&&D<=G&&D<=w)return Ja(t,p,e.subarray(h,h+m));var T,Y,M,U;if(Qe(t,p,1+(w<G)),p+=2,w<G){T=Et(l,i),Y=l,M=Et(u,b),U=u;var _=Et(W,k);Qe(t,p,I-257),Qe(t,p+5,g-1),Qe(t,p+10,N-4),p+=14;for(var v=0;v<N;++v)Qe(t,p+3*v,W[Wa[v]]);p+=3*N;for(var B=[Z,y],C=0;C<2;++C)for(var le=B[C],v=0;v<le.length;++v){var ae=le[v]&31;Qe(t,p,_[ae]),p+=W[ae],ae>15&&(Qe(t,p,le[v]>>5&127),p+=le[v]>>12)}}else T=om,Y=ot,M=lm,U=Hs;for(var v=0;v<f;++v){var J=n[v];if(J>255){var ae=J>>18&31;zt(t,p,T[ae+257]),p+=Y[ae+257],ae>7&&(Qe(t,p,J>>23&31),p+=Qi[ae]);var K=J&31;zt(t,p,M[K]),p+=U[K],K>3&&(zt(t,p,J>>5&8191),p+=ji[K])}else zt(t,p,T[J]),p+=Y[J]}return zt(t,p,T[256]),p+Y[256]},am=new Bi([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Ua=new xe(0),cm=function(e,t,s,n,r,a){var d=a.z||e.length,f=new xe(n+d+5*(1+Math.ceil(d/7e3))+r),h=f.subarray(n,f.length-r),m=a.l,p=(a.r||0)&7;if(t){p&&(h[0]=a.r>>3);for(var o=am[t-1],l=o>>13,i=o&8191,c=(1<<s)-1,u=a.p||new Je(32768),b=a.h||new Je(c+1),S=Math.ceil(s/3),Z=2*S,I=function(We){return(e[We]^e[We+1]<<S^e[We+2]<<Z)&c},R=new Bi(25e3),y=new Je(288),g=new Je(32),X=0,v=0,V=a.i||0,W=0,k=a.w||0,N=0;V+2<d;++V){var D=I(V),G=V&32767,w=b[D];if(u[G]=w,b[D]=G,k<=V){var T=d-V;if((X>7e3||W>24576)&&(T>423||!m)){p=Ya(e,h,0,R,y,g,v,W,N,V-N,p),W=X=v=0,N=V;for(var Y=0;Y<286;++Y)y[Y]=0;for(var Y=0;Y<30;++Y)g[Y]=0}var M=2,U=0,_=i,B=G-w&32767;if(T>2&&D==I(V-B))for(var C=Math.min(l,T)-1,le=Math.min(32767,V),ae=Math.min(258,T);B<=le&&--_&&G!=w;){if(e[V+M]==e[V+M-B]){for(var J=0;J<ae&&e[V+J]==e[V+J-B];++J);if(J>M){if(M=J,U=B,J>C)break;for(var K=Math.min(B,J-2),O=0,Y=0;Y<K;++Y){var H=V-B+Y&32767,j=u[H],ee=H-j&32767;ee>O&&(O=ee,w=H)}}}G=w,w=u[G],B+=G-w&32767}if(U){R[W++]=268435456|Ai[M]<<18|Ca[U];var A=Ai[M]&31,P=Ca[U]&31;v+=Qi[A]+ji[P],++y[257+A],++g[P],k=V+M,++X}else R[W++]=e[V],++y[e[V]]}}for(V=Math.max(V,k);V<d;++V)R[W++]=e[V],++y[e[V]];p=Ya(e,h,m,R,y,g,v,W,N,V-N,p),m||(a.r=p&7|h[p/8|0]<<3,p-=7,a.h=b,a.p=u,a.i=V,a.w=k)}else{for(var V=a.w||0;V<d+m;V+=65535){var re=V+65535;re>=d&&(h[p/8|0]=m,re=d),p=Ja(h,p+1,e.subarray(V,re))}a.i=d}return La(f,0,n+Ta(p)+r)},um=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var s=t,n=9;--n;)s=(s&1&&-306674912)^s>>>1;e[t]=s}return e}(),dm=function(){var e=-1;return{p:function(t){for(var s=e,n=0;n<t.length;++n)s=um[s&255^t[n]]^s>>>8;e=s},d:function(){return~e}}},hm=function(e,t,s,n,r){if(!r&&(r={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),d=new xe(a.length+e.length);d.set(a),d.set(e,a.length),e=d,r.w=a.length}return cm(e,t.level==null?6:t.level,t.mem==null?r.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,s,n,r)},qi=function(e,t,s){for(;s;++t)e[t]=s,s>>>=8},pm=function(e,t){var s=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&qi(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),s){e[3]=8;for(var n=0;n<=s.length;++n)e[n+10]=s.charCodeAt(n)}},mm=function(e){return 10+(e.filename?e.filename.length+1:0)};function fm(e,t){t||(t={});var s=dm(),n=e.length;s.p(e);var r=hm(e,t,mm(t),8),a=r.length;return pm(r,t),qi(r,a-8,s.d()),qi(r,a-4,n),r}var Fa=typeof TextEncoder<"u"&&new TextEncoder,bm=typeof TextDecoder<"u"&&new TextDecoder;try{bm.decode(Ua,{stream:!0})}catch{}function ym(e,t){var s;if(Fa)return Fa.encode(e);for(var n=e.length,r=new xe(e.length+(e.length>>1)),a=0,d=function(p){r[a++]=p},s=0;s<n;++s){if(a+5>r.length){var f=new xe(a+8+(n-s<<1));f.set(r),r=f}var h=e.charCodeAt(s);h<128||t?d(h):h<2048?(d(192|h>>6),d(128|h&63)):h>55295&&h<57344?(h=65536+(h&1047552)|e.charCodeAt(++s)&1023,d(240|h>>18),d(128|h>>12&63),d(128|h>>6&63),d(128|h&63)):(d(224|h>>12),d(128|h>>6&63),d(128|h&63))}return La(r,0,a)}function gm(e){return Ve(this,null,function*(){const t=ym(JSON.stringify(e)),s=fm(t),n=yield new Promise(r=>{const a=new FileReader;a.onload=()=>r(a.result),a.readAsDataURL(new Blob([new Uint8Array(s)]))});return{compressedBase64:n.slice(n.indexOf(",")+1),compressedSize:s.length,bufferLength:t.length}})}const Ma="dmFyIFVyPU9iamVjdC5kZWZpbmVQcm9wZXJ0eSxWcj1PYmplY3QuZGVmaW5lUHJvcGVydGllczt2YXIgcXI9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcnM7dmFyICRlPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHM7dmFyIHRuPU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHksbm49T2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJsZTt2YXIgaHQ9KEYsJCxCKT0+JCBpbiBGP1VyKEYsJCx7ZW51bWVyYWJsZTohMCxjb25maWd1cmFibGU6ITAsd3JpdGFibGU6ITAsdmFsdWU6Qn0pOkZbJF09QixEPShGLCQpPT57Zm9yKHZhciBCIGluICR8fCgkPXt9KSl0bi5jYWxsKCQsQikmJmh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YS5tZXNzYWdlLmRlYnVnLG89di5kYXRhLm1lc3NhZ2UucmVjb3JkaW5nU3RhcnRUaW1lLGMuZGVidWc9cyxlPXByKG5ldyBIbih0LHtoZWFkZXJzOnt9fSksTXIoKSkseWllbGQgcSgpO3JldHVybn1pZih2LmRhdGEubWVzc2FnZS50eXBlPT09Wi5SZXNldCl7ZC5sZW5ndGg9MCxoLmxlbmd0aD0wLGk9MCxyPTAsbj0iIixvPTA7cmV0dXJufWlmKHYuZGF0YS5tZXNzYWdlLnR5cGU9PT1aLkdldFN0YXR1cyl7U2UucG9zdE1lc3NhZ2Uoe3Jlc3BvbnNlOnt0eXBlOlouR2V0U3RhdHVzLHBlbmRpbmdDb3VudDpkLmxlbmd0aCxpbml0aWFsaXplZDp1KCl9fSk7cmV0dXJufWlmKCF1KCkpe2QucHVzaCh2LmRhdGEubWVzc2FnZSk7cmV0dXJufXRyeXt5aWVsZCBQKHYuZGF0YS5tZXNzYWdlKSxpPTAseWllbGQgcSgpfWNhdGNoKEUpe3MmJmNvbnNvbGUuZXJyb3IoRSksaSs9MX19KX19fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aGlnaGxpZ2h0LWNsaWVudC13b3JrZXItRHNiS01weHEuanMubWFwCg==",Zm=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),Oa=typeof self<"u"&&self.Blob&&new Blob([Zm(Ma)],{type:"text/javascript;charset=utf-8"});function Sm(e){let t;try{if(t=Oa&&(self.URL||self.webkitURL).createObjectURL(Oa),!t)throw"";const s=new Worker(t,{name:e?.name});return s.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),s}catch{return new Worker("data:text/javascript;base64,"+Ma,{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var Ee=(e=>(e[e.Initialize=0]="Initialize",e[e.Reset=1]="Reset",e[e.AsyncEvents=2]="AsyncEvents",e[e.Identify=3]="Identify",e[e.Properties=4]="Properties",e[e.Metrics=5]="Metrics",e[e.Feedback=6]="Feedback",e[e.CustomEvent=7]="CustomEvent",e[e.Stop=8]="Stop",e[e.GetStatus=9]="GetStatus",e))(Ee||{});const Im=({apiKey:e})=>{(function(t,s){var n=t.amplitude||{_q:[],_iq:{}},r=s.createElement("script");r.type="text/javascript",r.integrity="sha384-+EO59vL/X7v6VE2s6/F4HxfHlK0nDUVWKVg8K9oUlvffAeeaShVBmbORTC2D3UF+",r.crossOrigin="anonymous",r.async=!0,r.src="https://cdn.amplitude.com/libs/amplitude-8.17.0-min.gz.js",r.onload=function(){t.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK"),amplitude.getInstance().init(e)};var a=s.getElementsByTagName("script")[0];a.parentNode.insertBefore(r,a);function d(u,b){u.prototype[b]=function(){return this._q.push([b].concat(Array.prototype.slice.call(arguments,0))),this}}for(var f=function(){return this._q=[],this},h=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove"],m=0;m<h.length;m++)d(f,h[m]);n.Identify=f;for(var p=function(){return this._q=[],this},o=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"],l=0;l<o.length;l++)d(p,o[l]);n.Revenue=p;var i=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","enableTracking","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"];function c(u){function b(Z){u[Z]=function(){u._q.push([Z].concat(Array.prototype.slice.call(arguments,0)))}}for(var S=0;S<i.length;S++)b(i[S])}c(n),n.getInstance=function(u){return u=(!u||u.length===0?"$default_instance":u).toLowerCase(),Object.prototype.hasOwnProperty.call(n._iq,u)||(n._iq[u]={_q:[]},c(n._iq[u])),n._iq[u]},t.amplitude=n})(window,document)},Xm=({projectToken:e})=>{if(window.mixpanel)return;(function(s,n){if(!n.__SV){var r,a;window.mixpanel=n,n._i=[],n.init=function(d,f,h){function m(l,i){var c=i.split(".");c.length==2&&(l=l[c[0]],i=c[1]),l[i]=function(){l.push([i].concat(Array.prototype.slice.call(arguments,0)))}}var p=n;for(typeof h<"u"?p=n[h]=[]:h="mixpanel",p.people=p.people||[],p.toString=function(l){var i="mixpanel";return h!=="mixpanel"&&(i+="."+h),l||(i+=" (stub)"),i},p.people.toString=function(){return p.toString(1)+".people (stub)"},r="disable time_event track track_pageview track_links track_forms track_with_groups add_group set_group remove_group register register_once alias unregister identify name_tag set_config reset opt_in_tracking opt_out_tracking has_opted_in_tracking has_opted_out_tracking clear_opt_in_out_tracking start_batch_senders people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user people.remove".split(" "),a=0;a<r.length;a++)m(p,r[a]);var o="set set_once union unset remove delete".split(" ");p.get_group=function(){function l(b){i[b]=function(){call2_args=arguments,call2=[b].concat(Array.prototype.slice.call(call2_args,0)),p.push([c,call2])}}for(var i={},c=["get_group"].concat(Array.prototype.slice.call(arguments,0)),u=0;u<o.length;u++)l(o[u]);return i},n._i.push([d,f,h])},n.__SV=1.2}})(document,window.mixpanel||[]);const t=document.createElement("script");t.src=Vm,document.head.appendChild(t),t.addEventListener("load",()=>{var s;(s=window.mixpanel)==null||s.init(e)})},Vm="https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";var Ps;class Gm{constructor(t){Q(this,"options"),Q(this,"isRunningOnHighlight"),Q(this,"organizationID"),hd(this,Ps),Q(this,"events"),Q(this,"sessionData"),Q(this,"ready"),Q(this,"manualStopped"),Q(this,"state"),Q(this,"logger"),Q(this,"enableSegmentIntegration"),Q(this,"privacySetting"),Q(this,"enableCanvasRecording"),Q(this,"samplingStrategy"),Q(this,"inlineImages"),Q(this,"inlineVideos"),Q(this,"inlineStylesheet"),Q(this,"styleSheetResyncInterval"),Q(this,"debugOptions"),Q(this,"listeners"),Q(this,"firstloadVersion"),Q(this,"environment"),Q(this,"sessionShortcut"),Q(this,"appVersion"),Q(this,"serviceName"),Q(this,"_worker"),Q(this,"_optionsInternal"),Q(this,"_backendUrl"),Q(this,"_recordingStartTime"),Q(this,"_isOnLocalHost"),Q(this,"_onToggleFeedbackFormVisibility"),Q(this,"_isCrossOriginIframe"),Q(this,"_eventBytesSinceSnapshot"),Q(this,"_lastSnapshotTime"),Q(this,"_lastVisibilityChangeTime"),Q(this,"pushPayloadTimerId"),Q(this,"hasSessionUnloaded"),Q(this,"hasPushedData"),Q(this,"reloaded"),Q(this,"_hasPreviouslyInitialized"),Q(this,"_recordStop"),Q(this,"_integrations",[]);var s,n,r,a,d;this.options=t,typeof((s=this.options)==null?void 0:s.debug)=="boolean"?this.debugOptions=this.options.debug?{clientInteractions:!0}:{}:this.debugOptions=(r=(n=this.options)==null?void 0:n.debug)!=null?r:{},this.logger=new sr(this.debugOptions.clientInteractions),this._worker=new Sm,this._worker.onmessage=h=>{var m,p,o;((m=h.data.response)==null?void 0:m.type)===Ee.AsyncEvents?(this._eventBytesSinceSnapshot+=h.data.response.eventsSize,this.logger.log(`Web worker sent payloadID ${h.data.response.id} size ${h.data.response.eventsSize} bytes, compression ratio ${h.data.response.eventsSize/h.data.response.compressedSize}.
456
- Total since snapshot: ${(this._eventBytesSinceSnapshot/1e6).toFixed(1)}MB`)):((p=h.data.response)==null?void 0:p.type)===Ee.CustomEvent?this.addCustomEvent(h.data.response.tag,h.data.response.payload):((o=h.data.response)==null?void 0:o.type)===Ee.Stop&&(we("worker.onmessage","warn","Stopping recording due to worker failure",h.data.response),this.stop(!1))};let f=cs();if(this.reloaded=!1,!((a=this.sessionData)!=null&&a.sessionSecureID)&&f!=null&&f.sessionSecureID)this.sessionData=f,this.options.sessionSecureID=f.sessionSecureID,this.reloaded=!0,this.logger.log(`Tab reloaded, continuing previous session: ${this.sessionData.sessionSecureID}`);else{for(const h of Object.values(Xe))ls(h);this.sessionData={sessionSecureID:this.options.sessionSecureID,projectID:0,sessionStartTime:Date.now()}}this._hasPreviouslyInitialized=!1;try{window.parent.document&&(this._isCrossOriginIframe=!1)}catch{this._isCrossOriginIframe=(d=this.options.recordCrossOriginIframe)!=null?d:!0}this._initMembers(this.options)}_reset(t){return Ve(this,arguments,function*({forceNew:s,sessionKey:n}){this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0);let r,a;if(!s)try{r=Ce(Xe.USER_IDENTIFIER);const d=Ce(Xe.USER_OBJECT);d&&(a=JSON.parse(d))}catch{}for(const d of Object.values(Xe))ls(d);this.sessionData.sessionSecureID=n?Ct(`${this.organizationID}-${n}`):Ct(),this.sessionData.sessionKey=n,this.sessionData.sessionStartTime=Date.now(),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.stop(),this._worker.postMessage({message:{type:Ee.Reset}}),yield this.start(),r&&a&&this.identify(r,a)})}_initMembers(t){var s,n,r,a,d,f,h,m,p,o;this.sessionShortcut=!1,this._recordingStartTime=0,this._isOnLocalHost=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname==="",this.ready=!1,this.state="NotRecording",this.manualStopped=!1,this.enableSegmentIntegration=!!t.enableSegmentIntegration,this.privacySetting=(s=t.privacySetting)!=null?s:"default",this.enableCanvasRecording=(n=t.enableCanvasRecording)!=null?n:!1,this.inlineImages=(r=t.inlineImages)!=null?r:this._isOnLocalHost,this.inlineVideos=(a=t.inlineVideos)!=null?a:this._isOnLocalHost,this.inlineStylesheet=(d=t.inlineStylesheet)!=null?d:this._isOnLocalHost,this.styleSheetResyncInterval=(f=t.styleSheetResyncInterval)!=null?f:2e3,this.samplingStrategy=z({canvasFactor:.5,canvasMaxSnapshotDimension:360,canvasClearWebGLBuffer:!0,dataUrlOptions:bu()},(h=t.samplingStrategy)!=null?h:{canvas:2}),this._backendUrl=(m=t?.backendUrl)!=null?m:"https://pub.observability.app.launchdarkly.com",this._backendUrl[0]==="/"&&(this._backendUrl=new URL(this._backendUrl,document.baseURI).href);const l=new Dc(`${this._backendUrl}`,{headers:{}});pd(this,Ps,mu(l,Ku())),this.environment=(p=t.environment)!=null?p:"production",this.appVersion=t.appVersion,this.serviceName=(o=t.serviceName)!=null?o:"browser",typeof t.organizationID=="string"?this.organizationID=t.organizationID:this.organizationID=t.organizationID.toString(),this.isRunningOnHighlight=this.organizationID==="1"||this.organizationID==="1jdkoe52",this.firstloadVersion=t.firstloadVersion||"unknown",this.sessionShortcut=t.sessionShortcut||!1,this._onToggleFeedbackFormVisibility=()=>{};const i=t,c=ds(i,["firstloadVersion"]);this._optionsInternal=c,this.listeners=[],this.events=[],this.hasSessionUnloaded=!1,this.hasPushedData=!1,window.Intercom&&window.Intercom("onShow",()=>{window.Intercom("update",{highlightSessionURL:this.getCurrentSessionURLWithTimestamp()}),this.addProperties({event:"Intercom onShow"})}),this._eventBytesSinceSnapshot=0,this._lastSnapshotTime=new Date().getTime(),this._lastVisibilityChangeTime=new Date().getTime()}identify(t,s={},n){if(!t||t===""){we("identify","warn","Highlight's identify() call was passed an empty identifier.",{user_identifier:t,user_object:s});return}this.sessionData.userIdentifier=t.toString(),this.sessionData.userObject=s,He(Xe.USER_IDENTIFIER,t.toString()),He(Xe.USER_OBJECT,JSON.stringify(s)),this._worker.postMessage({message:{type:Ee.Identify,userIdentifier:t,userObject:s,source:n}})}track(t,s){this.addProperties(ge(z({},s),{event:t}))}addProperties(t={},s){const n=z({},t);Object.entries(n).forEach(([r,a])=>{try{structuredClone(a)}catch{delete n[r]}}),this._worker.postMessage({message:{type:Ee.Properties,propertiesObject:n,propertyType:s}})}addSessionProperties(t){this.addProperties(t,{type:"session"})}start(t){return Ve(this,null,function*(){var s,n,r,a,d,f,h,m,p,o;if(!((s=navigator?.userAgent)!=null&&s.includes("Googlebot")||(n=navigator?.userAgent)!=null&&n.includes("AdsBot")))try{if(t!=null&&t.forceNew){yield this._reset(t);return}if(t!=null&&t.sessionKey&&t?.sessionKey!==this.sessionData.sessionKey){yield this._reset(ge(z({},t),{forceNew:!0}));return}this.logger.log("Initializing...",t,this.sessionData,this.options),this.sessionData=(r=cs(this.sessionData.sessionSecureID))!=null?r:this.sessionData,(a=this.sessionData)!=null&&a.sessionStartTime?this._recordingStartTime=(d=this.sessionData)==null?void 0:d.sessionStartTime:(this._recordingStartTime=new Date().getTime(),this.sessionData.sessionStartTime=this._recordingStartTime);let l=Ce(hn.CLIENT_ID);l||(l=Ct(),He(hn.CLIENT_ID,l));let i;this.options.disableSessionRecording||this.options.disableNetworkRecording!==void 0||typeof this.options.networkRecording=="boolean"?i=!1:i=((f=this.options.networkRecording)==null?void 0:f.recordHeadersAndBody)||!1;let c=[];if(typeof this.options.networkRecording=="object"&&(h=this.options.networkRecording.destinationDomains)!=null&&h.length&&(c=this.options.networkRecording.destinationDomains),this._isCrossOriginIframe)yield this._setupCrossOriginIframe();else{const I=yield dd(this,Ps).initializeSession({organization_verbose_id:this.organizationID,enable_strict_privacy:this.privacySetting==="strict",privacy_setting:this.privacySetting,enable_recording_network_contents:i,clientVersion:this.firstloadVersion,firstloadVersion:this.firstloadVersion,clientConfig:JSON.stringify(this._optionsInternal),environment:this.environment,id:l,appVersion:this.appVersion,serviceName:this.serviceName,session_secure_id:this.sessionData.sessionSecureID,session_key:this.sessionData.sessionKey,client_id:l,network_recording_domains:c,disable_session_recording:this.options.disableSessionRecording});if(I.initializeSession.secure_id!==this.sessionData.sessionSecureID&&this.logger.log(`Unexpected secure id returned by initializeSession: ${I.initializeSession.secure_id}, expected ${this.sessionData.sessionSecureID}`),this.sessionData.sessionSecureID=I.initializeSession.secure_id,this.sessionData.projectID=parseInt(((m=I?.initializeSession)==null?void 0:m.project_id)||"0"),!this.sessionData.projectID||!this.sessionData.sessionSecureID){console.error("Failed to initialize Highlight; an error occurred on our end.",this.sessionData);return}}kt(""),st(this.sessionData),this.logger.log(`Loaded Highlight
455
+ `," ")))};var xe=Uint8Array,Je=Uint16Array,Bi=Int32Array,Qi=new xe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ji=new xe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Wa=new xe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),wa=function(e,t){for(var s=new Je(31),n=0;n<31;++n)s[n]=t+=1<<e[n-1];for(var r=new Bi(s[30]),n=1;n<30;++n)for(var l=s[n];l<s[n+1];++l)r[l]=l-s[n]<<5|n;return{b:s,r}},ka=wa(Qi,2),om=ka.b,Ai=ka.r;om[28]=258,Ai[258]=28;for(var lm=wa(ji,0),Ca=lm.r,xa=new Je(32768),de=0;de<32768;++de){var et=(de&43690)>>1|(de&21845)<<1;et=(et&52428)>>2|(et&13107)<<2,et=(et&61680)>>4|(et&3855)<<4,xa[de]=((et&65280)>>8|(et&255)<<8)>>1}for(var Et=function(e,t,s){for(var n=e.length,r=0,l=new Je(t);r<n;++r)e[r]&&++l[e[r]-1];var d=new Je(t);for(r=1;r<t;++r)d[r]=d[r-1]+l[r-1]<<1;var f;for(f=new Je(n),r=0;r<n;++r)e[r]&&(f[r]=xa[d[e[r]-1]++]>>15-e[r]);return f},ot=new xe(288),de=0;de<144;++de)ot[de]=8;for(var de=144;de<256;++de)ot[de]=9;for(var de=256;de<280;++de)ot[de]=7;for(var de=280;de<288;++de)ot[de]=8;for(var Hs=new xe(32),de=0;de<32;++de)Hs[de]=5;var am=Et(ot,9),cm=Et(Hs,5),Ta=function(e){return(e+7)/8|0},La=function(e,t,s){return(s==null||s>e.length)&&(s=e.length),new xe(e.subarray(t,s))},Qe=function(e,t,s){s<<=t&7;var n=t/8|0;e[n]|=s,e[n+1]|=s>>8},zt=function(e,t,s){s<<=t&7;var n=t/8|0;e[n]|=s,e[n+1]|=s>>8,e[n+2]|=s>>16},_i=function(e,t){for(var s=[],n=0;n<e.length;++n)e[n]&&s.push({s:n,f:e[n]});var r=s.length,l=s.slice();if(!r)return{t:Ua,l:0};if(r==1){var d=new xe(s[0].s+1);return d[s[0].s]=1,{t:d,l:1}}s.sort(function(y,g){return y.f-g.f}),s.push({s:-1,f:25001});var f=s[0],h=s[1],m=0,p=1,o=2;for(s[0]={s:-1,f:f.f+h.f,l:f,r:h};p!=r-1;)f=s[s[m].f<s[o].f?m++:o++],h=s[m!=p&&s[m].f<s[o].f?m++:o++],s[p++]={s:-1,f:f.f+h.f,l:f,r:h};for(var a=l[0].s,n=1;n<r;++n)l[n].s>a&&(a=l[n].s);var i=new Je(a+1),c=$i(s[p-1],i,0);if(c>t){var n=0,u=0,b=c-t,S=1<<b;for(l.sort(function(g,X){return i[X.s]-i[g.s]||g.f-X.f});n<r;++n){var Z=l[n].s;if(i[Z]>t)u+=S-(1<<c-i[Z]),i[Z]=t;else break}for(u>>=b;u>0;){var I=l[n].s;i[I]<t?u-=1<<t-i[I]++-1:++n}for(;n>=0&&u;--n){var R=l[n].s;i[R]==t&&(--i[R],++u)}c=t}return{t:new xe(i),l:c}},$i=function(e,t,s){return e.s==-1?Math.max($i(e.l,t,s+1),$i(e.r,t,s+1)):t[e.s]=s},Na=function(e){for(var t=e.length;t&&!e[--t];);for(var s=new Je(++t),n=0,r=e[0],l=1,d=function(h){s[n++]=h},f=1;f<=t;++f)if(e[f]==r&&f!=t)++l;else{if(!r&&l>2){for(;l>138;l-=138)d(32754);l>2&&(d(l>10?l-11<<5|28690:l-3<<5|12305),l=0)}else if(l>3){for(d(r),--l;l>6;l-=6)d(8304);l>2&&(d(l-3<<5|8208),l=0)}for(;l--;)d(r);l=1,r=e[f]}return{c:s.subarray(0,n),n:t}},Ht=function(e,t){for(var s=0,n=0;n<t.length;++n)s+=e[n]*t[n];return s},Ja=function(e,t,s){var n=s.length,r=Ta(t+2);e[r]=n&255,e[r+1]=n>>8,e[r+2]=e[r]^255,e[r+3]=e[r+1]^255;for(var l=0;l<n;++l)e[r+l+4]=s[l];return(r+4+n)*8},Ya=function(e,t,s,n,r,l,d,f,h,m,p){Qe(t,p++,s),++r[256];for(var o=_i(r,15),a=o.t,i=o.l,c=_i(l,15),u=c.t,b=c.l,S=Na(a),Z=S.c,I=S.n,R=Na(u),y=R.c,g=R.n,X=new Je(19),v=0;v<Z.length;++v)++X[Z[v]&31];for(var v=0;v<y.length;++v)++X[y[v]&31];for(var V=_i(X,7),W=V.t,k=V.l,N=19;N>4&&!W[Wa[N-1]];--N);var D=m+5<<3,G=Ht(r,ot)+Ht(l,Hs)+d,w=Ht(r,a)+Ht(l,u)+d+14+3*N+Ht(X,W)+2*X[16]+3*X[17]+7*X[18];if(h>=0&&D<=G&&D<=w)return Ja(t,p,e.subarray(h,h+m));var T,Y,M,U;if(Qe(t,p,1+(w<G)),p+=2,w<G){T=Et(a,i),Y=a,M=Et(u,b),U=u;var _=Et(W,k);Qe(t,p,I-257),Qe(t,p+5,g-1),Qe(t,p+10,N-4),p+=14;for(var v=0;v<N;++v)Qe(t,p+3*v,W[Wa[v]]);p+=3*N;for(var B=[Z,y],C=0;C<2;++C)for(var le=B[C],v=0;v<le.length;++v){var ae=le[v]&31;Qe(t,p,_[ae]),p+=W[ae],ae>15&&(Qe(t,p,le[v]>>5&127),p+=le[v]>>12)}}else T=am,Y=ot,M=cm,U=Hs;for(var v=0;v<f;++v){var J=n[v];if(J>255){var ae=J>>18&31;zt(t,p,T[ae+257]),p+=Y[ae+257],ae>7&&(Qe(t,p,J>>23&31),p+=Qi[ae]);var K=J&31;zt(t,p,M[K]),p+=U[K],K>3&&(zt(t,p,J>>5&8191),p+=ji[K])}else zt(t,p,T[J]),p+=Y[J]}return zt(t,p,T[256]),p+Y[256]},um=new Bi([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Ua=new xe(0),dm=function(e,t,s,n,r,l){var d=l.z||e.length,f=new xe(n+d+5*(1+Math.ceil(d/7e3))+r),h=f.subarray(n,f.length-r),m=l.l,p=(l.r||0)&7;if(t){p&&(h[0]=l.r>>3);for(var o=um[t-1],a=o>>13,i=o&8191,c=(1<<s)-1,u=l.p||new Je(32768),b=l.h||new Je(c+1),S=Math.ceil(s/3),Z=2*S,I=function(We){return(e[We]^e[We+1]<<S^e[We+2]<<Z)&c},R=new Bi(25e3),y=new Je(288),g=new Je(32),X=0,v=0,V=l.i||0,W=0,k=l.w||0,N=0;V+2<d;++V){var D=I(V),G=V&32767,w=b[D];if(u[G]=w,b[D]=G,k<=V){var T=d-V;if((X>7e3||W>24576)&&(T>423||!m)){p=Ya(e,h,0,R,y,g,v,W,N,V-N,p),W=X=v=0,N=V;for(var Y=0;Y<286;++Y)y[Y]=0;for(var Y=0;Y<30;++Y)g[Y]=0}var M=2,U=0,_=i,B=G-w&32767;if(T>2&&D==I(V-B))for(var C=Math.min(a,T)-1,le=Math.min(32767,V),ae=Math.min(258,T);B<=le&&--_&&G!=w;){if(e[V+M]==e[V+M-B]){for(var J=0;J<ae&&e[V+J]==e[V+J-B];++J);if(J>M){if(M=J,U=B,J>C)break;for(var K=Math.min(B,J-2),O=0,Y=0;Y<K;++Y){var H=V-B+Y&32767,j=u[H],ee=H-j&32767;ee>O&&(O=ee,w=H)}}}G=w,w=u[G],B+=G-w&32767}if(U){R[W++]=268435456|Ai[M]<<18|Ca[U];var A=Ai[M]&31,P=Ca[U]&31;v+=Qi[A]+ji[P],++y[257+A],++g[P],k=V+M,++X}else R[W++]=e[V],++y[e[V]]}}for(V=Math.max(V,k);V<d;++V)R[W++]=e[V],++y[e[V]];p=Ya(e,h,m,R,y,g,v,W,N,V-N,p),m||(l.r=p&7|h[p/8|0]<<3,p-=7,l.h=b,l.p=u,l.i=V,l.w=k)}else{for(var V=l.w||0;V<d+m;V+=65535){var re=V+65535;re>=d&&(h[p/8|0]=m,re=d),p=Ja(h,p+1,e.subarray(V,re))}l.i=d}return La(f,0,n+Ta(p)+r)},hm=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var s=t,n=9;--n;)s=(s&1&&-306674912)^s>>>1;e[t]=s}return e}(),pm=function(){var e=-1;return{p:function(t){for(var s=e,n=0;n<t.length;++n)s=hm[s&255^t[n]]^s>>>8;e=s},d:function(){return~e}}},mm=function(e,t,s,n,r){if(!r&&(r={l:1},t.dictionary)){var l=t.dictionary.subarray(-32768),d=new xe(l.length+e.length);d.set(l),d.set(e,l.length),e=d,r.w=l.length}return dm(e,t.level==null?6:t.level,t.mem==null?r.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,s,n,r)},qi=function(e,t,s){for(;s;++t)e[t]=s,s>>>=8},fm=function(e,t){var s=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&qi(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),s){e[3]=8;for(var n=0;n<=s.length;++n)e[n+10]=s.charCodeAt(n)}},bm=function(e){return 10+(e.filename?e.filename.length+1:0)};function ym(e,t){t||(t={});var s=pm(),n=e.length;s.p(e);var r=mm(e,t,bm(t),8),l=r.length;return fm(r,t),qi(r,l-8,s.d()),qi(r,l-4,n),r}var Fa=typeof TextEncoder<"u"&&new TextEncoder,gm=typeof TextDecoder<"u"&&new TextDecoder;try{gm.decode(Ua,{stream:!0})}catch{}function Zm(e,t){var s;if(Fa)return Fa.encode(e);for(var n=e.length,r=new xe(e.length+(e.length>>1)),l=0,d=function(p){r[l++]=p},s=0;s<n;++s){if(l+5>r.length){var f=new xe(l+8+(n-s<<1));f.set(r),r=f}var h=e.charCodeAt(s);h<128||t?d(h):h<2048?(d(192|h>>6),d(128|h&63)):h>55295&&h<57344?(h=65536+(h&1047552)|e.charCodeAt(++s)&1023,d(240|h>>18),d(128|h>>12&63),d(128|h>>6&63),d(128|h&63)):(d(224|h>>12),d(128|h>>6&63),d(128|h&63))}return La(r,0,l)}function Sm(e){return Ve(this,null,function*(){const t=Zm(JSON.stringify(e)),s=ym(t),n=yield new Promise(r=>{const l=new FileReader;l.onload=()=>r(l.result),l.readAsDataURL(new Blob([new Uint8Array(s)]))});return{compressedBase64:n.slice(n.indexOf(",")+1),compressedSize:s.length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KTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aGlnaGxpZ2h0LWNsaWVudC13b3JrZXItRHNiS01weHEuanMubWFwCg==",Im=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),Oa=typeof self<"u"&&self.Blob&&new Blob([Im(Ma)],{type:"text/javascript;charset=utf-8"});function Xm(e){let t;try{if(t=Oa&&(self.URL||self.webkitURL).createObjectURL(Oa),!t)throw"";const s=new Worker(t,{name:e?.name});return s.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),s}catch{return new Worker("data:text/javascript;base64,"+Ma,{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var Ee=(e=>(e[e.Initialize=0]="Initialize",e[e.Reset=1]="Reset",e[e.AsyncEvents=2]="AsyncEvents",e[e.Identify=3]="Identify",e[e.Properties=4]="Properties",e[e.Metrics=5]="Metrics",e[e.Feedback=6]="Feedback",e[e.CustomEvent=7]="CustomEvent",e[e.Stop=8]="Stop",e[e.GetStatus=9]="GetStatus",e))(Ee||{});const Vm=({apiKey:e})=>{(function(t,s){var n=t.amplitude||{_q:[],_iq:{}},r=s.createElement("script");r.type="text/javascript",r.integrity="sha384-+EO59vL/X7v6VE2s6/F4HxfHlK0nDUVWKVg8K9oUlvffAeeaShVBmbORTC2D3UF+",r.crossOrigin="anonymous",r.async=!0,r.src="https://cdn.amplitude.com/libs/amplitude-8.17.0-min.gz.js",r.onload=function(){t.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK"),amplitude.getInstance().init(e)};var l=s.getElementsByTagName("script")[0];l.parentNode.insertBefore(r,l);function d(u,b){u.prototype[b]=function(){return this._q.push([b].concat(Array.prototype.slice.call(arguments,0))),this}}for(var f=function(){return this._q=[],this},h=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove"],m=0;m<h.length;m++)d(f,h[m]);n.Identify=f;for(var p=function(){return this._q=[],this},o=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"],a=0;a<o.length;a++)d(p,o[a]);n.Revenue=p;var i=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","enableTracking","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"];function c(u){function b(Z){u[Z]=function(){u._q.push([Z].concat(Array.prototype.slice.call(arguments,0)))}}for(var S=0;S<i.length;S++)b(i[S])}c(n),n.getInstance=function(u){return u=(!u||u.length===0?"$default_instance":u).toLowerCase(),Object.prototype.hasOwnProperty.call(n._iq,u)||(n._iq[u]={_q:[]},c(n._iq[u])),n._iq[u]},t.amplitude=n})(window,document)},Gm=({projectToken:e})=>{if(window.mixpanel)return;(function(s,n){if(!n.__SV){var r,l;window.mixpanel=n,n._i=[],n.init=function(d,f,h){function m(a,i){var c=i.split(".");c.length==2&&(a=a[c[0]],i=c[1]),a[i]=function(){a.push([i].concat(Array.prototype.slice.call(arguments,0)))}}var p=n;for(typeof h<"u"?p=n[h]=[]:h="mixpanel",p.people=p.people||[],p.toString=function(a){var i="mixpanel";return h!=="mixpanel"&&(i+="."+h),a||(i+=" (stub)"),i},p.people.toString=function(){return p.toString(1)+".people (stub)"},r="disable time_event track track_pageview track_links track_forms track_with_groups add_group set_group remove_group register register_once alias unregister identify name_tag set_config reset opt_in_tracking opt_out_tracking has_opted_in_tracking has_opted_out_tracking clear_opt_in_out_tracking start_batch_senders people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user people.remove".split(" "),l=0;l<r.length;l++)m(p,r[l]);var o="set set_once union unset remove delete".split(" ");p.get_group=function(){function a(b){i[b]=function(){call2_args=arguments,call2=[b].concat(Array.prototype.slice.call(call2_args,0)),p.push([c,call2])}}for(var i={},c=["get_group"].concat(Array.prototype.slice.call(arguments,0)),u=0;u<o.length;u++)a(o[u]);return i},n._i.push([d,f,h])},n.__SV=1.2}})(document,window.mixpanel||[]);const t=document.createElement("script");t.src=Rm,document.head.appendChild(t),t.addEventListener("load",()=>{var s;(s=window.mixpanel)==null||s.init(e)})},Rm="https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";var Ps;class vm{constructor(t){Q(this,"options"),Q(this,"isRunningOnHighlight"),Q(this,"organizationID"),md(this,Ps),Q(this,"events"),Q(this,"sessionData"),Q(this,"ready"),Q(this,"manualStopped"),Q(this,"state"),Q(this,"logger"),Q(this,"enableSegmentIntegration"),Q(this,"privacySetting"),Q(this,"enableCanvasRecording"),Q(this,"samplingStrategy"),Q(this,"inlineImages"),Q(this,"inlineVideos"),Q(this,"inlineStylesheet"),Q(this,"styleSheetResyncInterval"),Q(this,"debugOptions"),Q(this,"listeners"),Q(this,"firstloadVersion"),Q(this,"environment"),Q(this,"sessionShortcut"),Q(this,"appVersion"),Q(this,"serviceName"),Q(this,"_worker"),Q(this,"_optionsInternal"),Q(this,"_backendUrl"),Q(this,"_recordingStartTime"),Q(this,"_isOnLocalHost"),Q(this,"_onToggleFeedbackFormVisibility"),Q(this,"_isCrossOriginIframe"),Q(this,"_eventBytesSinceSnapshot"),Q(this,"_lastSnapshotTime"),Q(this,"_lastVisibilityChangeTime"),Q(this,"pushPayloadTimerId"),Q(this,"hasSessionUnloaded"),Q(this,"hasPushedData"),Q(this,"reloaded"),Q(this,"_hasPreviouslyInitialized"),Q(this,"_recordStop"),Q(this,"_integrations",[]);var s,n,r,l,d;this.options=t,typeof((s=this.options)==null?void 0:s.debug)=="boolean"?this.debugOptions=this.options.debug?{clientInteractions:!0}:{}:this.debugOptions=(r=(n=this.options)==null?void 0:n.debug)!=null?r:{},this.logger=new sr(this.debugOptions.clientInteractions),this._worker=new Xm,this._worker.onmessage=h=>{var m,p,o;((m=h.data.response)==null?void 0:m.type)===Ee.AsyncEvents?(this._eventBytesSinceSnapshot+=h.data.response.eventsSize,this.logger.log(`Web worker sent payloadID ${h.data.response.id} size ${h.data.response.eventsSize} bytes, compression ratio ${h.data.response.eventsSize/h.data.response.compressedSize}.
456
+ Total since snapshot: ${(this._eventBytesSinceSnapshot/1e6).toFixed(1)}MB`)):((p=h.data.response)==null?void 0:p.type)===Ee.CustomEvent?this.addCustomEvent(h.data.response.tag,h.data.response.payload):((o=h.data.response)==null?void 0:o.type)===Ee.Stop&&(we("worker.onmessage","warn","Stopping recording due to worker failure",h.data.response),this.stop(!1))};let f=cs();if(this.reloaded=!1,!((l=this.sessionData)!=null&&l.sessionSecureID)&&f!=null&&f.sessionSecureID)this.sessionData=f,this.options.sessionSecureID=f.sessionSecureID,this.reloaded=!0,this.logger.log(`Tab reloaded, continuing previous session: ${this.sessionData.sessionSecureID}`);else{for(const h of Object.values(Xe))ls(h);this.sessionData={sessionSecureID:this.options.sessionSecureID,projectID:0,sessionStartTime:Date.now()}}this._hasPreviouslyInitialized=!1;try{window.parent.document&&(this._isCrossOriginIframe=!1)}catch{this._isCrossOriginIframe=(d=this.options.recordCrossOriginIframe)!=null?d:!0}this._initMembers(this.options)}_reset(t){return Ve(this,arguments,function*({forceNew:s,sessionKey:n}){this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0);let r,l;if(!s)try{r=Ce(Xe.USER_IDENTIFIER);const d=Ce(Xe.USER_OBJECT);d&&(l=JSON.parse(d))}catch{}for(const d of Object.values(Xe))ls(d);this.sessionData.sessionSecureID=n?Ct(`${this.organizationID}-${n}`):Ct(),this.sessionData.sessionKey=n,this.sessionData.sessionStartTime=Date.now(),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.stop(),this._worker.postMessage({message:{type:Ee.Reset}}),yield this.start(),r&&l&&this.identify(r,l)})}_initMembers(t){var s,n,r,l,d,f,h,m,p,o;this.sessionShortcut=!1,this._recordingStartTime=0,this._isOnLocalHost=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname==="",this.ready=!1,this.state="NotRecording",this.manualStopped=!1,this.enableSegmentIntegration=!!t.enableSegmentIntegration,this.privacySetting=(s=t.privacySetting)!=null?s:"default",this.enableCanvasRecording=(n=t.enableCanvasRecording)!=null?n:!1,this.inlineImages=(r=t.inlineImages)!=null?r:this._isOnLocalHost,this.inlineVideos=(l=t.inlineVideos)!=null?l:this._isOnLocalHost,this.inlineStylesheet=(d=t.inlineStylesheet)!=null?d:this._isOnLocalHost,this.styleSheetResyncInterval=(f=t.styleSheetResyncInterval)!=null?f:2e3,this.samplingStrategy=z({canvasFactor:.5,canvasMaxSnapshotDimension:360,canvasClearWebGLBuffer:!0,dataUrlOptions:gu()},(h=t.samplingStrategy)!=null?h:{canvas:2}),this._backendUrl=(m=t?.backendUrl)!=null?m:"https://pub.observability.app.launchdarkly.com",this._backendUrl[0]==="/"&&(this._backendUrl=new URL(this._backendUrl,document.baseURI).href);const a=new Qc(`${this._backendUrl}`,{headers:{}});fd(this,Ps,bu(a,zu())),this.environment=(p=t.environment)!=null?p:"production",this.appVersion=t.appVersion,this.serviceName=(o=t.serviceName)!=null?o:"browser",typeof t.organizationID=="string"?this.organizationID=t.organizationID:this.organizationID=t.organizationID.toString(),this.isRunningOnHighlight=this.organizationID==="1"||this.organizationID==="1jdkoe52",this.firstloadVersion=t.firstloadVersion||"unknown",this.sessionShortcut=t.sessionShortcut||!1,this._onToggleFeedbackFormVisibility=()=>{};const i=t,c=ds(i,["firstloadVersion"]);this._optionsInternal=c,this.listeners=[],this.events=[],this.hasSessionUnloaded=!1,this.hasPushedData=!1,window.Intercom&&window.Intercom("onShow",()=>{window.Intercom("update",{highlightSessionURL:this.getCurrentSessionURLWithTimestamp()}),this.addProperties({event:"Intercom onShow"})}),this._eventBytesSinceSnapshot=0,this._lastSnapshotTime=new Date().getTime(),this._lastVisibilityChangeTime=new Date().getTime()}identify(t,s={},n){if(!t||t===""){we("identify","warn","Highlight's identify() call was passed an empty identifier.",{user_identifier:t,user_object:s});return}this.sessionData.userIdentifier=t.toString(),this.sessionData.userObject=s,He(Xe.USER_IDENTIFIER,t.toString()),He(Xe.USER_OBJECT,JSON.stringify(s)),this._worker.postMessage({message:{type:Ee.Identify,userIdentifier:t,userObject:s,source:n}})}track(t,s){this.addProperties(ge(z({},s),{event:t}))}addProperties(t={},s){const n=z({},t);Object.entries(n).forEach(([r,l])=>{try{structuredClone(l)}catch{delete n[r]}}),this._worker.postMessage({message:{type:Ee.Properties,propertiesObject:n,propertyType:s}})}addSessionProperties(t){this.addProperties(t,{type:"session"})}start(t){return Ve(this,null,function*(){var s,n,r,l,d,f,h,m,p,o;if(!((s=navigator?.userAgent)!=null&&s.includes("Googlebot")||(n=navigator?.userAgent)!=null&&n.includes("AdsBot")))try{if(t!=null&&t.forceNew){yield this._reset(t);return}if(t!=null&&t.sessionKey&&t?.sessionKey!==this.sessionData.sessionKey){yield this._reset(ge(z({},t),{forceNew:!0}));return}this.logger.log("Initializing...",t,this.sessionData,this.options),this.sessionData=(r=cs(this.sessionData.sessionSecureID))!=null?r:this.sessionData,(l=this.sessionData)!=null&&l.sessionStartTime?this._recordingStartTime=(d=this.sessionData)==null?void 0:d.sessionStartTime:(this._recordingStartTime=new Date().getTime(),this.sessionData.sessionStartTime=this._recordingStartTime);let a=Ce(hn.CLIENT_ID);a||(a=Ct(),He(hn.CLIENT_ID,a));let i;this.options.disableSessionRecording||this.options.disableNetworkRecording!==void 0||typeof this.options.networkRecording=="boolean"?i=!1:i=((f=this.options.networkRecording)==null?void 0:f.recordHeadersAndBody)||!1;let c=[];if(typeof this.options.networkRecording=="object"&&(h=this.options.networkRecording.destinationDomains)!=null&&h.length&&(c=this.options.networkRecording.destinationDomains),this._isCrossOriginIframe)yield this._setupCrossOriginIframe();else{const I=yield pd(this,Ps).initializeSession({organization_verbose_id:this.organizationID,enable_strict_privacy:this.privacySetting==="strict",privacy_setting:this.privacySetting,enable_recording_network_contents:i,clientVersion:this.firstloadVersion,firstloadVersion:this.firstloadVersion,clientConfig:JSON.stringify(this._optionsInternal),environment:this.environment,id:a,appVersion:this.appVersion,serviceName:this.serviceName,session_secure_id:this.sessionData.sessionSecureID,session_key:this.sessionData.sessionKey,client_id:a,network_recording_domains:c,disable_session_recording:this.options.disableSessionRecording});if(I.initializeSession.secure_id!==this.sessionData.sessionSecureID&&this.logger.log(`Unexpected secure id returned by initializeSession: ${I.initializeSession.secure_id}, expected ${this.sessionData.sessionSecureID}`),this.sessionData.sessionSecureID=I.initializeSession.secure_id,this.sessionData.projectID=parseInt(((m=I?.initializeSession)==null?void 0:m.project_id)||"0"),!this.sessionData.projectID||!this.sessionData.sessionSecureID){console.error("Failed to initialize Highlight; an error occurred on our end.",this.sessionData);return}}kt(""),st(this.sessionData),this.logger.log(`Loaded Highlight
457
457
  Remote: ${this._backendUrl}
458
458
  Project ID: ${this.sessionData.projectID}
459
- SessionSecureID: ${this.sessionData.sessionSecureID}`),this.options.sessionSecureID=this.sessionData.sessionSecureID,this._worker.postMessage({message:{type:Ee.Initialize,sessionSecureID:this.sessionData.sessionSecureID,backend:this._backendUrl,debug:!!this.debugOptions.clientInteractions,recordingStartTime:this._recordingStartTime}});for(const I of this._integrations)I.init(this.sessionData.sessionSecureID);if(this.sessionData.userIdentifier&&this.identify(this.sessionData.userIdentifier,this.sessionData.userObject),this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this._isCrossOriginIframe||(this.pushPayloadTimerId=setTimeout(()=>{this._save()},wr)),this.options.disableSessionRecording){this.logger.log("Highlight is NOT RECORDING a session replay per H.init setting."),this.ready=!0,this.state="Recording",this.manualStopped=!1;return}const u=(I,R)=>{R&&this.logger.log("received isCheckout emit",{event:I}),this.events.push(I)};u.bind(this);const b=!!this._recordStop;this._recordStop&&(this._recordStop(),this._recordStop=void 0);const[S,Z]=Kp(this.privacySetting,this.options.maskAllInputs,this.options.maskInputOptions);this._recordStop=Be({ignoreClass:(p=this.options.ignoreClass)!=null?p:"highlight-ignore",ignoreSelector:this.options.ignoreSelector,blockClass:(o=this.options.blockClass)!=null?o:"highlight-block",blockSelector:this.options.blockSelector,emit:u,recordCrossOriginIframes:this.options.recordCrossOriginIframe,privacySetting:this.privacySetting,maskAllInputs:S,maskInputOptions:Z,maskTextClass:this.options.maskTextClass,maskTextSelector:this.options.maskTextSelector,recordCanvas:this.enableCanvasRecording,sampling:{canvas:{fps:this.samplingStrategy.canvas,fpsManual:this.samplingStrategy.canvasManualSnapshot,resizeFactor:this.samplingStrategy.canvasFactor,clearWebGLBuffer:this.samplingStrategy.canvasClearWebGLBuffer,initialSnapshotDelay:this.samplingStrategy.canvasInitialSnapshotDelay,dataURLOptions:this.samplingStrategy.dataUrlOptions,maxSnapshotDimension:this.samplingStrategy.canvasMaxSnapshotDimension}},keepIframeSrcFn:I=>!this.options.recordCrossOriginIframe,inlineImages:this.inlineImages,inlineVideos:this.inlineVideos,collectFonts:this.inlineImages,inlineStylesheet:this.inlineStylesheet,styleSheetResyncInterval:this.styleSheetResyncInterval,plugins:[bd()],logger:typeof this.options.debug=="boolean"&&this.options.debug||typeof this.options.debug=="object"&&this.options.debug.domRecording?{debug:this.logger.log,warn:we.bind("RecordSDK","warn")}:void 0}),b||this.options.recordCrossOriginIframe&&this._setupCrossOriginIframeParent(),document.referrer&&(window&&document.referrer.includes(window.location.origin)||(this.addCustomEvent("Referrer",document.referrer),this.addProperties({referrer:document.referrer},{type:"session"}))),this.sessionData.sessionKey&&this.addProperties({sessionKey:this.sessionData.sessionKey},{type:"session"}),this._setupWindowListeners(),this.ready=!0,this.state="Recording",this.manualStopped=!1}catch(l){we("initializeSession _setupWindowListeners","warn",l)}})}_visibilityHandler(t){return Ve(this,null,function*(){if(this.manualStopped){this.logger.log("Ignoring visibility event due to manual stop.");return}new Date().getTime()-this._lastVisibilityChangeTime<Iu||(this._lastVisibilityChangeTime=new Date().getTime(),this.logger.log(`Detected window ${t?"hidden":"visible"}.`),t?(this.addCustomEvent("TabHidden",!0),this.options.disableBackgroundRecording&&this.stop()):(this.options.disableBackgroundRecording&&(yield this.start()),this.addCustomEvent("TabHidden",!1)))})}_setupCrossOriginIframe(){return Ve(this,null,function*(){this.logger.log("highlight in cross-origin iframe is waiting "),yield new Promise(t=>{const s=n=>{if(n.data.highlight===Ra){const r=n.data;this.logger.log("highlight got window message ",r),this.sessionData.projectID=r.projectID,this.sessionData.sessionSecureID=r.sessionSecureID,window.parent.postMessage({highlight:va},"*"),window.removeEventListener("message",s),t()}};window.addEventListener("message",s)})})}_setupCrossOriginIframeParent(){this.logger.log("highlight setting up cross origin iframe parent notification"),setInterval(()=>{window.document.querySelectorAll("iframe").forEach(t=>{var s;(s=t.contentWindow)==null||s.postMessage({highlight:Ra,projectID:this.sessionData.projectID,sessionSecureID:this.sessionData.sessionSecureID},"*")})},wr),window.addEventListener("message",t=>{t.data.highlight===va&&this.logger.log("highlight got response from initialized iframe")})}_setupWindowListeners(){var t;try{const n=this;this.enableSegmentIntegration&&this.listeners.push(Pp(a=>{if(a.type==="track"){const d={};d["segment-event"]=a.event,n.addProperties(d,{type:"track",source:"segment"})}else if(a.type==="identify"){const d=a.userId.replace(/^"(.*)"$/,"$1");n.identify(d,a.traits,"segment")}})),this.listeners.push(Au(a=>{this.reloaded?(this.addCustomEvent("Reload",a),this.reloaded=!1,n.addProperties({reload:!0},{type:"session"})):this.addCustomEvent("Navigate",a)})),this.listeners.push(sd(a=>{this.addCustomEvent("Viewport",a)})),this.listeners.push(Ep((a,d)=>{let f=null,h=null;if(d&&d.target){const m=d.target;f=ed(m),h=m.textContent,h&&h.length>2e3&&(h=h.substring(0,2e3))}this.addCustomEvent("Click",{clickTarget:a,clickTextContent:h,clickSelector:f})})),this.listeners.push(zp(a=>{a&&this.addCustomEvent("Focus",a)})),this.sessionShortcut&&Bp(this.sessionShortcut,()=>{window.open(this.getCurrentSessionURLWithTimestamp(),"_blank")}),this._hasPreviouslyInitialized||((t=window.electron)!=null&&t.ipcRenderer?(window.electron.ipcRenderer.on("highlight.run",({visible:a})=>{this._visibilityHandler(!a)}),this.logger.log("Set up Electron highlight.run events.")):(Hp(a=>this._visibilityHandler(a)),this.logger.log("Set up document visibility listener.")),this._hasPreviouslyInitialized=!0);const r=()=>{this.hasSessionUnloaded=!0,this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0)};window.addEventListener("beforeunload",r),this.listeners.push(()=>window.removeEventListener("beforeunload",r))}catch(n){we("initializeSession _setupWindowListeners","warn",n)}const s=()=>{this.addCustomEvent("Page Unload",""),kt(this.sessionData.sessionSecureID),st(this.sessionData)};if(window.addEventListener("beforeunload",s),this.listeners.push(()=>window.removeEventListener("beforeunload",s)),navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPhone/i)){const n=()=>{this.addCustomEvent("Page Unload",""),kt(this.sessionData.sessionSecureID),st(this.sessionData)};window.addEventListener("pagehide",n),this.listeners.push(()=>window.removeEventListener("beforeunload",n))}}stop(t){this.manualStopped=!!t,this.manualStopped&&this.addCustomEvent("Stop","H.stop() was called which stops Highlight from recording."),this.state="NotRecording",t&&this._recordStop&&(this._recordStop(),this._recordStop=void 0),this.listeners.forEach(s=>s()),this.listeners=[]}getCurrentSessionURLWithTimestamp(){const t=new Date().getTime(),{projectID:s,sessionSecureID:n}=this.sessionData,r=(t-this._recordingStartTime)/1e3;return`https://${Cr}/${s}/sessions/${n}?ts=${r}`}getCurrentSessionURL(){const t=this.sessionData.projectID,s=this.sessionData.sessionSecureID;return t&&s?`https://${Cr}/${t}/sessions/${s}`:null}snapshot(t){return Ve(this,null,function*(){yield Be.snapshotCanvas(t)})}addSessionFeedback({timestamp:t,verbatim:s,user_email:n,user_name:r}){var a;this._worker.postMessage({message:{type:Ee.Feedback,verbatim:s,timestamp:t,userName:r||this.sessionData.userIdentifier,userEmail:n||((a=this.sessionData.userObject)==null?void 0:a.name)}})}_save(){return Ve(this,null,function*(){var t;try{this.state==="Recording"&&this.listeners&&!this.sessionData.sessionKey&&this.sessionData.sessionStartTime&&Date.now()-this.sessionData.sessionStartTime>Su&&(this.logger.log("Resetting session",{start:this.sessionData.sessionStartTime}),yield this._reset({}));let s;((t=this.options)==null?void 0:t.sendMode)==="local"&&(s=n=>Ve(this,null,function*(){let r=new Blob([JSON.stringify({query:Sr(Wr),variables:n})],{type:"application/json"});return yield window.fetch(`${this._backendUrl}`,{method:"POST",body:r}),0})),yield this._sendPayload({sendFn:s}),this.hasPushedData=!0,this.sessionData.lastPushTime=Date.now(),st(this.sessionData)}catch(s){we("_save","warn",s)}this.state==="Recording"&&(this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this.pushPayloadTimerId=setTimeout(()=>{this._save()},Zu))})}addCustomEvent(t,s){if(this.state==="NotRecording"){let n;const r=()=>{clearInterval(n),this.state==="Recording"&&this.events.length>0?Ia(t,s):n=setTimeout(r,500)};n=setTimeout(r,500)}else this.state==="Recording"&&(this.events.length>0||this.hasPushedData)&&Ia(t,s)}_sendPayload(t){return Ve(this,arguments,function*({sendFn:s}){const n=[...this.events],{bytes:r,time:a}=this.enableCanvasRecording?kr.canvas:kr.normal;this._eventBytesSinceSnapshot>=r&&new Date().getTime()-this._lastSnapshotTime>=a&&this.takeFullSnapshot(),this.logger.log(`Sending: ${n.length} events,
459
+ SessionSecureID: ${this.sessionData.sessionSecureID}`),this.options.sessionSecureID=this.sessionData.sessionSecureID,this._worker.postMessage({message:{type:Ee.Initialize,sessionSecureID:this.sessionData.sessionSecureID,backend:this._backendUrl,debug:!!this.debugOptions.clientInteractions,recordingStartTime:this._recordingStartTime}});for(const I of this._integrations)I.init(this.sessionData.sessionSecureID);if(this.sessionData.userIdentifier&&this.identify(this.sessionData.userIdentifier,this.sessionData.userObject),this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this._isCrossOriginIframe||(this.pushPayloadTimerId=setTimeout(()=>{this._save()},wr)),this.options.disableSessionRecording){this.logger.log("Highlight is NOT RECORDING a session replay per H.init setting."),this.ready=!0,this.state="Recording",this.manualStopped=!1;return}const u=(I,R)=>{R&&this.logger.log("received isCheckout emit",{event:I}),this.events.push(I)};u.bind(this);const b=!!this._recordStop;this._recordStop&&(this._recordStop(),this._recordStop=void 0);const[S,Z]=zp(this.privacySetting,this.options.maskAllInputs,this.options.maskInputOptions);this._recordStop=Be({ignoreClass:(p=this.options.ignoreClass)!=null?p:"highlight-ignore",ignoreSelector:this.options.ignoreSelector,blockClass:(o=this.options.blockClass)!=null?o:"highlight-block",blockSelector:this.options.blockSelector,emit:u,recordCrossOriginIframes:this.options.recordCrossOriginIframe,privacySetting:this.privacySetting,maskAllInputs:S,maskInputOptions:Z,maskTextClass:this.options.maskTextClass,maskTextSelector:this.options.maskTextSelector,recordCanvas:this.enableCanvasRecording,sampling:{canvas:{fps:this.samplingStrategy.canvas,fpsManual:this.samplingStrategy.canvasManualSnapshot,resizeFactor:this.samplingStrategy.canvasFactor,clearWebGLBuffer:this.samplingStrategy.canvasClearWebGLBuffer,initialSnapshotDelay:this.samplingStrategy.canvasInitialSnapshotDelay,dataURLOptions:this.samplingStrategy.dataUrlOptions,maxSnapshotDimension:this.samplingStrategy.canvasMaxSnapshotDimension}},keepIframeSrcFn:I=>!this.options.recordCrossOriginIframe,inlineImages:this.inlineImages,inlineVideos:this.inlineVideos,collectFonts:this.inlineImages,inlineStylesheet:this.inlineStylesheet,styleSheetResyncInterval:this.styleSheetResyncInterval,plugins:[gd()],logger:typeof this.options.debug=="boolean"&&this.options.debug||typeof this.options.debug=="object"&&this.options.debug.domRecording?{debug:this.logger.log,warn:we.bind("RecordSDK","warn")}:void 0}),b||this.options.recordCrossOriginIframe&&this._setupCrossOriginIframeParent(),document.referrer&&(window&&document.referrer.includes(window.location.origin)||(this.addCustomEvent("Referrer",document.referrer),this.addProperties({referrer:document.referrer},{type:"session"}))),this.sessionData.sessionKey&&this.addProperties({sessionKey:this.sessionData.sessionKey},{type:"session"}),this._setupWindowListeners(),this.ready=!0,this.state="Recording",this.manualStopped=!1}catch(a){we("initializeSession _setupWindowListeners","warn",a)}})}_visibilityHandler(t){return Ve(this,null,function*(){if(this.manualStopped){this.logger.log("Ignoring visibility event due to manual stop.");return}new Date().getTime()-this._lastVisibilityChangeTime<Vu||(this._lastVisibilityChangeTime=new Date().getTime(),this.logger.log(`Detected window ${t?"hidden":"visible"}.`),t?(this.addCustomEvent("TabHidden",!0),this.options.disableBackgroundRecording&&this.stop()):(this.options.disableBackgroundRecording&&(yield this.start()),this.addCustomEvent("TabHidden",!1)))})}_setupCrossOriginIframe(){return Ve(this,null,function*(){this.logger.log("highlight in cross-origin iframe is waiting "),yield new Promise(t=>{const s=n=>{if(n.data.highlight===Ra){const r=n.data;this.logger.log("highlight got window message ",r),this.sessionData.projectID=r.projectID,this.sessionData.sessionSecureID=r.sessionSecureID,window.parent.postMessage({highlight:va},"*"),window.removeEventListener("message",s),t()}};window.addEventListener("message",s)})})}_setupCrossOriginIframeParent(){this.logger.log("highlight setting up cross origin iframe parent notification"),setInterval(()=>{window.document.querySelectorAll("iframe").forEach(t=>{var s;(s=t.contentWindow)==null||s.postMessage({highlight:Ra,projectID:this.sessionData.projectID,sessionSecureID:this.sessionData.sessionSecureID},"*")})},wr),window.addEventListener("message",t=>{t.data.highlight===va&&this.logger.log("highlight got response from initialized iframe")})}_setupWindowListeners(){var t;try{const n=this;this.enableSegmentIntegration&&this.listeners.push(Bp(l=>{if(l.type==="track"){const d={};d["segment-event"]=l.event,n.addProperties(d,{type:"track",source:"segment"})}else if(l.type==="identify"){const d=l.userId.replace(/^"(.*)"$/,"$1");n.identify(d,l.traits,"segment")}})),this.listeners.push($u(l=>{this.reloaded?(this.addCustomEvent("Reload",l),this.reloaded=!1,n.addProperties({reload:!0},{type:"session"})):this.addCustomEvent("Navigate",l)})),this.listeners.push(id(l=>{this.addCustomEvent("Viewport",l)})),this.listeners.push(Hp((l,d)=>{let f=null,h=null;if(d&&d.target){const m=d.target;f=sd(m),h=m.textContent,h&&h.length>2e3&&(h=h.substring(0,2e3))}this.addCustomEvent("Click",{clickTarget:l,clickTextContent:h,clickSelector:f})})),this.listeners.push(Pp(l=>{l&&this.addCustomEvent("Focus",l)})),this.sessionShortcut&&jp(this.sessionShortcut,()=>{window.open(this.getCurrentSessionURLWithTimestamp(),"_blank")}),this._hasPreviouslyInitialized||((t=window.electron)!=null&&t.ipcRenderer?(window.electron.ipcRenderer.on("highlight.run",({visible:l})=>{this._visibilityHandler(!l)}),this.logger.log("Set up Electron highlight.run events.")):(Dp(l=>this._visibilityHandler(l)),this.logger.log("Set up document visibility listener.")),this._hasPreviouslyInitialized=!0);const r=()=>{this.hasSessionUnloaded=!0,this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0)};window.addEventListener("beforeunload",r),this.listeners.push(()=>window.removeEventListener("beforeunload",r))}catch(n){we("initializeSession _setupWindowListeners","warn",n)}const s=()=>{this.addCustomEvent("Page Unload",""),kt(this.sessionData.sessionSecureID),st(this.sessionData)};if(window.addEventListener("beforeunload",s),this.listeners.push(()=>window.removeEventListener("beforeunload",s)),navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPhone/i)){const n=()=>{this.addCustomEvent("Page Unload",""),kt(this.sessionData.sessionSecureID),st(this.sessionData)};window.addEventListener("pagehide",n),this.listeners.push(()=>window.removeEventListener("beforeunload",n))}}stop(t){this.manualStopped=!!t,this.manualStopped&&this.addCustomEvent("Stop","H.stop() was called which stops Highlight from recording."),this.state="NotRecording",t&&this._recordStop&&(this._recordStop(),this._recordStop=void 0),this.listeners.forEach(s=>s()),this.listeners=[]}getCurrentSessionURLWithTimestamp(){const t=new Date().getTime(),{projectID:s,sessionSecureID:n}=this.sessionData,r=(t-this._recordingStartTime)/1e3;return`https://${Cr}/${s}/sessions/${n}?ts=${r}`}getCurrentSessionURL(){const t=this.sessionData.projectID,s=this.sessionData.sessionSecureID;return t&&s?`https://${Cr}/${t}/sessions/${s}`:null}snapshot(t){return Ve(this,null,function*(){yield Be.snapshotCanvas(t)})}addSessionFeedback({timestamp:t,verbatim:s,user_email:n,user_name:r}){var l;this._worker.postMessage({message:{type:Ee.Feedback,verbatim:s,timestamp:t,userName:r||this.sessionData.userIdentifier,userEmail:n||((l=this.sessionData.userObject)==null?void 0:l.name)}})}_save(){return Ve(this,null,function*(){var t;try{this.state==="Recording"&&this.listeners&&!this.sessionData.sessionKey&&this.sessionData.sessionStartTime&&Date.now()-this.sessionData.sessionStartTime>Xu&&(this.logger.log("Resetting session",{start:this.sessionData.sessionStartTime}),yield this._reset({}));let s;((t=this.options)==null?void 0:t.sendMode)==="local"&&(s=n=>Ve(this,null,function*(){let r=new Blob([JSON.stringify({query:Sr(Wr),variables:n})],{type:"application/json"});return yield window.fetch(`${this._backendUrl}`,{method:"POST",body:r}),0})),yield this._sendPayload({sendFn:s}),this.hasPushedData=!0,this.sessionData.lastPushTime=Date.now(),st(this.sessionData)}catch(s){we("_save","warn",s)}this.state==="Recording"&&(this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this.pushPayloadTimerId=setTimeout(()=>{this._save()},Iu))})}addCustomEvent(t,s){if(this.state==="NotRecording"){let n;const r=()=>{clearInterval(n),this.state==="Recording"&&this.events.length>0?Ia(t,s):n=setTimeout(r,500)};n=setTimeout(r,500)}else this.state==="Recording"&&(this.events.length>0||this.hasPushedData)&&Ia(t,s)}_sendPayload(t){return Ve(this,arguments,function*({sendFn:s}){const n=[...this.events],{bytes:r,time:l}=this.enableCanvasRecording?kr.canvas:kr.normal;this._eventBytesSinceSnapshot>=r&&new Date().getTime()-this._lastSnapshotTime>=l&&this.takeFullSnapshot(),this.logger.log(`Sending: ${n.length} events,
460
460
  To: ${this._backendUrl}
461
461
  Org: ${this.organizationID}
462
- SessionSecureID: ${this.sessionData.sessionSecureID}`);const d=new Date().getTime(),f=sm();if(s){const h={session_secure_id:this.sessionData.sessionSecureID,payload_id:d.toString(),events:{events:n},messages:Ac({messages:[]}),resources:JSON.stringify({resources:[]}),web_socket_events:JSON.stringify({webSocketEvents:[]}),errors:[],is_beacon:!1,has_session_unloaded:this.hasSessionUnloaded,highlight_logs:f||void 0},{compressedBase64:m}=yield gm(h);yield s({session_secure_id:this.sessionData.sessionSecureID,payload_id:d.toString(),data:m})}else this._worker.postMessage({message:{type:Ee.AsyncEvents,id:d,events:n,messages:[],errors:[],resourcesString:JSON.stringify({resources:[]}),webSocketEventsString:JSON.stringify({webSocketEvents:[]}),hasSessionUnloaded:this.hasSessionUnloaded,highlightLogs:f}});st(this.sessionData),this.events=this.events.slice(n.length),nm(f)})}takeFullSnapshot(){if(!this._recordStop){this.logger.log("skipping full snapshot as rrweb is not running");return}this.logger.log("taking full snapshot",{bytesSinceSnapshot:this._eventBytesSinceSnapshot,lastSnapshotTime:this._lastSnapshotTime}),Be.takeFullSnapshot(),this._eventBytesSinceSnapshot=0,this._lastSnapshotTime=new Date().getTime()}register(t,s){this._integrations.push(new ju(t,s))}getHooks(t){return this._integrations.flatMap(s=>{var n,r;return(r=(n=s.getHooks)==null?void 0:n.call(s,t))!=null?r:[]})}getRecordingState(){var t;return(t=this==null?void 0:this.state)!=null?t:"NotRecording"}getSession(){const t=this.sessionData.sessionSecureID,s=cs(t);if(!s)return null;const n=`${this.getFrontendUrl()}/sessions/${t}`;if(!n||!s?.sessionStartTime)return null;const r=new Date().getTime();let a;try{a=new URL(n)}catch(h){return we("identify","warn",`failed to construct session url from ${n}`,h),null}const d=new URL(a),f=(r-this._recordingStartTime)/1e3;return d.searchParams.set("ts",f.toString()),{url:a.toString(),urlWithTimestamp:d.toString(),sessionSecureID:t}}getFrontendUrl(){var t,s;const n=this._backendUrl.match(Ru);if(n&&(t=n?.groups)!=null&&t.domain){const r=(s=n.groups.domain)!=null?s:"";return`https://${Vu[r]}${Gu}`}return Xu}}Ps=new WeakMap;class Rm extends od{constructor(t){super(t),Q(this,"record"),Q(this,"options"),this.options=t}initialize(t,s){var n,r,a,d,f,h,m,p,o;try{if(typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/session-replay is not initializing because it is not supported in this environment.");return}if(typeof Worker>"u"){console.warn("@launchdarkly/session-replay is not initializing because Worker is not supported.");return}if(!t){console.warn("@launchdarkly/session-replay is not initializing because the SDK credential is undefined.");return}this.configureSession(t,s);const l=ge(z({},s),{organizationID:t,firstloadVersion:qu,environment:s?.environment||"production",appVersion:s?.version,sessionSecureID:this.sessionSecureID,privacySetting:(n=s?.privacySetting)!=null?n:"strict"});this.record=new Gm(l),s!=null&&s.manualStart||this.record.start(),Le.LDRecord.load(this.record),!((a=(r=s?.integrations)==null?void 0:r.mixpanel)!=null&&a.disabled)&&(f=(d=s?.integrations)==null?void 0:d.mixpanel)!=null&&f.projectToken&&Xm(s.integrations.mixpanel),!((m=(h=s?.integrations)==null?void 0:h.amplitude)!=null&&m.disabled)&&(o=(p=s?.integrations)==null?void 0:p.amplitude)!=null&&o.apiKey&&Im(s.integrations.amplitude)}catch(l){we("Error initializing @launchdarkly/session-replay SDK","error",l)}}getMetadata(){return{name:"@launchdarkly/session-replay"}}register(t,s){var n;(n=this.record)==null||n.register(t,s)}getHooks(t){var s,n,r,a;const d=z(z({[yu]:t.sdk.name,[gu]:t.sdk.version,[Eu]:t.clientSideId,[zu]:"LaunchDarkly"},(s=t.application)!=null&&s.id?{[Hu]:t.application.id}:{}),(n=t.application)!=null&&n.version?{[Pu]:t.application.version}:{});return this.initialize((a=(r=t.sdkKey)!=null?r:t.mobileKey)!=null?a:t.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/session-replay/hooks"}),afterIdentify:(f,h,m)=>{var p,o,l,i,c,u,b,S;for(const Z of(l=(o=(p=this.record)==null?void 0:p.getHooks)==null?void 0:o.call(p,t))!=null?l:[])(i=Z.afterIdentify)==null||i.call(Z,f,h,m);if(m.status==="completed"){const Z=ge(z({},Bu(f.context)),{key:(b=(u=(c=this.options)==null?void 0:c.contextFriendlyName)==null?void 0:u.call(c,f.context))!=null?b:Mr(f.context),canonicalKey:Mr(f.context)});(S=this.record)==null||S.identify(Z.key,z(z({},d),Z),"LaunchDarkly")}return h},afterEvaluation:(f,h,m)=>{var p,o,l,i;for(const c of(l=(o=(p=this.record)==null?void 0:p.getHooks)==null?void 0:o.call(p,t))!=null?l:[])(i=c.afterEvaluation)==null||i.call(c,f,h,m);return h},afterTrack:f=>{var h,m,p,o,l;for(const i of(p=(m=(h=this.record)==null?void 0:h.getHooks)==null?void 0:m.call(h,t))!=null?p:[])(o=i.afterTrack)==null||o.call(i,f);(l=this.record)==null||l.track(f.key,{data:f.data,value:f.metricValue})}}]}}class Ka extends Bs{start(){return this._sdk.start()}stop(){return this._sdk.stop()}recordGauge(t){return this._bufferCall("recordGauge",[t])}recordCount(t){return this._bufferCall("recordCount",[t])}recordIncr(t){return this._bufferCall("recordIncr",[t])}recordHistogram(t){return this._bufferCall("recordHistogram",[t])}recordUpDownCounter(t){return this._bufferCall("recordUpDownCounter",[t])}startSpan(t,s,n,r){return this._bufferCall("startSpan",[t,s,n,r])}startManualSpan(t,s,n,r){return this._bufferCall("startManualSpan",[t,s,n,r])}register(t,s){return this._bufferCall("register",[t,s])}recordLog(t,s,n){return this._bufferCall("recordLog",[t,s,n])}recordError(t,s,n,r,a){return this._bufferCall("recordError",[t,s,n,r,a])}setLDContextKeyAttributes(t){return this._bufferCall("setLDContextKeyAttributes",[t])}getLDContextKeyAttributes(){return this._bufferCall("getLDContextKeyAttributes",[])}}let Pt;typeof globalThis<"u"?globalThis.LDObserve?Pt=globalThis.LDObserve:(Pt=new Ka,globalThis.LDObserve=Pt):Pt=new Ka;const vm=Object.freeze(Object.defineProperty({__proto__:null,get LDObserve(){return Pt}},Symbol.toStringTag,{value:"Module"}));Le.default=Rm,Object.defineProperties(Le,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
462
+ SessionSecureID: ${this.sessionData.sessionSecureID}`);const d=new Date().getTime(),f=im();if(s){const h={session_secure_id:this.sessionData.sessionSecureID,payload_id:d.toString(),events:{events:n},messages:$c({messages:[]}),resources:JSON.stringify({resources:[]}),web_socket_events:JSON.stringify({webSocketEvents:[]}),errors:[],is_beacon:!1,has_session_unloaded:this.hasSessionUnloaded,highlight_logs:f||void 0},{compressedBase64:m}=yield Sm(h);yield s({session_secure_id:this.sessionData.sessionSecureID,payload_id:d.toString(),data:m})}else this._worker.postMessage({message:{type:Ee.AsyncEvents,id:d,events:n,messages:[],errors:[],resourcesString:JSON.stringify({resources:[]}),webSocketEventsString:JSON.stringify({webSocketEvents:[]}),hasSessionUnloaded:this.hasSessionUnloaded,highlightLogs:f}});st(this.sessionData),this.events=this.events.slice(n.length),rm(f)})}takeFullSnapshot(){if(!this._recordStop){this.logger.log("skipping full snapshot as rrweb is not running");return}this.logger.log("taking full snapshot",{bytesSinceSnapshot:this._eventBytesSinceSnapshot,lastSnapshotTime:this._lastSnapshotTime}),Be.takeFullSnapshot(),this._eventBytesSinceSnapshot=0,this._lastSnapshotTime=new Date().getTime()}register(t,s){this._integrations.push(new _u(t,s))}getHooks(t){return this._integrations.flatMap(s=>{var n,r;return(r=(n=s.getHooks)==null?void 0:n.call(s,t))!=null?r:[]})}getRecordingState(){var t;return(t=this==null?void 0:this.state)!=null?t:"NotRecording"}getSession(){const t=this.sessionData.sessionSecureID,s=cs(t);if(!s)return null;const n=`${this.getFrontendUrl()}/sessions/${t}`;if(!n||!s?.sessionStartTime)return null;const r=new Date().getTime();let l;try{l=new URL(n)}catch(h){return we("identify","warn",`failed to construct session url from ${n}`,h),null}const d=new URL(l),f=(r-this._recordingStartTime)/1e3;return d.searchParams.set("ts",f.toString()),{url:l.toString(),urlWithTimestamp:d.toString(),sessionSecureID:t}}getFrontendUrl(){var t,s;const n=this._backendUrl.match(Wu);if(n&&(t=n?.groups)!=null&&t.domain){const r=(s=n.groups.domain)!=null?s:"";return`https://${Ru[r]}${vu}`}return Gu}}Ps=new WeakMap;class Wm extends ad{constructor(t){super(t),Q(this,"record"),Q(this,"options"),this.options=t}initialize(t,s){var n,r,l,d,f,h,m,p,o;try{if(typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/session-replay is not initializing because it is not supported in this environment.");return}if(typeof Worker>"u"){console.warn("@launchdarkly/session-replay is not initializing because Worker is not supported.");return}if(!t){console.warn("@launchdarkly/session-replay is not initializing because the SDK credential is undefined.");return}this.configureSession(t,s);const a=ge(z({},s),{organizationID:t,firstloadVersion:td,environment:s?.environment||"production",appVersion:s?.version,sessionSecureID:this.sessionSecureID,privacySetting:(n=s?.privacySetting)!=null?n:"strict"});this.record=new vm(a),s!=null&&s.manualStart||this.record.start(),Le.LDRecord.load(this.record),!((l=(r=s?.integrations)==null?void 0:r.mixpanel)!=null&&l.disabled)&&(f=(d=s?.integrations)==null?void 0:d.mixpanel)!=null&&f.projectToken&&Gm(s.integrations.mixpanel),!((m=(h=s?.integrations)==null?void 0:h.amplitude)!=null&&m.disabled)&&(o=(p=s?.integrations)==null?void 0:p.amplitude)!=null&&o.apiKey&&Vm(s.integrations.amplitude)}catch(a){we("Error initializing @launchdarkly/session-replay SDK","error",a)}}getMetadata(){return{name:"@launchdarkly/session-replay"}}register(t,s){var n;(n=this.record)==null||n.register(t,s)}getHooks(t){var s,n,r,l;const d=z(z({[Zu]:t.sdk.name,[Su]:t.sdk.version,[Hu]:t.clientSideId,[Pu]:"LaunchDarkly"},(s=t.application)!=null&&s.id?{[Du]:t.application.id}:{}),(n=t.application)!=null&&n.version?{[Bu]:t.application.version}:{});return this.initialize((l=(r=t.sdkKey)!=null?r:t.mobileKey)!=null?l:t.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/session-replay/hooks"}),afterIdentify:(f,h,m)=>{var p,o,a,i,c,u,b,S;for(const Z of(a=(o=(p=this.record)==null?void 0:p.getHooks)==null?void 0:o.call(p,t))!=null?a:[])(i=Z.afterIdentify)==null||i.call(Z,f,h,m);if(m.status==="completed"){const Z=ge(z({},ju(f.context)),{key:(b=(u=(c=this.options)==null?void 0:c.contextFriendlyName)==null?void 0:u.call(c,f.context))!=null?b:Mr(f.context),canonicalKey:Mr(f.context)});(S=this.record)==null||S.identify(Z.key,z(z({},d),Z),"LaunchDarkly")}return h},afterEvaluation:(f,h,m)=>{var p,o,a,i;for(const c of(a=(o=(p=this.record)==null?void 0:p.getHooks)==null?void 0:o.call(p,t))!=null?a:[])(i=c.afterEvaluation)==null||i.call(c,f,h,m);return h},afterTrack:f=>{var h,m,p,o,a;for(const i of(p=(m=(h=this.record)==null?void 0:h.getHooks)==null?void 0:m.call(h,t))!=null?p:[])(o=i.afterTrack)==null||o.call(i,f);(a=this.record)==null||a.track(f.key,{data:f.data,value:f.metricValue})}}]}}const Ka=()=>{const e={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(t,s)=>e,setAttributes:t=>e,addEvent:(t,s,n)=>e,addLinks:t=>e,setStatus:t=>e,recordException:()=>{},addLink:()=>e,updateName:()=>e,isRecording:()=>!1};return e};function Ea(e,t,s){if(typeof s=="function")return s;if(typeof t=="function")return t;if(typeof e=="function")return e}class za extends Bs{start(){return this._sdk.start()}stop(){return this._sdk.stop()}recordGauge(t){return this._bufferCall("recordGauge",[t])}recordCount(t){return this._bufferCall("recordCount",[t])}recordIncr(t){return this._bufferCall("recordIncr",[t])}recordHistogram(t){return this._bufferCall("recordHistogram",[t])}recordUpDownCounter(t){return this._bufferCall("recordUpDownCounter",[t])}startSpan(t,s,n,r){var l;return this._isLoaded?this._bufferCall("startSpan",[t,s,n,r]):(l=Ea(s,n,r))==null?void 0:l(Ka())}startManualSpan(t,s,n,r){var l;return this._isLoaded?this._bufferCall("startManualSpan",[t,s,n,r]):(l=Ea(s,n,r))==null?void 0:l(Ka())}register(t,s){return this._bufferCall("register",[t,s])}recordLog(t,s,n){return this._bufferCall("recordLog",[t,s,n])}recordError(t,s,n,r,l){return this._bufferCall("recordError",[t,s,n,r,l])}setLDContextKeyAttributes(t){return this._bufferCall("setLDContextKeyAttributes",[t])}getLDContextKeyAttributes(){return this._bufferCall("getLDContextKeyAttributes",[])}}let Pt;typeof globalThis<"u"?globalThis.LDObserve?Pt=globalThis.LDObserve:(Pt=new za,globalThis.LDObserve=Pt):Pt=new za;const wm=Object.freeze(Object.defineProperty({__proto__:null,get LDObserve(){return Pt}},Symbol.toStringTag,{value:"Module"}));Le.default=Wm,Object.defineProperties(Le,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
463
463
  //# sourceMappingURL=index.umd.js.map