@launchdarkly/session-replay 1.1.14 → 1.1.16
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/CHANGELOG.md +18 -0
- package/dist/{LDObserve-GBBbz8W_.js → LDObserve-CqZ7819o.js} +2 -2
- package/dist/{LDObserve-GBBbz8W_.js.map → LDObserve-CqZ7819o.js.map} +1 -1
- package/dist/{index-BfMi1CJq.js → index-r_2eByqm.js} +1326 -1322
- package/dist/index-r_2eByqm.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.js +58 -58
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/dist/index-BfMi1CJq.js.map +0 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
(function(we,Vt){typeof exports=="object"&&typeof module<"u"?Vt(exports):typeof define=="function"&&define.amd?define(["exports"],Vt):(we=typeof globalThis<"u"?globalThis:we||self,Vt(we.SessionReplay={}))})(this,function(we){"use strict";var Vt=Object.defineProperty,
|
|
2
|
-
`,h=i.split(/\r\n|[\n\r]/g),c=h[n];if(c.length>120){const a=Math.floor(u/80),r=u%80,f=[];for(let p=0;p<c.length;p+=80)f.push(c.slice(p,p+80));return o+
|
|
3
|
-
`)}function
|
|
1
|
+
(function(we,Vt){typeof exports=="object"&&typeof module<"u"?Vt(exports):typeof define=="function"&&define.amd?define(["exports"],Vt):(we=typeof globalThis<"u"?globalThis:we||self,Vt(we.SessionReplay={}))})(this,function(we){"use strict";var Vt=Object.defineProperty,Ka=(e,t,s)=>t in e?Vt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Oe=(e,t,s)=>Ka(e,typeof t!="symbol"?t+"":t,s),Oa=(e,t,s)=>new Promise((i,n)=>{var l=u=>{try{d(s.next(u))}catch(o){n(o)}},m=u=>{try{d(s.throw(u))}catch(o){n(o)}},d=u=>u.done?i(u.value):Promise.resolve(u.value).then(l,m);d((s=s.apply(e,t)).next())});const qn=Object.create(null),Ve=(e,t,...s)=>{const i=`[@launchdarkly plugins]: (${e}): `;console[t].apply(console,[i,...s]),Ea(i,...s)},rt=(e,t,s,...i)=>{qn[`${e}-${t}`]||(qn[`${e}-${t}`]=!0,Ve(e,s,...i))},Ea=(e,...t)=>Oa(void 0,null,function*(){try{const{LDObserve:s}=yield Promise.resolve().then(()=>Xm);s.recordLog(`${e}${t}`,"warn")}catch{}});class er{constructor(t,s){Oe(this,"debug"),Oe(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 zs{constructor(){Oe(this,"_sdk"),Oe(this,"_isLoaded",!1),Oe(this,"_callBuffer",[]),Oe(this,"_capacity",1e5),Oe(this,"_droppedEvents",0),Oe(this,"_exceededCapacity",!1),Oe(this,"_logger",new er)}_bufferCall(t,s){if(this._isLoaded)try{return this._sdk[t](...s)}catch(i){Ve(`Error executing buffered call to ${t}:`,"error",i)}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,Ve("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:i}of this._callBuffer)try{this._sdk[s](...i)}catch(n){Ve(`Error executing buffered call to ${s}:`,"error",n)}this._callBuffer=[]}}var za=Object.defineProperty,Ha=Object.defineProperties,Pa=Object.getOwnPropertyDescriptors,Pt=Object.getOwnPropertySymbols,tr=Object.prototype.hasOwnProperty,sr=Object.prototype.propertyIsEnumerable,Hs=(e,t,s)=>t in e?za(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,j=(e,t)=>{for(var s in t||(t={}))tr.call(t,s)&&Hs(e,s,t[s]);if(Pt)for(var s of Pt(t))sr.call(t,s)&&Hs(e,s,t[s]);return e},Dt=(e,t)=>Ha(e,Pa(t)),Xt=(e,t)=>{var s={};for(var i in e)tr.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(e!=null&&Pt)for(var i of Pt(e))t.indexOf(i)<0&&sr.call(e,i)&&(s[i]=e[i]);return s},Gt=(e,t,s)=>Hs(e,typeof t!="symbol"?t+"":t,s),ot=(e,t,s)=>new Promise((i,n)=>{var l=u=>{try{d(s.next(u))}catch(o){n(o)}},m=u=>{try{d(s.throw(u))}catch(o){n(o)}},d=u=>u.done?i(u.value):Promise.resolve(u.value).then(l,m);d((s=s.apply(e,t)).next())});function Bt(e,t){throw new Error(t)}function Da(e){return typeof e=="object"&&e!==null}function Ba(e,t){throw new Error("Unexpected invariant triggered.")}const Qa=/\r\n|[\n\r]/g;function Ps(e,t){let s=0,i=1;for(const n of e.body.matchAll(Qa)){if(typeof n.index=="number"||Ba(),n.index>=t)break;s=n.index+n[0].length,i+=1}return{line:i,column:t+1-s}}function ja(e){return ir(e.source,Ps(e.source,e.start))}function ir(e,t){const s=e.locationOffset.column-1,i="".padStart(s)+e.body,n=t.line-1,l=e.locationOffset.line-1,m=t.line+l,d=t.line===1?s:0,u=t.column+d,o=`${e.name}:${m}:${u}
|
|
2
|
+
`,h=i.split(/\r\n|[\n\r]/g),c=h[n];if(c.length>120){const a=Math.floor(u/80),r=u%80,f=[];for(let p=0;p<c.length;p+=80)f.push(c.slice(p,p+80));return o+nr([[`${m} |`,f[0]],...f.slice(1,a+1).map(p=>["|",p]),["|","^".padStart(r)],["|",f[a+1]]])}return o+nr([[`${m-1} |`,h[n-1]],[`${m} |`,c],["|","^".padStart(u)],[`${m+1} |`,h[n+1]]])}function nr(e){const t=e.filter(([i,n])=>n!==void 0),s=Math.max(...t.map(([i])=>i.length));return t.map(([i,n])=>i.padStart(s)+(n?" "+n:"")).join(`
|
|
3
|
+
`)}function Aa(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 _a=class Ma extends Error{constructor(t,...s){var i,n,l;const{nodes:m,source:d,positions:u,path:o,originalError:h,extensions:c}=Aa(s);super(t),this.name="GraphQLError",this.path=o??void 0,this.originalError=h??void 0,this.nodes=rr(Array.isArray(m)?m:m?[m]:void 0);const a=rr((i=this.nodes)===null||i===void 0?void 0:i.map(f=>f.loc).filter(f=>f!=null));this.source=d??(a==null||(n=a[0])===null||n===void 0?void 0:n.source),this.positions=u??a?.map(f=>f.start),this.locations=u&&d?u.map(f=>Ps(d,f)):a?.map(f=>Ps(f.source,f.start));const r=Da(h?.extensions)?h?.extensions:void 0;this.extensions=(l=c??r)!==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}}),h!=null&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Ma):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
|
-
`+
|
|
5
|
+
`+ja(s.loc));else if(this.source&&this.locations)for(const s of this.locations)t+=`
|
|
6
6
|
|
|
7
|
-
`+
|
|
7
|
+
`+ir(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 rr(e){return e===void 0||e.length===0?void 0:e}function ue(e,t,s){return new _a(`Syntax Error: ${s}`,{source:e,positions:[t]})}let $a=class{constructor(t,s,i){this.start=t.start,this.end=s.end,this.startToken=t,this.endToken=s,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},or=class{constructor(t,s,i,n,l,m){this.kind=t,this.start=s,this.end=i,this.line=n,this.column=l,this.value=m,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 lr={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"]},qa=new Set(Object.keys(lr));function ar(e){const t=e?.kind;return typeof t=="string"&&qa.has(t)}var lt;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(lt||(lt={}));var Ds;(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"})(Ds||(Ds={}));var M;(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"})(M||(M={}));function Bs(e){return e===9||e===32}function Rt(e){return e>=48&&e<=57}function cr(e){return e>=97&&e<=122||e>=65&&e<=90}function ur(e){return cr(e)||e===95}function ec(e){return cr(e)||Rt(e)||e===95}function tc(e){var t;let s=Number.MAX_SAFE_INTEGER,i=null,n=-1;for(let m=0;m<e.length;++m){var l;const d=e[m],u=sc(d);u!==d.length&&(i=(l=i)!==null&&l!==void 0?l:m,n=m,m!==0&&u<s&&(s=u))}return e.map((m,d)=>d===0?m:m.slice(s)).slice((t=i)!==null&&t!==void 0?t:0,n+1)}function sc(e){let t=0;for(;t<e.length&&Bs(e.charCodeAt(t));)++t;return t}function ic(e,t){const s=e.replace(/"""/g,'\\"""'),i=s.split(/\r\n|[\n\r]/g),n=i.length===1,l=i.length>1&&i.slice(1).every(r=>r.length===0||Bs(r.charCodeAt(0))),m=s.endsWith('\\"""'),d=e.endsWith('"')&&!m,u=e.endsWith("\\"),o=d||u,h=!n||e.length>70||o||l||m;let c="";const a=n&&Bs(e.charCodeAt(0));return(h&&!a||l)&&(c+=`
|
|
8
8
|
`),c+=s,(h||o)&&(c+=`
|
|
9
|
-
`),'"""'+c+'"""'}var C;(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"})(C||(C={}));let
|
|
10
|
-
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw ue(e.source,t,`Invalid character escape sequence: "${s.slice(t,t+2)}".`)}function
|
|
11
|
-
`));return e.line+=u.length-1,e.lineStart=n,h}if(o===92&&s.charCodeAt(l+1)===34&&s.charCodeAt(l+2)===34&&s.charCodeAt(l+3)===34){d+=s.slice(m,l),m=l+1,l+=4;continue}if(o===10||o===13){d+=s.slice(m,l),u.push(d),o===13&&s.charCodeAt(l+1)===10?l+=2:++l,d="",m=l,n=l;continue}if(at(o))++l;else if(Qt(s,l))l+=2;else throw ue(e.source,l,`Invalid character within String: ${$e(e,l)}.`)}throw ue(e.source,l,"Unterminated string.")}function
|
|
9
|
+
`),'"""'+c+'"""'}var C;(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"})(C||(C={}));let nc=class{constructor(t){const s=new or(C.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!==C.EOF)do if(t.next)t=t.next;else{const s=oc(this,t.end);t.next=s,s.prev=t,t=s}while(t.kind===C.COMMENT);return t}};function rc(e){return e===C.BANG||e===C.DOLLAR||e===C.AMP||e===C.PAREN_L||e===C.PAREN_R||e===C.SPREAD||e===C.COLON||e===C.EQUALS||e===C.AT||e===C.BRACKET_L||e===C.BRACKET_R||e===C.BRACE_L||e===C.PIPE||e===C.BRACE_R}function at(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Qt(e,t){return dr(e.charCodeAt(t))&&hr(e.charCodeAt(t+1))}function dr(e){return e>=55296&&e<=56319}function hr(e){return e>=56320&&e<=57343}function $e(e,t){const s=e.source.body.codePointAt(t);if(s===void 0)return C.EOF;if(s>=32&&s<=126){const i=String.fromCodePoint(s);return i==='"'?`'"'`:`"${i}"`}return"U+"+s.toString(16).toUpperCase().padStart(4,"0")}function ae(e,t,s,i,n){const l=e.line,m=1+s-e.lineStart;return new or(t,s,i,l,m,n)}function oc(e,t){const s=e.source.body,i=s.length;let n=t;for(;n<i;){const l=s.charCodeAt(n);switch(l){case 65279:case 9:case 32:case 44:++n;continue;case 10:++n,++e.line,e.lineStart=n;continue;case 13:s.charCodeAt(n+1)===10?n+=2:++n,++e.line,e.lineStart=n;continue;case 35:return lc(e,n);case 33:return ae(e,C.BANG,n,n+1);case 36:return ae(e,C.DOLLAR,n,n+1);case 38:return ae(e,C.AMP,n,n+1);case 40:return ae(e,C.PAREN_L,n,n+1);case 41:return ae(e,C.PAREN_R,n,n+1);case 46:if(s.charCodeAt(n+1)===46&&s.charCodeAt(n+2)===46)return ae(e,C.SPREAD,n,n+3);break;case 58:return ae(e,C.COLON,n,n+1);case 61:return ae(e,C.EQUALS,n,n+1);case 64:return ae(e,C.AT,n,n+1);case 91:return ae(e,C.BRACKET_L,n,n+1);case 93:return ae(e,C.BRACKET_R,n,n+1);case 123:return ae(e,C.BRACE_L,n,n+1);case 124:return ae(e,C.PIPE,n,n+1);case 125:return ae(e,C.BRACE_R,n,n+1);case 34:return s.charCodeAt(n+1)===34&&s.charCodeAt(n+2)===34?pc(e,n):cc(e,n)}if(Rt(l)||l===45)return ac(e,n,l);if(ur(l))return mc(e,n);throw ue(e.source,n,l===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:at(l)||Qt(s,n)?`Unexpected character: ${$e(e,n)}.`:`Invalid character: ${$e(e,n)}.`)}return ae(e,C.EOF,i,i)}function lc(e,t){const s=e.source.body,i=s.length;let n=t+1;for(;n<i;){const l=s.charCodeAt(n);if(l===10||l===13)break;if(at(l))++n;else if(Qt(s,n))n+=2;else break}return ae(e,C.COMMENT,t,n,s.slice(t+1,n))}function ac(e,t,s){const i=e.source.body;let n=t,l=s,m=!1;if(l===45&&(l=i.charCodeAt(++n)),l===48){if(l=i.charCodeAt(++n),Rt(l))throw ue(e.source,n,`Invalid number, unexpected digit after 0: ${$e(e,n)}.`)}else n=Qs(e,n,l),l=i.charCodeAt(n);if(l===46&&(m=!0,l=i.charCodeAt(++n),n=Qs(e,n,l),l=i.charCodeAt(n)),(l===69||l===101)&&(m=!0,l=i.charCodeAt(++n),(l===43||l===45)&&(l=i.charCodeAt(++n)),n=Qs(e,n,l),l=i.charCodeAt(n)),l===46||ur(l))throw ue(e.source,n,`Invalid number, expected digit but got: ${$e(e,n)}.`);return ae(e,m?C.FLOAT:C.INT,t,n,i.slice(t,n))}function Qs(e,t,s){if(!Rt(s))throw ue(e.source,t,`Invalid number, expected digit but got: ${$e(e,t)}.`);const i=e.source.body;let n=t+1;for(;Rt(i.charCodeAt(n));)++n;return n}function cc(e,t){const s=e.source.body,i=s.length;let n=t+1,l=n,m="";for(;n<i;){const d=s.charCodeAt(n);if(d===34)return m+=s.slice(l,n),ae(e,C.STRING,t,n+1,m);if(d===92){m+=s.slice(l,n);const u=s.charCodeAt(n+1)===117?s.charCodeAt(n+2)===123?uc(e,n):dc(e,n):hc(e,n);m+=u.value,n+=u.size,l=n;continue}if(d===10||d===13)break;if(at(d))++n;else if(Qt(s,n))n+=2;else throw ue(e.source,n,`Invalid character within String: ${$e(e,n)}.`)}throw ue(e.source,n,"Unterminated string.")}function uc(e,t){const s=e.source.body;let i=0,n=3;for(;n<12;){const l=s.charCodeAt(t+n++);if(l===125){if(n<5||!at(i))break;return{value:String.fromCodePoint(i),size:n}}if(i=i<<4|vt(l),i<0)break}throw ue(e.source,t,`Invalid Unicode escape sequence: "${s.slice(t,t+n)}".`)}function dc(e,t){const s=e.source.body,i=pr(s,t+2);if(at(i))return{value:String.fromCodePoint(i),size:6};if(dr(i)&&s.charCodeAt(t+6)===92&&s.charCodeAt(t+7)===117){const n=pr(s,t+8);if(hr(n))return{value:String.fromCodePoint(i,n),size:12}}throw ue(e.source,t,`Invalid Unicode escape sequence: "${s.slice(t,t+6)}".`)}function pr(e,t){return vt(e.charCodeAt(t))<<12|vt(e.charCodeAt(t+1))<<8|vt(e.charCodeAt(t+2))<<4|vt(e.charCodeAt(t+3))}function vt(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function hc(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 ue(e.source,t,`Invalid character escape sequence: "${s.slice(t,t+2)}".`)}function pc(e,t){const s=e.source.body,i=s.length;let n=e.lineStart,l=t+3,m=l,d="";const u=[];for(;l<i;){const o=s.charCodeAt(l);if(o===34&&s.charCodeAt(l+1)===34&&s.charCodeAt(l+2)===34){d+=s.slice(m,l),u.push(d);const h=ae(e,C.BLOCK_STRING,t,l+3,tc(u).join(`
|
|
11
|
+
`));return e.line+=u.length-1,e.lineStart=n,h}if(o===92&&s.charCodeAt(l+1)===34&&s.charCodeAt(l+2)===34&&s.charCodeAt(l+3)===34){d+=s.slice(m,l),m=l+1,l+=4;continue}if(o===10||o===13){d+=s.slice(m,l),u.push(d),o===13&&s.charCodeAt(l+1)===10?l+=2:++l,d="",m=l,n=l;continue}if(at(o))++l;else if(Qt(s,l))l+=2;else throw ue(e.source,l,`Invalid character within String: ${$e(e,l)}.`)}throw ue(e.source,l,"Unterminated string.")}function mc(e,t){const s=e.source.body,i=s.length;let n=t+1;for(;n<i;){const l=s.charCodeAt(n);if(ec(l))++n;else break}return ae(e,C.NAME,t,n,s.slice(t,n))}const fc=10,mr=2;function js(e){return jt(e,[])}function jt(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return bc(e,t);default:return String(e)}}function bc(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const s=[...t,e];if(yc(e)){const i=e.toJSON();if(i!==e)return typeof i=="string"?i:jt(i,s)}else if(Array.isArray(e))return Zc(e,s);return gc(e,s)}function yc(e){return typeof e.toJSON=="function"}function gc(e,t){const s=Object.entries(e);return s.length===0?"{}":t.length>mr?"["+Sc(e)+"]":"{ "+s.map(([i,n])=>i+": "+jt(n,t)).join(", ")+" }"}function Zc(e,t){if(e.length===0)return"[]";if(t.length>mr)return"[Array]";const s=Math.min(fc,e.length),i=e.length-s,n=[];for(let l=0;l<s;++l)n.push(jt(e[l],t));return i===1?n.push("... 1 more item"):i>1&&n.push(`... ${i} more items`),"["+n.join(", ")+"]"}function Sc(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 Ic=globalThis.process&&process.env.NODE_ENV==="production",Vc=Ic?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 i=t.prototype[Symbol.toStringTag],n=Symbol.toStringTag in e?e[Symbol.toStringTag]:(s=e.constructor)===null||s===void 0?void 0:s.name;if(i===n){const l=js(e);throw new Error(`Cannot use ${i} "${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,41 +19,41 @@ 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 mr=class{constructor(t,s="GraphQL request",i={line:1,column:1}){typeof t=="string"||Bt(!1,`Body must be a string. Received: ${Qs(t)}.`),this.body=t,this.name=s,this.locationOffset=i,this.locationOffset.line>0||Bt(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Bt(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function Sc(e){return Zc(e,mr)}function fr(e,t){const s=new Ic(e,t),i=s.parseDocument();return Object.defineProperty(i,"tokenCount",{enumerable:!1,value:s.tokenCount}),i}let Ic=class{constructor(t,s={}){const i=Sc(t)?t:new mr(t);this._lexer=new tc(i),this._options=s,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(C.NAME);return this.node(t,{kind:M.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:M.DOCUMENT,definitions:this.many(C.SOF,this.parseDefinition,C.EOF)})}parseDefinition(){if(this.peek(C.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),s=t?this._lexer.lookahead():this._lexer.token;if(s.kind===C.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 ue(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(C.BRACE_L))return this.node(t,{kind:M.OPERATION_DEFINITION,operation:lt.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const s=this.parseOperationType();let i;return this.peek(C.NAME)&&(i=this.parseName()),this.node(t,{kind:M.OPERATION_DEFINITION,operation:s,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(C.NAME);switch(t.value){case"query":return lt.QUERY;case"mutation":return lt.MUTATION;case"subscription":return lt.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(C.PAREN_L,this.parseVariableDefinition,C.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:M.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(C.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(C.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(C.DOLLAR),this.node(t,{kind:M.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:M.SELECTION_SET,selections:this.many(C.BRACE_L,this.parseSelection,C.BRACE_R)})}parseSelection(){return this.peek(C.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,s=this.parseName();let i,n;return this.expectOptionalToken(C.COLON)?(i=s,n=this.parseName()):n=s,this.node(t,{kind:M.FIELD,alias:i,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(C.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const s=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(C.PAREN_L,s,C.PAREN_R)}parseArgument(t=!1){const s=this._lexer.token,i=this.parseName();return this.expectToken(C.COLON),this.node(s,{kind:M.ARGUMENT,name:i,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(C.SPREAD);const s=this.expectOptionalKeyword("on");return!s&&this.peek(C.NAME)?this.node(t,{kind:M.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:M.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:M.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:M.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 C.BRACKET_L:return this.parseList(t);case C.BRACE_L:return this.parseObject(t);case C.INT:return this.advanceLexer(),this.node(s,{kind:M.INT,value:s.value});case C.FLOAT:return this.advanceLexer(),this.node(s,{kind:M.FLOAT,value:s.value});case C.STRING:case C.BLOCK_STRING:return this.parseStringLiteral();case C.NAME:switch(this.advanceLexer(),s.value){case"true":return this.node(s,{kind:M.BOOLEAN,value:!0});case"false":return this.node(s,{kind:M.BOOLEAN,value:!1});case"null":return this.node(s,{kind:M.NULL});default:return this.node(s,{kind:M.ENUM,value:s.value})}case C.DOLLAR:if(t)if(this.expectToken(C.DOLLAR),this._lexer.token.kind===C.NAME){const i=this._lexer.token.value;throw ue(this._lexer.source,s.start,`Unexpected variable "$${i}" 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:M.STRING,value:t.value,block:t.kind===C.BLOCK_STRING})}parseList(t){const s=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:M.LIST,values:this.any(C.BRACKET_L,s,C.BRACKET_R)})}parseObject(t){const s=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:M.OBJECT,fields:this.any(C.BRACE_L,s,C.BRACE_R)})}parseObjectField(t){const s=this._lexer.token,i=this.parseName();return this.expectToken(C.COLON),this.node(s,{kind:M.OBJECT_FIELD,name:i,value:this.parseValueLiteral(t)})}parseDirectives(t){const s=[];for(;this.peek(C.AT);)s.push(this.parseDirective(t));return s}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const s=this._lexer.token;return this.expectToken(C.AT),this.node(s,{kind:M.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let s;if(this.expectOptionalToken(C.BRACKET_L)){const i=this.parseTypeReference();this.expectToken(C.BRACKET_R),s=this.node(t,{kind:M.LIST_TYPE,type:i})}else s=this.parseNamedType();return this.expectOptionalToken(C.BANG)?this.node(t,{kind:M.NON_NULL_TYPE,type:s}):s}parseNamedType(){return this.node(this._lexer.token,{kind:M.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(C.STRING)||this.peek(C.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("schema");const i=this.parseConstDirectives(),n=this.many(C.BRACE_L,this.parseOperationTypeDefinition,C.BRACE_R);return this.node(t,{kind:M.SCHEMA_DEFINITION,description:s,directives:i,operationTypes:n})}parseOperationTypeDefinition(){const t=this._lexer.token,s=this.parseOperationType();this.expectToken(C.COLON);const i=this.parseNamedType();return this.node(t,{kind:M.OPERATION_TYPE_DEFINITION,operation:s,type:i})}parseScalarTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("scalar");const i=this.parseName(),n=this.parseConstDirectives();return this.node(t,{kind:M.SCALAR_TYPE_DEFINITION,description:s,name:i,directives:n})}parseObjectTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("type");const i=this.parseName(),n=this.parseImplementsInterfaces(),l=this.parseConstDirectives(),m=this.parseFieldsDefinition();return this.node(t,{kind:M.OBJECT_TYPE_DEFINITION,description:s,name:i,interfaces:n,directives:l,fields:m})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(C.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(C.BRACE_L,this.parseFieldDefinition,C.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,s=this.parseDescription(),i=this.parseName(),n=this.parseArgumentDefs();this.expectToken(C.COLON);const l=this.parseTypeReference(),m=this.parseConstDirectives();return this.node(t,{kind:M.FIELD_DEFINITION,description:s,name:i,arguments:n,type:l,directives:m})}parseArgumentDefs(){return this.optionalMany(C.PAREN_L,this.parseInputValueDef,C.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,s=this.parseDescription(),i=this.parseName();this.expectToken(C.COLON);const n=this.parseTypeReference();let l;this.expectOptionalToken(C.EQUALS)&&(l=this.parseConstValueLiteral());const m=this.parseConstDirectives();return this.node(t,{kind:M.INPUT_VALUE_DEFINITION,description:s,name:i,type:n,defaultValue:l,directives:m})}parseInterfaceTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("interface");const i=this.parseName(),n=this.parseImplementsInterfaces(),l=this.parseConstDirectives(),m=this.parseFieldsDefinition();return this.node(t,{kind:M.INTERFACE_TYPE_DEFINITION,description:s,name:i,interfaces:n,directives:l,fields:m})}parseUnionTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("union");const i=this.parseName(),n=this.parseConstDirectives(),l=this.parseUnionMemberTypes();return this.node(t,{kind:M.UNION_TYPE_DEFINITION,description:s,name:i,directives:n,types:l})}parseUnionMemberTypes(){return this.expectOptionalToken(C.EQUALS)?this.delimitedMany(C.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("enum");const i=this.parseName(),n=this.parseConstDirectives(),l=this.parseEnumValuesDefinition();return this.node(t,{kind:M.ENUM_TYPE_DEFINITION,description:s,name:i,directives:n,values:l})}parseEnumValuesDefinition(){return this.optionalMany(C.BRACE_L,this.parseEnumValueDefinition,C.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,s=this.parseDescription(),i=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(t,{kind:M.ENUM_VALUE_DEFINITION,description:s,name:i,directives:n})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw ue(this._lexer.source,this._lexer.token.start,`${At(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 i=this.parseName(),n=this.parseConstDirectives(),l=this.parseInputFieldsDefinition();return this.node(t,{kind:M.INPUT_OBJECT_TYPE_DEFINITION,description:s,name:i,directives:n,fields:l})}parseInputFieldsDefinition(){return this.optionalMany(C.BRACE_L,this.parseInputValueDef,C.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===C.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(),i=this.optionalMany(C.BRACE_L,this.parseOperationTypeDefinition,C.BRACE_R);if(s.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:M.SCHEMA_EXTENSION,directives:s,operationTypes:i})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const s=this.parseName(),i=this.parseConstDirectives();if(i.length===0)throw this.unexpected();return this.node(t,{kind:M.SCALAR_TYPE_EXTENSION,name:s,directives:i})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const s=this.parseName(),i=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),l=this.parseFieldsDefinition();if(i.length===0&&n.length===0&&l.length===0)throw this.unexpected();return this.node(t,{kind:M.OBJECT_TYPE_EXTENSION,name:s,interfaces:i,directives:n,fields:l})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const s=this.parseName(),i=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),l=this.parseFieldsDefinition();if(i.length===0&&n.length===0&&l.length===0)throw this.unexpected();return this.node(t,{kind:M.INTERFACE_TYPE_EXTENSION,name:s,interfaces:i,directives:n,fields:l})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const s=this.parseName(),i=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(i.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:M.UNION_TYPE_EXTENSION,name:s,directives:i,types:n})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const s=this.parseName(),i=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(i.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:M.ENUM_TYPE_EXTENSION,name:s,directives:i,values:n})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const s=this.parseName(),i=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(i.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:M.INPUT_OBJECT_TYPE_EXTENSION,name:s,directives:i,fields:n})}parseDirectiveDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("directive"),this.expectToken(C.AT);const i=this.parseName(),n=this.parseArgumentDefs(),l=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const m=this.parseDirectiveLocations();return this.node(t,{kind:M.DIRECTIVE_DEFINITION,description:s,name:i,arguments:n,repeatable:l,locations:m})}parseDirectiveLocations(){return this.delimitedMany(C.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,s=this.parseName();if(Object.prototype.hasOwnProperty.call(Ps,s.value))return s;throw this.unexpected(t)}node(t,s){return this._options.noLocation!==!0&&(s.loc=new ja(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 ue(this._lexer.source,s.start,`Expected ${br(t)}, found ${At(s)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const s=this._lexer.token;if(s.kind===C.NAME&&s.value===t)this.advanceLexer();else throw ue(this._lexer.source,s.start,`Expected "${t}", found ${At(s)}.`)}expectOptionalKeyword(t){const s=this._lexer.token;return s.kind===C.NAME&&s.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const s=t??this._lexer.token;return ue(this._lexer.source,s.start,`Unexpected ${At(s)}.`)}any(t,s,i){this.expectToken(t);const n=[];for(;!this.expectOptionalToken(i);)n.push(s.call(this));return n}optionalMany(t,s,i){if(this.expectOptionalToken(t)){const n=[];do n.push(s.call(this));while(!this.expectOptionalToken(i));return n}return[]}many(t,s,i){this.expectToken(t);const n=[];do n.push(s.call(this));while(!this.expectOptionalToken(i));return n}delimitedMany(t,s){this.expectOptionalToken(t);const i=[];do i.push(s.call(this));while(this.expectOptionalToken(t));return i}advanceLexer(){const{maxTokens:t}=this._options,s=this._lexer.advance();if(s.kind!==C.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw ue(this._lexer.source,s.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function At(e){const t=e.value;return br(e.kind)+(t!=null?` "${t}"`:"")}function br(e){return sc(e)?`"${e}"`:e}function Vc(e){return`"${e.replace(Xc,Gc)}"`}const Xc=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Gc(e){return Rc[e.charCodeAt(0)]}const Rc=["\\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"],vc=Object.freeze({});function Wc(e,t,s=or){const i=new Map;for(const X of Object.values(M))i.set(X,kc(t,X));let n,l=Array.isArray(e),m=[e],d=-1,u=[],o=e,h,c;const a=[],r=[];do{d++;const X=d===m.length,Z=X&&u.length!==0;if(X){if(h=r.length===0?void 0:a[a.length-1],o=c,c=r.pop(),Z)if(l){o=o.slice();let R=0;for(const[b,g]of u){const G=b-R;g===null?(o.splice(G,1),R++):o[G]=g}}else{o=j({},o);for(const[R,b]of u)o[R]=b}d=n.index,m=n.keys,u=n.edits,l=n.inArray,n=n.prev}else if(c){if(h=l?d:m[d],o=c[h],o==null)continue;a.push(h)}let S;if(!Array.isArray(o)){var f,p;lr(o)||Bt(!1,`Invalid AST Node: ${Qs(o)}.`);const R=X?(f=i.get(o.kind))===null||f===void 0?void 0:f.leave:(p=i.get(o.kind))===null||p===void 0?void 0:p.enter;if(S=R?.call(t,o,h,c,a,r),S===vc)break;if(S===!1){if(!X){a.pop();continue}}else if(S!==void 0&&(u.push([h,S]),!X))if(lr(S))o=S;else{a.pop();continue}}if(S===void 0&&Z&&u.push([h,o]),X)a.pop();else{var y;n={inArray:l,index:d,keys:m,edits:u,prev:n},l=Array.isArray(o),m=l?o:(y=s[o.kind])!==null&&y!==void 0?y:[],d=-1,u=[],c&&r.push(c),c=o}}while(n!==void 0);return u.length!==0?u[u.length-1][1]:e}function kc(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 yr(e){return Wc(e,Cc)}const wc=80,Cc={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Y(e.definitions,`
|
|
22
|
+
spurious results.`)}}return!1};let fr=class{constructor(t,s="GraphQL request",i={line:1,column:1}){typeof t=="string"||Bt(!1,`Body must be a string. Received: ${js(t)}.`),this.body=t,this.name=s,this.locationOffset=i,this.locationOffset.line>0||Bt(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Bt(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function Xc(e){return Vc(e,fr)}function br(e,t){const s=new Gc(e,t),i=s.parseDocument();return Object.defineProperty(i,"tokenCount",{enumerable:!1,value:s.tokenCount}),i}let Gc=class{constructor(t,s={}){const i=Xc(t)?t:new fr(t);this._lexer=new nc(i),this._options=s,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(C.NAME);return this.node(t,{kind:M.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:M.DOCUMENT,definitions:this.many(C.SOF,this.parseDefinition,C.EOF)})}parseDefinition(){if(this.peek(C.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),s=t?this._lexer.lookahead():this._lexer.token;if(s.kind===C.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 ue(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(C.BRACE_L))return this.node(t,{kind:M.OPERATION_DEFINITION,operation:lt.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const s=this.parseOperationType();let i;return this.peek(C.NAME)&&(i=this.parseName()),this.node(t,{kind:M.OPERATION_DEFINITION,operation:s,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(C.NAME);switch(t.value){case"query":return lt.QUERY;case"mutation":return lt.MUTATION;case"subscription":return lt.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(C.PAREN_L,this.parseVariableDefinition,C.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:M.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(C.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(C.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(C.DOLLAR),this.node(t,{kind:M.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:M.SELECTION_SET,selections:this.many(C.BRACE_L,this.parseSelection,C.BRACE_R)})}parseSelection(){return this.peek(C.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,s=this.parseName();let i,n;return this.expectOptionalToken(C.COLON)?(i=s,n=this.parseName()):n=s,this.node(t,{kind:M.FIELD,alias:i,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(C.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const s=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(C.PAREN_L,s,C.PAREN_R)}parseArgument(t=!1){const s=this._lexer.token,i=this.parseName();return this.expectToken(C.COLON),this.node(s,{kind:M.ARGUMENT,name:i,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(C.SPREAD);const s=this.expectOptionalKeyword("on");return!s&&this.peek(C.NAME)?this.node(t,{kind:M.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:M.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:M.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:M.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 C.BRACKET_L:return this.parseList(t);case C.BRACE_L:return this.parseObject(t);case C.INT:return this.advanceLexer(),this.node(s,{kind:M.INT,value:s.value});case C.FLOAT:return this.advanceLexer(),this.node(s,{kind:M.FLOAT,value:s.value});case C.STRING:case C.BLOCK_STRING:return this.parseStringLiteral();case C.NAME:switch(this.advanceLexer(),s.value){case"true":return this.node(s,{kind:M.BOOLEAN,value:!0});case"false":return this.node(s,{kind:M.BOOLEAN,value:!1});case"null":return this.node(s,{kind:M.NULL});default:return this.node(s,{kind:M.ENUM,value:s.value})}case C.DOLLAR:if(t)if(this.expectToken(C.DOLLAR),this._lexer.token.kind===C.NAME){const i=this._lexer.token.value;throw ue(this._lexer.source,s.start,`Unexpected variable "$${i}" 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:M.STRING,value:t.value,block:t.kind===C.BLOCK_STRING})}parseList(t){const s=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:M.LIST,values:this.any(C.BRACKET_L,s,C.BRACKET_R)})}parseObject(t){const s=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:M.OBJECT,fields:this.any(C.BRACE_L,s,C.BRACE_R)})}parseObjectField(t){const s=this._lexer.token,i=this.parseName();return this.expectToken(C.COLON),this.node(s,{kind:M.OBJECT_FIELD,name:i,value:this.parseValueLiteral(t)})}parseDirectives(t){const s=[];for(;this.peek(C.AT);)s.push(this.parseDirective(t));return s}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const s=this._lexer.token;return this.expectToken(C.AT),this.node(s,{kind:M.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let s;if(this.expectOptionalToken(C.BRACKET_L)){const i=this.parseTypeReference();this.expectToken(C.BRACKET_R),s=this.node(t,{kind:M.LIST_TYPE,type:i})}else s=this.parseNamedType();return this.expectOptionalToken(C.BANG)?this.node(t,{kind:M.NON_NULL_TYPE,type:s}):s}parseNamedType(){return this.node(this._lexer.token,{kind:M.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(C.STRING)||this.peek(C.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("schema");const i=this.parseConstDirectives(),n=this.many(C.BRACE_L,this.parseOperationTypeDefinition,C.BRACE_R);return this.node(t,{kind:M.SCHEMA_DEFINITION,description:s,directives:i,operationTypes:n})}parseOperationTypeDefinition(){const t=this._lexer.token,s=this.parseOperationType();this.expectToken(C.COLON);const i=this.parseNamedType();return this.node(t,{kind:M.OPERATION_TYPE_DEFINITION,operation:s,type:i})}parseScalarTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("scalar");const i=this.parseName(),n=this.parseConstDirectives();return this.node(t,{kind:M.SCALAR_TYPE_DEFINITION,description:s,name:i,directives:n})}parseObjectTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("type");const i=this.parseName(),n=this.parseImplementsInterfaces(),l=this.parseConstDirectives(),m=this.parseFieldsDefinition();return this.node(t,{kind:M.OBJECT_TYPE_DEFINITION,description:s,name:i,interfaces:n,directives:l,fields:m})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(C.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(C.BRACE_L,this.parseFieldDefinition,C.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,s=this.parseDescription(),i=this.parseName(),n=this.parseArgumentDefs();this.expectToken(C.COLON);const l=this.parseTypeReference(),m=this.parseConstDirectives();return this.node(t,{kind:M.FIELD_DEFINITION,description:s,name:i,arguments:n,type:l,directives:m})}parseArgumentDefs(){return this.optionalMany(C.PAREN_L,this.parseInputValueDef,C.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,s=this.parseDescription(),i=this.parseName();this.expectToken(C.COLON);const n=this.parseTypeReference();let l;this.expectOptionalToken(C.EQUALS)&&(l=this.parseConstValueLiteral());const m=this.parseConstDirectives();return this.node(t,{kind:M.INPUT_VALUE_DEFINITION,description:s,name:i,type:n,defaultValue:l,directives:m})}parseInterfaceTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("interface");const i=this.parseName(),n=this.parseImplementsInterfaces(),l=this.parseConstDirectives(),m=this.parseFieldsDefinition();return this.node(t,{kind:M.INTERFACE_TYPE_DEFINITION,description:s,name:i,interfaces:n,directives:l,fields:m})}parseUnionTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("union");const i=this.parseName(),n=this.parseConstDirectives(),l=this.parseUnionMemberTypes();return this.node(t,{kind:M.UNION_TYPE_DEFINITION,description:s,name:i,directives:n,types:l})}parseUnionMemberTypes(){return this.expectOptionalToken(C.EQUALS)?this.delimitedMany(C.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("enum");const i=this.parseName(),n=this.parseConstDirectives(),l=this.parseEnumValuesDefinition();return this.node(t,{kind:M.ENUM_TYPE_DEFINITION,description:s,name:i,directives:n,values:l})}parseEnumValuesDefinition(){return this.optionalMany(C.BRACE_L,this.parseEnumValueDefinition,C.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,s=this.parseDescription(),i=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(t,{kind:M.ENUM_VALUE_DEFINITION,description:s,name:i,directives:n})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw ue(this._lexer.source,this._lexer.token.start,`${At(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 i=this.parseName(),n=this.parseConstDirectives(),l=this.parseInputFieldsDefinition();return this.node(t,{kind:M.INPUT_OBJECT_TYPE_DEFINITION,description:s,name:i,directives:n,fields:l})}parseInputFieldsDefinition(){return this.optionalMany(C.BRACE_L,this.parseInputValueDef,C.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===C.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(),i=this.optionalMany(C.BRACE_L,this.parseOperationTypeDefinition,C.BRACE_R);if(s.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:M.SCHEMA_EXTENSION,directives:s,operationTypes:i})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const s=this.parseName(),i=this.parseConstDirectives();if(i.length===0)throw this.unexpected();return this.node(t,{kind:M.SCALAR_TYPE_EXTENSION,name:s,directives:i})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const s=this.parseName(),i=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),l=this.parseFieldsDefinition();if(i.length===0&&n.length===0&&l.length===0)throw this.unexpected();return this.node(t,{kind:M.OBJECT_TYPE_EXTENSION,name:s,interfaces:i,directives:n,fields:l})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const s=this.parseName(),i=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),l=this.parseFieldsDefinition();if(i.length===0&&n.length===0&&l.length===0)throw this.unexpected();return this.node(t,{kind:M.INTERFACE_TYPE_EXTENSION,name:s,interfaces:i,directives:n,fields:l})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const s=this.parseName(),i=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(i.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:M.UNION_TYPE_EXTENSION,name:s,directives:i,types:n})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const s=this.parseName(),i=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(i.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:M.ENUM_TYPE_EXTENSION,name:s,directives:i,values:n})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const s=this.parseName(),i=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(i.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:M.INPUT_OBJECT_TYPE_EXTENSION,name:s,directives:i,fields:n})}parseDirectiveDefinition(){const t=this._lexer.token,s=this.parseDescription();this.expectKeyword("directive"),this.expectToken(C.AT);const i=this.parseName(),n=this.parseArgumentDefs(),l=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const m=this.parseDirectiveLocations();return this.node(t,{kind:M.DIRECTIVE_DEFINITION,description:s,name:i,arguments:n,repeatable:l,locations:m})}parseDirectiveLocations(){return this.delimitedMany(C.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,s=this.parseName();if(Object.prototype.hasOwnProperty.call(Ds,s.value))return s;throw this.unexpected(t)}node(t,s){return this._options.noLocation!==!0&&(s.loc=new $a(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 ue(this._lexer.source,s.start,`Expected ${yr(t)}, found ${At(s)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const s=this._lexer.token;if(s.kind===C.NAME&&s.value===t)this.advanceLexer();else throw ue(this._lexer.source,s.start,`Expected "${t}", found ${At(s)}.`)}expectOptionalKeyword(t){const s=this._lexer.token;return s.kind===C.NAME&&s.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const s=t??this._lexer.token;return ue(this._lexer.source,s.start,`Unexpected ${At(s)}.`)}any(t,s,i){this.expectToken(t);const n=[];for(;!this.expectOptionalToken(i);)n.push(s.call(this));return n}optionalMany(t,s,i){if(this.expectOptionalToken(t)){const n=[];do n.push(s.call(this));while(!this.expectOptionalToken(i));return n}return[]}many(t,s,i){this.expectToken(t);const n=[];do n.push(s.call(this));while(!this.expectOptionalToken(i));return n}delimitedMany(t,s){this.expectOptionalToken(t);const i=[];do i.push(s.call(this));while(this.expectOptionalToken(t));return i}advanceLexer(){const{maxTokens:t}=this._options,s=this._lexer.advance();if(s.kind!==C.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw ue(this._lexer.source,s.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function At(e){const t=e.value;return yr(e.kind)+(t!=null?` "${t}"`:"")}function yr(e){return rc(e)?`"${e}"`:e}function Rc(e){return`"${e.replace(vc,Wc)}"`}const vc=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Wc(e){return kc[e.charCodeAt(0)]}const kc=["\\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"],wc=Object.freeze({});function Cc(e,t,s=lr){const i=new Map;for(const X of Object.values(M))i.set(X,xc(t,X));let n,l=Array.isArray(e),m=[e],d=-1,u=[],o=e,h,c;const a=[],r=[];do{d++;const X=d===m.length,Z=X&&u.length!==0;if(X){if(h=r.length===0?void 0:a[a.length-1],o=c,c=r.pop(),Z)if(l){o=o.slice();let R=0;for(const[b,g]of u){const G=b-R;g===null?(o.splice(G,1),R++):o[G]=g}}else{o=j({},o);for(const[R,b]of u)o[R]=b}d=n.index,m=n.keys,u=n.edits,l=n.inArray,n=n.prev}else if(c){if(h=l?d:m[d],o=c[h],o==null)continue;a.push(h)}let S;if(!Array.isArray(o)){var f,p;ar(o)||Bt(!1,`Invalid AST Node: ${js(o)}.`);const R=X?(f=i.get(o.kind))===null||f===void 0?void 0:f.leave:(p=i.get(o.kind))===null||p===void 0?void 0:p.enter;if(S=R?.call(t,o,h,c,a,r),S===wc)break;if(S===!1){if(!X){a.pop();continue}}else if(S!==void 0&&(u.push([h,S]),!X))if(ar(S))o=S;else{a.pop();continue}}if(S===void 0&&Z&&u.push([h,o]),X)a.pop();else{var y;n={inArray:l,index:d,keys:m,edits:u,prev:n},l=Array.isArray(o),m=l?o:(y=s[o.kind])!==null&&y!==void 0?y:[],d=-1,u=[],c&&r.push(c),c=o}}while(n!==void 0);return u.length!==0?u[u.length-1][1]:e}function xc(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 gr(e){return Cc(e,Lc)}const Tc=80,Lc={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Y(e.definitions,`
|
|
23
23
|
|
|
24
|
-
`)},OperationDefinition:{leave(e){const t=P("(",Y(e.variableDefinitions,", "),")"),s=Y([e.operation,Y([e.name,t]),Y(e.directives," ")]," ");return(s==="query"?"":s+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:s,directives:i})=>e+": "+t+P(" = ",s)+P(" ",Y(i," "))},SelectionSet:{leave:({selections:e})=>
|
|
24
|
+
`)},OperationDefinition:{leave(e){const t=P("(",Y(e.variableDefinitions,", "),")"),s=Y([e.operation,Y([e.name,t]),Y(e.directives," ")]," ");return(s==="query"?"":s+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:s,directives:i})=>e+": "+t+P(" = ",s)+P(" ",Y(i," "))},SelectionSet:{leave:({selections:e})=>Te(e)},Field:{leave({alias:e,name:t,arguments:s,directives:i,selectionSet:n}){const l=P("",e,": ")+t;let m=l+P("(",Y(s,", "),")");return m.length>Tc&&(m=l+P(`(
|
|
25
25
|
`,_t(Y(s,`
|
|
26
26
|
`)),`
|
|
27
|
-
)`)),Y([m,Y(i," "),n]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+P(" ",Y(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:s})=>Y(["...",P("on ",e),Y(t," "),s]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:s,directives:i,selectionSet:n})=>`fragment ${e}${P("(",Y(s,", "),")")} on ${t} ${P("",Y(i," ")," ")}`+n},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?
|
|
28
|
-
`)+Y(["schema",Y(t," "),
|
|
27
|
+
)`)),Y([m,Y(i," "),n]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+P(" ",Y(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:s})=>Y(["...",P("on ",e),Y(t," "),s]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:s,directives:i,selectionSet:n})=>`fragment ${e}${P("(",Y(s,", "),")")} on ${t} ${P("",Y(i," ")," ")}`+n},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?ic(e):Rc(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Y(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Y(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+P("(",Y(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:s})=>P("",e,`
|
|
28
|
+
`)+Y(["schema",Y(t," "),Te(s)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:s})=>P("",e,`
|
|
29
29
|
`)+Y(["scalar",t,Y(s," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:s,directives:i,fields:n})=>P("",e,`
|
|
30
|
-
`)+Y(["type",t,P("implements ",Y(s," & ")),Y(i," "),
|
|
31
|
-
`)+t+(
|
|
30
|
+
`)+Y(["type",t,P("implements ",Y(s," & ")),Y(i," "),Te(n)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:s,type:i,directives:n})=>P("",e,`
|
|
31
|
+
`)+t+(Zr(s)?P(`(
|
|
32
32
|
`,_t(Y(s,`
|
|
33
33
|
`)),`
|
|
34
34
|
)`):P("(",Y(s,", "),")"))+": "+i+P(" ",Y(n," "))},InputValueDefinition:{leave:({description:e,name:t,type:s,defaultValue:i,directives:n})=>P("",e,`
|
|
35
35
|
`)+Y([t+": "+s,P("= ",i),Y(n," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:s,directives:i,fields:n})=>P("",e,`
|
|
36
|
-
`)+Y(["interface",t,P("implements ",Y(s," & ")),Y(i," "),
|
|
36
|
+
`)+Y(["interface",t,P("implements ",Y(s," & ")),Y(i," "),Te(n)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:s,types:i})=>P("",e,`
|
|
37
37
|
`)+Y(["union",t,Y(s," "),P("= ",Y(i," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:s,values:i})=>P("",e,`
|
|
38
|
-
`)+Y(["enum",t,Y(s," "),
|
|
38
|
+
`)+Y(["enum",t,Y(s," "),Te(i)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:s})=>P("",e,`
|
|
39
39
|
`)+Y([t,Y(s," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:s,fields:i})=>P("",e,`
|
|
40
|
-
`)+Y(["input",t,Y(s," "),
|
|
41
|
-
`)+"directive @"+t+(
|
|
40
|
+
`)+Y(["input",t,Y(s," "),Te(i)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:s,repeatable:i,locations:n})=>P("",e,`
|
|
41
|
+
`)+"directive @"+t+(Zr(s)?P(`(
|
|
42
42
|
`,_t(Y(s,`
|
|
43
43
|
`)),`
|
|
44
|
-
)`):P("(",Y(s,", "),")"))+(i?" repeatable":"")+" on "+Y(n," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Y(["extend schema",Y(e," "),
|
|
44
|
+
)`):P("(",Y(s,", "),")"))+(i?" repeatable":"")+" on "+Y(n," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Y(["extend schema",Y(e," "),Te(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>Y(["extend scalar",e,Y(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:s,fields:i})=>Y(["extend type",e,P("implements ",Y(t," & ")),Y(s," "),Te(i)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:s,fields:i})=>Y(["extend interface",e,P("implements ",Y(t," & ")),Y(s," "),Te(i)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:s})=>Y(["extend union",e,Y(t," "),P("= ",Y(s," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:s})=>Y(["extend enum",e,Y(t," "),Te(s)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:s})=>Y(["extend input",e,Y(t," "),Te(s)]," ")}};function Y(e,t=""){var s;return(s=e?.filter(i=>i).join(t))!==null&&s!==void 0?s:""}function Te(e){return P(`{
|
|
45
45
|
`,_t(Y(e,`
|
|
46
46
|
`)),`
|
|
47
47
|
}`)}function P(e,t,s=""){return t!=null&&t!==""?e+t+s:""}function _t(e){return P(" ",e.replace(/\n/g,`
|
|
48
|
-
`))}function
|
|
49
|
-
`)))!==null&&t!==void 0?t:!1}const js=JSON,xc=e=>e.toUpperCase(),Lc=e=>{const t={};return e.forEach((s,i)=>{t[i]=s}),t},Tc=(e,t,s)=>e.document?e:{document:e,variables:t,requestHeaders:s,signal:void 0},Nc=(e,t,s)=>e.query?e:{query:e,variables:t,requestHeaders:s,signal:void 0},Jc=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},Zr=e=>{var t,s;let i;const n=e.definitions.filter(l=>l.kind==="OperationDefinition");return n.length===1&&(i=(s=(t=n[0])==null?void 0:t.name)==null?void 0:s.value),i},As=e=>{if(typeof e=="string"){let s;try{const i=fr(e);s=Zr(i)}catch{}return{query:e,operationName:s}}const t=Zr(e);return{query:yr(e),operationName:t}};class ct extends Error{constructor(t,s){const i=`${ct.extractMessage(t)}: ${JSON.stringify({response:t,request:s})}`;super(i),Object.setPrototypeOf(this,ct.prototype),this.response=t,this.request=s,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ct)}static extractMessage(t){var s,i,n;return(n=(i=(s=t.errors)==null?void 0:s[0])==null?void 0:i.message)!=null?n:`GraphQL Error (Code: ${t.status})`}}var Yc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $s={exports:{}};(function(e,t){var s=typeof self<"u"?self:Yc,i=function(){function l(){this.fetch=!1,this.DOMException=s.DOMException}return l.prototype=s,new l}();(function(l){(function(m){var d={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 u(I){return I&&DataView.prototype.isPrototypeOf(I)}if(d.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(I){return I&&o.indexOf(Object.prototype.toString.call(I))>-1};function c(I){if(typeof I!="string"&&(I=String(I)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(I))throw new TypeError("Invalid character in header field name");return I.toLowerCase()}function a(I){return typeof I!="string"&&(I=String(I)),I}function r(I){var W={next:function(){var L=I.shift();return{done:L===void 0,value:L}}};return d.iterable&&(W[Symbol.iterator]=function(){return W}),W}function f(I){this.map={},I instanceof f?I.forEach(function(W,L){this.append(L,W)},this):Array.isArray(I)?I.forEach(function(W){this.append(W[0],W[1])},this):I&&Object.getOwnPropertyNames(I).forEach(function(W){this.append(W,I[W])},this)}f.prototype.append=function(I,W){I=c(I),W=a(W);var L=this.map[I];this.map[I]=L?L+", "+W:W},f.prototype.delete=function(I){delete this.map[c(I)]},f.prototype.get=function(I){return I=c(I),this.has(I)?this.map[I]:null},f.prototype.has=function(I){return this.map.hasOwnProperty(c(I))},f.prototype.set=function(I,W){this.map[c(I)]=a(W)},f.prototype.forEach=function(I,W){for(var L in this.map)this.map.hasOwnProperty(L)&&I.call(W,this.map[L],L,this)},f.prototype.keys=function(){var I=[];return this.forEach(function(W,L){I.push(L)}),r(I)},f.prototype.values=function(){var I=[];return this.forEach(function(W){I.push(W)}),r(I)},f.prototype.entries=function(){var I=[];return this.forEach(function(W,L){I.push([L,W])}),r(I)},d.iterable&&(f.prototype[Symbol.iterator]=f.prototype.entries);function p(I){if(I.bodyUsed)return Promise.reject(new TypeError("Already read"));I.bodyUsed=!0}function y(I){return new Promise(function(W,L){I.onload=function(){W(I.result)},I.onerror=function(){L(I.error)}})}function X(I){var W=new FileReader,L=y(W);return W.readAsArrayBuffer(I),L}function Z(I){var W=new FileReader,L=y(W);return W.readAsText(I),L}function S(I){for(var W=new Uint8Array(I),L=new Array(W.length),U=0;U<W.length;U++)L[U]=String.fromCharCode(W[U]);return L.join("")}function R(I){if(I.slice)return I.slice(0);var W=new Uint8Array(I.byteLength);return W.set(new Uint8Array(I)),W.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(I){this._bodyInit=I,I?typeof I=="string"?this._bodyText=I:d.blob&&Blob.prototype.isPrototypeOf(I)?this._bodyBlob=I:d.formData&&FormData.prototype.isPrototypeOf(I)?this._bodyFormData=I:d.searchParams&&URLSearchParams.prototype.isPrototypeOf(I)?this._bodyText=I.toString():d.arrayBuffer&&d.blob&&u(I)?(this._bodyArrayBuffer=R(I.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):d.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(I)||h(I))?this._bodyArrayBuffer=R(I):this._bodyText=I=Object.prototype.toString.call(I):this._bodyText="",this.headers.get("content-type")||(typeof I=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):d.searchParams&&URLSearchParams.prototype.isPrototypeOf(I)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},d.blob&&(this.blob=function(){var I=p(this);if(I)return I;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?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(X)}),this.text=function(){var I=p(this);if(I)return I;if(this._bodyBlob)return Z(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(S(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},d.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 G(I){var W=I.toUpperCase();return g.indexOf(W)>-1?W:I}function v(I,W){W=W||{};var L=W.body;if(I instanceof v){if(I.bodyUsed)throw new TypeError("Already read");this.url=I.url,this.credentials=I.credentials,W.headers||(this.headers=new f(I.headers)),this.method=I.method,this.mode=I.mode,this.signal=I.signal,!L&&I._bodyInit!=null&&(L=I._bodyInit,I.bodyUsed=!0)}else this.url=String(I);if(this.credentials=W.credentials||this.credentials||"same-origin",(W.headers||!this.headers)&&(this.headers=new f(W.headers)),this.method=G(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")&&L)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(L)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})};function V(I){var W=new FormData;return I.trim().split("&").forEach(function(L){if(L){var U=L.split("="),F=U.shift().replace(/\+/g," "),J=U.join("=").replace(/\+/g," ");W.append(decodeURIComponent(F),decodeURIComponent(J))}}),W}function k(I){var W=new f,L=I.replace(/\r?\n[\t ]+/g," ");return L.split(/\r?\n/).forEach(function(U){var F=U.split(":"),J=F.shift().trim();if(J){var D=F.join(":").trim();W.append(J,D)}}),W}b.call(v.prototype);function w(I,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 f(W.headers),this.url=W.url||"",this._initBody(I)}b.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},w.error=function(){var I=new w(null,{status:0,statusText:""});return I.type="error",I};var N=[301,302,303,307,308];w.redirect=function(I,W){if(N.indexOf(W)===-1)throw new RangeError("Invalid status code");return new w(null,{status:W,headers:{location:I}})},m.DOMException=l.DOMException;try{new m.DOMException}catch{m.DOMException=function(W,L){this.message=W,this.name=L;var U=Error(W);this.stack=U.stack},m.DOMException.prototype=Object.create(Error.prototype),m.DOMException.prototype.constructor=m.DOMException}function z(I,W){return new Promise(function(L,U){var F=new v(I,W);if(F.signal&&F.signal.aborted)return U(new m.DOMException("Aborted","AbortError"));var J=new XMLHttpRequest;function D(){J.abort()}J.onload=function(){var E={status:J.status,statusText:J.statusText,headers:k(J.getAllResponseHeaders()||"")};E.url="responseURL"in J?J.responseURL:E.headers.get("X-Request-URL");var x="response"in J?J.response:J.responseText;L(new w(x,E))},J.onerror=function(){U(new TypeError("Network request failed"))},J.ontimeout=function(){U(new TypeError("Network request failed"))},J.onabort=function(){U(new m.DOMException("Aborted","AbortError"))},J.open(F.method,F.url,!0),F.credentials==="include"?J.withCredentials=!0:F.credentials==="omit"&&(J.withCredentials=!1),"responseType"in J&&d.blob&&(J.responseType="blob"),F.headers.forEach(function(E,x){J.setRequestHeader(x,E)}),F.signal&&(F.signal.addEventListener("abort",D),J.onreadystatechange=function(){J.readyState===4&&F.signal.removeEventListener("abort",D)}),J.send(typeof F._bodyInit>"u"?null:F._bodyInit)})}return z.polyfill=!0,l.fetch||(l.fetch=z,l.Headers=f,l.Request=v,l.Response=w),m.Headers=f,m.Request=v,m.Response=w,m.fetch=z,Object.defineProperty(m,"__esModule",{value:!0}),m})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var n=i;t=n.fetch,t.default=n.fetch,t.fetch=n.fetch,t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response,e.exports=t})($s,$s.exports);var qs=$s.exports;const $t=_s(qs),Uc=Object.freeze(Object.defineProperty({__proto__:null,default:$t},Symbol.toStringTag,{value:"Module"})),ut=e=>{let t={};return e&&(typeof Headers<"u"&&e instanceof Headers||Uc&&qs.Headers&&e instanceof qs.Headers?t=Lc(e):Array.isArray(e)?e.forEach(([s,i])=>{s&&i!==void 0&&(t[s]=i)}):t=e),t},Sr=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Fc=e=>{if(!Array.isArray(e.query)){const i=e,n=[`query=${encodeURIComponent(Sr(i.query))}`];return e.variables&&n.push(`variables=${encodeURIComponent(i.jsonSerializer.stringify(i.variables))}`),i.operationName&&n.push(`operationName=${encodeURIComponent(i.operationName)}`),n.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((i,n,l)=>(i.push({query:Sr(n),variables:t.variables?t.jsonSerializer.stringify(t.variables[l]):void 0}),i),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(s))}`},Mc=e=>t=>ot(void 0,null,function*(){var s;const{url:i,query:n,variables:l,operationName:m,fetch:d,fetchOptions:u,middleware:o}=t,h=j({},t.headers);let c="",a;e==="POST"?(a=Oc(n,l,m,u.jsonSerializer),typeof a=="string"&&(h["Content-Type"]="application/json")):c=Fc({query:n,variables:l,operationName:m,jsonSerializer:(s=u.jsonSerializer)!=null?s:js});const r=j({method:e,headers:h,body:a},u);let f=i,p=r;if(o){const y=yield Promise.resolve(o(Dt(j({},r),{url:i,operationName:m,variables:l}))),{url:X}=y,Z=Xt(y,["url"]);f=X,p=Z}return c&&(f=`${f}?${c}`),yield d(f,p)});let Kc=class{constructor(t,s={}){this.url=t,this.requestConfig=s,this.rawRequest=(...i)=>ot(this,null,function*(){const[n,l,m]=i,d=Nc(n,l,m),u=this.requestConfig,{headers:o,fetch:h=$t,method:c="POST",requestMiddleware:a,responseMiddleware:r}=u,f=Xt(u,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;d.signal!==void 0&&(f.signal=d.signal);const{operationName:y}=As(d.query);return ei({url:p,query:d.query,variables:d.variables,headers:j(j({},ut(ti(o))),ut(d.requestHeaders)),operationName:y,fetch:h,method:c,fetchOptions:f,middleware:a}).then(X=>(r&&r(X),X)).catch(X=>{throw r&&r(X),X})})}request(t,...s){return ot(this,null,function*(){const[i,n]=s,l=Tc(t,i,n),m=this.requestConfig,{headers:d,fetch:u=$t,method:o="POST",requestMiddleware:h,responseMiddleware:c}=m,a=Xt(m,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:r}=this;l.signal!==void 0&&(a.signal=l.signal);const{query:f,operationName:p}=As(l.document);return ei({url:r,query:f,variables:l.variables,headers:j(j({},ut(ti(d))),ut(l.requestHeaders)),operationName:p,fetch:u,method:o,fetchOptions:a,middleware:h}).then(y=>(c&&c(y),y.data)).catch(y=>{throw c&&c(y),y})})}batchRequests(t,s){var i;const n=Jc(t,s),l=this.requestConfig,{headers:m}=l,d=Xt(l,["headers"]);n.signal!==void 0&&(d.signal=n.signal);const u=n.documents.map(({document:h})=>As(h).query),o=n.documents.map(({variables:h})=>h);return ei({url:this.url,query:u,variables:o,headers:j(j({},ut(ti(m))),ut(n.requestHeaders)),operationName:void 0,fetch:(i=this.requestConfig.fetch)!=null?i:$t,method:this.requestConfig.method||"POST",fetchOptions:d,middleware:this.requestConfig.requestMiddleware}).then(h=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h.data)).catch(h=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,s){const{headers:i}=this.requestConfig;return i?i[t]=s:this.requestConfig.headers={[t]:s},this}setEndpoint(t){return this.url=t,this}};const ei=e=>ot(void 0,null,function*(){var t,s;const{query:i,variables:n,fetchOptions:l}=e,m=Mc(xc((t=e.method)!=null?t:"post")),d=Array.isArray(e.query),u=yield m(e),o=yield Ec(u,(s=l.jsonSerializer)!=null?s:js),h=Array.isArray(o)?!o.some(({data:a})=>!a):!!o.data,c=Array.isArray(o)||!o.errors||Array.isArray(o.errors)&&!o.errors.length||l.errorPolicy==="all"||l.errorPolicy==="ignore";if(u.ok&&c&&h){const a=o,r=Xt(a,["errors"]),f=l.errorPolicy==="ignore"?r:o;return Dt(j({},d?{data:f}:f),{headers:u.headers,status:u.status})}else{const a=typeof o=="string"?{error:o}:o;throw new ct(Dt(j({},a),{status:u.status,headers:u.headers}),{query:i,variables:n})}}),Oc=(e,t,s,i)=>{const n=i??js;if(!Array.isArray(e))return n.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((m,d,u)=>(m.push({query:d,variables:t?t[u]:void 0}),m),[]);return n.stringify(l)},Ec=(e,t)=>ot(void 0,null,function*(){let s;return e.headers.forEach((i,n)=>{n.toLowerCase()==="content-type"&&(s=i)}),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()}),ti=e=>typeof e=="function"?e():e;var si={exports:{}};(function(e,t){t=e.exports=s,t.getSerialize=i;function s(n,l,m,d){return JSON.stringify(n,i(l,d),m)}function i(n,l){var m=[],d=[];return l==null&&(l=function(u,o){return m[0]===o?"[Circular ~]":"[Circular ~."+d.slice(0,m.indexOf(o)).join(".")+"]"}),function(u,o){if(m.length>0){var h=m.indexOf(this);~h?m.splice(h+1):m.push(this),~h?d.splice(h,1/0,u):d.push(u),~m.indexOf(o)&&(o=l.call(this,u,o))}else m.push(o);return n==null?o:n.call(this,u,o)}}})(si,si.exports);var zc=si.exports;const Hc=_s(zc);var qt=function(){return qt=Object.assign||function(e){for(var t,s=1,i=arguments.length;s<i;s++){t=arguments[s];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},qt.apply(this,arguments)},es=new Map,ii=new Map,Ir=!0,ts=!1;function Vr(e){return e.replace(/[\s,]+/g," ").trim()}function Pc(e){return Vr(e.source.body.substring(e.start,e.end))}function Dc(e){var t=new Set,s=[];return e.definitions.forEach(function(i){if(i.kind==="FragmentDefinition"){var n=i.name.value,l=Pc(i.loc),m=ii.get(n);m&&!m.has(l)?Ir&&console.warn("Warning: fragment with name "+n+` already exists.
|
|
48
|
+
`))}function Zr(e){var t;return(t=e?.some(s=>s.includes(`
|
|
49
|
+
`)))!==null&&t!==void 0?t:!1}const As=JSON,Nc=e=>e.toUpperCase(),Jc=e=>{const t={};return e.forEach((s,i)=>{t[i]=s}),t},Yc=(e,t,s)=>e.document?e:{document:e,variables:t,requestHeaders:s,signal:void 0},Uc=(e,t,s)=>e.query?e:{query:e,variables:t,requestHeaders:s,signal:void 0},Fc=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},Sr=e=>{var t,s;let i;const n=e.definitions.filter(l=>l.kind==="OperationDefinition");return n.length===1&&(i=(s=(t=n[0])==null?void 0:t.name)==null?void 0:s.value),i},_s=e=>{if(typeof e=="string"){let s;try{const i=br(e);s=Sr(i)}catch{}return{query:e,operationName:s}}const t=Sr(e);return{query:gr(e),operationName:t}};class ct extends Error{constructor(t,s){const i=`${ct.extractMessage(t)}: ${JSON.stringify({response:t,request:s})}`;super(i),Object.setPrototypeOf(this,ct.prototype),this.response=t,this.request=s,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ct)}static extractMessage(t){var s,i,n;return(n=(i=(s=t.errors)==null?void 0:s[0])==null?void 0:i.message)!=null?n:`GraphQL Error (Code: ${t.status})`}}var Mc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qs={exports:{}};(function(e,t){var s=typeof self<"u"?self:Mc,i=function(){function l(){this.fetch=!1,this.DOMException=s.DOMException}return l.prototype=s,new l}();(function(l){(function(m){var d={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 u(I){return I&&DataView.prototype.isPrototypeOf(I)}if(d.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(I){return I&&o.indexOf(Object.prototype.toString.call(I))>-1};function c(I){if(typeof I!="string"&&(I=String(I)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(I))throw new TypeError("Invalid character in header field name");return I.toLowerCase()}function a(I){return typeof I!="string"&&(I=String(I)),I}function r(I){var W={next:function(){var T=I.shift();return{done:T===void 0,value:T}}};return d.iterable&&(W[Symbol.iterator]=function(){return W}),W}function f(I){this.map={},I instanceof f?I.forEach(function(W,T){this.append(T,W)},this):Array.isArray(I)?I.forEach(function(W){this.append(W[0],W[1])},this):I&&Object.getOwnPropertyNames(I).forEach(function(W){this.append(W,I[W])},this)}f.prototype.append=function(I,W){I=c(I),W=a(W);var T=this.map[I];this.map[I]=T?T+", "+W:W},f.prototype.delete=function(I){delete this.map[c(I)]},f.prototype.get=function(I){return I=c(I),this.has(I)?this.map[I]:null},f.prototype.has=function(I){return this.map.hasOwnProperty(c(I))},f.prototype.set=function(I,W){this.map[c(I)]=a(W)},f.prototype.forEach=function(I,W){for(var T in this.map)this.map.hasOwnProperty(T)&&I.call(W,this.map[T],T,this)},f.prototype.keys=function(){var I=[];return this.forEach(function(W,T){I.push(T)}),r(I)},f.prototype.values=function(){var I=[];return this.forEach(function(W){I.push(W)}),r(I)},f.prototype.entries=function(){var I=[];return this.forEach(function(W,T){I.push([T,W])}),r(I)},d.iterable&&(f.prototype[Symbol.iterator]=f.prototype.entries);function p(I){if(I.bodyUsed)return Promise.reject(new TypeError("Already read"));I.bodyUsed=!0}function y(I){return new Promise(function(W,T){I.onload=function(){W(I.result)},I.onerror=function(){T(I.error)}})}function X(I){var W=new FileReader,T=y(W);return W.readAsArrayBuffer(I),T}function Z(I){var W=new FileReader,T=y(W);return W.readAsText(I),T}function S(I){for(var W=new Uint8Array(I),T=new Array(W.length),U=0;U<W.length;U++)T[U]=String.fromCharCode(W[U]);return T.join("")}function R(I){if(I.slice)return I.slice(0);var W=new Uint8Array(I.byteLength);return W.set(new Uint8Array(I)),W.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(I){this._bodyInit=I,I?typeof I=="string"?this._bodyText=I:d.blob&&Blob.prototype.isPrototypeOf(I)?this._bodyBlob=I:d.formData&&FormData.prototype.isPrototypeOf(I)?this._bodyFormData=I:d.searchParams&&URLSearchParams.prototype.isPrototypeOf(I)?this._bodyText=I.toString():d.arrayBuffer&&d.blob&&u(I)?(this._bodyArrayBuffer=R(I.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):d.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(I)||h(I))?this._bodyArrayBuffer=R(I):this._bodyText=I=Object.prototype.toString.call(I):this._bodyText="",this.headers.get("content-type")||(typeof I=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):d.searchParams&&URLSearchParams.prototype.isPrototypeOf(I)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},d.blob&&(this.blob=function(){var I=p(this);if(I)return I;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?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(X)}),this.text=function(){var I=p(this);if(I)return I;if(this._bodyBlob)return Z(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(S(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},d.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 G(I){var W=I.toUpperCase();return g.indexOf(W)>-1?W:I}function v(I,W){W=W||{};var T=W.body;if(I instanceof v){if(I.bodyUsed)throw new TypeError("Already read");this.url=I.url,this.credentials=I.credentials,W.headers||(this.headers=new f(I.headers)),this.method=I.method,this.mode=I.mode,this.signal=I.signal,!T&&I._bodyInit!=null&&(T=I._bodyInit,I.bodyUsed=!0)}else this.url=String(I);if(this.credentials=W.credentials||this.credentials||"same-origin",(W.headers||!this.headers)&&(this.headers=new f(W.headers)),this.method=G(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(I){var W=new FormData;return I.trim().split("&").forEach(function(T){if(T){var U=T.split("="),F=U.shift().replace(/\+/g," "),J=U.join("=").replace(/\+/g," ");W.append(decodeURIComponent(F),decodeURIComponent(J))}}),W}function k(I){var W=new f,T=I.replace(/\r?\n[\t ]+/g," ");return T.split(/\r?\n/).forEach(function(U){var F=U.split(":"),J=F.shift().trim();if(J){var D=F.join(":").trim();W.append(J,D)}}),W}b.call(v.prototype);function w(I,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 f(W.headers),this.url=W.url||"",this._initBody(I)}b.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},w.error=function(){var I=new w(null,{status:0,statusText:""});return I.type="error",I};var N=[301,302,303,307,308];w.redirect=function(I,W){if(N.indexOf(W)===-1)throw new RangeError("Invalid status code");return new w(null,{status:W,headers:{location:I}})},m.DOMException=l.DOMException;try{new m.DOMException}catch{m.DOMException=function(W,T){this.message=W,this.name=T;var U=Error(W);this.stack=U.stack},m.DOMException.prototype=Object.create(Error.prototype),m.DOMException.prototype.constructor=m.DOMException}function z(I,W){return new Promise(function(T,U){var F=new v(I,W);if(F.signal&&F.signal.aborted)return U(new m.DOMException("Aborted","AbortError"));var J=new XMLHttpRequest;function D(){J.abort()}J.onload=function(){var O={status:J.status,statusText:J.statusText,headers:k(J.getAllResponseHeaders()||"")};O.url="responseURL"in J?J.responseURL:O.headers.get("X-Request-URL");var x="response"in J?J.response:J.responseText;T(new w(x,O))},J.onerror=function(){U(new TypeError("Network request failed"))},J.ontimeout=function(){U(new TypeError("Network request failed"))},J.onabort=function(){U(new m.DOMException("Aborted","AbortError"))},J.open(F.method,F.url,!0),F.credentials==="include"?J.withCredentials=!0:F.credentials==="omit"&&(J.withCredentials=!1),"responseType"in J&&d.blob&&(J.responseType="blob"),F.headers.forEach(function(O,x){J.setRequestHeader(x,O)}),F.signal&&(F.signal.addEventListener("abort",D),J.onreadystatechange=function(){J.readyState===4&&F.signal.removeEventListener("abort",D)}),J.send(typeof F._bodyInit>"u"?null:F._bodyInit)})}return z.polyfill=!0,l.fetch||(l.fetch=z,l.Headers=f,l.Request=v,l.Response=w),m.Headers=f,m.Request=v,m.Response=w,m.fetch=z,Object.defineProperty(m,"__esModule",{value:!0}),m})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var n=i;t=n.fetch,t.default=n.fetch,t.fetch=n.fetch,t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response,e.exports=t})(qs,qs.exports);var ei=qs.exports;const $t=$s(ei),Kc=Object.freeze(Object.defineProperty({__proto__:null,default:$t},Symbol.toStringTag,{value:"Module"})),ut=e=>{let t={};return e&&(typeof Headers<"u"&&e instanceof Headers||Kc&&ei.Headers&&e instanceof ei.Headers?t=Jc(e):Array.isArray(e)?e.forEach(([s,i])=>{s&&i!==void 0&&(t[s]=i)}):t=e),t},Ir=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Oc=e=>{if(!Array.isArray(e.query)){const i=e,n=[`query=${encodeURIComponent(Ir(i.query))}`];return e.variables&&n.push(`variables=${encodeURIComponent(i.jsonSerializer.stringify(i.variables))}`),i.operationName&&n.push(`operationName=${encodeURIComponent(i.operationName)}`),n.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((i,n,l)=>(i.push({query:Ir(n),variables:t.variables?t.jsonSerializer.stringify(t.variables[l]):void 0}),i),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(s))}`},Ec=e=>t=>ot(void 0,null,function*(){var s;const{url:i,query:n,variables:l,operationName:m,fetch:d,fetchOptions:u,middleware:o}=t,h=j({},t.headers);let c="",a;e==="POST"?(a=Hc(n,l,m,u.jsonSerializer),typeof a=="string"&&(h["Content-Type"]="application/json")):c=Oc({query:n,variables:l,operationName:m,jsonSerializer:(s=u.jsonSerializer)!=null?s:As});const r=j({method:e,headers:h,body:a},u);let f=i,p=r;if(o){const y=yield Promise.resolve(o(Dt(j({},r),{url:i,operationName:m,variables:l}))),{url:X}=y,Z=Xt(y,["url"]);f=X,p=Z}return c&&(f=`${f}?${c}`),yield d(f,p)});let zc=class{constructor(t,s={}){this.url=t,this.requestConfig=s,this.rawRequest=(...i)=>ot(this,null,function*(){const[n,l,m]=i,d=Uc(n,l,m),u=this.requestConfig,{headers:o,fetch:h=$t,method:c="POST",requestMiddleware:a,responseMiddleware:r}=u,f=Xt(u,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:p}=this;d.signal!==void 0&&(f.signal=d.signal);const{operationName:y}=_s(d.query);return ti({url:p,query:d.query,variables:d.variables,headers:j(j({},ut(si(o))),ut(d.requestHeaders)),operationName:y,fetch:h,method:c,fetchOptions:f,middleware:a}).then(X=>(r&&r(X),X)).catch(X=>{throw r&&r(X),X})})}request(t,...s){return ot(this,null,function*(){const[i,n]=s,l=Yc(t,i,n),m=this.requestConfig,{headers:d,fetch:u=$t,method:o="POST",requestMiddleware:h,responseMiddleware:c}=m,a=Xt(m,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:r}=this;l.signal!==void 0&&(a.signal=l.signal);const{query:f,operationName:p}=_s(l.document);return ti({url:r,query:f,variables:l.variables,headers:j(j({},ut(si(d))),ut(l.requestHeaders)),operationName:p,fetch:u,method:o,fetchOptions:a,middleware:h}).then(y=>(c&&c(y),y.data)).catch(y=>{throw c&&c(y),y})})}batchRequests(t,s){var i;const n=Fc(t,s),l=this.requestConfig,{headers:m}=l,d=Xt(l,["headers"]);n.signal!==void 0&&(d.signal=n.signal);const u=n.documents.map(({document:h})=>_s(h).query),o=n.documents.map(({variables:h})=>h);return ti({url:this.url,query:u,variables:o,headers:j(j({},ut(si(m))),ut(n.requestHeaders)),operationName:void 0,fetch:(i=this.requestConfig.fetch)!=null?i:$t,method:this.requestConfig.method||"POST",fetchOptions:d,middleware:this.requestConfig.requestMiddleware}).then(h=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h.data)).catch(h=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,s){const{headers:i}=this.requestConfig;return i?i[t]=s:this.requestConfig.headers={[t]:s},this}setEndpoint(t){return this.url=t,this}};const ti=e=>ot(void 0,null,function*(){var t,s;const{query:i,variables:n,fetchOptions:l}=e,m=Ec(Nc((t=e.method)!=null?t:"post")),d=Array.isArray(e.query),u=yield m(e),o=yield Pc(u,(s=l.jsonSerializer)!=null?s:As),h=Array.isArray(o)?!o.some(({data:a})=>!a):!!o.data,c=Array.isArray(o)||!o.errors||Array.isArray(o.errors)&&!o.errors.length||l.errorPolicy==="all"||l.errorPolicy==="ignore";if(u.ok&&c&&h){const a=o,r=Xt(a,["errors"]),f=l.errorPolicy==="ignore"?r:o;return Dt(j({},d?{data:f}:f),{headers:u.headers,status:u.status})}else{const a=typeof o=="string"?{error:o}:o;throw new ct(Dt(j({},a),{status:u.status,headers:u.headers}),{query:i,variables:n})}}),Hc=(e,t,s,i)=>{const n=i??As;if(!Array.isArray(e))return n.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((m,d,u)=>(m.push({query:d,variables:t?t[u]:void 0}),m),[]);return n.stringify(l)},Pc=(e,t)=>ot(void 0,null,function*(){let s;return e.headers.forEach((i,n)=>{n.toLowerCase()==="content-type"&&(s=i)}),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()}),si=e=>typeof e=="function"?e():e;var ii={exports:{}};(function(e,t){t=e.exports=s,t.getSerialize=i;function s(n,l,m,d){return JSON.stringify(n,i(l,d),m)}function i(n,l){var m=[],d=[];return l==null&&(l=function(u,o){return m[0]===o?"[Circular ~]":"[Circular ~."+d.slice(0,m.indexOf(o)).join(".")+"]"}),function(u,o){if(m.length>0){var h=m.indexOf(this);~h?m.splice(h+1):m.push(this),~h?d.splice(h,1/0,u):d.push(u),~m.indexOf(o)&&(o=l.call(this,u,o))}else m.push(o);return n==null?o:n.call(this,u,o)}}})(ii,ii.exports);var Dc=ii.exports;const Bc=$s(Dc);var qt=function(){return qt=Object.assign||function(e){for(var t,s=1,i=arguments.length;s<i;s++){t=arguments[s];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},qt.apply(this,arguments)},es=new Map,ni=new Map,Vr=!0,ts=!1;function Xr(e){return e.replace(/[\s,]+/g," ").trim()}function Qc(e){return Xr(e.source.body.substring(e.start,e.end))}function jc(e){var t=new Set,s=[];return e.definitions.forEach(function(i){if(i.kind==="FragmentDefinition"){var n=i.name.value,l=Qc(i.loc),m=ni.get(n);m&&!m.has(l)?Vr&&console.warn("Warning: fragment with name "+n+` 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`):m||
|
|
51
|
+
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):m||ni.set(n,m=new Set),m.add(l),t.has(l)||(t.add(l),s.push(i))}else s.push(i)}),qt(qt({},e),{definitions:s})}function Ac(e){var t=new Set(e.definitions);t.forEach(function(i){i.loc&&delete i.loc,Object.keys(i).forEach(function(n){var l=i[n];l&&typeof l=="object"&&t.add(l)})});var s=e.loc;return s&&(delete s.startToken,delete s.endToken),e}function _c(e){var t=Xr(e);if(!es.has(t)){var s=br(e,{experimentalFragmentVariables:ts,allowLegacyFragmentVariables:ts});if(!s||s.kind!=="Document")throw new Error("Not a valid GraphQL document.");es.set(t,Ac(jc(s)))}return es.get(t)}function fe(e){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];typeof e=="string"&&(e=[e]);var i=e[0];return t.forEach(function(n,l){n&&n.kind==="Document"?i+=n.loc.source.body:i+=n,i+=e[l+1]}),_c(i)}function $c(){es.clear(),ni.clear()}function qc(){Vr=!1}function eu(){ts=!0}function tu(){ts=!1}var Wt={gql:fe,resetCaches:$c,disableFragmentWarnings:qc,enableExperimentalFragmentVariables:eu,disableExperimentalFragmentVariables:tu};(function(e){e.gql=Wt.gql,e.resetCaches=Wt.resetCaches,e.disableFragmentWarnings=Wt.disableFragmentWarnings,e.enableExperimentalFragmentVariables=Wt.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=Wt.disableExperimentalFragmentVariables})(fe||(fe={})),fe.default=fe;const Gr=fe`
|
|
52
52
|
fragment MatchParts on MatchConfig {
|
|
53
53
|
regexValue
|
|
54
54
|
matchValue
|
|
55
55
|
}
|
|
56
|
-
`,
|
|
56
|
+
`,su=fe`
|
|
57
57
|
mutation PushPayload(
|
|
58
58
|
$session_secure_id: String!
|
|
59
59
|
$payload_id: ID!
|
|
@@ -79,7 +79,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):m
|
|
|
79
79
|
highlight_logs: $highlight_logs
|
|
80
80
|
)
|
|
81
81
|
}
|
|
82
|
-
`,
|
|
82
|
+
`,Rr=fe`
|
|
83
83
|
mutation PushSessionEvents(
|
|
84
84
|
$session_secure_id: String!
|
|
85
85
|
$payload_id: Int64ID!
|
|
@@ -91,7 +91,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):m
|
|
|
91
91
|
data: $data
|
|
92
92
|
)
|
|
93
93
|
}
|
|
94
|
-
`,
|
|
94
|
+
`,iu=fe`
|
|
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`):m
|
|
|
103
103
|
user_object: $user_object
|
|
104
104
|
)
|
|
105
105
|
}
|
|
106
|
-
`,
|
|
106
|
+
`,nu=fe`
|
|
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`):m
|
|
|
113
113
|
properties_object: $properties_object
|
|
114
114
|
)
|
|
115
115
|
}
|
|
116
|
-
`,
|
|
116
|
+
`,ru=fe`
|
|
117
117
|
mutation pushMetrics($metrics: [MetricInput]!) {
|
|
118
118
|
pushMetrics(metrics: $metrics)
|
|
119
119
|
}
|
|
120
|
-
`,
|
|
120
|
+
`,ou=fe`
|
|
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`):m
|
|
|
133
133
|
timestamp: $timestamp
|
|
134
134
|
)
|
|
135
135
|
}
|
|
136
|
-
`,
|
|
136
|
+
`,lu=fe`
|
|
137
137
|
mutation initializeSession(
|
|
138
138
|
$session_secure_id: String!
|
|
139
139
|
$session_key: String
|
|
@@ -220,12 +220,12 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):m
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
${
|
|
224
|
-
`,
|
|
223
|
+
${Gr}
|
|
224
|
+
`,au=fe`
|
|
225
225
|
query Ignore($id: ID!) {
|
|
226
226
|
ignore(id: $id)
|
|
227
227
|
}
|
|
228
|
-
`,
|
|
228
|
+
`,cu=fe`
|
|
229
229
|
query GetSamplingConfig($organization_verbose_id: String!) {
|
|
230
230
|
sampling(organization_verbose_id: $organization_verbose_id) {
|
|
231
231
|
spans {
|
|
@@ -274,8 +274,8 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):m
|
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
|
-
${
|
|
278
|
-
`,lu=(e,t,s,i)=>e();function au(e,t=lu){return{PushPayload(s,i){return t(n=>e.request(qc,s,j(j({},i),n)),"PushPayload","mutation",s)},PushSessionEvents(s,i){return t(n=>e.request(Gr,s,j(j({},i),n)),"PushSessionEvents","mutation",s)},identifySession(s,i){return t(n=>e.request(eu,s,j(j({},i),n)),"identifySession","mutation",s)},addSessionProperties(s,i){return t(n=>e.request(tu,s,j(j({},i),n)),"addSessionProperties","mutation",s)},pushMetrics(s,i){return t(n=>e.request(su,s,j(j({},i),n)),"pushMetrics","mutation",s)},addSessionFeedback(s,i){return t(n=>e.request(iu,s,j(j({},i),n)),"addSessionFeedback","mutation",s)},initializeSession(s,i){return t(n=>e.request(nu,s,j(j({},i),n)),"initializeSession","mutation",s)},Ignore(s,i){return t(n=>e.request(ru,s,j(j({},i),n)),"Ignore","query",s)},GetSamplingConfig(s,i){return t(n=>e.request(ou,s,j(j({},i),n)),"GetSamplingConfig","query",s)}}}function cu(){var e=document.createElement("canvas");return e.getContext&&e.getContext("2d")?e.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function uu(){return cu()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}const du="telemetry.sdk.name",hu="telemetry.sdk.version",Rr=1e3,pu=1e3*2,mu=4*60*60*1e3,ni=15*60*1e3,vr={normal:{bytes:1e7,time:4*60*1e3},canvas:{bytes:16e6,time:5e3}},fu=100,Wr="app.highlight.io",bu="https://app.launchdarkly.com",yu={"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",Zu=new RegExp("pub\\.(?<domain>.+)");/*! js-cookie v3.0.5 | MIT */function ss(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)e[i]=s[i]}return e}var Su={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 ri(e,t){function s(n,l,m){if(typeof document<"u"){m=ss({},t,m),typeof m.expires=="number"&&(m.expires=new Date(Date.now()+m.expires*864e5)),m.expires&&(m.expires=m.expires.toUTCString()),n=encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var d="";for(var u in m)m[u]&&(d+="; "+u,m[u]!==!0&&(d+="="+m[u].split(";")[0]));return document.cookie=n+"="+e.write(l,n)+d}}function i(n){if(!(typeof document>"u"||arguments.length&&!n)){for(var l=document.cookie?document.cookie.split("; "):[],m={},d=0;d<l.length;d++){var u=l[d].split("="),o=u.slice(1).join("=");try{var h=decodeURIComponent(u[0]);if(m[h]=e.read(o,h),n===h)break}catch{}}return n?m[n]:m}}return Object.create({set:s,get:i,remove:function(n,l){s(n,"",ss({},l,{expires:-1}))},withAttributes:function(n){return ri(this.converter,ss({},this.attributes,n))},withConverter:function(n){return ri(ss({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var is=ri(Su,{path:"/"}),oi=(e=>(e.CLIENT_ID="highlightClientID",e))(oi||{});let ns="localStorage",li=!0,Iu=class{constructor(){Gt(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]}},Vu=class{getItem(t){var s;return(s=is.get(t))!=null?s:""}setItem(t,s){if(!li)return;const i=new Date;i.setTime(i.getTime()+ni),is.set(t,s,{expires:i})}removeItem(t){li&&is.remove(t)}keys(){var t;return Object.keys((t=is.get())!=null?t:{})}};const dt=new Iu,ht=new Vu,rs=()=>{let e=null;if(typeof window>"u")return dt;try{switch(ns){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(rt("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${ns}; using global storage`),e=dt)}catch(t){rt("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=dt}return e},Xu=e=>{ns=e},kr=e=>{li=e},Ge=e=>{try{return rs().getItem(e)}catch(t){return rt("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),dt.getItem(e)}},Ee=(e,t)=>{ht.setItem(e,t);try{return rs().setItem(e,t)}catch(s){return rt("storage","setItem","debug",`failed to set item ${e}; using global storage`,s),dt.setItem(e,t)}},os=e=>{ht.removeItem(e);try{return rs().removeItem(e)}catch(t){return rt("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),dt.removeItem(e)}},Gu=e=>{if(ns==="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,i]=arguments;e({keyName:s,keyValue:i}),t.apply(this,[s,i])}};var be=(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))(be||{});const ls=e=>`${be.SESSION_DATA}_${e}`,Ru=()=>{var e;return typeof globalThis<"u"&&(e=globalThis.persistentSessionSecureID)!=null&&e.length?globalThis.persistentSessionSecureID:wr()},vu=e=>{typeof globalThis<"u"&&e!=null&&e.length&&(globalThis.persistentSessionSecureID=e)},wr=()=>{var e;return(e=Ge(be.SESSION_ID))!=null?e:""},kt=e=>{Ee(be.SESSION_ID,e)},Wu=e=>{const t=ls(e);return JSON.parse(Ge(t)||"{}")},as=e=>{e||(e=wr());let t=Wu(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<ni)return t;os(ls(e))},qe=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;vu(t);const s=ls(t);Ee(s,JSON.stringify(e)),wu(s)},ku=function(){const e=ht.getItem(be.SESSION_ID);kt(e);const t=ls(e),s=ht.getItem(t);try{qe(JSON.parse(s))}catch{}};function wu(e){var t;const s=`${be.SESSION_DATA}_`,i=new Set,n=rs();for(let l=n.length-1;l>=0;l--){const m=n.key(l);m&&m.startsWith(s)&&m!==e&&i.add(m)}for(const l of ht.keys())l.startsWith(s)&&l!==e&&i.add(l);for(const l of i){let m=!0;try{const d=Ge(l)||ht.getItem(l)||"{}",u=JSON.parse(d),o=(t=u.lastPushTime)!=null?t:u.sessionStartTime;m=o===void 0||Date.now()-o>=ni}catch{}m&&(rt("highlightSession","pruneSessionData","debug",`removing session data for stale key ${l}`),os(l))}}var Cr=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(Cr||{});const Cu=3,xu=1e3,Lu=500,Tu=[Cr.BillingQuotaExceeded.toString()],Nu=e=>{var t;return((t=e.response.errors)==null?void 0:t.find(s=>Tu.includes(s.message)))===void 0},Ju=()=>{const e=(t,s,i,n,l=0)=>ot(void 0,null,function*(){try{return yield t()}catch(m){if(m instanceof ct&&!Nu(m))throw m;if(l<Cu)return yield new Promise(d=>setTimeout(d,xu+Lu*Math.pow(2,l))),yield e(t,s,i,n,l+1);throw console.error(`highlight.io: data request failed after ${l} retries`),m}});return e},xr="feature_flag",Lr="launchdarkly",Yu=`${xr}.set.id`,Uu=`${xr}.provider.name`,Fu=`${Lr}.application.id`,Mu=`${Lr}.application.version`,Ku="$ld:telemetry:session:init",Tr="$ld:telemetry:track";function Nr(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function Jr(e){return e.kind==="multi"}function Yr(e){return Jr(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${Nr(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${Nr(e.key)}`:e.key}function Ou(e){return Jr(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,s)=>j(j({},t),s),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}let Eu=class{constructor(t,s){Gt(this,"client"),Gt(this,"metadata"),this.client=t,this.metadata=s}getHooks(t){return[]}init(t){this.client.track(Ku,{sessionID:t})}recordGauge(t,s){}identify(t,s,i={},n){}error(t,s){}track(t,s){const i=s.event;this.client.track(i?`${Tr}:${i}`:Tr,Dt(j({},s),{sessionID:t}))}},zu=class extends Es{constructor(t,s){super(),Gt(this,"client"),this.client=new Eu(t,s)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(s,i,n)=>(this.load(this.client),i)}]}init(t){return this._bufferCall("init",[t])}recordGauge(t,s){return this._bufferCall("recordGauge",[t,s])}identify(t,s,i={},n){return this._bufferCall("identify",[t,s,i,n])}error(t,s){return this._bufferCall("error",[t,s])}track(t,s){return this._bufferCall("track",[t,s])}};const Hu=e=>{e(window.location.href);const t=history.pushState;history.pushState=(l=>function(){var m=l.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),m})(history.pushState);const s=history.replaceState;history.replaceState=(l=>function(){var m=l.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),m})(history.replaceState);const i=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",i);const n=function(){e(window.location.href)};return window.addEventListener("locationchange",n),()=>{window.removeEventListener("popstate",i),window.removeEventListener("locationchange",n),history.pushState=t,history.replaceState=s}},Pu="10.4.0",Du={version:Pu},Bu=Du.version;function Ur(e,t){return ju(e)}function Qu(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 ju=e=>{let t="";const s=e.getAttribute("class"),i=e.getAttribute("id");return i&&(t=t.concat(Fr(i,"#"))),s&&(t=t.concat(Fr(s,"."))),t===""&&(t=t.concat(e.tagName.toLowerCase())),t},Fr=(e,t)=>`${t}${e.trim().split(" ").join(t)}`,Au=e=>{let t;const s=()=>{clearTimeout(t),t=setTimeout(()=>{var i,n;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(n=(i=window.screen.orientation)==null?void 0:i.angle)!=null?n:0})},500)};return window.addEventListener("resize",s),s(),()=>window.removeEventListener("resize",s)};var Mr={exports:{}};/**
|
|
277
|
+
${Gr}
|
|
278
|
+
`,uu=(e,t,s,i)=>e();function du(e,t=uu){return{PushPayload(s,i){return t(n=>e.request(su,s,j(j({},i),n)),"PushPayload","mutation",s)},PushSessionEvents(s,i){return t(n=>e.request(Rr,s,j(j({},i),n)),"PushSessionEvents","mutation",s)},identifySession(s,i){return t(n=>e.request(iu,s,j(j({},i),n)),"identifySession","mutation",s)},addSessionProperties(s,i){return t(n=>e.request(nu,s,j(j({},i),n)),"addSessionProperties","mutation",s)},pushMetrics(s,i){return t(n=>e.request(ru,s,j(j({},i),n)),"pushMetrics","mutation",s)},addSessionFeedback(s,i){return t(n=>e.request(ou,s,j(j({},i),n)),"addSessionFeedback","mutation",s)},initializeSession(s,i){return t(n=>e.request(lu,s,j(j({},i),n)),"initializeSession","mutation",s)},Ignore(s,i){return t(n=>e.request(au,s,j(j({},i),n)),"Ignore","query",s)},GetSamplingConfig(s,i){return t(n=>e.request(cu,s,j(j({},i),n)),"GetSamplingConfig","query",s)}}}function hu(){var e=document.createElement("canvas");return e.getContext&&e.getContext("2d")?e.toDataURL("image/webp").indexOf("data:image/webp")==0:!1}function pu(){return hu()?{type:"image/webp",quality:.9}:{type:"image/jpeg",quality:.6}}const mu="telemetry.sdk.name",fu="telemetry.sdk.version",vr=1e3,bu=1e3*2,yu=4*60*60*1e3,ri=15*60*1e3,Wr={normal:{bytes:1e7,time:4*60*1e3},canvas:{bytes:16e6,time:5e3}},gu=100,kr="app.highlight.io",Zu="https://app.launchdarkly.com",Su={"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"},Iu="/projects/default",Vu=new RegExp("pub\\.(?<domain>.+)");/*! js-cookie v3.0.8 | MIT */function ss(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var i in s)i!=="__proto__"&&(e[i]=s[i])}return e}var Xu={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 oi(e,t){function s(n,l,m){if(typeof document<"u"){m=ss({},t,m),typeof m.expires=="number"&&(m.expires=new Date(Date.now()+m.expires*864e5)),m.expires&&(m.expires=m.expires.toUTCString()),n=encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var d="";for(var u in m)m[u]&&(d+="; "+u,m[u]!==!0&&(d+="="+m[u].split(";")[0]));return document.cookie=n+"="+e.write(l,n)+d}}function i(n){if(!(typeof document>"u"||arguments.length&&!n)){for(var l=document.cookie?document.cookie.split("; "):[],m={},d=0;d<l.length;d++){var u=l[d].split("="),o=u.slice(1).join("=");try{var h=decodeURIComponent(u[0]);if(h in m||(m[h]=e.read(o,h)),n===h)break}catch{}}return n?m[n]:m}}return Object.create({set:s,get:i,remove:function(n,l){s(n,"",ss({},l,{expires:-1}))},withAttributes:function(n){return oi(this.converter,ss({},this.attributes,n))},withConverter:function(n){return oi(ss({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var is=oi(Xu,{path:"/"}),li=(e=>(e.CLIENT_ID="highlightClientID",e))(li||{});let ns="localStorage",ai=!0,Gu=class{constructor(){Gt(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]}},Ru=class{getItem(t){var s;return(s=is.get(t))!=null?s:""}setItem(t,s){if(!ai)return;const i=new Date;i.setTime(i.getTime()+ri),is.set(t,s,{expires:i})}removeItem(t){ai&&is.remove(t)}keys(){var t;return Object.keys((t=is.get())!=null?t:{})}};const dt=new Gu,ht=new Ru,rs=()=>{let e=null;if(typeof window>"u")return dt;try{switch(ns){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(rt("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${ns}; using global storage`),e=dt)}catch(t){rt("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=dt}return e},vu=e=>{ns=e},wr=e=>{ai=e},Ge=e=>{try{return rs().getItem(e)}catch(t){return rt("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),dt.getItem(e)}},Ee=(e,t)=>{ht.setItem(e,t);try{return rs().setItem(e,t)}catch(s){return rt("storage","setItem","debug",`failed to set item ${e}; using global storage`,s),dt.setItem(e,t)}},os=e=>{ht.removeItem(e);try{return rs().removeItem(e)}catch(t){return rt("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),dt.removeItem(e)}},Wu=e=>{if(ns==="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,i]=arguments;e({keyName:s,keyValue:i}),t.apply(this,[s,i])}};var be=(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))(be||{});const ls=e=>`${be.SESSION_DATA}_${e}`,ku=()=>{var e;return typeof globalThis<"u"&&(e=globalThis.persistentSessionSecureID)!=null&&e.length?globalThis.persistentSessionSecureID:Cr()},wu=e=>{typeof globalThis<"u"&&e!=null&&e.length&&(globalThis.persistentSessionSecureID=e)},Cr=()=>{var e;return(e=Ge(be.SESSION_ID))!=null?e:""},kt=e=>{Ee(be.SESSION_ID,e)},Cu=e=>{const t=ls(e);return JSON.parse(Ge(t)||"{}")},as=e=>{e||(e=Cr());let t=Cu(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<ri)return t;os(ls(e))},qe=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;wu(t);const s=ls(t);Ee(s,JSON.stringify(e)),Tu(s)},xu=function(){const e=ht.getItem(be.SESSION_ID);kt(e);const t=ls(e),s=ht.getItem(t);try{qe(JSON.parse(s))}catch{}};function Tu(e){var t;const s=`${be.SESSION_DATA}_`,i=new Set,n=rs();for(let l=n.length-1;l>=0;l--){const m=n.key(l);m&&m.startsWith(s)&&m!==e&&i.add(m)}for(const l of ht.keys())l.startsWith(s)&&l!==e&&i.add(l);for(const l of i){let m=!0;try{const d=Ge(l)||ht.getItem(l)||"{}",u=JSON.parse(d),o=(t=u.lastPushTime)!=null?t:u.sessionStartTime;m=o===void 0||Date.now()-o>=ri}catch{}m&&(rt("highlightSession","pruneSessionData","debug",`removing session data for stale key ${l}`),os(l))}}var xr=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(xr||{});const Lu=3,Nu=1e3,Ju=500,Yu=[xr.BillingQuotaExceeded.toString()],Uu=e=>{var t;return((t=e.response.errors)==null?void 0:t.find(s=>Yu.includes(s.message)))===void 0},Fu=()=>{const e=(t,s,i,n,l=0)=>ot(void 0,null,function*(){try{return yield t()}catch(m){if(m instanceof ct&&!Uu(m))throw m;if(l<Lu)return yield new Promise(d=>setTimeout(d,Nu+Ju*Math.pow(2,l))),yield e(t,s,i,n,l+1);throw console.error(`highlight.io: data request failed after ${l} retries`),m}});return e},Tr="feature_flag",Lr="launchdarkly",Mu=`${Tr}.set.id`,Ku=`${Tr}.provider.name`,Ou=`${Lr}.application.id`,Eu=`${Lr}.application.version`,zu="$ld:telemetry:session:init",Nr="$ld:telemetry:track";function Jr(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function Yr(e){return e.kind==="multi"}function Ur(e){return Yr(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${Jr(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${Jr(e.key)}`:e.key}function Hu(e){return Yr(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,s)=>j(j({},t),s),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}let Pu=class{constructor(t,s){Gt(this,"client"),Gt(this,"metadata"),this.client=t,this.metadata=s}getHooks(t){return[]}init(t){this.client.track(zu,{sessionID:t})}recordGauge(t,s){}identify(t,s,i={},n){}error(t,s){}track(t,s){const i=s.event;this.client.track(i?`${Nr}:${i}`:Nr,Dt(j({},s),{sessionID:t}))}},Du=class extends zs{constructor(t,s){super(),Gt(this,"client"),this.client=new Pu(t,s)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(s,i,n)=>(this.load(this.client),i)}]}init(t){return this._bufferCall("init",[t])}recordGauge(t,s){return this._bufferCall("recordGauge",[t,s])}identify(t,s,i={},n){return this._bufferCall("identify",[t,s,i,n])}error(t,s){return this._bufferCall("error",[t,s])}track(t,s){return this._bufferCall("track",[t,s])}};const Bu=e=>{e(window.location.href);const t=history.pushState;history.pushState=(l=>function(){var m=l.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),m})(history.pushState);const s=history.replaceState;history.replaceState=(l=>function(){var m=l.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),m})(history.replaceState);const i=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",i);const n=function(){e(window.location.href)};return window.addEventListener("locationchange",n),()=>{window.removeEventListener("popstate",i),window.removeEventListener("locationchange",n),history.pushState=t,history.replaceState=s}},Qu="10.5.0",ju={version:Qu},Au=ju.version;function Fr(e,t){return $u(e)}function _u(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 $u=e=>{let t="";const s=e.getAttribute("class"),i=e.getAttribute("id");return i&&(t=t.concat(Mr(i,"#"))),s&&(t=t.concat(Mr(s,"."))),t===""&&(t=t.concat(e.tagName.toLowerCase())),t},Mr=(e,t)=>`${t}${e.trim().split(" ").join(t)}`,qu=e=>{let t;const s=()=>{clearTimeout(t),t=setTimeout(()=>{var i,n;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(n=(i=window.screen.orientation)==null?void 0:i.angle)!=null?n:0})},500)};return window.addEventListener("resize",s),s(),()=>window.removeEventListener("resize",s)};var Kr={exports:{}};/**
|
|
279
279
|
* @preserve
|
|
280
280
|
* JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
|
|
281
281
|
*
|
|
@@ -285,13 +285,13 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):m
|
|
|
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(i,n){var l=this instanceof s?this:t;if(l.reset(n),typeof i=="string"&&i.length>0&&l.hash(i),l!==this)return l}s.prototype.hash=function(i){var n,l,m,d,u;switch(u=i.length,this.len+=u,l=this.k1,m=0,this.rem){case 0:l^=u>m?i.charCodeAt(m++)&65535:0;case 1:l^=u>m?(i.charCodeAt(m++)&65535)<<8:0;case 2:l^=u>m?(i.charCodeAt(m++)&65535)<<16:0;case 3:l^=u>m?(i.charCodeAt(m)&255)<<24:0,l^=u>m?(i.charCodeAt(m++)&65280)>>8:0}if(this.rem=u+this.rem&3,u-=this.rem,u>0){for(n=this.h1;l=l*11601+(l&65535)*3432906752&4294967295,l=l<<15|l>>>17,l=l*13715+(l&65535)*461832192&4294967295,n^=l,n=n<<13|n>>>19,n=n*5+3864292196&4294967295,!(m>=u);)l=i.charCodeAt(m++)&65535^(i.charCodeAt(m++)&65535)<<8^(i.charCodeAt(m++)&65535)<<16,d=i.charCodeAt(m++),l^=(d&255)<<24^(d&65280)>>8;switch(l=0,this.rem){case 3:l^=(i.charCodeAt(m+2)&65535)<<16;case 2:l^=(i.charCodeAt(m+1)&65535)<<8;case 1:l^=i.charCodeAt(m)&65535}this.h1=n}return this.k1=l,this},s.prototype.result=function(){var i,n;return i=this.k1,n=this.h1,i>0&&(i=i*11601+(i&65535)*3432906752&4294967295,i=i<<15|i>>>17,i=i*13715+(i&65535)*461832192&4294967295,n^=i),n^=this.len,n^=n>>>16,n=n*51819+(n&65535)*2246770688&4294967295,n^=n>>>13,n=n*44597+(n&65535)*3266445312&4294967295,n^=n>>>16,n>>>0},s.prototype.reset=function(i){return this.h1=typeof i=="number"?i:0,this.rem=this.k1=this.len=0,this},t=new s,e.exports=s})()})(Mr);var _u=Mr.exports;const $u=_s(_u),ai=28,pt="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",qu=2246822507,wt=e=>{var t,s="";if(e){const i=$u(e).result();for(let n=0;n<ai;n++){const l=((i^n*qu)>>>0)%pt.length;s+=pt.charAt(l)}}else{const i=typeof window<"u"&&((t=window.crypto)==null?void 0:t.getRandomValues),n=new Uint32Array(ai);i&&window.crypto.getRandomValues(n);for(let l=0;l<ai;l++)i?s+=pt.charAt(n[l]%pt.length):s+=pt.charAt(Math.floor(Math.random()*pt.length))}return s};let ed=class{constructor(t){Gt(this,"sessionSecureID");try{t!=null&&t.storageMode&&Xu(t?.storageMode),kr(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?ku():kr(!1)}catch(s){Ve("Error initializing @launchdarkly observability plugin","error",s)}}configureSession(t,s){try{const i=Ru();let n=as(i);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(s!=null&&s.sessionKey?this.sessionSecureID=wt(`${t}-${s.sessionKey}`):this.sessionSecureID=wt(),kt(this.sessionSecureID),qe({sessionSecureID:this.sessionSecureID,sessionKey:s?.sessionKey,projectID:0,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(i){Ve("Error configuring session in @launchdarkly observability plugin","error",i)}}};var td=(e,t,s)=>new Promise((i,n)=>{var l=u=>{try{d(s.next(u))}catch(o){n(o)}},m=u=>{try{d(s.throw(u))}catch(o){n(o)}},d=u=>u.done?i(u.value):Promise.resolve(u.value).then(l,m);d((s=s.apply(e,t)).next())});class Kr extends Es{getSession(){return this._isLoaded?this._bufferCall("getSession",[]):null}start(t){return td(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])}}we.LDRecord=void 0,typeof globalThis<"u"?globalThis.LDRecord?we.LDRecord=globalThis.LDRecord:(we.LDRecord=new Kr,globalThis.LDRecord=we.LDRecord):we.LDRecord=new Kr;var sd=Object.defineProperty,id=Object.defineProperties,nd=Object.getOwnPropertyDescriptors,cs=Object.getOwnPropertySymbols,Or=Object.prototype.hasOwnProperty,Er=Object.prototype.propertyIsEnumerable,ci=(e,t,s)=>t in e?sd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,K=(e,t)=>{for(var s in t||(t={}))Or.call(t,s)&&ci(e,s,t[s]);if(cs)for(var s of cs(t))Er.call(t,s)&&ci(e,s,t[s]);return e},he=(e,t)=>id(e,nd(t)),mt=(e,t)=>{var s={};for(var i in e)Or.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(e!=null&&cs)for(var i of cs(e))t.indexOf(i)<0&&Er.call(e,i)&&(s[i]=e[i]);return s},O=(e,t,s)=>ci(e,typeof t!="symbol"?t+"":t,s),ye=(e,t,s)=>new Promise((i,n)=>{var l=u=>{try{d(s.next(u))}catch(o){n(o)}},m=u=>{try{d(s.throw(u))}catch(o){n(o)}},d=u=>u.done?i(u.value):Promise.resolve(u.value).then(l,m);d((s=s.apply(e,t)).next())});const rd={key:"_sid"},od="rrweb/sequential-id@1",ld=e=>{const t=rd;let s=0;return{name:od,eventProcessor(i){return Object.assign(i,{[t.key]:++s}),i},options:t}};var ad=Object.defineProperty,cd=(e,t,s)=>t in e?ad(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,T=(e,t,s)=>cd(e,typeof t!="symbol"?t+"":t,s),zr,ud=Object.defineProperty,dd=(e,t,s)=>t in e?ud(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Hr=(e,t,s)=>dd(e,typeof t!="symbol"?t+"":t,s),ce=(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))(ce||{});const us=new Map,Pr=new WeakSet;function Dr(e){return e!==null&&typeof e=="object"&&"complete"in e&&"naturalWidth"in e&&"naturalHeight"in e&&"src"in e&&"onload"in e}function hd(e){if(Pr.has(e))return;Pr.add(e);const t=e.drawImage.bind(e);e.drawImage=function(s,...i){const n=us.get(e);n&&(n.cancelled=!0);const l=()=>{i.length===2&&Dr(s)&&i.push(s.naturalWidth||s.width,s.naturalHeight||s.height),t(s,...i)};if(Dr(s)&&!s.complete){const m={cancelled:!1};us.set(e,m);const d=()=>{m.cancelled||(us.delete(e),l())},u=()=>{if(!m.cancelled){us.delete(e);try{l()}catch{}}};s.onload=d,s.onerror=u}else l()}}const Br={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Qr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ds={},jr={},pd=()=>!!globalThis.Zone;function ui(e){if(ds[e])return ds[e];const t=globalThis[e],s=t.prototype,i=e in Br?Br[e]:void 0,n=!!(i&&i.every(d=>{var u,o;return!!((o=(u=Object.getOwnPropertyDescriptor(s,d))==null?void 0:u.get)!=null&&o.toString().includes("[native code]"))})),l=e in Qr?Qr[e]:void 0,m=!!(l&&l.every(d=>{var u;return typeof s[d]=="function"&&((u=s[d])==null?void 0:u.toString().includes("[native code]"))}));if(n&&m&&!pd())return ds[e]=t.prototype,t.prototype;try{const d=document.createElement("iframe");d.style.display="none",document.body.appendChild(d);const u=d.contentWindow;if(!u)return t.prototype;const o=u[e].prototype;if(!o)return d.remove(),s;const h=navigator.userAgent;return h.includes("Safari")&&!h.includes("Chrome")?(d.classList.add("rr-block"),d.setAttribute("__rrwebUntaintedMutationObserver",""),jr[e]=()=>d.remove()):d.remove(),ds[e]=o}catch{return s}}const di={};function ze(e,t,s){var i;const n=`${e}.${String(s)}`;if(di[n])return di[n].call(t);const l=ui(e),m=(i=Object.getOwnPropertyDescriptor(l,s))==null?void 0:i.get;return m?(di[n]=m,m.call(t)):t[s]}const hi={};function Ar(e,t,s){const i=`${e}.${String(s)}`;if(hi[i])return hi[i].bind(t);const n=ui(e)[s];return typeof n!="function"?t[s]:(hi[i]=n,n.bind(t))}function md(e){return ze("Node",e,"ownerDocument")}function fd(e){return ze("Node",e,"childNodes")}function bd(e){return ze("Node",e,"parentNode")}function yd(e){return ze("Node",e,"parentElement")}function gd(e){return ze("Node",e,"textContent")}function Zd(e,t){return Ar("Node",e,"contains")(t)}function Sd(e){return Ar("Node",e,"getRootNode")()}function Id(e){return!e||!("host"in e)?null:ze("ShadowRoot",e,"host")}function Vd(e){return e.styleSheets}function Xd(e){return!e||!("shadowRoot"in e)?null:ze("Element",e,"shadowRoot")}function Gd(e,t){return ze("Element",e,"querySelector")(t)}function Rd(e,t){return ze("Element",e,"querySelectorAll")(t)}function vd(){var e;return[ui("MutationObserver").constructor,(e=jr.MutationObserver)!=null?e:()=>{}]}let _r=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(_r=()=>new Date().getTime());function Wd(e,t,s){try{if(!(t in e))return()=>{};const i=e[t],n=s(i);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=n,()=>{e[t]=i}}catch{return()=>{}}}const pe={ownerDocument:md,childNodes:fd,parentNode:bd,parentElement:yd,textContent:gd,contains:Zd,getRootNode:Sd,host:Id,styleSheets:Vd,shadowRoot:Xd,querySelector:Gd,querySelectorAll:Rd,nowTimestamp:_r,mutationObserverCtor:vd,patch:Wd,wrapCanvasContextDrawImage:hd};function $r(e){return e.nodeType===e.ELEMENT_NODE}function Ct(e){const t=e&&"host"in e&&"mode"in e&&pe.host(e)||null;return!!(t&&"shadowRoot"in t&&pe.shadowRoot(t)===e)}function xt(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function kd(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 wd(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 pi(e){try{const t=e.rules||e.cssRules;if(!t)return null;let s=e.href;!s&&e.ownerNode&&(s=e.ownerNode.baseURI);const i=Array.from(t,n=>qr(n,s)).join("");return kd(i)}catch{return null}}function qr(e,t){if(xd(e)){let s;try{s=pi(e.styleSheet)||wd(e)}catch{s=e.cssText}return e.styleSheet.href?ms(s,e.styleSheet.href):s}else{let s=e.cssText;return Ld(e)&&e.selectorText.includes(":")&&(s=Cd(s)),t?ms(s,t):s}}function Cd(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function xd(e){return"styleSheet"in e}function Ld(e){return"selectorText"in e}class eo{constructor(){Hr(this,"idNodeMap",new Map),Hr(this,"nodeMetaMap",new WeakMap)}getId(t){var s;if(!t)return-1;const i=(s=this.getMeta(t))==null?void 0:s.id;return i??-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(i=>this.removeNodeFromMap(i))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,s){const i=s.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,s)}replace(t,s){const i=this.getNode(t);if(i){const n=this.nodeMetaMap.get(i);n&&this.nodeMetaMap.set(s,n)}this.idNodeMap.set(t,s)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Td(){return new eo}function hs({element:e,maskInputOptions:t,tagName:s,type:i,value:n,overwriteRecord:l,maskInputFn:m}){let d=n||"";return no({maskInputOptions:t,tagName:s,type:i,overwriteRecord:l})&&(m?d=m(d,e):d="*".repeat(d.length)),d}function ft(e){return e.toLowerCase()}const to="__rrweb_original__";function Nd(e){const t=e.getContext("2d");if(!t)return!0;const s=50;for(let i=0;i<e.width;i+=s)for(let n=0;n<e.height;n+=s){const l=t.getImageData,m=to in l?l[to]:l;if(new Uint32Array(m.call(t,i,n,Math.min(s,e.width-i),Math.min(s,e.height-n)).data.buffer).some(d=>d!==0))return!1}return!0}function ps(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ft(t):null}function so(e,t){var s;let i;try{i=new URL(e,window.location.href)}catch{return null}const n=/\.([0-9a-z]+)(?:$)/i,l=i.pathname.match(n);return(s=l?.[1])!=null?s:null}function Jd(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const Yd=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ud=/^(?:[a-z+]+:)?\/\//i,Fd=/^www\..*/i,Md=/^(data:)([^,]*),(.*)/i;function ms(e,t){return(e||"").replace(Yd,(s,i,n,l,m,d)=>{const u=n||m||d,o=i||l||"";if(!u)return s;if(Ud.test(u)||Fd.test(u))return`url(${o}${u}${o})`;if(Md.test(u))return`url(${o}${u}${o})`;if(u[0]==="/")return`url(${o}${Jd(t)+u}${o})`;const h=u.split("#")[0],c=u.substring(h.length),a=t.split("#")[0].split("/"),r=h.split("/");a.pop();for(const f of r)f!=="."&&(f===".."?a.pop():a.push(f));return`url(${o}${a.join("/")}${c}${o})`})}function fs(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Kd(e,t,s=!1){const i=Array.from(t.childNodes),n=[];let l=0;if(i.length>1&&e&&typeof e=="string"){let m=fs(e,s);const d=m.length/e.length;for(let u=1;u<i.length;u++)if(i[u].textContent&&typeof i[u].textContent=="string"){const o=fs(i[u].textContent,s),h=100;let c=3;for(;c<o.length&&(o[c].match(/[a-zA-Z0-9]/)||o.indexOf(o.substring(0,c),1)!==-1);c++);for(;c<o.length;c++){let a=o.substring(0,c),r=m.split(a),f=-1;if(r.length===2)f=r[0].length;else if(r.length>2&&r[0]===""&&i[u-1].textContent!=="")f=m.indexOf(a,1);else if(r.length===1){if(a=a.substring(0,a.length-1),r=m.split(a),r.length<=1)return n.push(e),n;c=h+1}else c===o.length-1&&(f=m.indexOf(a));if(r.length>=2&&c>h){const p=i[u-1].textContent;if(p&&typeof p=="string"){const y=fs(p).length;f=m.indexOf(a,y)}f===-1&&(f=r[0].length)}if(f!==-1){let p=Math.floor(f/d);for(;p>0&&p<e.length;){if(l+=1,l>50*i.length)return n.push(e),n;const y=fs(e.substring(0,p),s);if(y.length===f){n.push(e.substring(0,p)),e=e.substring(p),m=m.substring(f);break}else y.length<f?p+=Math.max(1,Math.floor((f-y.length)/d)):p-=Math.max(1,Math.floor((y.length-f)*d))}break}}}}return n.push(e),n}function Od(e,t){return Kd(e,t).join("/* rr_split */")}function mi(e){return e=e.replace(/[^ -~]+/g,""),e=e?.split(" ").map(t=>t?Math.random().toString(20).substring(2,t.length+2):"").join(" ")||"",e}function fi(e){return e==="img"||e==="video"||e==="audio"||e==="source"}const Ed=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),zd=new RegExp(/[0-9]{9,16}/),Hd=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),Pd=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),Dd=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),Bd=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),Qd=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),jd=[Ed,zd,Hd,Pd,Dd,Bd,Qd];function io(e){return e?jd.some(t=>t.test(e)):!1}const no=({maskInputOptions:e,tagName:t,type:s,overwriteRecord:i})=>{const n=s&&s.toLowerCase();return i!=="true"&&(!!e[t.toLowerCase()]||!!(n&&e[n]))};let Ad=1;const _d=new RegExp("[^a-z0-9-_:]"),Lt=-2;function ro(){return Ad++}function $d(e){if(e instanceof HTMLFormElement)return"form";const t=ft(e.tagName);return _d.test(t)?"div":t}let bt,oo;const qd=/^[^ \t\n\r\u000c]+/,eh=/^[, \t\n\r\u000c]+/;function th(e,t){if(t.trim()==="")return t;let s=0;function i(l){let m;const d=l.exec(t.substring(s));return d?(m=d[0],s+=m.length,m):""}const n=[];for(;i(eh),!(s>=t.length);){let l=i(qd);if(l.slice(-1)===",")l=bs(e,l.substring(0,l.length-1)),n.push(l);else{let m="";l=bs(e,l);let d=!1;for(;;){const u=t.charAt(s);if(u===""){n.push((l+m).trim());break}else if(d)u===")"&&(d=!1);else if(u===","){s+=1,n.push((l+m).trim());break}else u==="("&&(d=!0);m+=u,s+=1}}}return n.join(", ")}const lo=new WeakMap;function bs(e,t){return!t||t.trim()===""?t:bi(e,t)}function sh(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function bi(e,t){let s=lo.get(e);if(s||(s=e.createElement("a"),lo.set(e,s)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return s.setAttribute("href",t),s.href}function ao(e,t,s,i){return i&&(s==="src"||s==="href"&&!(t==="use"&&i[0]==="#")||s==="xlink:href"&&i[0]!=="#"||s==="background"&&["table","td","th"].includes(t)?bs(e,i):s==="srcset"?th(e,i):s==="style"?ms(i,bi(e)):t==="object"&&s==="data"?bs(e,i):i)}function co(e,t,s){return["video","audio"].includes(e)&&t==="autoplay"}function uo(e,t,s){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let i=e.classList.length;i--;){const n=e.classList[i];if(t.test(n))return!0}if(s)return e.matches(s)}catch{}return!1}function ys(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return s?ys(pe.parentNode(e),t,s):!1;for(let i=e.classList.length;i--;){const n=e.classList[i];if(t.test(n))return!0}return s?ys(pe.parentNode(e),t,s):!1}function ho(e,t,s,i){let n;if($r(e)){if(n=e,!pe.childNodes(n).length)return!1}else{if(pe.parentElement(e)===null)return!1;n=pe.parentElement(e)}try{if(typeof t=="string"){if(i){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(ys(n,t,i))return!0;if(s){if(i){if(n.closest(s))return!0}else if(n.matches(s))return!0}}catch{}return!1}function ih(e,t,s){const i=e.contentWindow;if(!i)return;let n=!1,l;try{l=i.document.readyState}catch{return}if(l!=="complete"){const d=setTimeout(()=>{n||(t(),n=!0)},s);e.addEventListener("load",()=>{clearTimeout(d),n=!0,t()});return}const m="about:blank";if(i.location.href!==m||e.src===m||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function nh(e,t,s){let i=!1,n;try{n=e.sheet}catch{return}if(n)return;const l=setTimeout(()=>{i||(t(),i=!0)},s);e.addEventListener("load",()=>{clearTimeout(l),i=!0,t()})}function rh(e,t){const{doc:s,mirror:i,blockClass:n,blockSelector:l,needsMask:m,inlineStylesheet:d,maskInputOptions:u={},maskTextClass:o,maskTextFn:h,maskInputFn:c,dataURLOptions:a={},inlineImages:r,inlineVideos:f,recordCanvas:p,keepIframeSrcFn:y,newlyAddedElement:X=!1,cssCaptured:Z=!1,privacySetting:S}=t,R=oh(s,i);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:ce.Document,childNodes:[],compatMode:e.compatMode}:{type:ce.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:ce.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:R};case e.ELEMENT_NODE:return ah(e,{doc:s,blockClass:n,blockSelector:l,inlineStylesheet:d,maskInputOptions:u,maskInputFn:c,maskTextClass:o,dataURLOptions:a,inlineImages:r,inlineVideos:f,recordCanvas:p,keepIframeSrcFn:y,newlyAddedElement:X,privacySetting:S,rootId:R});case e.TEXT_NODE:return lh(e,{doc:s,needsMask:m,maskTextFn:h,privacySetting:S,rootId:R,cssCaptured:Z});case e.CDATA_SECTION_NODE:return{type:ce.CDATA,textContent:"",rootId:R};case e.COMMENT_NODE:return{type:ce.Comment,textContent:pe.textContent(e)||"",rootId:R};default:return!1}}function oh(e,t){if(!t.hasNode(e))return;const s=t.getId(e);return s===1?void 0:s}function lh(e,t){var s;const{needsMask:i,maskTextFn:n,privacySetting:l,rootId:m,cssCaptured:d}=t,u=pe.parentNode(e),o=u&&u.tagName;let h="";const c=o==="STYLE"?!0:void 0,a=o==="SCRIPT"?!0:void 0;a?h="SCRIPT_PLACEHOLDER":d||(h=pe.textContent(e),c&&h&&(h=ms(h,bi(t.doc)))),!c&&!a&&h&&i&&(h=n?n(h,pe.parentElement(e)):h.replace(/[\S]/g,"*"));const r=l==="strict",f=(s=e.parentElement)==null?void 0:s.getAttribute("data-hl-record"),p=l==="default"&&io(h);return(r||p)&&!f&&o&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(o)&&h&&(h=mi(h)),{type:ce.Text,textContent:h||"",rootId:m}}function ah(e,t){const{doc:s,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:m={},maskInputFn:d,maskTextClass:u,dataURLOptions:o={},inlineImages:h,inlineVideos:c,recordCanvas:a,keepIframeSrcFn:r,newlyAddedElement:f=!1,privacySetting:p,rootId:y}=t;let X=uo(e,i,n);const Z=uo(e,u,null),S=p==="strict";let R=$d(e),b={};const g=e.attributes.length;for(let V=0;V<g;V++){const k=e.attributes[V];co(R,k.name)||(b[k.name]=ao(s,R,ft(k.name),k.value))}if(R==="link"&&l){const V=Array.from(s.styleSheets).find(w=>w.href===e.href);let k=null;V&&(k=pi(V)),k&&(delete b.rel,delete b.href,b._cssText=k)}if(R==="style"&&e.sheet){let V=pi(e.sheet);V&&(e.childNodes.length>1&&(V=Od(V,e)),b._cssText=V)}if(["input","textarea","select"].includes(R)){const V=e.value,k=e.checked;b.type!=="radio"&&b.type!=="checkbox"&&b.type!=="submit"&&b.type!=="button"&&V?b.value=hs({element:e,type:ps(e),tagName:R,value:V,overwriteRecord:e.getAttribute("data-hl-record"),maskInputOptions:m,maskInputFn:d}):k&&(b.checked=k)}if(R==="option"&&(e.selected&&!m.select?b.selected=!0:delete b.selected),R==="dialog"&&e.open&&(b.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),R==="canvas"&&a){if(e.__context==="2d")Nd(e);else if(!("__context"in e)){const V=e.toDataURL(o.type,o.quality),k=s.createElement("canvas");k.width=e.width,k.height=e.height;const w=k.toDataURL(o.type,o.quality);V!==w&&(b.rr_dataURL=V)}}if(R==="img"&&h&&!X&&!Z&&!S){bt||(bt=s.createElement("canvas"),oo=bt.getContext("2d"));const V=e,k=V.currentSrc||V.getAttribute("src")||"<unknown-src>",w=V.crossOrigin,N=()=>{V.removeEventListener("load",N);try{bt.width=V.naturalWidth,bt.height=V.naturalHeight,oo.drawImage(V,0,0),b.rr_dataURL=bt.toDataURL(o.type,o.quality)}catch(z){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=${k}! Error: ${z}`)}V.crossOrigin==="anonymous"&&(w?b.crossOrigin=w:V.removeAttribute("crossorigin"))};V.complete&&V.naturalWidth!==0?N():V.addEventListener("load",N)}if(["audio","video"].includes(R)){const V=b;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(f||(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop)),X||Z||S&&fi(R)){const{width:V,height:k}=e.getBoundingClientRect();b={class:b.class,rr_width:`${V}px`,rr_height:`${k}px`}}S&&fi(R)&&(X=!0),R==="iframe"&&!r(b.src)&&(e.contentDocument||(b.rr_src=b.src),delete b.src);let G;try{customElements.get(R)&&(G=!0)}catch{}const v=V=>{const{width:k,height:w}=V.getBoundingClientRect();b={width:k,height:w,rr_width:`${k}px`,rr_height:`${w}px`,rr_inlined_video:!0,class:b.class,style:b.style},R="canvas";const N=s.createElement("canvas");N.width=e.width,N.height=e.height,b.rr_dataURL=N.toDataURL(o.type,o.quality)};if(R==="video"){const V=e;h&&(V.src===""||V.src.indexOf("blob:")!==-1)&&v(V),c&&V.src!==""&&V.src.indexOf("blob:")===-1&&v(V)}return{type:ce.Element,tagName:R,attributes:b,childNodes:[],isSVG:sh(e)||void 0,needBlock:X,needMask:Z,rootId:y,isCustom:G}}function q(e){return e==null?"":e.toLowerCase()}function po(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 ch(e,t){return!!(t.comment&&e.type===ce.Comment||e.type===ce.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"&&so(e.attributes.href)==="js")||t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(q(e.attributes.name).match(/^msapplication-tile(image|color)$/)||q(e.attributes.name)==="application-name"||q(e.attributes.rel)==="icon"||q(e.attributes.rel)==="apple-touch-icon"||q(e.attributes.rel)==="shortcut icon"))||e.tagName==="meta"&&(t.headMetaDescKeywords&&q(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(q(e.attributes.property).match(/^(og|twitter|fb):/)||q(e.attributes.name).match(/^(og|twitter):/)||q(e.attributes.name)==="pinterest")||t.headMetaRobots&&(q(e.attributes.name)==="robots"||q(e.attributes.name)==="googlebot"||q(e.attributes.name)==="bingbot")||t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0||t.headMetaAuthorship&&(q(e.attributes.name)==="author"||q(e.attributes.name)==="generator"||q(e.attributes.name)==="framework"||q(e.attributes.name)==="publisher"||q(e.attributes.name)==="progid"||q(e.attributes.property).match(/^article:/)||q(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(q(e.attributes.name)==="google-site-verification"||q(e.attributes.name)==="yandex-verification"||q(e.attributes.name)==="csrf-token"||q(e.attributes.name)==="p:domain_verify"||q(e.attributes.name)==="verify-v1"||q(e.attributes.name)==="verification"||q(e.attributes.name)==="shopify-checkout-api-token"))))}function yt(e,t){const{doc:s,mirror:i,blockClass:n,blockSelector:l,maskTextClass:m,maskTextSelector:d,skipChild:u=!1,inlineStylesheet:o=!0,maskInputOptions:h={},maskTextFn:c,maskInputFn:a,slimDOMOptions:r,dataURLOptions:f={},inlineImages:p=!1,inlineVideos:y=!1,recordCanvas:X=!1,onSerialize:Z,onIframeLoad:S,iframeLoadTimeout:R=5e3,onStylesheetLoad:b,stylesheetLoadTimeout:g=5e3,keepIframeSrcFn:G=()=>!1,newlyAddedElement:v=!1,cssCaptured:V=!1,privacySetting:k}=t;let{needsMask:w}=t,{preserveWhiteSpace:N=!0}=t;w||(w=ho(e,m,d,w===void 0));const z=rh(e,{doc:s,mirror:i,blockClass:n,blockSelector:l,needsMask:w,inlineStylesheet:o,maskInputOptions:h,maskTextClass:m,maskTextFn:c,maskInputFn:a,dataURLOptions:f,inlineImages:p,inlineVideos:y,recordCanvas:X,keepIframeSrcFn:G,newlyAddedElement:v,cssCaptured:V,privacySetting:k});if(!z)return console.warn(e,"not serialized"),null;let I;i.hasNode(e)?I=i.getId(e):ch(z,r)||!N&&z.type===ce.Text&&!z.textContent.replace(/^\s+|\s+$/gm,"").length?I=Lt:I=ro();const W=Object.assign(z,{id:I});if(i.add(e,W),I===Lt)return null;Z&&Z(e);let L=!u,U=k,F=k==="strict";if(W.type===ce.Element){if(L=L&&!W.needBlock,F||(F=!!W.needBlock||!!W.needMask),U=F?"strict":U,F&&fi(W.tagName)){const E=e.cloneNode();E.src="",i.add(E,W)}delete W.needBlock,delete W.needMask;const D=pe.shadowRoot(e);D&&xt(D)&&(W.isShadowHost=!0)}if((W.type===ce.Document||W.type===ce.Element)&&L){r.headWhitespace&&W.type===ce.Element&&W.tagName==="head"&&(N=!1);const D={doc:s,mirror:i,blockClass:n,blockSelector:l,needsMask:w,maskTextClass:m,maskTextSelector:d,skipChild:u,inlineStylesheet:o,maskInputOptions:h,maskTextFn:c,maskInputFn:a,slimDOMOptions:r,dataURLOptions:f,inlineImages:p,inlineVideos:y,recordCanvas:X,preserveWhiteSpace:N,onSerialize:Z,onIframeLoad:S,iframeLoadTimeout:R,onStylesheetLoad:b,stylesheetLoadTimeout:g,keepIframeSrcFn:G,cssCaptured:!1,privacySetting:U};if(!(W.type===ce.Element&&W.tagName==="textarea"&&W.attributes.value!==void 0)){W.type===ce.Element&&W.attributes._cssText!==void 0&&typeof W.attributes._cssText=="string"&&(D.cssCaptured=!0);for(const x of Array.from(pe.childNodes(e))){const se=yt(x,D);se&&W.childNodes.push(se)}}let E=null;if($r(e)&&(E=pe.shadowRoot(e)))for(const x of Array.from(pe.childNodes(E))){const se=yt(x,D);se&&(xt(E)&&(se.isShadow=!0),W.childNodes.push(se))}}const J=pe.parentNode(e);return J&&Ct(J)&&xt(J)&&(W.isShadow=!0),W.type===ce.Element&&W.tagName==="iframe"&&ih(e,()=>{const D=e.contentDocument;if(D&&S){const E=yt(D,{doc:D,mirror:i,blockClass:n,blockSelector:l,needsMask:w,maskTextClass:m,maskTextSelector:d,skipChild:!1,inlineStylesheet:o,maskInputOptions:h,maskTextFn:c,maskInputFn:a,slimDOMOptions:r,dataURLOptions:f,inlineImages:p,inlineVideos:y,recordCanvas:X,preserveWhiteSpace:N,onSerialize:Z,onIframeLoad:S,iframeLoadTimeout:R,onStylesheetLoad:b,stylesheetLoadTimeout:g,keepIframeSrcFn:G,privacySetting:k});E&&S(e,E)}},R),W.type===ce.Element&&W.tagName==="link"&&typeof W.attributes.rel=="string"&&(W.attributes.rel==="stylesheet"||W.attributes.rel==="preload"&&typeof W.attributes.href=="string"&&so(W.attributes.href)==="css")&&nh(e,()=>{if(b){const D=yt(e,{doc:s,mirror:i,blockClass:n,blockSelector:l,needsMask:w,maskTextClass:m,maskTextSelector:d,skipChild:!1,inlineStylesheet:o,maskInputOptions:h,maskTextFn:c,maskInputFn:a,slimDOMOptions:r,dataURLOptions:f,inlineImages:p,inlineVideos:y,recordCanvas:X,preserveWhiteSpace:N,onSerialize:Z,onIframeLoad:S,iframeLoadTimeout:R,onStylesheetLoad:b,stylesheetLoadTimeout:g,keepIframeSrcFn:G,privacySetting:k});D&&b(e,D)}},g),W}function uh(e,t){const{mirror:s=new eo,blockClass:i="highlight-block",blockSelector:n=null,maskTextClass:l="highlight-mask",maskTextSelector:m=null,inlineStylesheet:d=!0,inlineImages:u=!1,inlineVideos:o=!1,recordCanvas:h=!1,maskAllInputs:c=!1,maskTextFn:a,maskInputFn:r,slimDOM:f=!1,dataURLOptions:p,preserveWhiteSpace:y,onSerialize:X,onIframeLoad:Z,iframeLoadTimeout:S,onStylesheetLoad:R,stylesheetLoadTimeout:b,keepIframeSrcFn:g=()=>!1,privacySetting:G="default"}=t||{},v=c===!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}:c===!1?{password:!0}:c,V=po(f);return yt(e,{doc:e,mirror:s,blockClass:i,blockSelector:n,maskTextClass:l,maskTextSelector:m,skipChild:!1,inlineStylesheet:d,maskInputOptions:v,maskTextFn:a,maskInputFn:r,slimDOMOptions:V,dataURLOptions:p,inlineImages:u,inlineVideos:o,recordCanvas:h,preserveWhiteSpace:y,onSerialize:X,onIframeLoad:Z,iframeLoadTimeout:S,onStylesheetLoad:R,stylesheetLoadTimeout:b,keepIframeSrcFn:g,newlyAddedElement:!1,privacySetting:G})}function dh(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var s=function i(){return this instanceof i?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(i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(s,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}),s}var gs={exports:{}},mo;function hh(){if(mo)return gs.exports;mo=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 gs.exports=t(),gs.exports.createColors=t,gs.exports}const ph={},mh=Object.freeze(Object.defineProperty({__proto__:null,default:ph},Symbol.toStringTag,{value:"Module"})),Te=dh(mh);var yi,fo;function gi(){if(fo)return yi;fo=1;let e=hh(),t=Te;class s extends Error{constructor(n,l,m,d,u,o){super(n),this.name="CssSyntaxError",this.reason=n,u&&(this.file=u),d&&(this.source=d),o&&(this.plugin=o),typeof l<"u"&&typeof m<"u"&&(typeof l=="number"?(this.line=l,this.column=m):(this.line=l.line,this.column=l.column,this.endLine=m.line,this.endColumn=m.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(n){if(!this.source)return"";let l=this.source;n==null&&(n=e.isColorSupported);let m=r=>r,d=r=>r,u=r=>r;if(n){let{bold:r,gray:f,red:p}=e.createColors(!0);d=y=>r(p(y)),m=y=>f(y),t&&(u=y=>t(y))}let o=l.split(/\r?\n/),h=Math.max(this.line-3,0),c=Math.min(this.line+2,o.length),a=String(c).length;return o.slice(h,c).map((r,f)=>{let p=h+1+f,y=" "+(" "+p).slice(-a)+" | ";if(p===this.line){if(r.length>160){let Z=20,S=Math.max(0,this.column-Z),R=Math.max(this.column+Z,this.endColumn+Z),b=r.slice(S,R),g=m(y.replace(/\d/g," "))+r.slice(0,Math.min(this.column-1,Z-1)).replace(/[^\t]/g," ");return d(">")+m(y)+u(b)+`
|
|
288
|
+
*/(function(e){(function(){var t;function s(i,n){var l=this instanceof s?this:t;if(l.reset(n),typeof i=="string"&&i.length>0&&l.hash(i),l!==this)return l}s.prototype.hash=function(i){var n,l,m,d,u;switch(u=i.length,this.len+=u,l=this.k1,m=0,this.rem){case 0:l^=u>m?i.charCodeAt(m++)&65535:0;case 1:l^=u>m?(i.charCodeAt(m++)&65535)<<8:0;case 2:l^=u>m?(i.charCodeAt(m++)&65535)<<16:0;case 3:l^=u>m?(i.charCodeAt(m)&255)<<24:0,l^=u>m?(i.charCodeAt(m++)&65280)>>8:0}if(this.rem=u+this.rem&3,u-=this.rem,u>0){for(n=this.h1;l=l*11601+(l&65535)*3432906752&4294967295,l=l<<15|l>>>17,l=l*13715+(l&65535)*461832192&4294967295,n^=l,n=n<<13|n>>>19,n=n*5+3864292196&4294967295,!(m>=u);)l=i.charCodeAt(m++)&65535^(i.charCodeAt(m++)&65535)<<8^(i.charCodeAt(m++)&65535)<<16,d=i.charCodeAt(m++),l^=(d&255)<<24^(d&65280)>>8;switch(l=0,this.rem){case 3:l^=(i.charCodeAt(m+2)&65535)<<16;case 2:l^=(i.charCodeAt(m+1)&65535)<<8;case 1:l^=i.charCodeAt(m)&65535}this.h1=n}return this.k1=l,this},s.prototype.result=function(){var i,n;return i=this.k1,n=this.h1,i>0&&(i=i*11601+(i&65535)*3432906752&4294967295,i=i<<15|i>>>17,i=i*13715+(i&65535)*461832192&4294967295,n^=i),n^=this.len,n^=n>>>16,n=n*51819+(n&65535)*2246770688&4294967295,n^=n>>>13,n=n*44597+(n&65535)*3266445312&4294967295,n^=n>>>16,n>>>0},s.prototype.reset=function(i){return this.h1=typeof i=="number"?i:0,this.rem=this.k1=this.len=0,this},t=new s,e.exports=s})()})(Kr);var ed=Kr.exports;const td=$s(ed),ci=28,pt="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",sd=2246822507,wt=e=>{var t,s="";if(e){const i=td(e).result();for(let n=0;n<ci;n++){const l=((i^n*sd)>>>0)%pt.length;s+=pt.charAt(l)}}else{const i=typeof window<"u"&&((t=window.crypto)==null?void 0:t.getRandomValues),n=new Uint32Array(ci);i&&window.crypto.getRandomValues(n);for(let l=0;l<ci;l++)i?s+=pt.charAt(n[l]%pt.length):s+=pt.charAt(Math.floor(Math.random()*pt.length))}return s};let id=class{constructor(t){Gt(this,"sessionSecureID");try{t!=null&&t.storageMode&&vu(t?.storageMode),wr(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?xu():wr(!1)}catch(s){Ve("Error initializing @launchdarkly observability plugin","error",s)}}configureSession(t,s){try{const i=ku();let n=as(i);n!=null&&n.sessionSecureID?this.sessionSecureID=n.sessionSecureID:(s!=null&&s.sessionKey?this.sessionSecureID=wt(`${t}-${s.sessionKey}`):this.sessionSecureID=wt(),kt(this.sessionSecureID),qe({sessionSecureID:this.sessionSecureID,sessionKey:s?.sessionKey,projectID:0,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(i){Ve("Error configuring session in @launchdarkly observability plugin","error",i)}}};var nd=(e,t,s)=>new Promise((i,n)=>{var l=u=>{try{d(s.next(u))}catch(o){n(o)}},m=u=>{try{d(s.throw(u))}catch(o){n(o)}},d=u=>u.done?i(u.value):Promise.resolve(u.value).then(l,m);d((s=s.apply(e,t)).next())});class Or extends zs{getSession(){return this._isLoaded?this._bufferCall("getSession",[]):null}start(t){return nd(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])}}we.LDRecord=void 0,typeof globalThis<"u"?globalThis.LDRecord?we.LDRecord=globalThis.LDRecord:(we.LDRecord=new Or,globalThis.LDRecord=we.LDRecord):we.LDRecord=new Or;var rd=Object.defineProperty,od=Object.defineProperties,ld=Object.getOwnPropertyDescriptors,cs=Object.getOwnPropertySymbols,Er=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable,Hr=e=>{throw TypeError(e)},ui=(e,t,s)=>t in e?rd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,K=(e,t)=>{for(var s in t||(t={}))Er.call(t,s)&&ui(e,s,t[s]);if(cs)for(var s of cs(t))zr.call(t,s)&&ui(e,s,t[s]);return e},he=(e,t)=>od(e,ld(t)),mt=(e,t)=>{var s={};for(var i in e)Er.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(e!=null&&cs)for(var i of cs(e))t.indexOf(i)<0&&zr.call(e,i)&&(s[i]=e[i]);return s},E=(e,t,s)=>ui(e,typeof t!="symbol"?t+"":t,s),Pr=(e,t,s)=>t.has(e)||Hr("Cannot "+s),ad=(e,t,s)=>(Pr(e,t,"read from private field"),s?s.call(e):t.get(e)),cd=(e,t,s)=>t.has(e)?Hr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),ud=(e,t,s,i)=>(Pr(e,t,"write to private field"),t.set(e,s),s),ye=(e,t,s)=>new Promise((i,n)=>{var l=u=>{try{d(s.next(u))}catch(o){n(o)}},m=u=>{try{d(s.throw(u))}catch(o){n(o)}},d=u=>u.done?i(u.value):Promise.resolve(u.value).then(l,m);d((s=s.apply(e,t)).next())});const dd={key:"_sid"},hd="rrweb/sequential-id@1",pd=e=>{const t=dd;let s=0;return{name:hd,eventProcessor(i){return Object.assign(i,{[t.key]:++s}),i},options:t}};var md=Object.defineProperty,fd=(e,t,s)=>t in e?md(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,L=(e,t,s)=>fd(e,typeof t!="symbol"?t+"":t,s),Dr,bd=Object.defineProperty,yd=(e,t,s)=>t in e?bd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Br=(e,t,s)=>yd(e,typeof t!="symbol"?t+"":t,s),ce=(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))(ce||{});const us=new Map,Qr=new WeakSet;function jr(e){return e!==null&&typeof e=="object"&&"complete"in e&&"naturalWidth"in e&&"naturalHeight"in e&&"src"in e&&"onload"in e}function gd(e){if(Qr.has(e))return;Qr.add(e);const t=e.drawImage.bind(e);e.drawImage=function(s,...i){const n=us.get(e);n&&(n.cancelled=!0);const l=()=>{i.length===2&&jr(s)&&i.push(s.naturalWidth||s.width,s.naturalHeight||s.height),t(s,...i)};if(jr(s)&&!s.complete){const m={cancelled:!1};us.set(e,m);const d=()=>{m.cancelled||(us.delete(e),l())},u=()=>{if(!m.cancelled){us.delete(e);try{l()}catch{}}};s.onload=d,s.onerror=u}else l()}}const Ar={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},_r={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ds={},$r={},Zd=()=>!!globalThis.Zone;function di(e){if(ds[e])return ds[e];const t=globalThis[e],s=t.prototype,i=e in Ar?Ar[e]:void 0,n=!!(i&&i.every(d=>{var u,o;return!!((o=(u=Object.getOwnPropertyDescriptor(s,d))==null?void 0:u.get)!=null&&o.toString().includes("[native code]"))})),l=e in _r?_r[e]:void 0,m=!!(l&&l.every(d=>{var u;return typeof s[d]=="function"&&((u=s[d])==null?void 0:u.toString().includes("[native code]"))}));if(n&&m&&!Zd())return ds[e]=t.prototype,t.prototype;try{const d=document.createElement("iframe");d.style.display="none",document.body.appendChild(d);const u=d.contentWindow;if(!u)return t.prototype;const o=u[e].prototype;if(!o)return d.remove(),s;const h=navigator.userAgent;return h.includes("Safari")&&!h.includes("Chrome")?(d.classList.add("rr-block"),d.setAttribute("__rrwebUntaintedMutationObserver",""),$r[e]=()=>d.remove()):d.remove(),ds[e]=o}catch{return s}}const hi={};function ze(e,t,s){var i;const n=`${e}.${String(s)}`;if(hi[n])return hi[n].call(t);const l=di(e),m=(i=Object.getOwnPropertyDescriptor(l,s))==null?void 0:i.get;return m?(hi[n]=m,m.call(t)):t[s]}const pi={};function qr(e,t,s){const i=`${e}.${String(s)}`;if(pi[i])return pi[i].bind(t);const n=di(e)[s];return typeof n!="function"?t[s]:(pi[i]=n,n.bind(t))}function Sd(e){return ze("Node",e,"ownerDocument")}function Id(e){return ze("Node",e,"childNodes")}function Vd(e){return ze("Node",e,"parentNode")}function Xd(e){return ze("Node",e,"parentElement")}function Gd(e){return ze("Node",e,"textContent")}function Rd(e,t){return qr("Node",e,"contains")(t)}function vd(e){return qr("Node",e,"getRootNode")()}function Wd(e){return!e||!("host"in e)?null:ze("ShadowRoot",e,"host")}function kd(e){return e.styleSheets}function wd(e){return!e||!("shadowRoot"in e)?null:ze("Element",e,"shadowRoot")}function Cd(e,t){return ze("Element",e,"querySelector")(t)}function xd(e,t){return ze("Element",e,"querySelectorAll")(t)}function Td(){var e;return[di("MutationObserver").constructor,(e=$r.MutationObserver)!=null?e:()=>{}]}let eo=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(eo=()=>new Date().getTime());function Ld(e,t,s){try{if(!(t in e))return()=>{};const i=e[t],n=s(i);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=n,()=>{e[t]=i}}catch{return()=>{}}}const pe={ownerDocument:Sd,childNodes:Id,parentNode:Vd,parentElement:Xd,textContent:Gd,contains:Rd,getRootNode:vd,host:Wd,styleSheets:kd,shadowRoot:wd,querySelector:Cd,querySelectorAll:xd,nowTimestamp:eo,mutationObserverCtor:Td,patch:Ld,wrapCanvasContextDrawImage:gd};function to(e){return e.nodeType===e.ELEMENT_NODE}function Ct(e){const t=e&&"host"in e&&"mode"in e&&pe.host(e)||null;return!!(t&&"shadowRoot"in t&&pe.shadowRoot(t)===e)}function xt(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Nd(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 Jd(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 mi(e){try{const t=e.rules||e.cssRules;if(!t)return null;let s=e.href;!s&&e.ownerNode&&(s=e.ownerNode.baseURI);const i=Array.from(t,n=>so(n,s)).join("");return Nd(i)}catch{return null}}function so(e,t){if(Ud(e)){let s;try{s=mi(e.styleSheet)||Jd(e)}catch{s=e.cssText}return e.styleSheet.href?ms(s,e.styleSheet.href):s}else{let s=e.cssText;return Fd(e)&&e.selectorText.includes(":")&&(s=Yd(s)),t?ms(s,t):s}}function Yd(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Ud(e){return"styleSheet"in e}function Fd(e){return"selectorText"in e}class io{constructor(){Br(this,"idNodeMap",new Map),Br(this,"nodeMetaMap",new WeakMap)}getId(t){var s;if(!t)return-1;const i=(s=this.getMeta(t))==null?void 0:s.id;return i??-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(i=>this.removeNodeFromMap(i))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,s){const i=s.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,s)}replace(t,s){const i=this.getNode(t);if(i){const n=this.nodeMetaMap.get(i);n&&this.nodeMetaMap.set(s,n)}this.idNodeMap.set(t,s)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Md(){return new io}function hs({element:e,maskInputOptions:t,tagName:s,type:i,value:n,overwriteRecord:l,maskInputFn:m}){let d=n||"";return lo({maskInputOptions:t,tagName:s,type:i,overwriteRecord:l})&&(m?d=m(d,e):d="*".repeat(d.length)),d}function ft(e){return e.toLowerCase()}const no="__rrweb_original__";function Kd(e){const t=e.getContext("2d");if(!t)return!0;const s=50;for(let i=0;i<e.width;i+=s)for(let n=0;n<e.height;n+=s){const l=t.getImageData,m=no in l?l[no]:l;if(new Uint32Array(m.call(t,i,n,Math.min(s,e.width-i),Math.min(s,e.height-n)).data.buffer).some(d=>d!==0))return!1}return!0}function ps(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ft(t):null}function ro(e,t){var s;let i;try{i=new URL(e,window.location.href)}catch{return null}const n=/\.([0-9a-z]+)(?:$)/i,l=i.pathname.match(n);return(s=l?.[1])!=null?s:null}function Od(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const Ed=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,zd=/^(?:[a-z+]+:)?\/\//i,Hd=/^www\..*/i,Pd=/^(data:)([^,]*),(.*)/i;function ms(e,t){return(e||"").replace(Ed,(s,i,n,l,m,d)=>{const u=n||m||d,o=i||l||"";if(!u)return s;if(zd.test(u)||Hd.test(u))return`url(${o}${u}${o})`;if(Pd.test(u))return`url(${o}${u}${o})`;if(u[0]==="/")return`url(${o}${Od(t)+u}${o})`;const h=u.split("#")[0],c=u.substring(h.length),a=t.split("#")[0].split("/"),r=h.split("/");a.pop();for(const f of r)f!=="."&&(f===".."?a.pop():a.push(f));return`url(${o}${a.join("/")}${c}${o})`})}function fs(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Dd(e,t,s=!1){const i=Array.from(t.childNodes),n=[];let l=0;if(i.length>1&&e&&typeof e=="string"){let m=fs(e,s);const d=m.length/e.length;for(let u=1;u<i.length;u++)if(i[u].textContent&&typeof i[u].textContent=="string"){const o=fs(i[u].textContent,s),h=100;let c=3;for(;c<o.length&&(o[c].match(/[a-zA-Z0-9]/)||o.indexOf(o.substring(0,c),1)!==-1);c++);for(;c<o.length;c++){let a=o.substring(0,c),r=m.split(a),f=-1;if(r.length===2)f=r[0].length;else if(r.length>2&&r[0]===""&&i[u-1].textContent!=="")f=m.indexOf(a,1);else if(r.length===1){if(a=a.substring(0,a.length-1),r=m.split(a),r.length<=1)return n.push(e),n;c=h+1}else c===o.length-1&&(f=m.indexOf(a));if(r.length>=2&&c>h){const p=i[u-1].textContent;if(p&&typeof p=="string"){const y=fs(p).length;f=m.indexOf(a,y)}f===-1&&(f=r[0].length)}if(f!==-1){let p=Math.floor(f/d);for(;p>0&&p<e.length;){if(l+=1,l>50*i.length)return n.push(e),n;const y=fs(e.substring(0,p),s);if(y.length===f){n.push(e.substring(0,p)),e=e.substring(p),m=m.substring(f);break}else y.length<f?p+=Math.max(1,Math.floor((f-y.length)/d)):p-=Math.max(1,Math.floor((y.length-f)*d))}break}}}}return n.push(e),n}function Bd(e,t){return Dd(e,t).join("/* rr_split */")}function fi(e){return e=e.replace(/[^ -~]+/g,""),e=e?.split(" ").map(t=>t?Math.random().toString(20).substring(2,t.length+2):"").join(" ")||"",e}function bi(e){return e==="img"||e==="video"||e==="audio"||e==="source"}const Qd=new RegExp(/[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*/),jd=new RegExp(/[0-9]{9,16}/),Ad=new RegExp(/[0-9]{3}-?[0-9]{2}-?[0-9]{4}/),_d=new RegExp(/[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}/),$d=new RegExp(/[0-9]{4}-?[0-9]{4}-?[0-9]{4}-?[0-9]{4}/),qd=new RegExp(/[0-9]{1,5}.?[0-9]{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15}/),eh=new RegExp(/(?:[0-9]{1,3}.){3}[0-9]{1,3}/),th=[Qd,jd,Ad,_d,$d,qd,eh];function oo(e){return e?th.some(t=>t.test(e)):!1}const lo=({maskInputOptions:e,tagName:t,type:s,overwriteRecord:i})=>{const n=s&&s.toLowerCase();return i!=="true"&&(!!e[t.toLowerCase()]||!!(n&&e[n]))};let sh=1;const ih=new RegExp("[^a-z0-9-_:]"),Tt=-2;function ao(){return sh++}function nh(e){if(e instanceof HTMLFormElement)return"form";const t=ft(e.tagName);return ih.test(t)?"div":t}let bt,co;const rh=/^[^ \t\n\r\u000c]+/,oh=/^[, \t\n\r\u000c]+/;function lh(e,t){if(t.trim()==="")return t;let s=0;function i(l){let m;const d=l.exec(t.substring(s));return d?(m=d[0],s+=m.length,m):""}const n=[];for(;i(oh),!(s>=t.length);){let l=i(rh);if(l.slice(-1)===",")l=bs(e,l.substring(0,l.length-1)),n.push(l);else{let m="";l=bs(e,l);let d=!1;for(;;){const u=t.charAt(s);if(u===""){n.push((l+m).trim());break}else if(d)u===")"&&(d=!1);else if(u===","){s+=1,n.push((l+m).trim());break}else u==="("&&(d=!0);m+=u,s+=1}}}return n.join(", ")}const uo=new WeakMap;function bs(e,t){return!t||t.trim()===""?t:yi(e,t)}function ah(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function yi(e,t){let s=uo.get(e);if(s||(s=e.createElement("a"),uo.set(e,s)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return s.setAttribute("href",t),s.href}function ho(e,t,s,i){return i&&(s==="src"||s==="href"&&!(t==="use"&&i[0]==="#")||s==="xlink:href"&&i[0]!=="#"||s==="background"&&["table","td","th"].includes(t)?bs(e,i):s==="srcset"?lh(e,i):s==="style"?ms(i,yi(e)):t==="object"&&s==="data"?bs(e,i):i)}function po(e,t,s){return["video","audio"].includes(e)&&t==="autoplay"}function mo(e,t,s){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let i=e.classList.length;i--;){const n=e.classList[i];if(t.test(n))return!0}if(s)return e.matches(s)}catch{}return!1}function ys(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return s?ys(pe.parentNode(e),t,s):!1;for(let i=e.classList.length;i--;){const n=e.classList[i];if(t.test(n))return!0}return s?ys(pe.parentNode(e),t,s):!1}function fo(e,t,s,i){let n;if(to(e)){if(n=e,!pe.childNodes(n).length)return!1}else{if(pe.parentElement(e)===null)return!1;n=pe.parentElement(e)}try{if(typeof t=="string"){if(i){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(ys(n,t,i))return!0;if(s){if(i){if(n.closest(s))return!0}else if(n.matches(s))return!0}}catch{}return!1}function ch(e,t,s){const i=e.contentWindow;if(!i)return;let n=!1,l;try{l=i.document.readyState}catch{return}if(l!=="complete"){const d=setTimeout(()=>{n||(t(),n=!0)},s);e.addEventListener("load",()=>{clearTimeout(d),n=!0,t()});return}const m="about:blank";if(i.location.href!==m||e.src===m||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function uh(e,t,s){let i=!1,n;try{n=e.sheet}catch{return}if(n)return;const l=setTimeout(()=>{i||(t(),i=!0)},s);e.addEventListener("load",()=>{clearTimeout(l),i=!0,t()})}function dh(e,t){const{doc:s,mirror:i,blockClass:n,blockSelector:l,needsMask:m,inlineStylesheet:d,maskInputOptions:u={},maskTextClass:o,maskTextFn:h,maskInputFn:c,dataURLOptions:a={},inlineImages:r,inlineVideos:f,recordCanvas:p,keepIframeSrcFn:y,newlyAddedElement:X=!1,cssCaptured:Z=!1,privacySetting:S}=t,R=hh(s,i);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:ce.Document,childNodes:[],compatMode:e.compatMode}:{type:ce.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:ce.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:R};case e.ELEMENT_NODE:return mh(e,{doc:s,blockClass:n,blockSelector:l,inlineStylesheet:d,maskInputOptions:u,maskInputFn:c,maskTextClass:o,dataURLOptions:a,inlineImages:r,inlineVideos:f,recordCanvas:p,keepIframeSrcFn:y,newlyAddedElement:X,privacySetting:S,rootId:R});case e.TEXT_NODE:return ph(e,{doc:s,needsMask:m,maskTextFn:h,privacySetting:S,rootId:R,cssCaptured:Z});case e.CDATA_SECTION_NODE:return{type:ce.CDATA,textContent:"",rootId:R};case e.COMMENT_NODE:return{type:ce.Comment,textContent:pe.textContent(e)||"",rootId:R};default:return!1}}function hh(e,t){if(!t.hasNode(e))return;const s=t.getId(e);return s===1?void 0:s}function ph(e,t){var s;const{needsMask:i,maskTextFn:n,privacySetting:l,rootId:m,cssCaptured:d}=t,u=pe.parentNode(e),o=u&&u.tagName;let h="";const c=o==="STYLE"?!0:void 0,a=o==="SCRIPT"?!0:void 0;a?h="SCRIPT_PLACEHOLDER":d||(h=pe.textContent(e),c&&h&&(h=ms(h,yi(t.doc)))),!c&&!a&&h&&i&&(h=n?n(h,pe.parentElement(e)):h.replace(/[\S]/g,"*"));const r=l==="strict",f=(s=e.parentElement)==null?void 0:s.getAttribute("data-hl-record"),p=l==="default"&&oo(h);return(r||p)&&!f&&o&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(o)&&h&&(h=fi(h)),{type:ce.Text,textContent:h||"",rootId:m}}function mh(e,t){const{doc:s,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:m={},maskInputFn:d,maskTextClass:u,dataURLOptions:o={},inlineImages:h,inlineVideos:c,recordCanvas:a,keepIframeSrcFn:r,newlyAddedElement:f=!1,privacySetting:p,rootId:y}=t;let X=mo(e,i,n);const Z=mo(e,u,null),S=p==="strict";let R=nh(e),b={};const g=e.attributes.length;for(let V=0;V<g;V++){const k=e.attributes[V];po(R,k.name)||(b[k.name]=ho(s,R,ft(k.name),k.value))}if(R==="link"&&l){const V=Array.from(s.styleSheets).find(w=>w.href===e.href);let k=null;V&&(k=mi(V)),k&&(delete b.rel,delete b.href,b._cssText=k)}if(R==="style"&&e.sheet){let V=mi(e.sheet);V&&(e.childNodes.length>1&&(V=Bd(V,e)),b._cssText=V)}if(["input","textarea","select"].includes(R)){const V=e.value,k=e.checked;b.type!=="radio"&&b.type!=="checkbox"&&b.type!=="submit"&&b.type!=="button"&&V?b.value=hs({element:e,type:ps(e),tagName:R,value:V,overwriteRecord:e.getAttribute("data-hl-record"),maskInputOptions:m,maskInputFn:d}):k&&(b.checked=k)}if(R==="option"&&(e.selected&&!m.select?b.selected=!0:delete b.selected),R==="dialog"&&e.open&&(b.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),R==="canvas"&&a){if(e.__context==="2d")Kd(e);else if(!("__context"in e)){const V=e.toDataURL(o.type,o.quality),k=s.createElement("canvas");k.width=e.width,k.height=e.height;const w=k.toDataURL(o.type,o.quality);V!==w&&(b.rr_dataURL=V)}}if(R==="img"&&h&&!X&&!Z&&!S){bt||(bt=s.createElement("canvas"),co=bt.getContext("2d"));const V=e,k=V.currentSrc||V.getAttribute("src")||"<unknown-src>",w=V.crossOrigin,N=()=>{V.removeEventListener("load",N);try{bt.width=V.naturalWidth,bt.height=V.naturalHeight,co.drawImage(V,0,0),b.rr_dataURL=bt.toDataURL(o.type,o.quality)}catch(z){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=${k}! Error: ${z}`)}V.crossOrigin==="anonymous"&&(w?b.crossOrigin=w:V.removeAttribute("crossorigin"))};V.complete&&V.naturalWidth!==0?N():V.addEventListener("load",N)}if(["audio","video"].includes(R)){const V=b;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(f||(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop)),X||Z||S&&bi(R)){const{width:V,height:k}=e.getBoundingClientRect();b={class:b.class,rr_width:`${V}px`,rr_height:`${k}px`}}S&&bi(R)&&(X=!0),R==="iframe"&&!r(b.src)&&(e.contentDocument||(b.rr_src=b.src),delete b.src);let G;try{customElements.get(R)&&(G=!0)}catch{}const v=V=>{const{width:k,height:w}=V.getBoundingClientRect();b={width:k,height:w,rr_width:`${k}px`,rr_height:`${w}px`,rr_inlined_video:!0,class:b.class,style:b.style},R="canvas";const N=s.createElement("canvas");N.width=e.width,N.height=e.height,b.rr_dataURL=N.toDataURL(o.type,o.quality)};if(R==="video"){const V=e;h&&(V.src===""||V.src.indexOf("blob:")!==-1)&&v(V),c&&V.src!==""&&V.src.indexOf("blob:")===-1&&v(V)}return{type:ce.Element,tagName:R,attributes:b,childNodes:[],isSVG:ah(e)||void 0,needBlock:X,needMask:Z,rootId:y,isCustom:G}}function q(e){return e==null?"":e.toLowerCase()}function bo(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 fh(e,t){return!!(t.comment&&e.type===ce.Comment||e.type===ce.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"&&ro(e.attributes.href)==="js")||t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(q(e.attributes.name).match(/^msapplication-tile(image|color)$/)||q(e.attributes.name)==="application-name"||q(e.attributes.rel)==="icon"||q(e.attributes.rel)==="apple-touch-icon"||q(e.attributes.rel)==="shortcut icon"))||e.tagName==="meta"&&(t.headMetaDescKeywords&&q(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(q(e.attributes.property).match(/^(og|twitter|fb):/)||q(e.attributes.name).match(/^(og|twitter):/)||q(e.attributes.name)==="pinterest")||t.headMetaRobots&&(q(e.attributes.name)==="robots"||q(e.attributes.name)==="googlebot"||q(e.attributes.name)==="bingbot")||t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0||t.headMetaAuthorship&&(q(e.attributes.name)==="author"||q(e.attributes.name)==="generator"||q(e.attributes.name)==="framework"||q(e.attributes.name)==="publisher"||q(e.attributes.name)==="progid"||q(e.attributes.property).match(/^article:/)||q(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(q(e.attributes.name)==="google-site-verification"||q(e.attributes.name)==="yandex-verification"||q(e.attributes.name)==="csrf-token"||q(e.attributes.name)==="p:domain_verify"||q(e.attributes.name)==="verify-v1"||q(e.attributes.name)==="verification"||q(e.attributes.name)==="shopify-checkout-api-token"))))}function yt(e,t){const{doc:s,mirror:i,blockClass:n,blockSelector:l,maskTextClass:m,maskTextSelector:d,skipChild:u=!1,inlineStylesheet:o=!0,maskInputOptions:h={},maskTextFn:c,maskInputFn:a,slimDOMOptions:r,dataURLOptions:f={},inlineImages:p=!1,inlineVideos:y=!1,recordCanvas:X=!1,onSerialize:Z,onIframeLoad:S,iframeLoadTimeout:R=5e3,onStylesheetLoad:b,stylesheetLoadTimeout:g=5e3,keepIframeSrcFn:G=()=>!1,newlyAddedElement:v=!1,cssCaptured:V=!1,privacySetting:k}=t;let{needsMask:w}=t,{preserveWhiteSpace:N=!0}=t;w||(w=fo(e,m,d,w===void 0));const z=dh(e,{doc:s,mirror:i,blockClass:n,blockSelector:l,needsMask:w,inlineStylesheet:o,maskInputOptions:h,maskTextClass:m,maskTextFn:c,maskInputFn:a,dataURLOptions:f,inlineImages:p,inlineVideos:y,recordCanvas:X,keepIframeSrcFn:G,newlyAddedElement:v,cssCaptured:V,privacySetting:k});if(!z)return console.warn(e,"not serialized"),null;let I;i.hasNode(e)?I=i.getId(e):fh(z,r)||!N&&z.type===ce.Text&&!z.textContent.replace(/^\s+|\s+$/gm,"").length?I=Tt:I=ao();const W=Object.assign(z,{id:I});if(i.add(e,W),I===Tt)return null;Z&&Z(e);let T=!u,U=k,F=k==="strict";if(W.type===ce.Element){if(T=T&&!W.needBlock,F||(F=!!W.needBlock||!!W.needMask),U=F?"strict":U,F&&bi(W.tagName)){const O=e.cloneNode();O.src="",i.add(O,W)}delete W.needBlock,delete W.needMask;const D=pe.shadowRoot(e);D&&xt(D)&&(W.isShadowHost=!0)}if((W.type===ce.Document||W.type===ce.Element)&&T){r.headWhitespace&&W.type===ce.Element&&W.tagName==="head"&&(N=!1);const D={doc:s,mirror:i,blockClass:n,blockSelector:l,needsMask:w,maskTextClass:m,maskTextSelector:d,skipChild:u,inlineStylesheet:o,maskInputOptions:h,maskTextFn:c,maskInputFn:a,slimDOMOptions:r,dataURLOptions:f,inlineImages:p,inlineVideos:y,recordCanvas:X,preserveWhiteSpace:N,onSerialize:Z,onIframeLoad:S,iframeLoadTimeout:R,onStylesheetLoad:b,stylesheetLoadTimeout:g,keepIframeSrcFn:G,cssCaptured:!1,privacySetting:U};if(!(W.type===ce.Element&&W.tagName==="textarea"&&W.attributes.value!==void 0)){W.type===ce.Element&&W.attributes._cssText!==void 0&&typeof W.attributes._cssText=="string"&&(D.cssCaptured=!0);for(const x of Array.from(pe.childNodes(e))){const se=yt(x,D);se&&W.childNodes.push(se)}}let O=null;if(to(e)&&(O=pe.shadowRoot(e)))for(const x of Array.from(pe.childNodes(O))){const se=yt(x,D);se&&(xt(O)&&(se.isShadow=!0),W.childNodes.push(se))}}const J=pe.parentNode(e);return J&&Ct(J)&&xt(J)&&(W.isShadow=!0),W.type===ce.Element&&W.tagName==="iframe"&&ch(e,()=>{const D=e.contentDocument;if(D&&S){const O=yt(D,{doc:D,mirror:i,blockClass:n,blockSelector:l,needsMask:w,maskTextClass:m,maskTextSelector:d,skipChild:!1,inlineStylesheet:o,maskInputOptions:h,maskTextFn:c,maskInputFn:a,slimDOMOptions:r,dataURLOptions:f,inlineImages:p,inlineVideos:y,recordCanvas:X,preserveWhiteSpace:N,onSerialize:Z,onIframeLoad:S,iframeLoadTimeout:R,onStylesheetLoad:b,stylesheetLoadTimeout:g,keepIframeSrcFn:G,privacySetting:k});O&&S(e,O)}},R),W.type===ce.Element&&W.tagName==="link"&&typeof W.attributes.rel=="string"&&(W.attributes.rel==="stylesheet"||W.attributes.rel==="preload"&&typeof W.attributes.href=="string"&&ro(W.attributes.href)==="css")&&uh(e,()=>{if(b){const D=yt(e,{doc:s,mirror:i,blockClass:n,blockSelector:l,needsMask:w,maskTextClass:m,maskTextSelector:d,skipChild:!1,inlineStylesheet:o,maskInputOptions:h,maskTextFn:c,maskInputFn:a,slimDOMOptions:r,dataURLOptions:f,inlineImages:p,inlineVideos:y,recordCanvas:X,preserveWhiteSpace:N,onSerialize:Z,onIframeLoad:S,iframeLoadTimeout:R,onStylesheetLoad:b,stylesheetLoadTimeout:g,keepIframeSrcFn:G,privacySetting:k});D&&b(e,D)}},g),W}function bh(e,t){const{mirror:s=new io,blockClass:i="highlight-block",blockSelector:n=null,maskTextClass:l="highlight-mask",maskTextSelector:m=null,inlineStylesheet:d=!0,inlineImages:u=!1,inlineVideos:o=!1,recordCanvas:h=!1,maskAllInputs:c=!1,maskTextFn:a,maskInputFn:r,slimDOM:f=!1,dataURLOptions:p,preserveWhiteSpace:y,onSerialize:X,onIframeLoad:Z,iframeLoadTimeout:S,onStylesheetLoad:R,stylesheetLoadTimeout:b,keepIframeSrcFn:g=()=>!1,privacySetting:G="default"}=t||{},v=c===!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}:c===!1?{password:!0}:c,V=bo(f);return yt(e,{doc:e,mirror:s,blockClass:i,blockSelector:n,maskTextClass:l,maskTextSelector:m,skipChild:!1,inlineStylesheet:d,maskInputOptions:v,maskTextFn:a,maskInputFn:r,slimDOMOptions:V,dataURLOptions:p,inlineImages:u,inlineVideos:o,recordCanvas:h,preserveWhiteSpace:y,onSerialize:X,onIframeLoad:Z,iframeLoadTimeout:S,onStylesheetLoad:R,stylesheetLoadTimeout:b,keepIframeSrcFn:g,newlyAddedElement:!1,privacySetting:G})}function yh(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var s=function i(){return this instanceof i?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(i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(s,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}),s}var gs={exports:{}},yo;function gh(){if(yo)return gs.exports;yo=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 gs.exports=t(),gs.exports.createColors=t,gs.exports}const Zh={},Sh=Object.freeze(Object.defineProperty({__proto__:null,default:Zh},Symbol.toStringTag,{value:"Module"})),Le=yh(Sh);var gi,go;function Zi(){if(go)return gi;go=1;let e=gh(),t=Le;class s extends Error{constructor(n,l,m,d,u,o){super(n),this.name="CssSyntaxError",this.reason=n,u&&(this.file=u),d&&(this.source=d),o&&(this.plugin=o),typeof l<"u"&&typeof m<"u"&&(typeof l=="number"?(this.line=l,this.column=m):(this.line=l.line,this.column=l.column,this.endLine=m.line,this.endColumn=m.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(n){if(!this.source)return"";let l=this.source;n==null&&(n=e.isColorSupported);let m=r=>r,d=r=>r,u=r=>r;if(n){let{bold:r,gray:f,red:p}=e.createColors(!0);d=y=>r(p(y)),m=y=>f(y),t&&(u=y=>t(y))}let o=l.split(/\r?\n/),h=Math.max(this.line-3,0),c=Math.min(this.line+2,o.length),a=String(c).length;return o.slice(h,c).map((r,f)=>{let p=h+1+f,y=" "+(" "+p).slice(-a)+" | ";if(p===this.line){if(r.length>160){let Z=20,S=Math.max(0,this.column-Z),R=Math.max(this.column+Z,this.endColumn+Z),b=r.slice(S,R),g=m(y.replace(/\d/g," "))+r.slice(0,Math.min(this.column-1,Z-1)).replace(/[^\t]/g," ");return d(">")+m(y)+u(b)+`
|
|
289
289
|
`+g+d("^")}let X=m(y.replace(/\d/g," "))+r.slice(0,this.column-1).replace(/[^\t]/g," ");return d(">")+m(y)+u(r)+`
|
|
290
290
|
`+X+d("^")}return" "+m(y)+u(r)}).join(`
|
|
291
291
|
`)}toString(){let n=this.showSourceCode();return n&&(n=`
|
|
292
292
|
|
|
293
293
|
`+n+`
|
|
294
|
-
`),this.name+": "+this.message+n}}return
|
|
294
|
+
`),this.name+": "+this.message+n}}return gi=s,s.default=s,gi}var Si,Zo;function So(){if(Zo)return Si;Zo=1;const e=/(<)(\/?style\b)/gi,t=/(<)(!--)/g;function s(m){return typeof m!="string"||!m.includes("<")?m:m.replace(e,"\\3c $2").replace(t,"\\3c $2")}const i={after:`
|
|
295
295
|
`,beforeClose:`
|
|
296
296
|
`,beforeComment:`
|
|
297
297
|
`,beforeDecl:`
|
|
@@ -302,27 +302,27 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):m
|
|
|
302
302
|
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(u,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeDecl(d,u){let o;return d.walkDecls(h=>{if(typeof h.raws.before<"u")return o=h.raws.before,o.includes(`
|
|
303
303
|
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(u,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeOpen(d){let u;return d.walk(o=>{if(o.type!=="decl"&&(u=o.raws.between,typeof u<"u"))return!1}),u}rawBeforeRule(d){let u;return d.walk(o=>{if(o.nodes&&(o.parent!==d||d.first!==o)&&typeof o.raws.before<"u")return u=o.raws.before,u.includes(`
|
|
304
304
|
`)&&(u=u.replace(/[^\n]+$/,"")),!1}),u&&(u=u.replace(/\S/g,"")),u}rawColon(d){let u;return d.walkDecls(o=>{if(typeof o.raws.between<"u")return u=o.raws.between.replace(/[^\s:]/g,""),!1}),u}rawEmptyBody(d){let u;return d.walk(o=>{if(o.nodes&&o.nodes.length===0&&(u=o.raws.after,typeof u<"u"))return!1}),u}rawIndent(d){if(d.raws.indent)return d.raws.indent;let u;return d.walk(o=>{let h=o.parent;if(h&&h!==d&&h.parent&&h.parent===d&&typeof o.raws.before<"u"){let c=o.raws.before.split(`
|
|
305
|
-
`);return u=c[c.length-1],u=u.replace(/\S/g,""),!1}}),u}rawSemicolon(d){let u;return d.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(u=o.raws.semicolon,typeof u<"u"))return!1}),u}rawValue(d,u){let o=d[u],h=d.raws[u];return h&&h.value===o?h.raw:o}root(d){if(this.body(d),d.raws.after){let u=d.raws.after,o=d.parent&&d.parent.type==="document";this.builder(o?u:s(u))}}rule(d){this.block(d,this.rawValue(d,"selector")),d.raws.ownSemicolon&&this.builder(s(d.raws.ownSemicolon),d,"end")}stringify(d,u){if(!this[d.type])throw new Error("Unknown AST node type "+d.type+". Maybe you need to change PostCSS stringifier.");this[d.type](d,u)}}return
|
|
305
|
+
`);return u=c[c.length-1],u=u.replace(/\S/g,""),!1}}),u}rawSemicolon(d){let u;return d.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(u=o.raws.semicolon,typeof u<"u"))return!1}),u}rawValue(d,u){let o=d[u],h=d.raws[u];return h&&h.value===o?h.raw:o}root(d){if(this.body(d),d.raws.after){let u=d.raws.after,o=d.parent&&d.parent.type==="document";this.builder(o?u:s(u))}}rule(d){this.block(d,this.rawValue(d,"selector")),d.raws.ownSemicolon&&this.builder(s(d.raws.ownSemicolon),d,"end")}stringify(d,u){if(!this[d.type])throw new Error("Unknown AST node type "+d.type+". Maybe you need to change PostCSS stringifier.");this[d.type](d,u)}}return Si=l,l.default=l,Si}var Ii,Io;function Zs(){if(Io)return Ii;Io=1;let e=So();function t(s,i){new e(i).stringify(s)}return Ii=t,t.default=t,Ii}var Vi={},Vo;function Xi(){return Vo||(Vo=1,Vi.isClean=Symbol("isClean"),Vi.my=Symbol("my")),Vi}var Gi,Xo;function Ss(){if(Xo)return Gi;Xo=1;let e=Zi(),t=So(),s=Zs(),{isClean:i,my:n}=Xi();function l(u,o){let h=new u.constructor;for(let c in u){if(!Object.prototype.hasOwnProperty.call(u,c)||c==="proxyCache")continue;let a=u[c],r=typeof a;c==="parent"&&r==="object"?o&&(h[c]=o):c==="source"?h[c]=a:Array.isArray(a)?h[c]=a.map(f=>l(f,h)):(r==="object"&&a!==null&&(a=l(a)),h[c]=a)}return h}function m(u,o){if(o&&typeof o.offset<"u")return o.offset;let h=1,c=1,a=0;for(let r=0;r<u.length;r++){if(c===o.line&&h===o.column){a=r;break}u[r]===`
|
|
306
306
|
`?(h=1,c+=1):h+=1}return a}class d{get proxyOf(){return this}constructor(o={}){this.raws={},this[i]=!1,this[n]=!0;for(let h in o)if(h==="nodes"){this.nodes=[];for(let c of o[h])typeof c.clone=="function"?this.append(c.clone()):this.append(c)}else this[h]=o[h]}addToError(o){if(o.postcssNode=this,o.stack&&this.source&&/\n\s{4}at /.test(o.stack)){let h=this.source;o.stack=o.stack.replace(/\n\s{4}at /,`$&${h.input.from}:${h.start.line}:${h.start.column}$&`)}return o}after(o){return this.parent.insertAfter(this,o),this}assign(o={}){for(let h in o)this[h]=o[h];return this}before(o){return this.parent.insertBefore(this,o),this}cleanRaws(o){delete this.raws.before,delete this.raws.after,o||delete this.raws.between}clone(o={}){let h=l(this);for(let c in o)h[c]=o[c];return h}cloneAfter(o={}){let h=this.clone(o);return this.parent.insertAfter(this,h),h}cloneBefore(o={}){let h=this.clone(o);return this.parent.insertBefore(this,h),h}error(o,h={}){if(this.source){let{end:c,start:a}=this.rangeBy(h);return this.source.input.error(o,{column:a.column,line:a.line},{column:c.column,line:c.line},h)}return new e(o)}getProxyProcessor(){return{get(o,h){return h==="proxyOf"?o:h==="root"?()=>o.root().toProxy():o[h]},set(o,h,c){return o[h]===c||(o[h]=c,(h==="prop"||h==="value"||h==="name"||h==="params"||h==="important"||h==="text")&&o.markDirty()),!0}}}markClean(){this[i]=!0}markDirty(){if(this[i]){this[i]=!1;let o=this;for(;o=o.parent;)o[i]=!1}}next(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o+1]}positionBy(o={}){let h=this.source.start;if(o.index)h=this.positionInside(o.index);else if(o.word){let c="document"in this.source.input?this.source.input.document:this.source.input.css,a=c.slice(m(c,this.source.start),m(c,this.source.end)).indexOf(o.word);a!==-1&&(h=this.positionInside(a))}return h}positionInside(o){let h=this.source.start.column,c=this.source.start.line,a="document"in this.source.input?this.source.input.document:this.source.input.css,r=m(a,this.source.start),f=r+o;for(let p=r;p<f;p++)a[p]===`
|
|
307
|
-
`?(h=1,c+=1):h+=1;return{column:h,line:c,offset:f}}prev(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o-1]}rangeBy(o={}){let h="document"in this.source.input?this.source.input.document:this.source.input.css,c={column:this.source.start.column,line:this.source.start.line,offset:m(h,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:m(h,this.source.end)+1}:{column:c.column+1,line:c.line,offset:c.offset+1};if(o.word){let r=h.slice(m(h,this.source.start),m(h,this.source.end)).indexOf(o.word);r!==-1&&(c=this.positionInside(r),a=this.positionInside(r+o.word.length))}else o.start?c={column:o.start.column,line:o.start.line,offset:m(h,o.start)}:o.index&&(c=this.positionInside(o.index)),o.end?a={column:o.end.column,line:o.end.line,offset:m(h,o.end)}:typeof o.endIndex=="number"?a=this.positionInside(o.endIndex):o.index&&(a=this.positionInside(o.index+1));return(a.line<c.line||a.line===c.line&&a.column<=c.column)&&(a={column:c.column+1,line:c.line,offset:c.offset+1}),{end:a,start:c}}raw(o,h){return new t().raw(this,o,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...o){if(this.parent){let h=this,c=!1;for(let a of o)a===this?c=!0:c?(this.parent.insertAfter(h,a),h=a):this.parent.insertBefore(h,a);c||this.remove()}return this}root(){let o=this;for(;o.parent&&o.parent.type!=="document";)o=o.parent;return o}toJSON(o,h){let c={},a=h==null;h=h||new Map;let r=0;for(let f in this){if(!Object.prototype.hasOwnProperty.call(this,f)||f==="parent"||f==="proxyCache")continue;let p=this[f];if(Array.isArray(p))c[f]=p.map(y=>typeof y=="object"&&y.toJSON?y.toJSON(null,h):y);else if(typeof p=="object"&&p.toJSON)c[f]=p.toJSON(null,h);else if(f==="source"){if(p==null)continue;let y=h.get(p.input);y==null&&(y=r,h.set(p.input,r),r++),c[f]={end:p.end,inputId:y,start:p.start}}else c[f]=p}return a&&(c.inputs=[...h.keys()].map(f=>f.toJSON())),c}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(o=s){o.stringify&&(o=o.stringify);let h="";return o(this,c=>{h+=c}),h}warn(o,h,c={}){let a={node:this};for(let r in c)a[r]=c[r];return o.warn(h,a)}}return Xi=d,d.default=d,Xi}var Gi,Io;function Is(){if(Io)return Gi;Io=1;let e=Ss();class t extends e{constructor(i){super(i),this.type="comment"}}return Gi=t,t.default=t,Gi}var Ri,Vo;function Vs(){if(Vo)return Ri;Vo=1;let e=Ss();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(i){i&&typeof i.value<"u"&&typeof i.value!="string"&&(i=he(K({},i),{value:String(i.value)})),super(i),this.type="decl"}}return Ri=t,t.default=t,Ri}var vi,Xo;function et(){if(Xo)return vi;Xo=1;let e=Is(),t=Vs(),s=Ss(),{isClean:i,my:n}=Vi(),l,m,d,u;function o(a){return a.map(r=>(r.nodes&&(r.nodes=o(r.nodes)),delete r.source,r))}function h(a){if(a[i]=!1,a.proxyOf.nodes)for(let r of a.proxyOf.nodes)h(r)}class c 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(...r){for(let f of r){let p=this.normalize(f,this.last);for(let y of p)this.proxyOf.nodes.push(y)}return this.markDirty(),this}cleanRaws(r){if(super.cleanRaws(r),this.nodes)for(let f of this.nodes)f.cleanRaws(r)}each(r){if(!this.proxyOf.nodes)return;let f=this.getIterator(),p,y;for(;this.indexes[f]<this.proxyOf.nodes.length&&(p=this.indexes[f],y=r(this.proxyOf.nodes[p],p),y!==!1);)this.indexes[f]+=1;return delete this.indexes[f],y}every(r){return this.nodes.every(r)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let r=this.lastEach;return this.indexes[r]=0,r}getProxyProcessor(){return{get(r,f){return f==="proxyOf"?r:r[f]?f==="each"||typeof f=="string"&&f.startsWith("walk")?(...p)=>r[f](...p.map(y=>typeof y=="function"?(X,Z)=>y(X.toProxy(),Z):y)):f==="every"||f==="some"?p=>r[f]((y,...X)=>p(y.toProxy(),...X)):f==="root"?()=>r.root().toProxy():f==="nodes"?r.nodes.map(p=>p.toProxy()):f==="first"||f==="last"?r[f].toProxy():r[f]:r[f]},set(r,f,p){return r[f]===p||(r[f]=p,(f==="name"||f==="params"||f==="selector")&&r.markDirty()),!0}}}index(r){return typeof r=="number"?r:(r.proxyOf&&(r=r.proxyOf),this.proxyOf.nodes.indexOf(r))}insertAfter(r,f){let p=this.index(r),y=this.normalize(f,this.proxyOf.nodes[p]).reverse();p=this.index(r);for(let Z of y)this.proxyOf.nodes.splice(p+1,0,Z);let X;for(let Z in this.indexes)X=this.indexes[Z],p<X&&(this.indexes[Z]=X+y.length);return this.markDirty(),this}insertBefore(r,f){let p=this.index(r),y=p===0?"prepend":!1,X=this.normalize(f,this.proxyOf.nodes[p],y).reverse();p=this.index(r);for(let S of X)this.proxyOf.nodes.splice(p,0,S);let Z;for(let S in this.indexes)Z=this.indexes[S],p<=Z&&(this.indexes[S]=Z+X.length);return this.markDirty(),this}normalize(r,f){if(typeof r=="string")r=o(m(r).nodes);else if(typeof r>"u")r=[];else if(Array.isArray(r)){r=r.slice(0);for(let p of r)p.parent&&p.parent.removeChild(p,"ignore")}else if(r.type==="root"&&this.type!=="document"){r=r.nodes.slice(0);for(let p of r)p.parent&&p.parent.removeChild(p,"ignore")}else if(r.type)r=[r];else if(r.prop){if(typeof r.value>"u")throw new Error("Value field is missed in node creation");typeof r.value!="string"&&(r.value=String(r.value)),r=[new t(r)]}else if(r.selector||r.selectors)r=[new u(r)];else if(r.name)r=[new l(r)];else if(r.text)r=[new e(r)];else throw new Error("Unknown node type in node creation");return r.map(p=>(p[n]||c.rebuild(p),p=p.proxyOf,p.parent&&p.parent.removeChild(p),p[i]&&h(p),p.raws||(p.raws={}),typeof p.raws.before>"u"&&f&&typeof f.raws.before<"u"&&(p.raws.before=f.raws.before.replace(/\S/g,"")),p.parent=this.proxyOf,p))}prepend(...r){r=r.reverse();for(let f of r){let p=this.normalize(f,this.first,"prepend").reverse();for(let y of p)this.proxyOf.nodes.unshift(y);for(let y in this.indexes)this.indexes[y]=this.indexes[y]+p.length}return this.markDirty(),this}push(r){return r.parent=this,this.proxyOf.nodes.push(r),this}removeAll(){for(let r of this.proxyOf.nodes)r.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(r){r=this.index(r),this.proxyOf.nodes[r].parent=void 0,this.proxyOf.nodes.splice(r,1);let f;for(let p in this.indexes)f=this.indexes[p],f>=r&&(this.indexes[p]=f-1);return this.markDirty(),this}replaceValues(r,f,p){return p||(p=f,f={}),this.walkDecls(y=>{f.props&&!f.props.includes(y.prop)||f.fast&&!y.value.includes(f.fast)||(y.value=y.value.replace(r,p))}),this.markDirty(),this}some(r){return this.nodes.some(r)}walk(r){return this.each((f,p)=>{let y;try{y=r(f,p)}catch(X){throw f.addToError(X)}return y!==!1&&f.walk&&(y=f.walk(r)),y})}walkAtRules(r,f){return f?r instanceof RegExp?this.walk((p,y)=>{if(p.type==="atrule"&&r.test(p.name))return f(p,y)}):this.walk((p,y)=>{if(p.type==="atrule"&&p.name===r)return f(p,y)}):(f=r,this.walk((p,y)=>{if(p.type==="atrule")return f(p,y)}))}walkComments(r){return this.walk((f,p)=>{if(f.type==="comment")return r(f,p)})}walkDecls(r,f){return f?r instanceof RegExp?this.walk((p,y)=>{if(p.type==="decl"&&r.test(p.prop))return f(p,y)}):this.walk((p,y)=>{if(p.type==="decl"&&p.prop===r)return f(p,y)}):(f=r,this.walk((p,y)=>{if(p.type==="decl")return f(p,y)}))}walkRules(r,f){return f?r instanceof RegExp?this.walk((p,y)=>{if(p.type==="rule"&&r.test(p.selector))return f(p,y)}):this.walk((p,y)=>{if(p.type==="rule"&&p.selector===r)return f(p,y)}):(f=r,this.walk((p,y)=>{if(p.type==="rule")return f(p,y)}))}}return c.registerParse=a=>{m=a},c.registerRule=a=>{u=a},c.registerAtRule=a=>{l=a},c.registerRoot=a=>{d=a},vi=c,c.default=c,c.rebuild=a=>{a.type==="atrule"?Object.setPrototypeOf(a,l.prototype):a.type==="rule"?Object.setPrototypeOf(a,u.prototype):a.type==="decl"?Object.setPrototypeOf(a,t.prototype):a.type==="comment"?Object.setPrototypeOf(a,e.prototype):a.type==="root"&&Object.setPrototypeOf(a,d.prototype),a[n]=!0,a.nodes&&a.nodes.forEach(r=>{c.rebuild(r)})},vi}var Wi,Go;function ki(){if(Go)return Wi;Go=1;let e=et();class t extends e{constructor(i){super(i),this.type="atrule"}append(...i){return this.proxyOf.nodes||(this.nodes=[]),super.append(...i)}prepend(...i){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...i)}}return Wi=t,t.default=t,e.registerAtRule(t),Wi}var wi,Ro;function Ci(){if(Ro)return wi;Ro=1;let e=et(),t,s;class i extends e{constructor(l){super(K({type:"document"},l)),this.nodes||(this.nodes=[])}toResult(l={}){return new t(new s,this,l).stringify()}}return i.registerLazyResult=n=>{t=n},i.registerProcessor=n=>{s=n},wi=i,i.default=i,wi}var xi,vo;function fh(){if(vo)return xi;vo=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return xi={nanoid:(t=21)=>{let s="",i=t|0;for(;i--;)s+=e[Math.random()*64|0];return s},customAlphabet:(t,s=21)=>(i=s)=>{let n="",l=i|0;for(;l--;)n+=t[Math.random()*t.length|0];return n}},xi}var Li,Wo;function ko(){if(Wo)return Li;Wo=1;let{existsSync:e,readFileSync:t}=Te,{dirname:s,join:i}=Te,{SourceMapConsumer:n,SourceMapGenerator:l}=Te;function m(u){return Buffer?Buffer.from(u,"base64").toString():window.atob(u)}class d{constructor(o,h){if(h.map===!1)return;h.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(o),this.inline=this.startWith(this.annotation,"data:");let c=h.map?h.map.prev:void 0,a=this.loadMap(h.from,c);!this.mapFile&&h.from&&(this.mapFile=h.from),this.mapFile&&(this.root=s(this.mapFile)),a&&(this.text=a)}consumer(){return this.consumerCache||(this.consumerCache=new n(this.json||this.text)),this.consumerCache}decodeInline(o){let h=/^data:application\/json;charset=utf-?8;base64,/,c=/^data:application\/json;base64,/,a=/^data:application\/json;charset=utf-?8,/,r=/^data:application\/json,/,f=o.match(a)||o.match(r);if(f)return decodeURIComponent(o.substr(f[0].length));let p=o.match(h)||o.match(c);if(p)return m(o.substr(p[0].length));let y=o.slice(22);throw y=y.slice(0,y.indexOf(",")),new Error("Unsupported source map encoding "+y)}getAnnotationURL(o){return o.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(o){return typeof o!="object"?!1:typeof o.mappings=="string"||typeof o._mappings=="string"||Array.isArray(o.sections)}loadAnnotation(o){let h=o.match(/\/\*\s*# sourceMappingURL=/g);if(!h)return;let c=o.lastIndexOf(h.pop()),a=o.indexOf("*/",c);c>-1&&a>-1&&(this.annotation=this.getAnnotationURL(o.substring(c,a)))}loadFile(o,h,c){if(!(!c&&!this.unsafeMap&&!/\.map$/i.test(o))&&(this.root=s(o),e(o)))return this.mapFile=o,t(o,"utf-8").toString().trim()}loadMap(o,h){if(h===!1)return!1;if(h){if(typeof h=="string")return h;if(typeof h=="function"){let c=h(o);if(c){let a=this.loadFile(c,o,!0);if(!a)throw new Error("Unable to load previous source map: "+c.toString());return a}}else{if(h instanceof n)return l.fromSourceMap(h).toString();if(h instanceof l)return h.toString();if(this.isMap(h))return JSON.stringify(h);throw new Error("Unsupported previous source map format: "+h.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let c=this.annotation;o&&(c=i(s(o),c));let a=this.loadFile(c,o,!1);if(a)try{this.json=JSON.parse(a.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return a}}}startWith(o,h){return o?o.substr(0,h.length)===h:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Li=d,d.default=d,Li}var Ti,wo;function Xs(){if(wo)return Ti;wo=1;let{nanoid:e}=fh(),{isAbsolute:t,resolve:s}=Te,{SourceMapConsumer:i,SourceMapGenerator:n}=Te,{fileURLToPath:l,pathToFileURL:m}=Te,d=gi(),u=ko(),o=Te,h=Symbol("lineToIndexCache"),c=!!(i&&n),a=!!(s&&t);function r(p){if(p[h])return p[h];let y=p.css.split(`
|
|
308
|
-
`),X=new Array(y.length),Z=0;for(let S=0,R=y.length;S<R;S++)X[S]=Z,Z+=y[S].length+1;return p[h]=X,X}class f{get from(){return this.file||this.id}constructor(y,X={}){if(y===null||typeof y>"u"||typeof y=="object"&&!y.toString)throw new Error(`PostCSS received ${y} instead of CSS string`);if(this.css=y.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,X.document&&(this.document=X.document.toString()),X.from&&(!a||/^\w+:\/\//.test(X.from)||t(X.from)?this.file=X.from:this.file=s(X.from)),a&&c){let Z=new u(this.css,X);if(Z.text){this.map=Z;let S=Z.consumer().file;!this.file&&S&&(this.file=this.mapResolve(S))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(y,X,Z,S={}){let R,b,g,G,v;if(X&&typeof X=="object"){let k=X,w=Z;if(typeof k.offset=="number"){G=k.offset;let N=this.fromOffset(G);X=N.line,Z=N.col}else X=k.line,Z=k.column,G=this.fromLineAndColumn(X,Z);if(typeof w.offset=="number"){g=w.offset;let N=this.fromOffset(g);b=N.line,R=N.col}else b=w.line,R=w.column,g=this.fromLineAndColumn(w.line,w.column)}else if(Z)G=this.fromLineAndColumn(X,Z);else{G=X;let k=this.fromOffset(G);X=k.line,Z=k.col}let V=this.origin(X,Z,b,R);return V?v=new d(y,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,S.plugin):v=new d(y,b===void 0?X:{column:Z,line:X},b===void 0?Z:{column:R,line:b},this.css,this.file,S.plugin),v.input={column:Z,endColumn:R,endLine:b,endOffset:g,line:X,offset:G,source:this.css},this.file&&(m&&(v.input.url=m(this.file).toString()),v.input.file=this.file),v}fromLineAndColumn(y,X){return r(this)[y-1]+X-1}fromOffset(y){let X=r(this),Z=X[X.length-1],S=0;if(y>=Z)S=X.length-1;else{let R=X.length-2,b;for(;S<R;)if(b=S+(R-S>>1),y<X[b])R=b-1;else if(y>=X[b+1])S=b+1;else{S=b;break}}return{col:y-X[S]+1,line:S+1}}mapResolve(y){return/^\w+:\/\//.test(y)?y:s(this.map.consumer().sourceRoot||this.map.root||".",y)}origin(y,X,Z,S){if(!this.map)return!1;let R=this.map.consumer(),b=R.originalPositionFor({column:X,line:y});if(!b.source)return!1;let g;typeof Z=="number"&&(g=R.originalPositionFor({column:S,line:Z}));let G;t(b.source)?G=m(b.source):G=new URL(b.source,this.map.consumer().sourceRoot||m(this.map.mapFile));let v={column:b.column,endColumn:g&&g.column,endLine:g&&g.line,line:b.line,url:G.toString()};if(G.protocol==="file:")if(l)v.file=l(G);else throw new Error("file: protocol is not available in this PostCSS build");let V=R.sourceContentFor(b.source);return V&&(v.source=V),v}toJSON(){let y={};for(let X of["hasBOM","css","file","id"])this[X]!=null&&(y[X]=this[X]);return this.map&&(y.map=K({},this.map),y.map.consumerCache&&(y.map.consumerCache=void 0)),y}}return
|
|
309
|
-
`," "];return e.split(t,s)},split(t,s,i){let n=[],l="",m=!1,d=0,u=!1,o="",h=!1;for(let c of t)h?h=!1:c==="\\"?h=!0:u?c===o&&(u=!1):c==='"'||c==="'"?(u=!0,o=c):c==="("?d+=1:c===")"?d>0&&(d-=1):d===0&&s.includes(c)&&(m=!0),m?(l!==""&&n.push(l.trim()),l="",m=!1):l+=c;return(i||l!=="")&&n.push(l.trim()),n}};return
|
|
307
|
+
`?(h=1,c+=1):h+=1;return{column:h,line:c,offset:f}}prev(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o-1]}rangeBy(o={}){let h="document"in this.source.input?this.source.input.document:this.source.input.css,c={column:this.source.start.column,line:this.source.start.line,offset:m(h,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:m(h,this.source.end)+1}:{column:c.column+1,line:c.line,offset:c.offset+1};if(o.word){let r=h.slice(m(h,this.source.start),m(h,this.source.end)).indexOf(o.word);r!==-1&&(c=this.positionInside(r),a=this.positionInside(r+o.word.length))}else o.start?c={column:o.start.column,line:o.start.line,offset:m(h,o.start)}:o.index&&(c=this.positionInside(o.index)),o.end?a={column:o.end.column,line:o.end.line,offset:m(h,o.end)}:typeof o.endIndex=="number"?a=this.positionInside(o.endIndex):o.index&&(a=this.positionInside(o.index+1));return(a.line<c.line||a.line===c.line&&a.column<=c.column)&&(a={column:c.column+1,line:c.line,offset:c.offset+1}),{end:a,start:c}}raw(o,h){return new t().raw(this,o,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...o){if(this.parent){let h=this,c=!1;for(let a of o)a===this?c=!0:c?(this.parent.insertAfter(h,a),h=a):this.parent.insertBefore(h,a);c||this.remove()}return this}root(){let o=this;for(;o.parent&&o.parent.type!=="document";)o=o.parent;return o}toJSON(o,h){let c={},a=h==null;h=h||new Map;let r=0;for(let f in this){if(!Object.prototype.hasOwnProperty.call(this,f)||f==="parent"||f==="proxyCache")continue;let p=this[f];if(Array.isArray(p))c[f]=p.map(y=>typeof y=="object"&&y.toJSON?y.toJSON(null,h):y);else if(typeof p=="object"&&p.toJSON)c[f]=p.toJSON(null,h);else if(f==="source"){if(p==null)continue;let y=h.get(p.input);y==null&&(y=r,h.set(p.input,r),r++),c[f]={end:p.end,inputId:y,start:p.start}}else c[f]=p}return a&&(c.inputs=[...h.keys()].map(f=>f.toJSON())),c}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(o=s){o.stringify&&(o=o.stringify);let h="";return o(this,c=>{h+=c}),h}warn(o,h,c={}){let a={node:this};for(let r in c)a[r]=c[r];return o.warn(h,a)}}return Gi=d,d.default=d,Gi}var Ri,Go;function Is(){if(Go)return Ri;Go=1;let e=Ss();class t extends e{constructor(i){super(i),this.type="comment"}}return Ri=t,t.default=t,Ri}var vi,Ro;function Vs(){if(Ro)return vi;Ro=1;let e=Ss();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(i){i&&typeof i.value<"u"&&typeof i.value!="string"&&(i=he(K({},i),{value:String(i.value)})),super(i),this.type="decl"}}return vi=t,t.default=t,vi}var Wi,vo;function et(){if(vo)return Wi;vo=1;let e=Is(),t=Vs(),s=Ss(),{isClean:i,my:n}=Xi(),l,m,d,u;function o(a){return a.map(r=>(r.nodes&&(r.nodes=o(r.nodes)),delete r.source,r))}function h(a){if(a[i]=!1,a.proxyOf.nodes)for(let r of a.proxyOf.nodes)h(r)}class c 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(...r){for(let f of r){let p=this.normalize(f,this.last);for(let y of p)this.proxyOf.nodes.push(y)}return this.markDirty(),this}cleanRaws(r){if(super.cleanRaws(r),this.nodes)for(let f of this.nodes)f.cleanRaws(r)}each(r){if(!this.proxyOf.nodes)return;let f=this.getIterator(),p,y;for(;this.indexes[f]<this.proxyOf.nodes.length&&(p=this.indexes[f],y=r(this.proxyOf.nodes[p],p),y!==!1);)this.indexes[f]+=1;return delete this.indexes[f],y}every(r){return this.nodes.every(r)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let r=this.lastEach;return this.indexes[r]=0,r}getProxyProcessor(){return{get(r,f){return f==="proxyOf"?r:r[f]?f==="each"||typeof f=="string"&&f.startsWith("walk")?(...p)=>r[f](...p.map(y=>typeof y=="function"?(X,Z)=>y(X.toProxy(),Z):y)):f==="every"||f==="some"?p=>r[f]((y,...X)=>p(y.toProxy(),...X)):f==="root"?()=>r.root().toProxy():f==="nodes"?r.nodes.map(p=>p.toProxy()):f==="first"||f==="last"?r[f].toProxy():r[f]:r[f]},set(r,f,p){return r[f]===p||(r[f]=p,(f==="name"||f==="params"||f==="selector")&&r.markDirty()),!0}}}index(r){return typeof r=="number"?r:(r.proxyOf&&(r=r.proxyOf),this.proxyOf.nodes.indexOf(r))}insertAfter(r,f){let p=this.index(r),y=this.normalize(f,this.proxyOf.nodes[p]).reverse();p=this.index(r);for(let Z of y)this.proxyOf.nodes.splice(p+1,0,Z);let X;for(let Z in this.indexes)X=this.indexes[Z],p<X&&(this.indexes[Z]=X+y.length);return this.markDirty(),this}insertBefore(r,f){let p=this.index(r),y=p===0?"prepend":!1,X=this.normalize(f,this.proxyOf.nodes[p],y).reverse();p=this.index(r);for(let S of X)this.proxyOf.nodes.splice(p,0,S);let Z;for(let S in this.indexes)Z=this.indexes[S],p<=Z&&(this.indexes[S]=Z+X.length);return this.markDirty(),this}normalize(r,f){if(typeof r=="string")r=o(m(r).nodes);else if(typeof r>"u")r=[];else if(Array.isArray(r)){r=r.slice(0);for(let p of r)p.parent&&p.parent.removeChild(p,"ignore")}else if(r.type==="root"&&this.type!=="document"){r=r.nodes.slice(0);for(let p of r)p.parent&&p.parent.removeChild(p,"ignore")}else if(r.type)r=[r];else if(r.prop){if(typeof r.value>"u")throw new Error("Value field is missed in node creation");typeof r.value!="string"&&(r.value=String(r.value)),r=[new t(r)]}else if(r.selector||r.selectors)r=[new u(r)];else if(r.name)r=[new l(r)];else if(r.text)r=[new e(r)];else throw new Error("Unknown node type in node creation");return r.map(p=>(p[n]||c.rebuild(p),p=p.proxyOf,p.parent&&p.parent.removeChild(p),p[i]&&h(p),p.raws||(p.raws={}),typeof p.raws.before>"u"&&f&&typeof f.raws.before<"u"&&(p.raws.before=f.raws.before.replace(/\S/g,"")),p.parent=this.proxyOf,p))}prepend(...r){r=r.reverse();for(let f of r){let p=this.normalize(f,this.first,"prepend").reverse();for(let y of p)this.proxyOf.nodes.unshift(y);for(let y in this.indexes)this.indexes[y]=this.indexes[y]+p.length}return this.markDirty(),this}push(r){return r.parent=this,this.proxyOf.nodes.push(r),this}removeAll(){for(let r of this.proxyOf.nodes)r.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(r){r=this.index(r),this.proxyOf.nodes[r].parent=void 0,this.proxyOf.nodes.splice(r,1);let f;for(let p in this.indexes)f=this.indexes[p],f>=r&&(this.indexes[p]=f-1);return this.markDirty(),this}replaceValues(r,f,p){return p||(p=f,f={}),this.walkDecls(y=>{f.props&&!f.props.includes(y.prop)||f.fast&&!y.value.includes(f.fast)||(y.value=y.value.replace(r,p))}),this.markDirty(),this}some(r){return this.nodes.some(r)}walk(r){return this.each((f,p)=>{let y;try{y=r(f,p)}catch(X){throw f.addToError(X)}return y!==!1&&f.walk&&(y=f.walk(r)),y})}walkAtRules(r,f){return f?r instanceof RegExp?this.walk((p,y)=>{if(p.type==="atrule"&&r.test(p.name))return f(p,y)}):this.walk((p,y)=>{if(p.type==="atrule"&&p.name===r)return f(p,y)}):(f=r,this.walk((p,y)=>{if(p.type==="atrule")return f(p,y)}))}walkComments(r){return this.walk((f,p)=>{if(f.type==="comment")return r(f,p)})}walkDecls(r,f){return f?r instanceof RegExp?this.walk((p,y)=>{if(p.type==="decl"&&r.test(p.prop))return f(p,y)}):this.walk((p,y)=>{if(p.type==="decl"&&p.prop===r)return f(p,y)}):(f=r,this.walk((p,y)=>{if(p.type==="decl")return f(p,y)}))}walkRules(r,f){return f?r instanceof RegExp?this.walk((p,y)=>{if(p.type==="rule"&&r.test(p.selector))return f(p,y)}):this.walk((p,y)=>{if(p.type==="rule"&&p.selector===r)return f(p,y)}):(f=r,this.walk((p,y)=>{if(p.type==="rule")return f(p,y)}))}}return c.registerParse=a=>{m=a},c.registerRule=a=>{u=a},c.registerAtRule=a=>{l=a},c.registerRoot=a=>{d=a},Wi=c,c.default=c,c.rebuild=a=>{a.type==="atrule"?Object.setPrototypeOf(a,l.prototype):a.type==="rule"?Object.setPrototypeOf(a,u.prototype):a.type==="decl"?Object.setPrototypeOf(a,t.prototype):a.type==="comment"?Object.setPrototypeOf(a,e.prototype):a.type==="root"&&Object.setPrototypeOf(a,d.prototype),a[n]=!0,a.nodes&&a.nodes.forEach(r=>{c.rebuild(r)})},Wi}var ki,Wo;function wi(){if(Wo)return ki;Wo=1;let e=et();class t extends e{constructor(i){super(i),this.type="atrule"}append(...i){return this.proxyOf.nodes||(this.nodes=[]),super.append(...i)}prepend(...i){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...i)}}return ki=t,t.default=t,e.registerAtRule(t),ki}var Ci,ko;function xi(){if(ko)return Ci;ko=1;let e=et(),t,s;class i extends e{constructor(l){super(K({type:"document"},l)),this.nodes||(this.nodes=[])}toResult(l={}){return new t(new s,this,l).stringify()}}return i.registerLazyResult=n=>{t=n},i.registerProcessor=n=>{s=n},Ci=i,i.default=i,Ci}var Ti,wo;function Ih(){if(wo)return Ti;wo=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Ti={nanoid:(t=21)=>{let s="",i=t|0;for(;i--;)s+=e[Math.random()*64|0];return s},customAlphabet:(t,s=21)=>(i=s)=>{let n="",l=i|0;for(;l--;)n+=t[Math.random()*t.length|0];return n}},Ti}var Li,Co;function xo(){if(Co)return Li;Co=1;let{existsSync:e,readFileSync:t}=Le,{dirname:s,join:i}=Le,{SourceMapConsumer:n,SourceMapGenerator:l}=Le;function m(u){return Buffer?Buffer.from(u,"base64").toString():window.atob(u)}class d{constructor(o,h){if(h.map===!1)return;h.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(o),this.inline=this.startWith(this.annotation,"data:");let c=h.map?h.map.prev:void 0,a=this.loadMap(h.from,c);!this.mapFile&&h.from&&(this.mapFile=h.from),this.mapFile&&(this.root=s(this.mapFile)),a&&(this.text=a)}consumer(){return this.consumerCache||(this.consumerCache=new n(this.json||this.text)),this.consumerCache}decodeInline(o){let h=/^data:application\/json;charset=utf-?8;base64,/,c=/^data:application\/json;base64,/,a=/^data:application\/json;charset=utf-?8,/,r=/^data:application\/json,/,f=o.match(a)||o.match(r);if(f)return decodeURIComponent(o.substr(f[0].length));let p=o.match(h)||o.match(c);if(p)return m(o.substr(p[0].length));let y=o.slice(22);throw y=y.slice(0,y.indexOf(",")),new Error("Unsupported source map encoding "+y)}getAnnotationURL(o){return o.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(o){return typeof o!="object"?!1:typeof o.mappings=="string"||typeof o._mappings=="string"||Array.isArray(o.sections)}loadAnnotation(o){let h=o.match(/\/\*\s*# sourceMappingURL=/g);if(!h)return;let c=o.lastIndexOf(h.pop()),a=o.indexOf("*/",c);c>-1&&a>-1&&(this.annotation=this.getAnnotationURL(o.substring(c,a)))}loadFile(o,h,c){if(!(!c&&!this.unsafeMap&&!/\.map$/i.test(o))&&(this.root=s(o),e(o)))return this.mapFile=o,t(o,"utf-8").toString().trim()}loadMap(o,h){if(h===!1)return!1;if(h){if(typeof h=="string")return h;if(typeof h=="function"){let c=h(o);if(c){let a=this.loadFile(c,o,!0);if(!a)throw new Error("Unable to load previous source map: "+c.toString());return a}}else{if(h instanceof n)return l.fromSourceMap(h).toString();if(h instanceof l)return h.toString();if(this.isMap(h))return JSON.stringify(h);throw new Error("Unsupported previous source map format: "+h.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let c=this.annotation;o&&(c=i(s(o),c));let a=this.loadFile(c,o,!1);if(a)try{this.json=JSON.parse(a.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return a}}}startWith(o,h){return o?o.substr(0,h.length)===h:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Li=d,d.default=d,Li}var Ni,To;function Xs(){if(To)return Ni;To=1;let{nanoid:e}=Ih(),{isAbsolute:t,resolve:s}=Le,{SourceMapConsumer:i,SourceMapGenerator:n}=Le,{fileURLToPath:l,pathToFileURL:m}=Le,d=Zi(),u=xo(),o=Le,h=Symbol("lineToIndexCache"),c=!!(i&&n),a=!!(s&&t);function r(p){if(p[h])return p[h];let y=p.css.split(`
|
|
308
|
+
`),X=new Array(y.length),Z=0;for(let S=0,R=y.length;S<R;S++)X[S]=Z,Z+=y[S].length+1;return p[h]=X,X}class f{get from(){return this.file||this.id}constructor(y,X={}){if(y===null||typeof y>"u"||typeof y=="object"&&!y.toString)throw new Error(`PostCSS received ${y} instead of CSS string`);if(this.css=y.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,X.document&&(this.document=X.document.toString()),X.from&&(!a||/^\w+:\/\//.test(X.from)||t(X.from)?this.file=X.from:this.file=s(X.from)),a&&c){let Z=new u(this.css,X);if(Z.text){this.map=Z;let S=Z.consumer().file;!this.file&&S&&(this.file=this.mapResolve(S))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(y,X,Z,S={}){let R,b,g,G,v;if(X&&typeof X=="object"){let k=X,w=Z;if(typeof k.offset=="number"){G=k.offset;let N=this.fromOffset(G);X=N.line,Z=N.col}else X=k.line,Z=k.column,G=this.fromLineAndColumn(X,Z);if(typeof w.offset=="number"){g=w.offset;let N=this.fromOffset(g);b=N.line,R=N.col}else b=w.line,R=w.column,g=this.fromLineAndColumn(w.line,w.column)}else if(Z)G=this.fromLineAndColumn(X,Z);else{G=X;let k=this.fromOffset(G);X=k.line,Z=k.col}let V=this.origin(X,Z,b,R);return V?v=new d(y,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,S.plugin):v=new d(y,b===void 0?X:{column:Z,line:X},b===void 0?Z:{column:R,line:b},this.css,this.file,S.plugin),v.input={column:Z,endColumn:R,endLine:b,endOffset:g,line:X,offset:G,source:this.css},this.file&&(m&&(v.input.url=m(this.file).toString()),v.input.file=this.file),v}fromLineAndColumn(y,X){return r(this)[y-1]+X-1}fromOffset(y){let X=r(this),Z=X[X.length-1],S=0;if(y>=Z)S=X.length-1;else{let R=X.length-2,b;for(;S<R;)if(b=S+(R-S>>1),y<X[b])R=b-1;else if(y>=X[b+1])S=b+1;else{S=b;break}}return{col:y-X[S]+1,line:S+1}}mapResolve(y){return/^\w+:\/\//.test(y)?y:s(this.map.consumer().sourceRoot||this.map.root||".",y)}origin(y,X,Z,S){if(!this.map)return!1;let R=this.map.consumer(),b=R.originalPositionFor({column:X,line:y});if(!b.source)return!1;let g;typeof Z=="number"&&(g=R.originalPositionFor({column:S,line:Z}));let G;t(b.source)?G=m(b.source):G=new URL(b.source,this.map.consumer().sourceRoot||m(this.map.mapFile));let v={column:b.column,endColumn:g&&g.column,endLine:g&&g.line,line:b.line,url:G.toString()};if(G.protocol==="file:")if(l)v.file=l(G);else throw new Error("file: protocol is not available in this PostCSS build");let V=R.sourceContentFor(b.source);return V&&(v.source=V),v}toJSON(){let y={};for(let X of["hasBOM","css","file","id"])this[X]!=null&&(y[X]=this[X]);return this.map&&(y.map=K({},this.map),y.map.consumerCache&&(y.map.consumerCache=void 0)),y}}return Ni=f,f.default=f,o&&o.registerInput&&o.registerInput(f),Ni}var Ji,Lo;function Lt(){if(Lo)return Ji;Lo=1;let e=et(),t,s;class i extends e{constructor(l){super(l),this.type="root",this.nodes||(this.nodes=[])}normalize(l,m,d){let u=super.normalize(l);if(m){if(d==="prepend")this.nodes.length>1?m.raws.before=this.nodes[1].raws.before:delete m.raws.before;else if(this.first!==m)for(let o of u)o.raws.before=m.raws.before}return u}removeChild(l,m){let d=this.index(l);return!m&&d===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[d].raws.before),super.removeChild(l)}toResult(l={}){return new t(new s,this,l).stringify()}}return i.registerLazyResult=n=>{t=n},i.registerProcessor=n=>{s=n},Ji=i,i.default=i,e.registerRoot(i),Ji}var Yi,No;function Jo(){if(No)return Yi;No=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let s=[" ",`
|
|
309
|
+
`," "];return e.split(t,s)},split(t,s,i){let n=[],l="",m=!1,d=0,u=!1,o="",h=!1;for(let c of t)h?h=!1:c==="\\"?h=!0:u?c===o&&(u=!1):c==='"'||c==="'"?(u=!0,o=c):c==="("?d+=1:c===")"?d>0&&(d-=1):d===0&&s.includes(c)&&(m=!0),m?(l!==""&&n.push(l.trim()),l="",m=!1):l+=c;return(i||l!=="")&&n.push(l.trim()),n}};return Yi=e,e.default=e,Yi}var Ui,Yo;function Fi(){if(Yo)return Ui;Yo=1;let e=et(),t=Jo();class s extends e{get selectors(){return t.comma(this.selector)}set selectors(n){let l=this.selector?this.selector.match(/,\s*/):null,m=l?l[0]:","+this.raw("between","beforeOpen");this.selector=n.join(m)}constructor(n){super(n),this.type="rule",this.nodes||(this.nodes=[])}}return Ui=s,s.default=s,e.registerRule(s),Ui}var Mi,Uo;function Vh(){if(Uo)return Mi;Uo=1;let e=wi(),t=Is(),s=Vs(),i=Xs(),n=xo(),l=Lt(),m=Fi();function d(u,o){if(Array.isArray(u))return u.map(r=>d(r));let h=u,{inputs:c}=h,a=mt(h,["inputs"]);if(c){o=[];for(let r of c){let f=he(K({},r),{__proto__:i.prototype});f.map&&(f.map=he(K({},f.map),{__proto__:n.prototype})),o.push(f)}}if(a.nodes&&(a.nodes=u.nodes.map(r=>d(r,o))),a.source){let r=a.source,{inputId:f}=r,p=mt(r,["inputId"]);a.source=p,f!=null&&(a.source.input=o[f])}if(a.type==="root")return new l(a);if(a.type==="decl")return new s(a);if(a.type==="rule")return new m(a);if(a.type==="comment")return new t(a);if(a.type==="atrule")return new e(a);throw new Error("Unknown node type: "+u.type)}return Mi=d,d.default=d,Mi}var Ki,Fo;function Mo(){if(Fo)return Ki;Fo=1;let{dirname:e,relative:t,resolve:s,sep:i}=Le,{SourceMapConsumer:n,SourceMapGenerator:l}=Le,{pathToFileURL:m}=Le,d=Xs(),u=!!(n&&l),o=!!(e&&s&&t&&i);class h{constructor(a,r,f,p){this.stringify=a,this.mapOpts=f.map||{},this.root=r,this.opts=f,this.css=p,this.originalCSS=p,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 r=`
|
|
310
310
|
`;this.css.includes(`\r
|
|
311
311
|
`)&&(r=`\r
|
|
312
312
|
`),this.css+=r+"/*# sourceMappingURL="+a+" */"}applyPrevMaps(){for(let a of this.previous()){let r=this.toUrl(this.path(a.file)),f=a.root||e(a.file),p;this.mapOpts.sourcesContent===!1?(p=new n(a.text),p.sourcesContent&&(p.sourcesContent=null)):p=a.consumer(),this.map.applySourceMap(p,r,this.toUrl(this.path(f)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let a;for(let r=this.root.nodes.length-1;r>=0;r--)a=this.root.nodes[r],a.type==="comment"&&a.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(r)}else if(this.css){let a;for(;(a=this.css.lastIndexOf("/*#"))!==-1;){let r=this.css.indexOf("*/",a+3);if(r===-1)break;for(;a>0&&this.css[a-1]===`
|
|
313
313
|
`;)a--;this.css=this.css.slice(0,a)+this.css.slice(r+2)}}}}generate(){if(this.clearAnnotation(),o&&u&&this.isMap())return this.generateMap();{let a="";return this.stringify(this.root,r=>{a+=r}),[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,r=1,f="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},y,X;this.stringify(this.root,(Z,S,R)=>{if(this.css+=Z,S&&R!=="end"&&(p.generated.line=a,p.generated.column=r-1,S.source&&S.source.start?(p.source=this.sourcePath(S),p.original.line=S.source.start.line,p.original.column=S.source.start.column-1,this.map.addMapping(p)):(p.source=f,p.original.line=1,p.original.column=0,this.map.addMapping(p))),X=Z.match(/\n/g),X?(a+=X.length,y=Z.lastIndexOf(`
|
|
314
|
-
`),r=Z.length-y):r+=Z.length,S&&R!=="start"){let b=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==b.last||b.raws.semicolon)&&(S.source&&S.source.end?(p.source=this.sourcePath(S),p.original.line=S.source.end.line,p.original.column=S.source.end.column-1,p.generated.line=a,p.generated.column=r-2,this.map.addMapping(p)):(p.source=f,p.original.line=1,p.original.column=0,p.generated.line=a,p.generated.column=r-1,this.map.addMapping(p)))}})}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(r=>r.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 r=this.memoizedPaths.get(a);if(r)return r;let f=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(f=e(s(f,this.mapOpts.annotation)));let p=t(f,a);return this.memoizedPaths.set(a,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(a=>{if(a.source&&a.source.input.map){let r=a.source.input.map;this.previousMaps.includes(r)||this.previousMaps.push(r)}});else{let a=new d(this.originalCSS,this.opts);a.map&&this.previousMaps.push(a.map)}return this.previousMaps}setSourcesContent(){let a={};if(this.root)this.root.walk(r=>{if(r.source){let f=r.source.input.from;if(f&&!a[f]){a[f]=!0;let p=this.usesFileUrls?this.toFileUrl(f):this.toUrl(this.path(f));this.map.setSourceContent(p,r.source.input.css)}}});else if(this.css){let r=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(r,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 r=this.memoizedFileURLs.get(a);if(r)return r;if(m){let f=m(a).toString();return this.memoizedFileURLs.set(a,f),f}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(a){let r=this.memoizedURLs.get(a);if(r)return r;i==="\\"&&(a=a.replace(/\\/g,"/"));let f=encodeURI(a).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(a,f),f}}return Mi=h,Mi}var Ki,Uo;function yh(){if(Uo)return Ki;Uo=1;const e=39,t=34,s=92,i=47,n=10,l=32,m=12,d=9,u=13,o=91,h=93,c=40,a=41,r=123,f=125,p=59,y=42,X=58,Z=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,R=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,b=/.[\r\n"'(/\\]/,g=/[\da-f]/i;return Ki=function(G,v={}){let V=G.css.valueOf(),k=v.ignoreErrors,w,N,z,I,W,L,U,F,J,D,E=V.length,x=0,se=[],ne=[],ee=-1;function ve(){return x}function Ie(ie){throw G.error("Unclosed "+ie,x)}function Me(){return ne.length===0&&x>=E}function Ae(ie){if(ne.length)return ne.pop();if(x>=E)return;let de=ie?ie.ignoreUnclosed:!1;switch(w=V.charCodeAt(x),w){case n:case l:case d:case u:case m:{I=x;do I+=1,w=V.charCodeAt(I);while(w===l||w===n||w===d||w===u||w===m);L=["space",V.slice(x,I)],x=I-1;break}case o:case h:case r:case f:case X:case p:case a:{let We=String.fromCharCode(w);L=[We,We,x];break}case c:{if(D=se.length?se.pop()[1]:"",J=V.charCodeAt(x+1),D==="url"&&J!==e&&J!==t&&J!==l&&J!==n&&J!==d&&J!==m&&J!==u){I=x;do{if(U=!1,I=V.indexOf(")",I+1),I===-1)if(k||de){I=x;break}else Ie("bracket");for(F=I;V.charCodeAt(F-1)===s;)F-=1,U=!U}while(U);L=["brackets",V.slice(x,I+1),x,I],x=I}else x<=ee?L=["(","(",x]:(I=V.indexOf(")",x+1),N=V.slice(x,I+1),I===-1||b.test(N)?(ee=I===-1?E:I,L=["(","(",x]):(L=["brackets",N,x,I],x=I));break}case e:case t:{W=w===e?"'":'"',I=x;do{if(U=!1,I=V.indexOf(W,I+1),I===-1)if(k||de){I=x+1;break}else Ie("string");for(F=I;V.charCodeAt(F-1)===s;)F-=1,U=!U}while(U);L=["string",V.slice(x,I+1),x,I],x=I;break}case Z:{S.lastIndex=x+1,S.test(V),S.lastIndex===0?I=V.length-1:I=S.lastIndex-2,L=["at-word",V.slice(x,I+1),x,I],x=I;break}case s:{for(I=x,z=!0;V.charCodeAt(I+1)===s;)I+=1,z=!z;if(w=V.charCodeAt(I+1),z&&w!==i&&w!==l&&w!==n&&w!==d&&w!==u&&w!==m&&(I+=1,g.test(V.charAt(I)))){for(;g.test(V.charAt(I+1));)I+=1;V.charCodeAt(I+1)===l&&(I+=1)}L=["word",V.slice(x,I+1),x,I],x=I;break}default:{w===i&&V.charCodeAt(x+1)===y?(I=V.indexOf("*/",x+2)+1,I===0&&(k||de?I=V.length:Ie("comment")),L=["comment",V.slice(x,I+1),x,I],x=I):(R.lastIndex=x+1,R.test(V),R.lastIndex===0?I=V.length-1:I=R.lastIndex-2,L=["word",V.slice(x,I+1),x,I],se.push(L),x=I);break}}return x++,L}function _e(ie){ne.push(ie)}return{back:_e,endOfFile:Me,nextToken:Ae,position:ve}},Ki}var Oi,Fo;function gh(){if(Fo)return Oi;Fo=1;let e=ki(),t=Is(),s=Vs(),i=Tt(),n=Ui(),l=yh();const m={empty:!0,space:!0};function d(h){for(let c=h.length-1;c>=0;c--){let a=h[c],r=a[3]||a[2];if(r)return r}}function u(h,c,a){let r="";for(let f=c;f<a;f++)r+=h[f][1];return r}class o{constructor(c){this.input=c,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:c,start:{column:1,line:1,offset:0}}}atrule(c){let a=new e;a.name=c[1].slice(1),a.name===""&&this.unnamedAtrule(a,c),this.init(a,c[2]);let r,f,p,y=!1,X=!1,Z=[],S=[];for(;!this.tokenizer.endOfFile();){if(c=this.tokenizer.nextToken(),r=c[0],r==="("||r==="["?S.push(r==="("?")":"]"):r==="{"&&S.length>0?S.push("}"):r===S[S.length-1]&&S.pop(),S.length===0)if(r===";"){a.source.end=this.getPosition(c[2]),a.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){X=!0;break}else if(r==="}"){if(Z.length>0){for(p=Z.length-1,f=Z[p];f&&f[0]==="space";)f=Z[--p];f&&(a.source.end=this.getPosition(f[3]||f[2]),a.source.end.offset++)}this.end(c);break}else Z.push(c);else Z.push(c);if(this.tokenizer.endOfFile()){y=!0;break}}a.raws.between=this.spacesAndCommentsFromEnd(Z),Z.length?(a.raws.afterName=this.spacesAndCommentsFromStart(Z),this.raw(a,"params",Z),y&&(c=Z[Z.length-1],a.source.end=this.getPosition(c[3]||c[2]),a.source.end.offset++,this.spaces=a.raws.between,a.raws.between="")):(a.raws.afterName="",a.params=""),X&&(a.nodes=[],this.current=a)}checkMissedSemicolon(c){let a=this.colon(c);if(a===!1)return;let r=0,f;for(let p=a-1;p>=0&&(f=c[p],!(f[0]!=="space"&&(r+=1,r===2)));p--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(c){let a=0,r,f,p;for(let[y,X]of c.entries()){if(f=X,p=f[0],p==="("&&(a+=1),p===")"&&(a-=1),a===0&&p===":")if(!r)this.doubleColon(f);else{if(r[0]==="word"&&r[1]==="progid")continue;return y}r=f}return!1}comment(c){let a=new t;this.init(a,c[2]),a.source.end=this.getPosition(c[3]||c[2]),a.source.end.offset++;let r=c[1].slice(2,-2);if(!r.trim())a.text="",a.raws.left=r,a.raws.right="";else{let f=r.match(/^(\s*)([^]*\S)(\s*)$/);a.text=f[2],a.raws.left=f[1],a.raws.right=f[3]}}createTokenizer(){this.tokenizer=l(this.input)}decl(c,a){let r=new s;this.init(r,c[0][2]);let f=c[c.length-1];f[0]===";"&&(this.semicolon=!0,c.pop()),r.source.end=this.getPosition(f[3]||f[2]||d(c)),r.source.end.offset++;let p=0;for(;c[p][0]!=="word";)p===c.length-1&&this.unknownWord([c[p]]),p++;r.raws.before+=u(c,0,p),r.source.start=this.getPosition(c[p][2]);let y=p;for(;p<c.length;){let b=c[p][0];if(b===":"||b==="space"||b==="comment")break;p++}r.prop=u(c,y,p);let X=p,Z;for(;p<c.length&&(Z=c[p],p++,Z[0]!==":");)Z[0]==="word"&&/\w/.test(Z[1])&&this.unknownWord([Z]);r.raws.between=u(c,X,p),(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let S=p;for(;p<c.length;){let b=c[p][0];if(b!=="space"&&b!=="comment")break;p++}let R=c.slice(S,p);c=c.slice(p),this.precheckMissedSemicolon(c);for(let b=c.length-1;b>=0;b--){if(Z=c[b],Z[1].toLowerCase()==="!important"){r.important=!0;let g=this.stringFrom(c,b);g=this.spacesFromEnd(c)+g,g!==" !important"&&(r.raws.important=g);break}else if(Z[1].toLowerCase()==="important"){let g=c.slice(0),G="";for(let v=b;v>0;v--){let V=g[v][0];if(G.trim().startsWith("!")&&V!=="space")break;G=g.pop()[1]+G}G.trim().startsWith("!")&&(r.important=!0,r.raws.important=G,c=g)}if(Z[0]!=="space"&&Z[0]!=="comment")break}c.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(r.raws.between+=R.map(b=>b[1]).join(""),R=[]),this.raw(r,"value",R.concat(c),a),r.value.includes(":")&&!a&&this.checkMissedSemicolon(c)}doubleColon(c){throw this.input.error("Double colon",{offset:c[2]},{offset:c[2]+c[1].length})}emptyRule(c){let a=new n;this.init(a,c[2]),a.selector="",a.raws.between="",this.current=a}end(c){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(c[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(c)}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(c){if(this.spaces+=c[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(c[2]),a.source.end.offset+=a.raws.ownSemicolon.length)}}getPosition(c){let a=this.input.fromOffset(c);return{column:a.col,line:a.line,offset:c}}init(c,a){this.current.push(c),c.source={input:this.input,start:this.getPosition(a)},c.raws.before=this.spaces,this.spaces="",c.type!=="comment"&&(this.semicolon=!1)}other(c){let a=!1,r=null,f=!1,p=null,y=[],X=c[1].startsWith("--"),Z=[],S=c;for(;S;){if(r=S[0],Z.push(S),r==="("||r==="[")p||(p=S),y.push(r==="("?")":"]");else if(X&&f&&r==="{")p||(p=S),y.push("}");else if(y.length===0)if(r===";")if(f){this.decl(Z,X);return}else break;else if(r==="{"){this.rule(Z);return}else if(r==="}"){this.tokenizer.back(Z.pop()),a=!0;break}else r===":"&&(f=!0);else r===y[y.length-1]&&(y.pop(),y.length===0&&(p=null));S=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(a=!0),y.length>0&&this.unclosedBracket(p),a&&f){if(!X)for(;Z.length&&(S=Z[Z.length-1][0],!(S!=="space"&&S!=="comment"));)this.tokenizer.back(Z.pop());this.decl(Z,X)}else this.unknownWord(Z)}parse(){let c;for(;!this.tokenizer.endOfFile();)switch(c=this.tokenizer.nextToken(),c[0]){case"space":this.spaces+=c[1];break;case";":this.freeSemicolon(c);break;case"}":this.end(c);break;case"comment":this.comment(c);break;case"at-word":this.atrule(c);break;case"{":this.emptyRule(c);break;default:this.other(c);break}this.endFile()}precheckMissedSemicolon(){}raw(c,a,r,f){let p,y,X=r.length,Z="",S=!0,R,b;for(let g=0;g<X;g+=1)p=r[g],y=p[0],y==="space"&&g===X-1&&!f?S=!1:y==="comment"?(b=r[g-1]?r[g-1][0]:"empty",R=r[g+1]?r[g+1][0]:"empty",!m[b]&&!m[R]?Z.slice(-1)===","?S=!1:Z+=p[1]:S=!1):Z+=p[1];if(!S){let g=r.reduce((G,v)=>G+v[1],"");c.raws[a]={raw:g,value:Z}}c[a]=Z}rule(c){c.pop();let a=new n;this.init(a,c[0][2]),a.raws.between=this.spacesAndCommentsFromEnd(c),this.raw(a,"selector",c),this.current=a}spacesAndCommentsFromEnd(c){let a,r="";for(;c.length&&(a=c[c.length-1][0],!(a!=="space"&&a!=="comment"));)r=c.pop()[1]+r;return r}spacesAndCommentsFromStart(c){let a,r="";for(;c.length&&(a=c[0][0],!(a!=="space"&&a!=="comment"));)r+=c.shift()[1];return r}spacesFromEnd(c){let a,r="";for(;c.length&&(a=c[c.length-1][0],a==="space");)r=c.pop()[1]+r;return r}stringFrom(c,a){let r="";for(let f=a;f<c.length;f++)r+=c[f][1];return c.splice(a,c.length-a),r}unclosedBlock(){let c=this.current.source.start;throw this.input.error("Unclosed block",c.line,c.column)}unclosedBracket(c){throw this.input.error("Unclosed bracket",{offset:c[2]},{offset:c[2]+1})}unexpectedClose(c){throw this.input.error("Unexpected }",{offset:c[2]},{offset:c[2]+1})}unknownWord(c){throw this.input.error("Unknown word "+c[0][1],{offset:c[0][2]},{offset:c[0][2]+c[0][1].length})}unnamedAtrule(c,a){throw this.input.error("At-rule without name",{offset:a[2]},{offset:a[2]+a[1].length})}}return Oi=o,Oi}var Ei,Mo;function zi(){if(Mo)return Ei;Mo=1;let e=et(),t=Xs(),s=gh();function i(n,l){let m=new t(n,l),d=new s(m);try{d.parse()}catch(u){throw process.env.NODE_ENV!=="production"&&u.name==="CssSyntaxError"&&l&&l.from&&(/\.scss$/i.test(l.from)?u.message+=`
|
|
314
|
+
`),r=Z.length-y):r+=Z.length,S&&R!=="start"){let b=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==b.last||b.raws.semicolon)&&(S.source&&S.source.end?(p.source=this.sourcePath(S),p.original.line=S.source.end.line,p.original.column=S.source.end.column-1,p.generated.line=a,p.generated.column=r-2,this.map.addMapping(p)):(p.source=f,p.original.line=1,p.original.column=0,p.generated.line=a,p.generated.column=r-1,this.map.addMapping(p)))}})}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(r=>r.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 r=this.memoizedPaths.get(a);if(r)return r;let f=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(f=e(s(f,this.mapOpts.annotation)));let p=t(f,a);return this.memoizedPaths.set(a,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(a=>{if(a.source&&a.source.input.map){let r=a.source.input.map;this.previousMaps.includes(r)||this.previousMaps.push(r)}});else{let a=new d(this.originalCSS,this.opts);a.map&&this.previousMaps.push(a.map)}return this.previousMaps}setSourcesContent(){let a={};if(this.root)this.root.walk(r=>{if(r.source){let f=r.source.input.from;if(f&&!a[f]){a[f]=!0;let p=this.usesFileUrls?this.toFileUrl(f):this.toUrl(this.path(f));this.map.setSourceContent(p,r.source.input.css)}}});else if(this.css){let r=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(r,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 r=this.memoizedFileURLs.get(a);if(r)return r;if(m){let f=m(a).toString();return this.memoizedFileURLs.set(a,f),f}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(a){let r=this.memoizedURLs.get(a);if(r)return r;i==="\\"&&(a=a.replace(/\\/g,"/"));let f=encodeURI(a).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(a,f),f}}return Ki=h,Ki}var Oi,Ko;function Xh(){if(Ko)return Oi;Ko=1;const e=39,t=34,s=92,i=47,n=10,l=32,m=12,d=9,u=13,o=91,h=93,c=40,a=41,r=123,f=125,p=59,y=42,X=58,Z=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,R=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,b=/.[\r\n"'(/\\]/,g=/[\da-f]/i;return Oi=function(G,v={}){let V=G.css.valueOf(),k=v.ignoreErrors,w,N,z,I,W,T,U,F,J,D,O=V.length,x=0,se=[],ne=[],ee=-1;function ve(){return x}function Ie(ie){throw G.error("Unclosed "+ie,x)}function Me(){return ne.length===0&&x>=O}function Ae(ie){if(ne.length)return ne.pop();if(x>=O)return;let de=ie?ie.ignoreUnclosed:!1;switch(w=V.charCodeAt(x),w){case n:case l:case d:case u:case m:{I=x;do I+=1,w=V.charCodeAt(I);while(w===l||w===n||w===d||w===u||w===m);T=["space",V.slice(x,I)],x=I-1;break}case o:case h:case r:case f:case X:case p:case a:{let We=String.fromCharCode(w);T=[We,We,x];break}case c:{if(D=se.length?se.pop()[1]:"",J=V.charCodeAt(x+1),D==="url"&&J!==e&&J!==t&&J!==l&&J!==n&&J!==d&&J!==m&&J!==u){I=x;do{if(U=!1,I=V.indexOf(")",I+1),I===-1)if(k||de){I=x;break}else Ie("bracket");for(F=I;V.charCodeAt(F-1)===s;)F-=1,U=!U}while(U);T=["brackets",V.slice(x,I+1),x,I],x=I}else x<=ee?T=["(","(",x]:(I=V.indexOf(")",x+1),N=V.slice(x,I+1),I===-1||b.test(N)?(ee=I===-1?O:I,T=["(","(",x]):(T=["brackets",N,x,I],x=I));break}case e:case t:{W=w===e?"'":'"',I=x;do{if(U=!1,I=V.indexOf(W,I+1),I===-1)if(k||de){I=x+1;break}else Ie("string");for(F=I;V.charCodeAt(F-1)===s;)F-=1,U=!U}while(U);T=["string",V.slice(x,I+1),x,I],x=I;break}case Z:{S.lastIndex=x+1,S.test(V),S.lastIndex===0?I=V.length-1:I=S.lastIndex-2,T=["at-word",V.slice(x,I+1),x,I],x=I;break}case s:{for(I=x,z=!0;V.charCodeAt(I+1)===s;)I+=1,z=!z;if(w=V.charCodeAt(I+1),z&&w!==i&&w!==l&&w!==n&&w!==d&&w!==u&&w!==m&&(I+=1,g.test(V.charAt(I)))){for(;g.test(V.charAt(I+1));)I+=1;V.charCodeAt(I+1)===l&&(I+=1)}T=["word",V.slice(x,I+1),x,I],x=I;break}default:{w===i&&V.charCodeAt(x+1)===y?(I=V.indexOf("*/",x+2)+1,I===0&&(k||de?I=V.length:Ie("comment")),T=["comment",V.slice(x,I+1),x,I],x=I):(R.lastIndex=x+1,R.test(V),R.lastIndex===0?I=V.length-1:I=R.lastIndex-2,T=["word",V.slice(x,I+1),x,I],se.push(T),x=I);break}}return x++,T}function _e(ie){ne.push(ie)}return{back:_e,endOfFile:Me,nextToken:Ae,position:ve}},Oi}var Ei,Oo;function Gh(){if(Oo)return Ei;Oo=1;let e=wi(),t=Is(),s=Vs(),i=Lt(),n=Fi(),l=Xh();const m={empty:!0,space:!0};function d(h){for(let c=h.length-1;c>=0;c--){let a=h[c],r=a[3]||a[2];if(r)return r}}function u(h,c,a){let r="";for(let f=c;f<a;f++)r+=h[f][1];return r}class o{constructor(c){this.input=c,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:c,start:{column:1,line:1,offset:0}}}atrule(c){let a=new e;a.name=c[1].slice(1),a.name===""&&this.unnamedAtrule(a,c),this.init(a,c[2]);let r,f,p,y=!1,X=!1,Z=[],S=[];for(;!this.tokenizer.endOfFile();){if(c=this.tokenizer.nextToken(),r=c[0],r==="("||r==="["?S.push(r==="("?")":"]"):r==="{"&&S.length>0?S.push("}"):r===S[S.length-1]&&S.pop(),S.length===0)if(r===";"){a.source.end=this.getPosition(c[2]),a.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){X=!0;break}else if(r==="}"){if(Z.length>0){for(p=Z.length-1,f=Z[p];f&&f[0]==="space";)f=Z[--p];f&&(a.source.end=this.getPosition(f[3]||f[2]),a.source.end.offset++)}this.end(c);break}else Z.push(c);else Z.push(c);if(this.tokenizer.endOfFile()){y=!0;break}}a.raws.between=this.spacesAndCommentsFromEnd(Z),Z.length?(a.raws.afterName=this.spacesAndCommentsFromStart(Z),this.raw(a,"params",Z),y&&(c=Z[Z.length-1],a.source.end=this.getPosition(c[3]||c[2]),a.source.end.offset++,this.spaces=a.raws.between,a.raws.between="")):(a.raws.afterName="",a.params=""),X&&(a.nodes=[],this.current=a)}checkMissedSemicolon(c){let a=this.colon(c);if(a===!1)return;let r=0,f;for(let p=a-1;p>=0&&(f=c[p],!(f[0]!=="space"&&(r+=1,r===2)));p--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(c){let a=0,r,f,p;for(let[y,X]of c.entries()){if(f=X,p=f[0],p==="("&&(a+=1),p===")"&&(a-=1),a===0&&p===":")if(!r)this.doubleColon(f);else{if(r[0]==="word"&&r[1]==="progid")continue;return y}r=f}return!1}comment(c){let a=new t;this.init(a,c[2]),a.source.end=this.getPosition(c[3]||c[2]),a.source.end.offset++;let r=c[1].slice(2,-2);if(!r.trim())a.text="",a.raws.left=r,a.raws.right="";else{let f=r.match(/^(\s*)([^]*\S)(\s*)$/);a.text=f[2],a.raws.left=f[1],a.raws.right=f[3]}}createTokenizer(){this.tokenizer=l(this.input)}decl(c,a){let r=new s;this.init(r,c[0][2]);let f=c[c.length-1];f[0]===";"&&(this.semicolon=!0,c.pop()),r.source.end=this.getPosition(f[3]||f[2]||d(c)),r.source.end.offset++;let p=0;for(;c[p][0]!=="word";)p===c.length-1&&this.unknownWord([c[p]]),p++;r.raws.before+=u(c,0,p),r.source.start=this.getPosition(c[p][2]);let y=p;for(;p<c.length;){let b=c[p][0];if(b===":"||b==="space"||b==="comment")break;p++}r.prop=u(c,y,p);let X=p,Z;for(;p<c.length&&(Z=c[p],p++,Z[0]!==":");)Z[0]==="word"&&/\w/.test(Z[1])&&this.unknownWord([Z]);r.raws.between=u(c,X,p),(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let S=p;for(;p<c.length;){let b=c[p][0];if(b!=="space"&&b!=="comment")break;p++}let R=c.slice(S,p);c=c.slice(p),this.precheckMissedSemicolon(c);for(let b=c.length-1;b>=0;b--){if(Z=c[b],Z[1].toLowerCase()==="!important"){r.important=!0;let g=this.stringFrom(c,b);g=this.spacesFromEnd(c)+g,g!==" !important"&&(r.raws.important=g);break}else if(Z[1].toLowerCase()==="important"){let g=c.slice(0),G="";for(let v=b;v>0;v--){let V=g[v][0];if(G.trim().startsWith("!")&&V!=="space")break;G=g.pop()[1]+G}G.trim().startsWith("!")&&(r.important=!0,r.raws.important=G,c=g)}if(Z[0]!=="space"&&Z[0]!=="comment")break}c.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(r.raws.between+=R.map(b=>b[1]).join(""),R=[]),this.raw(r,"value",R.concat(c),a),r.value.includes(":")&&!a&&this.checkMissedSemicolon(c)}doubleColon(c){throw this.input.error("Double colon",{offset:c[2]},{offset:c[2]+c[1].length})}emptyRule(c){let a=new n;this.init(a,c[2]),a.selector="",a.raws.between="",this.current=a}end(c){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(c[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(c)}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(c){if(this.spaces+=c[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(c[2]),a.source.end.offset+=a.raws.ownSemicolon.length)}}getPosition(c){let a=this.input.fromOffset(c);return{column:a.col,line:a.line,offset:c}}init(c,a){this.current.push(c),c.source={input:this.input,start:this.getPosition(a)},c.raws.before=this.spaces,this.spaces="",c.type!=="comment"&&(this.semicolon=!1)}other(c){let a=!1,r=null,f=!1,p=null,y=[],X=c[1].startsWith("--"),Z=[],S=c;for(;S;){if(r=S[0],Z.push(S),r==="("||r==="[")p||(p=S),y.push(r==="("?")":"]");else if(X&&f&&r==="{")p||(p=S),y.push("}");else if(y.length===0)if(r===";")if(f){this.decl(Z,X);return}else break;else if(r==="{"){this.rule(Z);return}else if(r==="}"){this.tokenizer.back(Z.pop()),a=!0;break}else r===":"&&(f=!0);else r===y[y.length-1]&&(y.pop(),y.length===0&&(p=null));S=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(a=!0),y.length>0&&this.unclosedBracket(p),a&&f){if(!X)for(;Z.length&&(S=Z[Z.length-1][0],!(S!=="space"&&S!=="comment"));)this.tokenizer.back(Z.pop());this.decl(Z,X)}else this.unknownWord(Z)}parse(){let c;for(;!this.tokenizer.endOfFile();)switch(c=this.tokenizer.nextToken(),c[0]){case"space":this.spaces+=c[1];break;case";":this.freeSemicolon(c);break;case"}":this.end(c);break;case"comment":this.comment(c);break;case"at-word":this.atrule(c);break;case"{":this.emptyRule(c);break;default:this.other(c);break}this.endFile()}precheckMissedSemicolon(){}raw(c,a,r,f){let p,y,X=r.length,Z="",S=!0,R,b;for(let g=0;g<X;g+=1)p=r[g],y=p[0],y==="space"&&g===X-1&&!f?S=!1:y==="comment"?(b=r[g-1]?r[g-1][0]:"empty",R=r[g+1]?r[g+1][0]:"empty",!m[b]&&!m[R]?Z.slice(-1)===","?S=!1:Z+=p[1]:S=!1):Z+=p[1];if(!S){let g=r.reduce((G,v)=>G+v[1],"");c.raws[a]={raw:g,value:Z}}c[a]=Z}rule(c){c.pop();let a=new n;this.init(a,c[0][2]),a.raws.between=this.spacesAndCommentsFromEnd(c),this.raw(a,"selector",c),this.current=a}spacesAndCommentsFromEnd(c){let a,r="";for(;c.length&&(a=c[c.length-1][0],!(a!=="space"&&a!=="comment"));)r=c.pop()[1]+r;return r}spacesAndCommentsFromStart(c){let a,r="";for(;c.length&&(a=c[0][0],!(a!=="space"&&a!=="comment"));)r+=c.shift()[1];return r}spacesFromEnd(c){let a,r="";for(;c.length&&(a=c[c.length-1][0],a==="space");)r=c.pop()[1]+r;return r}stringFrom(c,a){let r="";for(let f=a;f<c.length;f++)r+=c[f][1];return c.splice(a,c.length-a),r}unclosedBlock(){let c=this.current.source.start;throw this.input.error("Unclosed block",c.line,c.column)}unclosedBracket(c){throw this.input.error("Unclosed bracket",{offset:c[2]},{offset:c[2]+1})}unexpectedClose(c){throw this.input.error("Unexpected }",{offset:c[2]},{offset:c[2]+1})}unknownWord(c){throw this.input.error("Unknown word "+c[0][1],{offset:c[0][2]},{offset:c[0][2]+c[0][1].length})}unnamedAtrule(c,a){throw this.input.error("At-rule without name",{offset:a[2]},{offset:a[2]+a[1].length})}}return Ei=o,Ei}var zi,Eo;function Hi(){if(Eo)return zi;Eo=1;let e=et(),t=Xs(),s=Gh();function i(n,l){let m=new t(n,l),d=new s(m);try{d.parse()}catch(u){throw process.env.NODE_ENV!=="production"&&u.name==="CssSyntaxError"&&l&&l.from&&(/\.scss$/i.test(l.from)?u.message+=`
|
|
315
315
|
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(l.from)?u.message+=`
|
|
316
316
|
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(l.from)&&(u.message+=`
|
|
317
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),u}return d.root}return Ei=i,i.default=i,e.registerParse(i),Ei}var Hi,Ko;function Oo(){if(Ko)return Hi;Ko=1;class e{constructor(s,i={}){if(this.type="warning",this.text=s,i.node&&i.node.source){let n=i.node.rangeBy(i);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in i)this[n]=i[n]}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 Hi=e,e.default=e,Hi}var Pi,Eo;function Di(){if(Eo)return Pi;Eo=1;let e=Oo();class t{get content(){return this.css}constructor(i,n,l){this.processor=i,this.messages=[],this.root=n,this.opts=l,this.css="",this.map=void 0}toString(){return this.css}warn(i,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let l=new e(i,n);return this.messages.push(l),l}warnings(){return this.messages.filter(i=>i.type==="warning")}}return Pi=t,t.default=t,Pi}var Bi,zo;function Ho(){if(zo)return Bi;zo=1;let e={};return Bi=function(t){e[t]||(e[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},Bi}var Qi,Po;function Do(){if(Po)return Qi;Po=1;let e=et(),t=Ci(),s=Yo(),i=zi(),n=Di(),l=Tt(),m=Zs(),{isClean:d,my:u}=Vi(),o=Ho();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},r=0;function f(R){return typeof R=="object"&&typeof R.then=="function"}function p(R){let b=!1,g=h[R.type];return R.type==="decl"?b=R.prop.toLowerCase():R.type==="atrule"&&(b=R.name.toLowerCase()),b&&R.append?[g,g+"-"+b,r,g+"Exit",g+"Exit-"+b]:b?[g,g+"-"+b,g+"Exit",g+"Exit-"+b]:R.append?[g,r,g+"Exit"]:[g,g+"Exit"]}function y(R){let b;return R.type==="document"?b=["Document",r,"DocumentExit"]:R.type==="root"?b=["Root",r,"RootExit"]:b=p(R),{eventIndex:0,events:b,iterator:0,node:R,visitorIndex:0,visitors:[]}}function X(R){return R[d]=!1,R.nodes&&R.nodes.forEach(b=>X(b)),R}let Z={};class S{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(b,g,G){this.stringified=!1,this.processed=!1;let v;if(typeof g=="object"&&g!==null&&(g.type==="root"||g.type==="document"))v=X(g);else if(g instanceof S||g instanceof n)v=X(g.root),g.map&&(typeof G.map>"u"&&(G.map={}),G.map.inline||(G.map.inline=!1),G.map.prev=g.map);else{let V=i;G.syntax&&(V=G.syntax.parse),G.parser&&(V=G.parser),V.parse&&(V=V.parse);try{v=V(g,G)}catch(k){this.processed=!0,this.error=k}v&&!v[u]&&e.rebuild(v)}this.result=new n(b,v,G),this.helpers=he(K({},Z),{postcss:Z,result:this.result}),this.plugins=this.processor.plugins.map(V=>typeof V=="object"&&V.prepare?K(K({},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(b){return this.async().catch(b)}finally(b){return this.async().then(b,b)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(b,g){let G=this.result.lastPlugin;try{if(g&&g.addToError(b),this.error=b,b.name==="CssSyntaxError"&&!b.plugin)b.plugin=G.postcssPlugin,b.setMessage();else if(G.postcssVersion&&process.env.NODE_ENV!=="production"){let v=G.postcssPlugin,V=G.postcssVersion,k=this.result.processor.version,w=V.split("."),N=k.split(".");(w[0]!==N[0]||parseInt(w[1])>parseInt(N[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+k+", but "+v+" uses "+V+". Perhaps this is the source of the error below.")}}catch(v){console&&console.error&&console.error(v)}return b}prepareVisitors(){this.listeners={};let b=(g,G,v)=>{this.listeners[G]||(this.listeners[G]=[]),this.listeners[G].push([g,v])};for(let g of this.plugins)if(typeof g=="object")for(let G in g){if(!c[G]&&/^[A-Z]/.test(G))throw new Error(`Unknown event ${G} in ${g.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!a[G])if(typeof g[G]=="object")for(let v in g[G])v==="*"?b(g,G,g[G][v]):b(g,G+"-"+v.toLowerCase(),g[G][v]);else typeof g[G]=="function"&&b(g,G,g[G])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return ye(this,null,function*(){this.plugin=0;for(let b=0;b<this.plugins.length;b++){let g=this.plugins[b],G=this.runOnRoot(g);if(f(G))try{yield G}catch(v){throw this.handleError(v)}}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[d];){b[d]=!0;let g=[y(b)];for(;g.length>0;){let G=this.visitTick(g);if(f(G))try{yield G}catch(v){let V=g[g.length-1].node;throw this.handleError(v,V)}}}if(this.listeners.OnceExit)for(let[g,G]of this.listeners.OnceExit){this.result.lastPlugin=g;try{if(b.type==="document"){let v=b.nodes.map(V=>G(V,this.helpers));yield Promise.all(v)}else yield G(b,this.helpers)}catch(v){throw this.handleError(v)}}}return this.processed=!0,this.stringify()})}runOnRoot(b){this.result.lastPlugin=b;try{if(typeof b=="object"&&b.Once){if(this.result.root.type==="document"){let g=this.result.root.nodes.map(G=>b.Once(G,this.helpers));return f(g[0])?Promise.all(g):g}return b.Once(this.result.root,this.helpers)}else if(typeof b=="function")return b(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 b=this.result.opts,g=m;b.syntax&&(g=b.syntax.stringify),b.stringifier&&(g=b.stringifier),g.stringify&&(g=g.stringify);let G=this.result.root.source;if(b.map===void 0&&!(G&&G.input&&G.input.map)){let V="";return g(this.result.root,k=>{V+=k}),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 b of this.plugins){let g=this.runOnRoot(b);if(f(g))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[d];)b[d]=!0,this.walkSync(b);if(this.listeners.OnceExit)if(b.type==="document")for(let g of b.nodes)this.visitSync(this.listeners.OnceExit,g);else this.visitSync(this.listeners.OnceExit,b)}return this.result}then(b,g){return process.env.NODE_ENV!=="production"&&("from"in this.opts||o("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(b,g)}toString(){return this.css}visitSync(b,g){for(let[G,v]of b){this.result.lastPlugin=G;let V;try{V=v(g,this.helpers)}catch(k){throw this.handleError(k,g.proxyOf)}if(g.type!=="root"&&g.type!=="document"&&!g.parent)return!0;if(f(V))throw this.getAsyncError()}}visitTick(b){let g=b[b.length-1],{node:G,visitors:v}=g;if(G.type!=="root"&&G.type!=="document"&&!G.parent){b.pop();return}if(v.length>0&&g.visitorIndex<v.length){let[k,w]=v[g.visitorIndex];g.visitorIndex+=1,g.visitorIndex===v.length&&(g.visitors=[],g.visitorIndex=0),this.result.lastPlugin=k;try{return w(G.toProxy(),this.helpers)}catch(N){throw this.handleError(N,G)}}if(g.iterator!==0){let k=g.iterator,w;for(;w=G.nodes[G.indexes[k]];)if(G.indexes[k]+=1,!w[d]){w[d]=!0,b.push(y(w));return}g.iterator=0,delete G.indexes[k]}let V=g.events;for(;g.eventIndex<V.length;){let k=V[g.eventIndex];if(g.eventIndex+=1,k===r){G.nodes&&G.nodes.length&&(G[d]=!0,g.iterator=G.getIterator());return}else if(this.listeners[k]){g.visitors=this.listeners[k];return}}b.pop()}walkSync(b){b[d]=!0;let g=p(b);for(let G of g)if(G===r)b.nodes&&b.each(v=>{v[d]||this.walkSync(v)});else{let v=this.listeners[G];if(v&&this.visitSync(v,b.toProxy()))return}}warnings(){return this.sync().warnings()}}return S.registerPostcss=R=>{Z=R},Qi=S,S.default=S,l.registerLazyResult(S),t.registerLazyResult(S),Qi}var ji,Bo;function Zh(){if(Bo)return ji;Bo=1;let e=Yo(),t=zi(),s=Di(),i=Zs(),n=Ho();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 d,u=t;try{d=u(this._css,this._opts)}catch(o){this.error=o}if(this.error)throw this.error;return this._root=d,d}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(d,u,o){u=u.toString(),this.stringified=!1,this._processor=d,this._css=u,this._opts=o,this._map=void 0;let h=i;this.result=new s(this._processor,void 0,this._opts),this.result.css=u;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let a=new e(h,void 0,this._opts,u);if(a.isMap()){let[r,f]=a.generate();r&&(this.result.css=r),f&&(this.result.map=f)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(d){return this.async().catch(d)}finally(d){return this.async().then(d,d)}sync(){if(this.error)throw this.error;return this.result}then(d,u){return process.env.NODE_ENV!=="production"&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(d,u)}toString(){return this._css}warnings(){return[]}}return ji=l,l.default=l,ji}var Ai,Qo;function Sh(){if(Qo)return Ai;Qo=1;let e=Ci(),t=Do(),s=Zh(),i=Tt();class n{constructor(m=[]){this.version="8.5.15",this.plugins=this.normalize(m)}normalize(m){let d=[];for(let u of m)if(u.postcss===!0?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))d=d.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)d.push(u);else if(typeof u=="function")d.push(u);else if(typeof u=="object"&&(u.parse||u.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(u+" is not a PostCSS plugin");return d}process(m,d={}){return!this.plugins.length&&!d.parser&&!d.stringifier&&!d.syntax?new s(this,m,d):new t(this,m,d)}use(m){return this.plugins=this.plugins.concat(this.normalize([m])),this}}return Ai=n,n.default=n,i.registerProcessor(n),e.registerProcessor(n),Ai}var _i,jo;function Ih(){if(jo)return _i;jo=1;let e=ki(),t=Is(),s=et(),i=gi(),n=Vs(),l=Ci(),m=bh(),d=Xs(),u=Do(),o=Lo(),h=Ss(),c=zi(),a=Sh(),r=Di(),f=Tt(),p=Ui(),y=Zs(),X=Oo();function Z(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new a(S)}return Z.plugin=function(S,R){let b=!1;function g(...v){console&&console.warn&&!b&&(b=!0,console.warn(S+`: postcss.plugin was deprecated. Migration guide:
|
|
317
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),u}return d.root}return zi=i,i.default=i,e.registerParse(i),zi}var Pi,zo;function Ho(){if(zo)return Pi;zo=1;class e{constructor(s,i={}){if(this.type="warning",this.text=s,i.node&&i.node.source){let n=i.node.rangeBy(i);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in i)this[n]=i[n]}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 Pi=e,e.default=e,Pi}var Di,Po;function Bi(){if(Po)return Di;Po=1;let e=Ho();class t{get content(){return this.css}constructor(i,n,l){this.processor=i,this.messages=[],this.root=n,this.opts=l,this.css="",this.map=void 0}toString(){return this.css}warn(i,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let l=new e(i,n);return this.messages.push(l),l}warnings(){return this.messages.filter(i=>i.type==="warning")}}return Di=t,t.default=t,Di}var Qi,Do;function Bo(){if(Do)return Qi;Do=1;let e={};return Qi=function(t){e[t]||(e[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},Qi}var ji,Qo;function jo(){if(Qo)return ji;Qo=1;let e=et(),t=xi(),s=Mo(),i=Hi(),n=Bi(),l=Lt(),m=Zs(),{isClean:d,my:u}=Xi(),o=Bo();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},r=0;function f(R){return typeof R=="object"&&typeof R.then=="function"}function p(R){let b=!1,g=h[R.type];return R.type==="decl"?b=R.prop.toLowerCase():R.type==="atrule"&&(b=R.name.toLowerCase()),b&&R.append?[g,g+"-"+b,r,g+"Exit",g+"Exit-"+b]:b?[g,g+"-"+b,g+"Exit",g+"Exit-"+b]:R.append?[g,r,g+"Exit"]:[g,g+"Exit"]}function y(R){let b;return R.type==="document"?b=["Document",r,"DocumentExit"]:R.type==="root"?b=["Root",r,"RootExit"]:b=p(R),{eventIndex:0,events:b,iterator:0,node:R,visitorIndex:0,visitors:[]}}function X(R){return R[d]=!1,R.nodes&&R.nodes.forEach(b=>X(b)),R}let Z={};class S{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(b,g,G){this.stringified=!1,this.processed=!1;let v;if(typeof g=="object"&&g!==null&&(g.type==="root"||g.type==="document"))v=X(g);else if(g instanceof S||g instanceof n)v=X(g.root),g.map&&(typeof G.map>"u"&&(G.map={}),G.map.inline||(G.map.inline=!1),G.map.prev=g.map);else{let V=i;G.syntax&&(V=G.syntax.parse),G.parser&&(V=G.parser),V.parse&&(V=V.parse);try{v=V(g,G)}catch(k){this.processed=!0,this.error=k}v&&!v[u]&&e.rebuild(v)}this.result=new n(b,v,G),this.helpers=he(K({},Z),{postcss:Z,result:this.result}),this.plugins=this.processor.plugins.map(V=>typeof V=="object"&&V.prepare?K(K({},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(b){return this.async().catch(b)}finally(b){return this.async().then(b,b)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(b,g){let G=this.result.lastPlugin;try{if(g&&g.addToError(b),this.error=b,b.name==="CssSyntaxError"&&!b.plugin)b.plugin=G.postcssPlugin,b.setMessage();else if(G.postcssVersion&&process.env.NODE_ENV!=="production"){let v=G.postcssPlugin,V=G.postcssVersion,k=this.result.processor.version,w=V.split("."),N=k.split(".");(w[0]!==N[0]||parseInt(w[1])>parseInt(N[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+k+", but "+v+" uses "+V+". Perhaps this is the source of the error below.")}}catch(v){console&&console.error&&console.error(v)}return b}prepareVisitors(){this.listeners={};let b=(g,G,v)=>{this.listeners[G]||(this.listeners[G]=[]),this.listeners[G].push([g,v])};for(let g of this.plugins)if(typeof g=="object")for(let G in g){if(!c[G]&&/^[A-Z]/.test(G))throw new Error(`Unknown event ${G} in ${g.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!a[G])if(typeof g[G]=="object")for(let v in g[G])v==="*"?b(g,G,g[G][v]):b(g,G+"-"+v.toLowerCase(),g[G][v]);else typeof g[G]=="function"&&b(g,G,g[G])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return ye(this,null,function*(){this.plugin=0;for(let b=0;b<this.plugins.length;b++){let g=this.plugins[b],G=this.runOnRoot(g);if(f(G))try{yield G}catch(v){throw this.handleError(v)}}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[d];){b[d]=!0;let g=[y(b)];for(;g.length>0;){let G=this.visitTick(g);if(f(G))try{yield G}catch(v){let V=g[g.length-1].node;throw this.handleError(v,V)}}}if(this.listeners.OnceExit)for(let[g,G]of this.listeners.OnceExit){this.result.lastPlugin=g;try{if(b.type==="document"){let v=b.nodes.map(V=>G(V,this.helpers));yield Promise.all(v)}else yield G(b,this.helpers)}catch(v){throw this.handleError(v)}}}return this.processed=!0,this.stringify()})}runOnRoot(b){this.result.lastPlugin=b;try{if(typeof b=="object"&&b.Once){if(this.result.root.type==="document"){let g=this.result.root.nodes.map(G=>b.Once(G,this.helpers));return f(g[0])?Promise.all(g):g}return b.Once(this.result.root,this.helpers)}else if(typeof b=="function")return b(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 b=this.result.opts,g=m;b.syntax&&(g=b.syntax.stringify),b.stringifier&&(g=b.stringifier),g.stringify&&(g=g.stringify);let G=this.result.root.source;if(b.map===void 0&&!(G&&G.input&&G.input.map)){let V="";return g(this.result.root,k=>{V+=k}),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 b of this.plugins){let g=this.runOnRoot(b);if(f(g))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[d];)b[d]=!0,this.walkSync(b);if(this.listeners.OnceExit)if(b.type==="document")for(let g of b.nodes)this.visitSync(this.listeners.OnceExit,g);else this.visitSync(this.listeners.OnceExit,b)}return this.result}then(b,g){return process.env.NODE_ENV!=="production"&&("from"in this.opts||o("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(b,g)}toString(){return this.css}visitSync(b,g){for(let[G,v]of b){this.result.lastPlugin=G;let V;try{V=v(g,this.helpers)}catch(k){throw this.handleError(k,g.proxyOf)}if(g.type!=="root"&&g.type!=="document"&&!g.parent)return!0;if(f(V))throw this.getAsyncError()}}visitTick(b){let g=b[b.length-1],{node:G,visitors:v}=g;if(G.type!=="root"&&G.type!=="document"&&!G.parent){b.pop();return}if(v.length>0&&g.visitorIndex<v.length){let[k,w]=v[g.visitorIndex];g.visitorIndex+=1,g.visitorIndex===v.length&&(g.visitors=[],g.visitorIndex=0),this.result.lastPlugin=k;try{return w(G.toProxy(),this.helpers)}catch(N){throw this.handleError(N,G)}}if(g.iterator!==0){let k=g.iterator,w;for(;w=G.nodes[G.indexes[k]];)if(G.indexes[k]+=1,!w[d]){w[d]=!0,b.push(y(w));return}g.iterator=0,delete G.indexes[k]}let V=g.events;for(;g.eventIndex<V.length;){let k=V[g.eventIndex];if(g.eventIndex+=1,k===r){G.nodes&&G.nodes.length&&(G[d]=!0,g.iterator=G.getIterator());return}else if(this.listeners[k]){g.visitors=this.listeners[k];return}}b.pop()}walkSync(b){b[d]=!0;let g=p(b);for(let G of g)if(G===r)b.nodes&&b.each(v=>{v[d]||this.walkSync(v)});else{let v=this.listeners[G];if(v&&this.visitSync(v,b.toProxy()))return}}warnings(){return this.sync().warnings()}}return S.registerPostcss=R=>{Z=R},ji=S,S.default=S,l.registerLazyResult(S),t.registerLazyResult(S),ji}var Ai,Ao;function Rh(){if(Ao)return Ai;Ao=1;let e=Mo(),t=Hi(),s=Bi(),i=Zs(),n=Bo();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 d,u=t;try{d=u(this._css,this._opts)}catch(o){this.error=o}if(this.error)throw this.error;return this._root=d,d}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(d,u,o){u=u.toString(),this.stringified=!1,this._processor=d,this._css=u,this._opts=o,this._map=void 0;let h=i;this.result=new s(this._processor,void 0,this._opts),this.result.css=u;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let a=new e(h,void 0,this._opts,u);if(a.isMap()){let[r,f]=a.generate();r&&(this.result.css=r),f&&(this.result.map=f)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(d){return this.async().catch(d)}finally(d){return this.async().then(d,d)}sync(){if(this.error)throw this.error;return this.result}then(d,u){return process.env.NODE_ENV!=="production"&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(d,u)}toString(){return this._css}warnings(){return[]}}return Ai=l,l.default=l,Ai}var _i,_o;function vh(){if(_o)return _i;_o=1;let e=xi(),t=jo(),s=Rh(),i=Lt();class n{constructor(m=[]){this.version="8.5.15",this.plugins=this.normalize(m)}normalize(m){let d=[];for(let u of m)if(u.postcss===!0?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))d=d.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)d.push(u);else if(typeof u=="function")d.push(u);else if(typeof u=="object"&&(u.parse||u.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(u+" is not a PostCSS plugin");return d}process(m,d={}){return!this.plugins.length&&!d.parser&&!d.stringifier&&!d.syntax?new s(this,m,d):new t(this,m,d)}use(m){return this.plugins=this.plugins.concat(this.normalize([m])),this}}return _i=n,n.default=n,i.registerProcessor(n),e.registerProcessor(n),_i}var $i,$o;function Wh(){if($o)return $i;$o=1;let e=wi(),t=Is(),s=et(),i=Zi(),n=Vs(),l=xi(),m=Vh(),d=Xs(),u=jo(),o=Jo(),h=Ss(),c=Hi(),a=vh(),r=Bi(),f=Lt(),p=Fi(),y=Zs(),X=Ho();function Z(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new a(S)}return Z.plugin=function(S,R){let b=!1;function g(...v){console&&console.warn&&!b&&(b=!0,console.warn(S+`: 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(S+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
319
|
-
https://www.w3ctech.com/topic/2226`));let V=R(...v);return V.postcssPlugin=S,V.postcssVersion=new a().version,V}let G;return Object.defineProperty(g,"postcss",{get(){return G||(G=g()),G}}),g.process=function(v,V,k){return Z([g(k)]).process(v,V)},g},Z.stringify=y,Z.parse=c,Z.fromJSON=m,Z.list=o,Z.comment=S=>new t(S),Z.atRule=S=>new e(S),Z.decl=S=>new n(S),Z.rule=S=>new p(S),Z.root=S=>new f(S),Z.document=S=>new l(S),Z.CssSyntaxError=i,Z.Declaration=n,Z.Container=s,Z.Processor=a,Z.Document=l,Z.Comment=t,Z.Warning=X,Z.AtRule=e,Z.Result=r,Z.Input=d,Z.Rule=p,Z.Root=f,Z.Node=h,u.registerPostcss(Z)
|
|
319
|
+
https://www.w3ctech.com/topic/2226`));let V=R(...v);return V.postcssPlugin=S,V.postcssVersion=new a().version,V}let G;return Object.defineProperty(g,"postcss",{get(){return G||(G=g()),G}}),g.process=function(v,V,k){return Z([g(k)]).process(v,V)},g},Z.stringify=y,Z.parse=c,Z.fromJSON=m,Z.list=o,Z.comment=S=>new t(S),Z.atRule=S=>new e(S),Z.decl=S=>new n(S),Z.rule=S=>new p(S),Z.root=S=>new f(S),Z.document=S=>new l(S),Z.CssSyntaxError=i,Z.Declaration=n,Z.Container=s,Z.Processor=a,Z.Document=l,Z.Comment=t,Z.Warning=X,Z.AtRule=e,Z.Result=r,Z.Input=d,Z.Rule=p,Z.Root=f,Z.Node=h,u.registerPostcss(Z),$i=Z,Z.default=Z,$i}Wh();var kh=Object.defineProperty,wh=(e,t,s)=>t in e?kh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ce=(e,t,s)=>wh(e,typeof t!="symbol"?t+"":t,s);Date.now().toString();function Ch(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var s=function i(){return this instanceof i?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(i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(s,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}),s}var Gs={exports:{}},qo;function xh(){if(qo)return Gs.exports;qo=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 Gs.exports=t(),Gs.exports.createColors=t,Gs.exports}const Th={},Lh=Object.freeze(Object.defineProperty({__proto__:null,default:Th},Symbol.toStringTag,{value:"Module"})),Ne=Ch(Lh);var qi,el;function en(){if(el)return qi;el=1;let e=xh(),t=Ne;class s extends Error{constructor(n,l,m,d,u,o){super(n),this.name="CssSyntaxError",this.reason=n,u&&(this.file=u),d&&(this.source=d),o&&(this.plugin=o),typeof l<"u"&&typeof m<"u"&&(typeof l=="number"?(this.line=l,this.column=m):(this.line=l.line,this.column=l.column,this.endLine=m.line,this.endColumn=m.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(n){if(!this.source)return"";let l=this.source;n==null&&(n=e.isColorSupported);let m=r=>r,d=r=>r,u=r=>r;if(n){let{bold:r,gray:f,red:p}=e.createColors(!0);d=y=>r(p(y)),m=y=>f(y),t&&(u=y=>t(y))}let o=l.split(/\r?\n/),h=Math.max(this.line-3,0),c=Math.min(this.line+2,o.length),a=String(c).length;return o.slice(h,c).map((r,f)=>{let p=h+1+f,y=" "+(" "+p).slice(-a)+" | ";if(p===this.line){if(r.length>160){let Z=20,S=Math.max(0,this.column-Z),R=Math.max(this.column+Z,this.endColumn+Z),b=r.slice(S,R),g=m(y.replace(/\d/g," "))+r.slice(0,Math.min(this.column-1,Z-1)).replace(/[^\t]/g," ");return d(">")+m(y)+u(b)+`
|
|
320
320
|
`+g+d("^")}let X=m(y.replace(/\d/g," "))+r.slice(0,this.column-1).replace(/[^\t]/g," ");return d(">")+m(y)+u(r)+`
|
|
321
321
|
`+X+d("^")}return" "+m(y)+u(r)}).join(`
|
|
322
322
|
`)}toString(){let n=this.showSourceCode();return n&&(n=`
|
|
323
323
|
|
|
324
324
|
`+n+`
|
|
325
|
-
`),this.name+": "+this.message+n}}return
|
|
325
|
+
`),this.name+": "+this.message+n}}return qi=s,s.default=s,qi}var tn,tl;function sl(){if(tl)return tn;tl=1;const e=/(<)(\/?style\b)/gi,t=/(<)(!--)/g;function s(m){return typeof m!="string"||!m.includes("<")?m:m.replace(e,"\\3c $2").replace(t,"\\3c $2")}const i={after:`
|
|
326
326
|
`,beforeClose:`
|
|
327
327
|
`,beforeComment:`
|
|
328
328
|
`,beforeDecl:`
|
|
@@ -333,23 +333,23 @@ https://www.w3ctech.com/topic/2226`));let V=R(...v);return V.postcssPlugin=S,V.p
|
|
|
333
333
|
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(u,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeDecl(d,u){let o;return d.walkDecls(h=>{if(typeof h.raws.before<"u")return o=h.raws.before,o.includes(`
|
|
334
334
|
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(u,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeOpen(d){let u;return d.walk(o=>{if(o.type!=="decl"&&(u=o.raws.between,typeof u<"u"))return!1}),u}rawBeforeRule(d){let u;return d.walk(o=>{if(o.nodes&&(o.parent!==d||d.first!==o)&&typeof o.raws.before<"u")return u=o.raws.before,u.includes(`
|
|
335
335
|
`)&&(u=u.replace(/[^\n]+$/,"")),!1}),u&&(u=u.replace(/\S/g,"")),u}rawColon(d){let u;return d.walkDecls(o=>{if(typeof o.raws.between<"u")return u=o.raws.between.replace(/[^\s:]/g,""),!1}),u}rawEmptyBody(d){let u;return d.walk(o=>{if(o.nodes&&o.nodes.length===0&&(u=o.raws.after,typeof u<"u"))return!1}),u}rawIndent(d){if(d.raws.indent)return d.raws.indent;let u;return d.walk(o=>{let h=o.parent;if(h&&h!==d&&h.parent&&h.parent===d&&typeof o.raws.before<"u"){let c=o.raws.before.split(`
|
|
336
|
-
`);return u=c[c.length-1],u=u.replace(/\S/g,""),!1}}),u}rawSemicolon(d){let u;return d.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(u=o.raws.semicolon,typeof u<"u"))return!1}),u}rawValue(d,u){let o=d[u],h=d.raws[u];return h&&h.value===o?h.raw:o}root(d){if(this.body(d),d.raws.after){let u=d.raws.after,o=d.parent&&d.parent.type==="document";this.builder(o?u:s(u))}}rule(d){this.block(d,this.rawValue(d,"selector")),d.raws.ownSemicolon&&this.builder(s(d.raws.ownSemicolon),d,"end")}stringify(d,u){if(!this[d.type])throw new Error("Unknown AST node type "+d.type+". Maybe you need to change PostCSS stringifier.");this[d.type](d,u)}}return
|
|
336
|
+
`);return u=c[c.length-1],u=u.replace(/\S/g,""),!1}}),u}rawSemicolon(d){let u;return d.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(u=o.raws.semicolon,typeof u<"u"))return!1}),u}rawValue(d,u){let o=d[u],h=d.raws[u];return h&&h.value===o?h.raw:o}root(d){if(this.body(d),d.raws.after){let u=d.raws.after,o=d.parent&&d.parent.type==="document";this.builder(o?u:s(u))}}rule(d){this.block(d,this.rawValue(d,"selector")),d.raws.ownSemicolon&&this.builder(s(d.raws.ownSemicolon),d,"end")}stringify(d,u){if(!this[d.type])throw new Error("Unknown AST node type "+d.type+". Maybe you need to change PostCSS stringifier.");this[d.type](d,u)}}return tn=l,l.default=l,tn}var sn,il;function Rs(){if(il)return sn;il=1;let e=sl();function t(s,i){new e(i).stringify(s)}return sn=t,t.default=t,sn}var nn={},nl;function rn(){return nl||(nl=1,nn.isClean=Symbol("isClean"),nn.my=Symbol("my")),nn}var on,rl;function vs(){if(rl)return on;rl=1;let e=en(),t=sl(),s=Rs(),{isClean:i,my:n}=rn();function l(u,o){let h=new u.constructor;for(let c in u){if(!Object.prototype.hasOwnProperty.call(u,c)||c==="proxyCache")continue;let a=u[c],r=typeof a;c==="parent"&&r==="object"?o&&(h[c]=o):c==="source"?h[c]=a:Array.isArray(a)?h[c]=a.map(f=>l(f,h)):(r==="object"&&a!==null&&(a=l(a)),h[c]=a)}return h}function m(u,o){if(o&&typeof o.offset<"u")return o.offset;let h=1,c=1,a=0;for(let r=0;r<u.length;r++){if(c===o.line&&h===o.column){a=r;break}u[r]===`
|
|
337
337
|
`?(h=1,c+=1):h+=1}return a}class d{get proxyOf(){return this}constructor(o={}){this.raws={},this[i]=!1,this[n]=!0;for(let h in o)if(h==="nodes"){this.nodes=[];for(let c of o[h])typeof c.clone=="function"?this.append(c.clone()):this.append(c)}else this[h]=o[h]}addToError(o){if(o.postcssNode=this,o.stack&&this.source&&/\n\s{4}at /.test(o.stack)){let h=this.source;o.stack=o.stack.replace(/\n\s{4}at /,`$&${h.input.from}:${h.start.line}:${h.start.column}$&`)}return o}after(o){return this.parent.insertAfter(this,o),this}assign(o={}){for(let h in o)this[h]=o[h];return this}before(o){return this.parent.insertBefore(this,o),this}cleanRaws(o){delete this.raws.before,delete this.raws.after,o||delete this.raws.between}clone(o={}){let h=l(this);for(let c in o)h[c]=o[c];return h}cloneAfter(o={}){let h=this.clone(o);return this.parent.insertAfter(this,h),h}cloneBefore(o={}){let h=this.clone(o);return this.parent.insertBefore(this,h),h}error(o,h={}){if(this.source){let{end:c,start:a}=this.rangeBy(h);return this.source.input.error(o,{column:a.column,line:a.line},{column:c.column,line:c.line},h)}return new e(o)}getProxyProcessor(){return{get(o,h){return h==="proxyOf"?o:h==="root"?()=>o.root().toProxy():o[h]},set(o,h,c){return o[h]===c||(o[h]=c,(h==="prop"||h==="value"||h==="name"||h==="params"||h==="important"||h==="text")&&o.markDirty()),!0}}}markClean(){this[i]=!0}markDirty(){if(this[i]){this[i]=!1;let o=this;for(;o=o.parent;)o[i]=!1}}next(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o+1]}positionBy(o={}){let h=this.source.start;if(o.index)h=this.positionInside(o.index);else if(o.word){let c="document"in this.source.input?this.source.input.document:this.source.input.css,a=c.slice(m(c,this.source.start),m(c,this.source.end)).indexOf(o.word);a!==-1&&(h=this.positionInside(a))}return h}positionInside(o){let h=this.source.start.column,c=this.source.start.line,a="document"in this.source.input?this.source.input.document:this.source.input.css,r=m(a,this.source.start),f=r+o;for(let p=r;p<f;p++)a[p]===`
|
|
338
|
-
`?(h=1,c+=1):h+=1;return{column:h,line:c,offset:f}}prev(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o-1]}rangeBy(o={}){let h="document"in this.source.input?this.source.input.document:this.source.input.css,c={column:this.source.start.column,line:this.source.start.line,offset:m(h,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:m(h,this.source.end)+1}:{column:c.column+1,line:c.line,offset:c.offset+1};if(o.word){let r=h.slice(m(h,this.source.start),m(h,this.source.end)).indexOf(o.word);r!==-1&&(c=this.positionInside(r),a=this.positionInside(r+o.word.length))}else o.start?c={column:o.start.column,line:o.start.line,offset:m(h,o.start)}:o.index&&(c=this.positionInside(o.index)),o.end?a={column:o.end.column,line:o.end.line,offset:m(h,o.end)}:typeof o.endIndex=="number"?a=this.positionInside(o.endIndex):o.index&&(a=this.positionInside(o.index+1));return(a.line<c.line||a.line===c.line&&a.column<=c.column)&&(a={column:c.column+1,line:c.line,offset:c.offset+1}),{end:a,start:c}}raw(o,h){return new t().raw(this,o,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...o){if(this.parent){let h=this,c=!1;for(let a of o)a===this?c=!0:c?(this.parent.insertAfter(h,a),h=a):this.parent.insertBefore(h,a);c||this.remove()}return this}root(){let o=this;for(;o.parent&&o.parent.type!=="document";)o=o.parent;return o}toJSON(o,h){let c={},a=h==null;h=h||new Map;let r=0;for(let f in this){if(!Object.prototype.hasOwnProperty.call(this,f)||f==="parent"||f==="proxyCache")continue;let p=this[f];if(Array.isArray(p))c[f]=p.map(y=>typeof y=="object"&&y.toJSON?y.toJSON(null,h):y);else if(typeof p=="object"&&p.toJSON)c[f]=p.toJSON(null,h);else if(f==="source"){if(p==null)continue;let y=h.get(p.input);y==null&&(y=r,h.set(p.input,r),r++),c[f]={end:p.end,inputId:y,start:p.start}}else c[f]=p}return a&&(c.inputs=[...h.keys()].map(f=>f.toJSON())),c}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(o=s){o.stringify&&(o=o.stringify);let h="";return o(this,c=>{h+=c}),h}warn(o,h,c={}){let a={node:this};for(let r in c)a[r]=c[r];return o.warn(h,a)}}return rn=d,d.default=d,rn}var on,il;function Ws(){if(il)return on;il=1;let e=vs();class t extends e{constructor(i){super(i),this.type="comment"}}return on=t,t.default=t,on}var ln,nl;function ks(){if(nl)return ln;nl=1;let e=vs();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(i){i&&typeof i.value<"u"&&typeof i.value!="string"&&(i=he(K({},i),{value:String(i.value)})),super(i),this.type="decl"}}return ln=t,t.default=t,ln}var an,rl;function tt(){if(rl)return an;rl=1;let e=Ws(),t=ks(),s=vs(),{isClean:i,my:n}=nn(),l,m,d,u;function o(a){return a.map(r=>(r.nodes&&(r.nodes=o(r.nodes)),delete r.source,r))}function h(a){if(a[i]=!1,a.proxyOf.nodes)for(let r of a.proxyOf.nodes)h(r)}class c 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(...r){for(let f of r){let p=this.normalize(f,this.last);for(let y of p)this.proxyOf.nodes.push(y)}return this.markDirty(),this}cleanRaws(r){if(super.cleanRaws(r),this.nodes)for(let f of this.nodes)f.cleanRaws(r)}each(r){if(!this.proxyOf.nodes)return;let f=this.getIterator(),p,y;for(;this.indexes[f]<this.proxyOf.nodes.length&&(p=this.indexes[f],y=r(this.proxyOf.nodes[p],p),y!==!1);)this.indexes[f]+=1;return delete this.indexes[f],y}every(r){return this.nodes.every(r)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let r=this.lastEach;return this.indexes[r]=0,r}getProxyProcessor(){return{get(r,f){return f==="proxyOf"?r:r[f]?f==="each"||typeof f=="string"&&f.startsWith("walk")?(...p)=>r[f](...p.map(y=>typeof y=="function"?(X,Z)=>y(X.toProxy(),Z):y)):f==="every"||f==="some"?p=>r[f]((y,...X)=>p(y.toProxy(),...X)):f==="root"?()=>r.root().toProxy():f==="nodes"?r.nodes.map(p=>p.toProxy()):f==="first"||f==="last"?r[f].toProxy():r[f]:r[f]},set(r,f,p){return r[f]===p||(r[f]=p,(f==="name"||f==="params"||f==="selector")&&r.markDirty()),!0}}}index(r){return typeof r=="number"?r:(r.proxyOf&&(r=r.proxyOf),this.proxyOf.nodes.indexOf(r))}insertAfter(r,f){let p=this.index(r),y=this.normalize(f,this.proxyOf.nodes[p]).reverse();p=this.index(r);for(let Z of y)this.proxyOf.nodes.splice(p+1,0,Z);let X;for(let Z in this.indexes)X=this.indexes[Z],p<X&&(this.indexes[Z]=X+y.length);return this.markDirty(),this}insertBefore(r,f){let p=this.index(r),y=p===0?"prepend":!1,X=this.normalize(f,this.proxyOf.nodes[p],y).reverse();p=this.index(r);for(let S of X)this.proxyOf.nodes.splice(p,0,S);let Z;for(let S in this.indexes)Z=this.indexes[S],p<=Z&&(this.indexes[S]=Z+X.length);return this.markDirty(),this}normalize(r,f){if(typeof r=="string")r=o(m(r).nodes);else if(typeof r>"u")r=[];else if(Array.isArray(r)){r=r.slice(0);for(let p of r)p.parent&&p.parent.removeChild(p,"ignore")}else if(r.type==="root"&&this.type!=="document"){r=r.nodes.slice(0);for(let p of r)p.parent&&p.parent.removeChild(p,"ignore")}else if(r.type)r=[r];else if(r.prop){if(typeof r.value>"u")throw new Error("Value field is missed in node creation");typeof r.value!="string"&&(r.value=String(r.value)),r=[new t(r)]}else if(r.selector||r.selectors)r=[new u(r)];else if(r.name)r=[new l(r)];else if(r.text)r=[new e(r)];else throw new Error("Unknown node type in node creation");return r.map(p=>(p[n]||c.rebuild(p),p=p.proxyOf,p.parent&&p.parent.removeChild(p),p[i]&&h(p),p.raws||(p.raws={}),typeof p.raws.before>"u"&&f&&typeof f.raws.before<"u"&&(p.raws.before=f.raws.before.replace(/\S/g,"")),p.parent=this.proxyOf,p))}prepend(...r){r=r.reverse();for(let f of r){let p=this.normalize(f,this.first,"prepend").reverse();for(let y of p)this.proxyOf.nodes.unshift(y);for(let y in this.indexes)this.indexes[y]=this.indexes[y]+p.length}return this.markDirty(),this}push(r){return r.parent=this,this.proxyOf.nodes.push(r),this}removeAll(){for(let r of this.proxyOf.nodes)r.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(r){r=this.index(r),this.proxyOf.nodes[r].parent=void 0,this.proxyOf.nodes.splice(r,1);let f;for(let p in this.indexes)f=this.indexes[p],f>=r&&(this.indexes[p]=f-1);return this.markDirty(),this}replaceValues(r,f,p){return p||(p=f,f={}),this.walkDecls(y=>{f.props&&!f.props.includes(y.prop)||f.fast&&!y.value.includes(f.fast)||(y.value=y.value.replace(r,p))}),this.markDirty(),this}some(r){return this.nodes.some(r)}walk(r){return this.each((f,p)=>{let y;try{y=r(f,p)}catch(X){throw f.addToError(X)}return y!==!1&&f.walk&&(y=f.walk(r)),y})}walkAtRules(r,f){return f?r instanceof RegExp?this.walk((p,y)=>{if(p.type==="atrule"&&r.test(p.name))return f(p,y)}):this.walk((p,y)=>{if(p.type==="atrule"&&p.name===r)return f(p,y)}):(f=r,this.walk((p,y)=>{if(p.type==="atrule")return f(p,y)}))}walkComments(r){return this.walk((f,p)=>{if(f.type==="comment")return r(f,p)})}walkDecls(r,f){return f?r instanceof RegExp?this.walk((p,y)=>{if(p.type==="decl"&&r.test(p.prop))return f(p,y)}):this.walk((p,y)=>{if(p.type==="decl"&&p.prop===r)return f(p,y)}):(f=r,this.walk((p,y)=>{if(p.type==="decl")return f(p,y)}))}walkRules(r,f){return f?r instanceof RegExp?this.walk((p,y)=>{if(p.type==="rule"&&r.test(p.selector))return f(p,y)}):this.walk((p,y)=>{if(p.type==="rule"&&p.selector===r)return f(p,y)}):(f=r,this.walk((p,y)=>{if(p.type==="rule")return f(p,y)}))}}return c.registerParse=a=>{m=a},c.registerRule=a=>{u=a},c.registerAtRule=a=>{l=a},c.registerRoot=a=>{d=a},an=c,c.default=c,c.rebuild=a=>{a.type==="atrule"?Object.setPrototypeOf(a,l.prototype):a.type==="rule"?Object.setPrototypeOf(a,u.prototype):a.type==="decl"?Object.setPrototypeOf(a,t.prototype):a.type==="comment"?Object.setPrototypeOf(a,e.prototype):a.type==="root"&&Object.setPrototypeOf(a,d.prototype),a[n]=!0,a.nodes&&a.nodes.forEach(r=>{c.rebuild(r)})},an}var cn,ol;function un(){if(ol)return cn;ol=1;let e=tt();class t extends e{constructor(i){super(i),this.type="atrule"}append(...i){return this.proxyOf.nodes||(this.nodes=[]),super.append(...i)}prepend(...i){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...i)}}return cn=t,t.default=t,e.registerAtRule(t),cn}var dn,ll;function hn(){if(ll)return dn;ll=1;let e=tt(),t,s;class i extends e{constructor(l){super(K({type:"document"},l)),this.nodes||(this.nodes=[])}toResult(l={}){return new t(new s,this,l).stringify()}}return i.registerLazyResult=n=>{t=n},i.registerProcessor=n=>{s=n},dn=i,i.default=i,dn}var pn,al;function kh(){if(al)return pn;al=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return pn={nanoid:(t=21)=>{let s="",i=t|0;for(;i--;)s+=e[Math.random()*64|0];return s},customAlphabet:(t,s=21)=>(i=s)=>{let n="",l=i|0;for(;l--;)n+=t[Math.random()*t.length|0];return n}},pn}var mn,cl;function ul(){if(cl)return mn;cl=1;let{existsSync:e,readFileSync:t}=Ne,{dirname:s,join:i}=Ne,{SourceMapConsumer:n,SourceMapGenerator:l}=Ne;function m(u){return Buffer?Buffer.from(u,"base64").toString():window.atob(u)}class d{constructor(o,h){if(h.map===!1)return;h.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(o),this.inline=this.startWith(this.annotation,"data:");let c=h.map?h.map.prev:void 0,a=this.loadMap(h.from,c);!this.mapFile&&h.from&&(this.mapFile=h.from),this.mapFile&&(this.root=s(this.mapFile)),a&&(this.text=a)}consumer(){return this.consumerCache||(this.consumerCache=new n(this.json||this.text)),this.consumerCache}decodeInline(o){let h=/^data:application\/json;charset=utf-?8;base64,/,c=/^data:application\/json;base64,/,a=/^data:application\/json;charset=utf-?8,/,r=/^data:application\/json,/,f=o.match(a)||o.match(r);if(f)return decodeURIComponent(o.substr(f[0].length));let p=o.match(h)||o.match(c);if(p)return m(o.substr(p[0].length));let y=o.slice(22);throw y=y.slice(0,y.indexOf(",")),new Error("Unsupported source map encoding "+y)}getAnnotationURL(o){return o.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(o){return typeof o!="object"?!1:typeof o.mappings=="string"||typeof o._mappings=="string"||Array.isArray(o.sections)}loadAnnotation(o){let h=o.match(/\/\*\s*# sourceMappingURL=/g);if(!h)return;let c=o.lastIndexOf(h.pop()),a=o.indexOf("*/",c);c>-1&&a>-1&&(this.annotation=this.getAnnotationURL(o.substring(c,a)))}loadFile(o,h,c){if(!(!c&&!this.unsafeMap&&!/\.map$/i.test(o))&&(this.root=s(o),e(o)))return this.mapFile=o,t(o,"utf-8").toString().trim()}loadMap(o,h){if(h===!1)return!1;if(h){if(typeof h=="string")return h;if(typeof h=="function"){let c=h(o);if(c){let a=this.loadFile(c,o,!0);if(!a)throw new Error("Unable to load previous source map: "+c.toString());return a}}else{if(h instanceof n)return l.fromSourceMap(h).toString();if(h instanceof l)return h.toString();if(this.isMap(h))return JSON.stringify(h);throw new Error("Unsupported previous source map format: "+h.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let c=this.annotation;o&&(c=i(s(o),c));let a=this.loadFile(c,o,!1);if(a)try{this.json=JSON.parse(a.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return a}}}startWith(o,h){return o?o.substr(0,h.length)===h:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return mn=d,d.default=d,mn}var fn,dl;function ws(){if(dl)return fn;dl=1;let{nanoid:e}=kh(),{isAbsolute:t,resolve:s}=Ne,{SourceMapConsumer:i,SourceMapGenerator:n}=Ne,{fileURLToPath:l,pathToFileURL:m}=Ne,d=qi(),u=ul(),o=Ne,h=Symbol("lineToIndexCache"),c=!!(i&&n),a=!!(s&&t);function r(p){if(p[h])return p[h];let y=p.css.split(`
|
|
339
|
-
`),X=new Array(y.length),Z=0;for(let S=0,R=y.length;S<R;S++)X[S]=Z,Z+=y[S].length+1;return p[h]=X,X}class f{get from(){return this.file||this.id}constructor(y,X={}){if(y===null||typeof y>"u"||typeof y=="object"&&!y.toString)throw new Error(`PostCSS received ${y} instead of CSS string`);if(this.css=y.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,X.document&&(this.document=X.document.toString()),X.from&&(!a||/^\w+:\/\//.test(X.from)||t(X.from)?this.file=X.from:this.file=s(X.from)),a&&c){let Z=new u(this.css,X);if(Z.text){this.map=Z;let S=Z.consumer().file;!this.file&&S&&(this.file=this.mapResolve(S))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(y,X,Z,S={}){let R,b,g,G,v;if(X&&typeof X=="object"){let k=X,w=Z;if(typeof k.offset=="number"){G=k.offset;let N=this.fromOffset(G);X=N.line,Z=N.col}else X=k.line,Z=k.column,G=this.fromLineAndColumn(X,Z);if(typeof w.offset=="number"){g=w.offset;let N=this.fromOffset(g);b=N.line,R=N.col}else b=w.line,R=w.column,g=this.fromLineAndColumn(w.line,w.column)}else if(Z)G=this.fromLineAndColumn(X,Z);else{G=X;let k=this.fromOffset(G);X=k.line,Z=k.col}let V=this.origin(X,Z,b,R);return V?v=new d(y,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,S.plugin):v=new d(y,b===void 0?X:{column:Z,line:X},b===void 0?Z:{column:R,line:b},this.css,this.file,S.plugin),v.input={column:Z,endColumn:R,endLine:b,endOffset:g,line:X,offset:G,source:this.css},this.file&&(m&&(v.input.url=m(this.file).toString()),v.input.file=this.file),v}fromLineAndColumn(y,X){return r(this)[y-1]+X-1}fromOffset(y){let X=r(this),Z=X[X.length-1],S=0;if(y>=Z)S=X.length-1;else{let R=X.length-2,b;for(;S<R;)if(b=S+(R-S>>1),y<X[b])R=b-1;else if(y>=X[b+1])S=b+1;else{S=b;break}}return{col:y-X[S]+1,line:S+1}}mapResolve(y){return/^\w+:\/\//.test(y)?y:s(this.map.consumer().sourceRoot||this.map.root||".",y)}origin(y,X,Z,S){if(!this.map)return!1;let R=this.map.consumer(),b=R.originalPositionFor({column:X,line:y});if(!b.source)return!1;let g;typeof Z=="number"&&(g=R.originalPositionFor({column:S,line:Z}));let G;t(b.source)?G=m(b.source):G=new URL(b.source,this.map.consumer().sourceRoot||m(this.map.mapFile));let v={column:b.column,endColumn:g&&g.column,endLine:g&&g.line,line:b.line,url:G.toString()};if(G.protocol==="file:")if(l)v.file=l(G);else throw new Error("file: protocol is not available in this PostCSS build");let V=R.sourceContentFor(b.source);return V&&(v.source=V),v}toJSON(){let y={};for(let X of["hasBOM","css","file","id"])this[X]!=null&&(y[X]=this[X]);return this.map&&(y.map=K({},this.map),y.map.consumerCache&&(y.map.consumerCache=void 0)),y}}return
|
|
340
|
-
`," "];return e.split(t,s)},split(t,s,i){let n=[],l="",m=!1,d=0,u=!1,o="",h=!1;for(let c of t)h?h=!1:c==="\\"?h=!0:u?c===o&&(u=!1):c==='"'||c==="'"?(u=!0,o=c):c==="("?d+=1:c===")"?d>0&&(d-=1):d===0&&s.includes(c)&&(m=!0),m?(l!==""&&n.push(l.trim()),l="",m=!1):l+=c;return(i||l!=="")&&n.push(l.trim()),n}};return
|
|
338
|
+
`?(h=1,c+=1):h+=1;return{column:h,line:c,offset:f}}prev(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o-1]}rangeBy(o={}){let h="document"in this.source.input?this.source.input.document:this.source.input.css,c={column:this.source.start.column,line:this.source.start.line,offset:m(h,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:m(h,this.source.end)+1}:{column:c.column+1,line:c.line,offset:c.offset+1};if(o.word){let r=h.slice(m(h,this.source.start),m(h,this.source.end)).indexOf(o.word);r!==-1&&(c=this.positionInside(r),a=this.positionInside(r+o.word.length))}else o.start?c={column:o.start.column,line:o.start.line,offset:m(h,o.start)}:o.index&&(c=this.positionInside(o.index)),o.end?a={column:o.end.column,line:o.end.line,offset:m(h,o.end)}:typeof o.endIndex=="number"?a=this.positionInside(o.endIndex):o.index&&(a=this.positionInside(o.index+1));return(a.line<c.line||a.line===c.line&&a.column<=c.column)&&(a={column:c.column+1,line:c.line,offset:c.offset+1}),{end:a,start:c}}raw(o,h){return new t().raw(this,o,h)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...o){if(this.parent){let h=this,c=!1;for(let a of o)a===this?c=!0:c?(this.parent.insertAfter(h,a),h=a):this.parent.insertBefore(h,a);c||this.remove()}return this}root(){let o=this;for(;o.parent&&o.parent.type!=="document";)o=o.parent;return o}toJSON(o,h){let c={},a=h==null;h=h||new Map;let r=0;for(let f in this){if(!Object.prototype.hasOwnProperty.call(this,f)||f==="parent"||f==="proxyCache")continue;let p=this[f];if(Array.isArray(p))c[f]=p.map(y=>typeof y=="object"&&y.toJSON?y.toJSON(null,h):y);else if(typeof p=="object"&&p.toJSON)c[f]=p.toJSON(null,h);else if(f==="source"){if(p==null)continue;let y=h.get(p.input);y==null&&(y=r,h.set(p.input,r),r++),c[f]={end:p.end,inputId:y,start:p.start}}else c[f]=p}return a&&(c.inputs=[...h.keys()].map(f=>f.toJSON())),c}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(o=s){o.stringify&&(o=o.stringify);let h="";return o(this,c=>{h+=c}),h}warn(o,h,c={}){let a={node:this};for(let r in c)a[r]=c[r];return o.warn(h,a)}}return on=d,d.default=d,on}var ln,ol;function Ws(){if(ol)return ln;ol=1;let e=vs();class t extends e{constructor(i){super(i),this.type="comment"}}return ln=t,t.default=t,ln}var an,ll;function ks(){if(ll)return an;ll=1;let e=vs();class t extends e{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(i){i&&typeof i.value<"u"&&typeof i.value!="string"&&(i=he(K({},i),{value:String(i.value)})),super(i),this.type="decl"}}return an=t,t.default=t,an}var cn,al;function tt(){if(al)return cn;al=1;let e=Ws(),t=ks(),s=vs(),{isClean:i,my:n}=rn(),l,m,d,u;function o(a){return a.map(r=>(r.nodes&&(r.nodes=o(r.nodes)),delete r.source,r))}function h(a){if(a[i]=!1,a.proxyOf.nodes)for(let r of a.proxyOf.nodes)h(r)}class c 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(...r){for(let f of r){let p=this.normalize(f,this.last);for(let y of p)this.proxyOf.nodes.push(y)}return this.markDirty(),this}cleanRaws(r){if(super.cleanRaws(r),this.nodes)for(let f of this.nodes)f.cleanRaws(r)}each(r){if(!this.proxyOf.nodes)return;let f=this.getIterator(),p,y;for(;this.indexes[f]<this.proxyOf.nodes.length&&(p=this.indexes[f],y=r(this.proxyOf.nodes[p],p),y!==!1);)this.indexes[f]+=1;return delete this.indexes[f],y}every(r){return this.nodes.every(r)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let r=this.lastEach;return this.indexes[r]=0,r}getProxyProcessor(){return{get(r,f){return f==="proxyOf"?r:r[f]?f==="each"||typeof f=="string"&&f.startsWith("walk")?(...p)=>r[f](...p.map(y=>typeof y=="function"?(X,Z)=>y(X.toProxy(),Z):y)):f==="every"||f==="some"?p=>r[f]((y,...X)=>p(y.toProxy(),...X)):f==="root"?()=>r.root().toProxy():f==="nodes"?r.nodes.map(p=>p.toProxy()):f==="first"||f==="last"?r[f].toProxy():r[f]:r[f]},set(r,f,p){return r[f]===p||(r[f]=p,(f==="name"||f==="params"||f==="selector")&&r.markDirty()),!0}}}index(r){return typeof r=="number"?r:(r.proxyOf&&(r=r.proxyOf),this.proxyOf.nodes.indexOf(r))}insertAfter(r,f){let p=this.index(r),y=this.normalize(f,this.proxyOf.nodes[p]).reverse();p=this.index(r);for(let Z of y)this.proxyOf.nodes.splice(p+1,0,Z);let X;for(let Z in this.indexes)X=this.indexes[Z],p<X&&(this.indexes[Z]=X+y.length);return this.markDirty(),this}insertBefore(r,f){let p=this.index(r),y=p===0?"prepend":!1,X=this.normalize(f,this.proxyOf.nodes[p],y).reverse();p=this.index(r);for(let S of X)this.proxyOf.nodes.splice(p,0,S);let Z;for(let S in this.indexes)Z=this.indexes[S],p<=Z&&(this.indexes[S]=Z+X.length);return this.markDirty(),this}normalize(r,f){if(typeof r=="string")r=o(m(r).nodes);else if(typeof r>"u")r=[];else if(Array.isArray(r)){r=r.slice(0);for(let p of r)p.parent&&p.parent.removeChild(p,"ignore")}else if(r.type==="root"&&this.type!=="document"){r=r.nodes.slice(0);for(let p of r)p.parent&&p.parent.removeChild(p,"ignore")}else if(r.type)r=[r];else if(r.prop){if(typeof r.value>"u")throw new Error("Value field is missed in node creation");typeof r.value!="string"&&(r.value=String(r.value)),r=[new t(r)]}else if(r.selector||r.selectors)r=[new u(r)];else if(r.name)r=[new l(r)];else if(r.text)r=[new e(r)];else throw new Error("Unknown node type in node creation");return r.map(p=>(p[n]||c.rebuild(p),p=p.proxyOf,p.parent&&p.parent.removeChild(p),p[i]&&h(p),p.raws||(p.raws={}),typeof p.raws.before>"u"&&f&&typeof f.raws.before<"u"&&(p.raws.before=f.raws.before.replace(/\S/g,"")),p.parent=this.proxyOf,p))}prepend(...r){r=r.reverse();for(let f of r){let p=this.normalize(f,this.first,"prepend").reverse();for(let y of p)this.proxyOf.nodes.unshift(y);for(let y in this.indexes)this.indexes[y]=this.indexes[y]+p.length}return this.markDirty(),this}push(r){return r.parent=this,this.proxyOf.nodes.push(r),this}removeAll(){for(let r of this.proxyOf.nodes)r.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(r){r=this.index(r),this.proxyOf.nodes[r].parent=void 0,this.proxyOf.nodes.splice(r,1);let f;for(let p in this.indexes)f=this.indexes[p],f>=r&&(this.indexes[p]=f-1);return this.markDirty(),this}replaceValues(r,f,p){return p||(p=f,f={}),this.walkDecls(y=>{f.props&&!f.props.includes(y.prop)||f.fast&&!y.value.includes(f.fast)||(y.value=y.value.replace(r,p))}),this.markDirty(),this}some(r){return this.nodes.some(r)}walk(r){return this.each((f,p)=>{let y;try{y=r(f,p)}catch(X){throw f.addToError(X)}return y!==!1&&f.walk&&(y=f.walk(r)),y})}walkAtRules(r,f){return f?r instanceof RegExp?this.walk((p,y)=>{if(p.type==="atrule"&&r.test(p.name))return f(p,y)}):this.walk((p,y)=>{if(p.type==="atrule"&&p.name===r)return f(p,y)}):(f=r,this.walk((p,y)=>{if(p.type==="atrule")return f(p,y)}))}walkComments(r){return this.walk((f,p)=>{if(f.type==="comment")return r(f,p)})}walkDecls(r,f){return f?r instanceof RegExp?this.walk((p,y)=>{if(p.type==="decl"&&r.test(p.prop))return f(p,y)}):this.walk((p,y)=>{if(p.type==="decl"&&p.prop===r)return f(p,y)}):(f=r,this.walk((p,y)=>{if(p.type==="decl")return f(p,y)}))}walkRules(r,f){return f?r instanceof RegExp?this.walk((p,y)=>{if(p.type==="rule"&&r.test(p.selector))return f(p,y)}):this.walk((p,y)=>{if(p.type==="rule"&&p.selector===r)return f(p,y)}):(f=r,this.walk((p,y)=>{if(p.type==="rule")return f(p,y)}))}}return c.registerParse=a=>{m=a},c.registerRule=a=>{u=a},c.registerAtRule=a=>{l=a},c.registerRoot=a=>{d=a},cn=c,c.default=c,c.rebuild=a=>{a.type==="atrule"?Object.setPrototypeOf(a,l.prototype):a.type==="rule"?Object.setPrototypeOf(a,u.prototype):a.type==="decl"?Object.setPrototypeOf(a,t.prototype):a.type==="comment"?Object.setPrototypeOf(a,e.prototype):a.type==="root"&&Object.setPrototypeOf(a,d.prototype),a[n]=!0,a.nodes&&a.nodes.forEach(r=>{c.rebuild(r)})},cn}var un,cl;function dn(){if(cl)return un;cl=1;let e=tt();class t extends e{constructor(i){super(i),this.type="atrule"}append(...i){return this.proxyOf.nodes||(this.nodes=[]),super.append(...i)}prepend(...i){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...i)}}return un=t,t.default=t,e.registerAtRule(t),un}var hn,ul;function pn(){if(ul)return hn;ul=1;let e=tt(),t,s;class i extends e{constructor(l){super(K({type:"document"},l)),this.nodes||(this.nodes=[])}toResult(l={}){return new t(new s,this,l).stringify()}}return i.registerLazyResult=n=>{t=n},i.registerProcessor=n=>{s=n},hn=i,i.default=i,hn}var mn,dl;function Nh(){if(dl)return mn;dl=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return mn={nanoid:(t=21)=>{let s="",i=t|0;for(;i--;)s+=e[Math.random()*64|0];return s},customAlphabet:(t,s=21)=>(i=s)=>{let n="",l=i|0;for(;l--;)n+=t[Math.random()*t.length|0];return n}},mn}var fn,hl;function pl(){if(hl)return fn;hl=1;let{existsSync:e,readFileSync:t}=Ne,{dirname:s,join:i}=Ne,{SourceMapConsumer:n,SourceMapGenerator:l}=Ne;function m(u){return Buffer?Buffer.from(u,"base64").toString():window.atob(u)}class d{constructor(o,h){if(h.map===!1)return;h.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(o),this.inline=this.startWith(this.annotation,"data:");let c=h.map?h.map.prev:void 0,a=this.loadMap(h.from,c);!this.mapFile&&h.from&&(this.mapFile=h.from),this.mapFile&&(this.root=s(this.mapFile)),a&&(this.text=a)}consumer(){return this.consumerCache||(this.consumerCache=new n(this.json||this.text)),this.consumerCache}decodeInline(o){let h=/^data:application\/json;charset=utf-?8;base64,/,c=/^data:application\/json;base64,/,a=/^data:application\/json;charset=utf-?8,/,r=/^data:application\/json,/,f=o.match(a)||o.match(r);if(f)return decodeURIComponent(o.substr(f[0].length));let p=o.match(h)||o.match(c);if(p)return m(o.substr(p[0].length));let y=o.slice(22);throw y=y.slice(0,y.indexOf(",")),new Error("Unsupported source map encoding "+y)}getAnnotationURL(o){return o.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(o){return typeof o!="object"?!1:typeof o.mappings=="string"||typeof o._mappings=="string"||Array.isArray(o.sections)}loadAnnotation(o){let h=o.match(/\/\*\s*# sourceMappingURL=/g);if(!h)return;let c=o.lastIndexOf(h.pop()),a=o.indexOf("*/",c);c>-1&&a>-1&&(this.annotation=this.getAnnotationURL(o.substring(c,a)))}loadFile(o,h,c){if(!(!c&&!this.unsafeMap&&!/\.map$/i.test(o))&&(this.root=s(o),e(o)))return this.mapFile=o,t(o,"utf-8").toString().trim()}loadMap(o,h){if(h===!1)return!1;if(h){if(typeof h=="string")return h;if(typeof h=="function"){let c=h(o);if(c){let a=this.loadFile(c,o,!0);if(!a)throw new Error("Unable to load previous source map: "+c.toString());return a}}else{if(h instanceof n)return l.fromSourceMap(h).toString();if(h instanceof l)return h.toString();if(this.isMap(h))return JSON.stringify(h);throw new Error("Unsupported previous source map format: "+h.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let c=this.annotation;o&&(c=i(s(o),c));let a=this.loadFile(c,o,!1);if(a)try{this.json=JSON.parse(a.replace(/^\)]}'[^\n]*\n/,""))}catch{return}return a}}}startWith(o,h){return o?o.substr(0,h.length)===h:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return fn=d,d.default=d,fn}var bn,ml;function ws(){if(ml)return bn;ml=1;let{nanoid:e}=Nh(),{isAbsolute:t,resolve:s}=Ne,{SourceMapConsumer:i,SourceMapGenerator:n}=Ne,{fileURLToPath:l,pathToFileURL:m}=Ne,d=en(),u=pl(),o=Ne,h=Symbol("lineToIndexCache"),c=!!(i&&n),a=!!(s&&t);function r(p){if(p[h])return p[h];let y=p.css.split(`
|
|
339
|
+
`),X=new Array(y.length),Z=0;for(let S=0,R=y.length;S<R;S++)X[S]=Z,Z+=y[S].length+1;return p[h]=X,X}class f{get from(){return this.file||this.id}constructor(y,X={}){if(y===null||typeof y>"u"||typeof y=="object"&&!y.toString)throw new Error(`PostCSS received ${y} instead of CSS string`);if(this.css=y.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,X.document&&(this.document=X.document.toString()),X.from&&(!a||/^\w+:\/\//.test(X.from)||t(X.from)?this.file=X.from:this.file=s(X.from)),a&&c){let Z=new u(this.css,X);if(Z.text){this.map=Z;let S=Z.consumer().file;!this.file&&S&&(this.file=this.mapResolve(S))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(y,X,Z,S={}){let R,b,g,G,v;if(X&&typeof X=="object"){let k=X,w=Z;if(typeof k.offset=="number"){G=k.offset;let N=this.fromOffset(G);X=N.line,Z=N.col}else X=k.line,Z=k.column,G=this.fromLineAndColumn(X,Z);if(typeof w.offset=="number"){g=w.offset;let N=this.fromOffset(g);b=N.line,R=N.col}else b=w.line,R=w.column,g=this.fromLineAndColumn(w.line,w.column)}else if(Z)G=this.fromLineAndColumn(X,Z);else{G=X;let k=this.fromOffset(G);X=k.line,Z=k.col}let V=this.origin(X,Z,b,R);return V?v=new d(y,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,S.plugin):v=new d(y,b===void 0?X:{column:Z,line:X},b===void 0?Z:{column:R,line:b},this.css,this.file,S.plugin),v.input={column:Z,endColumn:R,endLine:b,endOffset:g,line:X,offset:G,source:this.css},this.file&&(m&&(v.input.url=m(this.file).toString()),v.input.file=this.file),v}fromLineAndColumn(y,X){return r(this)[y-1]+X-1}fromOffset(y){let X=r(this),Z=X[X.length-1],S=0;if(y>=Z)S=X.length-1;else{let R=X.length-2,b;for(;S<R;)if(b=S+(R-S>>1),y<X[b])R=b-1;else if(y>=X[b+1])S=b+1;else{S=b;break}}return{col:y-X[S]+1,line:S+1}}mapResolve(y){return/^\w+:\/\//.test(y)?y:s(this.map.consumer().sourceRoot||this.map.root||".",y)}origin(y,X,Z,S){if(!this.map)return!1;let R=this.map.consumer(),b=R.originalPositionFor({column:X,line:y});if(!b.source)return!1;let g;typeof Z=="number"&&(g=R.originalPositionFor({column:S,line:Z}));let G;t(b.source)?G=m(b.source):G=new URL(b.source,this.map.consumer().sourceRoot||m(this.map.mapFile));let v={column:b.column,endColumn:g&&g.column,endLine:g&&g.line,line:b.line,url:G.toString()};if(G.protocol==="file:")if(l)v.file=l(G);else throw new Error("file: protocol is not available in this PostCSS build");let V=R.sourceContentFor(b.source);return V&&(v.source=V),v}toJSON(){let y={};for(let X of["hasBOM","css","file","id"])this[X]!=null&&(y[X]=this[X]);return this.map&&(y.map=K({},this.map),y.map.consumerCache&&(y.map.consumerCache=void 0)),y}}return bn=f,f.default=f,o&&o.registerInput&&o.registerInput(f),bn}var yn,fl;function Nt(){if(fl)return yn;fl=1;let e=tt(),t,s;class i extends e{constructor(l){super(l),this.type="root",this.nodes||(this.nodes=[])}normalize(l,m,d){let u=super.normalize(l);if(m){if(d==="prepend")this.nodes.length>1?m.raws.before=this.nodes[1].raws.before:delete m.raws.before;else if(this.first!==m)for(let o of u)o.raws.before=m.raws.before}return u}removeChild(l,m){let d=this.index(l);return!m&&d===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[d].raws.before),super.removeChild(l)}toResult(l={}){return new t(new s,this,l).stringify()}}return i.registerLazyResult=n=>{t=n},i.registerProcessor=n=>{s=n},yn=i,i.default=i,e.registerRoot(i),yn}var gn,bl;function yl(){if(bl)return gn;bl=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let s=[" ",`
|
|
340
|
+
`," "];return e.split(t,s)},split(t,s,i){let n=[],l="",m=!1,d=0,u=!1,o="",h=!1;for(let c of t)h?h=!1:c==="\\"?h=!0:u?c===o&&(u=!1):c==='"'||c==="'"?(u=!0,o=c):c==="("?d+=1:c===")"?d>0&&(d-=1):d===0&&s.includes(c)&&(m=!0),m?(l!==""&&n.push(l.trim()),l="",m=!1):l+=c;return(i||l!=="")&&n.push(l.trim()),n}};return gn=e,e.default=e,gn}var Zn,gl;function Sn(){if(gl)return Zn;gl=1;let e=tt(),t=yl();class s extends e{get selectors(){return t.comma(this.selector)}set selectors(n){let l=this.selector?this.selector.match(/,\s*/):null,m=l?l[0]:","+this.raw("between","beforeOpen");this.selector=n.join(m)}constructor(n){super(n),this.type="rule",this.nodes||(this.nodes=[])}}return Zn=s,s.default=s,e.registerRule(s),Zn}var In,Zl;function Jh(){if(Zl)return In;Zl=1;let e=dn(),t=Ws(),s=ks(),i=ws(),n=pl(),l=Nt(),m=Sn();function d(u,o){if(Array.isArray(u))return u.map(r=>d(r));let h=u,{inputs:c}=h,a=mt(h,["inputs"]);if(c){o=[];for(let r of c){let f=he(K({},r),{__proto__:i.prototype});f.map&&(f.map=he(K({},f.map),{__proto__:n.prototype})),o.push(f)}}if(a.nodes&&(a.nodes=u.nodes.map(r=>d(r,o))),a.source){let r=a.source,{inputId:f}=r,p=mt(r,["inputId"]);a.source=p,f!=null&&(a.source.input=o[f])}if(a.type==="root")return new l(a);if(a.type==="decl")return new s(a);if(a.type==="rule")return new m(a);if(a.type==="comment")return new t(a);if(a.type==="atrule")return new e(a);throw new Error("Unknown node type: "+u.type)}return In=d,d.default=d,In}var Vn,Sl;function Il(){if(Sl)return Vn;Sl=1;let{dirname:e,relative:t,resolve:s,sep:i}=Ne,{SourceMapConsumer:n,SourceMapGenerator:l}=Ne,{pathToFileURL:m}=Ne,d=ws(),u=!!(n&&l),o=!!(e&&s&&t&&i);class h{constructor(a,r,f,p){this.stringify=a,this.mapOpts=f.map||{},this.root=r,this.opts=f,this.css=p,this.originalCSS=p,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 r=`
|
|
341
341
|
`;this.css.includes(`\r
|
|
342
342
|
`)&&(r=`\r
|
|
343
343
|
`),this.css+=r+"/*# sourceMappingURL="+a+" */"}applyPrevMaps(){for(let a of this.previous()){let r=this.toUrl(this.path(a.file)),f=a.root||e(a.file),p;this.mapOpts.sourcesContent===!1?(p=new n(a.text),p.sourcesContent&&(p.sourcesContent=null)):p=a.consumer(),this.map.applySourceMap(p,r,this.toUrl(this.path(f)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1){if(this.root){let a;for(let r=this.root.nodes.length-1;r>=0;r--)a=this.root.nodes[r],a.type==="comment"&&a.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(r)}else if(this.css){let a;for(;(a=this.css.lastIndexOf("/*#"))!==-1;){let r=this.css.indexOf("*/",a+3);if(r===-1)break;for(;a>0&&this.css[a-1]===`
|
|
344
344
|
`;)a--;this.css=this.css.slice(0,a)+this.css.slice(r+2)}}}}generate(){if(this.clearAnnotation(),o&&u&&this.isMap())return this.generateMap();{let a="";return this.stringify(this.root,r=>{a+=r}),[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,r=1,f="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},y,X;this.stringify(this.root,(Z,S,R)=>{if(this.css+=Z,S&&R!=="end"&&(p.generated.line=a,p.generated.column=r-1,S.source&&S.source.start?(p.source=this.sourcePath(S),p.original.line=S.source.start.line,p.original.column=S.source.start.column-1,this.map.addMapping(p)):(p.source=f,p.original.line=1,p.original.column=0,this.map.addMapping(p))),X=Z.match(/\n/g),X?(a+=X.length,y=Z.lastIndexOf(`
|
|
345
|
-
`),r=Z.length-y):r+=Z.length,S&&R!=="start"){let b=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==b.last||b.raws.semicolon)&&(S.source&&S.source.end?(p.source=this.sourcePath(S),p.original.line=S.source.end.line,p.original.column=S.source.end.column-1,p.generated.line=a,p.generated.column=r-2,this.map.addMapping(p)):(p.source=f,p.original.line=1,p.original.column=0,p.generated.line=a,p.generated.column=r-1,this.map.addMapping(p)))}})}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(r=>r.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 r=this.memoizedPaths.get(a);if(r)return r;let f=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(f=e(s(f,this.mapOpts.annotation)));let p=t(f,a);return this.memoizedPaths.set(a,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(a=>{if(a.source&&a.source.input.map){let r=a.source.input.map;this.previousMaps.includes(r)||this.previousMaps.push(r)}});else{let a=new d(this.originalCSS,this.opts);a.map&&this.previousMaps.push(a.map)}return this.previousMaps}setSourcesContent(){let a={};if(this.root)this.root.walk(r=>{if(r.source){let f=r.source.input.from;if(f&&!a[f]){a[f]=!0;let p=this.usesFileUrls?this.toFileUrl(f):this.toUrl(this.path(f));this.map.setSourceContent(p,r.source.input.css)}}});else if(this.css){let r=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(r,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 r=this.memoizedFileURLs.get(a);if(r)return r;if(m){let f=m(a).toString();return this.memoizedFileURLs.set(a,f),f}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(a){let r=this.memoizedURLs.get(a);if(r)return r;i==="\\"&&(a=a.replace(/\\/g,"/"));let f=encodeURI(a).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(a,f),f}}return In=h,In}var Vn,Zl;function Ch(){if(Zl)return Vn;Zl=1;const e=39,t=34,s=92,i=47,n=10,l=32,m=12,d=9,u=13,o=91,h=93,c=40,a=41,r=123,f=125,p=59,y=42,X=58,Z=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,R=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,b=/.[\r\n"'(/\\]/,g=/[\da-f]/i;return Vn=function(G,v={}){let V=G.css.valueOf(),k=v.ignoreErrors,w,N,z,I,W,L,U,F,J,D,E=V.length,x=0,se=[],ne=[],ee=-1;function ve(){return x}function Ie(ie){throw G.error("Unclosed "+ie,x)}function Me(){return ne.length===0&&x>=E}function Ae(ie){if(ne.length)return ne.pop();if(x>=E)return;let de=ie?ie.ignoreUnclosed:!1;switch(w=V.charCodeAt(x),w){case n:case l:case d:case u:case m:{I=x;do I+=1,w=V.charCodeAt(I);while(w===l||w===n||w===d||w===u||w===m);L=["space",V.slice(x,I)],x=I-1;break}case o:case h:case r:case f:case X:case p:case a:{let We=String.fromCharCode(w);L=[We,We,x];break}case c:{if(D=se.length?se.pop()[1]:"",J=V.charCodeAt(x+1),D==="url"&&J!==e&&J!==t&&J!==l&&J!==n&&J!==d&&J!==m&&J!==u){I=x;do{if(U=!1,I=V.indexOf(")",I+1),I===-1)if(k||de){I=x;break}else Ie("bracket");for(F=I;V.charCodeAt(F-1)===s;)F-=1,U=!U}while(U);L=["brackets",V.slice(x,I+1),x,I],x=I}else x<=ee?L=["(","(",x]:(I=V.indexOf(")",x+1),N=V.slice(x,I+1),I===-1||b.test(N)?(ee=I===-1?E:I,L=["(","(",x]):(L=["brackets",N,x,I],x=I));break}case e:case t:{W=w===e?"'":'"',I=x;do{if(U=!1,I=V.indexOf(W,I+1),I===-1)if(k||de){I=x+1;break}else Ie("string");for(F=I;V.charCodeAt(F-1)===s;)F-=1,U=!U}while(U);L=["string",V.slice(x,I+1),x,I],x=I;break}case Z:{S.lastIndex=x+1,S.test(V),S.lastIndex===0?I=V.length-1:I=S.lastIndex-2,L=["at-word",V.slice(x,I+1),x,I],x=I;break}case s:{for(I=x,z=!0;V.charCodeAt(I+1)===s;)I+=1,z=!z;if(w=V.charCodeAt(I+1),z&&w!==i&&w!==l&&w!==n&&w!==d&&w!==u&&w!==m&&(I+=1,g.test(V.charAt(I)))){for(;g.test(V.charAt(I+1));)I+=1;V.charCodeAt(I+1)===l&&(I+=1)}L=["word",V.slice(x,I+1),x,I],x=I;break}default:{w===i&&V.charCodeAt(x+1)===y?(I=V.indexOf("*/",x+2)+1,I===0&&(k||de?I=V.length:Ie("comment")),L=["comment",V.slice(x,I+1),x,I],x=I):(R.lastIndex=x+1,R.test(V),R.lastIndex===0?I=V.length-1:I=R.lastIndex-2,L=["word",V.slice(x,I+1),x,I],se.push(L),x=I);break}}return x++,L}function _e(ie){ne.push(ie)}return{back:_e,endOfFile:Me,nextToken:Ae,position:ve}},Vn}var Xn,Sl;function xh(){if(Sl)return Xn;Sl=1;let e=un(),t=Ws(),s=ks(),i=Nt(),n=Zn(),l=Ch();const m={empty:!0,space:!0};function d(h){for(let c=h.length-1;c>=0;c--){let a=h[c],r=a[3]||a[2];if(r)return r}}function u(h,c,a){let r="";for(let f=c;f<a;f++)r+=h[f][1];return r}class o{constructor(c){this.input=c,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:c,start:{column:1,line:1,offset:0}}}atrule(c){let a=new e;a.name=c[1].slice(1),a.name===""&&this.unnamedAtrule(a,c),this.init(a,c[2]);let r,f,p,y=!1,X=!1,Z=[],S=[];for(;!this.tokenizer.endOfFile();){if(c=this.tokenizer.nextToken(),r=c[0],r==="("||r==="["?S.push(r==="("?")":"]"):r==="{"&&S.length>0?S.push("}"):r===S[S.length-1]&&S.pop(),S.length===0)if(r===";"){a.source.end=this.getPosition(c[2]),a.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){X=!0;break}else if(r==="}"){if(Z.length>0){for(p=Z.length-1,f=Z[p];f&&f[0]==="space";)f=Z[--p];f&&(a.source.end=this.getPosition(f[3]||f[2]),a.source.end.offset++)}this.end(c);break}else Z.push(c);else Z.push(c);if(this.tokenizer.endOfFile()){y=!0;break}}a.raws.between=this.spacesAndCommentsFromEnd(Z),Z.length?(a.raws.afterName=this.spacesAndCommentsFromStart(Z),this.raw(a,"params",Z),y&&(c=Z[Z.length-1],a.source.end=this.getPosition(c[3]||c[2]),a.source.end.offset++,this.spaces=a.raws.between,a.raws.between="")):(a.raws.afterName="",a.params=""),X&&(a.nodes=[],this.current=a)}checkMissedSemicolon(c){let a=this.colon(c);if(a===!1)return;let r=0,f;for(let p=a-1;p>=0&&(f=c[p],!(f[0]!=="space"&&(r+=1,r===2)));p--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(c){let a=0,r,f,p;for(let[y,X]of c.entries()){if(f=X,p=f[0],p==="("&&(a+=1),p===")"&&(a-=1),a===0&&p===":")if(!r)this.doubleColon(f);else{if(r[0]==="word"&&r[1]==="progid")continue;return y}r=f}return!1}comment(c){let a=new t;this.init(a,c[2]),a.source.end=this.getPosition(c[3]||c[2]),a.source.end.offset++;let r=c[1].slice(2,-2);if(!r.trim())a.text="",a.raws.left=r,a.raws.right="";else{let f=r.match(/^(\s*)([^]*\S)(\s*)$/);a.text=f[2],a.raws.left=f[1],a.raws.right=f[3]}}createTokenizer(){this.tokenizer=l(this.input)}decl(c,a){let r=new s;this.init(r,c[0][2]);let f=c[c.length-1];f[0]===";"&&(this.semicolon=!0,c.pop()),r.source.end=this.getPosition(f[3]||f[2]||d(c)),r.source.end.offset++;let p=0;for(;c[p][0]!=="word";)p===c.length-1&&this.unknownWord([c[p]]),p++;r.raws.before+=u(c,0,p),r.source.start=this.getPosition(c[p][2]);let y=p;for(;p<c.length;){let b=c[p][0];if(b===":"||b==="space"||b==="comment")break;p++}r.prop=u(c,y,p);let X=p,Z;for(;p<c.length&&(Z=c[p],p++,Z[0]!==":");)Z[0]==="word"&&/\w/.test(Z[1])&&this.unknownWord([Z]);r.raws.between=u(c,X,p),(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let S=p;for(;p<c.length;){let b=c[p][0];if(b!=="space"&&b!=="comment")break;p++}let R=c.slice(S,p);c=c.slice(p),this.precheckMissedSemicolon(c);for(let b=c.length-1;b>=0;b--){if(Z=c[b],Z[1].toLowerCase()==="!important"){r.important=!0;let g=this.stringFrom(c,b);g=this.spacesFromEnd(c)+g,g!==" !important"&&(r.raws.important=g);break}else if(Z[1].toLowerCase()==="important"){let g=c.slice(0),G="";for(let v=b;v>0;v--){let V=g[v][0];if(G.trim().startsWith("!")&&V!=="space")break;G=g.pop()[1]+G}G.trim().startsWith("!")&&(r.important=!0,r.raws.important=G,c=g)}if(Z[0]!=="space"&&Z[0]!=="comment")break}c.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(r.raws.between+=R.map(b=>b[1]).join(""),R=[]),this.raw(r,"value",R.concat(c),a),r.value.includes(":")&&!a&&this.checkMissedSemicolon(c)}doubleColon(c){throw this.input.error("Double colon",{offset:c[2]},{offset:c[2]+c[1].length})}emptyRule(c){let a=new n;this.init(a,c[2]),a.selector="",a.raws.between="",this.current=a}end(c){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(c[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(c)}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(c){if(this.spaces+=c[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(c[2]),a.source.end.offset+=a.raws.ownSemicolon.length)}}getPosition(c){let a=this.input.fromOffset(c);return{column:a.col,line:a.line,offset:c}}init(c,a){this.current.push(c),c.source={input:this.input,start:this.getPosition(a)},c.raws.before=this.spaces,this.spaces="",c.type!=="comment"&&(this.semicolon=!1)}other(c){let a=!1,r=null,f=!1,p=null,y=[],X=c[1].startsWith("--"),Z=[],S=c;for(;S;){if(r=S[0],Z.push(S),r==="("||r==="[")p||(p=S),y.push(r==="("?")":"]");else if(X&&f&&r==="{")p||(p=S),y.push("}");else if(y.length===0)if(r===";")if(f){this.decl(Z,X);return}else break;else if(r==="{"){this.rule(Z);return}else if(r==="}"){this.tokenizer.back(Z.pop()),a=!0;break}else r===":"&&(f=!0);else r===y[y.length-1]&&(y.pop(),y.length===0&&(p=null));S=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(a=!0),y.length>0&&this.unclosedBracket(p),a&&f){if(!X)for(;Z.length&&(S=Z[Z.length-1][0],!(S!=="space"&&S!=="comment"));)this.tokenizer.back(Z.pop());this.decl(Z,X)}else this.unknownWord(Z)}parse(){let c;for(;!this.tokenizer.endOfFile();)switch(c=this.tokenizer.nextToken(),c[0]){case"space":this.spaces+=c[1];break;case";":this.freeSemicolon(c);break;case"}":this.end(c);break;case"comment":this.comment(c);break;case"at-word":this.atrule(c);break;case"{":this.emptyRule(c);break;default:this.other(c);break}this.endFile()}precheckMissedSemicolon(){}raw(c,a,r,f){let p,y,X=r.length,Z="",S=!0,R,b;for(let g=0;g<X;g+=1)p=r[g],y=p[0],y==="space"&&g===X-1&&!f?S=!1:y==="comment"?(b=r[g-1]?r[g-1][0]:"empty",R=r[g+1]?r[g+1][0]:"empty",!m[b]&&!m[R]?Z.slice(-1)===","?S=!1:Z+=p[1]:S=!1):Z+=p[1];if(!S){let g=r.reduce((G,v)=>G+v[1],"");c.raws[a]={raw:g,value:Z}}c[a]=Z}rule(c){c.pop();let a=new n;this.init(a,c[0][2]),a.raws.between=this.spacesAndCommentsFromEnd(c),this.raw(a,"selector",c),this.current=a}spacesAndCommentsFromEnd(c){let a,r="";for(;c.length&&(a=c[c.length-1][0],!(a!=="space"&&a!=="comment"));)r=c.pop()[1]+r;return r}spacesAndCommentsFromStart(c){let a,r="";for(;c.length&&(a=c[0][0],!(a!=="space"&&a!=="comment"));)r+=c.shift()[1];return r}spacesFromEnd(c){let a,r="";for(;c.length&&(a=c[c.length-1][0],a==="space");)r=c.pop()[1]+r;return r}stringFrom(c,a){let r="";for(let f=a;f<c.length;f++)r+=c[f][1];return c.splice(a,c.length-a),r}unclosedBlock(){let c=this.current.source.start;throw this.input.error("Unclosed block",c.line,c.column)}unclosedBracket(c){throw this.input.error("Unclosed bracket",{offset:c[2]},{offset:c[2]+1})}unexpectedClose(c){throw this.input.error("Unexpected }",{offset:c[2]},{offset:c[2]+1})}unknownWord(c){throw this.input.error("Unknown word "+c[0][1],{offset:c[0][2]},{offset:c[0][2]+c[0][1].length})}unnamedAtrule(c,a){throw this.input.error("At-rule without name",{offset:a[2]},{offset:a[2]+a[1].length})}}return Xn=o,Xn}var Gn,Il;function Rn(){if(Il)return Gn;Il=1;let e=tt(),t=ws(),s=xh();function i(n,l){let m=new t(n,l),d=new s(m);try{d.parse()}catch(u){throw process.env.NODE_ENV!=="production"&&u.name==="CssSyntaxError"&&l&&l.from&&(/\.scss$/i.test(l.from)?u.message+=`
|
|
345
|
+
`),r=Z.length-y):r+=Z.length,S&&R!=="start"){let b=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==b.last||b.raws.semicolon)&&(S.source&&S.source.end?(p.source=this.sourcePath(S),p.original.line=S.source.end.line,p.original.column=S.source.end.column-1,p.generated.line=a,p.generated.column=r-2,this.map.addMapping(p)):(p.source=f,p.original.line=1,p.original.column=0,p.generated.line=a,p.generated.column=r-1,this.map.addMapping(p)))}})}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(r=>r.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 r=this.memoizedPaths.get(a);if(r)return r;let f=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(f=e(s(f,this.mapOpts.annotation)));let p=t(f,a);return this.memoizedPaths.set(a,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(a=>{if(a.source&&a.source.input.map){let r=a.source.input.map;this.previousMaps.includes(r)||this.previousMaps.push(r)}});else{let a=new d(this.originalCSS,this.opts);a.map&&this.previousMaps.push(a.map)}return this.previousMaps}setSourcesContent(){let a={};if(this.root)this.root.walk(r=>{if(r.source){let f=r.source.input.from;if(f&&!a[f]){a[f]=!0;let p=this.usesFileUrls?this.toFileUrl(f):this.toUrl(this.path(f));this.map.setSourceContent(p,r.source.input.css)}}});else if(this.css){let r=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(r,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 r=this.memoizedFileURLs.get(a);if(r)return r;if(m){let f=m(a).toString();return this.memoizedFileURLs.set(a,f),f}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(a){let r=this.memoizedURLs.get(a);if(r)return r;i==="\\"&&(a=a.replace(/\\/g,"/"));let f=encodeURI(a).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(a,f),f}}return Vn=h,Vn}var Xn,Vl;function Yh(){if(Vl)return Xn;Vl=1;const e=39,t=34,s=92,i=47,n=10,l=32,m=12,d=9,u=13,o=91,h=93,c=40,a=41,r=123,f=125,p=59,y=42,X=58,Z=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,R=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,b=/.[\r\n"'(/\\]/,g=/[\da-f]/i;return Xn=function(G,v={}){let V=G.css.valueOf(),k=v.ignoreErrors,w,N,z,I,W,T,U,F,J,D,O=V.length,x=0,se=[],ne=[],ee=-1;function ve(){return x}function Ie(ie){throw G.error("Unclosed "+ie,x)}function Me(){return ne.length===0&&x>=O}function Ae(ie){if(ne.length)return ne.pop();if(x>=O)return;let de=ie?ie.ignoreUnclosed:!1;switch(w=V.charCodeAt(x),w){case n:case l:case d:case u:case m:{I=x;do I+=1,w=V.charCodeAt(I);while(w===l||w===n||w===d||w===u||w===m);T=["space",V.slice(x,I)],x=I-1;break}case o:case h:case r:case f:case X:case p:case a:{let We=String.fromCharCode(w);T=[We,We,x];break}case c:{if(D=se.length?se.pop()[1]:"",J=V.charCodeAt(x+1),D==="url"&&J!==e&&J!==t&&J!==l&&J!==n&&J!==d&&J!==m&&J!==u){I=x;do{if(U=!1,I=V.indexOf(")",I+1),I===-1)if(k||de){I=x;break}else Ie("bracket");for(F=I;V.charCodeAt(F-1)===s;)F-=1,U=!U}while(U);T=["brackets",V.slice(x,I+1),x,I],x=I}else x<=ee?T=["(","(",x]:(I=V.indexOf(")",x+1),N=V.slice(x,I+1),I===-1||b.test(N)?(ee=I===-1?O:I,T=["(","(",x]):(T=["brackets",N,x,I],x=I));break}case e:case t:{W=w===e?"'":'"',I=x;do{if(U=!1,I=V.indexOf(W,I+1),I===-1)if(k||de){I=x+1;break}else Ie("string");for(F=I;V.charCodeAt(F-1)===s;)F-=1,U=!U}while(U);T=["string",V.slice(x,I+1),x,I],x=I;break}case Z:{S.lastIndex=x+1,S.test(V),S.lastIndex===0?I=V.length-1:I=S.lastIndex-2,T=["at-word",V.slice(x,I+1),x,I],x=I;break}case s:{for(I=x,z=!0;V.charCodeAt(I+1)===s;)I+=1,z=!z;if(w=V.charCodeAt(I+1),z&&w!==i&&w!==l&&w!==n&&w!==d&&w!==u&&w!==m&&(I+=1,g.test(V.charAt(I)))){for(;g.test(V.charAt(I+1));)I+=1;V.charCodeAt(I+1)===l&&(I+=1)}T=["word",V.slice(x,I+1),x,I],x=I;break}default:{w===i&&V.charCodeAt(x+1)===y?(I=V.indexOf("*/",x+2)+1,I===0&&(k||de?I=V.length:Ie("comment")),T=["comment",V.slice(x,I+1),x,I],x=I):(R.lastIndex=x+1,R.test(V),R.lastIndex===0?I=V.length-1:I=R.lastIndex-2,T=["word",V.slice(x,I+1),x,I],se.push(T),x=I);break}}return x++,T}function _e(ie){ne.push(ie)}return{back:_e,endOfFile:Me,nextToken:Ae,position:ve}},Xn}var Gn,Xl;function Uh(){if(Xl)return Gn;Xl=1;let e=dn(),t=Ws(),s=ks(),i=Nt(),n=Sn(),l=Yh();const m={empty:!0,space:!0};function d(h){for(let c=h.length-1;c>=0;c--){let a=h[c],r=a[3]||a[2];if(r)return r}}function u(h,c,a){let r="";for(let f=c;f<a;f++)r+=h[f][1];return r}class o{constructor(c){this.input=c,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:c,start:{column:1,line:1,offset:0}}}atrule(c){let a=new e;a.name=c[1].slice(1),a.name===""&&this.unnamedAtrule(a,c),this.init(a,c[2]);let r,f,p,y=!1,X=!1,Z=[],S=[];for(;!this.tokenizer.endOfFile();){if(c=this.tokenizer.nextToken(),r=c[0],r==="("||r==="["?S.push(r==="("?")":"]"):r==="{"&&S.length>0?S.push("}"):r===S[S.length-1]&&S.pop(),S.length===0)if(r===";"){a.source.end=this.getPosition(c[2]),a.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){X=!0;break}else if(r==="}"){if(Z.length>0){for(p=Z.length-1,f=Z[p];f&&f[0]==="space";)f=Z[--p];f&&(a.source.end=this.getPosition(f[3]||f[2]),a.source.end.offset++)}this.end(c);break}else Z.push(c);else Z.push(c);if(this.tokenizer.endOfFile()){y=!0;break}}a.raws.between=this.spacesAndCommentsFromEnd(Z),Z.length?(a.raws.afterName=this.spacesAndCommentsFromStart(Z),this.raw(a,"params",Z),y&&(c=Z[Z.length-1],a.source.end=this.getPosition(c[3]||c[2]),a.source.end.offset++,this.spaces=a.raws.between,a.raws.between="")):(a.raws.afterName="",a.params=""),X&&(a.nodes=[],this.current=a)}checkMissedSemicolon(c){let a=this.colon(c);if(a===!1)return;let r=0,f;for(let p=a-1;p>=0&&(f=c[p],!(f[0]!=="space"&&(r+=1,r===2)));p--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(c){let a=0,r,f,p;for(let[y,X]of c.entries()){if(f=X,p=f[0],p==="("&&(a+=1),p===")"&&(a-=1),a===0&&p===":")if(!r)this.doubleColon(f);else{if(r[0]==="word"&&r[1]==="progid")continue;return y}r=f}return!1}comment(c){let a=new t;this.init(a,c[2]),a.source.end=this.getPosition(c[3]||c[2]),a.source.end.offset++;let r=c[1].slice(2,-2);if(!r.trim())a.text="",a.raws.left=r,a.raws.right="";else{let f=r.match(/^(\s*)([^]*\S)(\s*)$/);a.text=f[2],a.raws.left=f[1],a.raws.right=f[3]}}createTokenizer(){this.tokenizer=l(this.input)}decl(c,a){let r=new s;this.init(r,c[0][2]);let f=c[c.length-1];f[0]===";"&&(this.semicolon=!0,c.pop()),r.source.end=this.getPosition(f[3]||f[2]||d(c)),r.source.end.offset++;let p=0;for(;c[p][0]!=="word";)p===c.length-1&&this.unknownWord([c[p]]),p++;r.raws.before+=u(c,0,p),r.source.start=this.getPosition(c[p][2]);let y=p;for(;p<c.length;){let b=c[p][0];if(b===":"||b==="space"||b==="comment")break;p++}r.prop=u(c,y,p);let X=p,Z;for(;p<c.length&&(Z=c[p],p++,Z[0]!==":");)Z[0]==="word"&&/\w/.test(Z[1])&&this.unknownWord([Z]);r.raws.between=u(c,X,p),(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let S=p;for(;p<c.length;){let b=c[p][0];if(b!=="space"&&b!=="comment")break;p++}let R=c.slice(S,p);c=c.slice(p),this.precheckMissedSemicolon(c);for(let b=c.length-1;b>=0;b--){if(Z=c[b],Z[1].toLowerCase()==="!important"){r.important=!0;let g=this.stringFrom(c,b);g=this.spacesFromEnd(c)+g,g!==" !important"&&(r.raws.important=g);break}else if(Z[1].toLowerCase()==="important"){let g=c.slice(0),G="";for(let v=b;v>0;v--){let V=g[v][0];if(G.trim().startsWith("!")&&V!=="space")break;G=g.pop()[1]+G}G.trim().startsWith("!")&&(r.important=!0,r.raws.important=G,c=g)}if(Z[0]!=="space"&&Z[0]!=="comment")break}c.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(r.raws.between+=R.map(b=>b[1]).join(""),R=[]),this.raw(r,"value",R.concat(c),a),r.value.includes(":")&&!a&&this.checkMissedSemicolon(c)}doubleColon(c){throw this.input.error("Double colon",{offset:c[2]},{offset:c[2]+c[1].length})}emptyRule(c){let a=new n;this.init(a,c[2]),a.selector="",a.raws.between="",this.current=a}end(c){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(c[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(c)}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(c){if(this.spaces+=c[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(c[2]),a.source.end.offset+=a.raws.ownSemicolon.length)}}getPosition(c){let a=this.input.fromOffset(c);return{column:a.col,line:a.line,offset:c}}init(c,a){this.current.push(c),c.source={input:this.input,start:this.getPosition(a)},c.raws.before=this.spaces,this.spaces="",c.type!=="comment"&&(this.semicolon=!1)}other(c){let a=!1,r=null,f=!1,p=null,y=[],X=c[1].startsWith("--"),Z=[],S=c;for(;S;){if(r=S[0],Z.push(S),r==="("||r==="[")p||(p=S),y.push(r==="("?")":"]");else if(X&&f&&r==="{")p||(p=S),y.push("}");else if(y.length===0)if(r===";")if(f){this.decl(Z,X);return}else break;else if(r==="{"){this.rule(Z);return}else if(r==="}"){this.tokenizer.back(Z.pop()),a=!0;break}else r===":"&&(f=!0);else r===y[y.length-1]&&(y.pop(),y.length===0&&(p=null));S=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(a=!0),y.length>0&&this.unclosedBracket(p),a&&f){if(!X)for(;Z.length&&(S=Z[Z.length-1][0],!(S!=="space"&&S!=="comment"));)this.tokenizer.back(Z.pop());this.decl(Z,X)}else this.unknownWord(Z)}parse(){let c;for(;!this.tokenizer.endOfFile();)switch(c=this.tokenizer.nextToken(),c[0]){case"space":this.spaces+=c[1];break;case";":this.freeSemicolon(c);break;case"}":this.end(c);break;case"comment":this.comment(c);break;case"at-word":this.atrule(c);break;case"{":this.emptyRule(c);break;default:this.other(c);break}this.endFile()}precheckMissedSemicolon(){}raw(c,a,r,f){let p,y,X=r.length,Z="",S=!0,R,b;for(let g=0;g<X;g+=1)p=r[g],y=p[0],y==="space"&&g===X-1&&!f?S=!1:y==="comment"?(b=r[g-1]?r[g-1][0]:"empty",R=r[g+1]?r[g+1][0]:"empty",!m[b]&&!m[R]?Z.slice(-1)===","?S=!1:Z+=p[1]:S=!1):Z+=p[1];if(!S){let g=r.reduce((G,v)=>G+v[1],"");c.raws[a]={raw:g,value:Z}}c[a]=Z}rule(c){c.pop();let a=new n;this.init(a,c[0][2]),a.raws.between=this.spacesAndCommentsFromEnd(c),this.raw(a,"selector",c),this.current=a}spacesAndCommentsFromEnd(c){let a,r="";for(;c.length&&(a=c[c.length-1][0],!(a!=="space"&&a!=="comment"));)r=c.pop()[1]+r;return r}spacesAndCommentsFromStart(c){let a,r="";for(;c.length&&(a=c[0][0],!(a!=="space"&&a!=="comment"));)r+=c.shift()[1];return r}spacesFromEnd(c){let a,r="";for(;c.length&&(a=c[c.length-1][0],a==="space");)r=c.pop()[1]+r;return r}stringFrom(c,a){let r="";for(let f=a;f<c.length;f++)r+=c[f][1];return c.splice(a,c.length-a),r}unclosedBlock(){let c=this.current.source.start;throw this.input.error("Unclosed block",c.line,c.column)}unclosedBracket(c){throw this.input.error("Unclosed bracket",{offset:c[2]},{offset:c[2]+1})}unexpectedClose(c){throw this.input.error("Unexpected }",{offset:c[2]},{offset:c[2]+1})}unknownWord(c){throw this.input.error("Unknown word "+c[0][1],{offset:c[0][2]},{offset:c[0][2]+c[0][1].length})}unnamedAtrule(c,a){throw this.input.error("At-rule without name",{offset:a[2]},{offset:a[2]+a[1].length})}}return Gn=o,Gn}var Rn,Gl;function vn(){if(Gl)return Rn;Gl=1;let e=tt(),t=ws(),s=Uh();function i(n,l){let m=new t(n,l),d=new s(m);try{d.parse()}catch(u){throw process.env.NODE_ENV!=="production"&&u.name==="CssSyntaxError"&&l&&l.from&&(/\.scss$/i.test(l.from)?u.message+=`
|
|
346
346
|
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(l.from)?u.message+=`
|
|
347
347
|
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(l.from)&&(u.message+=`
|
|
348
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),u}return d.root}return Gn=i,i.default=i,e.registerParse(i),Gn}var vn,Vl;function Xl(){if(Vl)return vn;Vl=1;class e{constructor(s,i={}){if(this.type="warning",this.text=s,i.node&&i.node.source){let n=i.node.rangeBy(i);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in i)this[n]=i[n]}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 vn=e,e.default=e,vn}var Wn,Gl;function kn(){if(Gl)return Wn;Gl=1;let e=Xl();class t{get content(){return this.css}constructor(i,n,l){this.processor=i,this.messages=[],this.root=n,this.opts=l,this.css="",this.map=void 0}toString(){return this.css}warn(i,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let l=new e(i,n);return this.messages.push(l),l}warnings(){return this.messages.filter(i=>i.type==="warning")}}return Wn=t,t.default=t,Wn}var wn,Rl;function vl(){if(Rl)return wn;Rl=1;let e={};return wn=function(t){e[t]||(e[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},wn}var Cn,Wl;function kl(){if(Wl)return Cn;Wl=1;let e=tt(),t=hn(),s=gl(),i=Rn(),n=kn(),l=Nt(),m=Rs(),{isClean:d,my:u}=nn(),o=vl();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},r=0;function f(R){return typeof R=="object"&&typeof R.then=="function"}function p(R){let b=!1,g=h[R.type];return R.type==="decl"?b=R.prop.toLowerCase():R.type==="atrule"&&(b=R.name.toLowerCase()),b&&R.append?[g,g+"-"+b,r,g+"Exit",g+"Exit-"+b]:b?[g,g+"-"+b,g+"Exit",g+"Exit-"+b]:R.append?[g,r,g+"Exit"]:[g,g+"Exit"]}function y(R){let b;return R.type==="document"?b=["Document",r,"DocumentExit"]:R.type==="root"?b=["Root",r,"RootExit"]:b=p(R),{eventIndex:0,events:b,iterator:0,node:R,visitorIndex:0,visitors:[]}}function X(R){return R[d]=!1,R.nodes&&R.nodes.forEach(b=>X(b)),R}let Z={};class S{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(b,g,G){this.stringified=!1,this.processed=!1;let v;if(typeof g=="object"&&g!==null&&(g.type==="root"||g.type==="document"))v=X(g);else if(g instanceof S||g instanceof n)v=X(g.root),g.map&&(typeof G.map>"u"&&(G.map={}),G.map.inline||(G.map.inline=!1),G.map.prev=g.map);else{let V=i;G.syntax&&(V=G.syntax.parse),G.parser&&(V=G.parser),V.parse&&(V=V.parse);try{v=V(g,G)}catch(k){this.processed=!0,this.error=k}v&&!v[u]&&e.rebuild(v)}this.result=new n(b,v,G),this.helpers=he(K({},Z),{postcss:Z,result:this.result}),this.plugins=this.processor.plugins.map(V=>typeof V=="object"&&V.prepare?K(K({},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(b){return this.async().catch(b)}finally(b){return this.async().then(b,b)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(b,g){let G=this.result.lastPlugin;try{if(g&&g.addToError(b),this.error=b,b.name==="CssSyntaxError"&&!b.plugin)b.plugin=G.postcssPlugin,b.setMessage();else if(G.postcssVersion&&process.env.NODE_ENV!=="production"){let v=G.postcssPlugin,V=G.postcssVersion,k=this.result.processor.version,w=V.split("."),N=k.split(".");(w[0]!==N[0]||parseInt(w[1])>parseInt(N[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+k+", but "+v+" uses "+V+". Perhaps this is the source of the error below.")}}catch(v){console&&console.error&&console.error(v)}return b}prepareVisitors(){this.listeners={};let b=(g,G,v)=>{this.listeners[G]||(this.listeners[G]=[]),this.listeners[G].push([g,v])};for(let g of this.plugins)if(typeof g=="object")for(let G in g){if(!c[G]&&/^[A-Z]/.test(G))throw new Error(`Unknown event ${G} in ${g.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!a[G])if(typeof g[G]=="object")for(let v in g[G])v==="*"?b(g,G,g[G][v]):b(g,G+"-"+v.toLowerCase(),g[G][v]);else typeof g[G]=="function"&&b(g,G,g[G])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return ye(this,null,function*(){this.plugin=0;for(let b=0;b<this.plugins.length;b++){let g=this.plugins[b],G=this.runOnRoot(g);if(f(G))try{yield G}catch(v){throw this.handleError(v)}}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[d];){b[d]=!0;let g=[y(b)];for(;g.length>0;){let G=this.visitTick(g);if(f(G))try{yield G}catch(v){let V=g[g.length-1].node;throw this.handleError(v,V)}}}if(this.listeners.OnceExit)for(let[g,G]of this.listeners.OnceExit){this.result.lastPlugin=g;try{if(b.type==="document"){let v=b.nodes.map(V=>G(V,this.helpers));yield Promise.all(v)}else yield G(b,this.helpers)}catch(v){throw this.handleError(v)}}}return this.processed=!0,this.stringify()})}runOnRoot(b){this.result.lastPlugin=b;try{if(typeof b=="object"&&b.Once){if(this.result.root.type==="document"){let g=this.result.root.nodes.map(G=>b.Once(G,this.helpers));return f(g[0])?Promise.all(g):g}return b.Once(this.result.root,this.helpers)}else if(typeof b=="function")return b(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 b=this.result.opts,g=m;b.syntax&&(g=b.syntax.stringify),b.stringifier&&(g=b.stringifier),g.stringify&&(g=g.stringify);let G=this.result.root.source;if(b.map===void 0&&!(G&&G.input&&G.input.map)){let V="";return g(this.result.root,k=>{V+=k}),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 b of this.plugins){let g=this.runOnRoot(b);if(f(g))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[d];)b[d]=!0,this.walkSync(b);if(this.listeners.OnceExit)if(b.type==="document")for(let g of b.nodes)this.visitSync(this.listeners.OnceExit,g);else this.visitSync(this.listeners.OnceExit,b)}return this.result}then(b,g){return process.env.NODE_ENV!=="production"&&("from"in this.opts||o("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(b,g)}toString(){return this.css}visitSync(b,g){for(let[G,v]of b){this.result.lastPlugin=G;let V;try{V=v(g,this.helpers)}catch(k){throw this.handleError(k,g.proxyOf)}if(g.type!=="root"&&g.type!=="document"&&!g.parent)return!0;if(f(V))throw this.getAsyncError()}}visitTick(b){let g=b[b.length-1],{node:G,visitors:v}=g;if(G.type!=="root"&&G.type!=="document"&&!G.parent){b.pop();return}if(v.length>0&&g.visitorIndex<v.length){let[k,w]=v[g.visitorIndex];g.visitorIndex+=1,g.visitorIndex===v.length&&(g.visitors=[],g.visitorIndex=0),this.result.lastPlugin=k;try{return w(G.toProxy(),this.helpers)}catch(N){throw this.handleError(N,G)}}if(g.iterator!==0){let k=g.iterator,w;for(;w=G.nodes[G.indexes[k]];)if(G.indexes[k]+=1,!w[d]){w[d]=!0,b.push(y(w));return}g.iterator=0,delete G.indexes[k]}let V=g.events;for(;g.eventIndex<V.length;){let k=V[g.eventIndex];if(g.eventIndex+=1,k===r){G.nodes&&G.nodes.length&&(G[d]=!0,g.iterator=G.getIterator());return}else if(this.listeners[k]){g.visitors=this.listeners[k];return}}b.pop()}walkSync(b){b[d]=!0;let g=p(b);for(let G of g)if(G===r)b.nodes&&b.each(v=>{v[d]||this.walkSync(v)});else{let v=this.listeners[G];if(v&&this.visitSync(v,b.toProxy()))return}}warnings(){return this.sync().warnings()}}return S.registerPostcss=R=>{Z=R},Cn=S,S.default=S,l.registerLazyResult(S),t.registerLazyResult(S),Cn}var xn,wl;function Lh(){if(wl)return xn;wl=1;let e=gl(),t=Rn(),s=kn(),i=Rs(),n=vl();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 d,u=t;try{d=u(this._css,this._opts)}catch(o){this.error=o}if(this.error)throw this.error;return this._root=d,d}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(d,u,o){u=u.toString(),this.stringified=!1,this._processor=d,this._css=u,this._opts=o,this._map=void 0;let h=i;this.result=new s(this._processor,void 0,this._opts),this.result.css=u;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let a=new e(h,void 0,this._opts,u);if(a.isMap()){let[r,f]=a.generate();r&&(this.result.css=r),f&&(this.result.map=f)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(d){return this.async().catch(d)}finally(d){return this.async().then(d,d)}sync(){if(this.error)throw this.error;return this.result}then(d,u){return process.env.NODE_ENV!=="production"&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(d,u)}toString(){return this._css}warnings(){return[]}}return xn=l,l.default=l,xn}var Ln,Cl;function Th(){if(Cl)return Ln;Cl=1;let e=hn(),t=kl(),s=Lh(),i=Nt();class n{constructor(m=[]){this.version="8.5.15",this.plugins=this.normalize(m)}normalize(m){let d=[];for(let u of m)if(u.postcss===!0?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))d=d.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)d.push(u);else if(typeof u=="function")d.push(u);else if(typeof u=="object"&&(u.parse||u.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(u+" is not a PostCSS plugin");return d}process(m,d={}){return!this.plugins.length&&!d.parser&&!d.stringifier&&!d.syntax?new s(this,m,d):new t(this,m,d)}use(m){return this.plugins=this.plugins.concat(this.normalize([m])),this}}return Ln=n,n.default=n,i.registerProcessor(n),e.registerProcessor(n),Ln}var Tn,xl;function Nh(){if(xl)return Tn;xl=1;let e=un(),t=Ws(),s=tt(),i=qi(),n=ks(),l=hn(),m=wh(),d=ws(),u=kl(),o=ml(),h=vs(),c=Rn(),a=Th(),r=kn(),f=Nt(),p=Zn(),y=Rs(),X=Xl();function Z(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new a(S)}return Z.plugin=function(S,R){let b=!1;function g(...v){console&&console.warn&&!b&&(b=!0,console.warn(S+`: postcss.plugin was deprecated. Migration guide:
|
|
348
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),u}return d.root}return Rn=i,i.default=i,e.registerParse(i),Rn}var Wn,Rl;function vl(){if(Rl)return Wn;Rl=1;class e{constructor(s,i={}){if(this.type="warning",this.text=s,i.node&&i.node.source){let n=i.node.rangeBy(i);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in i)this[n]=i[n]}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 Wn=e,e.default=e,Wn}var kn,Wl;function wn(){if(Wl)return kn;Wl=1;let e=vl();class t{get content(){return this.css}constructor(i,n,l){this.processor=i,this.messages=[],this.root=n,this.opts=l,this.css="",this.map=void 0}toString(){return this.css}warn(i,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let l=new e(i,n);return this.messages.push(l),l}warnings(){return this.messages.filter(i=>i.type==="warning")}}return kn=t,t.default=t,kn}var Cn,kl;function wl(){if(kl)return Cn;kl=1;let e={};return Cn=function(t){e[t]||(e[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},Cn}var xn,Cl;function xl(){if(Cl)return xn;Cl=1;let e=tt(),t=pn(),s=Il(),i=vn(),n=wn(),l=Nt(),m=Rs(),{isClean:d,my:u}=rn(),o=wl();const h={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},r=0;function f(R){return typeof R=="object"&&typeof R.then=="function"}function p(R){let b=!1,g=h[R.type];return R.type==="decl"?b=R.prop.toLowerCase():R.type==="atrule"&&(b=R.name.toLowerCase()),b&&R.append?[g,g+"-"+b,r,g+"Exit",g+"Exit-"+b]:b?[g,g+"-"+b,g+"Exit",g+"Exit-"+b]:R.append?[g,r,g+"Exit"]:[g,g+"Exit"]}function y(R){let b;return R.type==="document"?b=["Document",r,"DocumentExit"]:R.type==="root"?b=["Root",r,"RootExit"]:b=p(R),{eventIndex:0,events:b,iterator:0,node:R,visitorIndex:0,visitors:[]}}function X(R){return R[d]=!1,R.nodes&&R.nodes.forEach(b=>X(b)),R}let Z={};class S{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(b,g,G){this.stringified=!1,this.processed=!1;let v;if(typeof g=="object"&&g!==null&&(g.type==="root"||g.type==="document"))v=X(g);else if(g instanceof S||g instanceof n)v=X(g.root),g.map&&(typeof G.map>"u"&&(G.map={}),G.map.inline||(G.map.inline=!1),G.map.prev=g.map);else{let V=i;G.syntax&&(V=G.syntax.parse),G.parser&&(V=G.parser),V.parse&&(V=V.parse);try{v=V(g,G)}catch(k){this.processed=!0,this.error=k}v&&!v[u]&&e.rebuild(v)}this.result=new n(b,v,G),this.helpers=he(K({},Z),{postcss:Z,result:this.result}),this.plugins=this.processor.plugins.map(V=>typeof V=="object"&&V.prepare?K(K({},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(b){return this.async().catch(b)}finally(b){return this.async().then(b,b)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(b,g){let G=this.result.lastPlugin;try{if(g&&g.addToError(b),this.error=b,b.name==="CssSyntaxError"&&!b.plugin)b.plugin=G.postcssPlugin,b.setMessage();else if(G.postcssVersion&&process.env.NODE_ENV!=="production"){let v=G.postcssPlugin,V=G.postcssVersion,k=this.result.processor.version,w=V.split("."),N=k.split(".");(w[0]!==N[0]||parseInt(w[1])>parseInt(N[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+k+", but "+v+" uses "+V+". Perhaps this is the source of the error below.")}}catch(v){console&&console.error&&console.error(v)}return b}prepareVisitors(){this.listeners={};let b=(g,G,v)=>{this.listeners[G]||(this.listeners[G]=[]),this.listeners[G].push([g,v])};for(let g of this.plugins)if(typeof g=="object")for(let G in g){if(!c[G]&&/^[A-Z]/.test(G))throw new Error(`Unknown event ${G} in ${g.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!a[G])if(typeof g[G]=="object")for(let v in g[G])v==="*"?b(g,G,g[G][v]):b(g,G+"-"+v.toLowerCase(),g[G][v]);else typeof g[G]=="function"&&b(g,G,g[G])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){return ye(this,null,function*(){this.plugin=0;for(let b=0;b<this.plugins.length;b++){let g=this.plugins[b],G=this.runOnRoot(g);if(f(G))try{yield G}catch(v){throw this.handleError(v)}}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[d];){b[d]=!0;let g=[y(b)];for(;g.length>0;){let G=this.visitTick(g);if(f(G))try{yield G}catch(v){let V=g[g.length-1].node;throw this.handleError(v,V)}}}if(this.listeners.OnceExit)for(let[g,G]of this.listeners.OnceExit){this.result.lastPlugin=g;try{if(b.type==="document"){let v=b.nodes.map(V=>G(V,this.helpers));yield Promise.all(v)}else yield G(b,this.helpers)}catch(v){throw this.handleError(v)}}}return this.processed=!0,this.stringify()})}runOnRoot(b){this.result.lastPlugin=b;try{if(typeof b=="object"&&b.Once){if(this.result.root.type==="document"){let g=this.result.root.nodes.map(G=>b.Once(G,this.helpers));return f(g[0])?Promise.all(g):g}return b.Once(this.result.root,this.helpers)}else if(typeof b=="function")return b(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 b=this.result.opts,g=m;b.syntax&&(g=b.syntax.stringify),b.stringifier&&(g=b.stringifier),g.stringify&&(g=g.stringify);let G=this.result.root.source;if(b.map===void 0&&!(G&&G.input&&G.input.map)){let V="";return g(this.result.root,k=>{V+=k}),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 b of this.plugins){let g=this.runOnRoot(b);if(f(g))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[d];)b[d]=!0,this.walkSync(b);if(this.listeners.OnceExit)if(b.type==="document")for(let g of b.nodes)this.visitSync(this.listeners.OnceExit,g);else this.visitSync(this.listeners.OnceExit,b)}return this.result}then(b,g){return process.env.NODE_ENV!=="production"&&("from"in this.opts||o("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(b,g)}toString(){return this.css}visitSync(b,g){for(let[G,v]of b){this.result.lastPlugin=G;let V;try{V=v(g,this.helpers)}catch(k){throw this.handleError(k,g.proxyOf)}if(g.type!=="root"&&g.type!=="document"&&!g.parent)return!0;if(f(V))throw this.getAsyncError()}}visitTick(b){let g=b[b.length-1],{node:G,visitors:v}=g;if(G.type!=="root"&&G.type!=="document"&&!G.parent){b.pop();return}if(v.length>0&&g.visitorIndex<v.length){let[k,w]=v[g.visitorIndex];g.visitorIndex+=1,g.visitorIndex===v.length&&(g.visitors=[],g.visitorIndex=0),this.result.lastPlugin=k;try{return w(G.toProxy(),this.helpers)}catch(N){throw this.handleError(N,G)}}if(g.iterator!==0){let k=g.iterator,w;for(;w=G.nodes[G.indexes[k]];)if(G.indexes[k]+=1,!w[d]){w[d]=!0,b.push(y(w));return}g.iterator=0,delete G.indexes[k]}let V=g.events;for(;g.eventIndex<V.length;){let k=V[g.eventIndex];if(g.eventIndex+=1,k===r){G.nodes&&G.nodes.length&&(G[d]=!0,g.iterator=G.getIterator());return}else if(this.listeners[k]){g.visitors=this.listeners[k];return}}b.pop()}walkSync(b){b[d]=!0;let g=p(b);for(let G of g)if(G===r)b.nodes&&b.each(v=>{v[d]||this.walkSync(v)});else{let v=this.listeners[G];if(v&&this.visitSync(v,b.toProxy()))return}}warnings(){return this.sync().warnings()}}return S.registerPostcss=R=>{Z=R},xn=S,S.default=S,l.registerLazyResult(S),t.registerLazyResult(S),xn}var Tn,Tl;function Fh(){if(Tl)return Tn;Tl=1;let e=Il(),t=vn(),s=wn(),i=Rs(),n=wl();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 d,u=t;try{d=u(this._css,this._opts)}catch(o){this.error=o}if(this.error)throw this.error;return this._root=d,d}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(d,u,o){u=u.toString(),this.stringified=!1,this._processor=d,this._css=u,this._opts=o,this._map=void 0;let h=i;this.result=new s(this._processor,void 0,this._opts),this.result.css=u;let c=this;Object.defineProperty(this.result,"root",{get(){return c.root}});let a=new e(h,void 0,this._opts,u);if(a.isMap()){let[r,f]=a.generate();r&&(this.result.css=r),f&&(this.result.map=f)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(d){return this.async().catch(d)}finally(d){return this.async().then(d,d)}sync(){if(this.error)throw this.error;return this.result}then(d,u){return process.env.NODE_ENV!=="production"&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(d,u)}toString(){return this._css}warnings(){return[]}}return Tn=l,l.default=l,Tn}var Ln,Ll;function Mh(){if(Ll)return Ln;Ll=1;let e=pn(),t=xl(),s=Fh(),i=Nt();class n{constructor(m=[]){this.version="8.5.15",this.plugins=this.normalize(m)}normalize(m){let d=[];for(let u of m)if(u.postcss===!0?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))d=d.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)d.push(u);else if(typeof u=="function")d.push(u);else if(typeof u=="object"&&(u.parse||u.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(u+" is not a PostCSS plugin");return d}process(m,d={}){return!this.plugins.length&&!d.parser&&!d.stringifier&&!d.syntax?new s(this,m,d):new t(this,m,d)}use(m){return this.plugins=this.plugins.concat(this.normalize([m])),this}}return Ln=n,n.default=n,i.registerProcessor(n),e.registerProcessor(n),Ln}var Nn,Nl;function Kh(){if(Nl)return Nn;Nl=1;let e=dn(),t=Ws(),s=tt(),i=en(),n=ks(),l=pn(),m=Jh(),d=ws(),u=xl(),o=yl(),h=vs(),c=vn(),a=Mh(),r=wn(),f=Nt(),p=Sn(),y=Rs(),X=vl();function Z(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new a(S)}return Z.plugin=function(S,R){let b=!1;function g(...v){console&&console.warn&&!b&&(b=!0,console.warn(S+`: 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(S+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
350
|
-
https://www.w3ctech.com/topic/2226`));let V=R(...v);return V.postcssPlugin=S,V.postcssVersion=new a().version,V}let G;return Object.defineProperty(g,"postcss",{get(){return G||(G=g()),G}}),g.process=function(v,V,k){return Z([g(k)]).process(v,V)},g},Z.stringify=y,Z.parse=c,Z.fromJSON=m,Z.list=o,Z.comment=S=>new t(S),Z.atRule=S=>new e(S),Z.decl=S=>new n(S),Z.rule=S=>new p(S),Z.root=S=>new f(S),Z.document=S=>new l(S),Z.CssSyntaxError=i,Z.Declaration=n,Z.Container=s,Z.Processor=a,Z.Document=l,Z.Comment=t,Z.Warning=X,Z.AtRule=e,Z.Result=r,Z.Input=d,Z.Rule=p,Z.Root=f,Z.Node=h,u.registerPostcss(Z),
|
|
350
|
+
https://www.w3ctech.com/topic/2226`));let V=R(...v);return V.postcssPlugin=S,V.postcssVersion=new a().version,V}let G;return Object.defineProperty(g,"postcss",{get(){return G||(G=g()),G}}),g.process=function(v,V,k){return Z([g(k)]).process(v,V)},g},Z.stringify=y,Z.parse=c,Z.fromJSON=m,Z.list=o,Z.comment=S=>new t(S),Z.atRule=S=>new e(S),Z.decl=S=>new n(S),Z.rule=S=>new p(S),Z.root=S=>new f(S),Z.document=S=>new l(S),Z.CssSyntaxError=i,Z.Declaration=n,Z.Container=s,Z.Processor=a,Z.Document=l,Z.Comment=t,Z.Warning=X,Z.AtRule=e,Z.Result=r,Z.Input=d,Z.Rule=p,Z.Root=f,Z.Node=h,u.registerPostcss(Z),Nn=Z,Z.default=Z,Nn}Kh();class Jn{constructor(...t){Ce(this,"parentElement",null),Ce(this,"parentNode",null),Ce(this,"ownerDocument"),Ce(this,"firstChild",null),Ce(this,"lastChild",null),Ce(this,"previousSibling",null),Ce(this,"nextSibling",null),Ce(this,"ELEMENT_NODE",1),Ce(this,"TEXT_NODE",3),Ce(this,"nodeType"),Ce(this,"nodeName"),Ce(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 Jn){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 Cs=new Map,Jl=new WeakSet;function Yl(e){return e!==null&&typeof e=="object"&&"complete"in e&&"naturalWidth"in e&&"naturalHeight"in e&&"src"in e&&"onload"in e}function Oh(e){if(Jl.has(e))return;Jl.add(e);const t=e.drawImage.bind(e);e.drawImage=function(s,...i){const n=Cs.get(e);n&&(n.cancelled=!0);const l=()=>{i.length===2&&Yl(s)&&i.push(s.naturalWidth||s.width,s.naturalHeight||s.height),t(s,...i)};if(Yl(s)&&!s.complete){const m={cancelled:!1};Cs.set(e,m);const d=()=>{m.cancelled||(Cs.delete(e),l())},u=()=>{if(!m.cancelled){Cs.delete(e);try{l()}catch{}}};s.onload=d,s.onerror=u}else l()}}const Ul={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Fl={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},xs={},Ml={},Eh=()=>!!globalThis.Zone;function Yn(e){if(xs[e])return xs[e];const t=globalThis[e],s=t.prototype,i=e in Ul?Ul[e]:void 0,n=!!(i&&i.every(d=>{var u,o;return!!((o=(u=Object.getOwnPropertyDescriptor(s,d))==null?void 0:u.get)!=null&&o.toString().includes("[native code]"))})),l=e in Fl?Fl[e]:void 0,m=!!(l&&l.every(d=>{var u;return typeof s[d]=="function"&&((u=s[d])==null?void 0:u.toString().includes("[native code]"))}));if(n&&m&&!Eh())return xs[e]=t.prototype,t.prototype;try{const d=document.createElement("iframe");d.style.display="none",document.body.appendChild(d);const u=d.contentWindow;if(!u)return t.prototype;const o=u[e].prototype;if(!o)return d.remove(),s;const h=navigator.userAgent;return h.includes("Safari")&&!h.includes("Chrome")?(d.classList.add("rr-block"),d.setAttribute("__rrwebUntaintedMutationObserver",""),Ml[e]=()=>d.remove()):d.remove(),xs[e]=o}catch{return s}}const Un={};function He(e,t,s){var i;const n=`${e}.${String(s)}`;if(Un[n])return Un[n].call(t);const l=Yn(e),m=(i=Object.getOwnPropertyDescriptor(l,s))==null?void 0:i.get;return m?(Un[n]=m,m.call(t)):t[s]}const Fn={};function Kl(e,t,s){const i=`${e}.${String(s)}`;if(Fn[i])return Fn[i].bind(t);const n=Yn(e)[s];return typeof n!="function"?t[s]:(Fn[i]=n,n.bind(t))}function zh(e){return He("Node",e,"ownerDocument")}function Hh(e){return He("Node",e,"childNodes")}function Ph(e){return He("Node",e,"parentNode")}function Dh(e){return He("Node",e,"parentElement")}function Bh(e){return He("Node",e,"textContent")}function Qh(e,t){return Kl("Node",e,"contains")(t)}function jh(e){return Kl("Node",e,"getRootNode")()}function Ah(e){return!e||!("host"in e)?null:He("ShadowRoot",e,"host")}function _h(e){return e.styleSheets}function $h(e){return!e||!("shadowRoot"in e)?null:He("Element",e,"shadowRoot")}function qh(e,t){return He("Element",e,"querySelector")(t)}function ep(e,t){return He("Element",e,"querySelectorAll")(t)}function Ol(){var e;return[Yn("MutationObserver").constructor,(e=Ml.MutationObserver)!=null?e:()=>{}]}let Jt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Jt=()=>new Date().getTime());function st(e,t,s){try{if(!(t in e))return()=>{};const i=e[t],n=s(i);return typeof n=="function"&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=n,()=>{e[t]=i}}catch{return()=>{}}}const H={ownerDocument:zh,childNodes:Hh,parentNode:Ph,parentElement:Dh,textContent:Bh,contains:Qh,getRootNode:jh,host:Ah,styleSheets:_h,shadowRoot:$h,querySelector:qh,querySelectorAll:ep,nowTimestamp:Jt,mutationObserverCtor:Ol,patch:st,wrapCanvasContextDrawImage:Oh};function ge(e,t,s=document){const i={capture:!0};return s.addEventListener(e,t,i),()=>s.removeEventListener(e,t,i)}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 Ml={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&&(Ml=new Proxy(Ml,{get(e,t,s){return t==="map"&&console.error(gt),Reflect.get(e,t,s)}}));function Yt(e,t,s={}){let i=null,n=0;return function(...l){const m=Date.now();!n&&s.leading===!1&&(n=m);const d=t-(m-n),u=this;d<=0||d>t?(i&&(clearTimeout(i),i=null),n=m,e.apply(u,l)):!i&&s.trailing!==!1&&(i=setTimeout(()=>{n=s.leading===!1?0:Date.now(),i=null,e.apply(u,l)},d))}}function Ls(e,t,s,i,n=window){const l=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,i?s:{set(m){setTimeout(()=>{s.set.call(this,m)},0),l&&l.set&&l.set.call(this,m)}}),()=>Ls(e,t,l||{},!0)}function Kl(e){var t,s,i,n;const l=e.document;return{left:l.scrollingElement?l.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:l.documentElement.scrollLeft||l?.body&&((t=H.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&&((i=H.parentElement(l.body))==null?void 0:i.scrollTop)||((n=l?.body)==null?void 0:n.scrollTop)||0}}function Ol(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function El(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function zl(e){return e?e.nodeType===e.ELEMENT_NODE?e:H.parentElement(e):null}const jh=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch{return!1}return!1};function me(e,t,s,i){if(!e)return!1;const n=zl(e);if(!n)return!1;try{if(typeof t=="string"){if(n.classList.contains(t)||i&&n.closest("."+t)!==null)return!0}else if(ys(n,t,i))return!0}catch{}return!!(s&&(n.matches(s)||i&&n.closest(s)!==null))}function Ah(e,t){return t.getId(e)!==-1}function Fn(e,t,s){return e.tagName==="TITLE"&&s.headTitleMutations?!0:t.getId(e)===Lt}function Hl(e,t){if(Ct(e))return!1;const s=t.getId(e);if(!t.has(s))return!0;const i=H.parentNode(e);return i&&i.nodeType===e.DOCUMENT_NODE?!1:i?Hl(i,t):!0}function Mn(e){return!!e.changedTouches}function _h(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 Pl(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Dl(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Kn(e){return e?e instanceof Nn&&"shadowRoot"in e?!!e.shadowRoot:!!H.shadowRoot(e):!1}class $h{constructor(){T(this,"id",1),T(this,"styleIDMap",new WeakMap),T(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 i;return s===void 0?i=this.id++:i=s,this.styleIDMap.set(t,i),this.idStyleMap.set(i,t),i}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 Bl(e){var t;let s=null;return"getRootNode"in e&&((t=H.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&H.host(H.getRootNode(e))&&(s=H.host(H.getRootNode(e))),s}function qh(e){let t=e,s;for(;s=Bl(t);)t=s;return t}function ep(e){const t=H.ownerDocument(e);if(!t)return!1;const s=qh(e);return H.contains(t,s)}function Ql(e){const t=H.ownerDocument(e);return t?H.contains(t,e)||ep(e):!1}var A=(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))(A||{}),B=(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))(B||{}),Xe=(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))(Xe||{}),Be=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Be||{}),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||{}),jl=(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))(jl||{});function Al(e){return"__ln"in e}class tp{constructor(){T(this,"length",0),T(this,"head",null),T(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let s=this.head;for(let i=0;i<t;i++)s=s?.next||null;return s}addNode(t){const s={value:t,previous:null,next:null};if(t.__ln=s,t.previousSibling&&Al(t.previousSibling)){const i=t.previousSibling.__ln.next;s.next=i,s.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=s,i&&(i.previous=s)}else if(t.nextSibling&&Al(t.nextSibling)&&t.nextSibling.__ln.previous){const i=t.nextSibling.__ln.previous;s.previous=i,s.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=s,i&&(i.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 _l=(e,t)=>`${e}@${t}`;class sp{constructor(){T(this,"frozen",!1),T(this,"locked",!1),T(this,"texts",[]),T(this,"attributes",[]),T(this,"attributeMap",new WeakMap),T(this,"removes",[]),T(this,"mapRemoves",[]),T(this,"movedMap",{}),T(this,"addedSet",new Set),T(this,"movedSet",new Set),T(this,"droppedSet",new Set),T(this,"removesSubTreeCache",new Set),T(this,"mutationCb"),T(this,"blockClass"),T(this,"blockSelector"),T(this,"maskTextClass"),T(this,"maskTextSelector"),T(this,"inlineStylesheet"),T(this,"maskInputOptions"),T(this,"maskTextFn"),T(this,"maskInputFn"),T(this,"keepIframeSrcFn"),T(this,"recordCanvas"),T(this,"inlineImages"),T(this,"inlineVideos"),T(this,"privacySetting"),T(this,"slimDOMOptions"),T(this,"dataURLOptions"),T(this,"doc"),T(this,"mirror"),T(this,"iframeManager"),T(this,"stylesheetManager"),T(this,"shadowDomManager"),T(this,"canvasManager"),T(this,"processedNodeManager"),T(this,"unattachedDoc"),T(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),T(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],s=new Set,i=new tp,n=u=>{let o=u,h=Lt;for(;h===Lt;)o=o&&o.nextSibling,h=o&&this.mirror.getId(o);return h},l=u=>{const o=H.parentNode(u);if(!o||!Ql(u))return;let h=!1;if(u.nodeType===Node.TEXT_NODE){const f=o.tagName;if(f==="TEXTAREA")return;f==="STYLE"&&this.addedSet.has(o)&&(h=!0)}const c=Ct(o)?this.mirror.getId(Bl(u)):this.mirror.getId(o),a=n(u);if(c===-1||a===-1)return i.addNode(u);const r=yt(u,{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:f=>{Pl(f,this.mirror)&&this.iframeManager.addIframe(f),Dl(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),Kn(u)&&this.shadowDomManager.addShadowRoot(H.shadowRoot(u),this.doc)},onIframeLoad:(f,p)=>{this.iframeManager.attachIframe(f,p),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)},cssCaptured:h});r&&(t.push({parentId:c,nextId:a,node:r}),s.add(r.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)$l(this.removesSubTreeCache,u)&&!this.movedSet.has(H.parentNode(u))||l(u);for(const u of this.addedSet)!ql(this.droppedSet,u)&&!$l(this.removesSubTreeCache,u)||ql(this.movedSet,u)?l(u):this.droppedSet.add(u);let m=null;for(;i.length;){let u=null;if(m){const o=this.mirror.getId(H.parentNode(m.value)),h=n(m.value);o!==-1&&h!==-1&&(u=m)}if(!u){let o=i.tail;for(;o;){const h=o;if(o=o.previous,h){const c=this.mirror.getId(H.parentNode(h.value));if(n(h.value)===-1)continue;if(c!==-1){u=h;break}else{const a=h.value,r=H.parentNode(a);if(r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const f=H.host(r);if(this.mirror.getId(f)!==-1){u=h;break}}}}}}if(!u){for(;i.head;)i.removeNode(i.head.value);break}m=u.previous,i.removeNode(u.value),l(u.value)}const d={texts:this.texts.map(u=>{var o,h;const c=u.node,a=H.parentNode(c);a&&a.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(a);let r=u.value;const f=this.privacySetting==="strict",p=this.privacySetting==="default"&&io(r),y=(h=(o=u.node)==null?void 0:o.parentElement)==null?void 0:h.getAttribute("data-hl-record");return(f||p)&&!y&&r&&(r=mi(r)),{id:this.mirror.getId(c),value:r}}).filter(u=>!s.has(u.id)).filter(u=>this.mirror.has(u.id)),attributes:this.attributes.map(u=>{const{attributes:o}=u;if(typeof o.style=="string"){const h=JSON.stringify(u.styleDiff),c=JSON.stringify(u._unchangedStyles);h.length<o.style.length&&(h+c).split("var(").length===o.style.split("var(").length&&(o.style=u.styleDiff)}return{id:this.mirror.getId(u.node),attributes:o}}).filter(u=>!s.has(u.id)).filter(u=>this.mirror.has(u.id)),removes:this.removes,adds:t};!d.texts.length&&!d.attributes.length&&!d.removes.length&&!d.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(d))}),T(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 i=Array.from(H.childNodes(t),n=>H.textContent(n)||"").join("");s.attributes.value=hs({overwriteRecord:null,element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:ps(t),value:i,maskInputFn:this.maskInputFn})}),T(this,"processMutation",t=>{if(!Fn(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const s=H.textContent(t.target);!me(t.target,this.blockClass,this.blockSelector,!1)&&s!==t.oldValue&&this.texts.push({value:ho(t.target,this.maskTextClass,this.maskTextSelector,!0)&&s?this.maskTextFn?this.maskTextFn(s,zl(t.target)):s.replace(/[\S]/g,"*"):s,node:t.target});break}case"attributes":{const s=t.target;let i=t.attributeName,n=t.target.getAttribute(i);if(i==="value"){const m=ps(s);n=hs({element:s,maskInputOptions:this.maskInputOptions,tagName:s.tagName,type:m,value:n,overwriteRecord:s.getAttribute("data-hl-record"),maskInputFn:this.maskInputFn})}if(me(t.target,this.blockClass,this.blockSelector,!1)||n===t.oldValue)return;let l=this.attributeMap.get(t.target);if(s.tagName==="IFRAME"&&i==="src"&&!this.keepIframeSrcFn(n))if(!s.contentDocument)i="rr_src";else return;if(l||(l={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(l),this.attributeMap.set(t.target,l)),i==="type"&&s.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&s.setAttribute("data-rr-is-password","true"),!co(s.tagName,i)){if(t.target.tagName==="INPUT"){const m=t.target;if(m.type==="password"){l.attributes.value="*".repeat(m.value.length);break}}if(l.attributes[i]=ao(this.doc,ft(s.tagName),ft(i),n),i==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const m=this.unattachedDoc.createElement("span");t.oldValue&&m.setAttribute("style",t.oldValue);for(const d of Array.from(s.style)){const u=s.style.getPropertyValue(d),o=s.style.getPropertyPriority(d);u!==m.style.getPropertyValue(d)||o!==m.style.getPropertyPriority(d)?o===""?l.styleDiff[d]=u:l.styleDiff[d]=[u,o]:l._unchangedStyles[d]=[u,o]}for(const d of Array.from(m.style))s.style.getPropertyValue(d)===""&&(l.styleDiff[d]=!1)}else i==="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(me(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 i=this.mirror.getId(s),n=Ct(t.target)?this.mirror.getId(H.host(t.target)):this.mirror.getId(t.target);me(t.target,this.blockClass,this.blockSelector,!1)||Fn(s,this.mirror,this.slimDOMOptions)||!Ah(s,this.mirror)||(this.addedSet.has(s)?(On(this.addedSet,s),this.droppedSet.add(s)):this.addedSet.has(t.target)&&i===-1||Hl(t.target,this.mirror)||(this.movedSet.has(s)&&this.movedMap[_l(i,n)]?On(this.movedSet,s):(this.removes.push({parentId:n,id:i,isShadow:Ct(t.target)&&xt(t.target)?!0:void 0}),ip(s,this.removesSubTreeCache))),this.mapRemoves.push(s))});break}}}),T(this,"genAdds",(t,s)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Fn(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let i=null;s&&this.mirror.hasNode(s)&&(i=this.mirror.getId(s)),i&&i!==-1&&(this.movedMap[_l(this.mirror.getId(t),i)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);me(t,this.blockClass,this.blockSelector,!1)||(H.childNodes(t).forEach(i=>this.genAdds(i)),Kn(t)&&H.childNodes(H.shadowRoot(t)).forEach(i=>{this.processedNodeManager.add(i,this),this.genAdds(i,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 On(e,t){e.delete(t),H.childNodes(t).forEach(s=>On(e,s))}function ip(e,t){const s=[e];for(;s.length;){const i=s.pop();t.has(i)||(t.add(i),H.childNodes(i).forEach(n=>s.push(n)))}}function $l(e,t,s){return e.size===0?!1:np(e,t)}function np(e,t,s){const i=H.parentNode(t);return i?e.has(i):!1}function ql(e,t){return e.size===0?!1:ea(e,t)}function ea(e,t){const s=H.parentNode(t);return s?e.has(s)?!0:ea(e,s):!1}let Ut;function rp(e){Ut=e}function op(){Ut=void 0}const Q=e=>Ut?(...t)=>{try{return e(...t)}catch(s){if(Ut&&Ut(s)===!0)return;throw s}}:e,it=[];function Ft(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 ta(e,t){const s=new sp;it.push(s),s.init(e);const[i,n]=Fl(),l=new i(Q(s.processMutations.bind(s)));return l.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[l,n]}function lp({mousemoveCb:e,sampling:t,doc:s,mirror:i}){if(t.mousemove===!1)return()=>{};const n=typeof t.mousemove=="number"?t.mousemove:50,l=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let m=[],d;const u=Yt(Q(c=>{const a=Date.now()-d;e(m.map(r=>(r.timeOffset-=a,r)),c),m=[],d=null}),l),o=Q(Yt(Q(c=>{const a=Ft(c),{clientX:r,clientY:f}=Mn(c)?c.changedTouches[0]:c;d||(d=Jt()),m.push({x:r,y:f,id:i.getId(a),timeOffset:Jt()-d}),u(typeof DragEvent<"u"&&c instanceof DragEvent?B.Drag:c instanceof MouseEvent?B.MouseMove:B.TouchMove)}),n,{trailing:!1})),h=[ge("mousemove",o,s),ge("touchmove",o,s),ge("drag",o,s)];return Q(()=>{h.forEach(c=>c())})}function ap({mouseInteractionCb:e,doc:t,mirror:s,blockClass:i,blockSelector:n,sampling:l}){if(l.mouseInteraction===!1)return()=>{};const m=l.mouseInteraction===!0||l.mouseInteraction===void 0?{}:l.mouseInteraction,d=[];let u=null;const o=h=>c=>{const a=Ft(c);if(me(a,i,n,!0)||jh(a))return;let r=null,f=h;if("pointerType"in c){switch(c.pointerType){case"mouse":r=Be.Mouse;break;case"touch":r=Be.Touch;break;case"pen":r=Be.Pen;break}r===Be.Touch&&(Xe[h]===Xe.MouseDown?f="TouchStart":Xe[h]===Xe.MouseUp&&(f="TouchEnd"))}else Mn(c)&&(r=Be.Touch);r!==null?(u=r,(f.startsWith("Touch")&&r===Be.Touch||f.startsWith("Mouse")&&r===Be.Mouse)&&(r=null)):Xe[h]===Xe.Click&&(r=u,u=null);const p=Mn(c)?c.changedTouches[0]:c;if(!p)return;const y=s.getId(a),{clientX:X,clientY:Z}=p;Q(e)(K({type:Xe[f],id:y,x:X,y:Z},r!==null&&{pointerType:r}))};return Object.keys(Xe).filter(h=>Number.isNaN(Number(h))&&!h.endsWith("_Departed")&&m[h]!==!1).forEach(h=>{let c=ft(h);const a=o(h);if(window.PointerEvent)switch(Xe[h]){case Xe.MouseDown:case Xe.MouseUp:c=c.replace("mouse","pointer");break;case Xe.TouchStart:case Xe.TouchEnd:return}d.push(ge(c,a,t))}),Q(()=>{d.forEach(h=>h())})}function sa({scrollCb:e,doc:t,mirror:s,blockClass:i,blockSelector:n,sampling:l}){const m=Q(Yt(Q(d=>{const u=Ft(d);if(!u||me(u,i,n,!0))return;const o=s.getId(u);if(u===t&&t.defaultView){const h=Kl(t.defaultView);e({id:o,x:h.left,y:h.top})}else e({id:o,x:u.scrollLeft,y:u.scrollTop})}),l.scroll||100));return ge("scroll",m,t)}function cp({viewportResizeCb:e},{win:t}){let s=-1,i=-1;const n=Q(Yt(Q(()=>{const l=Ol(),m=El();(s!==l||i!==m)&&(e({width:Number(m),height:Number(l)}),s=l,i=m)}),200));return ge("resize",n,t)}const up=["INPUT","TEXTAREA","SELECT"],ia=new WeakMap;function dp({inputCb:e,doc:t,mirror:s,blockClass:i,blockSelector:n,ignoreClass:l,ignoreSelector:m,maskInputOptions:d,maskInputFn:u,sampling:o,userTriggeredOnInput:h}){function c(X){let Z=Ft(X);const S=X.isTrusted,R=Z&&Z.tagName;if(Z&&R==="OPTION"&&(Z=H.parentElement(Z)),!Z||!R||up.indexOf(R)<0||me(Z,i,n,!0)||Z.classList.contains(l)||m&&Z.matches(m))return;let b=Z.value,g=!1;const G=ps(Z)||"",v=Z.getAttribute("data-hl-record");G==="radio"||G==="checkbox"?g=Z.checked:no({maskInputOptions:d,type:G,tagName:R,overwriteRecord:v})&&(b=hs({element:Z,maskInputOptions:d,tagName:R,type:G,value:b,overwriteRecord:v,maskInputFn:u})),a(Z,h?{text:b,isChecked:g,userTriggered:S}:{text:b,isChecked:g});const V=Z.name;G==="radio"&&V&&g&&t.querySelectorAll(`input[type="radio"][name="${V}"]`).forEach(k=>{if(k!==Z){const w=k.value;a(k,h?{text:w,isChecked:!g,userTriggered:!1}:{text:w,isChecked:!g})}})}function a(X,Z){const S=ia.get(X);if(!S||S.text!==Z.text||S.isChecked!==Z.isChecked){ia.set(X,Z);const R=s.getId(X);Q(e)(he(K({},Z),{id:R}))}}const r=(o.input==="last"?["change"]:["input","change"]).map(X=>ge(X,Q(c),t)),f=t.defaultView;if(!f)return()=>{r.forEach(X=>X())};const p=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),y=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return p&&p.set&&r.push(...y.map(X=>Ls(X[0],X[1],{set(){Q(c)({target:this,isTrusted:!1})}},!1,f))),Q(()=>{r.forEach(X=>X())})}function Ts(e){const t=[];function s(i,n){if(Ns("CSSGroupingRule")&&i.parentRule instanceof CSSGroupingRule||Ns("CSSMediaRule")&&i.parentRule instanceof CSSMediaRule||Ns("CSSSupportsRule")&&i.parentRule instanceof CSSSupportsRule||Ns("CSSConditionRule")&&i.parentRule instanceof CSSConditionRule){const l=Array.from(i.parentRule.cssRules).indexOf(i);return n.unshift(l),s(i.parentRule,n)}else if(i.parentStyleSheet){const l=Array.from(i.parentStyleSheet.cssRules).indexOf(i);n.unshift(l)}return n}return s(e,t)}function Qe(e,t,s){let i,n;return e?(e.ownerNode?i=t.getId(e.ownerNode):n=s.getId(e),{styleId:n,id:i}):{}}function hp({styleSheetRuleCb:e,mirror:t,stylesheetManager:s},{win:i}){if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};const n=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:Q((h,c,a)=>{const[r,f]=a,{id:p,styleId:y}=Qe(c,t,s.styleMirror);return(p&&p!==-1||y&&y!==-1)&&e({id:p,styleId:y,adds:[{rule:r,index:f}]}),h.apply(c,a)})}),i.CSSStyleSheet.prototype.addRule=function(h,c,a=this.cssRules.length){const r=`${h} { ${c} }`;return i.CSSStyleSheet.prototype.insertRule.apply(this,[r,a])};const l=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:Q((h,c,a)=>{const[r]=a,{id:f,styleId:p}=Qe(c,t,s.styleMirror);return(f&&f!==-1||p&&p!==-1)&&e({id:f,styleId:p,removes:[{index:r}]}),h.apply(c,a)})}),i.CSSStyleSheet.prototype.removeRule=function(h){return i.CSSStyleSheet.prototype.deleteRule.apply(this,[h])};let m;i.CSSStyleSheet.prototype.replace&&(m=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(m,{apply:Q((h,c,a)=>{const[r]=a,{id:f,styleId:p}=Qe(c,t,s.styleMirror);return(f&&f!==-1||p&&p!==-1)&&e({id:f,styleId:p,replace:r}),h.apply(c,a)})}));let d;i.CSSStyleSheet.prototype.replaceSync&&(d=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(d,{apply:Q((h,c,a)=>{const[r]=a,{id:f,styleId:p}=Qe(c,t,s.styleMirror);return(f&&f!==-1||p&&p!==-1)&&e({id:f,styleId:p,replaceSync:r}),h.apply(c,a)})}));const u={};Js("CSSGroupingRule")?u.CSSGroupingRule=i.CSSGroupingRule:(Js("CSSMediaRule")&&(u.CSSMediaRule=i.CSSMediaRule),Js("CSSConditionRule")&&(u.CSSConditionRule=i.CSSConditionRule),Js("CSSSupportsRule")&&(u.CSSSupportsRule=i.CSSSupportsRule));const o={};return Object.entries(u).forEach(([h,c])=>{o[h]={insertRule:c.prototype.insertRule,deleteRule:c.prototype.deleteRule},c.prototype.insertRule=new Proxy(o[h].insertRule,{apply:Q((a,r,f)=>{const[p,y]=f,{id:X,styleId:Z}=Qe(r.parentStyleSheet,t,s.styleMirror);return(X&&X!==-1||Z&&Z!==-1)&&e({id:X,styleId:Z,adds:[{rule:p,index:[...Ts(r),y||0]}]}),a.apply(r,f)})}),c.prototype.deleteRule=new Proxy(o[h].deleteRule,{apply:Q((a,r,f)=>{const[p]=f,{id:y,styleId:X}=Qe(r.parentStyleSheet,t,s.styleMirror);return(y&&y!==-1||X&&X!==-1)&&e({id:y,styleId:X,removes:[{index:[...Ts(r),p]}]}),a.apply(r,f)})})}),Q(()=>{i.CSSStyleSheet.prototype.insertRule=n,i.CSSStyleSheet.prototype.deleteRule=l,m&&(i.CSSStyleSheet.prototype.replace=m),d&&(i.CSSStyleSheet.prototype.replaceSync=d),Object.entries(u).forEach(([h,c])=>{c.prototype.insertRule=o[h].insertRule,c.prototype.deleteRule=o[h].deleteRule})})}function na({mirror:e,stylesheetManager:t},s){var i,n,l;let m=null;s.nodeName==="#document"?m=e.getId(s):m=e.getId(H.host(s));const d=s.nodeName==="#document"?(i=s.defaultView)==null?void 0:i.Document:(l=(n=s.ownerDocument)==null?void 0:n.defaultView)==null?void 0:l.ShadowRoot,u=d!=null&&d.prototype?Object.getOwnPropertyDescriptor(d?.prototype,"adoptedStyleSheets"):void 0;return m===null||m===-1||!d||!u?()=>{}:(Object.defineProperty(s,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var o;return(o=u.get)==null?void 0:o.call(this)},set(o){var h;const c=(h=u.set)==null?void 0:h.call(this,o);if(m!==null&&m!==-1)try{t.adoptStyleSheets(o,m)}catch{}return c}}),Q(()=>{Object.defineProperty(s,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))}function pp({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:s,stylesheetManager:i},{win:n}){const l=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(l,{apply:Q((d,u,o)=>{var h;const[c,a,r]=o;if(s.has(c))return l.apply(u,[c,a,r]);const{id:f,styleId:p}=Qe((h=u.parentRule)==null?void 0:h.parentStyleSheet,t,i.styleMirror);return(f&&f!==-1||p&&p!==-1)&&e({id:f,styleId:p,set:{property:c,value:a,priority:r},index:Ts(u.parentRule)}),d.apply(u,o)})});const m=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(m,{apply:Q((d,u,o)=>{var h;const[c]=o;if(s.has(c))return m.apply(u,[c]);const{id:a,styleId:r}=Qe((h=u.parentRule)==null?void 0:h.parentStyleSheet,t,i.styleMirror);return(a&&a!==-1||r&&r!==-1)&&e({id:a,styleId:r,remove:{property:c},index:Ts(u.parentRule)}),d.apply(u,o)})}),Q(()=>{n.CSSStyleDeclaration.prototype.setProperty=l,n.CSSStyleDeclaration.prototype.removeProperty=m})}function mp({mediaInteractionCb:e,blockClass:t,blockSelector:s,mirror:i,sampling:n,doc:l}){const m=Q(u=>Yt(Q(o=>{const h=Ft(o);if(!h||me(h,t,s,!0))return;const{currentTime:c,volume:a,muted:r,playbackRate:f,loop:p}=h;e({type:u,id:i.getId(h),currentTime:c,volume:a,muted:r,playbackRate:f,loop:p})}),n.media||500)),d=[ge("play",m(St.Play),l),ge("pause",m(St.Pause),l),ge("seeked",m(St.Seeked),l),ge("volumechange",m(St.VolumeChange),l),ge("ratechange",m(St.RateChange),l)];return Q(()=>{d.forEach(u=>u())})}function fp({fontCb:e,doc:t}){const s=t.defaultView;if(!s)return()=>{};const i=[],n=new WeakMap,l=s.FontFace;s.FontFace=function(d,u,o){const h=new l(d,u,o);return n.set(h,{family:d,buffer:typeof u!="string",descriptors:o,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};const m=st(t.fonts,"add",function(d){return function(u){return setTimeout(Q(()=>{const o=n.get(u);o&&(e(o),n.delete(u))}),0),d.apply(this,[u])}});return i.push(()=>{s.FontFace=l}),i.push(m),Q(()=>{i.forEach(d=>d())})}function bp(e){const{doc:t,mirror:s,blockClass:i,blockSelector:n,selectionCb:l}=e;let m=!0;const d=Q(()=>{const u=t.getSelection();if(!u||m&&u!=null&&u.isCollapsed)return;m=u.isCollapsed||!1;const o=[],h=u.rangeCount||0;for(let c=0;c<h;c++){const a=u.getRangeAt(c),{startContainer:r,startOffset:f,endContainer:p,endOffset:y}=a;me(r,i,n,!0)||me(p,i,n,!0)||o.push({start:s.getId(r),startOffset:f,end:s.getId(p),endOffset:y})}l({ranges:o})});return d(),ge("selectionchange",d)}function yp({doc:e,customElementCb:t}){const s=e.defaultView;return!s||!s.customElements?()=>{}:st(s.customElements,"define",function(i){return function(n,l,m){try{t({define:{name:n}})}catch{console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,l,m])}})}function gp(e,t){const{mutationCb:s,mousemoveCb:i,mouseInteractionCb:n,scrollCb:l,viewportResizeCb:m,inputCb:d,mediaInteractionCb:u,styleSheetRuleCb:o,styleDeclarationCb:h,canvasMutationCb:c,fontCb:a,selectionCb:r,customElementCb:f}=e;e.mutationCb=(...p)=>{t.mutation&&t.mutation(...p),s(...p)},e.mousemoveCb=(...p)=>{t.mousemove&&t.mousemove(...p),i(...p)},e.mouseInteractionCb=(...p)=>{t.mouseInteraction&&t.mouseInteraction(...p),n(...p)},e.scrollCb=(...p)=>{t.scroll&&t.scroll(...p),l(...p)},e.viewportResizeCb=(...p)=>{t.viewportResize&&t.viewportResize(...p),m(...p)},e.inputCb=(...p)=>{t.input&&t.input(...p),d(...p)},e.mediaInteractionCb=(...p)=>{t.mediaInteaction&&t.mediaInteaction(...p),u(...p)},e.styleSheetRuleCb=(...p)=>{t.styleSheetRule&&t.styleSheetRule(...p),o(...p)},e.styleDeclarationCb=(...p)=>{t.styleDeclaration&&t.styleDeclaration(...p),h(...p)},e.canvasMutationCb=(...p)=>{t.canvasMutation&&t.canvasMutation(...p),c(...p)},e.fontCb=(...p)=>{t.font&&t.font(...p),a(...p)},e.selectionCb=(...p)=>{t.selection&&t.selection(...p),r(...p)},e.customElementCb=(...p)=>{t.customElement&&t.customElement(...p),f(...p)}}function Zp(e,t={}){const s=e.doc.defaultView;if(!s)return()=>{};gp(e,t);let i,n=()=>{};e.recordDOM&&([i,n]=ta(e,e.doc));const l=lp(e),m=ap(e),d=sa(e),u=cp(e,{win:s}),o=dp(e),h=mp(e);let c=()=>{},a=()=>{},r=()=>{},f=()=>{};e.recordDOM&&(c=hp(e,{win:s}),a=na(e,e.doc),r=pp(e,{win:s}),e.collectFonts&&(f=fp(e)));const p=bp(e),y=yp(e),X=[];for(const Z of e.plugins)X.push(Z.observer(Z.callback,s,Z.options));return Q(()=>{it.forEach(Z=>Z.reset()),i?.disconnect(),n(),l(),m(),d(),u(),o(),h(),c(),a(),r(),f(),p(),y(),X.forEach(Z=>Z())})}function Ns(e){return typeof window[e]<"u"}function Js(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class ra{constructor(t){T(this,"iframeIdToRemoteIdMap",new WeakMap),T(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,s,i,n){const l=i||this.getIdToRemoteIdMap(t),m=n||this.getRemoteIdToIdMap(t);let d=l.get(s);return d||(d=this.generateIdFn(),l.set(s,d),m.set(d,s)),d}getIds(t,s){const i=this.getIdToRemoteIdMap(t),n=this.getRemoteIdToIdMap(t);return s.map(l=>this.getId(t,l,i,n))}getRemoteId(t,s,i){const n=i||this.getRemoteIdToIdMap(t);return typeof s!="number"?s:n.get(s)||-1}getRemoteIds(t,s){const i=this.getRemoteIdToIdMap(t);return s.map(n=>this.getRemoteId(t,n,i))}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 Sp{constructor(t){T(this,"iframes",new WeakMap),T(this,"crossOriginIframeMap",new WeakMap),T(this,"crossOriginIframeMirror",new ra(ro)),T(this,"crossOriginIframeStyleMirror"),T(this,"crossOriginIframeRootIdMap",new WeakMap),T(this,"mirror"),T(this,"mutationCb"),T(this,"wrappedEmit"),T(this,"loadListener"),T(this,"stylesheetManager"),T(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ra(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 i,n;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:s}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((i=t.contentWindow)==null||i.addEventListener("message",this.handleMessage.bind(this))),(n=this.loadListener)==null||n.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 i=t.source;if(!i)return;const n=this.crossOriginIframeMap.get(i);if(!n)return;const l=this.transformCrossOriginEvent(n,s.data.event);l&&this.wrappedEmit(l,s.data.isCheckout)}transformCrossOriginEvent(t,s){var i;switch(s.type){case A.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(s.data.node,t);const n=s.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(s.data.node,n),{timestamp:s.timestamp,type:A.IncrementalSnapshot,data:{source:B.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:s.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case A.Meta:case A.Load:case A.DomContentLoaded:return!1;case A.Plugin:return s;case A.Custom:return this.replaceIds(s.data.payload,t,["id","parentId","previousId","nextId"]),s;case A.IncrementalSnapshot:switch(s.data.source){case B.Mutation:return s.data.adds.forEach(n=>{this.replaceIds(n,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,t);const l=this.crossOriginIframeRootIdMap.get(t);l&&this.patchRootIdOnNode(n.node,l)}),s.data.removes.forEach(n=>{this.replaceIds(n,t,["parentId","id"])}),s.data.attributes.forEach(n=>{this.replaceIds(n,t,["id"])}),s.data.texts.forEach(n=>{this.replaceIds(n,t,["id"])}),s;case B.Drag:case B.TouchMove:case B.MouseMove:return s.data.positions.forEach(n=>{this.replaceIds(n,t,["id"])}),s;case B.ViewportResize:return!1;case B.MediaInteraction:case B.MouseInteraction:case B.Scroll:case B.CanvasMutation:case B.Input:return this.replaceIds(s.data,t,["id"]),s;case B.StyleSheetRule:case B.StyleDeclaration:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleId"]),s;case B.Font:return s;case B.Selection:return s.data.ranges.forEach(n=>{this.replaceIds(n,t,["start","end"])}),s;case B.AdoptedStyleSheet:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleIds"]),(i=s.data.styles)==null||i.forEach(n=>{this.replaceStyleIds(n,t,["styleId"])}),s}}return!1}replace(t,s,i,n){for(const l of n)!Array.isArray(s[l])&&typeof s[l]!="number"||(Array.isArray(s[l])?s[l]=t.getIds(i,s[l]):s[l]=t.getId(i,s[l]));return s}replaceIds(t,s,i){return this.replace(this.crossOriginIframeMirror,t,s,i)}replaceStyleIds(t,s,i){return this.replace(this.crossOriginIframeStyleMirror,t,s,i)}replaceIdOnNode(t,s){this.replaceIds(t,s,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(i=>{this.replaceIdOnNode(i,s)})}patchRootIdOnNode(t,s){t.type!==jl.Document&&!t.rootId&&(t.rootId=s),"childNodes"in t&&t.childNodes.forEach(i=>{this.patchRootIdOnNode(i,s)})}}class Ip{constructor(t){T(this,"shadowDoms",new WeakSet),T(this,"mutationCb"),T(this,"scrollCb"),T(this,"bypassOptions"),T(this,"mirror"),T(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(!xt(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const[i]=ta(he(K({},this.bypassOptions),{doc:s,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(sa(he(K({},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(H.host(t))),this.restoreHandlers.push(na({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 i=this;this.restoreHandlers.push(st(t.prototype,"attachShadow",function(n){return function(l){const m=n.call(this,l),d=H.shadowRoot(this);return d&&Ql(this)&&i.addShadowRoot(d,s),m}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var It="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vp=typeof Uint8Array>"u"?[]:new Uint8Array(256),Ys=0;Ys<It.length;Ys++)Vp[It.charCodeAt(Ys)]=Ys;var Xp=function(e){var t=new Uint8Array(e),s,i=t.length,n="";for(s=0;s<i;s+=3)n+=It[t[s]>>2],n+=It[(t[s]&3)<<4|t[s+1]>>4],n+=It[(t[s+1]&15)<<2|t[s+2]>>6],n+=It[t[s+2]&63];return i%3===2?n=n.substring(0,n.length-1)+"=":i%3===1&&(n=n.substring(0,n.length-2)+"=="),n};const oa=new Map;function Gp(e,t){let s=oa.get(e);return s||(s=new Map,oa.set(e,s)),s.has(t)||s.set(t,[]),s.get(t)}const la=(e,t,s)=>{if(!e||!(ca(e,t)||typeof e=="object"))return;const i=e.constructor.name,n=Gp(s,i);let l=n.indexOf(e);return l===-1&&(l=n.length,n.push(e)),l};function Us(e,t,s){if(e instanceof Array)return e.map(i=>Us(i,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 i=e.constructor.name,n=Xp(e);return{rr_type:i,base64:n}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Us(e.buffer,t,s),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const i=e.constructor.name,{src:n}=e;return{rr_type:i,src:n}}else if(e instanceof HTMLCanvasElement){const i="HTMLImageElement",n=e.toDataURL();return{rr_type:i,src:n}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Us(e.data,t,s),e.width,e.height]};if(ca(e,t)||typeof e=="object"){const i=e.constructor.name,n=la(e,t,s);return{rr_type:i,index:n}}}}return e}const aa=(e,t,s)=>e.map(i=>Us(i,t,s)),ca=(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 Rp(e,t,s,i){const n=[],l=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const m of l)try{if(typeof t.CanvasRenderingContext2D.prototype[m]!="function")continue;const d=st(t.CanvasRenderingContext2D.prototype,m,function(u){return function(...o){return me(this.canvas,s,i,!0)||setTimeout(()=>{const h=aa(o,t,this);e(this.canvas,{type:Zt["2D"],property:m,args:h})},0),u.apply(this,o)}});n.push(d)}catch{const u=Ls(t.CanvasRenderingContext2D.prototype,m,{set(o){e(this.canvas,{type:Zt["2D"],property:m,args:[o],setter:!0})}});n.push(u)}return()=>{n.forEach(m=>m())}}function vp(e){return e==="experimental-webgl"?"webgl":e}function ua(e,t,s,i){const n=[];try{const l=st(e.HTMLCanvasElement.prototype,"getContext",function(m){return function(d,...u){if(!me(this,t,s,!0)){const o=vp(d);if("__context"in this||(this.__context=o),i&&["webgl","webgl2"].includes(o))if(u[0]&&typeof u[0]=="object"){const h=u[0];h.preserveDrawingBuffer||(h.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return m.apply(this,[d,...u])}});n.push(l)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(l=>l())}}function da(e,t,s,i,n,l){const m=[],d=Object.getOwnPropertyNames(e);for(const u of d)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))try{if(typeof e[u]!="function")continue;const o=st(e,u,function(h){return function(...c){const a=h.apply(this,c);if(la(a,l,this),"tagName"in this.canvas&&!me(this.canvas,i,n,!0)){const r=aa(c,l,this),f={type:t,property:u,args:r};s(this.canvas,f)}return a}});m.push(o)}catch{const h=Ls(e,u,{set(c){s(this.canvas,{type:t,property:u,args:[c],setter:!0})}});m.push(h)}return m}function Wp(e,t,s,i){const n=[];return typeof t.WebGLRenderingContext<"u"&&n.push(...da(t.WebGLRenderingContext.prototype,Zt.WebGL,e,s,i,t)),typeof t.WebGL2RenderingContext<"u"&&n.push(...da(t.WebGL2RenderingContext.prototype,Zt.WebGL2,e,s,i,t)),()=>{n.forEach(l=>l())}}const ha=`(function() {
|
|
352
|
+
or you can use record.mirror to access the mirror instance during recording.`;let El={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&&(El=new Proxy(El,{get(e,t,s){return t==="map"&&console.error(gt),Reflect.get(e,t,s)}}));function Yt(e,t,s={}){let i=null,n=0;return function(...l){const m=Date.now();!n&&s.leading===!1&&(n=m);const d=t-(m-n),u=this;d<=0||d>t?(i&&(clearTimeout(i),i=null),n=m,e.apply(u,l)):!i&&s.trailing!==!1&&(i=setTimeout(()=>{n=s.leading===!1?0:Date.now(),i=null,e.apply(u,l)},d))}}function Ts(e,t,s,i,n=window){const l=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,i?s:{set(m){setTimeout(()=>{s.set.call(this,m)},0),l&&l.set&&l.set.call(this,m)}}),()=>Ts(e,t,l||{},!0)}function zl(e){var t,s,i,n;const l=e.document;return{left:l.scrollingElement?l.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:l.documentElement.scrollLeft||l?.body&&((t=H.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&&((i=H.parentElement(l.body))==null?void 0:i.scrollTop)||((n=l?.body)==null?void 0:n.scrollTop)||0}}function Hl(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Pl(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Dl(e){return e?e.nodeType===e.ELEMENT_NODE?e:H.parentElement(e):null}const tp=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch{return!1}return!1};function me(e,t,s,i){if(!e)return!1;const n=Dl(e);if(!n)return!1;try{if(typeof t=="string"){if(n.classList.contains(t)||i&&n.closest("."+t)!==null)return!0}else if(ys(n,t,i))return!0}catch{}return!!(s&&(n.matches(s)||i&&n.closest(s)!==null))}function sp(e,t){return t.getId(e)!==-1}function Mn(e,t,s){return e.tagName==="TITLE"&&s.headTitleMutations?!0:t.getId(e)===Tt}function Bl(e,t){if(Ct(e))return!1;const s=t.getId(e);if(!t.has(s))return!0;const i=H.parentNode(e);return i&&i.nodeType===e.DOCUMENT_NODE?!1:i?Bl(i,t):!0}function Kn(e){return!!e.changedTouches}function ip(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 Ql(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function jl(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function On(e){return e?e instanceof Jn&&"shadowRoot"in e?!!e.shadowRoot:!!H.shadowRoot(e):!1}class np{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 i;return s===void 0?i=this.id++:i=s,this.styleIDMap.set(t,i),this.idStyleMap.set(i,t),i}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 Al(e){var t;let s=null;return"getRootNode"in e&&((t=H.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&H.host(H.getRootNode(e))&&(s=H.host(H.getRootNode(e))),s}function rp(e){let t=e,s;for(;s=Al(t);)t=s;return t}function op(e){const t=H.ownerDocument(e);if(!t)return!1;const s=rp(e);return H.contains(t,s)}function _l(e){const t=H.ownerDocument(e);return t?H.contains(t,e)||op(e):!1}var A=(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))(A||{}),B=(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))(B||{}),Xe=(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))(Xe||{}),Be=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Be||{}),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||{}),$l=(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))($l||{});function ql(e){return"__ln"in e}class lp{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 i=0;i<t;i++)s=s?.next||null;return s}addNode(t){const s={value:t,previous:null,next:null};if(t.__ln=s,t.previousSibling&&ql(t.previousSibling)){const i=t.previousSibling.__ln.next;s.next=i,s.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=s,i&&(i.previous=s)}else if(t.nextSibling&&ql(t.nextSibling)&&t.nextSibling.__ln.previous){const i=t.nextSibling.__ln.previous;s.previous=i,s.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=s,i&&(i.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 ea=(e,t)=>`${e}@${t}`;class ap{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,i=new lp,n=u=>{let o=u,h=Tt;for(;h===Tt;)o=o&&o.nextSibling,h=o&&this.mirror.getId(o);return h},l=u=>{const o=H.parentNode(u);if(!o||!_l(u))return;let h=!1;if(u.nodeType===Node.TEXT_NODE){const f=o.tagName;if(f==="TEXTAREA")return;f==="STYLE"&&this.addedSet.has(o)&&(h=!0)}const c=Ct(o)?this.mirror.getId(Al(u)):this.mirror.getId(o),a=n(u);if(c===-1||a===-1)return i.addNode(u);const r=yt(u,{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:f=>{Ql(f,this.mirror)&&this.iframeManager.addIframe(f),jl(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),On(u)&&this.shadowDomManager.addShadowRoot(H.shadowRoot(u),this.doc)},onIframeLoad:(f,p)=>{this.iframeManager.attachIframe(f,p),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)},cssCaptured:h});r&&(t.push({parentId:c,nextId:a,node:r}),s.add(r.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)ta(this.removesSubTreeCache,u)&&!this.movedSet.has(H.parentNode(u))||l(u);for(const u of this.addedSet)!sa(this.droppedSet,u)&&!ta(this.removesSubTreeCache,u)||sa(this.movedSet,u)?l(u):this.droppedSet.add(u);let m=null;for(;i.length;){let u=null;if(m){const o=this.mirror.getId(H.parentNode(m.value)),h=n(m.value);o!==-1&&h!==-1&&(u=m)}if(!u){let o=i.tail;for(;o;){const h=o;if(o=o.previous,h){const c=this.mirror.getId(H.parentNode(h.value));if(n(h.value)===-1)continue;if(c!==-1){u=h;break}else{const a=h.value,r=H.parentNode(a);if(r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const f=H.host(r);if(this.mirror.getId(f)!==-1){u=h;break}}}}}}if(!u){for(;i.head;)i.removeNode(i.head.value);break}m=u.previous,i.removeNode(u.value),l(u.value)}const d={texts:this.texts.map(u=>{var o,h;const c=u.node,a=H.parentNode(c);a&&a.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(a);let r=u.value;const f=this.privacySetting==="strict",p=this.privacySetting==="default"&&oo(r),y=(h=(o=u.node)==null?void 0:o.parentElement)==null?void 0:h.getAttribute("data-hl-record");return(f||p)&&!y&&r&&(r=fi(r)),{id:this.mirror.getId(c),value:r}}).filter(u=>!s.has(u.id)).filter(u=>this.mirror.has(u.id)),attributes:this.attributes.map(u=>{const{attributes:o}=u;if(typeof o.style=="string"){const h=JSON.stringify(u.styleDiff),c=JSON.stringify(u._unchangedStyles);h.length<o.style.length&&(h+c).split("var(").length===o.style.split("var(").length&&(o.style=u.styleDiff)}return{id:this.mirror.getId(u.node),attributes:o}}).filter(u=>!s.has(u.id)).filter(u=>this.mirror.has(u.id)),removes:this.removes,adds:t};!d.texts.length&&!d.attributes.length&&!d.removes.length&&!d.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(d))}),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 i=Array.from(H.childNodes(t),n=>H.textContent(n)||"").join("");s.attributes.value=hs({overwriteRecord:null,element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:ps(t),value:i,maskInputFn:this.maskInputFn})}),L(this,"processMutation",t=>{if(!Mn(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const s=H.textContent(t.target);!me(t.target,this.blockClass,this.blockSelector,!1)&&s!==t.oldValue&&this.texts.push({value:fo(t.target,this.maskTextClass,this.maskTextSelector,!0)&&s?this.maskTextFn?this.maskTextFn(s,Dl(t.target)):s.replace(/[\S]/g,"*"):s,node:t.target});break}case"attributes":{const s=t.target;let i=t.attributeName,n=t.target.getAttribute(i);if(i==="value"){const m=ps(s);n=hs({element:s,maskInputOptions:this.maskInputOptions,tagName:s.tagName,type:m,value:n,overwriteRecord:s.getAttribute("data-hl-record"),maskInputFn:this.maskInputFn})}if(me(t.target,this.blockClass,this.blockSelector,!1)||n===t.oldValue)return;let l=this.attributeMap.get(t.target);if(s.tagName==="IFRAME"&&i==="src"&&!this.keepIframeSrcFn(n))if(!s.contentDocument)i="rr_src";else return;if(l||(l={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(l),this.attributeMap.set(t.target,l)),i==="type"&&s.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&s.setAttribute("data-rr-is-password","true"),!po(s.tagName,i)){if(t.target.tagName==="INPUT"){const m=t.target;if(m.type==="password"){l.attributes.value="*".repeat(m.value.length);break}}if(l.attributes[i]=ho(this.doc,ft(s.tagName),ft(i),n),i==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const m=this.unattachedDoc.createElement("span");t.oldValue&&m.setAttribute("style",t.oldValue);for(const d of Array.from(s.style)){const u=s.style.getPropertyValue(d),o=s.style.getPropertyPriority(d);u!==m.style.getPropertyValue(d)||o!==m.style.getPropertyPriority(d)?o===""?l.styleDiff[d]=u:l.styleDiff[d]=[u,o]:l._unchangedStyles[d]=[u,o]}for(const d of Array.from(m.style))s.style.getPropertyValue(d)===""&&(l.styleDiff[d]=!1)}else i==="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(me(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 i=this.mirror.getId(s),n=Ct(t.target)?this.mirror.getId(H.host(t.target)):this.mirror.getId(t.target);me(t.target,this.blockClass,this.blockSelector,!1)||Mn(s,this.mirror,this.slimDOMOptions)||!sp(s,this.mirror)||(this.addedSet.has(s)?(En(this.addedSet,s),this.droppedSet.add(s)):this.addedSet.has(t.target)&&i===-1||Bl(t.target,this.mirror)||(this.movedSet.has(s)&&this.movedMap[ea(i,n)]?En(this.movedSet,s):(this.removes.push({parentId:n,id:i,isShadow:Ct(t.target)&&xt(t.target)?!0:void 0}),cp(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(Mn(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let i=null;s&&this.mirror.hasNode(s)&&(i=this.mirror.getId(s)),i&&i!==-1&&(this.movedMap[ea(this.mirror.getId(t),i)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);me(t,this.blockClass,this.blockSelector,!1)||(H.childNodes(t).forEach(i=>this.genAdds(i)),On(t)&&H.childNodes(H.shadowRoot(t)).forEach(i=>{this.processedNodeManager.add(i,this),this.genAdds(i,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 En(e,t){e.delete(t),H.childNodes(t).forEach(s=>En(e,s))}function cp(e,t){const s=[e];for(;s.length;){const i=s.pop();t.has(i)||(t.add(i),H.childNodes(i).forEach(n=>s.push(n)))}}function ta(e,t,s){return e.size===0?!1:up(e,t)}function up(e,t,s){const i=H.parentNode(t);return i?e.has(i):!1}function sa(e,t){return e.size===0?!1:ia(e,t)}function ia(e,t){const s=H.parentNode(t);return s?e.has(s)?!0:ia(e,s):!1}let Ut;function dp(e){Ut=e}function hp(){Ut=void 0}const Q=e=>Ut?(...t)=>{try{return e(...t)}catch(s){if(Ut&&Ut(s)===!0)return;throw s}}:e,it=[];function Ft(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 na(e,t){const s=new ap;it.push(s),s.init(e);const[i,n]=Ol(),l=new i(Q(s.processMutations.bind(s)));return l.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[l,n]}function pp({mousemoveCb:e,sampling:t,doc:s,mirror:i}){if(t.mousemove===!1)return()=>{};const n=typeof t.mousemove=="number"?t.mousemove:50,l=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let m=[],d;const u=Yt(Q(c=>{const a=Date.now()-d;e(m.map(r=>(r.timeOffset-=a,r)),c),m=[],d=null}),l),o=Q(Yt(Q(c=>{const a=Ft(c),{clientX:r,clientY:f}=Kn(c)?c.changedTouches[0]:c;d||(d=Jt()),m.push({x:r,y:f,id:i.getId(a),timeOffset:Jt()-d}),u(typeof DragEvent<"u"&&c instanceof DragEvent?B.Drag:c instanceof MouseEvent?B.MouseMove:B.TouchMove)}),n,{trailing:!1})),h=[ge("mousemove",o,s),ge("touchmove",o,s),ge("drag",o,s)];return Q(()=>{h.forEach(c=>c())})}function mp({mouseInteractionCb:e,doc:t,mirror:s,blockClass:i,blockSelector:n,sampling:l}){if(l.mouseInteraction===!1)return()=>{};const m=l.mouseInteraction===!0||l.mouseInteraction===void 0?{}:l.mouseInteraction,d=[];let u=null;const o=h=>c=>{const a=Ft(c);if(me(a,i,n,!0)||tp(a))return;let r=null,f=h;if("pointerType"in c){switch(c.pointerType){case"mouse":r=Be.Mouse;break;case"touch":r=Be.Touch;break;case"pen":r=Be.Pen;break}r===Be.Touch&&(Xe[h]===Xe.MouseDown?f="TouchStart":Xe[h]===Xe.MouseUp&&(f="TouchEnd"))}else Kn(c)&&(r=Be.Touch);r!==null?(u=r,(f.startsWith("Touch")&&r===Be.Touch||f.startsWith("Mouse")&&r===Be.Mouse)&&(r=null)):Xe[h]===Xe.Click&&(r=u,u=null);const p=Kn(c)?c.changedTouches[0]:c;if(!p)return;const y=s.getId(a),{clientX:X,clientY:Z}=p;Q(e)(K({type:Xe[f],id:y,x:X,y:Z},r!==null&&{pointerType:r}))};return Object.keys(Xe).filter(h=>Number.isNaN(Number(h))&&!h.endsWith("_Departed")&&m[h]!==!1).forEach(h=>{let c=ft(h);const a=o(h);if(window.PointerEvent)switch(Xe[h]){case Xe.MouseDown:case Xe.MouseUp:c=c.replace("mouse","pointer");break;case Xe.TouchStart:case Xe.TouchEnd:return}d.push(ge(c,a,t))}),Q(()=>{d.forEach(h=>h())})}function ra({scrollCb:e,doc:t,mirror:s,blockClass:i,blockSelector:n,sampling:l}){const m=Q(Yt(Q(d=>{const u=Ft(d);if(!u||me(u,i,n,!0))return;const o=s.getId(u);if(u===t&&t.defaultView){const h=zl(t.defaultView);e({id:o,x:h.left,y:h.top})}else e({id:o,x:u.scrollLeft,y:u.scrollTop})}),l.scroll||100));return ge("scroll",m,t)}function fp({viewportResizeCb:e},{win:t}){let s=-1,i=-1;const n=Q(Yt(Q(()=>{const l=Hl(),m=Pl();(s!==l||i!==m)&&(e({width:Number(m),height:Number(l)}),s=l,i=m)}),200));return ge("resize",n,t)}const bp=["INPUT","TEXTAREA","SELECT"],oa=new WeakMap;function yp({inputCb:e,doc:t,mirror:s,blockClass:i,blockSelector:n,ignoreClass:l,ignoreSelector:m,maskInputOptions:d,maskInputFn:u,sampling:o,userTriggeredOnInput:h}){function c(X){let Z=Ft(X);const S=X.isTrusted,R=Z&&Z.tagName;if(Z&&R==="OPTION"&&(Z=H.parentElement(Z)),!Z||!R||bp.indexOf(R)<0||me(Z,i,n,!0)||Z.classList.contains(l)||m&&Z.matches(m))return;let b=Z.value,g=!1;const G=ps(Z)||"",v=Z.getAttribute("data-hl-record");G==="radio"||G==="checkbox"?g=Z.checked:lo({maskInputOptions:d,type:G,tagName:R,overwriteRecord:v})&&(b=hs({element:Z,maskInputOptions:d,tagName:R,type:G,value:b,overwriteRecord:v,maskInputFn:u})),a(Z,h?{text:b,isChecked:g,userTriggered:S}:{text:b,isChecked:g});const V=Z.name;G==="radio"&&V&&g&&t.querySelectorAll(`input[type="radio"][name="${V}"]`).forEach(k=>{if(k!==Z){const w=k.value;a(k,h?{text:w,isChecked:!g,userTriggered:!1}:{text:w,isChecked:!g})}})}function a(X,Z){const S=oa.get(X);if(!S||S.text!==Z.text||S.isChecked!==Z.isChecked){oa.set(X,Z);const R=s.getId(X);Q(e)(he(K({},Z),{id:R}))}}const r=(o.input==="last"?["change"]:["input","change"]).map(X=>ge(X,Q(c),t)),f=t.defaultView;if(!f)return()=>{r.forEach(X=>X())};const p=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),y=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return p&&p.set&&r.push(...y.map(X=>Ts(X[0],X[1],{set(){Q(c)({target:this,isTrusted:!1})}},!1,f))),Q(()=>{r.forEach(X=>X())})}function Ls(e){const t=[];function s(i,n){if(Ns("CSSGroupingRule")&&i.parentRule instanceof CSSGroupingRule||Ns("CSSMediaRule")&&i.parentRule instanceof CSSMediaRule||Ns("CSSSupportsRule")&&i.parentRule instanceof CSSSupportsRule||Ns("CSSConditionRule")&&i.parentRule instanceof CSSConditionRule){const l=Array.from(i.parentRule.cssRules).indexOf(i);return n.unshift(l),s(i.parentRule,n)}else if(i.parentStyleSheet){const l=Array.from(i.parentStyleSheet.cssRules).indexOf(i);n.unshift(l)}return n}return s(e,t)}function Qe(e,t,s){let i,n;return e?(e.ownerNode?i=t.getId(e.ownerNode):n=s.getId(e),{styleId:n,id:i}):{}}function gp({styleSheetRuleCb:e,mirror:t,stylesheetManager:s},{win:i}){if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};const n=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:Q((h,c,a)=>{const[r,f]=a,{id:p,styleId:y}=Qe(c,t,s.styleMirror);return(p&&p!==-1||y&&y!==-1)&&e({id:p,styleId:y,adds:[{rule:r,index:f}]}),h.apply(c,a)})}),i.CSSStyleSheet.prototype.addRule=function(h,c,a=this.cssRules.length){const r=`${h} { ${c} }`;return i.CSSStyleSheet.prototype.insertRule.apply(this,[r,a])};const l=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:Q((h,c,a)=>{const[r]=a,{id:f,styleId:p}=Qe(c,t,s.styleMirror);return(f&&f!==-1||p&&p!==-1)&&e({id:f,styleId:p,removes:[{index:r}]}),h.apply(c,a)})}),i.CSSStyleSheet.prototype.removeRule=function(h){return i.CSSStyleSheet.prototype.deleteRule.apply(this,[h])};let m;i.CSSStyleSheet.prototype.replace&&(m=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(m,{apply:Q((h,c,a)=>{const[r]=a,{id:f,styleId:p}=Qe(c,t,s.styleMirror);return(f&&f!==-1||p&&p!==-1)&&e({id:f,styleId:p,replace:r}),h.apply(c,a)})}));let d;i.CSSStyleSheet.prototype.replaceSync&&(d=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(d,{apply:Q((h,c,a)=>{const[r]=a,{id:f,styleId:p}=Qe(c,t,s.styleMirror);return(f&&f!==-1||p&&p!==-1)&&e({id:f,styleId:p,replaceSync:r}),h.apply(c,a)})}));const u={};Js("CSSGroupingRule")?u.CSSGroupingRule=i.CSSGroupingRule:(Js("CSSMediaRule")&&(u.CSSMediaRule=i.CSSMediaRule),Js("CSSConditionRule")&&(u.CSSConditionRule=i.CSSConditionRule),Js("CSSSupportsRule")&&(u.CSSSupportsRule=i.CSSSupportsRule));const o={};return Object.entries(u).forEach(([h,c])=>{o[h]={insertRule:c.prototype.insertRule,deleteRule:c.prototype.deleteRule},c.prototype.insertRule=new Proxy(o[h].insertRule,{apply:Q((a,r,f)=>{const[p,y]=f,{id:X,styleId:Z}=Qe(r.parentStyleSheet,t,s.styleMirror);return(X&&X!==-1||Z&&Z!==-1)&&e({id:X,styleId:Z,adds:[{rule:p,index:[...Ls(r),y||0]}]}),a.apply(r,f)})}),c.prototype.deleteRule=new Proxy(o[h].deleteRule,{apply:Q((a,r,f)=>{const[p]=f,{id:y,styleId:X}=Qe(r.parentStyleSheet,t,s.styleMirror);return(y&&y!==-1||X&&X!==-1)&&e({id:y,styleId:X,removes:[{index:[...Ls(r),p]}]}),a.apply(r,f)})})}),Q(()=>{i.CSSStyleSheet.prototype.insertRule=n,i.CSSStyleSheet.prototype.deleteRule=l,m&&(i.CSSStyleSheet.prototype.replace=m),d&&(i.CSSStyleSheet.prototype.replaceSync=d),Object.entries(u).forEach(([h,c])=>{c.prototype.insertRule=o[h].insertRule,c.prototype.deleteRule=o[h].deleteRule})})}function la({mirror:e,stylesheetManager:t},s){var i,n,l;let m=null;s.nodeName==="#document"?m=e.getId(s):m=e.getId(H.host(s));const d=s.nodeName==="#document"?(i=s.defaultView)==null?void 0:i.Document:(l=(n=s.ownerDocument)==null?void 0:n.defaultView)==null?void 0:l.ShadowRoot,u=d!=null&&d.prototype?Object.getOwnPropertyDescriptor(d?.prototype,"adoptedStyleSheets"):void 0;return m===null||m===-1||!d||!u?()=>{}:(Object.defineProperty(s,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var o;return(o=u.get)==null?void 0:o.call(this)},set(o){var h;const c=(h=u.set)==null?void 0:h.call(this,o);if(m!==null&&m!==-1)try{t.adoptStyleSheets(o,m)}catch{}return c}}),Q(()=>{Object.defineProperty(s,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))}function Zp({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:s,stylesheetManager:i},{win:n}){const l=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(l,{apply:Q((d,u,o)=>{var h;const[c,a,r]=o;if(s.has(c))return l.apply(u,[c,a,r]);const{id:f,styleId:p}=Qe((h=u.parentRule)==null?void 0:h.parentStyleSheet,t,i.styleMirror);return(f&&f!==-1||p&&p!==-1)&&e({id:f,styleId:p,set:{property:c,value:a,priority:r},index:Ls(u.parentRule)}),d.apply(u,o)})});const m=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(m,{apply:Q((d,u,o)=>{var h;const[c]=o;if(s.has(c))return m.apply(u,[c]);const{id:a,styleId:r}=Qe((h=u.parentRule)==null?void 0:h.parentStyleSheet,t,i.styleMirror);return(a&&a!==-1||r&&r!==-1)&&e({id:a,styleId:r,remove:{property:c},index:Ls(u.parentRule)}),d.apply(u,o)})}),Q(()=>{n.CSSStyleDeclaration.prototype.setProperty=l,n.CSSStyleDeclaration.prototype.removeProperty=m})}function Sp({mediaInteractionCb:e,blockClass:t,blockSelector:s,mirror:i,sampling:n,doc:l}){const m=Q(u=>Yt(Q(o=>{const h=Ft(o);if(!h||me(h,t,s,!0))return;const{currentTime:c,volume:a,muted:r,playbackRate:f,loop:p}=h;e({type:u,id:i.getId(h),currentTime:c,volume:a,muted:r,playbackRate:f,loop:p})}),n.media||500)),d=[ge("play",m(St.Play),l),ge("pause",m(St.Pause),l),ge("seeked",m(St.Seeked),l),ge("volumechange",m(St.VolumeChange),l),ge("ratechange",m(St.RateChange),l)];return Q(()=>{d.forEach(u=>u())})}function Ip({fontCb:e,doc:t}){const s=t.defaultView;if(!s)return()=>{};const i=[],n=new WeakMap,l=s.FontFace;s.FontFace=function(d,u,o){const h=new l(d,u,o);return n.set(h,{family:d,buffer:typeof u!="string",descriptors:o,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};const m=st(t.fonts,"add",function(d){return function(u){return setTimeout(Q(()=>{const o=n.get(u);o&&(e(o),n.delete(u))}),0),d.apply(this,[u])}});return i.push(()=>{s.FontFace=l}),i.push(m),Q(()=>{i.forEach(d=>d())})}function Vp(e){const{doc:t,mirror:s,blockClass:i,blockSelector:n,selectionCb:l}=e;let m=!0;const d=Q(()=>{const u=t.getSelection();if(!u||m&&u!=null&&u.isCollapsed)return;m=u.isCollapsed||!1;const o=[],h=u.rangeCount||0;for(let c=0;c<h;c++){const a=u.getRangeAt(c),{startContainer:r,startOffset:f,endContainer:p,endOffset:y}=a;me(r,i,n,!0)||me(p,i,n,!0)||o.push({start:s.getId(r),startOffset:f,end:s.getId(p),endOffset:y})}l({ranges:o})});return d(),ge("selectionchange",d)}function Xp({doc:e,customElementCb:t}){const s=e.defaultView;return!s||!s.customElements?()=>{}:st(s.customElements,"define",function(i){return function(n,l,m){try{t({define:{name:n}})}catch{console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,l,m])}})}function Gp(e,t){const{mutationCb:s,mousemoveCb:i,mouseInteractionCb:n,scrollCb:l,viewportResizeCb:m,inputCb:d,mediaInteractionCb:u,styleSheetRuleCb:o,styleDeclarationCb:h,canvasMutationCb:c,fontCb:a,selectionCb:r,customElementCb:f}=e;e.mutationCb=(...p)=>{t.mutation&&t.mutation(...p),s(...p)},e.mousemoveCb=(...p)=>{t.mousemove&&t.mousemove(...p),i(...p)},e.mouseInteractionCb=(...p)=>{t.mouseInteraction&&t.mouseInteraction(...p),n(...p)},e.scrollCb=(...p)=>{t.scroll&&t.scroll(...p),l(...p)},e.viewportResizeCb=(...p)=>{t.viewportResize&&t.viewportResize(...p),m(...p)},e.inputCb=(...p)=>{t.input&&t.input(...p),d(...p)},e.mediaInteractionCb=(...p)=>{t.mediaInteaction&&t.mediaInteaction(...p),u(...p)},e.styleSheetRuleCb=(...p)=>{t.styleSheetRule&&t.styleSheetRule(...p),o(...p)},e.styleDeclarationCb=(...p)=>{t.styleDeclaration&&t.styleDeclaration(...p),h(...p)},e.canvasMutationCb=(...p)=>{t.canvasMutation&&t.canvasMutation(...p),c(...p)},e.fontCb=(...p)=>{t.font&&t.font(...p),a(...p)},e.selectionCb=(...p)=>{t.selection&&t.selection(...p),r(...p)},e.customElementCb=(...p)=>{t.customElement&&t.customElement(...p),f(...p)}}function Rp(e,t={}){const s=e.doc.defaultView;if(!s)return()=>{};Gp(e,t);let i,n=()=>{};e.recordDOM&&([i,n]=na(e,e.doc));const l=pp(e),m=mp(e),d=ra(e),u=fp(e,{win:s}),o=yp(e),h=Sp(e);let c=()=>{},a=()=>{},r=()=>{},f=()=>{};e.recordDOM&&(c=gp(e,{win:s}),a=la(e,e.doc),r=Zp(e,{win:s}),e.collectFonts&&(f=Ip(e)));const p=Vp(e),y=Xp(e),X=[];for(const Z of e.plugins)X.push(Z.observer(Z.callback,s,Z.options));return Q(()=>{it.forEach(Z=>Z.reset()),i?.disconnect(),n(),l(),m(),d(),u(),o(),h(),c(),a(),r(),f(),p(),y(),X.forEach(Z=>Z())})}function Ns(e){return typeof window[e]<"u"}function Js(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class aa{constructor(t){L(this,"iframeIdToRemoteIdMap",new WeakMap),L(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,s,i,n){const l=i||this.getIdToRemoteIdMap(t),m=n||this.getRemoteIdToIdMap(t);let d=l.get(s);return d||(d=this.generateIdFn(),l.set(s,d),m.set(d,s)),d}getIds(t,s){const i=this.getIdToRemoteIdMap(t),n=this.getRemoteIdToIdMap(t);return s.map(l=>this.getId(t,l,i,n))}getRemoteId(t,s,i){const n=i||this.getRemoteIdToIdMap(t);return typeof s!="number"?s:n.get(s)||-1}getRemoteIds(t,s){const i=this.getRemoteIdToIdMap(t);return s.map(n=>this.getRemoteId(t,n,i))}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 vp{constructor(t){L(this,"iframes",new WeakMap),L(this,"crossOriginIframeMap",new WeakMap),L(this,"crossOriginIframeMirror",new aa(ao)),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 aa(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 i,n;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:s}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((i=t.contentWindow)==null||i.addEventListener("message",this.handleMessage.bind(this))),(n=this.loadListener)==null||n.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 i=t.source;if(!i)return;const n=this.crossOriginIframeMap.get(i);if(!n)return;const l=this.transformCrossOriginEvent(n,s.data.event);l&&this.wrappedEmit(l,s.data.isCheckout)}transformCrossOriginEvent(t,s){var i;switch(s.type){case A.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(s.data.node,t);const n=s.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(s.data.node,n),{timestamp:s.timestamp,type:A.IncrementalSnapshot,data:{source:B.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:s.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case A.Meta:case A.Load:case A.DomContentLoaded:return!1;case A.Plugin:return s;case A.Custom:return this.replaceIds(s.data.payload,t,["id","parentId","previousId","nextId"]),s;case A.IncrementalSnapshot:switch(s.data.source){case B.Mutation:return s.data.adds.forEach(n=>{this.replaceIds(n,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,t);const l=this.crossOriginIframeRootIdMap.get(t);l&&this.patchRootIdOnNode(n.node,l)}),s.data.removes.forEach(n=>{this.replaceIds(n,t,["parentId","id"])}),s.data.attributes.forEach(n=>{this.replaceIds(n,t,["id"])}),s.data.texts.forEach(n=>{this.replaceIds(n,t,["id"])}),s;case B.Drag:case B.TouchMove:case B.MouseMove:return s.data.positions.forEach(n=>{this.replaceIds(n,t,["id"])}),s;case B.ViewportResize:return!1;case B.MediaInteraction:case B.MouseInteraction:case B.Scroll:case B.CanvasMutation:case B.Input:return this.replaceIds(s.data,t,["id"]),s;case B.StyleSheetRule:case B.StyleDeclaration:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleId"]),s;case B.Font:return s;case B.Selection:return s.data.ranges.forEach(n=>{this.replaceIds(n,t,["start","end"])}),s;case B.AdoptedStyleSheet:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleIds"]),(i=s.data.styles)==null||i.forEach(n=>{this.replaceStyleIds(n,t,["styleId"])}),s}}return!1}replace(t,s,i,n){for(const l of n)!Array.isArray(s[l])&&typeof s[l]!="number"||(Array.isArray(s[l])?s[l]=t.getIds(i,s[l]):s[l]=t.getId(i,s[l]));return s}replaceIds(t,s,i){return this.replace(this.crossOriginIframeMirror,t,s,i)}replaceStyleIds(t,s,i){return this.replace(this.crossOriginIframeStyleMirror,t,s,i)}replaceIdOnNode(t,s){this.replaceIds(t,s,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(i=>{this.replaceIdOnNode(i,s)})}patchRootIdOnNode(t,s){t.type!==$l.Document&&!t.rootId&&(t.rootId=s),"childNodes"in t&&t.childNodes.forEach(i=>{this.patchRootIdOnNode(i,s)})}}class Wp{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(!xt(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const[i]=na(he(K({},this.bypassOptions),{doc:s,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(ra(he(K({},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(H.host(t))),this.restoreHandlers.push(la({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 i=this;this.restoreHandlers.push(st(t.prototype,"attachShadow",function(n){return function(l){const m=n.call(this,l),d=H.shadowRoot(this);return d&&_l(this)&&i.addShadowRoot(d,s),m}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var It="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kp=typeof Uint8Array>"u"?[]:new Uint8Array(256),Ys=0;Ys<It.length;Ys++)kp[It.charCodeAt(Ys)]=Ys;var wp=function(e){var t=new Uint8Array(e),s,i=t.length,n="";for(s=0;s<i;s+=3)n+=It[t[s]>>2],n+=It[(t[s]&3)<<4|t[s+1]>>4],n+=It[(t[s+1]&15)<<2|t[s+2]>>6],n+=It[t[s+2]&63];return i%3===2?n=n.substring(0,n.length-1)+"=":i%3===1&&(n=n.substring(0,n.length-2)+"=="),n};const ca=new Map;function Cp(e,t){let s=ca.get(e);return s||(s=new Map,ca.set(e,s)),s.has(t)||s.set(t,[]),s.get(t)}const ua=(e,t,s)=>{if(!e||!(ha(e,t)||typeof e=="object"))return;const i=e.constructor.name,n=Cp(s,i);let l=n.indexOf(e);return l===-1&&(l=n.length,n.push(e)),l};function Us(e,t,s){if(e instanceof Array)return e.map(i=>Us(i,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 i=e.constructor.name,n=wp(e);return{rr_type:i,base64:n}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Us(e.buffer,t,s),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const i=e.constructor.name,{src:n}=e;return{rr_type:i,src:n}}else if(e instanceof HTMLCanvasElement){const i="HTMLImageElement",n=e.toDataURL();return{rr_type:i,src:n}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Us(e.data,t,s),e.width,e.height]};if(ha(e,t)||typeof e=="object"){const i=e.constructor.name,n=ua(e,t,s);return{rr_type:i,index:n}}}}return e}const da=(e,t,s)=>e.map(i=>Us(i,t,s)),ha=(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 xp(e,t,s,i){const n=[],l=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const m of l)try{if(typeof t.CanvasRenderingContext2D.prototype[m]!="function")continue;const d=st(t.CanvasRenderingContext2D.prototype,m,function(u){return function(...o){return me(this.canvas,s,i,!0)||setTimeout(()=>{const h=da(o,t,this);e(this.canvas,{type:Zt["2D"],property:m,args:h})},0),u.apply(this,o)}});n.push(d)}catch{const u=Ts(t.CanvasRenderingContext2D.prototype,m,{set(o){e(this.canvas,{type:Zt["2D"],property:m,args:[o],setter:!0})}});n.push(u)}return()=>{n.forEach(m=>m())}}function Tp(e){return e==="experimental-webgl"?"webgl":e}function pa(e,t,s,i){const n=[];try{const l=st(e.HTMLCanvasElement.prototype,"getContext",function(m){return function(d,...u){if(!me(this,t,s,!0)){const o=Tp(d);if("__context"in this||(this.__context=o),i&&["webgl","webgl2"].includes(o))if(u[0]&&typeof u[0]=="object"){const h=u[0];h.preserveDrawingBuffer||(h.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return m.apply(this,[d,...u])}});n.push(l)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(l=>l())}}function ma(e,t,s,i,n,l){const m=[],d=Object.getOwnPropertyNames(e);for(const u of d)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))try{if(typeof e[u]!="function")continue;const o=st(e,u,function(h){return function(...c){const a=h.apply(this,c);if(ua(a,l,this),"tagName"in this.canvas&&!me(this.canvas,i,n,!0)){const r=da(c,l,this),f={type:t,property:u,args:r};s(this.canvas,f)}return a}});m.push(o)}catch{const h=Ts(e,u,{set(c){s(this.canvas,{type:t,property:u,args:[c],setter:!0})}});m.push(h)}return m}function Lp(e,t,s,i){const n=[];return typeof t.WebGLRenderingContext<"u"&&n.push(...ma(t.WebGLRenderingContext.prototype,Zt.WebGL,e,s,i,t)),typeof t.WebGL2RenderingContext<"u"&&n.push(...ma(t.WebGL2RenderingContext.prototype,Zt.WebGL2,e,s,i,t)),()=>{n.forEach(l=>l())}}const fa=`(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
|
-
`,pa=typeof self<"u"&&self.Blob&&new Blob([ha],{type:"text/javascript;charset=utf-8"});function kp(e){let t;try{if(t=pa&&(self.URL||self.webkitURL).createObjectURL(pa),!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(ha),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class wp{constructor(t){T(this,"pendingCanvasMutations",new Map),T(this,"rafStamps",{latestId:0,invokeId:null}),T(this,"mirror"),T(this,"logger"),T(this,"worker"),T(this,"snapshotInProgressMap",new Map),T(this,"lastSnapshotTime",new Map),T(this,"options"),T(this,"mutationCb"),T(this,"resetObservers"),T(this,"frozen",!1),T(this,"locked",!1),T(this,"processMutation",(c,a)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(a)});const{sampling:s,win:i,blockClass:n,blockSelector:l,recordCanvas:m,recordLocalVideos:d,recordRemoteVideos:u,initialSnapshotDelay:o,dataURLOptions:h}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.logger=t.logger,this.worker=new kp,this.worker.onmessage=c=>{const{id:a}=c.data;if(this.snapshotInProgressMap.set(a,!1),!("base64"in c.data)){this.debug(null,"canvas worker received empty message",{id:a,data:c.data,status:c.data.status});return}const{base64:r,type:f,dx:p,dy:y,dw:X,dh:Z}=c.data,S={id:a,type:Zt["2D"],commands:[{property:"clearRect",args:[p,y,X,Z]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:f}]},p,y,X,Z]}]};this.debug(null,"canvas worker recording mutation",S),this.mutationCb(S)},this.options=t,m&&s==="all"?(this.debug(null,"initializing canvas mutation observer",{sampling:s}),this.initCanvasMutationObserver(i,n,l)):m&&typeof s=="number"&&(this.debug(null,"initializing canvas fps observer",{sampling:s}),this.initCanvasFPSObserver(d,u,s,i,n,l,{initialSnapshotDelay:o,dataURLOptions:h},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 i=this.mirror.getId(t);let n="[highlight-canvas-manager]";t&&(n=`[highlight-canvas] [id:${i}]`,t.tagName.toLowerCase()==="canvas"&&(n+=` [ctx:${t.__context}]`)),this.logger.debug(n,t,...s)}snapshot(t){return ye(this,null,function*(){var s;const i=this.mirror.getId(t);if(this.snapshotInProgressMap.get(i)){this.debug(t,"snapshotting already in progress for",i);return}const n=1e3/(typeof this.options.samplingManual=="number"?this.options.samplingManual:1),l=this.lastSnapshotTime.get(i);if(!(l&&new Date().getTime()-l<n)){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(i,new Date().getTime()),this.snapshotInProgressMap.set(i,!0);try{if(this.options.clearWebGLBuffer!==!1&&["webgl","webgl2"].includes(t.__context)){const h=t.getContext(t.__context);((s=h?.getContextAttributes())==null?void 0:s.preserveDrawingBuffer)===!1&&(h.clear(h.COLOR_BUFFER_BIT),this.debug(t,"cleared webgl canvas to load it into memory",{attributes:h?.getContextAttributes()}))}if(t.width===0||t.height===0){this.debug(t,"not yet ready",{width:t.width,height:t.height});return}let m=this.options.resizeFactor||1;if(this.options.maxSnapshotDimension){const h=Math.max(t.width,t.height);m=Math.min(m,this.options.maxSnapshotDimension/h)}const d=t.width*m,u=t.height*m,o=yield createImageBitmap(t,{resizeWidth:d,resizeHeight:u});this.debug(t,"created image bitmap",{width:o.width,height:o.height}),this.worker.postMessage({id:i,bitmap:o,width:d,height:u,dx:0,dy:0,dw:t.width,dh:t.height,dataURLOptions:this.options.dataURLOptions,logDebug:!!this.logger},[o]),this.debug(t,"sent message")}catch(m){this.debug(t,"failed to snapshot",m)}finally{this.snapshotInProgressMap.set(i,!1)}}})}initCanvasFPSObserver(t,s,i,n,l,m,d,u,o){const h=ua(n,l,m,!0),c=1e3/i;let a=0,r;const f=new Map,p=(S,R)=>{const b=[];S.querySelectorAll(R).forEach(v=>b.push(v));const g=document.createNodeIterator(S,Node.ELEMENT_NODE);let G;for(;G=g.nextNode();)G!=null&&G.shadowRoot&&b.push(...p(G.shadowRoot,R));return b},y=S=>{const R=[];return p(n.document,"canvas").forEach(b=>{if(!me(b,l,m,!0)){this.debug(b,"discovered canvas"),R.push(b);const g=this.mirror.getId(b);f.has(g)||f.set(g,S)}}),R},X=S=>{const R=[];return(t||s)&&p(n.document,"video").forEach(b=>{if(!(!s&&b.src!==""&&b.src.indexOf("blob:")===-1)&&!(!t&&(b.src===""||b.src.indexOf("blob:")!==-1))&&!me(b,l,m,!0)){R.push(b);const g=this.mirror.getId(b);f.has(g)||f.set(g,S)}}),R},Z=S=>ye(this,null,function*(){if(a&&S-a<c){r=requestAnimationFrame(g=>void Z(g));return}a=S;const R=g=>{const G=this.mirror.getId(g),v=f.get(G),V=!d.initialSnapshotDelay||S-v>d.initialSnapshotDelay;return this.debug(g,{delay:d.initialSnapshotDelay,delta:S-v,hadLoadingTime:V}),V},b=[];b.push(...y(S).filter(R).map(g=>this.snapshot(g))),b.push(...X(S).filter(R).map(g=>ye(this,null,function*(){this.debug(g,"starting video snapshotting");const G=this.mirror.getId(g);if(this.snapshotInProgressMap.get(G)){this.debug(g,"video snapshotting already in progress for",G);return}this.snapshotInProgressMap.set(G,!0);try{const{width:v,height:V}=g.getBoundingClientRect(),{actualWidth:k,actualHeight:w}={actualWidth:g.videoWidth,actualHeight:g.videoHeight},N=Math.max(k,w);if(N===0){this.debug(g,"not yet ready",{width:g.width,height:g.height,actualWidth:k,actualHeight:w,boxWidth:v,boxHeight:V});return}let z=u||1;o&&(z=Math.min(z,o/N));const I=k*z,W=w*z,L=yield createImageBitmap(g,{resizeWidth:I,resizeHeight:W}),U=Math.max(v,V)/N,F=k*U,J=w*U,D=(v-F)/2,E=(V-J)/2;this.debug(g,"created image bitmap",{actualWidth:k,actualHeight:w,boxWidth:v,boxHeight:V,outputWidth:F,outputHeight:J,resizeWidth:I,resizeHeight:W,scale:z,outputScale:U,offsetX:D,offsetY:E}),this.worker.postMessage({id:G,bitmap:L,width:I,height:W,dx:D,dy:E,dw:F,dh:J,dataURLOptions:d.dataURLOptions,logDebug:!!this.logger},[L]),this.debug(g,"send message")}catch(v){this.debug(g,"failed to snapshot",v)}finally{this.snapshotInProgressMap.set(G,!1)}}))),yield Promise.all(b).catch(console.error),r=requestAnimationFrame(g=>void Z(g))});r=requestAnimationFrame(S=>void Z(S)),this.resetObservers=()=>{h(),r&&cancelAnimationFrame(r)}}initCanvasMutationObserver(t,s,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const n=ua(t,s,i,!1),l=Rp(this.processMutation.bind(this),t,s,i),m=Wp(this.processMutation.bind(this),t,s,i);this.resetObservers=()=>{n(),l(),m()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=s=>{this.rafStamps.latestId=s,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,s)=>{const i=this.mirror.getId(s);this.flushPendingCanvasMutationFor(s,i)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,s){if(this.frozen||this.locked)return;const i=this.pendingCanvasMutations.get(t);if(!i||s===-1)return;const n=i.map(m=>mt(m,["type"])),{type:l}=i[0];this.mutationCb({id:s,type:l,commands:n}),this.pendingCanvasMutations.delete(t)}}class Cp{constructor(t){T(this,"trackedLinkElements",new WeakSet),T(this,"mutationCb"),T(this,"adoptedStyleSheetCb"),T(this,"styleMirror",new $h),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 i={id:s,styleIds:[]},n=[];for(const l of t){let m;this.styleMirror.has(l)?m=this.styleMirror.getId(l):(m=this.styleMirror.add(l),n.push({styleId:m,rules:Array.from(l.rules||CSSRule,(d,u)=>({rule:qr(d,l.href),index:u}))})),i.styleIds.push(m)}n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class xp{constructor(){T(this,"nodeMap",new WeakMap),T(this,"active",!1)}inOtherBuffer(t,s){const i=this.nodeMap.get(t);return i&&Array.from(i).some(n=>n!==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 re,Fs,Mt,Ms=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((zr=e.contentWindow)==null?void 0:zr.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Je=Td();function Pe(e={}){var t;const{emit:s,checkoutEveryNms:i,checkoutEveryNth:n,blockClass:l="highlight-block",blockSelector:m=null,ignoreClass:d="highlight-ignore",ignoreSelector:u=null,maskTextClass:o="highlight-mask",maskTextSelector:h=null,inlineStylesheet:c=!0,maskAllInputs:a,maskInputOptions:r,slimDOMOptions:f,maskInputFn:p,maskTextFn:y=mi,hooks:X,packFn:Z,sampling:S={},mousemoveWait:R,recordDOM:b=!0,recordCanvas:g=!1,recordCrossOriginIframes:G=!1,recordAfter:v=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:k=!1,inlineImages:w=!1,inlineVideos:N=!1,plugins:z,keepIframeSrcFn:I=()=>!1,privacySetting:W="default",ignoreCSSAttributes:L=new Set([]),errorHandler:U,logger:F}=e,J=K(K({},e.dataURLOptions),typeof((t=e.sampling)==null?void 0:t.canvas)=="object"?e.sampling.canvas.dataURLOptions:void 0);rp(U);const D=G?window.parent===window:!0;let E=!1;if(!D)try{window.parent.document&&(E=!1)}catch{E=!0}if(D&&!s)throw new Error("emit function is required");if(!D&&!E)return()=>{};R!==void 0&&S.mousemove===void 0&&(S.mousemove=R),Je.reset();const x=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}:r!==void 0?r:{password:!0},se=po(f);_h();let ne,ee=0;const ve=_=>{for(const Ye of z||[])Ye.eventProcessor&&(_=Ye.eventProcessor(_));return Z&&!E&&(_=Z(_)),_};re=(_,Ye)=>{var oe;const le=_;if(le.timestamp=Jt(),(oe=it[0])!=null&&oe.isFrozen()&&le.type!==A.FullSnapshot&&!(le.type===A.IncrementalSnapshot&&le.data.source===B.Mutation)&&it.forEach(ke=>ke.unfreeze()),D)s?.(ve(le),Ye);else if(E){const ke={type:"rrweb",event:ve(le),origin:window.location.origin,isCheckout:Ye};window.parent.postMessage(ke,"*")}if(le.type===A.FullSnapshot)ne=le,ee=0;else if(le.type===A.IncrementalSnapshot){if(le.data.source===B.Mutation&&le.data.isAttachIframe)return;ee++;const ke=n&&ee>=n,$=i&&le.timestamp-ne.timestamp>i;(ke||$)&&Fs(!0)}};const Ie=_=>{re({type:A.IncrementalSnapshot,data:K({source:B.Mutation},_)})},Me=_=>re({type:A.IncrementalSnapshot,data:K({source:B.Scroll},_)}),Ae=_=>re({type:A.IncrementalSnapshot,data:K({source:B.CanvasMutation},_)}),_e=_=>re({type:A.IncrementalSnapshot,data:K({source:B.AdoptedStyleSheet},_)}),ie=new Cp({mutationCb:Ie,adoptedStyleSheetCb:_e}),de=new Sp({mirror:Je,mutationCb:Ie,stylesheetManager:ie,recordCrossOriginIframes:G,wrappedEmit:re});for(const _ of z||[])_.getMirror&&_.getMirror({nodeMirror:Je,crossOriginIframeMirror:de.crossOriginIframeMirror,crossOriginIframeStyleMirror:de.crossOriginIframeStyleMirror});const We=new xp,Ke=typeof S?.canvas=="object"?S.canvas:{fps:S?.canvas};Mt=new wp({recordCanvas:g,recordLocalVideos:w,recordRemoteVideos:N,mutationCb:Ae,win:window,blockClass:l,blockSelector:m,mirror:Je,sampling:Ke.fps,samplingManual:Ke.fpsManual,clearWebGLBuffer:Ke.clearWebGLBuffer,initialSnapshotDelay:Ke.initialSnapshotDelay,dataURLOptions:J,resizeFactor:Ke.resizeFactor,maxSnapshotDimension:Ke.maxSnapshotDimension,logger:F});const Os=new Ip({mutationCb:Ie,scrollCb:Me,bypassOptions:{blockClass:l,blockSelector:m,maskTextClass:o,maskTextSelector:h,inlineStylesheet:c,maskInputOptions:x,dataURLOptions:J,maskTextFn:y,maskInputFn:p,recordCanvas:g,inlineImages:w,inlineVideos:N,privacySetting:W,sampling:S,slimDOMOptions:se,iframeManager:de,stylesheetManager:ie,canvasManager:Mt,keepIframeSrcFn:I,processedNodeManager:We},mirror:Je});Fs=(_=!1)=>{if(!b)return;re({type:A.Meta,data:{href:window.location.href,width:El(),height:Ol()}},_),ie.reset(),Os.init(),it.forEach(oe=>oe.lock());const Ye=uh(document,{mirror:Je,blockClass:l,blockSelector:m,maskTextClass:o,maskTextSelector:h,inlineStylesheet:c,maskAllInputs:x,maskTextFn:y,maskInputFn:p,slimDOM:se,dataURLOptions:J,recordCanvas:g,inlineImages:w,inlineVideos:N,privacySetting:W,onSerialize:oe=>{Pl(oe,Je)&&de.addIframe(oe),Dl(oe,Je)&&ie.trackLinkElement(oe),Kn(oe)&&Os.addShadowRoot(H.shadowRoot(oe),document)},onIframeLoad:(oe,le)=>{de.attachIframe(oe,le),Os.observeAttachShadow(oe)},onStylesheetLoad:(oe,le)=>{ie.attachLinkElement(oe,le)},keepIframeSrcFn:I});if(!Ye)return console.warn("Failed to snapshot the document");re({type:A.FullSnapshot,data:{node:Ye,initialOffset:Kl(window)}},_),it.forEach(oe=>oe.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ie.adoptStyleSheets(document.adoptedStyleSheets,Je.getId(document))};try{const _=[],Ye=le=>{var ke;return Q(Zp)({mutationCb:Ie,mousemoveCb:($,_n)=>re({type:A.IncrementalSnapshot,data:{source:_n,positions:$}}),mouseInteractionCb:$=>re({type:A.IncrementalSnapshot,data:K({source:B.MouseInteraction},$)}),scrollCb:Me,viewportResizeCb:$=>re({type:A.IncrementalSnapshot,data:K({source:B.ViewportResize},$)}),inputCb:$=>re({type:A.IncrementalSnapshot,data:K({source:B.Input},$)}),mediaInteractionCb:$=>re({type:A.IncrementalSnapshot,data:K({source:B.MediaInteraction},$)}),styleSheetRuleCb:$=>re({type:A.IncrementalSnapshot,data:K({source:B.StyleSheetRule},$)}),styleDeclarationCb:$=>re({type:A.IncrementalSnapshot,data:K({source:B.StyleDeclaration},$)}),canvasMutationCb:Ae,fontCb:$=>re({type:A.IncrementalSnapshot,data:K({source:B.Font},$)}),selectionCb:$=>{re({type:A.IncrementalSnapshot,data:K({source:B.Selection},$)})},customElementCb:$=>{re({type:A.IncrementalSnapshot,data:K({source:B.CustomElement},$)})},blockClass:l,ignoreClass:d,ignoreSelector:u,maskTextClass:o,maskTextSelector:h,maskInputOptions:x,inlineStylesheet:c,sampling:S,recordDOM:b,recordCanvas:g,inlineImages:w,inlineVideos:N,userTriggeredOnInput:V,collectFonts:k,doc:le,maskInputFn:p,maskTextFn:y,keepIframeSrcFn:I,blockSelector:m,slimDOMOptions:se,dataURLOptions:J,mirror:Je,iframeManager:de,stylesheetManager:ie,shadowDomManager:Os,processedNodeManager:We,canvasManager:Mt,ignoreCSSAttributes:L,privacySetting:W,plugins:((ke=z?.filter($=>$.observer))==null?void 0:ke.map($=>({observer:$.observer,options:$.options,callback:_n=>re({type:A.Plugin,data:{plugin:$.name,payload:_n}})})))||[]},X)};de.addLoadListener(le=>{try{_.push(Ye(le.contentDocument))}catch(ke){console.warn(ke)}});const oe=()=>{Fs(),_.push(Ye(document)),Ms=!0};return["interactive","complete"].includes(document.readyState)?oe():(_.push(ge("DOMContentLoaded",()=>{re({type:A.DomContentLoaded,data:{}}),v==="DOMContentLoaded"&&oe()})),_.push(ge("load",()=>{re({type:A.Load,data:{}}),v==="load"&&oe()},window))),()=>{_.forEach(le=>{try{le()}catch(ke){String(ke).toLowerCase().includes("cross-origin")||console.warn(ke)}}),We.destroy(),Ms=!1,op()}}catch(_){console.warn(_)}}Pe.addCustomEvent=(e,t)=>{Ms&&re({type:A.Custom,data:{tag:e,payload:t}})},Pe.freezePage=()=>{it.forEach(e=>e.freeze())},Pe.takeFullSnapshot=e=>{if(!Ms)throw new Error("please take full snapshot after start recording");Fs(e)},Pe.snapshotCanvas=e=>ye(void 0,null,function*(){if(!Mt)throw new Error("canvas manager is not initialized");yield Mt.snapshot(e)}),Pe.mirror=Je;var ma;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(ma||(ma={}));const{addCustomEvent:fa}=Pe,Lp=(e,t,s)=>{switch(e){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!!t,he(K({},s),{password:!0})]}},Tp=e=>{const t=i=>{if(i.target){const n=i.target,l=Ur(n);e(l,i)}},s={capture:!0};return window.addEventListener("click",t,s),()=>window.removeEventListener("click",t,s)},Np=e=>{const t=s=>{if(s.target){const i=Ur(s.target);e(i)}};return window.addEventListener("focusin",t),()=>window.removeEventListener("focusin",t)},Jp=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 i=t,n=()=>{const m=document[i];e(!!m)};document.addEventListener(s,n);const l=s;return()=>document.removeEventListener(l,n)},Yp=e=>{e(window.location.href);var t=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(l){setTimeout(()=>{var m,d;try{d=JSON.parse((m=l?.toString())!=null?m:"")}catch{return}(d.type==="track"||d.type==="identify")&&En(d)&&e(d)},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:m,userTraits:d}=ba();if(m){let u={};d&&(u=JSON.parse(d));const o={type:"identify",userId:m.toString(),traits:u};En(o)&&e(o)}}},{userId:i,userTraits:n}=ba();if(i){let l={};n&&(l=JSON.parse(n));const m={type:"identify",userId:i.toString(),traits:l};En(m)&&e(m)}return window.addEventListener("storage",s),Gu(({keyName:l})=>{s({key:l})}),()=>{window.removeEventListener("storage",s),XMLHttpRequest.prototype.send=t}},ba=()=>{const e=Ge("ajs_user_id"),t=Ge("ajs_user_traits"),s=Ge("ajs_anonymous_id");return{userId:e,userTraits:t,anonymousId:s}},En=e=>{if(!e)return!1;let t="";try{t=JSON.stringify(e)}catch{return!1}const s=Up(t),i=Ge(be.SEGMENT_LAST_SENT_HASH_KEY);return i===void 0||s!==i?(Ee(be.SEGMENT_LAST_SENT_HASH_KEY,s),!0):!1},Up=e=>{var t=0,s=e.length,i=0;if(s>0)for(;i<s;)t=(t<<5)-t+e.charCodeAt(i++)|0;return t.toString()},Fp=(e,t)=>{const s=Mp(e);let i=[];const n=!1,l=!0;for(let m=0;m<s.length;m++){let d=s[m].split("+");i=[],d.length>1&&(i=Ep(ga,d)),d=d[d.length-1],d=d==="*"?"*":Op(d),d in Ue||(Ue[d]=[]),Ue[d].push({mods:i,shortcut:s[m],key:s[m],method:t,keyup:n,keydown:l,scope:"all",splitKey:"+"})}zp(document,"keydown",m=>{Pp(m)})};let Ze=[];function Mp(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 Ue={},zn=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,Kp={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,"-":zn?173:189,"=":zn?61:187,";":zn?59:186,"'":222,"[":219,"]":221,"\\":220},ya={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Se={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},Op=e=>Kp[e.toLowerCase()]||ga[e.toLowerCase()]||e.toUpperCase().charCodeAt(0);function Ep(e,t){const s=t.slice(0,t.length-1);for(let i=0;i<s.length;i++)s[i]=e[s[i].toLowerCase()];return s}function zp(e,t,s){e.addEventListener?e.addEventListener(t,s,!1):e.attachEvent&&e.attachEvent(`on${t}`,()=>{s(window.event)})}function Hp(e,t,s){let i;if(t.scope===s||t.scope==="all"){i=t.mods.length>0;for(const n in Se)Object.prototype.hasOwnProperty.call(Se,n)&&(!Se[n]&&t.mods.indexOf(+n)>-1||Se[n]&&t.mods.indexOf(+n)===-1)&&(i=!1);(t.mods.length===0&&!Se[16]&&!Se[18]&&!Se[17]&&!Se[91]||i||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function Pp(e){const t=Ue["*"];let s=e.keyCode||e.which||e.charCode;if((s===93||s===224)&&(s=91),Ze.indexOf(s)===-1&&s!==229&&Ze.push(s),["ctrlKey","altKey","shiftKey","metaKey"].forEach(i=>{const n=ya[i];e[i]&&Ze.indexOf(n)===-1?Ze.push(n):!e[i]&&Ze.indexOf(n)>-1?Ze.splice(Ze.indexOf(n),1):i==="metaKey"&&e[i]&&Ze.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Ze=Ze.slice(Ze.indexOf(n))))}),!(s in Se&&(Se[s]=!0,!t))){for(const i in Se)Object.prototype.hasOwnProperty.call(Se,i)&&(Se[i]=e[ya[i]]);if(e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Ze.indexOf(17)===-1&&Ze.push(17),Ze.indexOf(18)===-1&&Ze.push(18),Se[17]=!0,Se[18]=!0),s in Ue){for(let i=0;i<Ue[s].length;i++)if((e.type==="keydown"&&Ue[s][i].keydown||e.type==="keyup"&&Ue[s][i].keyup)&&Ue[s][i].key){const n=Ue[s][i];Hp(e,n,"all")}}}}const Za="iframe parent ready",Sa="iframe ok",Kt="highlightLogs",Dp=e=>{let t=Ge(Kt)||"";t=t+"["+new Date().getTime()+"] "+e+`
|
|
453
|
-
`,Ee(Kt,t)},
|
|
452
|
+
`,ba=typeof self<"u"&&self.Blob&&new Blob([fa],{type:"text/javascript;charset=utf-8"});function Np(e){let t;try{if(t=ba&&(self.URL||self.webkitURL).createObjectURL(ba),!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(fa),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class Jp{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",(c,a)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(a)});const{sampling:s,win:i,blockClass:n,blockSelector:l,recordCanvas:m,recordLocalVideos:d,recordRemoteVideos:u,initialSnapshotDelay:o,dataURLOptions:h}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.logger=t.logger,this.worker=new Np,this.worker.onmessage=c=>{const{id:a}=c.data;if(this.snapshotInProgressMap.set(a,!1),!("base64"in c.data)){this.debug(null,"canvas worker received empty message",{id:a,data:c.data,status:c.data.status});return}const{base64:r,type:f,dx:p,dy:y,dw:X,dh:Z}=c.data,S={id:a,type:Zt["2D"],commands:[{property:"clearRect",args:[p,y,X,Z]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:f}]},p,y,X,Z]}]};this.debug(null,"canvas worker recording mutation",S),this.mutationCb(S)},this.options=t,m&&s==="all"?(this.debug(null,"initializing canvas mutation observer",{sampling:s}),this.initCanvasMutationObserver(i,n,l)):m&&typeof s=="number"&&(this.debug(null,"initializing canvas fps observer",{sampling:s}),this.initCanvasFPSObserver(d,u,s,i,n,l,{initialSnapshotDelay:o,dataURLOptions:h},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 i=this.mirror.getId(t);let n="[highlight-canvas-manager]";t&&(n=`[highlight-canvas] [id:${i}]`,t.tagName.toLowerCase()==="canvas"&&(n+=` [ctx:${t.__context}]`)),this.logger.debug(n,t,...s)}snapshot(t){return ye(this,null,function*(){var s;const i=this.mirror.getId(t);if(this.snapshotInProgressMap.get(i)){this.debug(t,"snapshotting already in progress for",i);return}const n=1e3/(typeof this.options.samplingManual=="number"?this.options.samplingManual:1),l=this.lastSnapshotTime.get(i);if(!(l&&new Date().getTime()-l<n)){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(i,new Date().getTime()),this.snapshotInProgressMap.set(i,!0);try{if(this.options.clearWebGLBuffer!==!1&&["webgl","webgl2"].includes(t.__context)){const h=t.getContext(t.__context);((s=h?.getContextAttributes())==null?void 0:s.preserveDrawingBuffer)===!1&&(h.clear(h.COLOR_BUFFER_BIT),this.debug(t,"cleared webgl canvas to load it into memory",{attributes:h?.getContextAttributes()}))}if(t.width===0||t.height===0){this.debug(t,"not yet ready",{width:t.width,height:t.height});return}let m=this.options.resizeFactor||1;if(this.options.maxSnapshotDimension){const h=Math.max(t.width,t.height);m=Math.min(m,this.options.maxSnapshotDimension/h)}const d=t.width*m,u=t.height*m,o=yield createImageBitmap(t,{resizeWidth:d,resizeHeight:u});this.debug(t,"created image bitmap",{width:o.width,height:o.height}),this.worker.postMessage({id:i,bitmap:o,width:d,height:u,dx:0,dy:0,dw:t.width,dh:t.height,dataURLOptions:this.options.dataURLOptions,logDebug:!!this.logger},[o]),this.debug(t,"sent message")}catch(m){this.debug(t,"failed to snapshot",m)}finally{this.snapshotInProgressMap.set(i,!1)}}})}initCanvasFPSObserver(t,s,i,n,l,m,d,u,o){const h=pa(n,l,m,!0),c=1e3/i;let a=0,r;const f=new Map,p=(S,R)=>{const b=[];S.querySelectorAll(R).forEach(v=>b.push(v));const g=document.createNodeIterator(S,Node.ELEMENT_NODE);let G;for(;G=g.nextNode();)G!=null&&G.shadowRoot&&b.push(...p(G.shadowRoot,R));return b},y=S=>{const R=[];return p(n.document,"canvas").forEach(b=>{if(!me(b,l,m,!0)){this.debug(b,"discovered canvas"),R.push(b);const g=this.mirror.getId(b);f.has(g)||f.set(g,S)}}),R},X=S=>{const R=[];return(t||s)&&p(n.document,"video").forEach(b=>{if(!(!s&&b.src!==""&&b.src.indexOf("blob:")===-1)&&!(!t&&(b.src===""||b.src.indexOf("blob:")!==-1))&&!me(b,l,m,!0)){R.push(b);const g=this.mirror.getId(b);f.has(g)||f.set(g,S)}}),R},Z=S=>ye(this,null,function*(){if(a&&S-a<c){r=requestAnimationFrame(g=>void Z(g));return}a=S;const R=g=>{const G=this.mirror.getId(g),v=f.get(G),V=!d.initialSnapshotDelay||S-v>d.initialSnapshotDelay;return this.debug(g,{delay:d.initialSnapshotDelay,delta:S-v,hadLoadingTime:V}),V},b=[];b.push(...y(S).filter(R).map(g=>this.snapshot(g))),b.push(...X(S).filter(R).map(g=>ye(this,null,function*(){this.debug(g,"starting video snapshotting");const G=this.mirror.getId(g);if(this.snapshotInProgressMap.get(G)){this.debug(g,"video snapshotting already in progress for",G);return}this.snapshotInProgressMap.set(G,!0);try{const{width:v,height:V}=g.getBoundingClientRect(),{actualWidth:k,actualHeight:w}={actualWidth:g.videoWidth,actualHeight:g.videoHeight},N=Math.max(k,w);if(N===0){this.debug(g,"not yet ready",{width:g.width,height:g.height,actualWidth:k,actualHeight:w,boxWidth:v,boxHeight:V});return}let z=u||1;o&&(z=Math.min(z,o/N));const I=k*z,W=w*z,T=yield createImageBitmap(g,{resizeWidth:I,resizeHeight:W}),U=Math.max(v,V)/N,F=k*U,J=w*U,D=(v-F)/2,O=(V-J)/2;this.debug(g,"created image bitmap",{actualWidth:k,actualHeight:w,boxWidth:v,boxHeight:V,outputWidth:F,outputHeight:J,resizeWidth:I,resizeHeight:W,scale:z,outputScale:U,offsetX:D,offsetY:O}),this.worker.postMessage({id:G,bitmap:T,width:I,height:W,dx:D,dy:O,dw:F,dh:J,dataURLOptions:d.dataURLOptions,logDebug:!!this.logger},[T]),this.debug(g,"send message")}catch(v){this.debug(g,"failed to snapshot",v)}finally{this.snapshotInProgressMap.set(G,!1)}}))),yield Promise.all(b).catch(console.error),r=requestAnimationFrame(g=>void Z(g))});r=requestAnimationFrame(S=>void Z(S)),this.resetObservers=()=>{h(),r&&cancelAnimationFrame(r)}}initCanvasMutationObserver(t,s,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const n=pa(t,s,i,!1),l=xp(this.processMutation.bind(this),t,s,i),m=Lp(this.processMutation.bind(this),t,s,i);this.resetObservers=()=>{n(),l(),m()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=s=>{this.rafStamps.latestId=s,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,s)=>{const i=this.mirror.getId(s);this.flushPendingCanvasMutationFor(s,i)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,s){if(this.frozen||this.locked)return;const i=this.pendingCanvasMutations.get(t);if(!i||s===-1)return;const n=i.map(m=>mt(m,["type"])),{type:l}=i[0];this.mutationCb({id:s,type:l,commands:n}),this.pendingCanvasMutations.delete(t)}}class Yp{constructor(t){L(this,"trackedLinkElements",new WeakSet),L(this,"mutationCb"),L(this,"adoptedStyleSheetCb"),L(this,"styleMirror",new np),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 i={id:s,styleIds:[]},n=[];for(const l of t){let m;this.styleMirror.has(l)?m=this.styleMirror.getId(l):(m=this.styleMirror.add(l),n.push({styleId:m,rules:Array.from(l.rules||CSSRule,(d,u)=>({rule:so(d,l.href),index:u}))})),i.styleIds.push(m)}n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Up{constructor(){L(this,"nodeMap",new WeakMap),L(this,"active",!1)}inOtherBuffer(t,s){const i=this.nodeMap.get(t);return i&&Array.from(i).some(n=>n!==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 re,Fs,Mt,Ms=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Dr=e.contentWindow)==null?void 0:Dr.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Je=Md();function Pe(e={}){var t;const{emit:s,checkoutEveryNms:i,checkoutEveryNth:n,blockClass:l="highlight-block",blockSelector:m=null,ignoreClass:d="highlight-ignore",ignoreSelector:u=null,maskTextClass:o="highlight-mask",maskTextSelector:h=null,inlineStylesheet:c=!0,maskAllInputs:a,maskInputOptions:r,slimDOMOptions:f,maskInputFn:p,maskTextFn:y=fi,hooks:X,packFn:Z,sampling:S={},mousemoveWait:R,recordDOM:b=!0,recordCanvas:g=!1,recordCrossOriginIframes:G=!1,recordAfter:v=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:k=!1,inlineImages:w=!1,inlineVideos:N=!1,plugins:z,keepIframeSrcFn:I=()=>!1,privacySetting:W="default",ignoreCSSAttributes:T=new Set([]),errorHandler:U,logger:F}=e,J=K(K({},e.dataURLOptions),typeof((t=e.sampling)==null?void 0:t.canvas)=="object"?e.sampling.canvas.dataURLOptions:void 0);dp(U);const D=G?window.parent===window:!0;let O=!1;if(!D)try{window.parent.document&&(O=!1)}catch{O=!0}if(D&&!s)throw new Error("emit function is required");if(!D&&!O)return()=>{};R!==void 0&&S.mousemove===void 0&&(S.mousemove=R),Je.reset();const x=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}:r!==void 0?r:{password:!0},se=bo(f);ip();let ne,ee=0;const ve=_=>{for(const Ye of z||[])Ye.eventProcessor&&(_=Ye.eventProcessor(_));return Z&&!O&&(_=Z(_)),_};re=(_,Ye)=>{var oe;const le=_;if(le.timestamp=Jt(),(oe=it[0])!=null&&oe.isFrozen()&&le.type!==A.FullSnapshot&&!(le.type===A.IncrementalSnapshot&&le.data.source===B.Mutation)&&it.forEach(ke=>ke.unfreeze()),D)s?.(ve(le),Ye);else if(O){const ke={type:"rrweb",event:ve(le),origin:window.location.origin,isCheckout:Ye};window.parent.postMessage(ke,"*")}if(le.type===A.FullSnapshot)ne=le,ee=0;else if(le.type===A.IncrementalSnapshot){if(le.data.source===B.Mutation&&le.data.isAttachIframe)return;ee++;const ke=n&&ee>=n,$=i&&le.timestamp-ne.timestamp>i;(ke||$)&&Fs(!0)}};const Ie=_=>{re({type:A.IncrementalSnapshot,data:K({source:B.Mutation},_)})},Me=_=>re({type:A.IncrementalSnapshot,data:K({source:B.Scroll},_)}),Ae=_=>re({type:A.IncrementalSnapshot,data:K({source:B.CanvasMutation},_)}),_e=_=>re({type:A.IncrementalSnapshot,data:K({source:B.AdoptedStyleSheet},_)}),ie=new Yp({mutationCb:Ie,adoptedStyleSheetCb:_e}),de=new vp({mirror:Je,mutationCb:Ie,stylesheetManager:ie,recordCrossOriginIframes:G,wrappedEmit:re});for(const _ of z||[])_.getMirror&&_.getMirror({nodeMirror:Je,crossOriginIframeMirror:de.crossOriginIframeMirror,crossOriginIframeStyleMirror:de.crossOriginIframeStyleMirror});const We=new Up,Ke=typeof S?.canvas=="object"?S.canvas:{fps:S?.canvas};Mt=new Jp({recordCanvas:g,recordLocalVideos:w,recordRemoteVideos:N,mutationCb:Ae,win:window,blockClass:l,blockSelector:m,mirror:Je,sampling:Ke.fps,samplingManual:Ke.fpsManual,clearWebGLBuffer:Ke.clearWebGLBuffer,initialSnapshotDelay:Ke.initialSnapshotDelay,dataURLOptions:J,resizeFactor:Ke.resizeFactor,maxSnapshotDimension:Ke.maxSnapshotDimension,logger:F});const Es=new Wp({mutationCb:Ie,scrollCb:Me,bypassOptions:{blockClass:l,blockSelector:m,maskTextClass:o,maskTextSelector:h,inlineStylesheet:c,maskInputOptions:x,dataURLOptions:J,maskTextFn:y,maskInputFn:p,recordCanvas:g,inlineImages:w,inlineVideos:N,privacySetting:W,sampling:S,slimDOMOptions:se,iframeManager:de,stylesheetManager:ie,canvasManager:Mt,keepIframeSrcFn:I,processedNodeManager:We},mirror:Je});Fs=(_=!1)=>{if(!b)return;re({type:A.Meta,data:{href:window.location.href,width:Pl(),height:Hl()}},_),ie.reset(),Es.init(),it.forEach(oe=>oe.lock());const Ye=bh(document,{mirror:Je,blockClass:l,blockSelector:m,maskTextClass:o,maskTextSelector:h,inlineStylesheet:c,maskAllInputs:x,maskTextFn:y,maskInputFn:p,slimDOM:se,dataURLOptions:J,recordCanvas:g,inlineImages:w,inlineVideos:N,privacySetting:W,onSerialize:oe=>{Ql(oe,Je)&&de.addIframe(oe),jl(oe,Je)&&ie.trackLinkElement(oe),On(oe)&&Es.addShadowRoot(H.shadowRoot(oe),document)},onIframeLoad:(oe,le)=>{de.attachIframe(oe,le),Es.observeAttachShadow(oe)},onStylesheetLoad:(oe,le)=>{ie.attachLinkElement(oe,le)},keepIframeSrcFn:I});if(!Ye)return console.warn("Failed to snapshot the document");re({type:A.FullSnapshot,data:{node:Ye,initialOffset:zl(window)}},_),it.forEach(oe=>oe.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ie.adoptStyleSheets(document.adoptedStyleSheets,Je.getId(document))};try{const _=[],Ye=le=>{var ke;return Q(Rp)({mutationCb:Ie,mousemoveCb:($,$n)=>re({type:A.IncrementalSnapshot,data:{source:$n,positions:$}}),mouseInteractionCb:$=>re({type:A.IncrementalSnapshot,data:K({source:B.MouseInteraction},$)}),scrollCb:Me,viewportResizeCb:$=>re({type:A.IncrementalSnapshot,data:K({source:B.ViewportResize},$)}),inputCb:$=>re({type:A.IncrementalSnapshot,data:K({source:B.Input},$)}),mediaInteractionCb:$=>re({type:A.IncrementalSnapshot,data:K({source:B.MediaInteraction},$)}),styleSheetRuleCb:$=>re({type:A.IncrementalSnapshot,data:K({source:B.StyleSheetRule},$)}),styleDeclarationCb:$=>re({type:A.IncrementalSnapshot,data:K({source:B.StyleDeclaration},$)}),canvasMutationCb:Ae,fontCb:$=>re({type:A.IncrementalSnapshot,data:K({source:B.Font},$)}),selectionCb:$=>{re({type:A.IncrementalSnapshot,data:K({source:B.Selection},$)})},customElementCb:$=>{re({type:A.IncrementalSnapshot,data:K({source:B.CustomElement},$)})},blockClass:l,ignoreClass:d,ignoreSelector:u,maskTextClass:o,maskTextSelector:h,maskInputOptions:x,inlineStylesheet:c,sampling:S,recordDOM:b,recordCanvas:g,inlineImages:w,inlineVideos:N,userTriggeredOnInput:V,collectFonts:k,doc:le,maskInputFn:p,maskTextFn:y,keepIframeSrcFn:I,blockSelector:m,slimDOMOptions:se,dataURLOptions:J,mirror:Je,iframeManager:de,stylesheetManager:ie,shadowDomManager:Es,processedNodeManager:We,canvasManager:Mt,ignoreCSSAttributes:T,privacySetting:W,plugins:((ke=z?.filter($=>$.observer))==null?void 0:ke.map($=>({observer:$.observer,options:$.options,callback:$n=>re({type:A.Plugin,data:{plugin:$.name,payload:$n}})})))||[]},X)};de.addLoadListener(le=>{try{_.push(Ye(le.contentDocument))}catch(ke){console.warn(ke)}});const oe=()=>{Fs(),_.push(Ye(document)),Ms=!0};return["interactive","complete"].includes(document.readyState)?oe():(_.push(ge("DOMContentLoaded",()=>{re({type:A.DomContentLoaded,data:{}}),v==="DOMContentLoaded"&&oe()})),_.push(ge("load",()=>{re({type:A.Load,data:{}}),v==="load"&&oe()},window))),()=>{_.forEach(le=>{try{le()}catch(ke){String(ke).toLowerCase().includes("cross-origin")||console.warn(ke)}}),We.destroy(),Ms=!1,hp()}}catch(_){console.warn(_)}}Pe.addCustomEvent=(e,t)=>{Ms&&re({type:A.Custom,data:{tag:e,payload:t}})},Pe.freezePage=()=>{it.forEach(e=>e.freeze())},Pe.takeFullSnapshot=e=>{if(!Ms)throw new Error("please take full snapshot after start recording");Fs(e)},Pe.snapshotCanvas=e=>ye(void 0,null,function*(){if(!Mt)throw new Error("canvas manager is not initialized");yield Mt.snapshot(e)}),Pe.mirror=Je;var ya;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(ya||(ya={}));const{addCustomEvent:ga}=Pe,Fp=(e,t,s)=>{switch(e){case"strict":return[!0,void 0];case"default":return[!0,void 0];case"none":return[!!t,he(K({},s),{password:!0})]}},Mp=e=>{const t=i=>{if(i.target){const n=i.target,l=Fr(n);e(l,i)}},s={capture:!0};return window.addEventListener("click",t,s),()=>window.removeEventListener("click",t,s)},Kp=e=>{const t=s=>{if(s.target){const i=Fr(s.target);e(i)}};return window.addEventListener("focusin",t),()=>window.removeEventListener("focusin",t)},Op=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 i=t,n=()=>{const m=document[i];e(!!m)};document.addEventListener(s,n);const l=s;return()=>document.removeEventListener(l,n)},Ep=e=>{e(window.location.href);var t=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(l){setTimeout(()=>{var m,d;try{d=JSON.parse((m=l?.toString())!=null?m:"")}catch{return}(d.type==="track"||d.type==="identify")&&zn(d)&&e(d)},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:m,userTraits:d}=Za();if(m){let u={};d&&(u=JSON.parse(d));const o={type:"identify",userId:m.toString(),traits:u};zn(o)&&e(o)}}},{userId:i,userTraits:n}=Za();if(i){let l={};n&&(l=JSON.parse(n));const m={type:"identify",userId:i.toString(),traits:l};zn(m)&&e(m)}return window.addEventListener("storage",s),Wu(({keyName:l})=>{s({key:l})}),()=>{window.removeEventListener("storage",s),XMLHttpRequest.prototype.send=t}},Za=()=>{const e=Ge("ajs_user_id"),t=Ge("ajs_user_traits"),s=Ge("ajs_anonymous_id");return{userId:e,userTraits:t,anonymousId:s}},zn=e=>{if(!e)return!1;let t="";try{t=JSON.stringify(e)}catch{return!1}const s=zp(t),i=Ge(be.SEGMENT_LAST_SENT_HASH_KEY);return i===void 0||s!==i?(Ee(be.SEGMENT_LAST_SENT_HASH_KEY,s),!0):!1},zp=e=>{var t=0,s=e.length,i=0;if(s>0)for(;i<s;)t=(t<<5)-t+e.charCodeAt(i++)|0;return t.toString()},Hp=(e,t)=>{const s=Pp(e);let i=[];const n=!1,l=!0;for(let m=0;m<s.length;m++){let d=s[m].split("+");i=[],d.length>1&&(i=Qp(Ia,d)),d=d[d.length-1],d=d==="*"?"*":Bp(d),d in Ue||(Ue[d]=[]),Ue[d].push({mods:i,shortcut:s[m],key:s[m],method:t,keyup:n,keydown:l,scope:"all",splitKey:"+"})}jp(document,"keydown",m=>{_p(m)})};let Ze=[];function Pp(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 Ue={},Hn=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1,Dp={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,"-":Hn?173:189,"=":Hn?61:187,";":Hn?59:186,"'":222,"[":219,"]":221,"\\":220},Sa={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Se={16:!1,18:!1,17:!1,91:!1},Ia={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Bp=e=>Dp[e.toLowerCase()]||Ia[e.toLowerCase()]||e.toUpperCase().charCodeAt(0);function Qp(e,t){const s=t.slice(0,t.length-1);for(let i=0;i<s.length;i++)s[i]=e[s[i].toLowerCase()];return s}function jp(e,t,s){e.addEventListener?e.addEventListener(t,s,!1):e.attachEvent&&e.attachEvent(`on${t}`,()=>{s(window.event)})}function Ap(e,t,s){let i;if(t.scope===s||t.scope==="all"){i=t.mods.length>0;for(const n in Se)Object.prototype.hasOwnProperty.call(Se,n)&&(!Se[n]&&t.mods.indexOf(+n)>-1||Se[n]&&t.mods.indexOf(+n)===-1)&&(i=!1);(t.mods.length===0&&!Se[16]&&!Se[18]&&!Se[17]&&!Se[91]||i||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function _p(e){const t=Ue["*"];let s=e.keyCode||e.which||e.charCode;if((s===93||s===224)&&(s=91),Ze.indexOf(s)===-1&&s!==229&&Ze.push(s),["ctrlKey","altKey","shiftKey","metaKey"].forEach(i=>{const n=Sa[i];e[i]&&Ze.indexOf(n)===-1?Ze.push(n):!e[i]&&Ze.indexOf(n)>-1?Ze.splice(Ze.indexOf(n),1):i==="metaKey"&&e[i]&&Ze.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Ze=Ze.slice(Ze.indexOf(n))))}),!(s in Se&&(Se[s]=!0,!t))){for(const i in Se)Object.prototype.hasOwnProperty.call(Se,i)&&(Se[i]=e[Sa[i]]);if(e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Ze.indexOf(17)===-1&&Ze.push(17),Ze.indexOf(18)===-1&&Ze.push(18),Se[17]=!0,Se[18]=!0),s in Ue){for(let i=0;i<Ue[s].length;i++)if((e.type==="keydown"&&Ue[s][i].keydown||e.type==="keyup"&&Ue[s][i].keyup)&&Ue[s][i].key){const n=Ue[s][i];Ap(e,n,"all")}}}}const Va="iframe parent ready",Xa="iframe ok",Kt="highlightLogs",$p=e=>{let t=Ge(Kt)||"";t=t+"["+new Date().getTime()+"] "+e+`
|
|
453
|
+
`,Ee(Kt,t)},qp=()=>Ge(Kt)||"",em=e=>{if(!e)return;let t=Ge(Kt)||"";t&&(t.startsWith(e)?(t=t.slice(e.length),Ee(Kt,t)):$p("Unable to clear logs "+e.replace(`
|
|
454
454
|
`," ")+" from "+t.replace(`
|
|
455
|
-
`," ")))};var Re=Uint8Array,xe=Uint16Array,Hn=Int32Array,Pn=new Re([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]),Dn=new Re([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]),Ia=new Re([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Va=function(e,t){for(var s=new xe(31),i=0;i<31;++i)s[i]=t+=1<<e[i-1];for(var n=new Hn(s[30]),i=1;i<30;++i)for(var l=s[i];l<s[i+1];++l)n[l]=l-s[i]<<5|i;return{b:s,r:n}},Xa=Va(Pn,2),jp=Xa.b,Bn=Xa.r;jp[28]=258,Bn[258]=28;for(var Ap=Va(Dn,0),Ga=Ap.r,Ra=new xe(32768),te=0;te<32768;++te){var je=(te&43690)>>1|(te&21845)<<1;je=(je&52428)>>2|(je&13107)<<2,je=(je&61680)>>4|(je&3855)<<4,Ra[te]=((je&65280)>>8|(je&255)<<8)>>1}for(var Ot=function(e,t,s){for(var i=e.length,n=0,l=new xe(t);n<i;++n)e[n]&&++l[e[n]-1];var m=new xe(t);for(n=1;n<t;++n)m[n]=m[n-1]+l[n-1]<<1;var d;for(d=new xe(i),n=0;n<i;++n)e[n]&&(d[n]=Ra[m[e[n]-1]++]>>15-e[n]);return d},nt=new Re(288),te=0;te<144;++te)nt[te]=8;for(var te=144;te<256;++te)nt[te]=9;for(var te=256;te<280;++te)nt[te]=7;for(var te=280;te<288;++te)nt[te]=8;for(var Ks=new Re(32),te=0;te<32;++te)Ks[te]=5;var _p=Ot(nt,9),$p=Ot(Ks,5),va=function(e){return(e+7)/8|0},Wa=function(e,t,s){return(s==null||s>e.length)&&(s=e.length),new Re(e.subarray(t,s))},De=function(e,t,s){s<<=t&7;var i=t/8|0;e[i]|=s,e[i+1]|=s>>8},Et=function(e,t,s){s<<=t&7;var i=t/8|0;e[i]|=s,e[i+1]|=s>>8,e[i+2]|=s>>16},Qn=function(e,t){for(var s=[],i=0;i<e.length;++i)e[i]&&s.push({s:i,f:e[i]});var n=s.length,l=s.slice();if(!n)return{t:xa,l:0};if(n==1){var m=new Re(s[0].s+1);return m[s[0].s]=1,{t:m,l:1}}s.sort(function(b,g){return b.f-g.f}),s.push({s:-1,f:25001});var d=s[0],u=s[1],o=0,h=1,c=2;for(s[0]={s:-1,f:d.f+u.f,l:d,r:u};h!=n-1;)d=s[s[o].f<s[c].f?o++:c++],u=s[o!=h&&s[o].f<s[c].f?o++:c++],s[h++]={s:-1,f:d.f+u.f,l:d,r:u};for(var a=l[0].s,i=1;i<n;++i)l[i].s>a&&(a=l[i].s);var r=new xe(a+1),f=jn(s[h-1],r,0);if(f>t){var i=0,p=0,y=f-t,X=1<<y;for(l.sort(function(g,G){return r[G.s]-r[g.s]||g.f-G.f});i<n;++i){var Z=l[i].s;if(r[Z]>t)p+=X-(1<<f-r[Z]),r[Z]=t;else break}for(p>>=y;p>0;){var S=l[i].s;r[S]<t?p-=1<<t-r[S]++-1:++i}for(;i>=0&&p;--i){var R=l[i].s;r[R]==t&&(--r[R],++p)}f=t}return{t:new Re(r),l:f}},jn=function(e,t,s){return e.s==-1?Math.max(jn(e.l,t,s+1),jn(e.r,t,s+1)):t[e.s]=s},ka=function(e){for(var t=e.length;t&&!e[--t];);for(var s=new xe(++t),i=0,n=e[0],l=1,m=function(u){s[i++]=u},d=1;d<=t;++d)if(e[d]==n&&d!=t)++l;else{if(!n&&l>2){for(;l>138;l-=138)m(32754);l>2&&(m(l>10?l-11<<5|28690:l-3<<5|12305),l=0)}else if(l>3){for(m(n),--l;l>6;l-=6)m(8304);l>2&&(m(l-3<<5|8208),l=0)}for(;l--;)m(n);l=1,n=e[d]}return{c:s.subarray(0,i),n:t}},zt=function(e,t){for(var s=0,i=0;i<t.length;++i)s+=e[i]*t[i];return s},wa=function(e,t,s){var i=s.length,n=va(t+2);e[n]=i&255,e[n+1]=i>>8,e[n+2]=e[n]^255,e[n+3]=e[n+1]^255;for(var l=0;l<i;++l)e[n+l+4]=s[l];return(n+4+i)*8},Ca=function(e,t,s,i,n,l,m,d,u,o,h){De(t,h++,s),++n[256];for(var c=Qn(n,15),a=c.t,r=c.l,f=Qn(l,15),p=f.t,y=f.l,X=ka(a),Z=X.c,S=X.n,R=ka(p),b=R.c,g=R.n,G=new xe(19),v=0;v<Z.length;++v)++G[Z[v]&31];for(var v=0;v<b.length;++v)++G[b[v]&31];for(var V=Qn(G,7),k=V.t,w=V.l,N=19;N>4&&!k[Ia[N-1]];--N);var z=o+5<<3,I=zt(n,nt)+zt(l,Ks)+m,W=zt(n,a)+zt(l,p)+m+14+3*N+zt(G,k)+2*G[16]+3*G[17]+7*G[18];if(u>=0&&z<=I&&z<=W)return wa(t,h,e.subarray(u,u+o));var L,U,F,J;if(De(t,h,1+(W<I)),h+=2,W<I){L=Ot(a,r),U=a,F=Ot(p,y),J=p;var D=Ot(k,w);De(t,h,S-257),De(t,h+5,g-1),De(t,h+10,N-4),h+=14;for(var v=0;v<N;++v)De(t,h+3*v,k[Ia[v]]);h+=3*N;for(var E=[Z,b],x=0;x<2;++x)for(var se=E[x],v=0;v<se.length;++v){var ne=se[v]&31;De(t,h,D[ne]),h+=k[ne],ne>15&&(De(t,h,se[v]>>5&127),h+=se[v]>>12)}}else L=_p,U=nt,F=$p,J=Ks;for(var v=0;v<d;++v){var ee=i[v];if(ee>255){var ne=ee>>18&31;Et(t,h,L[ne+257]),h+=U[ne+257],ne>7&&(De(t,h,ee>>23&31),h+=Pn[ne]);var ve=ee&31;Et(t,h,F[ve]),h+=J[ve],ve>3&&(Et(t,h,ee>>5&8191),h+=Dn[ve])}else Et(t,h,L[ee]),h+=U[ee]}return Et(t,h,L[256]),h+U[256]},qp=new Hn([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),xa=new Re(0),em=function(e,t,s,i,n,l){var m=l.z||e.length,d=new Re(i+m+5*(1+Math.ceil(m/7e3))+n),u=d.subarray(i,d.length-n),o=l.l,h=(l.r||0)&7;if(t){h&&(u[0]=l.r>>3);for(var c=qp[t-1],a=c>>13,r=c&8191,f=(1<<s)-1,p=l.p||new xe(32768),y=l.h||new xe(f+1),X=Math.ceil(s/3),Z=2*X,S=function(Ke){return(e[Ke]^e[Ke+1]<<X^e[Ke+2]<<Z)&f},R=new Hn(25e3),b=new xe(288),g=new xe(32),G=0,v=0,V=l.i||0,k=0,w=l.w||0,N=0;V+2<m;++V){var z=S(V),I=V&32767,W=y[z];if(p[I]=W,y[z]=I,w<=V){var L=m-V;if((G>7e3||k>24576)&&(L>423||!o)){h=Ca(e,u,0,R,b,g,v,k,N,V-N,h),k=G=v=0,N=V;for(var U=0;U<286;++U)b[U]=0;for(var U=0;U<30;++U)g[U]=0}var F=2,J=0,D=r,E=I-W&32767;if(L>2&&z==S(V-E))for(var x=Math.min(a,L)-1,se=Math.min(32767,V),ne=Math.min(258,L);E<=se&&--D&&I!=W;){if(e[V+F]==e[V+F-E]){for(var ee=0;ee<ne&&e[V+ee]==e[V+ee-E];++ee);if(ee>F){if(F=ee,J=E,ee>x)break;for(var ve=Math.min(E,ee-2),Ie=0,U=0;U<ve;++U){var Me=V-E+U&32767,Ae=p[Me],_e=Me-Ae&32767;_e>Ie&&(Ie=_e,W=Me)}}}I=W,W=p[I],E+=I-W&32767}if(J){R[k++]=268435456|Bn[F]<<18|Ga[J];var ie=Bn[F]&31,de=Ga[J]&31;v+=Pn[ie]+Dn[de],++b[257+ie],++g[de],w=V+F,++G}else R[k++]=e[V],++b[e[V]]}}for(V=Math.max(V,w);V<m;++V)R[k++]=e[V],++b[e[V]];h=Ca(e,u,o,R,b,g,v,k,N,V-N,h),o||(l.r=h&7|u[h/8|0]<<3,h-=7,l.h=y,l.p=p,l.i=V,l.w=w)}else{for(var V=l.w||0;V<m+o;V+=65535){var We=V+65535;We>=m&&(u[h/8|0]=o,We=m),h=wa(u,h+1,e.subarray(V,We))}l.i=m}return Wa(d,0,i+va(h)+n)},tm=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var s=t,i=9;--i;)s=(s&1&&-306674912)^s>>>1;e[t]=s}return e}(),sm=function(){var e=-1;return{p:function(t){for(var s=e,i=0;i<t.length;++i)s=tm[s&255^t[i]]^s>>>8;e=s},d:function(){return~e}}},im=function(e,t,s,i,n){if(!n&&(n={l:1},t.dictionary)){var l=t.dictionary.subarray(-32768),m=new Re(l.length+e.length);m.set(l),m.set(e,l.length),e=m,n.w=l.length}return em(e,t.level==null?6:t.level,t.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,s,i,n)},An=function(e,t,s){for(;s;++t)e[t]=s,s>>>=8},nm=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&&An(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),s){e[3]=8;for(var i=0;i<=s.length;++i)e[i+10]=s.charCodeAt(i)}},rm=function(e){return 10+(e.filename?e.filename.length+1:0)};function om(e,t){t||(t={});var s=sm(),i=e.length;s.p(e);var n=im(e,t,rm(t),8),l=n.length;return nm(n,t),An(n,l-8,s.d()),An(n,l-4,i),n}var La=typeof TextEncoder<"u"&&new TextEncoder,lm=typeof TextDecoder<"u"&&new TextDecoder;try{lm.decode(xa,{stream:!0})}catch{}function am(e,t){var s;if(La)return La.encode(e);for(var i=e.length,n=new Re(e.length+(e.length>>1)),l=0,m=function(h){n[l++]=h},s=0;s<i;++s){if(l+5>n.length){var d=new Re(l+8+(i-s<<1));d.set(n),n=d}var u=e.charCodeAt(s);u<128||t?m(u):u<2048?(m(192|u>>6),m(128|u&63)):u>55295&&u<57344?(u=65536+(u&1047552)|e.charCodeAt(++s)&1023,m(240|u>>18),m(128|u>>12&63),m(128|u>>6&63),m(128|u&63)):(m(224|u>>12),m(128|u>>6&63),m(128|u&63))}return Wa(n,0,l)}function cm(e){return ye(this,null,function*(){const t=am(JSON.stringify(e)),s=om(t),i=yield new Promise(n=>{const l=new FileReader;l.onload=()=>n(l.result),l.readAsDataURL(new Blob([new Uint8Array(s)]))});return{compressedBase64:i.slice(i.indexOf(",")+1),compressedSize:s.length,bufferLength:t.length}})}const Ta="dmFyIFVyPU9iamVjdC5kZWZpbmVQcm9wZXJ0eSxWcj1PYmplY3QuZGVmaW5lUHJvcGVydGllczt2YXIgcXI9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcnM7dmFyICRlPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHM7dmFyIHRuPU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHksbm49T2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJsZTt2YXIgaHQ9KEYsJCxCKT0+JCBpbiBGP1VyKEYsJCx7ZW51bWVyYWJsZTohMCxjb25maWd1cmFibGU6ITAsd3JpdGFibGU6ITAsdmFsdWU6Qn0pOkZbJF09QixEPShGLCQpPT57Zm9yKHZhciBCIGluICR8fCgkPXt9KSl0bi5jYWxsKCQsQikmJmh0KEYsQiwkW0JdKTtpZigkZSlmb3IodmFyIEIgb2YgJGUoJCkpbm4uY2FsbCgkLEIpJiZodChGLEIsJFtCXSk7cmV0dXJuIEZ9LEJlPShGLCQpPT5WcihGLHFyKCQpKTt2YXIgZ2U9KEYsJCk9Pnt2YXIgQj17fTtmb3Iodm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50eXBlPT09Wi5SZXNldCl7ZC5sZW5ndGg9MCxoLmxlbmd0aD0wLGk9MCxyPTAsbj0iIixvPTA7cmV0dXJufWlmKHYuZGF0YS5tZXNzYWdlLnR5cGU9PT1aLkdldFN0YXR1cyl7U2UucG9zdE1lc3NhZ2Uoe3Jlc3BvbnNlOnt0eXBlOlouR2V0U3RhdHVzLHBlbmRpbmdDb3VudDpkLmxlbmd0aCxpbml0aWFsaXplZDp1KCl9fSk7cmV0dXJufWlmKCF1KCkpe2QucHVzaCh2LmRhdGEubWVzc2FnZSk7cmV0dXJufXRyeXt5aWVsZCBQKHYuZGF0YS5tZXNzYWdlKSxpPTAseWllbGQgcSgpfWNhdGNoKEUpe3MmJmNvbnNvbGUuZXJyb3IoRSksaSs9MX19KX19fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aGlnaGxpZ2h0LWNsaWVudC13b3JrZXItRHNiS01weHEuanMubWFwCg==",um=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),Na=typeof self<"u"&&self.Blob&&new Blob([um(Ta)],{type:"text/javascript;charset=utf-8"});function dm(e){let t;try{if(t=Na&&(self.URL||self.webkitURL).createObjectURL(Na),!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,"+Ta,{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var Fe=(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))(Fe||{});const hm=({apiKey:e})=>{(function(t,s){var i=t.amplitude||{_q:[],_iq:{}},n=s.createElement("script");n.type="text/javascript",n.integrity="sha384-+EO59vL/X7v6VE2s6/F4HxfHlK0nDUVWKVg8K9oUlvffAeeaShVBmbORTC2D3UF+",n.crossOrigin="anonymous",n.async=!0,n.src="https://cdn.amplitude.com/libs/amplitude-8.17.0-min.gz.js",n.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(n,l);function m(p,y){p.prototype[y]=function(){return this._q.push([y].concat(Array.prototype.slice.call(arguments,0))),this}}for(var d=function(){return this._q=[],this},u=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove"],o=0;o<u.length;o++)m(d,u[o]);i.Identify=d;for(var h=function(){return this._q=[],this},c=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"],a=0;a<c.length;a++)m(h,c[a]);i.Revenue=h;var r=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","enableTracking","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"];function f(p){function y(Z){p[Z]=function(){p._q.push([Z].concat(Array.prototype.slice.call(arguments,0)))}}for(var X=0;X<r.length;X++)y(r[X])}f(i),i.getInstance=function(p){return p=(!p||p.length===0?"$default_instance":p).toLowerCase(),Object.prototype.hasOwnProperty.call(i._iq,p)||(i._iq[p]={_q:[]},f(i._iq[p])),i._iq[p]},t.amplitude=i})(window,document)},pm=({projectToken:e})=>{if(window.mixpanel)return;(function(s,i){if(!i.__SV){var n,l;window.mixpanel=i,i._i=[],i.init=function(m,d,u){function o(a,r){var f=r.split(".");f.length==2&&(a=a[f[0]],r=f[1]),a[r]=function(){a.push([r].concat(Array.prototype.slice.call(arguments,0)))}}var h=i;for(typeof u<"u"?h=i[u]=[]:u="mixpanel",h.people=h.people||[],h.toString=function(a){var r="mixpanel";return u!=="mixpanel"&&(r+="."+u),a||(r+=" (stub)"),r},h.people.toString=function(){return h.toString(1)+".people (stub)"},n="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<n.length;l++)o(h,n[l]);var c="set set_once union unset remove delete".split(" ");h.get_group=function(){function a(y){r[y]=function(){call2_args=arguments,call2=[y].concat(Array.prototype.slice.call(call2_args,0)),h.push([f,call2])}}for(var r={},f=["get_group"].concat(Array.prototype.slice.call(arguments,0)),p=0;p<c.length;p++)a(c[p]);return r},i._i.push([m,d,u])},i.__SV=1.2}})(document,window.mixpanel||[]);const t=document.createElement("script");t.src=mm,document.head.appendChild(t),t.addEventListener("load",()=>{var s;(s=window.mixpanel)==null||s.init(e)})},mm="https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";class fm{constructor(t){O(this,"options"),O(this,"isRunningOnHighlight"),O(this,"organizationID"),O(this,"graphqlSDK"),O(this,"events"),O(this,"sessionData"),O(this,"ready"),O(this,"manualStopped"),O(this,"state"),O(this,"logger"),O(this,"enableSegmentIntegration"),O(this,"privacySetting"),O(this,"enableCanvasRecording"),O(this,"samplingStrategy"),O(this,"inlineImages"),O(this,"inlineVideos"),O(this,"inlineStylesheet"),O(this,"debugOptions"),O(this,"listeners"),O(this,"firstloadVersion"),O(this,"environment"),O(this,"sessionShortcut"),O(this,"appVersion"),O(this,"serviceName"),O(this,"_worker"),O(this,"_optionsInternal"),O(this,"_backendUrl"),O(this,"_recordingStartTime"),O(this,"_isOnLocalHost"),O(this,"_onToggleFeedbackFormVisibility"),O(this,"_isCrossOriginIframe"),O(this,"_eventBytesSinceSnapshot"),O(this,"_lastSnapshotTime"),O(this,"_lastVisibilityChangeTime"),O(this,"pushPayloadTimerId"),O(this,"hasSessionUnloaded"),O(this,"hasPushedData"),O(this,"reloaded"),O(this,"_hasPreviouslyInitialized"),O(this,"_recordStop"),O(this,"_integrations",[]);var s,i,n,l,m;this.options=t,typeof((s=this.options)==null?void 0:s.debug)=="boolean"?this.debugOptions=this.options.debug?{clientInteractions:!0}:{}:this.debugOptions=(n=(i=this.options)==null?void 0:i.debug)!=null?n:{},this.logger=new qn(this.debugOptions.clientInteractions),this._worker=new dm,this._worker.onmessage=u=>{var o,h,c;((o=u.data.response)==null?void 0:o.type)===Fe.AsyncEvents?(this._eventBytesSinceSnapshot+=u.data.response.eventsSize,this.logger.log(`Web worker sent payloadID ${u.data.response.id} size ${u.data.response.eventsSize} bytes, compression ratio ${u.data.response.eventsSize/u.data.response.compressedSize}.
|
|
456
|
-
Total since snapshot: ${(this._eventBytesSinceSnapshot/1e6).toFixed(1)}MB`)):((h=u.data.response)==null?void 0:h.type)===Fe.CustomEvent?this.addCustomEvent(u.data.response.tag,u.data.response.payload):((c=u.data.response)==null?void 0:c.type)===Fe.Stop&&(Ve("worker.onmessage","warn","Stopping recording due to worker failure",u.data.response),this.stop(!1))};let d=as();if(this.reloaded=!1,!((l=this.sessionData)!=null&&l.sessionSecureID)&&d!=null&&d.sessionSecureID)this.sessionData=d,this.options.sessionSecureID=d.sessionSecureID,this.reloaded=!0,this.logger.log(`Tab reloaded, continuing previous session: ${this.sessionData.sessionSecureID}`);else{for(const u of Object.values(be))os(u);this.sessionData={sessionSecureID:this.options.sessionSecureID,projectID:0,sessionStartTime:Date.now()}}this._hasPreviouslyInitialized=!1;try{window.parent.document&&(this._isCrossOriginIframe=!1)}catch{this._isCrossOriginIframe=(m=this.options.recordCrossOriginIframe)!=null?m:!0}this._initMembers(this.options)}_reset(t){return ye(this,arguments,function*({forceNew:s,sessionKey:i}){this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0);let n,l;if(!s)try{n=Ge(be.USER_IDENTIFIER);const m=Ge(be.USER_OBJECT);m&&(l=JSON.parse(m))}catch{}for(const m of Object.values(be))os(m);this.sessionData.sessionSecureID=i?wt(`${this.organizationID}-${i}`):wt(),this.sessionData.sessionKey=i,this.sessionData.sessionStartTime=Date.now(),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.stop(),this._worker.postMessage({message:{type:Fe.Reset}}),yield this.start(),n&&l&&this.identify(n,l)})}_initMembers(t){var s,i,n,l,m,d,u,o,h;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=(i=t.enableCanvasRecording)!=null?i:!1,this.inlineImages=(n=t.inlineImages)!=null?n:this._isOnLocalHost,this.inlineVideos=(l=t.inlineVideos)!=null?l:this._isOnLocalHost,this.inlineStylesheet=(m=t.inlineStylesheet)!=null?m:this._isOnLocalHost,this.samplingStrategy=K({canvasFactor:.5,canvasMaxSnapshotDimension:360,canvasClearWebGLBuffer:!0,dataUrlOptions:
|
|
455
|
+
`," ")))};var Re=Uint8Array,xe=Uint16Array,Pn=Int32Array,Dn=new Re([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]),Bn=new Re([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]),Ga=new Re([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ra=function(e,t){for(var s=new xe(31),i=0;i<31;++i)s[i]=t+=1<<e[i-1];for(var n=new Pn(s[30]),i=1;i<30;++i)for(var l=s[i];l<s[i+1];++l)n[l]=l-s[i]<<5|i;return{b:s,r:n}},va=Ra(Dn,2),tm=va.b,Qn=va.r;tm[28]=258,Qn[258]=28;for(var sm=Ra(Bn,0),Wa=sm.r,ka=new xe(32768),te=0;te<32768;++te){var je=(te&43690)>>1|(te&21845)<<1;je=(je&52428)>>2|(je&13107)<<2,je=(je&61680)>>4|(je&3855)<<4,ka[te]=((je&65280)>>8|(je&255)<<8)>>1}for(var Ot=function(e,t,s){for(var i=e.length,n=0,l=new xe(t);n<i;++n)e[n]&&++l[e[n]-1];var m=new xe(t);for(n=1;n<t;++n)m[n]=m[n-1]+l[n-1]<<1;var d;for(d=new xe(i),n=0;n<i;++n)e[n]&&(d[n]=ka[m[e[n]-1]++]>>15-e[n]);return d},nt=new Re(288),te=0;te<144;++te)nt[te]=8;for(var te=144;te<256;++te)nt[te]=9;for(var te=256;te<280;++te)nt[te]=7;for(var te=280;te<288;++te)nt[te]=8;for(var Ks=new Re(32),te=0;te<32;++te)Ks[te]=5;var im=Ot(nt,9),nm=Ot(Ks,5),wa=function(e){return(e+7)/8|0},Ca=function(e,t,s){return(s==null||s>e.length)&&(s=e.length),new Re(e.subarray(t,s))},De=function(e,t,s){s<<=t&7;var i=t/8|0;e[i]|=s,e[i+1]|=s>>8},Et=function(e,t,s){s<<=t&7;var i=t/8|0;e[i]|=s,e[i+1]|=s>>8,e[i+2]|=s>>16},jn=function(e,t){for(var s=[],i=0;i<e.length;++i)e[i]&&s.push({s:i,f:e[i]});var n=s.length,l=s.slice();if(!n)return{t:Na,l:0};if(n==1){var m=new Re(s[0].s+1);return m[s[0].s]=1,{t:m,l:1}}s.sort(function(b,g){return b.f-g.f}),s.push({s:-1,f:25001});var d=s[0],u=s[1],o=0,h=1,c=2;for(s[0]={s:-1,f:d.f+u.f,l:d,r:u};h!=n-1;)d=s[s[o].f<s[c].f?o++:c++],u=s[o!=h&&s[o].f<s[c].f?o++:c++],s[h++]={s:-1,f:d.f+u.f,l:d,r:u};for(var a=l[0].s,i=1;i<n;++i)l[i].s>a&&(a=l[i].s);var r=new xe(a+1),f=An(s[h-1],r,0);if(f>t){var i=0,p=0,y=f-t,X=1<<y;for(l.sort(function(g,G){return r[G.s]-r[g.s]||g.f-G.f});i<n;++i){var Z=l[i].s;if(r[Z]>t)p+=X-(1<<f-r[Z]),r[Z]=t;else break}for(p>>=y;p>0;){var S=l[i].s;r[S]<t?p-=1<<t-r[S]++-1:++i}for(;i>=0&&p;--i){var R=l[i].s;r[R]==t&&(--r[R],++p)}f=t}return{t:new Re(r),l:f}},An=function(e,t,s){return e.s==-1?Math.max(An(e.l,t,s+1),An(e.r,t,s+1)):t[e.s]=s},xa=function(e){for(var t=e.length;t&&!e[--t];);for(var s=new xe(++t),i=0,n=e[0],l=1,m=function(u){s[i++]=u},d=1;d<=t;++d)if(e[d]==n&&d!=t)++l;else{if(!n&&l>2){for(;l>138;l-=138)m(32754);l>2&&(m(l>10?l-11<<5|28690:l-3<<5|12305),l=0)}else if(l>3){for(m(n),--l;l>6;l-=6)m(8304);l>2&&(m(l-3<<5|8208),l=0)}for(;l--;)m(n);l=1,n=e[d]}return{c:s.subarray(0,i),n:t}},zt=function(e,t){for(var s=0,i=0;i<t.length;++i)s+=e[i]*t[i];return s},Ta=function(e,t,s){var i=s.length,n=wa(t+2);e[n]=i&255,e[n+1]=i>>8,e[n+2]=e[n]^255,e[n+3]=e[n+1]^255;for(var l=0;l<i;++l)e[n+l+4]=s[l];return(n+4+i)*8},La=function(e,t,s,i,n,l,m,d,u,o,h){De(t,h++,s),++n[256];for(var c=jn(n,15),a=c.t,r=c.l,f=jn(l,15),p=f.t,y=f.l,X=xa(a),Z=X.c,S=X.n,R=xa(p),b=R.c,g=R.n,G=new xe(19),v=0;v<Z.length;++v)++G[Z[v]&31];for(var v=0;v<b.length;++v)++G[b[v]&31];for(var V=jn(G,7),k=V.t,w=V.l,N=19;N>4&&!k[Ga[N-1]];--N);var z=o+5<<3,I=zt(n,nt)+zt(l,Ks)+m,W=zt(n,a)+zt(l,p)+m+14+3*N+zt(G,k)+2*G[16]+3*G[17]+7*G[18];if(u>=0&&z<=I&&z<=W)return Ta(t,h,e.subarray(u,u+o));var T,U,F,J;if(De(t,h,1+(W<I)),h+=2,W<I){T=Ot(a,r),U=a,F=Ot(p,y),J=p;var D=Ot(k,w);De(t,h,S-257),De(t,h+5,g-1),De(t,h+10,N-4),h+=14;for(var v=0;v<N;++v)De(t,h+3*v,k[Ga[v]]);h+=3*N;for(var O=[Z,b],x=0;x<2;++x)for(var se=O[x],v=0;v<se.length;++v){var ne=se[v]&31;De(t,h,D[ne]),h+=k[ne],ne>15&&(De(t,h,se[v]>>5&127),h+=se[v]>>12)}}else T=im,U=nt,F=nm,J=Ks;for(var v=0;v<d;++v){var ee=i[v];if(ee>255){var ne=ee>>18&31;Et(t,h,T[ne+257]),h+=U[ne+257],ne>7&&(De(t,h,ee>>23&31),h+=Dn[ne]);var ve=ee&31;Et(t,h,F[ve]),h+=J[ve],ve>3&&(Et(t,h,ee>>5&8191),h+=Bn[ve])}else Et(t,h,T[ee]),h+=U[ee]}return Et(t,h,T[256]),h+U[256]},rm=new Pn([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Na=new Re(0),om=function(e,t,s,i,n,l){var m=l.z||e.length,d=new Re(i+m+5*(1+Math.ceil(m/7e3))+n),u=d.subarray(i,d.length-n),o=l.l,h=(l.r||0)&7;if(t){h&&(u[0]=l.r>>3);for(var c=rm[t-1],a=c>>13,r=c&8191,f=(1<<s)-1,p=l.p||new xe(32768),y=l.h||new xe(f+1),X=Math.ceil(s/3),Z=2*X,S=function(Ke){return(e[Ke]^e[Ke+1]<<X^e[Ke+2]<<Z)&f},R=new Pn(25e3),b=new xe(288),g=new xe(32),G=0,v=0,V=l.i||0,k=0,w=l.w||0,N=0;V+2<m;++V){var z=S(V),I=V&32767,W=y[z];if(p[I]=W,y[z]=I,w<=V){var T=m-V;if((G>7e3||k>24576)&&(T>423||!o)){h=La(e,u,0,R,b,g,v,k,N,V-N,h),k=G=v=0,N=V;for(var U=0;U<286;++U)b[U]=0;for(var U=0;U<30;++U)g[U]=0}var F=2,J=0,D=r,O=I-W&32767;if(T>2&&z==S(V-O))for(var x=Math.min(a,T)-1,se=Math.min(32767,V),ne=Math.min(258,T);O<=se&&--D&&I!=W;){if(e[V+F]==e[V+F-O]){for(var ee=0;ee<ne&&e[V+ee]==e[V+ee-O];++ee);if(ee>F){if(F=ee,J=O,ee>x)break;for(var ve=Math.min(O,ee-2),Ie=0,U=0;U<ve;++U){var Me=V-O+U&32767,Ae=p[Me],_e=Me-Ae&32767;_e>Ie&&(Ie=_e,W=Me)}}}I=W,W=p[I],O+=I-W&32767}if(J){R[k++]=268435456|Qn[F]<<18|Wa[J];var ie=Qn[F]&31,de=Wa[J]&31;v+=Dn[ie]+Bn[de],++b[257+ie],++g[de],w=V+F,++G}else R[k++]=e[V],++b[e[V]]}}for(V=Math.max(V,w);V<m;++V)R[k++]=e[V],++b[e[V]];h=La(e,u,o,R,b,g,v,k,N,V-N,h),o||(l.r=h&7|u[h/8|0]<<3,h-=7,l.h=y,l.p=p,l.i=V,l.w=w)}else{for(var V=l.w||0;V<m+o;V+=65535){var We=V+65535;We>=m&&(u[h/8|0]=o,We=m),h=Ta(u,h+1,e.subarray(V,We))}l.i=m}return Ca(d,0,i+wa(h)+n)},lm=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var s=t,i=9;--i;)s=(s&1&&-306674912)^s>>>1;e[t]=s}return e}(),am=function(){var e=-1;return{p:function(t){for(var s=e,i=0;i<t.length;++i)s=lm[s&255^t[i]]^s>>>8;e=s},d:function(){return~e}}},cm=function(e,t,s,i,n){if(!n&&(n={l:1},t.dictionary)){var l=t.dictionary.subarray(-32768),m=new Re(l.length+e.length);m.set(l),m.set(e,l.length),e=m,n.w=l.length}return om(e,t.level==null?6:t.level,t.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,s,i,n)},_n=function(e,t,s){for(;s;++t)e[t]=s,s>>>=8},um=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&&_n(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),s){e[3]=8;for(var i=0;i<=s.length;++i)e[i+10]=s.charCodeAt(i)}},dm=function(e){return 10+(e.filename?e.filename.length+1:0)};function hm(e,t){t||(t={});var s=am(),i=e.length;s.p(e);var n=cm(e,t,dm(t),8),l=n.length;return um(n,t),_n(n,l-8,s.d()),_n(n,l-4,i),n}var Ja=typeof TextEncoder<"u"&&new TextEncoder,pm=typeof TextDecoder<"u"&&new TextDecoder;try{pm.decode(Na,{stream:!0})}catch{}function mm(e,t){var s;if(Ja)return Ja.encode(e);for(var i=e.length,n=new Re(e.length+(e.length>>1)),l=0,m=function(h){n[l++]=h},s=0;s<i;++s){if(l+5>n.length){var d=new Re(l+8+(i-s<<1));d.set(n),n=d}var u=e.charCodeAt(s);u<128||t?m(u):u<2048?(m(192|u>>6),m(128|u&63)):u>55295&&u<57344?(u=65536+(u&1047552)|e.charCodeAt(++s)&1023,m(240|u>>18),m(128|u>>12&63),m(128|u>>6&63),m(128|u&63)):(m(224|u>>12),m(128|u>>6&63),m(128|u&63))}return Ca(n,0,l)}function fm(e){return ye(this,null,function*(){const t=mm(JSON.stringify(e)),s=hm(t),i=yield new Promise(n=>{const l=new FileReader;l.onload=()=>n(l.result),l.readAsDataURL(new Blob([new Uint8Array(s)]))});return{compressedBase64:i.slice(i.indexOf(",")+1),compressedSize:s.length,bufferLength:t.length}})}const Ya="dmFyIFVyPU9iamVjdC5kZWZpbmVQcm9wZXJ0eSxWcj1PYmplY3QuZGVmaW5lUHJvcGVydGllczt2YXIgcXI9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcnM7dmFyICRlPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHM7dmFyIHRuPU9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHksbm49T2JqZWN0LnByb3RvdHlwZS5wcm9wZXJ0eUlzRW51bWVyYWJsZTt2YXIgaHQ9KEYsJCxCKT0+JCBpbiBGP1VyKEYs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2lmKHYuZGF0YS5tZXNzYWdlLnR5cGU9PT1aLkluaXRpYWxpemUpe3Q9di5kYXRhLm1lc3NhZ2UuYmFja2VuZCxuPXYuZGF0YS5tZXNzYWdlLnNlc3Npb25TZWN1cmVJRCxzPXYuZGF0YS5tZXNzYWdlLmRlYnVnLG89di5kYXRhLm1lc3NhZ2UucmVjb3JkaW5nU3RhcnRUaW1lLGMuZGVidWc9cyxlPXByKG5ldyBIbih0LHtoZWFkZXJzOnt9fSksTXIoKSkseWllbGQgcSgpO3JldHVybn1pZih2LmRhdGEubWVzc2FnZS50eXBlPT09Wi5SZXNldCl7ZC5sZW5ndGg9MCxoLmxlbmd0aD0wLGk9MCxyPTAsbj0iIixvPTA7cmV0dXJufWlmKHYuZGF0YS5tZXNzYWdlLnR5cGU9PT1aLkdldFN0YXR1cyl7U2UucG9zdE1lc3NhZ2Uoe3Jlc3BvbnNlOnt0eXBlOlouR2V0U3RhdHVzLHBlbmRpbmdDb3VudDpkLmxlbmd0aCxpbml0aWFsaXplZDp1KCl9fSk7cmV0dXJufWlmKCF1KCkpe2QucHVzaCh2LmRhdGEubWVzc2FnZSk7cmV0dXJufXRyeXt5aWVsZCBQKHYuZGF0YS5tZXNzYWdlKSxpPTAseWllbGQgcSgpfWNhdGNoKEUpe3MmJmNvbnNvbGUuZXJyb3IoRSksaSs9MX19KX19fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aGlnaGxpZ2h0LWNsaWVudC13b3JrZXItRHNiS01weHEuanMubWFwCg==",bm=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),Ua=typeof self<"u"&&self.Blob&&new Blob([bm(Ya)],{type:"text/javascript;charset=utf-8"});function ym(e){let t;try{if(t=Ua&&(self.URL||self.webkitURL).createObjectURL(Ua),!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,"+Ya,{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var Fe=(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))(Fe||{});const gm=({apiKey:e})=>{(function(t,s){var i=t.amplitude||{_q:[],_iq:{}},n=s.createElement("script");n.type="text/javascript",n.integrity="sha384-+EO59vL/X7v6VE2s6/F4HxfHlK0nDUVWKVg8K9oUlvffAeeaShVBmbORTC2D3UF+",n.crossOrigin="anonymous",n.async=!0,n.src="https://cdn.amplitude.com/libs/amplitude-8.17.0-min.gz.js",n.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(n,l);function m(p,y){p.prototype[y]=function(){return this._q.push([y].concat(Array.prototype.slice.call(arguments,0))),this}}for(var d=function(){return this._q=[],this},u=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove"],o=0;o<u.length;o++)m(d,u[o]);i.Identify=d;for(var h=function(){return this._q=[],this},c=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"],a=0;a<c.length;a++)m(h,c[a]);i.Revenue=h;var r=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","enableTracking","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","groupIdentify","onInit","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"];function f(p){function y(Z){p[Z]=function(){p._q.push([Z].concat(Array.prototype.slice.call(arguments,0)))}}for(var X=0;X<r.length;X++)y(r[X])}f(i),i.getInstance=function(p){return p=(!p||p.length===0?"$default_instance":p).toLowerCase(),Object.prototype.hasOwnProperty.call(i._iq,p)||(i._iq[p]={_q:[]},f(i._iq[p])),i._iq[p]},t.amplitude=i})(window,document)},Zm=({projectToken:e})=>{if(window.mixpanel)return;(function(s,i){if(!i.__SV){var n,l;window.mixpanel=i,i._i=[],i.init=function(m,d,u){function o(a,r){var f=r.split(".");f.length==2&&(a=a[f[0]],r=f[1]),a[r]=function(){a.push([r].concat(Array.prototype.slice.call(arguments,0)))}}var h=i;for(typeof u<"u"?h=i[u]=[]:u="mixpanel",h.people=h.people||[],h.toString=function(a){var r="mixpanel";return u!=="mixpanel"&&(r+="."+u),a||(r+=" (stub)"),r},h.people.toString=function(){return h.toString(1)+".people (stub)"},n="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<n.length;l++)o(h,n[l]);var c="set set_once union unset remove delete".split(" ");h.get_group=function(){function a(y){r[y]=function(){call2_args=arguments,call2=[y].concat(Array.prototype.slice.call(call2_args,0)),h.push([f,call2])}}for(var r={},f=["get_group"].concat(Array.prototype.slice.call(arguments,0)),p=0;p<c.length;p++)a(c[p]);return r},i._i.push([m,d,u])},i.__SV=1.2}})(document,window.mixpanel||[]);const t=document.createElement("script");t.src=Sm,document.head.appendChild(t),t.addEventListener("load",()=>{var s;(s=window.mixpanel)==null||s.init(e)})},Sm="https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";var Os;class Im{constructor(t){E(this,"options"),E(this,"isRunningOnHighlight"),E(this,"organizationID"),cd(this,Os),E(this,"events"),E(this,"sessionData"),E(this,"ready"),E(this,"manualStopped"),E(this,"state"),E(this,"logger"),E(this,"enableSegmentIntegration"),E(this,"privacySetting"),E(this,"enableCanvasRecording"),E(this,"samplingStrategy"),E(this,"inlineImages"),E(this,"inlineVideos"),E(this,"inlineStylesheet"),E(this,"debugOptions"),E(this,"listeners"),E(this,"firstloadVersion"),E(this,"environment"),E(this,"sessionShortcut"),E(this,"appVersion"),E(this,"serviceName"),E(this,"_worker"),E(this,"_optionsInternal"),E(this,"_backendUrl"),E(this,"_recordingStartTime"),E(this,"_isOnLocalHost"),E(this,"_onToggleFeedbackFormVisibility"),E(this,"_isCrossOriginIframe"),E(this,"_eventBytesSinceSnapshot"),E(this,"_lastSnapshotTime"),E(this,"_lastVisibilityChangeTime"),E(this,"pushPayloadTimerId"),E(this,"hasSessionUnloaded"),E(this,"hasPushedData"),E(this,"reloaded"),E(this,"_hasPreviouslyInitialized"),E(this,"_recordStop"),E(this,"_integrations",[]);var s,i,n,l,m;this.options=t,typeof((s=this.options)==null?void 0:s.debug)=="boolean"?this.debugOptions=this.options.debug?{clientInteractions:!0}:{}:this.debugOptions=(n=(i=this.options)==null?void 0:i.debug)!=null?n:{},this.logger=new er(this.debugOptions.clientInteractions),this._worker=new ym,this._worker.onmessage=u=>{var o,h,c;((o=u.data.response)==null?void 0:o.type)===Fe.AsyncEvents?(this._eventBytesSinceSnapshot+=u.data.response.eventsSize,this.logger.log(`Web worker sent payloadID ${u.data.response.id} size ${u.data.response.eventsSize} bytes, compression ratio ${u.data.response.eventsSize/u.data.response.compressedSize}.
|
|
456
|
+
Total since snapshot: ${(this._eventBytesSinceSnapshot/1e6).toFixed(1)}MB`)):((h=u.data.response)==null?void 0:h.type)===Fe.CustomEvent?this.addCustomEvent(u.data.response.tag,u.data.response.payload):((c=u.data.response)==null?void 0:c.type)===Fe.Stop&&(Ve("worker.onmessage","warn","Stopping recording due to worker failure",u.data.response),this.stop(!1))};let d=as();if(this.reloaded=!1,!((l=this.sessionData)!=null&&l.sessionSecureID)&&d!=null&&d.sessionSecureID)this.sessionData=d,this.options.sessionSecureID=d.sessionSecureID,this.reloaded=!0,this.logger.log(`Tab reloaded, continuing previous session: ${this.sessionData.sessionSecureID}`);else{for(const u of Object.values(be))os(u);this.sessionData={sessionSecureID:this.options.sessionSecureID,projectID:0,sessionStartTime:Date.now()}}this._hasPreviouslyInitialized=!1;try{window.parent.document&&(this._isCrossOriginIframe=!1)}catch{this._isCrossOriginIframe=(m=this.options.recordCrossOriginIframe)!=null?m:!0}this._initMembers(this.options)}_reset(t){return ye(this,arguments,function*({forceNew:s,sessionKey:i}){this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0);let n,l;if(!s)try{n=Ge(be.USER_IDENTIFIER);const m=Ge(be.USER_OBJECT);m&&(l=JSON.parse(m))}catch{}for(const m of Object.values(be))os(m);this.sessionData.sessionSecureID=i?wt(`${this.organizationID}-${i}`):wt(),this.sessionData.sessionKey=i,this.sessionData.sessionStartTime=Date.now(),this.options.sessionSecureID=this.sessionData.sessionSecureID,this.stop(),this._worker.postMessage({message:{type:Fe.Reset}}),yield this.start(),n&&l&&this.identify(n,l)})}_initMembers(t){var s,i,n,l,m,d,u,o,h;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=(i=t.enableCanvasRecording)!=null?i:!1,this.inlineImages=(n=t.inlineImages)!=null?n:this._isOnLocalHost,this.inlineVideos=(l=t.inlineVideos)!=null?l:this._isOnLocalHost,this.inlineStylesheet=(m=t.inlineStylesheet)!=null?m:this._isOnLocalHost,this.samplingStrategy=K({canvasFactor:.5,canvasMaxSnapshotDimension:360,canvasClearWebGLBuffer:!0,dataUrlOptions:pu()},(d=t.samplingStrategy)!=null?d:{canvas:2}),this._backendUrl=(u=t?.backendUrl)!=null?u:"https://pub.observability.app.launchdarkly.com",this._backendUrl[0]==="/"&&(this._backendUrl=new URL(this._backendUrl,document.baseURI).href);const c=new zc(`${this._backendUrl}`,{headers:{}});ud(this,Os,du(c,Fu())),this.environment=(o=t.environment)!=null?o:"production",this.appVersion=t.appVersion,this.serviceName=(h=t.serviceName)!=null?h:"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 a=t,r=mt(a,["firstloadVersion"]);this._optionsInternal=r,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={},i){if(!t||t===""){Ve("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,Ee(be.USER_IDENTIFIER,t.toString()),Ee(be.USER_OBJECT,JSON.stringify(s)),this._worker.postMessage({message:{type:Fe.Identify,userIdentifier:t,userObject:s,source:i}})}track(t,s){this.addProperties(he(K({},s),{event:t}))}addProperties(t={},s){const i=K({},t);Object.entries(i).forEach(([n,l])=>{try{structuredClone(l)}catch{delete i[n]}}),this._worker.postMessage({message:{type:Fe.Properties,propertiesObject:i,propertyType:s}})}addSessionProperties(t){this.addProperties(t,{type:"session"})}start(t){return ye(this,null,function*(){var s,i,n,l,m,d,u,o,h,c;if(!((s=navigator?.userAgent)!=null&&s.includes("Googlebot")||(i=navigator?.userAgent)!=null&&i.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(he(K({},t),{forceNew:!0}));return}this.logger.log("Initializing...",t,this.sessionData,this.options),this.sessionData=(n=as(this.sessionData.sessionSecureID))!=null?n:this.sessionData,(l=this.sessionData)!=null&&l.sessionStartTime?this._recordingStartTime=(m=this.sessionData)==null?void 0:m.sessionStartTime:(this._recordingStartTime=new Date().getTime(),this.sessionData.sessionStartTime=this._recordingStartTime);let a=Ge(li.CLIENT_ID);a||(a=wt(),Ee(li.CLIENT_ID,a));let r;this.options.disableSessionRecording||this.options.disableNetworkRecording!==void 0||typeof this.options.networkRecording=="boolean"?r=!1:r=((d=this.options.networkRecording)==null?void 0:d.recordHeadersAndBody)||!1;let f=[];if(typeof this.options.networkRecording=="object"&&(u=this.options.networkRecording.destinationDomains)!=null&&u.length&&(f=this.options.networkRecording.destinationDomains),this._isCrossOriginIframe)yield this._setupCrossOriginIframe();else{const S=yield ad(this,Os).initializeSession({organization_verbose_id:this.organizationID,enable_strict_privacy:this.privacySetting==="strict",privacy_setting:this.privacySetting,enable_recording_network_contents:r,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:f,disable_session_recording:this.options.disableSessionRecording});if(S.initializeSession.secure_id!==this.sessionData.sessionSecureID&&this.logger.log(`Unexpected secure id returned by initializeSession: ${S.initializeSession.secure_id}, expected ${this.sessionData.sessionSecureID}`),this.sessionData.sessionSecureID=S.initializeSession.secure_id,this.sessionData.projectID=parseInt(((o=S?.initializeSession)==null?void 0:o.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(""),qe(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:Fe.Initialize,sessionSecureID:this.sessionData.sessionSecureID,backend:this._backendUrl,debug:!!this.debugOptions.clientInteractions,recordingStartTime:this._recordingStartTime}});for(const S of this._integrations)S.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()},
|
|
459
|
+
SessionSecureID: ${this.sessionData.sessionSecureID}`),this.options.sessionSecureID=this.sessionData.sessionSecureID,this._worker.postMessage({message:{type:Fe.Initialize,sessionSecureID:this.sessionData.sessionSecureID,backend:this._backendUrl,debug:!!this.debugOptions.clientInteractions,recordingStartTime:this._recordingStartTime}});for(const S of this._integrations)S.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()},vr)),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 p=(S,R)=>{R&&this.logger.log("received isCheckout emit",{event:S}),this.events.push(S)};p.bind(this);const y=!!this._recordStop;this._recordStop&&(this._recordStop(),this._recordStop=void 0);const[X,Z]=Fp(this.privacySetting,this.options.maskAllInputs,this.options.maskInputOptions);this._recordStop=Pe({ignoreClass:(h=this.options.ignoreClass)!=null?h:"highlight-ignore",ignoreSelector:this.options.ignoreSelector,blockClass:(c=this.options.blockClass)!=null?c:"highlight-block",blockSelector:this.options.blockSelector,emit:p,recordCrossOriginIframes:this.options.recordCrossOriginIframe,privacySetting:this.privacySetting,maskAllInputs:X,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:S=>!this.options.recordCrossOriginIframe,inlineImages:this.inlineImages,inlineVideos:this.inlineVideos,collectFonts:this.inlineImages,inlineStylesheet:this.inlineStylesheet,plugins:[pd()],logger:typeof this.options.debug=="boolean"&&this.options.debug||typeof this.options.debug=="object"&&this.options.debug.domRecording?{debug:this.logger.log,warn:Ve.bind("RecordSDK","warn")}:void 0}),y||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){Ve("initializeSession _setupWindowListeners","warn",a)}})}_visibilityHandler(t){return ye(this,null,function*(){if(this.manualStopped){this.logger.log("Ignoring visibility event due to manual stop.");return}new Date().getTime()-this._lastVisibilityChangeTime<gu||(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 ye(this,null,function*(){this.logger.log("highlight in cross-origin iframe is waiting "),yield new Promise(t=>{const s=i=>{if(i.data.highlight===Va){const n=i.data;this.logger.log("highlight got window message ",n),this.sessionData.projectID=n.projectID,this.sessionData.sessionSecureID=n.sessionSecureID,window.parent.postMessage({highlight:Xa},"*"),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:Va,projectID:this.sessionData.projectID,sessionSecureID:this.sessionData.sessionSecureID},"*")})},vr),window.addEventListener("message",t=>{t.data.highlight===Xa&&this.logger.log("highlight got response from initialized iframe")})}_setupWindowListeners(){var t;try{const i=this;this.enableSegmentIntegration&&this.listeners.push(Ep(l=>{if(l.type==="track"){const m={};m["segment-event"]=l.event,i.addProperties(m,{type:"track",source:"segment"})}else if(l.type==="identify"){const m=l.userId.replace(/^"(.*)"$/,"$1");i.identify(m,l.traits,"segment")}})),this.listeners.push(Bu(l=>{this.reloaded?(this.addCustomEvent("Reload",l),this.reloaded=!1,i.addProperties({reload:!0},{type:"session"})):this.addCustomEvent("Navigate",l)})),this.listeners.push(qu(l=>{this.addCustomEvent("Viewport",l)})),this.listeners.push(Mp((l,m)=>{let d=null,u=null;if(m&&m.target){const o=m.target;d=_u(o),u=o.textContent,u&&u.length>2e3&&(u=u.substring(0,2e3))}this.addCustomEvent("Click",{clickTarget:l,clickTextContent:u,clickSelector:d})})),this.listeners.push(Kp(l=>{l&&this.addCustomEvent("Focus",l)})),this.sessionShortcut&&Hp(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.")):(Op(l=>this._visibilityHandler(l)),this.logger.log("Set up document visibility listener.")),this._hasPreviouslyInitialized=!0);const n=()=>{this.hasSessionUnloaded=!0,this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0)};window.addEventListener("beforeunload",n),this.listeners.push(()=>window.removeEventListener("beforeunload",n))}catch(i){Ve("initializeSession _setupWindowListeners","warn",i)}const s=()=>{this.addCustomEvent("Page Unload",""),kt(this.sessionData.sessionSecureID),qe(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 i=()=>{this.addCustomEvent("Page Unload",""),kt(this.sessionData.sessionSecureID),qe(this.sessionData)};window.addEventListener("pagehide",i),this.listeners.push(()=>window.removeEventListener("beforeunload",i))}}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:i}=this.sessionData,n=(t-this._recordingStartTime)/1e3;return`https://${kr}/${s}/sessions/${i}?ts=${n}`}getCurrentSessionURL(){const t=this.sessionData.projectID,s=this.sessionData.sessionSecureID;return t&&s?`https://${kr}/${t}/sessions/${s}`:null}snapshot(t){return ye(this,null,function*(){yield Pe.snapshotCanvas(t)})}addSessionFeedback({timestamp:t,verbatim:s,user_email:i,user_name:n}){var l;this._worker.postMessage({message:{type:Fe.Feedback,verbatim:s,timestamp:t,userName:n||this.sessionData.userIdentifier,userEmail:i||((l=this.sessionData.userObject)==null?void 0:l.name)}})}_save(){return ye(this,null,function*(){var t;try{this.state==="Recording"&&this.listeners&&!this.sessionData.sessionKey&&this.sessionData.sessionStartTime&&Date.now()-this.sessionData.sessionStartTime>yu&&(this.logger.log("Resetting session",{start:this.sessionData.sessionStartTime}),yield this._reset({}));let s;((t=this.options)==null?void 0:t.sendMode)==="local"&&(s=i=>ye(this,null,function*(){let n=new Blob([JSON.stringify({query:gr(Rr),variables:i})],{type:"application/json"});return yield window.fetch(`${this._backendUrl}`,{method:"POST",body:n}),0})),yield this._sendPayload({sendFn:s}),this.hasPushedData=!0,this.sessionData.lastPushTime=Date.now(),qe(this.sessionData)}catch(s){Ve("_save","warn",s)}this.state==="Recording"&&(this.pushPayloadTimerId&&(clearTimeout(this.pushPayloadTimerId),this.pushPayloadTimerId=void 0),this.pushPayloadTimerId=setTimeout(()=>{this._save()},bu))})}addCustomEvent(t,s){if(this.state==="NotRecording"){let i;const n=()=>{clearInterval(i),this.state==="Recording"&&this.events.length>0?ga(t,s):i=setTimeout(n,500)};i=setTimeout(n,500)}else this.state==="Recording"&&(this.events.length>0||this.hasPushedData)&&ga(t,s)}_sendPayload(t){return ye(this,arguments,function*({sendFn:s}){const i=[...this.events],{bytes:n,time:l}=this.enableCanvasRecording?Wr.canvas:Wr.normal;this._eventBytesSinceSnapshot>=n&&new Date().getTime()-this._lastSnapshotTime>=l&&this.takeFullSnapshot(),this.logger.log(`Sending: ${i.length} events,
|
|
460
460
|
To: ${this._backendUrl}
|
|
461
461
|
Org: ${this.organizationID}
|
|
462
|
-
SessionSecureID: ${this.sessionData.sessionSecureID}`);const m=new Date().getTime(),d=
|
|
462
|
+
SessionSecureID: ${this.sessionData.sessionSecureID}`);const m=new Date().getTime(),d=qp();if(s){const u={session_secure_id:this.sessionData.sessionSecureID,payload_id:m.toString(),events:{events:i},messages:Bc({messages:[]}),resources:JSON.stringify({resources:[]}),web_socket_events:JSON.stringify({webSocketEvents:[]}),errors:[],is_beacon:!1,has_session_unloaded:this.hasSessionUnloaded,highlight_logs:d||void 0},{compressedBase64:o}=yield fm(u);yield s({session_secure_id:this.sessionData.sessionSecureID,payload_id:m.toString(),data:o})}else this._worker.postMessage({message:{type:Fe.AsyncEvents,id:m,events:i,messages:[],errors:[],resourcesString:JSON.stringify({resources:[]}),webSocketEventsString:JSON.stringify({webSocketEvents:[]}),hasSessionUnloaded:this.hasSessionUnloaded,highlightLogs:d}});qe(this.sessionData),this.events=this.events.slice(i.length),em(d)})}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}),Pe.takeFullSnapshot(),this._eventBytesSinceSnapshot=0,this._lastSnapshotTime=new Date().getTime()}register(t,s){this._integrations.push(new Du(t,s))}getHooks(t){return this._integrations.flatMap(s=>{var i,n;return(n=(i=s.getHooks)==null?void 0:i.call(s,t))!=null?n:[]})}getRecordingState(){var t;return(t=this==null?void 0:this.state)!=null?t:"NotRecording"}getSession(){const t=this.sessionData.sessionSecureID,s=as(t);if(!s)return null;const i=`${this.getFrontendUrl()}/sessions/${t}`;if(!i||!s?.sessionStartTime)return null;const n=new Date().getTime();let l;try{l=new URL(i)}catch(u){return Ve("identify","warn",`failed to construct session url from ${i}`,u),null}const m=new URL(l),d=(n-this._recordingStartTime)/1e3;return m.searchParams.set("ts",d.toString()),{url:l.toString(),urlWithTimestamp:m.toString(),sessionSecureID:t}}getFrontendUrl(){var t,s;const i=this._backendUrl.match(Vu);if(i&&(t=i?.groups)!=null&&t.domain){const n=(s=i.groups.domain)!=null?s:"";return`https://${Su[n]}${Iu}`}return Zu}}Os=new WeakMap;class Vm extends id{constructor(t){super(t),E(this,"record"),E(this,"options"),this.options=t}initialize(t,s){var i,n,l,m,d,u,o,h,c;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=he(K({},s),{organizationID:t,firstloadVersion:Au,environment:s?.environment||"production",appVersion:s?.version,sessionSecureID:this.sessionSecureID,privacySetting:(i=s?.privacySetting)!=null?i:"strict"});this.record=new Im(a),s!=null&&s.manualStart||this.record.start(),we.LDRecord.load(this.record),!((l=(n=s?.integrations)==null?void 0:n.mixpanel)!=null&&l.disabled)&&(d=(m=s?.integrations)==null?void 0:m.mixpanel)!=null&&d.projectToken&&Zm(s.integrations.mixpanel),!((o=(u=s?.integrations)==null?void 0:u.amplitude)!=null&&o.disabled)&&(c=(h=s?.integrations)==null?void 0:h.amplitude)!=null&&c.apiKey&&gm(s.integrations.amplitude)}catch(a){Ve("Error initializing @launchdarkly/session-replay SDK","error",a)}}getMetadata(){return{name:"@launchdarkly/session-replay"}}register(t,s){var i;(i=this.record)==null||i.register(t,s)}getHooks(t){var s,i,n,l;const m=K(K({[mu]:t.sdk.name,[fu]:t.sdk.version,[Mu]:t.clientSideId,[Ku]:"LaunchDarkly"},(s=t.application)!=null&&s.id?{[Ou]:t.application.id}:{}),(i=t.application)!=null&&i.version?{[Eu]:t.application.version}:{});return this.initialize((l=(n=t.sdkKey)!=null?n:t.mobileKey)!=null?l:t.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/session-replay/hooks"}),afterIdentify:(d,u,o)=>{var h,c,a,r,f,p,y,X;for(const Z of(a=(c=(h=this.record)==null?void 0:h.getHooks)==null?void 0:c.call(h,t))!=null?a:[])(r=Z.afterIdentify)==null||r.call(Z,d,u,o);if(o.status==="completed"){const Z=he(K({},Hu(d.context)),{key:(y=(p=(f=this.options)==null?void 0:f.contextFriendlyName)==null?void 0:p.call(f,d.context))!=null?y:Ur(d.context),canonicalKey:Ur(d.context)});(X=this.record)==null||X.identify(Z.key,K(K({},m),Z),"LaunchDarkly")}return u},afterEvaluation:(d,u,o)=>{var h,c,a,r;for(const f of(a=(c=(h=this.record)==null?void 0:h.getHooks)==null?void 0:c.call(h,t))!=null?a:[])(r=f.afterEvaluation)==null||r.call(f,d,u,o);return u},afterTrack:d=>{var u,o,h,c,a;for(const r of(h=(o=(u=this.record)==null?void 0:u.getHooks)==null?void 0:o.call(u,t))!=null?h:[])(c=r.afterTrack)==null||c.call(r,d);(a=this.record)==null||a.track(d.key,{data:d.data,value:d.metricValue})}}]}}class Fa extends zs{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,i,n){return this._bufferCall("startSpan",[t,s,i,n])}startManualSpan(t,s,i,n){return this._bufferCall("startManualSpan",[t,s,i,n])}register(t,s){return this._bufferCall("register",[t,s])}recordLog(t,s,i){return this._bufferCall("recordLog",[t,s,i])}recordError(t,s,i,n,l){return this._bufferCall("recordError",[t,s,i,n,l])}setLDContextKeyAttributes(t){return this._bufferCall("setLDContextKeyAttributes",[t])}getLDContextKeyAttributes(){return this._bufferCall("getLDContextKeyAttributes",[])}}let Ht;typeof globalThis<"u"?globalThis.LDObserve?Ht=globalThis.LDObserve:(Ht=new Fa,globalThis.LDObserve=Ht):Ht=new Fa;const Xm=Object.freeze(Object.defineProperty({__proto__:null,get LDObserve(){return Ht}},Symbol.toStringTag,{value:"Module"}));we.default=Vm,Object.defineProperties(we,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
463
463
|
//# sourceMappingURL=index.umd.js.map
|